TrieError

Variant 31 v393

sp_runtime::proving_trie::TrieError

About This Type

Error from trie (Merkle tree) operations.

Rare error from state storage proof verification failures.

Variants (14)

IndexNameFieldsDocs
0InvalidStateRootnone
1IncompleteDatabasenone
2ValueAtIncompleteKeynone
3DecoderErrornone
4InvalidHashnone
5DuplicateKeynone
6ExtraneousNodenone
7ExtraneousValuenone
8ExtraneousHashReferencenone
9InvalidChildReferencenone
10ValueMismatchnone
11IncompleteProofnone
12RootMismatchnone
13DecodeErrornone

SCALE Encoding

Rule
1-byte variant index followed by variant-specific field data. 14 possible variants.
Size
variable (1+ bytes)

Examples

InvalidStateRoot
0x00
00 Variant index 0 = InvalidStateRoot
IncompleteDatabase
0x01
01 Variant index 1 = IncompleteDatabase
ValueAtIncompleteKey
0x02
02 Variant index 2 = ValueAtIncompleteKey

Code Examples

import { TypeRegistry } from "@polkadot/types";

const registry = new TypeRegistry();

// Encode TrieError — variant "InvalidStateRoot"
const value = registry.createType("TrieError", "InvalidStateRoot");
console.log("Hex:", value.toHex());

Referenced By (1)

Type Information

Type ID
31
Kind
Variant
Path
sp_runtime::proving_trie::TrieError
Runtime
v393