Actions

Cronos Validator Deployment

From Chainlink Community Wiki

Revision as of 20:04, 11 July 2022 by Devtrace (talk | contribs) (Created page with "Deploy Cronos Testnet Full node. There are different binaries required to get the full node synced from genesis. 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 I’ve downloaded, extracted, renamed and moved the binaries for the sake of tracking. For example: <code>tree ~/binaries/</code> <pre style="white-space:pre-wrap; width:100%; border:1px solid lightgrey; background:black; color:w...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Deploy Cronos Testnet Full node.

There are different binaries required to get the full node synced from genesis.

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

I’ve downloaded, extracted, renamed and moved the binaries for the sake of tracking.

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 with 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 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


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.