Dedicated Address

Deploy Sync Node With Dedicated P2P Address

To enable this, initially we need to create our own P2P Zetrix address. We can use our Zetrix wallet to generate the Zetrix address. Alternatively, we can use the "ztx" binary to generate the address by running the following command.

cd /usr/local/ztxchain/bin && ./ztx --create-account
{
   "address" : "ZTX3QCcugyyMMpn9iXmkBbkLyip5HSaiqrjsS",
   "private_key" : "privBwvertKepm1su9fUVUurSDCUvNcKtm5Csah8iYQfrXV1mdJVvMMB",
   "private_key_aes" : "9679f6976f7dcb6360e679a8e34fed89ba293190920e3d37f6acb304a470a23d4ae4a5a81d68c0c41f9e85056071d30a26a0511b5c825aa8c14caea301c2350b",
   "private_key_raw" : "9cdec3bd43e7195e2ce487e120ed1967abc2958a2f6e749bc770002891f2eca7",
   "public_key" : "b0016dfbca59a3ca487f084c957de666439c4a030ddb991e3f54bff4b66ff735a7b1c096ce68",
   "public_key_raw" : "6dfbca59a3ca487f084c957de666439c4a030ddb991e3f54bff4b66ff735a7b1",
   "sign_type" : "ed25519"
}

Now we are able to replace our P2P address with the newly generated address. To replace, navigate to the config file (ztx.json), open it using vim or nano editor.

vi /usr/local/ztxchain/config/ztx.json

Change the following P2P section. Copy the "address" to "p2p.address" and "private_key_aes" to "p2p.node_private_key" attribute in the json file.

"p2p": {
    "network_id": 5687162,
    "address": "ZTX3QCcugyyMMpn9iXmkBbkLyip5HSaiqrjsS",
    "node_private_key": "9679f6976f7dcb6360e679a8e34fed89ba293190920e3d37f6acb304a470a23d4ae4a5a81d68c0c41f9e85056071d30a26a0511b5c825aa8c14caea301c2350b",
    "consensus_network": {
        "heartbeat_interval": 60,
        "listen_port": 18001,
        "target_peer_connection": 50,
        "max_connection": 20000,
        "connect_timeout": 5,
                    "known_peers":[
                            "ws-node.zetrix.com:80"
                    ]
    }
},

After replacing the address, you may restart the node by running the following command.

cd /usr/local/ztxchain/scripts && ./ztx restart

Check the node status again to ensure the node is running.

./ztx status

Deploy Validator Node With Dedicated Validator Address

In order to set up a validator node, we need to manually replace the validator address and private key before registering our node and stake at https://validator.zetrix.com/.

To set the validator address and private key, follow the same method as above to generate a new address. Copy the "address" to "ledger.validation_address" and "private_key_aes" to "ledger.validation_private_key" attribute in the configuration json file (ztx.json).

"ledger": {
    "validation_address": "ZTX3RvGfvmNv9k5UQdZo4PfRrjSMh1wckW2nq",
    "validation_private_key": "cf17b54fda991ef1968620111049fa959752ab721667a6f455ed385dc964210ec9064d69e6aa2c79d982dc6bbaf22e3ca2efa8704068abe10f0887a99a2c8792",
    "max_trans_per_ledger": 1000,
    "hash_type": 0,
    "hardfork_points": [],
    "tx_pool":{
        "queue_limit":10240,
        "queue_per_account_txs_limit":64
    }
},

Then, you may rerun the node using the restart command as shown above.

Last updated