package
1.3.1
Repository: https://github.com/dashpay/tenderdash.git
Documentation: pkg.go.dev

# README

KVStore

There are two app's here: the KVStoreApplication and the PersistentKVStoreApplication.

KVStoreApplication

The KVStoreApplication is a simple merkle key-value store. Transactions of the form key=value are stored as key-value pairs in the tree. Transactions without an = sign set the value to the key. The app has no replay protection (other than what the mempool provides).

PersistentKVStoreApplication

The PersistentKVStoreApplication wraps the KVStoreApplication and provides three additional features:

  1. persistence of state across app restarts (using Tendermint's ABCI-Handshake mechanism)
  2. validator set changes

The state is persisted in leveldb along with the last block committed, and the Handshake allows any necessary blocks to be replayed. Validator set changes are effected using the following transaction format:

"val:proTxHash1!pubkey1!power1,proTxHash2!pubkey2!power2,proTxHash3!pubkey3!power3"

where proTxHashN is a base64-encoded 32 byte reference for the validator, pubkeyN is a base64-encoded 48-byte bls12381 key and powerN is a new voting power for the validator with pubkeyN (possibly a new one). To remove a validator from the validator set, set power to 0. There is no sybil protection against new validators joining.

# Functions

No description provided by the author
No description provided by the author
NewKvState creates new, empty, uninitialized kvstore State.
NewMemoryApp creates new Key/value store application that stores data to memory.
No description provided by the author
NewPersistentApp creates a new kvstore application that uses json file as persistent storage to store state.
NewSnapshotStore creates a new snapshot store.
WithAppVersion enables the application to enforce the app version to be equal to provided value.
WithCommitVerification enables commit verification.
WithConfig provides Config to new Application.
WithDuplicateRequestDetection makes it possible to disable duplicate request detection.
WithExecTx provides custom transaction executing function to the Application.
WithLogger sets logger when creating Application.
WithPrepareTxsFunc provides custom transaction modification function to the Application.
WithState defines last committed state height and apphash of the Application.
WithValidatorSetUpdates defines initial validator set when creating Application.
WithVerifyTxFunc provides custom transaction verification function to the Application.

# Constants

No description provided by the author
ProtocolVersion defines initial protocol (app) version.

# Structs

Application is an example implementation of abci.Application.
Config allows for the setting of high level parameters for running the e2e Application KeyType and ValidatorUpdates must be the same for all nodes running the same application.
SnapshotStore stores state sync snapshots.
Helper struct that controls size of added transactions.

# Interfaces

State represents kvstore app state at some height.
StoreFactory is a factory that offers a reader to read data from, or writer to write data to it.

# Type aliases

ExecTxFunc executes the transaction against some state.
OptFunc is a function that can modify application configuration.
PrepareTxsFunc prepares transactions, possibly adding and/or removing some of them.
VerifyTxFunc checks if transaction is correct.