Skip to main content

Runtime Messages

In order to enable runtimes to perform actions in the consensus layer on their behalf, they can emit messages in each round.

Supported Messages​

The following sections describe the methods supported by the consensus roothash service.

Staking Method Call​

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:

Exactly one of the supported method fields needs to be non-nil, otherwise the message is considered malformed.

Limits​

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.