Commit Graph

159 Commits

Author SHA1 Message Date
716364182d [state] expose ChainID and Params
```
jaekwon
Yeah we should definitely expose ChainID.
ConsensusParams is small enough, we can just write it.
```
https://github.com/tendermint/tendermint/pull/676#discussion_r144123203
2017-10-16 10:34:02 +04:00
1971e149fb ChainID() and Params() do not return errors
- remove state#GenesisDoc() method
2017-10-16 10:34:02 +04:00
7939d62ef0 all, state: unexpose GenesisDoc, ChainID fields make them accessor methods
Fixes #671

Unexpose GenesisDoc and ChainID fields to avoid them being
serialized to the DB on every block write/state.Save()

A GenesisDoc can now be alternatively written to the state's
database, by serializing its JSON as a value of key "genesis-doc".

There are now accessors and a setter for these attributes:
- state.GenesisDoc() (*types.GenesisDoc, error)
- state.ChainID() (string, error)
- state.SetGenesisDoc(*types.GenesisDoc)

This is a breaking change since it changes how the state's
serialization and requires that if loading the GenesisDoc entirely
from the database, you'll need to set its value in the database
as the GenesisDoc's JSON marshaled bytes.
2017-10-16 10:34:01 +04:00
8311f5c611 abci.Info takes a struct; less merkleeyes 2017-09-22 11:42:40 -04:00
9deb647303 fixes from review 2017-09-04 18:29:51 -04:00
78446fd99c state: persist validators 2017-09-03 16:07:37 -04:00
34beff117a state: comments; use wire.BinaryBytes 2017-09-03 16:07:37 -04:00
b4ece65726 standardize key for errors (should be "err") 2017-06-14 12:50:49 +04:00
b9b2782c3c logger key doesn't support space 2017-06-14 14:41:36 +08:00
bd7ec18c19 fix tests 2017-05-26 12:17:32 -04:00
3fbe286e5a small fixes to changelog, config, default logging 2017-05-22 08:16:25 -04:00
f8fdbe3dbc changes as per Bucky's review 2017-05-13 16:22:51 +02:00
f803544195 new logging 2017-05-13 10:24:58 +02:00
fcf78a5da7 cleanup go-config/viper and some unnamed imports 2017-04-25 14:54:56 -04:00
d1926bcad1 use tmlibs 2017-04-21 18:12:54 -04:00
52d03d0071 post rebase fixes 2017-04-18 21:35:00 -04:00
cd9e9e9f45 s/ExecBlock/ValExecBlock/g; s/sm.ApplyBlock/sm.ExecCommitBlock/g 2017-04-18 21:28:10 -04:00
935f70a346 comments and cleanup 2017-04-18 21:28:10 -04:00
5109746b1c Handshake uses ApplyBlock, no ConsensuState 2017-04-18 21:28:10 -04:00
1684ec163f ABCIResponses not needed as field in state 2017-04-18 21:27:50 -04:00
cb279bf662 state: ABCIResponses, s.Save() in ApplyBlock 2017-04-18 21:27:31 -04:00
45876d0828 NewBatch takes size, batch.Add doesn't use append 2017-04-18 20:23:58 -04:00
b6a04a3456 more fixes from review 2017-04-18 20:11:53 -04:00
f4d0076344 TxResult includes Tx. /tx only works if indexer active 2017-04-18 19:56:41 -04:00
d572bb0c5d state/txindex and pkg per indexer impl 2017-04-18 19:29:02 -04:00
ffe6d58a58 add Height to ResultBroadcastTxCommit and EventDataTx 2017-04-12 18:33:48 -04:00
2a59cda77e /tx returns tx bytes 2017-04-12 18:18:17 -04:00
d7c5690f17 index by bytes. add TxID to broadcast_tx responses 2017-04-10 17:21:37 -04:00
3478de50a1 no need for map - tx responses should arrive in order (Refs #237)
```
me: so we are executing them in order and receiving them in order and there is no way we could receive them out of order (due to network or something else), correct?
ebuchman: if we receive them out of order, ABCI is broken
ebuchman: so it is possible, if the ABCI server we're talking to is not implementing the spec
ebuchman: but that shouldn't justify us building a map
```
2017-04-10 22:44:08 +04:00
63704454a3 expose /tx?hash="XXXXXXXXXXXX" RPC call 2017-04-10 22:44:07 +04:00
c3f1b08b6a tx indexing (Refs #237)
save transactions to blockstore

move to a separate module

benchmark KVIndexer

batch write transactions

Benchmarks:

```
BenchmarkKVIndexerIndex-2         100000            516300 ns/op
PASS
ok      github.com/tendermint/tendermint/blockchain/tx  56.506s

5,16 s for 10000 transactions
1 s for 2000 transactions
```

```
BenchmarkKVIndexerIndex-2       h 3000000             8622 ns/op
PASS
ok      github.com/tendermint/tendermint/blockchain/tx  34.210s

86 ms for 10000 transactions
16 ms for 2000 transactions
```

```
BenchmarkKVIndexerIndex1-2               5000000              7160 ns/op
BenchmarkKVIndexerIndex500-2               20000           1750411 ns/op
BenchmarkKVIndexerIndex1000-2              10000           3573973 ns/op
BenchmarkKVIndexerIndex2000-2               5000           7836851 ns/op
BenchmarkKVIndexerIndex10000-2              1000          33438980 ns/op
PASS
ok      github.com/tendermint/tendermint/blockchain/tx  209.482s

7,8 ms for 2000 transactions
```

[state] write test for ApplyBlock

review comments

- move txindexer to state
- fix type

save Tx Index as well

do not store tx itself in the result
2017-04-10 22:44:07 +04:00
f9df4294f3 move some interfaces to types/services.go 2017-02-20 20:09:15 -05:00
0765613778 move handshake to consensus package 2017-02-20 19:52:36 -05:00
756213c5f5 check appHash 2017-02-20 17:08:38 -05:00
bc67859672 make ReplayBlocks logic exhaustive 2017-02-20 16:32:48 -05:00
44d472ddd3 comments from review 2017-02-18 22:15:59 -05:00
7228b11e3f state: remove StateIntermediate 2017-02-17 19:13:35 -05:00
0bec99fbd4 consensus: handshake replay test using wal 2017-02-17 19:12:05 -05:00
3c5adebcd3 applyBlock to simplify replay of many blocks. still wip 2017-02-17 11:32:56 -05:00
6403b2f468 fixes for handshake replay through consensus 2017-02-17 10:51:05 -05:00
cbe6dbe7a1 handshake replay through consensus using mockApp 2017-02-16 17:56:45 -05:00
99b068b313 BlockMeta uses BlockID 2017-02-14 17:06:58 -05:00
94b6dd65ee AppendTx -> DeliverTx 2017-01-12 15:55:03 -05:00
c147b41013 TMSP -> ABCI 2017-01-12 15:53:32 -05:00
2dd7030579 tmsp: ResponseInfo and ResponseEndBlock 2017-01-12 15:21:20 -05:00
bae0bc02a6 consensus: be more explicit when we need to write height after handshake 2017-01-05 20:16:42 -08:00
0c01b0ded9 state.State and wal.writeHeight after handshake 2016-12-22 22:10:36 -05:00
0e7694ca94 state: AppHashIsStale -> IntermediateState 2016-12-22 15:01:22 -05:00
2425711734 blockchain: use ApplyBlock 2016-12-06 23:01:55 -05:00
4202c4bf20 Fix Merge pull request #319 2016-12-06 01:16:13 -08:00