TrieError
Variant 31 v393sp_runtime::proving_trie::TrieError
About This Type
Error from trie (Merkle tree) operations.
Rare error from state storage proof verification failures.
Variants (14)
| Index | Name | Fields | Docs |
|---|---|---|---|
| 0 | InvalidStateRoot | none | |
| 1 | IncompleteDatabase | none | |
| 2 | ValueAtIncompleteKey | none | |
| 3 | DecoderError | none | |
| 4 | InvalidHash | none | |
| 5 | DuplicateKey | none | |
| 6 | ExtraneousNode | none | |
| 7 | ExtraneousValue | none | |
| 8 | ExtraneousHashReference | none | |
| 9 | InvalidChildReference | none | |
| 10 | ValueMismatch | none | |
| 11 | IncompleteProof | none | |
| 12 | RootMismatch | none | |
| 13 | DecodeError | none |
SCALE Encoding
- Rule
- 1-byte variant index followed by variant-specific field data. 14 possible variants.
- Size
- variable (1+ bytes)
Examples
InvalidStateRoot
0x0000 Variant index 0 = InvalidStateRootIncompleteDatabase
0x0101 Variant index 1 = IncompleteDatabaseValueAtIncompleteKey
0x0202 Variant index 2 = ValueAtIncompleteKeyCode 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