Transfer Validator Permissions

Replace the consensus public key

If the server is hacked or the consensus public key is leaked, the validator's consensus public key can be replaced by updating the consensus public key transaction.

#command
fxcored tx staking edit-consensus-pubkey <val> <new-consensus-pubkey> --from 
addr/granter

#example
fxcored tx staking edit-consensus-pubkey fxvaloper123...
'{"@type":"/cosmos.crypto.ed25519.PubKey","key":"...."}' --from=fx456...

The val argument should be the validator’s address, for example: fxvaloper1a73plz6w7fc8ydlwxddanc7a239kk45jnl9xwj. In order to get the argument for new-consensus-pubkey, set up a new node and run the following:

fxcored tendermint show-validator --home /root/.fxcore-node-new
#/root/.fxcore-node-new is the path of the new node

Addr/granter: addr is the address controlled by the validator, such as fx1a73plz6w7fc8ydlwxddanc7a239kk45jmwcesj; granter is the address authorized by the validator, which is the address after transferring permissions using the transaction 👇 below, but It is strongly recommended to update the consensus public key first, and then transfer address permissions, because after transferring permissions, the old validator private key cannot control the validator

Transferring Validator Permissions

Transfer permissions

If the validator's private key is leaked, the current validator's authority can be transferred to another address by transferring permission transactions. At this time, the validator's private key will not be able to send any transactions on the chain, and the authorized address can send any transactions for the validator's address

#------------Transferring Permissions to New Address------------

#command
fxcored tx staking grant-privilege <val> <new-addr> --from addr

#example
fxcored tx staking grant-privilege fxvaloper1vx... fx1g7... --from fx1a7...
  • val: Validator address, for example fxvaloper1a73plz6w7fc8ydlwxddanc7a239kk45jnl9xwj

  • new-addr: new permissions holder, such as fx1a73plz6w7fc8ydlwxddanc7a239kk45jmwcesj ,

  • addr: Old permissions holder, for example fx1a73plz6w7fc8ydlwxddanc7a239kk45jmwcesj

Sending Transactions After Transferring Permissions

Authorization

#------------1. Constructing an Authorized MsgSend Transaction------------
fxcored tx authz grant <new-key> generic --msg-type=/cosmos.bank.v1beta1.MsgSend 
--from <old-key> --chain-id dhobyghaut --generate-only > grant_bank_send.json

#--------------2. Execute Authorize MsgSend Transaction--------------
fxcored tx authz exec grant_bank_send.json --from <new-key> --gas="auto" 
--gas-adjustment=1.5 --gas-prices="5000000000apundiai" --keyring-backend test 
--chain-id dhobyghaut

Transfer

#------------1. Construct the MsgSend transaction------------
fxcored tx bank send <val-addr> <new-addr> 1PUNDIAI --chain-id dhobyghaut 
--generate-only > bank_send.json

#------------2. Execute the MsgSend transaction------------
fxcored tx authz exec bank_send.json --from <new-addr>--gas="auto" 
--gas-adjustment=1.5 --gas-prices="5000000000apundiai" --keyring-backend test 
--chain-id dhobyghaut

Last updated