As per #2127, this refactors the RequestCheckTx ProtoBuf struct to allow for a flag indicating whether a query is a recheck or not (and allows for possible future, more nuanced states). In order to pass this extended information through to the ABCI app, the proxy.AppConnMempool (and, for consistency, the proxy.AppConnConsensus) interface seems to need to be refactored along with abcicli.Client. And, as per this comment, I've made the following modification to the protobuf definition for the RequestCheckTx structure: enum CheckTxType { New = 0; Recheck = 1; } message RequestCheckTx { bytes tx = 1; CheckTxType type = 2; } * Refactor ABCI CheckTx to notify of recheck As per #2127, this refactors the `RequestCheckTx` ProtoBuf struct to allow for: 1. a flag indicating whether a query is a recheck or not (and allows for possible future, more nuanced states) 2. an `additional_data` bytes array to provide information for those more nuanced states. In order to pass this extended information through to the ABCI app, the `proxy.AppConnMempool` (and, for consistency, the `proxy.AppConnConsensus`) interface seems to need to be refactored. Commits: * Fix linting issue * Add CHANGELOG_PENDING entry * Remove extraneous explicit initialization * Update ABCI spec doc to include new CheckTx params * Rename method param for consistency * Rename CheckTxType enum values and remove additional_data param
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 two additional features:
- persistence of state across app restarts (using Tendermint's ABCI-Handshake mechanism)
- 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:pubkey1!power1,pubkey2!power2,pubkey3!power3"
where pubkeyN
is a base64-encoded 32-byte ed25519 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.