Non Validator Node
Last updated
Last updated
1sudo apt-get install -y libc6-dev libsnappy-dev libicu-dev screen bash vim net-tools ca-certificates openssl libssl-dev librocksdb-dev
Either Install tendermint in the PATH or
Extract the contents to the folder NodeExample/tendermint
To configure tendermint it takes some time, but last go at it
In the config.toml we need to change a few things.
proxy_app β here we just change the port to our desired port
1proxy_app = "tcp://127.0.0.1:26558"
moniker β This is the node name, you can name as you want it.
1moniker = "nodeExample" # Change this to you node name
rpc.laddr β change the port
1[rpc] 2laddr = "tcp://0.0.0.0:26557"
p2p.laddr β Change the port
p2p.seeds β Add the seeds (Validator nodes)
1[p2p] 2seeds = "node_ID@ip_address:node_port"
Instead of changing the config.toml, on running can be passed as an argument.
1--p2p.seeds "node_ID@ip_address:node_port"
Testnet Configuration for tendermint.
For connecting to the testnet you have here the seed, you can add it to your node config.toml file or run it with the --p2p.seeds flag
10c8203a0e63d7c025a4be9e4391b42fb65d344ab@testnet.phantasma.io:26056
To run tendermint after extracting it to the tendermint folder and giving it the permission to execute
1# This line of code is from the NodeExample folder. 2chmod u+x ./tendermint/tendermint
Then also give permission to the runTendermintNode.sh
1chmod u+x runTendermintNode.sh
Thereβs some configuration that you can change from the runTendermintNode.sh
NODENAME
β Change the node name to the desired one, this will be the name of the folder as well
TENDERMINTPATH
β if you have the tendermint globally setuped just change it to tendermint
Now that the permissions are setuped letβs run it!
1./runTendermintNode.sh
On the config_example.json provided on the NodeExample Folder
tendermint.rpc.port β Change the port for the desired one.
1"tendermint.rpc.port": "26557"
tendermint.proxy.port β Change the port
1"tendermint.proxy.port": "26558"
tendermint.key β Change the wif to your node wif (tendermint key, this key can be found on the node/config/priv_validator_key.json and itβs the βpriv_keyβ > βvalueβ)
1"tendermint.key": "ZYsBV9y3a6T1ie2vt8+bVjtv93pUcWqWSMWGORhLc1kKgCIhXLqKxxxbTD1HCQY0LPyoy081q9Q1HJQGDwfTYA==",
api.proxy.url β URL to the seed node setuped previously If you're testing with your own nodes use this URL
1"api.proxy.url": "http://127.0.0.1:5101/rpc"
if you are testing with the public testnet use this instead
1"api.proxy.url": "http://testnet.phantasma.io:5101/rpc"
node.mode β Either normal or proxy
1"node.mode": "normal"
node.host β change the port of the node, this will be the your rpc url
1"node.host": "http://*:5105"
To run the node compile it
1dotnet build --project Phantasma.Node
Then go to Phantasma.Node/bin/Debug/net6.0/
Add the previously configure file with your change and rename it to config.json
Before starting up the Phantasma.Node make sure that Tendermint is running
1./phantasma-node --urls "http://*:5105" 2or 3dotnet phantasma-node.dll --urls "http://*:5105"
Also keep in mind if you have a Storage inside the Phantasma.Node/bin/Debug/net6.0/, just delete it before starting everything
Also keep in mind that you have to change the node/data/priv_validator_state.json to current chain settings.
Thereβs another thing to have in mind the validator nodes also have something in their configuration that limit the number of connections they can have, the default value is 4, but you can change it on the config.toml. Itβs at the end of the file
1max_open_connections = 4 # Change this value to more than 4.
This will create the node folder
1tendermint init --home "/path/to/folder/"
Then you just need to copy the config.toml from the NodeExample and change the value stated below.
Now just run the node
1tendermint node --home "/path/to/folder/"