Post
Topic
Board Announcements (Altcoins)
Re: [ANN] Silk Network: Silk(SLK), DarkSilk(DSLK) and Weaver
by
thisisanalias
on 05/10/2016, 09:55:18 UTC
Hello everyone,

I have some progress to report on setting up a staker on the raspberry-pi. Silk runs pretty smoothly with  about 9.7% memory use and between 15-30% cpu usage on my raspberry-pi 2. I also installed it on my model 1, and it seems also to be working well. Staking works and my machine earned me some SLK over night Smiley
I know @prometheusX has posted a tutorial already, but there were still some steps left out.
So here is my raspberry-pi staker building instructions that should be quite accessible for everyone.


Raspberry PI SILK STAKER


Preparing the raspberry-pi
* Get the latest raspbian-lite image from the Raspbian download page
* Flash SD card according to the official intructions
* Insert SD card into pi, connect LAN, power raspberry pi
* Find IP address of raspberry
*
Code:
ssh
into your raspberry
Code:
ssh pi@
The standard password is "raspberry"
* Configure your raspbery by running
Code:
sudo raspi-config
:
 * Expand filesystem
 * Change password for the user pi
 * Overclock to your likings (useful for compilation, see below, but not really required for running the very slick silk client)
 * Under "Advanced options", you can set the shared memory for the GPU to only 16MB. We won't be running any graphical applications in any case
* Edit swap file size to 512MB (see also this guide)
 *
Code:
sudo nano /etc/dphys-swapfile
* Change the default value of
Code:
CONF_SWAPSIZE=100
to
Code:
CONF_SWAPSIZE=512
* Reboot the pi

Installing the prerequisistes
* After reboot, login again and install the basic dependencies needed for Silk. All details are on the SilkNetwork github page
* Refresh the list of repositories, and upgrade (you can get a cup of tea in the meanwhile)
Code:
sudo apt-get update
Code:
sudo apt-get upgrade
Code:
sudo apt-get dist-upgrade
* Install the basic packages
Code:
sudo apt-get install build-essential libtool autotools-dev autoconf pkg-config libssl-dev libcrypto++-dev libdb++-dev libboost-all-dev
* Install git
Code:
sudo apt-get install git
* Set root password
Code:
sudo passwd root

Build Berkeley DB 4.8
* Pick some path to install Berkeley DB4.8 (DBD). Here, we just install it a folder called "BDB4.8"
Code:
mkdir BDB4.8
Code:
cd BDB4.8
* Now that we are in the directory where we will build BDB, let's define an environement variable that we will use later
Code:
BDB_PREFIX=$(pwd)
* Fetch the source and verify that it is not tampered with
Code:
wget 'http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz'
Code:
echo '12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef  db-4.8.30.NC.tar.gz' | sha256sum -c
Code:
tar -xzvf db-4.8.30.NC.tar.gz
* Build the library and install to our prefix (get a small cup of tea)
Code:
cd db-4.8.30.NC/build_unix/
Code:
../dist/configure --prefix=$BDB_PREFIX --enable-cxx --with-pic
* Build and install (I had no problems with sudo, contrary to the other tutorial posted)
Code:
make
Code:
sudo make install

Build Silk-Core
* Clone Silk-Core using git
Code:
git clone https://github.com/SilkNetwork/Silk-Core.git
Code:
cd Silk-Core
* Generate installation files
Code:
./autogen
* Configure installation
Code:
./configure --without-gui --disable-tests LDFLAGS="-L${BDB_PREFIX}/lib/" CPPFLAGS="-I${BDB_PREFIX}/include/"
* Compile and install
Code:
make
Code:
sudo make install

Running a Silk-Node
* Start the Silk Daemon
Code:
silkd
. This will be always running in the background, and you will interact with it via sending rpc commands from using
Code:
silk-cli
. Running this for the first time will generate the hidden folder
Code:
~/.silk
Code:
silkd --daemon
* You will receive an error message, telling you that you have to change some values in the (automatically generated) file
Code:
~/.silk/silk.conf
Code:
nano ~/.silk/silk.conf
* Now change
Code:
listen=1
to
Code:
listen=0
(and, if you want, you can change the rpcuser and its password) and safe the file (
Code:
+o
)
* Try to start the dameon again. This time, it should work.
Code:
silkd --deamon
* Now you are ready to interact with the daemon using
Code:
silk-cli

Interacting with the Daemon
* For an overview of commands use
Code:
silk-cli help
* Check the status
Code:
silk-cli getinfo
* If you see an error "wallet loading" then don't worry: you were simply too fast and the wallet file is still building. Give it two minutes and try again

Staking
* On your main machine, create a new address that you want to use for staking. If you want, use the splitcoin feature to generate this address already with a multitude of inputs.
* Now on the QT-Wallet on you main machine, go to Tools/Debug Console and get the private key of this staking address (Note: Wallet needs to be unlocked for that)
Code:
dumpprivkey "
"
* Write down/copy the the private key
* Go to your Raspberry and import the private key (you can optionally provide a label for this address in the wallet)
Code:
silk-cli importprivkey ""


Happy staking!
That should be all. If you have questions, message me or answer. I will be posting some proper benchmarks later. @Devs: if you want this guide for the docs, I am happy to provide. @fellow silkers: If you find this helpful (and especially, if you have succeeded in setting up your staker), consider buying me a beer or a cup of tea:
SLK: ScyJtVwAbQKJuxcrxtvwhnB3wi9Tx5GSQQ
BTC: 1HFKhsyR4Mbr1v2YRC5cJc6biC8pNK4cnB

Keep On Marching!


When I get to ./autogen for silk core - no such file or dir. What do I do? Thanks