Cronos Validator Deployment: Difference between revisions
From Chainlink Community Wiki
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
#Deploy Cronos Testnet Full node.# | |||
##Deploy Cronos Testnet Full node.## | |||
There are different binaries required to get the full node synced from genesis. | There are different binaries required to get the full node synced from genesis. |
Revision as of 20:13, 11 July 2022
- Deploy Cronos Testnet Full node.##
There are different binaries required to get the full node synced from genesis.
To make it easier to track, I suggest creating a directory structure to track all of the necessary binaries.
For example:
tree ~/binaries/
binaries/ ├── cronosd-v0.6.0-testnet ├── cronosd-v0.7.0-rc1-testnet ├── cronosd-v0.7.0-rc2-testnet ├── cronosd-v0.7.0-rc3-testnet ├── cronosd-v0.7.0-testnet └── tarballs ├── 0.6.0-testnet │ └── cronos_0.6.0-testnet_Linux_x86_64.tar.gz ├── 0.7.0-rc1-testnet │ ├── app.toml │ └── cronos_0.7.0-rc1-testnet_Linux_x86_64.tar.gz ├── 0.7.0-rc2-testnet │ └── cronos_0.7.0-rc2-testnet_Linux_x86_64.tar.gz └── 0.7.0-rc3-testnet └── cronos_0.7.0-rc3-testnet_Linux_x86_64.tar.gz
Once we’ve downloaded all of the necessary binaries, we can initialize our node. (assuming your deployment is identical)
./binaries/cronosd-v0.6.0-testnet init $NODE_NAME --chain-id cronostestnet_338-3
Then, with the ~/.cronos directory we generated from the initialization function, we will then copy each of the binaries into the working directory (~/.cronos/bin) For example:
tree ~/.cronos/
/home/devtrace/.cronos/ ├── bin │ ├── cronosd-v0.6.0-testnet │ ├── cronosd-v0.7.0-rc1-testnet │ ├── cronosd-v0.7.0-rc2-testnet │ ├── cronosd-v0.7.0-rc3-testnet │ └── cronosd-v0.7.0-testnet ├── config │ ├── app.toml │ ├── client.toml │ ├── config.toml │ ├── genesis.json │ ├── node_key.json │ └── priv_validator_key.json └── data └── priv_validator_state.json
Once we have all of the binary versions copied into ~/.cronos/bin/, we’ll go ahead download and replace the necessary genesis.json.
curl https://raw.githubusercontent.com/crypto-org-chain/cronos-testnets/main/cronostestnet_338-3/genesis.json > ~/.cronos/config/genesis.json
With our genesis file downloaded, we can verify it’s correctness via checksum
if awk '{print $1}') = "7d898ad75b3e2e1fa182d928ca10a284c1dd252e12d17ad6dab76551b29d1a59" ; then echo "OK"; else echo "MISMATCHED"; fi;
If the checksums match, then the command output will be OK
.
If it does not match, then the command output will be MISMATCHED
And then we’ll need to make some adjustments to your app.toml file
sed -i.bak -E 's#^(minimum-gas-pricesspace:+=space:+).*$#\1"5000000000000basetcro"#' ~/.cronos/config/app.toml
As well as our config.toml
sed -i.bak -E 's#^(persistent_peersspace:+=space:+).*$#\1"8fcba3485c67a2a00a383b6f45660a4ac529c6ca@52.77.30.18:26656,e65199bc579ffd89d7c021c5611f9f1c97f7ff13@54.251.209.254:26656"#' ~/.cronos/config/config.toml
sed -i.bak -E 's#^(create_empty_blocks_intervalspace:+=space:+).*$#\1"5s"#' ~/.cronos/config/config.toml
sed -i.bak -E 's#^(timeout_commitspace:+=space:+).*$#\1"5s"#' ~/.cronos/config/config.toml
Lastly, we will create the cronosd service.
sudo nano /etc/systemd/system/cronosd.service
[Unit] Description=cronosd After=network.target auditd.service Wants=network.target [Service] Type=simple User=$YOUR_USERNAME WorkingDirectory=/home/$YOUR_USERNAME/.cronos ExecStart=/home/$YOUR_USERNAME/.cronos/bin/cronosd-v0.6.0-testnet start --home /home/$YOUR_USERNAME/.cronos #ExecStart=/home/$YOUR_USERNAME/.cronos/bin/cronosd-v0.7.0-rc1-testnet start --home /home/$YOUR_USERNAME/.cronos #ExecStart=/home/de$YOUR_USERNAMEvtrace/.cronos/bin/cronosd-v0.7.0-rc2-testnet start --home /home/$YOUR_USERNAME/.cronos #ExecStart=/home/$YOUR_USERNAME/.cronos/bin/cronosd-v0.7.0-rc3-testnet start --home /home/$YOUR_USERNAME/.cronos #ExecStart=/home/$YOUR_USERNAME/.cronos/bin/cronosd-v0.7.0-testnet start --home /home/$YOUR_USERNAME/.cronos Restart=on-failure RestartSec=10 LimitNOFILE=50000 [Install] WantedBy=multi-user.target
With all of the above completed, the final step before the easy stuff is to make some changes to ~/.cronos/config/config.toml.