pub fn encode_initialize_diem_consensus_config_script_function(
    sliding_nonce: u64
) -> TransactionPayload
Expand description

Summary

Initializes the Diem consensus config that is stored on-chain. This transaction can only be sent from the Diem Root account.

Technical Description

Initializes the DiemConsensusConfig on-chain config to empty and allows future updates from DiemRoot via update_diem_consensus_config. This doesn’t emit a DiemConfig::NewEpochEvent.

Parameters

NameTypeDescription
accountsignerSigner of the sending account. Must be the Diem Root account.
sliding_nonceu64The sliding_nonce (see: SlidingNonce) to be used for this transaction.

Common Abort Conditions

Error CategoryError ReasonDescription
Errors::NOT_PUBLISHEDSlidingNonce::ESLIDING_NONCEA SlidingNonce resource is not published under account.
Errors::INVALID_ARGUMENTSlidingNonce::ENONCE_TOO_OLDThe sliding_nonce is too old and it’s impossible to determine if it’s duplicated or not.
Errors::INVALID_ARGUMENTSlidingNonce::ENONCE_TOO_NEWThe sliding_nonce is too far in the future.
Errors::INVALID_ARGUMENTSlidingNonce::ENONCE_ALREADY_RECORDEDThe sliding_nonce has been previously recorded.
Errors::REQUIRES_ADDRESSCoreAddresses::EDIEM_ROOTaccount is not the Diem Root account.