You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
1.2 KiB

7 years ago
  1. # KVStore
  2. There are two app's here: the KVStoreApplication and the PersistentKVStoreApplication.
  3. ## KVStoreApplication
  4. The KVStoreApplication is a simple merkle key-value store.
  5. Transactions of the form `key=value` are stored as key-value pairs in the tree.
  6. Transactions without an `=` sign set the value to the key.
  7. The app has no replay protection (other than what the mempool provides).
  8. ## PersistentKVStoreApplication
  9. The PersistentKVStoreApplication wraps the KVStoreApplication
  10. and provides two additional features:
  11. 1) persistence of state across app restarts (using Tendermint's ABCI-Handshake mechanism)
  12. 2) validator set changes
  13. The state is persisted in leveldb along with the last block committed,
  14. and the Handshake allows any necessary blocks to be replayed.
  15. Validator set changes are effected using the following transaction format:
  16. ```md
  17. "val:pubkey1!power1,pubkey2!power2,pubkey3!power3"
  18. ```
  19. 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).
  20. To remove a validator from the validator set, set power to `0`.
  21. There is no sybil protection against new validators joining.