Make your own stakebox. Ultimate beginners guide how to compile any wallet on AARCH64 (Raspbery pi and other SBC)

I contemplated to wrote this for a long time, so it's finally time.As you know a lot of altcoins uses PoS (Proof-of-stake) way of "mining" coins. Which basically means, that you hold coins on your unlocked wallet and you are receiving stakes as a reward. This requires very little power and it can bring you a lot of rewards, at just 10W from the wall.So first I am using latest Raspbian on RPI4B 4GB in this example.Setting up Raspbian is not part of this process since it's very well documented. I recommend to change user from pi to something else due to security concerns and you can also do other stuff just search "security Raspberry PI" and you find a lot of articles, but this is not the focus of this guide.I know there are a lot of guides on the internet, but I am using like 5 sources, so it's compiled what other people wrote and some of my research.I am using AnyDesk insted of SSH or VNC server, because it works it's ligthweit and it just works.So after you see the gui of Raspbian, just launch terminal (CTRL + ALT + T) and do basic thing:sudo apt-get update && sudo apt-get upgradeThan press Y and let it run, after is finished, we need to prepare so dependency packages. Since most of the wallets using Berkeley DB 4.8 we need to obtain it.So in terminal wrote:cd cd Downloads wget https://ift.tt/1k76EC9 tar -xzvf db-4.8.30.NC.tar.gz cd db-4.8.30.NC/build_unix ../dist/configure --enable-cxx make sudo make install So wait unti it's finished and than you can delete files in Downloads folder in gui or use:sudo rm -r [folder] So next thing we need to install some libraries.sudo apt-get install git build-essential libtool autotools-dev autoconf pkg-config libssl-dev libcrypto++-dev libevent-dev libminiupnpc-dev libgmp-dev libboost-all-dev devscripts libdb++-dev libsodium-dev And pres y and let it run. After that another set of libraries:sudo apt-get install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler libcrypto++- dev libminiupnpc-dev qt5-default And then again pres y and let it run. Some wallets need older version of libssl1.0-dev, so for for safe compiling we install that as well:sudo apt-get install libssl1.0-dev Pres y and let it run. Warning don't use sudo-apt get autoremove, since it would wipe this package, since it's old.Next thing we are going to obtain Bitcoin PPA filest, which can be done like this.cd /etc/apt/sources.list.d/ sudo nano bitcoin.list Paste this in there:deb-src https://ift.tt/1iNfiQF artful main And CTRL+X and than y, then do this:sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv C70EF1F0305A1ADB9986DBD8D46F45428842CE5E sudo apt-get update So now we are ready for compiling. So we are going create folders. CD yourself where this folder should be situated, if you for example have plugged in some external drive. Then:mkdir Crypto cd Crypto And then we have to choose wallet which you want to compile. I am choosing Streamies (STRMS) as an example, since it's pretty good coin for staking. So:mkdir Streamies cd Streamies Then go to the github page and click on the green button on the left and click copy to clipboard, which gives you git link.git clone https://ift.tt/3dgSviI Watch the output folder which it creates, it's stated in the first two lines and copy then by highliting the text and CTRL+SHIFT+C copy it to your clipboard.cd Streamies (this is that git created folder) ./autogen.sh ./configure CPPFLAGS="-I/usr/local/BerkeleyDB.4.8/include -O2" LDFLAGS="-L/usr/local/BerkeleyDB.4.8/lib" sudo make (this could take hours) sudo make install And you are done, files is going to be in folder /usr/local/bin (DO NOT delete git created folder, because you are going to need it for faster compiling, when wallet get's and update.)cd /usr/local/bin Now you can list files by:ls And then you can copy/move them where ever you want by using:sudo mv [file] [destination full path] Do this for everz file which is there. Go back to folder where zou move those files.sudo chmod +x streamies-qt (since we want to run wallet) In most cases compiled files are going to in format of "shared library" so we need to create script to run it. Open up a text editor from gui or through nano. And paste this to that file:#!/bin/bash ./streamies-qt And save it as a sh file, for example run.sh. Then we need to make it runnable so:sudo chmod +x run.sh Now to run it, it's just:./run.sh And here we are glorious GUI wallet appears and you are done, you can paste blockchain, wallet.dat from other sources, so this migration is pretty easy and you, if you have it on for exaple flash disk.So this is basic how to compile QT wallets on AARCH64. I am running 7 wallets, 2 of those are Masternodes and RPI 4B 4GB would handle way more, I am at best on half of my RAM.Some wallets need more package, but it's not much of and issue, since compiling stops and you just copy paste nape which is missing put it in the google and add "apt-get" after the name of package and you are going to see, what is the name of the packages so it can be retreived from package assinstant aka apt-get. So basically:sudo apt-get install [package name] Then press y and again wrote:sudo make This process is going to continue where it was left off, so nothing is going to run from beginning.Updating wallets is basically exactly same, just repeat steps from "git clone" and after that proceed as it was written above.So I hope this helps some of you, to use this at home and not on some VPS, if you are anxious as me, to host my wallets on remote server.

Submitted May 30, 2020 at 04:04AM

No comments:

Post a Comment