Updatemasternode

From DeFiChain-Wiki
Revision as of 18:18, 29 December 2022 by Kassius84 (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Updatemasternode

With V3 of the DeFiChain-Node from December 2022 many new features included.

The updatemasternode command can be used to change an existing Masternode. The Owneraddress (the address with 20K DFI Colateral), Operatoraddress and the Rewardaddress can be changed. You may change one address or multiple addresses at the same time. The time in TRANSFERRING state is only applied once no matter how many addresses are changed. Therefore it helps to reduce non-generating time for a masternode by changing all addresses in one step. Please note that only those addresses are to be specified in the command that need to be changed. Those addresses that should be kept are not to be mentioned.

You need your MasternodeID to use this Command. The MasternodeID is your TransactionID from the creation of your Masternode. You can find the ID in the Desktop Wallet when you click the Tab Masternodes, select your Masternode and check the last line named Hash.

MasternodeID.png

When you have access to the operator wallet you can find the MasternodeID using the command getmininginfo:

Masternode-ID getmininginfo.png

The commands for the desktop wallet:

Change Owneraddress:

updatemasternode "EnteryourMasternodeID" {"ownerAddress":"EnterNewOwneraddress"}

Change the Operatoraddress:

updatemasternode "EnteryourMasternodeID" {"operatorAddress":"EnterNewOperatoraddress"}

Change or set a Rewardaddress:

updatemasternode "EnteryourMasternodeID" {"rewardAddress":"EnterNewRewardaddress"}

Change multiple addresses:

updatemasternode "EnteryourMasternodeID" {"operatorAddress":"EnterNewOperatoraddress","rewardAddress":"EnterNewRewardaddress"}

The commands for defi-cli:

Change Owneraddress:

updatemasternode "EnteryourMasternodeID" '{"ownerAddress":"EnterNewOwneraddress"}'

Change the Operatoraddress:

updatemasternode "EnteryourMasternodeID" '{"operatorAddress":"EnterNewOperatoraddress"}'

Change or set a Rewardaddress:

updatemasternode "EnteryourMasternodeID" '{"rewardAddress":"EnterNewRewardaddress"}'

Change multiple addresses:

updatemasternode "EnteryourMasternodeID" '{"operatorAddress":"EnterNewOperatoraddress","rewardAddress":"EnterNewRewardaddress"}'

Be aware, when you redirect your Rewards to a Exchange like Bittrex or Kucoin or another Smart Contract (e.g. CAKE), make sure beforehand that the service supports this redirection. Masternoderewards are created directly from the blockchain and are initially in "immature" status for 99 blocks and cannot be used. Exchanges often use smart contracts to assign incoming transactions to your Exchange Wallet via a batch command; this is not possible in this case.

Redirecting to your LightWallet can also be problematic, if your rewards go there directly to your main address, you can't make a transaction there for 99 blocks. If you run a Vault, this can be a problem under certain circumstances, if you have to react quickly. Optimally, you set up a new DFI address on the LightWallet that you use only for your masternoderewards.


Masternodestatus: If you change any of the values with the updatemasternode command, your masternode will go through the following states:

Testnet:

updatemasternode Rewardaddress: Switch in State TRANSFERRING, ENABLED after 60 blocks

updatemasternode Operatoraddress: Switch in State TRANSFERRING, ENABLED after 60 blocks

updatemasternode Owneraddress: Switch in State TRANSFERRING, PRE-ENABLED after 60 blocks, ENABLED after 10 blocks = 70 blocks

Mainnet:

updatemasternode Rewardaddress: Switch in State TRANSFERRING, ENABLED after 2016 blocks

updatemasternode Operatoraddress: Switch in State TRANSFERRING, ENABLED after 2016 blocks

updatemasternode Owneraddress: Switch in State TRANSFERRING, PRE-ENABLED after 2016 blocks, ENABLED after 1008 blocks = 3024 blocks (~24h)