In order to enable runtimes to perform actions in the consensus layer on their behalf, they can emit messages in each round.
The following sections describe the methods supported by the consensus roothash service.
The staking method call message enables a runtime to call one of the supported staking service methods.
Field name:
staking
Body:
type StakingMessage struct {
cbor.Versioned
Transfer *staking.Transfer `json:"transfer,omitempty"`
Withdraw *staking.Withdraw `json:"withdraw,omitempty"`
}
Fields:
v
must be set to0
.transfer
indicates that thestaking.Transfer
method should be executed.withdraw
indicates that thestaking.Withdraw
method should be executed.
Exactly one of the supported method fields needs to be non-nil, otherwise the message is considered malformed.
The maximum number of runtime messages that can be emitted in a single round is
limited by the executor.max_messages
option in the runtime descriptor. Its
upper bound is the max_messages
consensus parameter of the roothash service.