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

Namespaces

 changes_trie
 
 face
 
 trie
 

Classes

class  InMemoryBatch
 
class  InMemoryStorage
 
class  RocksDB
 
class  RocksDBCursor
 

Typedefs

using Buffer = common::SLBuffer< std::numeric_limits< size_t >::max()>
 
using BufferView = common::BufferView
 
using BufferConstRef = common::BufferConstRef
 
using BufferBatch = face::WriteBatch< BufferView, Buffer >
 
using ReadOnlyBufferMap = face::ReadOnlyMap< BufferView, Buffer >
 
using BufferStorage = face::GenericStorage< Buffer, Buffer, BufferView >
 
using BufferMap = face::GenericMap< BufferView, Buffer >
 
using BufferMapCursor = face::MapCursor< BufferView, BufferConstRef, BufferView >
 
using BufferStorageCursor = face::MapCursor< Buffer, Buffer, BufferView >
 

Enumerations

enum  DatabaseError : int {
  DatabaseError::OK = 0, DatabaseError::NOT_FOUND = 1, DatabaseError::CORRUPTION = 2, DatabaseError::NOT_SUPPORTED = 3,
  DatabaseError::INVALID_ARGUMENT = 4, DatabaseError::IO_ERROR = 5, DatabaseError::DB_PATH_NOT_CREATED = 6, DatabaseError::UNKNOWN = 1000
}
 universal database interface error More...
 

Functions

template<typename Tag >
common::Buffer kBabeConfigRepoStateLookupKey (Tag tag)
 
DatabaseError status_as_error (const rocksdb::Status &s)
 
rocksdb::Slice make_slice (const common::BufferView &buf)
 
gsl::span< const uint8_t > make_span (const rocksdb::Slice &s)
 
common::Buffer make_buffer (const rocksdb::Slice &s)
 

Variables

const common::Buffer kRuntimeCodeKey = ":code"_buf
 
const common::Buffer kExtrinsicIndexKey = ":extrinsic_index"_buf
 
const common::Buffer kBlockTreeLeavesLookupKey
 
const common::Buffer kActivePeersKey = ":kagome:last_active_peers"_buf
 
const common::Buffer kRuntimeHashesLookupKey
 
const common::Buffer kOffchainWorkerStoragePrefix = ":kagome:ocw"_buf
 
const common::Buffer kChildStorageDefaultPrefix
 
const common::Buffer kApplyingBlockInfoLookupKey
 
const common::Buffer kAuthorityManagerStateLookupKey
 
const common::Buffer kBlockOfIncompleteSyncStateLookupKey
 

Detailed Description

Copyright Soramitsu Co., Ltd. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 This file contains convenience typedefs for interfaces from face/, as they are mostly used with Buffer key and value types

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

Typedef Documentation

using kagome::storage::Buffer = typedef common::SLBuffer<std::numeric_limits<size_t>::max()>

Definition at line 21 of file buffer_map_types.hpp.

Definition at line 22 of file buffer_map_types.hpp.

Enumeration Type Documentation

enum kagome::storage::DatabaseError : int
strong

universal database interface error

Enumerator
OK 
NOT_FOUND 
CORRUPTION 
NOT_SUPPORTED 
INVALID_ARGUMENT 
IO_ERROR 
DB_PATH_NOT_CREATED 
UNKNOWN 

Definition at line 16 of file database_error.hpp.

Function Documentation

template<typename Tag >
common::Buffer kagome::storage::kBabeConfigRepoStateLookupKey ( Tag  tag)
inline

Definition at line 43 of file predefined_keys.hpp.

common::Buffer kagome::storage::make_buffer ( const rocksdb::Slice &  s)
inline

Definition at line 53 of file rocksdb_util.hpp.

rocksdb::Slice kagome::storage::make_slice ( const common::BufferView buf)
inline

Definition at line 40 of file rocksdb_util.hpp.

gsl::span<const uint8_t> kagome::storage::make_span ( const rocksdb::Slice &  s)
inline

Definition at line 47 of file rocksdb_util.hpp.

DatabaseError kagome::storage::status_as_error ( const rocksdb::Status &  s)
inline

Definition at line 14 of file rocksdb_util.hpp.

Variable Documentation

const common::Buffer kagome::storage::kActivePeersKey = ":kagome:last_active_peers"_buf
inline

Definition at line 23 of file predefined_keys.hpp.

const common::Buffer kagome::storage::kApplyingBlockInfoLookupKey
inline
Initial value:
=
":kagome:applying_block"_buf

Definition at line 33 of file predefined_keys.hpp.

const common::Buffer kagome::storage::kAuthorityManagerStateLookupKey
inline
Initial value:
=
":kagome:authority_manager_state"_buf

Definition at line 36 of file predefined_keys.hpp.

const common::Buffer kagome::storage::kBlockOfIncompleteSyncStateLookupKey
inline
Initial value:
=
":kagome:block_of_incomplete_sync_state"_buf

Definition at line 39 of file predefined_keys.hpp.

const common::Buffer kagome::storage::kBlockTreeLeavesLookupKey
inline
Initial value:
=
":kagome:block_tree_leaves"_buf

Definition at line 20 of file predefined_keys.hpp.

const common::Buffer kagome::storage::kChildStorageDefaultPrefix
inline
Initial value:
=
":child_storage:default:"_buf

Definition at line 30 of file predefined_keys.hpp.

const common::Buffer kagome::storage::kExtrinsicIndexKey = ":extrinsic_index"_buf
inline

Definition at line 18 of file predefined_keys.hpp.

const common::Buffer kagome::storage::kOffchainWorkerStoragePrefix = ":kagome:ocw"_buf
inline

Definition at line 28 of file predefined_keys.hpp.

const common::Buffer kagome::storage::kRuntimeCodeKey = ":code"_buf
inline

Definition at line 16 of file predefined_keys.hpp.

const common::Buffer kagome::storage::kRuntimeHashesLookupKey
inline
Initial value:
=
":kagome:runtime_hashes"_buf

Definition at line 25 of file predefined_keys.hpp.