pub type DigestItem = DigestItem<H256>;
Expand description
Digest item
Aliased Type§
pub enum DigestItem {
ChangesTrieRoot(H256),
PreRuntime([u8; 4], Vec<u8>),
Consensus([u8; 4], Vec<u8>),
Seal([u8; 4], Vec<u8>),
ChangesTrieSignal(ChangesTrieSignal),
Other(Vec<u8>),
}
Variants§
ChangesTrieRoot(H256)
System digest item that contains the root of changes trie at given block. It is created for every block iff runtime supports changes trie creation.
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.
ChangesTrieSignal(ChangesTrieSignal)
Digest item that contains signal from changes tries manager to the native code.
Other(Vec<u8>)
Some other thing. Unsupported and experimental.