Skip to content

sgns::storage::trie

Classes

Name
class sgns::storage::trie::Codec
Internal codec for nodes in the Trie. Eth and substrate have different codecs, but rest of the code should be same.
class sgns::storage::trie::EphemeralTrieBatchImpl
class sgns::storage::trie::PersistentTrieBatchImpl
class sgns::storage::trie::TopperTrieBatchImpl
class sgns::storage::trie::TrieStorageBackendBatch
class sgns::storage::trie::TrieStorageBackendImpl
class sgns::storage::trie::TrieStorageImpl
struct sgns::storage::trie::Node
class sgns::storage::trie::BufferStream
class sgns::storage::trie::SuperGeniusCodec
class sgns::storage::trie::TrieSerializer
class sgns::storage::trie::TrieSerializerImpl
struct sgns::storage::trie::KeyNibbles
struct sgns::storage::trie::SuperGeniusNode
struct sgns::storage::trie::BranchNode
struct sgns::storage::trie::LeafNode
struct sgns::storage::trie::DummyNode
class sgns::storage::trie::SuperGeniusTrie
class sgns::storage::trie::SuperGeniusTrieCursor
class sgns::storage::trie::SuperGeniusTrieFactory
class sgns::storage::trie::SuperGeniusTrieFactoryImpl
class sgns::storage::trie::SuperGeniusTrieImpl
class sgns::storage::trie::TrieBatch
class sgns::storage::trie::PersistentTrieBatch
class sgns::storage::trie::EphemeralTrieBatch
class sgns::storage::trie::TopperTrieBatch
class sgns::storage::trie::TrieStorage
class sgns::storage::trie::TrieStorageBackend

Types

Name
enum class TrieError { NO_VALUE = 1}
TrieDbError enum provides error codes for TrieDb methods.

Functions

Name
template <typename It >
outcome::result< base::Buffer >
calculateOrderedTrieHash(const It & begin, const It & end)
uint8_t byteFromNibbles(uint8_t high, uint8_t low)
base::Buffer ushortToBytes(uint16_t b)

Attributes

Name
const base::Buffer EXTRINSIC_INDEX_KEY
const base::Buffer NO_EXTRINSIC_INDEX_VALUE

Types Documentation

enum TrieError

Enumerator Value Description
NO_VALUE 1

TrieDbError enum provides error codes for TrieDb methods.

Functions Documentation

function calculateOrderedTrieHash

template <typename It >
outcome::result< base::Buffer > calculateOrderedTrieHash(
    const It & begin,
    const It & end
)

Template Parameters:

  • It an iterator type of a container of base::Buffers

Return: the Merkle tree root hash of the tree containing provided values

Calculates the hash of a Merkle tree containing the items from the provided range [begin; end) as values and compact-encoded indices of those values(starting from 0) as keys

function byteFromNibbles

inline uint8_t byteFromNibbles(
    uint8_t high,
    uint8_t low
)

function ushortToBytes

inline base::Buffer ushortToBytes(
    uint16_t b
)

Attributes Documentation

variable EXTRINSIC_INDEX_KEY

const base::Buffer EXTRINSIC_INDEX_KEY                                    =
base::Buffer{}.put(":extrinsic_index");

variable NO_EXTRINSIC_INDEX_VALUE

const base::Buffer NO_EXTRINSIC_INDEX_VALUE {
      scale::encode(0xffffffff).value()};

Updated on 2026-03-04 at 13:10:44 -0800