Download & build & run
- ubuntu 18.04 LTS 64bit;
- 20-100 GB SSD;
- 30 GB of RAM for full transaction history or 10 GB for partial;
- swap 20GB;
- ubuntu 18.04:
user$ scp download-user@downloads.blockchain.mn:/home/download-user/programs_ubuntu_18.04.tar programs_ubuntu_18.04.tar
pass: y396neVEYBGzpdKR
user$ tar -xvf programs_ubuntu_18.04.tar
- ubuntu 16.04:
user$ scp download-user@downloads.blockchain.mn:/home/download-user/programs_ubuntu_16.04.tar programs_ubuntu_16.04.tar
pass: y396neVEYBGzpdKR
user$ tar -xvf programs_ubuntu_16.04.tar
After unpacking, in the inner directory you should see the next files:
- witness_node;
- delayed_node;
- cli_wallet;
- genesis.json;
scp download-user@downloads.blockchain.mn:/home/download-user/data.tar data.tar
pass: y396neVEYBGzpdKR
user$ tar -xvf data.tar
Create directory named 'edc-blockchain' or something like that:
user@user:~$ mkdir edc-blockchain && cd edc-blockchain
Copy binary 'witness_node', 'genesis.json' and 'data' directory into 'edc-blockchain'.
For running witness_node you must specify mandatory parameters for it:
--data_dir
--rpc-endpoint
--genesis-json
Also, you must set list of seed-nodes ('--seed-node'). For getting of actual appropriate seed-nodes ask EDC-blockchain team about it for your region.
You can also use parameter '--track-account'. It allows you to store transaction history only for your account except others (database will take much less memory). ID of your account you can see in the user's wallet (https://wallet.blockchain.mn).
Example of witness_node starting:
user@user:~/edc-blockchain$ ./witness_node --data-dir=./data --rpc-endpoint=127.0.0.1:5909 --genesis-json=./genesis.json --seed-node=seed-node1:111 --seed-node=seed-node2:111 --track-account="\"1.2.111\""
Important info
If you need to stop witness_node do that via 'ctrl+c' combination (or sending SIGINT to the process) - only ONCE(!) and wait until it is finished. Otherwise, on the next starting process you will wait for several hours (database reindexing). After first witness_node's starting you can see that its 'data' directory contains file 'config.ini' in which you can describe some options like 'seed-node' or 'rpc-endpoint' instead of command line.
Also, it is very comfortable to use 'screen' or 'tmux' utility for starting witness_node and/or cli_wallet in separate system windows.
Install 'screen' utility:
user@user:~$ apt-get update
user@user:~$ apt install screen
Create new screen with name 'myscreen' and attach (enter into) it:
user@user:~$ screen -S myscreen
Exit from the screen (if you are in it now):
user@user:~$ Ctrl+a, d
List of existing screen:
user@user:~$ screen -ls
(you can see ID of each screen there too)
Attach screen (enter into screen 'myscreen'):
user@user:~$ screen -r myscreen
or (by its ID):
user@user:~$ screen -r 123456
Detach screen:
user@user:~$ screen -d myscreen
or (by its ID):
user@user:~$ screen -d 123456
Delete screen (if you are in it now):
user@user:~$ ctrl+a, k
More commands: https://www.computerhope.com/unix/screen.htm
Then, in a separate terminal window, start the command-line wallet cli_wallet
:
user@user:~/edc-blockchain$ ./cli_wallet --server-rpc-endpoint=ws://127.0.0.1:5909 --rpc-endpoint=127.0.0.1:8085 --chain-id=979b29912e5546dbf47604692aafc94519f486c56221a5705f0c7f5f294df126 --wallet-file=./wallet.json --no-backups
If you need to build the project yourself then use information below.
First of all you need to install gcc-7/g++-7 compilers and dependencies:
user@user:~$ sudo apt-get install gcc-7 g++-7 make cmake zlib1g-dev libbz2-dev libdb++-dev libdb-dev libssl-dev openssl libreadline-dev autoconf libtool libncurses5-dev automake python-dev
Then build these libraries (using compilers above):
- boost 1.63.0:
user@user:~$ wget 'https://sourceforge.net/projects/boost/files/boost/1.63.0/boost_1_63_0.tar.gz'
user@user:~$ tar -xvf boost_1_63_0.tar.gz
user@user:~$ cd boost_1_63_0
user@user:~$ ./bootstrap.sh
user@user:~$ ./b2 variant=release -j6
- openssl 1.1.1h:
user@user:~$ wget 'https://www.openssl.org/source/openssl-1.1.1h.tar.gz'
user@user:~$ tar -xvf openssl-1.1.1h.tar.gz
user@user:~$ cd openssl-1.1.1h
user@user:~$ ./config
user@user:~$ make -j6
If your dependencies are already built then (with replacing the paths with yours, of course):
user@user:~$ git clone git@github.com:EDCBlockchain/blockchain.git
user@user:~$ cd blockchain
user@user:~$ mkdir build && cd build
user@user:~$ cmake .. -DBOOST_ROOT="/home/user/boost_1_63_0" -DOPENSSL_ROOT_DIR="/home/user/openssl-1.1.1h" -DCMAKE_BUILD_TYPE=RelWithDebInfo
user@user:~$ make -j6