referrerpolicy=no-referrer-when-downgrade

Type Alias sp_runtime::testing::DigestItem

source ·
pub type DigestItem = DigestItem;
Expand description

Digest item

Aliased Type§

enum DigestItem {
    PreRuntime([u8; 4], Vec<u8>),
    Consensus([u8; 4], Vec<u8>),
    Seal([u8; 4], Vec<u8>),
    Other(Vec<u8>),
    RuntimeEnvironmentUpdated,
}

Variants§

§

PreRuntime([u8; 4], Vec<u8>)

A pre-runtime digest.

These are messages from the consensus engine to the runtime, although the consensus engine can (and should) read them itself to avoid code and state duplication. It is erroneous for a runtime to produce these, but this is not (yet) checked.

NOTE: the runtime is not allowed to panic or fail in an on_initialize call if an expected PreRuntime digest is not present. It is the responsibility of a external block verifier to check this. Runtime API calls will initialize the block without pre-runtime digests, so initialization cannot fail when they are missing.

§

Consensus([u8; 4], Vec<u8>)

A message from the runtime to the consensus engine. This should never be generated by the native code of any consensus engine, but this is not checked (yet).

§

Seal([u8; 4], Vec<u8>)

Put a Seal on it. This is only used by native code, and is never seen by runtimes.

§

Other(Vec<u8>)

Some other thing. Unsupported and experimental.

§

RuntimeEnvironmentUpdated

An indication for the light clients that the runtime execution environment is updated.

Currently this is triggered when:

  1. Runtime code blob is changed or
  2. heap_pages value is changed.