In this topic we will help you through the node optimization process, so that validators can earn better rewards by having their nodes run at the optimal levels.
1. Step-1: Stop the running docker
a. Enter command:
cd /opt/validator-node-dockerized
b. Enter command:
docker ps
to check the current running docker.
c. Enter the command:
docker stop etherlite-valnode
to stop running the node
d. Run command: cat .env
This will display the contents of file .env
Copy the Validator node address as we have to add
this in node.toml file
e. Next, to create a file node.toml with the command nano node.toml copy-paste the following configuration settings
#### File node.toml
[parity]
chain = "genesis.json"
base_path = "./data"
[network]
port = 30300
discovery = true
interface = "local"
bootnodes = [
"enode://6c4f09592828d1a8014ca566cf42d4125e84bc35c8ee3cd9fd87cd13ac7a701ca2ecc2a9fb3727a3dd3a5ae1a1c0a8459ac1e4504707c837b7d8a3a27bd12d03@54.193.219.155:30300",
"enode://4200e5a56fb81ba1921e930504f950af3235d1b8dbcd1a5e3a2b6d934926c5a986b29e0ad3949c5d0cc37a2a4765a06b73d3b1b3314addf87a09b315c0cacdce@52.47.173.181:30300",
"enode://636195def83d3a5c420eaf5907549391f6702c1fd0c85b66a419b90b6af7908754aceaaa911236b5d0660a184960aab5b7785a6c87455d861c29cc76c0ba9fb6@65.1.219.106:30300",
"enode://f8fdeb5647ff32694029925ca79aeb50a61345f60a49cb264feb3d2f8bad7ea61774e9e52f683e7e4ada43aedbec97318cf4fd7cf349e82963df95ddfa9dfa25@52.197.202.193:30300",
"enode://60bc0c4678fcb6691b28a7a6480dd5b0f33681cd0eca1fd245e3ae4542831e2a9d9e11a43afcfa1821f667d583eab73a3ce66040a7268278ae3e8847c3902df6@3.96.25.239:30300",
"enode://360989533f9b9436275833d1f83b58629482ce6df8645890bb95c64f0badabc7a55989e553b7c18253ee880c1608e72b7327856502b710443352df52cd6efbea@35.72.213.63:30300",
"enode://7f373e2d9921f644cfe716d5b7410485463f17dbe0f6383b1082d1bfacf42f13ebba97d45921a0de58b83ad54c861ecc052e733a1db9449fb758d3d0be78b016@35.73.116.213:30300"
]
[rpc]
port = 8545
apis = ["eth","net"]
cors = ["*"]
[websockets]
port = 8546
[account]
password = ["password"]
unlock = [""]
[mining]
engine_signer = ""
reseal_on_txs = "none"
force_sealing = true
f. Following that, add your validator address (the one we
previously copied when we ran the cat.env command) in
the empty fields in front of unlock and engine_signer
and in front of the password field, change it to the
location of your password file
g. After Adding the your validator address Press CTRL+X
you will be asked if you want to save. Enter Y and Press
Enter
2. Step 2 : Start the validator node in screen
a. Use the rm command to remove the unstable build of openethereum by using the following command:
rm -rf openethereum openethereum.zip
b. Download the stable version of openethereum with the following command
curl -SfL 'https://github.com/openethereum/openethereum/releases/download/v3.2.2-rc.1/openethereum-linux-v3.2.2-rc.1.zip' -o openethereum.zip
c. Unzip the downloaded file, enter
unzip openethereum.zip
After you have unzipped the file, openethereum.exe will be available. Give proper permission to run the file
chmod +x openethereum
d. Download the genesis file of EtherLite by entering the command
curl -SfL 'https://raw.githubusercontent.com/etherlite-org/openethereum/etherlite/crates/ethcore/res/chainspec/etherlite.json' -o genesis.json
e. Start the screen by entering the following command
screen -S node
f. Enter the following configuration settings to start the validator node
./openethereum --config=node.toml --jsonrpc-port=8545 --jsonrpc-cors=all --jsonrpc-interface=all --jsonrpc-hosts=all --jsonrpc-apis=web3,eth,net,parity --ws-interface=all --ws-apis=web3,eth,net,parity,pubsub --ws-origins=all --ws-hosts=all --ws-max-connections=10 --max-peers=100
(Note: Above config settings have to be entered in a single unbroken command. Please refer below image for better understanding.)
g. Your validator node will start once the process is started you can safely minimize the screen by entering CTRL+ a + d
3. Step 3: To do a health check of your once you have started it, you can use the following command
curl --data '{"method":"eth_syncing","params":[],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545