Ethan Buchman
f9d0096744
support #HEIGHT based WAL
2017-04-18 21:28:10 -04:00
Ethan Buchman
935f70a346
comments and cleanup
2017-04-18 21:28:10 -04:00
Ethan Buchman
5109746b1c
Handshake uses ApplyBlock, no ConsensuState
2017-04-18 21:28:10 -04:00
Ethan Buchman
ed03cb5c17
consensus/replay: remove timeout
2017-04-18 21:27:31 -04:00
Ethan Buchman
54b26869d5
consensus/wal: #HEIGHT -> #ENDHEIGHT
2017-04-18 21:27:31 -04:00
Ethan Buchman
cb279bf662
state: ABCIResponses, s.Save() in ApplyBlock
2017-04-18 21:27:31 -04:00
Anton Kaliaev
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
Ethan Buchman
09f7dabd5e
update comment
2017-03-28 14:06:03 -04:00
Ethan Buchman
4fd1471f11
remove BaseService.OnStart
2017-03-28 12:09:11 -04:00
Ethan Buchman
85e83934a1
fixes from review
2017-03-28 12:07:32 -04:00
Ethan Buchman
077cf13a1f
consensus: timeout on replayLastBlock
2017-03-27 15:41:45 -04:00
Ethan Buchman
b1cd677711
types: valSet LastProposer->Proposer and Proposer()->GetProposer()
2017-03-05 23:28:42 -05:00
Ethan Buchman
749df0536f
test/docker: install abci apps first
2017-03-05 14:59:02 -05:00
Ethan Buchman
2037d2631a
fix race
2017-03-05 03:40:36 -05:00
Ethan Buchman
de0153a1c4
consensus: some more informative logging
2017-03-05 02:15:46 -05:00
Ethan Buchman
8ba79252c8
types: use mtx on PartSet.String()
2017-03-02 23:50:59 -05:00
Anton Kaliaev
2c724d5eee
remove warning messages in favor of "Send failed"
2017-02-21 13:25:16 +04:00
Anton Kaliaev
6dbe9febce
log warning if peer send failed (Refs #174 )
...
make lint happy
remove dead code
remove not needed go-common dependency
check peer.Send failures (Refs #174 )
2017-02-21 11:57:33 +04:00
Ethan Buchman
0c4b6cd071
consensus: more handshake replay tests
2017-02-20 21:45:53 -05:00
Ethan Buchman
f9df4294f3
move some interfaces to types/services.go
2017-02-20 20:09:15 -05:00
Ethan Buchman
0765613778
move handshake to consensus package
2017-02-20 19:52:36 -05:00
Ethan Buchman
756213c5f5
check appHash
2017-02-20 17:08:38 -05:00
Ethan Buchman
bc67859672
make ReplayBlocks logic exhaustive
2017-02-20 16:32:48 -05:00
Ethan Buchman
44d472ddd3
comments from review
2017-02-18 22:15:59 -05:00
Ethan Buchman
0bec99fbd4
consensus: handshake replay test using wal
2017-02-17 19:12:05 -05:00
Ethan Buchman
edc5e272db
consensus: nice error msg if ApplyBlock fails
2017-02-17 10:57:09 -05:00
Ethan Buchman
6403b2f468
fixes for handshake replay through consensus
2017-02-17 10:51:05 -05:00
Ethan Buchman
cbe6dbe7a1
handshake replay through consensus using mockApp
2017-02-16 17:56:45 -05:00
Ethan Buchman
99b068b313
BlockMeta uses BlockID
2017-02-14 17:06:58 -05:00
Ethan Buchman
7d91d4300b
update glide
2017-02-13 21:07:26 -05:00
Jae Kwon
1af930441c
Support new Query message for proofs
2017-01-28 08:27:13 -08:00
Jae Kwon
a073b1db9c
Refactor replay console -> replay_file in consensus/replay_file.go
2017-01-15 16:19:02 -08:00
Ethan Buchman
94b6dd65ee
AppendTx -> DeliverTx
2017-01-12 15:55:03 -05:00
Ethan Buchman
c147b41013
TMSP -> ABCI
2017-01-12 15:53:32 -05:00
Ethan Buchman
2dd7030579
tmsp: ResponseInfo and ResponseEndBlock
2017-01-12 15:21:20 -05:00
Ethan Buchman
e7a12f8e38
cs.Wait()
2017-01-12 14:44:42 -05:00
Ethan Buchman
0525e8ed5c
rearrange common_test.go; EnsureDir for privVal
2017-01-12 12:38:09 -05:00
Ethan Buchman
814ef37f75
fix tests
2017-01-12 10:58:44 -05:00
Ethan Buchman
3c589dac19
startConsensusNet and stopConsensusNet
2017-01-12 02:29:53 -05:00
Ethan Buchman
ce0c638005
little fix
2017-01-11 18:37:36 -05:00
Anton Kalyaev
535fc6cd63
test we can make blocks with skip_timeout_commit=false
2017-01-11 18:00:27 -05:00
Anton Kalyaev
3308ac7d83
set skip_timeout_commit to true for tests
...
For the tests its better to not use the timeout_commit, and to wait for all the
votes, because otherwise we can end up with timing dependencies in the testing
code which can lead to nondeterministic failures. That was part of the reason
for this change originally.
2017-01-11 18:00:26 -05:00
Anton Kalyaev
a1fd312bb1
make progress asap on full precommit votes optional (Refs #348 )
2017-01-11 18:00:26 -05:00
Ethan Buchman
44f939c841
Merge pull request #359 from tendermint/val-set-changes
...
Val set changes
2017-01-11 17:56:52 -05:00
Ethan Buchman
d68cdce2d5
consensus: check HasAll when TwoThirdsMajority
2017-01-11 17:53:46 -05:00
Jae Kwon
43fdc4a1ce
Fix #341
2017-01-11 08:57:10 -08:00
Anton Kalyaev
cb2f2b94ee
log stages to stdout
2017-01-11 10:35:04 -05:00
Anton Kalyaev
4722410e5e
test validator set changes more extensively
2017-01-11 10:35:04 -05:00
Ethan Buchman
55b4bfa1fe
consensus: let time.Timer handle non-positive durations
2017-01-11 10:24:40 -05:00
Ethan Buchman
12d92fd5db
Merge pull request #343 from tendermint/restart_test
...
Crash/Restart tests
2017-01-06 11:55:05 -08:00
Ethan Buchman
bae0bc02a6
consensus: be more explicit when we need to write height after handshake
2017-01-05 20:16:42 -08:00
Ethan Buchman
f30a9752e2
more fixes from review
2016-12-23 11:11:22 -05:00
Ethan Buchman
0c01b0ded9
state.State and wal.writeHeight after handshake
2016-12-22 22:10:36 -05:00
Ethan Buchman
e5fb681615
consensus: remove crankTimeoutPropose from tests
2016-12-22 22:03:42 -05:00
Ethan Buchman
c9698e4848
fixes from review
2016-12-22 22:03:42 -05:00
Ethan Buchman
f4e6cf4439
consensus: sync wal.writeHeight
2016-12-22 15:01:02 -05:00
Ethan Buchman
b126ca0606
consensus: no internal vars in reactor.String()
2016-12-20 00:17:37 -05:00
Ethan Buchman
40b08f2494
consensus: mv timeoutRoutine into TimeoutTicker
2016-12-19 22:29:32 -05:00
Ethan Buchman
8211fa6ce4
enterNewRound on HasAll
2016-12-19 20:12:37 -05:00
Ethan Buchman
706dd1d6c5
test: dont start cs until all peers connected
2016-12-19 19:50:40 -05:00
Ethan Buchman
faf23aa0d4
consensus: TimeoutTicker, skip TimeoutCommit on HasAll
2016-12-19 15:42:36 -05:00
Ethan Buchman
1bd700ee52
test: automate building consensus/test_data
2016-12-18 00:15:10 -05:00
Ethan Buchman
38783e7fa1
types: SignatureEd25519 -> Signature
2016-12-18 00:14:07 -05:00
Ethan Buchman
dcbb35089f
consensus: wal.Flush() and cleanup replay tests
2016-12-17 23:43:17 -05:00
Ethan Buchman
de6bba4609
test: randConsensusNet takes more args
2016-12-17 14:45:20 -05:00
Ethan Buchman
d800a51da4
test: crank it to eleventy
2016-12-07 20:13:52 -05:00
Ethan Buchman
8df32cd540
test: increase proposal timeout
2016-12-06 19:54:10 -05:00
Jae Kwon
4202c4bf20
Fix Merge pull request #319
2016-12-06 01:16:13 -08:00
Ethan Buchman
b74a97a4f6
update grpc broadcast tx
2016-12-02 00:29:25 -05:00
Ethan Buchman
0fe53dc5cf
remove privValIndex; Stale->AppHashIsStale
2016-12-02 00:27:36 -05:00
Ethan Buchman
2f9063c1d6
consensus: test validator set change
2016-11-23 18:20:46 -05:00
Ethan Buchman
6f8c91b651
use NewValidator; fix setPrivValidatorIndex
2016-11-22 20:38:14 -05:00
Ethan Buchman
e0db20c0cf
update privValidatorIndex on valset change
2016-11-22 20:38:14 -05:00
Ethan Buchman
655b6300f5
val set changes
2016-11-22 20:38:14 -05:00
Ethan Buchman
d7f6c0775a
remove LastCommitHeight
2016-11-22 20:38:14 -05:00
Ethan Buchman
a3d863f83b
consensus: track index of privVal
2016-11-22 20:38:14 -05:00
Jae Kwon
e09950d3fb
Use new Group semantics
2016-11-21 19:16:19 -08:00
Ethan Buchman
c6a648fad7
consensus: lock before loading commit
2016-11-16 16:47:31 -05:00
Ethan Buchman
07597dfd45
post rebase fixes for BlockID, partSize
2016-11-16 16:13:17 -05:00
Ethan Buchman
4360c360a4
move handshake to state, use Handshaker, more tests
2016-11-16 13:29:22 -05:00
Ethan Buchman
3f90fcae48
fail tests and fix
2016-11-16 13:26:39 -05:00
Ethan Buchman
8ec1839f5d
save block b4 apply; track stale apphash
2016-11-16 13:26:39 -05:00
Ethan Buchman
fb9735ef46
rebase fixes and BeginBlock(hash,header)
2016-11-16 13:25:13 -05:00
Ethan Buchman
138de19e1e
test: app persistence
2016-11-16 13:25:13 -05:00
Ethan Buchman
d3ae920bd0
state: ApplyBlock
2016-11-16 13:25:13 -05:00
Ethan Buchman
f37f56d4f1
fixes
2016-11-16 13:25:13 -05:00
Ethan Buchman
81e6df0d57
cswal: write #HEIGHT:1 for empty wal
2016-11-16 01:23:19 -05:00
Jae Kwon
d83fc02597
MakePartSet takes partSize from config. fix replay test
2016-11-16 01:23:16 -05:00
Jae Kwon
95c8bb4252
Fixing issues from review in #229
2016-11-15 18:48:35 -05:00
Jae Kwon
c1729addce
Fix BFT issue where VoteSetMaj23Message wasn't being sent where prs.Round == blockStore.Round()
2016-11-15 18:48:35 -05:00
Jae Kwon
3e3b034252
Make ConsensusReactor use ConsensusState's blockstore; debug functions
2016-11-15 18:48:34 -05:00
Ethan Buchman
9d0c7f6ec7
fix bft test. still halts
2016-11-15 18:47:19 -05:00
Ethan Buchman
c5a803a146
DataChannel -> StateChannel for Maj23Msg
2016-11-15 18:45:36 -05:00
Ethan Buchman
5f55ed2a40
consensus: ensure dir for cswal on reactor tests
2016-11-15 18:45:36 -05:00
Ethan Buchman
7afcf92539
consensus: fix panic on POLRound=-1
2016-11-15 18:45:36 -05:00
Ethan Buchman
57da2e4af5
make byzantine logic testable
2016-11-15 18:45:36 -05:00
Ethan Buchman
f837252ff1
consensus: test reactor
2016-11-15 18:37:33 -05:00
Jae Kwon
fd128c7180
Fix comments from review
2016-11-15 18:37:00 -05:00
Jae Kwon
ea4b60a602
Fix compile bug
2016-11-15 18:37:00 -05:00
Jae Kwon
b73a6905a1
Initial pass at bft_fix_2 completion
2016-11-15 18:37:00 -05:00