How to Start a FidesInnova Blockchain Node

Install geth

sudo apt-get update
cd /root
wget https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-1.13.15-c5ba367e.tar.gz
tar -xvf geth-linux-amd64-1.13.15-c5ba367e.tar.gz
cd geth-linux-amd64-1.13.15-c5ba367e
chmod +x geth
cp geth /usr/local/bin/
geth version
rm -rf geth-linux-amd64-1.13.15-c5ba367e.tar.gz

New account

Creating a new account

cd ~/
mkdir fides_blockchain
geth --datadir fides_blockchain account new

The output should look like this: Public address of the key: 0xfBDfF421004493e13AXXXXXXXXXXXXXXXXXXXXX Path of the secret key file: fides_blockchain/keystore/UTC--2024-0N-NNT16-17-52.880254508Z--fbdff421004fBDfF421004493e13AXXXXXXXXXXXXXXXXXXXXX

Create the genesis file from the Main Node in the root path

cd ~/
sudo nano genesis.json

Copy and paste the genesis info from below

{
  "config": {
    "chainId": 706883,
    "homesteadBlock": 0,
    "eip150Block": 0,
    "eip155Block": 0,
    "eip158Block": 0,
    "byzantiumBlock": 0,
    "constantinopleBlock": 0,
    "petersburgBlock": 0,
    "clique": {
      "period": 4,
      "epoch": 7500
    }
  },
  "difficulty": "1",
  "gasLimit": "8000000",

  "extradata": 0x0000000000000000000000000000000000000000000000000000000000000000df8b5d6b5662c3acf6b32803c9ca77ce813db9cd0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
  "alloc": {
    "df8b5d6b5662c3acf6b32803c9ca77ce813db9cd": {
      "balance": "1000000000000000000000000000"
    }
  }
}

Use Ctrl + o and then press Enter to save and Ctrl + x to exit the file

Start the Blockchain

geth --datadir fides_blockchain init genesis.json

Open a screen to run the node in background:

geth --datadir "fides_blockchain" --port 3000 --ipcpath "fides_blockchain/geth.ipc" --networkid 706883 --http --http.port 8545 --http.addr 127.0.0.1 --http.corsdomain "*" --http.api "admin,debug,web3,eth,txpool,personal,clique,miner,net,network" --ws.api "eth,net,web3,network,debug,txpool" --ws --ws.addr 0.0.0.0 --ws.port 8546 --ws.origins "*"  console 2> "geth.log"

2- Connect Nodes

In the node geth console, enter the enode address of the main node

 admin.addPeer( "enode://ce6b1cf8eff1940f5d4599bd76ec95252110e8dd8d88843c9ba6fc7d9283ba4b2433ebe33b699ecb590fe1326945ce284b925f092b6167822bc0c4bbcca42bfd@65.108.196.41:3000")

Last updated