Function diem_transaction_builder::stdlib::encode_update_diem_consensus_config_script_function
source · pub fn encode_update_diem_consensus_config_script_function(
sliding_nonce: u64,
config: Vec<u8>
) -> TransactionPayload
Expand description
Summary
Updates the Diem consensus config that is stored on-chain and is used by the Consensus. This transaction can only be sent from the Diem Root account.
Technical Description
Updates the DiemConsensusConfig
on-chain config and emits a DiemConfig::NewEpochEvent
to trigger
a reconfiguration of the system.
Parameters
Name | Type | Description |
---|---|---|
account | signer | Signer of the sending account. Must be the Diem Root account. |
sliding_nonce | u64 | The sliding_nonce (see: SlidingNonce ) to be used for this transaction. |
config | vector<u8> | The serialized bytes of consensus config. |
Common Abort Conditions
Error Category | Error Reason | Description |
---|---|---|
Errors::NOT_PUBLISHED | SlidingNonce::ESLIDING_NONCE | A SlidingNonce resource is not published under account . |
Errors::INVALID_ARGUMENT | SlidingNonce::ENONCE_TOO_OLD | The sliding_nonce is too old and it’s impossible to determine if it’s duplicated or not. |
Errors::INVALID_ARGUMENT | SlidingNonce::ENONCE_TOO_NEW | The sliding_nonce is too far in the future. |
Errors::INVALID_ARGUMENT | SlidingNonce::ENONCE_ALREADY_RECORDED | The sliding_nonce has been previously recorded. |
Errors::REQUIRES_ADDRESS | CoreAddresses::EDIEM_ROOT | account is not the Diem Root account. |