Show / Hide Table of Contents

Namespace Libplanet.Store.Trie

Classes

CacheableKeyValueStore

The proxy class to cache IKeyValueStore operations.

DefaultKeyValueStore

The default built-in IKeyValueStore implementation. This stores data in the file system or in memory.

DefaultStore and DefaultKeyValueStore-backed TrieStateStore can be instantiated from a URI with default+file: scheme using LoadStore(Uri), e.g.:

  • default+file:///var/data/planet/
  • default+file:///c:/Users/john/AppData/Local/planet/

The following query string parameters are supported:

journaltrue (default) or false. Corresponds to DefaultStore(String, Boolean, Int32, Int32, Int32, Boolean, Boolean)'s journal parameter.
index-cacheCorresponds to DefaultStore(String, Boolean, Int32, Int32, Int32, Boolean, Boolean)'s indexCacheSize parameter. 50000 by default.
block-cacheCorresponds to DefaultStore(String, Boolean, Int32, Int32, Int32, Boolean, Boolean)'s blockCacheSize parameter. 512 by default.
tx-cacheCorresponds to DefaultStore(String, Boolean, Int32, Int32, Int32, Boolean, Boolean)'s txCacheSize parameter. 1024 by default.
flushtrue (default) or false. Corresponds to DefaultStore(String, Boolean, Int32, Int32, Int32, Boolean, Boolean)'s flush parameter.
readonlytrue or false (default). Corresponds to DefaultStore(String, Boolean, Int32, Int32, Int32, Boolean, Boolean)'s readOnly parameter.
states-dirCorresponds to DefaultKeyValueStore(String)'s path parameter. It is relative to the URI path, and defaults to states.

InvalidTrieNodeException

MemoryKeyValueStore

Volatile in-memory key-value store.

It is useful for storing temporal small chains, e.g., fixtures for unit tests of game logic.

MemoryStore and MemoryKeyValueStore-backed TrieStateStore can be instantiated from a URI with memory: scheme using LoadStore(Uri), e.g.:

  • memory:

MerkleTrie

An ITrie implementation implemented Merkle Patricia Trie.

TrieExtensions

TrieMetadata

Structs

KeyBytes

Wraps a byte array and provides equality comparison and hash code calculation. Designed to be used as a key in dictionaries.

Nibbles

PathCursor

Interfaces

IKeyValueStore

An interface to access key-value store.

ITrie

An interface for Merkle Tree.

In This Article
Back to top Copyright © 2018–2023 Planetarium