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
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 STAKERPreparing 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
*
into your raspberry
ssh pi@<YOUR LAN IP ADDRESS>
The standard password is "raspberry"
* Configure your raspbery by running
:
* 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)
*
sudo nano /etc/dphys-swapfile
* Change the default value of
to
* 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)
sudo apt-get dist-upgrade
* Install the basic packages
sudo apt-get install build-essential libtool autotools-dev autoconf pkg-config libssl-dev libcrypto++-dev libdb++-dev libboost-all-dev
* Install git
* Set root password
Build Berkeley DB 4.8* Pick some path to install Berkeley DB4.8 (DBD). Here, we just install it a folder called "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
* Fetch the source and verify that it is not tampered with
wget 'http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz'
echo '12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef db-4.8.30.NC.tar.gz' | sha256sum -c
tar -xzvf db-4.8.30.NC.tar.gz
* Build the library and install to our prefix (get a small cup of tea)
cd db-4.8.30.NC/build_unix/
../dist/configure --prefix=$BDB_PREFIX --enable-cxx --with-pic
* Build and install (I had no problems with sudo, contrary to the other tutorial posted)
Build Silk-Core* Clone Silk-Core using git
git clone https://github.com/SilkNetwork/Silk-Core.git
* Generate installation files
* Configure installation
./configure --without-gui --disable-tests LDFLAGS="-L${BDB_PREFIX}/lib/" CPPFLAGS="-I${BDB_PREFIX}/include/"
* Compile and install
Running a Silk-Node* Start the Silk Daemon
. This will be always running in the background, and you will interact with it via sending rpc commands from using
. Running this for the first time will generate the hidden folder
* You will receive an error message, telling you that you have to change some values in the (automatically generated) file
* Now change
to
(and, if you want, you can change the rpcuser and its password) and safe the file (
)
* Try to start the dameon again. This time, it should work.
* Now you are ready to interact with the daemon using
Interacting with the Daemon* For an overview of commands use
* Check the status
* 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)
* 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)
silk-cli importprivkey "<private_key>"
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:
ScyJtVwAbQKJuxcrxtvwhnB3wi9Tx5GSQQBTC:
1HFKhsyR4Mbr1v2YRC5cJc6biC8pNK4cnBKeep On Marching!