OSDN Git Service

new repo
[bytom/vapor.git] / vendor / github.com / tendermint / abci / example / dummy / README.md
1 # Dummy
2
3 There are two app's here: the DummyApplication and the PersistentDummyApplication.
4
5 ## DummyApplication
6
7 The DummyApplication is a simple merkle key-value store. 
8 Transactions of the form `key=value` are stored as key-value pairs in the tree.
9 Transactions without an `=` sign set the value to the key.
10 The app has no replay protection (other than what the mempool provides).
11
12 ## PersistentDummyApplication
13
14 The PersistentDummyApplication wraps the DummyApplication
15 and provides two additional features:
16
17 1) persistence of state across app restarts (using Tendermint's ABCI-Handshake mechanism)
18 2) validator set changes
19
20 The state is persisted in leveldb along with the last block committed,
21 and the Handshake allows any necessary blocks to be replayed.
22 Validator set changes are effected using the following transaction format:
23
24 ```
25 val:pubkey1/power1,addr2/power2,addr3/power3"
26 ```
27
28 where `power1` is the new voting power for the validator with `pubkey1` (possibly a new one).
29 There is no sybil protection against new validators joining. 
30 Validators can be removed by setting their power to `0`.
31