This thread is an update to my first Reddcoin staking tutorial
that was written 7 months ago. The reason for the update
My Reddcoin Core software crashed and became unusable. My Raspberry Pi 3B would lag and freeze, I couldn't stake anymore.
Instead of just redoing everything the same way, I wanted to see if I could improve on 3 points:
- Use an OS that was lighter
- Update the Reddcoin Core software (22.214.171.124 => 126.96.36.199)
- Make improvements to the configuration.
If you would like to tip me
- OS: using Lubuntu instead of Ubuntu MATE. Lubuntu uses less resources (130 MB RAM vs. 190 MB RAM on initial boot).
- Reddcoin Core: v188.8.131.52-a8767ba-beta instead of v184.108.40.206-92768f9-beta.
- Swap: using a swap partiton instead of a swap file. Also adjusting the swap size: from 1 GB to 2 GB, after reading the comments to my previous tutorial.
- All data to USB: Blockchain data and the swap are now stored on the USB drive, instead of the SD card.
- Private keys: added instructions on how to backup the private keys of your Reddcoin addresses!
Writing a tutorial like this takes time and effort; tips are appreciated. My Reddcoin address: RqvdnNX5MTam855Y2Vudv7yVgtXdcYaQAW
- Hardware: Raspberry Pi 3 Model B.
- OS: Lubuntu 16.04.2 (Xenial).
- Storage space: I am using an 8 GB microSD card for the OS, and a 128 GB USB drive for data. Minimums I would recommend: 8GB SD card and 32 GB USB drive.
- Reddcoin Core client version: v220.127.116.11-a8767ba-beta (most recent version at this moment). ↳ Screenshot
- You need software to write the OS to the SD card. I use Etcher. Download Etcher: https://etcher.io/.
- Run Etcher.
- Select image: select the lubuntu-16.04.2-desktop-armhf-raspberry-pi.img.xz file.
- Select drive: select your microSD card.
- Plug the SD card into your Raspberry Pi and power it up.
- Lubuntu should boot up.
- Set up Lubuntu, connect to the internet (wired or wireless). ↳ As username, I chose "rpi3b". You will see this username throughout this whole tutorial.
- Make sure date and time are correct ([Menu] > System Tools > Time and Date). ↳ Click on Unlock to make changes. I personally change Configuration to "Keep synchronized with Internet servers". ↳ Screenshot
- Reboot ([Menu] > Logout > Reboot). I am connected to wifi, but have issues getting wifi to work on initial boot. A reboot solves this issue.
- Make sure system is up-to-date, install never versions.
- Open LXTerminal ([Menu] > System Tools > LXTerminal). ↳ Screenshot
- Enter the following in LXTerminal: sudo apt update && sudo apt upgrade ↳ Screenshot
- You will be asked if you really want to continue. Enter Y (yes).
- Updates are being installed! Wait until it's finished.
- Install programs that will be used in this tutorial.
- GParted: to partition the USB drive.
- Htop: to see the amount of memory (RAM) and swap that is in use.
- Enter the following in LXTerminal to install these 2 programs. sudo apt install gparted && sudo apt install htop ↳ Screenshot
- Create 2 partitions on the USB drive: 1) Swap partition 2) data partition (for the Reddcoin blockchain) The swap partition is necessary: The Reddcoin wallet can be memory intensive. To prevent any crashes or freezes, add 2 GB of 'virtual' memory by creating a swap partition.
- Important: Backup your USB drive if needed. The USB drive will be formatted, so the data on the USB drive will be wiped.
- Please use the USB drive solely for this purpose, do not combine it with other stuff.
- Keep your USB drive plugged in, do not (randomly) plug it out.
- Plug your USB drive in.
- GParted will be used to create the partititons. Start GParted via LXTerminal: sudo gparted ↳ Screenshot
- In GParted, switch from your SD card (default) to your USB drive. ↳ Screenshot ↳ Screenshot
- You will now see the all the partition on USB drive. Delete every partition (right mouse click). If you can't select Delete, do an Unmount first. ↳ Screenshot ↳ Screenshot
- After deleting all partition, you will only see 'unallocated' space on your USB drive. ↳ Screenshot
- Create the first partition: the swap partition. Right click on the blank space, select New and enter the following:
- New size (MiB): 2048
- File System: linux-swap
- Click on Add. ↳ Screenshot
- Create the second partition: the data (blockchain) partition. Richt click, select New and enter:
- File system: ext4
- Label: usb
- Click on Add. ↳ Screenshot
- Apply the changes. Click on the check mark or select Edit > Apply All Operations. ↳ Screenshot ↳ Screenshot
- Important: The name of the swap partition is needed later, so please write it down. Mine is /dev/sda1 (first partition on first drive (drive 'a')). ↳ Screenshot
- Reboot. After the reboot, the data partition you just created should be visible on your desktop. ↳ Screenshot
- The swap partition is created, so now we can enable and use it.
- The swap in use can be monitored with the program Htop. Open Htop ([Menu] > System Tools > Htop) to see the 'Swp' (swap) in use. ↳ Screenshot By default, swap is not used, so 0K. ↳ Screenshot You can leave Htop open.
- To enable the swap partition, open LXTerminal and enter the following commands: (Assuming /dev/sda1 is your swap partition.)
- You've enabled the swap partition. Switch back to Htop and check the 'Swp' (swap) value. It should read '2.0G'. ↳ Screenshot
- To make sure the swap file is persistent (so it survives a reboot), you have to add a line to the /etc/fstab file.
- In LXTerminal, enter the following command to open the file in Leafpad (text editor): sudo leafpad /etc/fstab ↳ Screenshot
- In Leafpad, add this text in a new line: /dev/sda1 swap swap defaults 0 0 ↳ Screenshot (I've added spaces to vertically align the text.)
- Save and close the file.
- Reboot your Pi.
- To see if the swap partition is in use after a reboot, open Htop ([Menu] > System Tools > htop) and check the 'Swp' (swap) value. It should read '2.0G'. ↳ Screenshot
- So, the swap partition is enabled and in use, and the data partition is prepared. We now can install the necessary software for the Reddcoin wallet; enter the following commands into LXTerminal:
- sudo apt-get update && sudo apt-get install git build-essential libqt4-dev libprotobuf-dev protobuf-compiler libtool autotools-dev autoconf libssl-dev libboost-all-dev wget pkg-config ↳ Screenshot
- sudo add-apt-repository ppa:bitcoin/bitcoin ↳ Screenshot
- sudo apt-get update
- sudo apt-get install db4.8 ↳ Screenshot ↳ Screenshot
- sudo apt-get install libminiupnpc-dev ↳ Screenshot
- sudo apt-get install libqrencode-dev ↳ Screenshot
- Reboot your Raspberry Pi.
- After the reboot, open LXTerminal again. Download, unpack, configure, build and install Berkeley DB.
- Set the working directory to your USB drive: cd /media/rpi3b/usb (rpi3b is the username I chose; if you have a different username, change it to yours.) ↳ Screenshot
- sudo wget http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz ↳ Screenshot ↳ Screenshot
- sudo tar xfvz db-4.8.30.NC.tar.gz ↳ Screenshot
- cd db-4.8.30.NC
- cd build_unix
- sudo ../dist/configure --enable-cxx
- sudo make This took about 10 minutes for me.
- sudo make install
- Set BerkeleyDB variables (in LXTerminal):
- export CPATH="/uslocal/BerkeleyDB.4.8/include" ↳ Screenshot
- export LIBRARY_PATH="/uslocal/BerkeleyDB.4.8/lib" ↳ Screenshot
- sudo leafpad /etc/ld.so.conf.d/daemon-libs.conf ↳ Screenshot
- Add this line in Leadpad: /uslocal/BerkeleyDB.4.8/lib/ ↳ Screenshot
- Save and close the file.
- Back in LXTerminal: sudo ldconfig ↳ Screenshot
- Download the source of the Reddcoin wallet and build it.
- Set the working directory to your USB drive: cd /media/rpi3b/usb (rpi3b is the username I chose; if you have a different username, change it to yours.)
- Download Reddcoin Core source files: sudo wget https://github.com/reddcoin-project/reddcoin/archive/arm_support_v2.zip ↳ Screenshot ↳ Screenshot
- Unzip the file: sudo unzip arm_support_v2.zip ↳ Screenshot
- rename the folder from ''unzip arm_support_v2'' to ''reddcoin'' (easier to use when needed) sudo mv reddcoin-arm_support_v2/ reddcoin/ ↳ Screenshot
- cd reddcoin ↳ Screenshot
- sudo ./autogen.sh ↳ Screenshot
- sudo ./configure --disable-tests --enable-sse2=no ↳ Screenshot
- sudo make ↳ Screenshot ↳ Screenshot ↳ Screenshot (This will take some time; with me it took just over 1 hour.)
- sudo make install ↳ Screenshot ↳ Screenshot
- Speed up synchronizing with the Reddcoin blockchain by bootstrapping.
- Set the working directory to your USB drive: cd /media/rpi3b/usb (rpi3b is the username I chose; if you have a different username, change it to yours.)
- Download the bootstrap file (1.45 GB): sudo wget https://github.com/reddcoin-project/reddcoin/releases/download/v18.104.22.168/bootstrap.dat.xz ↳ Screenshot ↳ Screenshot
- Unpack the file (large file, takes around 15 minutes to unpack): sudo xz -d bootstrap.dat.xz ↳ Screenshot
- After a successful unpack, your will find the file bootstrap.dat in your USB root folder. ↳ Screenshot
- On the first run of the Reddcoin Core client, it will ask for a data directory to store the blockchain and wallet data.
- Start the Reddcoin Core client: sudo /media/rpi3b/usb/reddcoin/src/qt/reddcoin-qt ↳ Screenshot
- The welcome screen will appear and ask you about the data directory. I suggest a new folder on your USB drive, I picked blockchain. The directory will be created with all the necessary files. ↳ Screenshot
- Select Use a custom data directory. ↳ Screenshot
- Click on the three dots (...) on the right. ↳ Screenshot
- Click on Create Folder at the upper right corner. Type and enter in the folder name. (In my case: blockchain.) Click on Open. ↳ Screenshot ↳ Screenshot ↳ Screenshot
- After selecting the directory, the Reddcoin Core client will start. Wait till it's fully loaded and close it.
- Move the bootstrap.dat file to your data directory you selected in the previous step. By doing this, Reddcoin Core will use the bootstrap.dat file to import the blockchain, which speeds up syncing. sudo mv bootstrap.dat /media/rpi3b/usb/blockchain/ (Assuming blockchain as data directory.) ↳ Screenshot
- The Reddcoin Core client set up is completed, but you still have to sync fully with the blockchain before you can send, receive and stake.
- Launch the Reddcoin Core client again: sudo /media/rpi3b/usb/reddcoin/src/qt/reddcoin-qt ↳ Screenshot ↳ Screenshot
- Keep the client running until it's fully synchronized. It will use the bootstrap file first, and download the rest of the blockchain to complete the sync. This can take some time (it took 2 days for me). Syncing the blockchain uses a lot of resources, so the software may react slow.
- You can see the progress in the debug window (Help > Debug window). ↳ Screenshot
- When the synchronization is completed, the red (out of sync) will disappear on the Overview screen! ↳ Screenshot
- When synchronization is complete, you can start staking your Reddcoins.
- For staking, your wallet needs to be encrypted: Settings > Encrypt... Do not forget your password! ↳ Screenshot ↳ Screenshot ↳ Screenshot ↳ Screenshot ↳ Screenshot
- Your wallet will be encrypted, and the Reddcoin Core client will be closed. Launch the Reddcore Client again. sudo /media/usb/reddcoin/src/qt/reddcoin-qt
- To start stake, you need to unlock your wallet (by entering your password).
- Settings > Unlock Wallet... ↳ Screenshot
- Make sure "For staking only" is checked before clicking OK. ↳ Screenshot
- You can only stake with Reddcoins that have matured: coins have to be at least 8 hours in your wallet to mature.
- The grey arrow at the bottom should be green when staking. Hover over that icon to see the progress of staking. ↳ Screenshot
This video shows how long it takes to start Reddcoin Core. TL;DR:
- [01:11] Reddcoin Core started (sudo password entered).
- [01:13] Message shown on screen: Loading block index...
- [10:14] Message shown on screen: Verifying blocks...
- [10:18] Message shown on screen: Loading wallet...
- [12:49] Message shown on screen: Done loading
- [13:13] Reddcoin Core ready to use.
Backup your wallet to prevent losing the RDDs in your wallet! There are two methods to backup, do both
. Make new backups if you create a new receiving address!
- Method 1: Backup your wallet.dat. Open Reddcoin Core. Use the menu to backup: File > Backup Wallet... ↳ Screenshot
Boot with only 1 USB drive plugged in:
- Method 2: Backup your private keys. In case you lose your wallet.dat backup, you still can import your private keys later when needed.
- To extract your private keys:
- If you have a passphrase on your wallet, unlock your wallet first. Settings -> Unlock Wallet... (make sure 'For staking only' is not checked) ↳ Screenshot ↳ Screenshot
- Extract your private keys. Debug window -> Console -> dumpprivkey ↳ Screenshot
- You can write down your private key or copy and save it in a document. Make sure you save it somewhere only you can access it.
- To import later: Debug window -> Console -> importprivkey [label] [label] is optional. ↳ Screenshot (without a label) ↳ Screenshot (with a label)
Make sure only the USB drive (with the swap partition and data partition) is plugged in when you boot up your Raspberry Pi. This to make sure the swap partition (/dev/sda1) is recognized correctly. If you boot up with multiple USB drives, Lubuntu might see the USB drive with the swap partition as the second drive (instead of the first drive), and ignore the 2 GB swap partition. If this happens, starting Reddcoin can render the Raspberry Pi unresponsive. Connection issues
If you have issues syncing the blockchain because you have 0 network connections, please follow the instructions in this thread
. Start Reddcoin Core easier
Run a shell script (.sh file), so you can start Reddcoin just by double clicking on an icon on your Desktop.
- Right Click on your Desktop and select Create New -> Empty File. ↳ Screenshot
- Enter a file name, make sure it ends with .sh, and click on OK. I've chosen for Reddcoin.sh. ↳ Screenshot The file will be created on your Desktop. ↳ Screenshot
- Add the command to start Reddcoin to the file.
- Right click on the file, select Leafpad (to open the file in a text editor). ↳ Screenshot
- Add the following to the file and save the file: sudo /media/rpi3b/usb/reddcoin/src/qt/reddcoin-qt ↳ Screenshot
- To be able to execute the shell script (.sh), it has to have 'execute permissions'.
- Right click on the file, and select Properties. ↳ Screenshot
- Click on the Permissions tab.
- For Execute, select Anyone, and click on OK. ↳ Screenshot
- To start Reddcoin Core, double click on the file. A new window will pop-up, asking you what you want. Execute in Terminal is what we want, so you can click on enter. ↳ Screenshot Reddcoin Core will now start. Do not close the Terminal window, you can minimize it if needed.
Adjust minimization options, so you can safely press on the X button (the close/exit button on the upper right corner).
RealVNC VNC Viewer (client) and VNC Connect (server):
- Activate 'Minimize on close'. Settings -> Options... -> Window (tab) -> Minimize on close. ↳ Screenshot Reddcoin will still run when you click on the X button. To close/exit Reddcoin, right click on the Reddcoin icon in the system tray (bottom right corner). ↳ Screenshot
To remote connect to the Raspberry Pi, I use VNC Viewer ad VNC Connect from RealVNC.
Chromium as browser:
- On your Raspberry Pi:
- Download VNC Connect from the RealVNC website: https://www.realvnc.com/en/connect/download/vnc/raspberrypi/.
- After your download is finished, open the file and click Install Package. ↳ Screenshot
- To run the VNC Connect once:
- Open [Menu] > Run, and enter: vncserver-x11 ↳ Screenshot
- To auto run on startup:
- Open Default applications for LXSession ([Menu] > Preferences > Default applications for LXSession). ↳ Screenshot
- In LXSessions configuration, select Autostart in the menu left.
- Under Manual autostarted applications, enter vncserver-x11 and click on + Add. ↳ Screenshot ↳ Screenshot
- Reboot your Raspberry Pi and check if VNC Connect is started automatically after the reboot.
- When VNC Connect is running, you'll see a VNC icon on the right bottom corner. Double click the icon to open VNC Connect and to see the IP address you need to enter to connect to your Raspberry Pi. ↳ Screenshot
The updates break Firefox, the browser crashes when you try to run it. Install another browser, Chromium, to solve this issue.
Updates / Upgrades
- In LXTerminal, enter: sudo apt install chromium-browser ↳ Screenshot
- You can run Chromium via [Menu] > Internet -> Chromium Web Browser ↳ Screenshot
If Software Updater shows up and tells you that there is updated software available, do not install the updates using Software Updater. Use LXTerminal
to update Lubuntu.
- Open LXTerminal and enter this command to update: sudo apt update && sudo apt upgrade ↳ Screenshot
Credits in previous tutorial:
- cryptoBUZE on reddit.com; for getting the official arm_support_v2.zip to work.
- worstkaas on reddit.com; for his suggestion of using 2 GB instead of 1 GB for the swap space.
- My main source: damsal01 on reddcointalk.org. His RDD address for donation: Rqd8xDv6oV9BYFaVrLdkWcR5JU6sPPZTKs.
- hieplenet on reddit.com. His RDD address for donation: RaF3TeWqgTzAdnaZQffnsxS74dag13zsAY.
- joroob on Github.com. He made some adjustments to the reddcoin wallet source code so it will compile on ARM cpus. His RDD address for donation: Rb8754QZvpbw6DjrMV1qX9SnHzYnSyXRMC.
Create an admin password and unlock your persistence storage, then start tails. submitted by
Once tails is open, configure your persistence staorage and make sure personal data and addition software and bitcoin client is turned on. If it wasnt, configure and restart tails with admin password and persistence storage unlocked.
Now open the tor browser and proceed to electrum.org. Under the download selection, download the linux appimage and save it to the tor browser folder right above persistence on the lower left side of screen.
Once downloaded and saved to tor browser folder, drag and copy the image to the persistence folder.
Once in the persistence folder, right click on the appimage and go to properties. Then click on permissions tab and check Allow executing file as program and exit the properties box.
Now double click on the image in persistence and everything should be working.
Have used this on TAILS 3.13 ENJOY
I could use some help configuring RaspiBlitz. I have a bitcoin node running on my windows machine with the blockchain fully synced. I would like to use blockchain on my spare hard drive for my RaspiBlitz node, but my linux experience is lacking. submitted by
Any advice on how to mount the spare hard drive in RaspiBlitz and transfer the blockchain from windows (I keep getting permission errors)? Once I get past that, any configuration tips on how to point bitcoind to the transferred folders/file?
I recently acquired very blatant Malware downloading something. I've ran Malwarebytes, rkill, Adwcleaner, and Hitmanpro and they cleaned everything up and now Malwarebytes comes up with nothing. I attempted to use Roguekiller but the exe refuses to run. So I'm not sure I'm good on this front. (I haven't attempted combofix.)
More importantly, I believe I have a bitcoin miner of sorts that wasn't dealt with by them. Whenever I am connected to the internet my CPU and Memory usage skyrockets. It's doing so via sprlzhc.exe
. Which is doing so via tiauhrz.exe
, via wdemtpisvc.exe
. Google searching all of them comes up with nothing so I'm assuming it is custom malware. Totalvirus via Process Explorer also doesn't work because of the path.
Pictures here (Offline - Online): https://imgur.com/a/ZMsmx
Note the two CLIENTS in my applications. They are only there online. The sprlzhc.exe will open multiple and start a new one and close an old one frequently which I think is proof of mining. (I assume it works similar to folding @ home.) Also the Ctfmon.exe wasn't there earlier. Only just showed up now when I took the picture.
Tiauhrz is located at useAppdata/Local/tiauhrz and I'm unable to delete it or even enter it. I need permission for it. A thread I found suggested to boot with a linux usb drive to bypass the NFTS permission, which I'm about to attempt.
The wdemtpisvc.exe however is located in /System32 so I'm hesitant to delete it. It's properties says it was created during the infection, though. Hovering over says "Company: Toshiba" so I'm even more suspicious considering I built the PC.
I tried safe mode and System restore (Wouldn't open) so now I'm going to attempt the linux method and delete the tiauhrz folder, but I want to know if deleting wdemtpisvc is safe or not. Will this method work? Is there anything else I should attempt as well? Should I just wipe the drive?
Sidenotes: It greyed out some of my shortcuts. Also, Whenever I search something with chrome it does a google search, then redirects to search60-com with the search. I have yet to see how it screwed up Firefox. Any ideas on these?
In 2009, a 9 pages white paper
by satoshi Nakamoto described a protocol that made central banking obselete. It's a new paradigm where monney is no longer controlled by a few, but by the whole network.
The shift is already happening, as we speak, even if it's hard to see, especially if you lack the fundamental knowledege of cryptoghraphy, game theory and economics. It's just a matter of time before you realize that Bitcoin is hard money, and for the first time we have a framework to apply austrian economics, without permission. Time to reset the keynesian monopoly game.
I don't think people are inherently bad, it's just that in the actual system (which I call the legacy system) people are incentivised to make decisions that are good from their individual perspective, but unfortunately, the sum of those individual decisions are bad from the collective group perspective. That's just plain simple game theory. What makes Bitcoin so special is it's perfectly aligned set of incentives that makes individuals and collectives outcomes better. It switches the economic model from keynesian to austrian, inflation to deflation, spending to saving, modern slavery (throught debt) to financial sovereingty, de-evolution to evolution. We are currently shifting from fiat to Bitcoin.
What you think capitalism is has nothing to do with what Capitalism really is in a free market. Capitalism is beautiful, it's simply the act of evolution, saving and optimising for consumming only what's needed (don't forget with live in a world with limited ressources, yes we all forgot). Stop spending and start capitalising, that's what we should be doing. But it's near impossible in a world run by socialists imposing debt using violence. What do you think back the US dollar ? gold ? no no, only tanks, aircraft carriers, soldiers and corrupt politicians.
Our only way out of this madness with the minimum violence is Bitcoin.
To be clear, if you dont run a fullnode, then you don't validate the transactions yourself (which is one purpose of running a fullnode). If you don't do the job yourself, then you have no other choice then to trust someone else for it. That's not necesserely a bad thing, as long as you are aware of it. You have no say in what defines Bitcoin, you enforce no rules. You serve no purpose in the Bitcoin realm. Why not !
Now if you seek financial sovereignty and want to take part in the new money paradigm, you will need to operate a fullnode and get your hands a little dirty. This guide hopefuly will take you there while walking you through the steps of setting up your autonomous Bitcoin Core full node.
Why Bitcoin Core ? simply because the Bitcoin core client implement and enforce the set of rules that I myself define as being Bitcoin.
- Linux (recent ubuntu or debian)
- 300Go minimum
- willing to take responsibility for your kids future
Choose & download the latest binaries for your platform directly from github: https://bitcoincore.org/bin/bitcoin-core-0.16.2
at the time of writing, the latest bitcoin core version is 0.16.2
wget https://bitcoincore.org/bin/bitcoin-core-0.16.2/bitcoin-0.16.2-x86_64-linux-gnu.tar.gz tar -zxvf bitcoin-0.16.2-x86_64-linux-gnu.tar.gz sudo mv bitcoin-0.16.2/bin/* /uslocal/bin/ rm -rf bitcoin-0.16.2-x86_64-linux-gnu.tar.gz bitcoin-0.16.2 # clean
Make sure the needed ports (8333, 8332) are open on your server. If you don't know, you can & should use a firewall on your server. I use ufw, which stands for uncomplicated firewall.
sudo apt install ufw # install ufw
configure default rules & enable firewall
sudo ufw default deny incoming sudo ufw default allow outgoing sudo ufw allow ssh # if you operate your server via ssh dont forget to allow ssh before enabling sudo ufw enable
Once your firewall is ready, open the bitcoin ports :
sudo ufw allow 8333 # mainnet sudo ufw allow 8332 # mainnet rpc/http sudo ufw allow 7000 # netcat transfert (for trusted sync)
check your firewall rules with sudo ufw status numbered
Start bitcoind so that it create the initial ~/.bitcoin folder structure.
bitcoind& # launch daemon (the & run the copmmand in the background) bitcoin-cli stop # stop the daemon once folder structure is created
In my case, for a personnal fullnode, I want to run a full txindexed chain. We only live once and i want all options to be possible/available :) If you plan to interact with the lightning network in the future and want to stay 100% trustless, I encourage you txindexing the chain (because you'll need an indexed chain). it's not hard to txindex the chain later on, but the less you touch the data, the better. so always better to start with txindex=1 if you want to go for the long run. It only adds 26Go on top of the 200Go non indexed chain. So it's worth it !
Just to get an idea of the size of the bitcoin core chain (August 23, 2018) :
|network ||folder ||txindexed ||height ||size |
|mainnet ||blocks + chainstate ||yes ||538.094 ||209Go + 2.7Go = 221.7 |
|mainnet ||blocks + chainstate ||no ||538.094 ||193Go + 2.7Go = 195.7Go |
|testnet ||blocks + chainstate ||yes ||- ||- |
|testnet ||blocks + chainstate ||no ||1.407.580 ||20Go + 982Mo = 21Go |
Create a bitcoin.conf config file in the ~/.bitcoin folder. This is my default settings, feel free to adjust to your need. [ see full config Running Bitcoin - Bitcoin Wiki
# see full config here https://en.bitcoin.it/wiki/Running_Bitcoin # Global daemon=1 txindex=1 rpcallowip=0.0.0.0/0 # bind network interface to local only for now server=1 rest=1 # RPC rpcport=8332 rpcuser=admin rpcpassword=password # define a password rpcworkqueue=100 # zmq zmqpubrawblock=tcp://*:8331 zmqpubrawtx=tcp://*:8331 #zmqpubhashblock=tcp://*:8331 #zmqpubhashtx=tcp://*:8331 # numbers of peers. default to 125 maxconnections=10 # utxo cache. default to 300M dbcache=100 # Spam protection limitfreerelay=10 minrelaytxfee=0.0001
Sync the blockchain
There are 2 ways you can donwload/sync the bitcoin blochain :
Network sync (default)
If this is the first time you are setting up a bitcoin full node, it's the only way to trust the data. It will take time, depending on your hardware and network speed, it could vary from hours to days. You have nothing to do but leave the bitcoind daemon running. check status with bitcoin-cli getblockchaininfo, kill daemon with bitcoin-cli stop.
Remember that this is the only procedure you should use in order to sync the blockchain for the first time, as you don't want to trust anyone with that data except the network itself.
Skip this chapter if this is the first you're setting up a full node.
Once you operate a fully "network trusted" node, if you'd like to operate other nodes, syncing them from your trusted node(s) will go much faster, since you simply have to copy the trusted data from server to server directly, instead of going throught the bitcoin core network sync.
You will need to transfer the chainstate & blocks directory from the ~/.bitcoin folder of one of your trusted node to the new one. The way you achieve that transfer is up to you.
At the time of writing (August 23, 2018), the txindexed blockchain (chainstate + blocks up to height 538.094) is around 220Go. Moving that quantity of data over the network is not a trivial task, but if the transfer happens between 2 reliable servers, then netcat will be great for the job. (netcat sends raw tcp packets, there is no authentification or resume feature). Note: with netcat, if one of the servers connection is not stable, and you lose connection, you will have to start again. that's a bummer. in that case you are better of with tools like
rcp that let you resume a transfer.
In order to make the transfer a simple task, make sure you do the following on both of the receiver and the sender server :
- make sure port 7000 is open (or choose whatever port you want, make sure to reflect in .bashrc wrapper fucntions)
- Install netcat & pv (pv is a utility that will show transfer progress)
- Add 2 wrapper function in your .bashrc :
- Reload your bash source ~/.bashrc
Once both your servers (receiver & sender) are netcat ready, proceed as follow :
- On the receiver side (the node we are setting up)
- Then on the sender side (trusted server)
- Go grab a coffee, a spliff or whatever rewards you :)
- Repeat ncpull/ncpush for the chainstate folder also.
This is the transfer times for my last data sync between 2 servers hosted at time4vps.eu (not too bad) | folder | size | transfer time | - | - | - | blocks | 209Go | 5h20 | chainstate | 2.7Go | 4min
bitcoind as a service
For ease of use and 100% uptime, simply add bitcoind to your system service manager (in my case systemd) create the file /etc/systemd/system/bitcoind.service and add the following to it :
[Unit] Description=Bitcoin daemon After=network.target [Service] User=larafale RuntimeDirectory=bitcoind Type=forking ExecStart=/uslocal/bin/bitcoind -conf=/home/larafale/.bitcoin/bitcoin.conf ExecStop=/uslocal/bin/bitcoin-cli stop KillMode=process Restart=always RestartSec=120 TimeoutSec=240 # Hardening measures #################### # Provide a private /tmp and /vatmp. PrivateTmp=true # Mount /usr, /boot/ and /etc read-only for the process. ProtectSystem=full # Disallow the process and all of its children to gain # new privileges through execve(). NoNewPrivileges=true # Use a new /dev namespace only populated with API pseudo devices # such as /dev/null, /dev/zero and /dev/random. PrivateDevices=true # Deny the creation of writable and executable memory mappings. MemoryDenyWriteExecute=true [Install] WantedBy=multi-user.target
Don't forget to correct the user name & the bitcoin.conf path. Once the systemd bitcoind config file is created, reload system services and start the bitcoind service:
sudo systemctl daemon-reload # reload new services sudo systemctl enable bitcoind # enable bitcoind sudo systemctl start bitcoind # start bitcoind sudo systemctl status bitcoind # check bitcoind status
If everything worked, status should output the following:
● bitcoind.service - Bitcoin daemon Loaded: loaded (/etc/systemd/system/bitcoind.service; enabled; vendor preset: enabled) Active: active (running) since jeu. 2018-08-23 21:17:41 CEST; 5s ago Process: 5218 ExecStart=/uslocal/bin/bitcoind -conf=/home/larafale/.bitcoin/bitcoin.conf (code=exited, status=0/SUCCESS) Main PID: 5219 (bitcoind) CGroup: /system.slice/bitcoind.service └─5219 /uslocal/bin/bitcoind -conf=/home/larafale/.bitcoin/bitcoin.conf
The bitcoind service is active and will automatically restart on statup/crash. Wait a couple minutes until the bitcoin-cli getblockchaininfo command returns the chain status. You can also query the rest interface by opening http://nodeIP:8332/rest/chaininfo.json in your browser.
You now have a full Bitcoin core node running on it's own. What's next ? Well I never blogged before, this is the first time I am outsourcing some of my work. I'm a passionnate enginner working on all kind of technologies. I've been dedicating half of my time to Bitcoin for the last 2 years already, so if this guide was usefull and want to go deeper , just let me know, depending on the feedback I get, i'll consider outsourcing more interesting work. For example next post could be about setting up an Electrum Server so you can safely use SPV wallets trusting your own fullnode.
Also I'm currently working on a trustless bitcoin payment processor called 8333
, make sure you follow @_8333_
on twitter. I think I will release the project end of 2018. Ping me if interested.
The best way you can show support is via Bitcoin : 16FKGPiivpo3Z7FFPLdkoVRcV2ASBc7Ktu
i know that command ls .. used for listing what is in that folder but -l give me the permissions rigth ? – Sam Jan 11 '16 at 23:08 sorry , you edited your answer with statement i want to ask about there is already a directory in /var that all users have access to: tmp which is symlinked to /tmp this means that folders that i will created in /var will be deleted liken in /tmp – Sam Jan 11 ... Unix / Linux - File Permission / Access Modes. Advertisements. Previous Page. Next Page . In this chapter, we will discuss in detail about file permission and access modes in Unix. File ownership is an important component of Unix that provides a secure method for storing files. Every file in Unix has the following attributes − Owner permissions − The owner's permissions determine what ... Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up. Sign up to join this community. Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Home ; Questions ; Tags ; Users ; Unanswered ; Jobs; File Permissions mode ending in @ or + Ask Question ... There are many different Bitcoin wallets for Linux, but one of the best wallets available to use is Bitcoin Core. One of the main reasons to go with it is that it’s from Bitcoin officially, so you can trust it. Additionally, it has a lot of cool features that are easy to set up and use. In this article, we’ll go over the many different ways to install and enable Bitcoin Core Wallet. We ... set the permission mode to "sticky" for all future files; Is this correct? Update 1: I just realized that files and directories might need different permissions - I was talking about files above so i'm not sure what the directory permissions would need to be. Update 2: The folder structure of /var/www changes drastically as one of the four entities above are always adding (and sometimes ...
Please join the discussion at EzeeTalk. https://www.ezeelinux.com/talk/ It's free, secure and fun! We take a deep dive into Linux file types and permissions.... Permission command on Linux file and directory Unix & Linux: Give user permission to folder in home directory Helpful? Please support me on Patreon: https://www.patreon.com/roelvandepaar With thanks & pra... Unix & Linux: Permissions folder/parent folder Helpful? Please support me on Patreon: https://www.patreon.com/roelvandepaar With thanks & praise to God, and ... Unix & Linux: Folder permission Helpful? Please support me on Patreon: https://www.patreon.com/roelvandepaar With thanks & praise to God, and with thanks to ...