How to setup a P2P node for Bytecoin

Introduction

This tutorial will presents a step-by-step setup of a Bytecoin node on a server. Setting up a node that will be up 24/7 will support the network by sharing the block-chain data with others in the network. Running a node like this is often referred to as running a full node.

Requirements

In this tutorial it’s assumed you will be running a Lunix server, either local, VPS or dedicated. To build this tutorial Ubuntu Xenial was used, but the calls are so generic that you should be fine with any Lunix flavor. Regardless of the hosting option you choose it’s recommend to find a solution with a connection that is not metered as you’ll like run over whatever limit is set by your provider. (Check this site for updates on traffic stats.) To run the P2P sever (without the RPC sever) the following minimal specs are suggested:

  • 2 cores
  • 2 GB ram
  • 50 GB disk space

Recommend is to get some extra RAM maybe 4GB or up.

Setup Bytecoind

Login to your server and use wget to get the latest version of Bytecoin from the official site. At current you can find the latest here

https://bytecoin.org/static/files/bytecoin-linux.tar.gz

Unpak the tar

tar xvzf bytecoin-linux.tar.gz

Go into the folder bytecoin-linux and start the daemon

./launch bytecoind

Let the daemon start and initialize all the folders. In terminal you will get status of the daemon. Information on the setup of the services and their ip’s and ports will be displayed. After this information is displayed the daemon will notice there is not block-chain. To solve this it will create some folders to store the block-chain in. Next the daemon will try to sync to block-chain with the P2P network.  Once it starts the sync, stop the daemon [ctrl+c]. To reduce installation time and reduce pressure on the p2p we will download the block-chain directly.

By default the black-chain and some support data is kept in the .bytecoin/ folder in the top level folder of your user. To get there:

cd ..

cd .bytecoin/

Delete the files in this folder including the DB folder.

Getting the block-chain

Currently the best source is the Google Drive download shared here (or here). To get the links to download using wget we need a little trick. One your local machine use your browser and go to the drive page.

Start download for:

  • blockindexes.bin
  • blocks.bin

You can stop the download right away as we only need the links. Go to downloads to grab the links. In Firefox this is done by right-click on the download here

You should have funny looking link. For example something like this

https://doc-04-ao-docs.googleusercontent.com/docs/securesc/ha0ro937gcuc7l7deffksulhg5h7mbp1/baor470n1ohb2j0rqcfmnn05g6mfpcs2/1501754400000/07715913799858185220/*/0B4t0S1ES9L-RUkszOWtFeTN3OTQ?e=download

Just an example. This link will not work for you. You must generate a new one.

 

You can get the block-chain using these links

wget <your link 1> -O blocks.bin

wget <your link 2> -O blockindexes.bin

Once the download is complete move the files to your .bytecoin/ folder and restart the daemon.

./launch bytecoind

Bytecoind will process the data and build a database in the .bytecoin/DB/ folder. This can take a couple of hours depending on your CPU power. Once completed the daemon will sync up the reaming days since creation of the TAR with the network and that’s it you have a full synced node!

Alternative approach to get block-chain

Note it’s not essential to get the block-chain as a direct download. You can sync up with the P2P network. If you are doing this consider getting getting it the data directly from a known full node using the following command.

./launch bytecoind –add-priority-node arg

References

https://wiki.bytecoin.org/wiki/Daemon_command_line_arguments_and_commands

Spread the love