|
@ -130,36 +130,50 @@ Try running these commands: |
|
|
:: |
|
|
:: |
|
|
|
|
|
|
|
|
> echo hello |
|
|
> echo hello |
|
|
|
|
|
-> code: OK |
|
|
-> data: hello |
|
|
-> data: hello |
|
|
|
|
|
|
|
|
|
|
|
-> data.hex: 0x68656C6C6F |
|
|
|
|
|
|
|
|
> info |
|
|
> info |
|
|
|
|
|
-> code: OK |
|
|
-> data: {"size":0} |
|
|
-> data: {"size":0} |
|
|
|
|
|
|
|
|
|
|
|
-> data.hex: 0x7B2273697A65223A307D |
|
|
|
|
|
|
|
|
> commit |
|
|
> commit |
|
|
-> data: 0x |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-> code: OK |
|
|
|
|
|
|
|
|
> deliver_tx "abc" |
|
|
> deliver_tx "abc" |
|
|
-> code: OK |
|
|
-> code: OK |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
> info |
|
|
> info |
|
|
|
|
|
-> code: OK |
|
|
-> data: {"size":1} |
|
|
-> data: {"size":1} |
|
|
|
|
|
|
|
|
|
|
|
-> data.hex: 0x7B2273697A65223A317D |
|
|
|
|
|
|
|
|
> commit |
|
|
> commit |
|
|
-> data: 0x750502FC7E84BBD788ED589624F06CFA871845D1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-> code: OK |
|
|
|
|
|
-> data.hex: 0x49DFD15CCDACDEAE9728CB01FBB5E8688CA58B91 |
|
|
|
|
|
|
|
|
> query "abc" |
|
|
> query "abc" |
|
|
-> code: OK |
|
|
-> code: OK |
|
|
-> data: {"index":0,"value":"abc","exists":true} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-> log: exists |
|
|
|
|
|
-> height: 0 |
|
|
|
|
|
-> value: abc |
|
|
|
|
|
-> value.hex: 616263 |
|
|
|
|
|
|
|
|
> deliver_tx "def=xyz" |
|
|
> deliver_tx "def=xyz" |
|
|
-> code: OK |
|
|
-> code: OK |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
> commit |
|
|
> commit |
|
|
-> data: 0x76393B8A182E450286B0694C629ECB51B286EFD5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-> code: OK |
|
|
|
|
|
-> data.hex: 0x70102DB32280373FBF3F9F89DA2A20CE2CD62B0B |
|
|
|
|
|
|
|
|
> query "def" |
|
|
> query "def" |
|
|
-> code: OK |
|
|
-> code: OK |
|
|
-> data: {"index":1,"value":"xyz","exists":true} |
|
|
|
|
|
|
|
|
-> log: exists |
|
|
|
|
|
-> height: 0 |
|
|
|
|
|
-> value: xyz |
|
|
|
|
|
-> value.hex: 78797A |
|
|
|
|
|
|
|
|
Note that if we do ``deliver_tx "abc"`` it will store ``(abc, abc)``, |
|
|
Note that if we do ``deliver_tx "abc"`` it will store ``(abc, abc)``, |
|
|
but if we do ``deliver_tx "abc=efg"`` it will store ``(abc, efg)``. |
|
|
but if we do ``deliver_tx "abc=efg"`` it will store ``(abc, efg)``. |
|
@ -209,30 +223,32 @@ In another window, start the ``abci-cli console``: |
|
|
:: |
|
|
:: |
|
|
|
|
|
|
|
|
> set_option serial on |
|
|
> set_option serial on |
|
|
-> data: serial=on |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-> code: OK |
|
|
|
|
|
|
|
|
> check_tx 0x00 |
|
|
> check_tx 0x00 |
|
|
-> code: OK |
|
|
-> code: OK |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
> check_tx 0xff |
|
|
> check_tx 0xff |
|
|
-> code: OK |
|
|
-> code: OK |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
> deliver_tx 0x00 |
|
|
> deliver_tx 0x00 |
|
|
-> code: OK |
|
|
-> code: OK |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
> check_tx 0x00 |
|
|
> check_tx 0x00 |
|
|
-> code: BadNonce |
|
|
-> code: BadNonce |
|
|
-> log: Invalid nonce. Expected >= 1, got 0 |
|
|
-> log: Invalid nonce. Expected >= 1, got 0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
> deliver_tx 0x01 |
|
|
> deliver_tx 0x01 |
|
|
-> code: OK |
|
|
-> code: OK |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
> deliver_tx 0x04 |
|
|
> deliver_tx 0x04 |
|
|
-> code: BadNonce |
|
|
-> code: BadNonce |
|
|
-> log: Invalid nonce. Expected 2, got 4 |
|
|
-> log: Invalid nonce. Expected 2, got 4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
> info |
|
|
> info |
|
|
|
|
|
-> code: OK |
|
|
-> data: {"hashes":0,"txs":2} |
|
|
-> data: {"hashes":0,"txs":2} |
|
|
|
|
|
-> data.hex: 0x7B22686173686573223A302C22747873223A327D |
|
|
|
|
|
|
|
|
This is a very simple application, but between ``counter`` and |
|
|
This is a very simple application, but between ``counter`` and |
|
|
``dummy``, its easy to see how you can build out arbitrary application |
|
|
``dummy``, its easy to see how you can build out arbitrary application |
|
|