Kagome
Polkadot Runtime Engine in C++17
kagome::storage::trie Namespace Reference

Classes

struct  BranchContainingHashesNode
 
struct  BranchNode
 
class  BufferStream
 
class  Codec
 Internal codec for nodes in the Trie. Eth and substrate have different codecs, but rest of the code should be same. More...
 
struct  DummyNode
 
class  EphemeralTrieBatch
 
class  EphemeralTrieBatchImpl
 
struct  KeyNibbles
 
struct  LeafContainingHashesNode
 
struct  LeafNode
 
struct  Node
 
class  OpaqueNodeStorage
 
struct  OpaqueTrieNode
 
class  PersistentTrieBatch
 
class  PersistentTrieBatchImpl
 
class  PolkadotCodec
 
class  PolkadotTrie
 
class  PolkadotTrieCursor
 
class  PolkadotTrieCursorImpl
 
class  PolkadotTrieFactory
 
class  PolkadotTrieFactoryImpl
 
class  PolkadotTrieImpl
 
class  TopperTrieBatch
 
class  TopperTrieBatchImpl
 
class  TrieBatch
 
struct  TrieNode
 
class  TrieSerializer
 
class  TrieSerializerImpl
 
class  TrieStorage
 
class  TrieStorageBackend
 
class  TrieStorageBackendBatch
 
class  TrieStorageBackendImpl
 
class  TrieStorageImpl
 

Typedefs

using NibblesView = common::BufferView
 
using RootHash = common::Hash256
 

Enumerations

enum  TrieError { TrieError::NO_VALUE = 1 }
 TrieDbError enum provides error codes for TrieDb methods. More...
 
enum  StateVersion { StateVersion::V0, StateVersion::V1 }
 

Functions

template<typename It >
outcome::result< common::BuffercalculateOrderedTrieHash (const It &begin, const It &end)
 
template<typename ContainerType >
outcome::result< common::BuffercalculateOrderedTrieHash (const ContainerType &container)
 
common::Buffer ushortToBytes (uint16_t b)
 

Detailed Description

Copyright Soramitsu Co., Ltd. All Rights Reserved. SPDX-License-Identifier: Apache-2.0

Typedef Documentation

Definition at line 19 of file trie_node.hpp.

Definition at line 13 of file types.hpp.

Enumeration Type Documentation

Enumerator
V0 
V1 

Definition at line 15 of file types.hpp.

TrieDbError enum provides error codes for TrieDb methods.

Enumerator
NO_VALUE 

Definition at line 15 of file trie_error.hpp.

Function Documentation

template<typename It >
outcome::result<common::Buffer> kagome::storage::trie::calculateOrderedTrieHash ( const It &  begin,
const It &  end 
)

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

Template Parameters
Itan iterator type of a container of common::Buffers
Returns
the Merkle tree root hash of the tree containing provided values

Definition at line 25 of file ordered_trie_hash.hpp.

template<typename ContainerType >
outcome::result<common::Buffer> kagome::storage::trie::calculateOrderedTrieHash ( const ContainerType &  container)
inline

Definition at line 49 of file ordered_trie_hash.hpp.

common::Buffer kagome::storage::trie::ushortToBytes ( uint16_t  b)
inline

Definition at line 33 of file polkadot_codec.cpp.