pub fn encode_register_validator_config_script_function(
    validator_account: AccountAddress,
    consensus_pubkey: Vec<u8, Global>,
    validator_network_addresses: Vec<u8, Global>,
    fullnode_network_addresses: Vec<u8, Global>
) -> TransactionPayload
Expand description

Summary

Updates a validator’s configuration. This does not reconfigure the system and will not update the configuration in the validator set that is seen by other validators in the network. Can only be successfully sent by a Validator Operator account that is already registered with a validator.

Technical Description

This updates the fields with corresponding names held in the ValidatorConfig::ValidatorConfig config resource held under validator_account. It does not emit a DiemConfig::NewEpochEvent so the copy of this config held in the validator set will not be updated, and the changes are only “locally” under the validator_account account address.

Parameters

NameTypeDescription
validator_operator_accountsignerSigner of the sending account. Must be the registered validator operator for the validator at validator_address.
validator_accountaddressThe address of the validator’s ValidatorConfig::ValidatorConfig resource being updated.
consensus_pubkeyvector<u8>New Ed25519 public key to be used in the updated ValidatorConfig::ValidatorConfig.
validator_network_addressesvector<u8>New set of validator_network_addresses to be used in the updated ValidatorConfig::ValidatorConfig.
fullnode_network_addressesvector<u8>New set of fullnode_network_addresses to be used in the updated ValidatorConfig::ValidatorConfig.

Common Abort Conditions

Error CategoryError ReasonDescription
Errors::NOT_PUBLISHEDValidatorConfig::EVALIDATOR_CONFIGvalidator_address does not have a ValidatorConfig::ValidatorConfig resource published under it.
Errors::INVALID_ARGUMENTValidatorConfig::EINVALID_TRANSACTION_SENDERvalidator_operator_account is not the registered operator for the validator at validator_address.
Errors::INVALID_ARGUMENTValidatorConfig::EINVALID_CONSENSUS_KEYconsensus_pubkey is not a valid ed25519 public key.
  • AccountCreationScripts::create_validator_account
  • AccountCreationScripts::create_validator_operator_account
  • ValidatorAdministrationScripts::add_validator_and_reconfigure
  • ValidatorAdministrationScripts::remove_validator_and_reconfigure
  • ValidatorAdministrationScripts::set_validator_operator
  • ValidatorAdministrationScripts::set_validator_operator_with_nonce_admin
  • ValidatorAdministrationScripts::set_validator_config_and_reconfigure