Anton Kaliaev
21f5f3faa7
use channels to send votes, ... from consensus state to reactor
...
Refs #847
2018-05-21 10:50:55 +04:00
Ethan Buchman
ee4eb59355
update comments
2018-05-20 16:44:08 -04:00
Ethan Buchman
082a02e6d1
consensus: only fsync wal after internal msgs
2018-05-20 14:40:47 -04:00
Ethan Buchman
547e8223b9
fix
2018-05-17 15:24:37 -04:00
Ethan Buchman
8e46df14e7
improve consensus logger
2018-05-17 13:59:41 -04:00
Ethan Buchman
e5220360c5
AddPart always verifies
2018-05-17 13:17:50 -04:00
Alexander Simmerl
b698a9febc
Remove double locking in HasIP
2018-05-16 19:21:12 +02:00
Jae Kwon
e1a3f16fa4
Comment tweaks
2018-05-15 08:48:59 -07:00
Ethan Buchman
162811476a
update some comments
2018-05-14 16:32:19 -04:00
Zarko Milosevic
b5ac9ede8a
Add rules in gossipVotesForHeight to clarify priorities on messages to send
2018-05-14 16:18:50 -04:00
Jae Kwon
ff5dfc0c15
Add more comments for Valid*
2018-05-14 16:18:50 -04:00
Jae Kwon
d3a98675aa
Refactor addVote() to be clearer
2018-05-14 16:17:21 -04:00
Jae Kwon
e3c4625e63
Suggested changes to consensus/reactor.go
2018-05-14 16:17:21 -04:00
Zarko Milosevic
01ac378c96
Update condition based on Jae input
2018-05-14 16:17:21 -04:00
Zarko Milosevic
83ca46396d
Update gossipVotes routine to align with validBlock mechanism
2018-05-14 16:17:21 -04:00
Zarko Milosevic
2c125b6c78
Fix validValue rule
2018-05-14 16:17:21 -04:00
Ethan Buchman
e9804d76cf
fixes from review
2018-05-14 10:33:31 -04:00
Ethan Buchman
a41f0d3891
rpc: /consensus_state for simplified output
2018-05-13 19:53:54 -04:00
Ethan Buchman
658060150c
rpc: add voting power totals to vote bitarrays
2018-05-13 19:22:23 -04:00
Jae Kwon
56c9e0da7e
Add back sample output in rpc/core/consensus.go; Tweak DumpConsensusState output for peers
2018-05-12 15:39:30 -07:00
Jae Kwon
edbec10f9e
Expose peer stats for dump_consensus_state
2018-05-10 22:43:21 -07:00
Ethan Buchman
f33da8817a
rpc: lower_case peer_round_states, use a list, add the node_address
2018-04-27 23:00:09 -04:00
Ethan Buchman
25cee8827a
Merge branch 'develop' into 1428-remove-wal-light
2018-04-27 12:06:08 -04:00
Jae Kwon
65ebbccb74
Add GoAmino DeepCopy() benchmark for RoundState
2018-04-27 11:55:45 -04:00
Ethan Buchman
f67c5a9e7b
forgot wire.go file
2018-04-27 10:00:34 -04:00
Ethan Buchman
a2d77cbe4e
add MarshalJSON methods to fix dump_consensus_state
2018-04-26 23:43:48 -04:00
Ethan Buchman
94c016a04e
use MarshalJSONIndent for init files. closes #1506
2018-04-26 21:32:18 -04:00
Jae Kwon
b20e777f53
lower_case json field names
2018-04-20 23:20:44 -07:00
Thomas Corbière
ab00bf7c8b
standardize PRNG access ( #1411 )
...
* replace math/rand with tmlibs equivalent.
* update tmlibs dependency
2018-04-11 11:38:30 +02:00
Vladislav Dmitriyev
7c22e47629
Replaced NodeInfo's pubkey to ID ( #1443 )
...
* Replaced NodeInfo PubKey to NodeID
* Fixed tests and replaced NodeID with ID
* Removed unnecessary method ID()
* Fixed codec_test.go
* Fixed codec_test.go
* Removed unnecessary bracket
* Fixed all tests
* Fixed peer_set_test.go
* Fixed peer_test.go
* Fixed common_test.go
* Fixed common_test.go
* Renamed node_id to id
* Removed peer.ID() from RPC net.go
* Replaced NodeInfo pubKey to ID
* Fixed codec_test.go
* Fixed peer_set_test.go
* Fix pex_reactor_test.go
* Refactored code for privateKey initiali
* Fixed peer_set_test.go
* Fixed test.proto and removed orphan string in codec_test.go
* Fixed pointer to a string
* generate node_key when running tendermint init
* [docs] prefix IPs with node IDs
Refs #1429
* gen_node_key cmd
* [docs/specification/secure-p2p] add a note about config
* fix data race
Closes #1442
```
WARNING: DATA RACE
Write at 0x00c4209de7c8 by goroutine 23:
github.com/tendermint/tendermint/types.(*Block).fillHeader()
/home/vagrant/go/src/github.com/tendermint/tendermint/types/block.go:88 +0x157
github.com/tendermint/tendermint/types.(*Block).Hash()
/home/vagrant/go/src/github.com/tendermint/tendermint/types/block.go:104 +0x121
github.com/tendermint/tendermint/types.(*Block).HashesTo()
/home/vagrant/go/src/github.com/tendermint/tendermint/types/block.go:135 +0x4f
github.com/tendermint/tendermint/consensus.(*ConsensusState).enterPrecommit()
/home/vagrant/go/src/github.com/tendermint/tendermint/consensus/state.go:1037 +0x182d
github.com/tendermint/tendermint/consensus.(*ConsensusState).addVote()
/home/vagrant/go/src/github.com/tendermint/tendermint/consensus/state.go:1425 +0x1a6c
github.com/tendermint/tendermint/consensus.(*ConsensusState).tryAddVote()
/home/vagrant/go/src/github.com/tendermint/tendermint/consensus/state.go:1318 +0x77
github.com/tendermint/tendermint/consensus.(*ConsensusState).handleMsg()
/home/vagrant/go/src/github.com/tendermint/tendermint/consensus/state.go:581 +0x7a9
github.com/tendermint/tendermint/consensus.(*ConsensusState).receiveRoutine()
/home/vagrant/go/src/github.com/tendermint/tendermint/consensus/state.go:539 +0x6c3
Previous read at 0x00c4209de7c8 by goroutine 47:
github.com/tendermint/tendermint/vendor/github.com/tendermint/tmlibs/common.(*HexBytes).MarshalJSON()
<autogenerated>:1 +0x52
github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino.invokeMarshalJSON()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino/json-encode.go:433 +0x88
github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino.(*Codec)._encodeReflectJSON()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino/json-encode.go:82 +0x8d2
github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino.(*Codec).encodeReflectJSON()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino/json-encode.go:50 +0x10e
github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino.(*Codec).encodeReflectJSONStruct()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino/json-encode.go:348 +0x539
github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino.(*Codec)._encodeReflectJSON()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino/json-encode.go:119 +0x83f
github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino.(*Codec).encodeReflectJSON()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino/json-encode.go:50 +0x10e
github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino.(*Codec).encodeReflectJSONStruct()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino/json-encode.go:348 +0x539
github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino.(*Codec)._encodeReflectJSON()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino/json-encode.go:119 +0x83f
github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino.(*Codec).encodeReflectJSON()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino/json-encode.go:50 +0x10e
github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino.(*Codec).encodeReflectJSONStruct()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino/json-encode.go:348 +0x539
github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino.(*Codec)._encodeReflectJSON()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino/json-encode.go:119 +0x83f
github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino.(*Codec).encodeReflectJSON()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino/json-encode.go:50 +0x10e
github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino.(*Codec).encodeReflectJSONStruct()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino/json-encode.go:348 +0x539
github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino.(*Codec)._encodeReflectJSON()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino/json-encode.go:119 +0x83f
github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino.(*Codec).encodeReflectJSON()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino/json-encode.go:50 +0x10e
github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino.(*Codec).MarshalJSON()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino/amino.go:296 +0x182
github.com/tendermint/tendermint/rpc/lib/types.NewRPCSuccessResponse()
/home/vagrant/go/src/github.com/tendermint/tendermint/rpc/lib/types/types.go:100 +0x12c
github.com/tendermint/tendermint/rpc/lib/server.makeJSONRPCHandler.func1()
/home/vagrant/go/src/github.com/tendermint/tendermint/rpc/lib/server/handlers.go:152 +0xab7
net/http.HandlerFunc.ServeHTTP()
/usr/lib/go-1.9/src/net/http/server.go:1918 +0x51
net/http.(*ServeMux).ServeHTTP()
/usr/lib/go-1.9/src/net/http/server.go:2254 +0xa2
github.com/tendermint/tendermint/rpc/lib/server.RecoverAndLogHandler.func1()
/home/vagrant/go/src/github.com/tendermint/tendermint/rpc/lib/server/http_server.go:138 +0x4fa
net/http.HandlerFunc.ServeHTTP()
/usr/lib/go-1.9/src/net/http/server.go:1918 +0x51
net/http.serverHandler.ServeHTTP()
/usr/lib/go-1.9/src/net/http/server.go:2619 +0xbc
net/http.(*conn).serve()
/usr/lib/go-1.9/src/net/http/server.go:1801 +0x83b
Goroutine 23 (running) created at:
github.com/tendermint/tendermint/consensus.(*ConsensusState).OnStart()
/home/vagrant/go/src/github.com/tendermint/tendermint/consensus/state.go:250 +0x35b
github.com/tendermint/tendermint/vendor/github.com/tendermint/tmlibs/common.(*BaseService).Start()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/tmlibs/common/service.go:130 +0x5fc
github.com/tendermint/tendermint/consensus.(*ConsensusReactor).OnStart()
/home/vagrant/go/src/github.com/tendermint/tendermint/consensus/reactor.go:69 +0x1b4
github.com/tendermint/tendermint/vendor/github.com/tendermint/tmlibs/common.(*BaseService).Start()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/tmlibs/common/service.go:130 +0x5fc
github.com/tendermint/tendermint/consensus.(*ConsensusReactor).Start()
<autogenerated>:1 +0x43
github.com/tendermint/tendermint/p2p.(*Switch).OnStart()
/home/vagrant/go/src/github.com/tendermint/tendermint/p2p/switch.go:177 +0x124
github.com/tendermint/tendermint/vendor/github.com/tendermint/tmlibs/common.(*BaseService).Start()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/tmlibs/common/service.go:130 +0x5fc
github.com/tendermint/tendermint/node.(*Node).OnStart()
/home/vagrant/go/src/github.com/tendermint/tendermint/node/node.go:416 +0xa1b
github.com/tendermint/tendermint/vendor/github.com/tendermint/tmlibs/common.(*BaseService).Start()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/tmlibs/common/service.go:130 +0x5fc
github.com/tendermint/tendermint/rpc/test.StartTendermint()
/home/vagrant/go/src/github.com/tendermint/tendermint/rpc/test/helpers.go:100 +0x5b
github.com/tendermint/tendermint/rpc/client_test.TestMain()
/home/vagrant/go/src/github.com/tendermint/tendermint/rpc/client/main_test.go:17 +0x4c
main.main()
github.com/tendermint/tendermint/rpc/client/_test/_testmain.go:76 +0x1cd
Goroutine 47 (running) created at:
net/http.(*Server).Serve()
/usr/lib/go-1.9/src/net/http/server.go:2720 +0x37c
net/http.Serve()
/usr/lib/go-1.9/src/net/http/server.go:2323 +0xe2
github.com/tendermint/tendermint/rpc/lib/server.StartHTTPServer.func1()
/home/vagrant/go/src/github.com/tendermint/tendermint/rpc/lib/server/http_server.go:35 +0xb3
```
* removed excessive comment
Refs https://github.com/tendermint/tendermint/pull/1446#discussion_r180353446
* use the tag interface for pubsub. (#1438 )
* use the tag interface for pubsub.
* update tmlibs.
* Fix unresolved conflict.
* improve `show_node_id` (#1433 )
* fix show_node_id
* make LoadNodeKey public
* make LoadNodeKey public
* remove if
* remove if
2018-04-11 10:11:11 +02:00
Anton Kaliaev
e88f74bb9b
remove wal_light setting
...
Closes #1428
2018-04-11 10:08:03 +02:00
Anton Kaliaev
cca1dd8e3e
removed excessive comment
...
Refs https://github.com/tendermint/tendermint/pull/1446#discussion_r180353446
2018-04-10 11:36:31 +02:00
Anton Kaliaev
26c38e770e
fix data race
...
Closes #1442
```
WARNING: DATA RACE
Write at 0x00c4209de7c8 by goroutine 23:
github.com/tendermint/tendermint/types.(*Block).fillHeader()
/home/vagrant/go/src/github.com/tendermint/tendermint/types/block.go:88 +0x157
github.com/tendermint/tendermint/types.(*Block).Hash()
/home/vagrant/go/src/github.com/tendermint/tendermint/types/block.go:104 +0x121
github.com/tendermint/tendermint/types.(*Block).HashesTo()
/home/vagrant/go/src/github.com/tendermint/tendermint/types/block.go:135 +0x4f
github.com/tendermint/tendermint/consensus.(*ConsensusState).enterPrecommit()
/home/vagrant/go/src/github.com/tendermint/tendermint/consensus/state.go:1037 +0x182d
github.com/tendermint/tendermint/consensus.(*ConsensusState).addVote()
/home/vagrant/go/src/github.com/tendermint/tendermint/consensus/state.go:1425 +0x1a6c
github.com/tendermint/tendermint/consensus.(*ConsensusState).tryAddVote()
/home/vagrant/go/src/github.com/tendermint/tendermint/consensus/state.go:1318 +0x77
github.com/tendermint/tendermint/consensus.(*ConsensusState).handleMsg()
/home/vagrant/go/src/github.com/tendermint/tendermint/consensus/state.go:581 +0x7a9
github.com/tendermint/tendermint/consensus.(*ConsensusState).receiveRoutine()
/home/vagrant/go/src/github.com/tendermint/tendermint/consensus/state.go:539 +0x6c3
Previous read at 0x00c4209de7c8 by goroutine 47:
github.com/tendermint/tendermint/vendor/github.com/tendermint/tmlibs/common.(*HexBytes).MarshalJSON()
<autogenerated>:1 +0x52
github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino.invokeMarshalJSON()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino/json-encode.go:433 +0x88
github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino.(*Codec)._encodeReflectJSON()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino/json-encode.go:82 +0x8d2
github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino.(*Codec).encodeReflectJSON()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino/json-encode.go:50 +0x10e
github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino.(*Codec).encodeReflectJSONStruct()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino/json-encode.go:348 +0x539
github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino.(*Codec)._encodeReflectJSON()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino/json-encode.go:119 +0x83f
github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino.(*Codec).encodeReflectJSON()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino/json-encode.go:50 +0x10e
github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino.(*Codec).encodeReflectJSONStruct()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino/json-encode.go:348 +0x539
github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino.(*Codec)._encodeReflectJSON()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino/json-encode.go:119 +0x83f
github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino.(*Codec).encodeReflectJSON()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino/json-encode.go:50 +0x10e
github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino.(*Codec).encodeReflectJSONStruct()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino/json-encode.go:348 +0x539
github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino.(*Codec)._encodeReflectJSON()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino/json-encode.go:119 +0x83f
github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino.(*Codec).encodeReflectJSON()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino/json-encode.go:50 +0x10e
github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino.(*Codec).encodeReflectJSONStruct()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino/json-encode.go:348 +0x539
github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino.(*Codec)._encodeReflectJSON()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino/json-encode.go:119 +0x83f
github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino.(*Codec).encodeReflectJSON()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino/json-encode.go:50 +0x10e
github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino.(*Codec).MarshalJSON()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino/amino.go:296 +0x182
github.com/tendermint/tendermint/rpc/lib/types.NewRPCSuccessResponse()
/home/vagrant/go/src/github.com/tendermint/tendermint/rpc/lib/types/types.go:100 +0x12c
github.com/tendermint/tendermint/rpc/lib/server.makeJSONRPCHandler.func1()
/home/vagrant/go/src/github.com/tendermint/tendermint/rpc/lib/server/handlers.go:152 +0xab7
net/http.HandlerFunc.ServeHTTP()
/usr/lib/go-1.9/src/net/http/server.go:1918 +0x51
net/http.(*ServeMux).ServeHTTP()
/usr/lib/go-1.9/src/net/http/server.go:2254 +0xa2
github.com/tendermint/tendermint/rpc/lib/server.RecoverAndLogHandler.func1()
/home/vagrant/go/src/github.com/tendermint/tendermint/rpc/lib/server/http_server.go:138 +0x4fa
net/http.HandlerFunc.ServeHTTP()
/usr/lib/go-1.9/src/net/http/server.go:1918 +0x51
net/http.serverHandler.ServeHTTP()
/usr/lib/go-1.9/src/net/http/server.go:2619 +0xbc
net/http.(*conn).serve()
/usr/lib/go-1.9/src/net/http/server.go:1801 +0x83b
Goroutine 23 (running) created at:
github.com/tendermint/tendermint/consensus.(*ConsensusState).OnStart()
/home/vagrant/go/src/github.com/tendermint/tendermint/consensus/state.go:250 +0x35b
github.com/tendermint/tendermint/vendor/github.com/tendermint/tmlibs/common.(*BaseService).Start()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/tmlibs/common/service.go:130 +0x5fc
github.com/tendermint/tendermint/consensus.(*ConsensusReactor).OnStart()
/home/vagrant/go/src/github.com/tendermint/tendermint/consensus/reactor.go:69 +0x1b4
github.com/tendermint/tendermint/vendor/github.com/tendermint/tmlibs/common.(*BaseService).Start()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/tmlibs/common/service.go:130 +0x5fc
github.com/tendermint/tendermint/consensus.(*ConsensusReactor).Start()
<autogenerated>:1 +0x43
github.com/tendermint/tendermint/p2p.(*Switch).OnStart()
/home/vagrant/go/src/github.com/tendermint/tendermint/p2p/switch.go:177 +0x124
github.com/tendermint/tendermint/vendor/github.com/tendermint/tmlibs/common.(*BaseService).Start()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/tmlibs/common/service.go:130 +0x5fc
github.com/tendermint/tendermint/node.(*Node).OnStart()
/home/vagrant/go/src/github.com/tendermint/tendermint/node/node.go:416 +0xa1b
github.com/tendermint/tendermint/vendor/github.com/tendermint/tmlibs/common.(*BaseService).Start()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/tmlibs/common/service.go:130 +0x5fc
github.com/tendermint/tendermint/rpc/test.StartTendermint()
/home/vagrant/go/src/github.com/tendermint/tendermint/rpc/test/helpers.go:100 +0x5b
github.com/tendermint/tendermint/rpc/client_test.TestMain()
/home/vagrant/go/src/github.com/tendermint/tendermint/rpc/client/main_test.go:17 +0x4c
main.main()
github.com/tendermint/tendermint/rpc/client/_test/_testmain.go:76 +0x1cd
Goroutine 47 (running) created at:
net/http.(*Server).Serve()
/usr/lib/go-1.9/src/net/http/server.go:2720 +0x37c
net/http.Serve()
/usr/lib/go-1.9/src/net/http/server.go:2323 +0xe2
github.com/tendermint/tendermint/rpc/lib/server.StartHTTPServer.func1()
/home/vagrant/go/src/github.com/tendermint/tendermint/rpc/lib/server/http_server.go:35 +0xb3
```
2018-04-10 11:15:16 +02:00
Ethan Buchman
1a1e4e767b
check max msg size in DecodeMessage
2018-04-09 15:18:47 +03:00
Ethan Buchman
c68d406195
fix tests
2018-04-07 19:47:19 +03:00
Ethan Buchman
02c0835e9b
fixes post merge
2018-04-07 16:25:10 +03:00
Ethan Buchman
c170800fbd
Merge branch 'develop' into jae/aminoify
2018-04-07 16:16:53 +03:00
Jae Kwon
d24e4cb821
Fix race testing
2018-04-06 17:02:29 -07:00
Jae Kwon
fb64314d1c
Review from Anton
2018-04-06 13:46:40 -07:00
Jae Kwon
e4492afbad
Merge
2018-04-05 08:17:10 -07:00
Ethan Buchman
799beebd36
fix consensus tests
2018-04-05 17:54:26 +03:00
Jae Kwon
45ec5fd170
WIP consensus
2018-04-05 07:05:45 -07:00
Anton Kaliaev
a506cf47ad
protect Record* peerStateStats functions by mutex
...
Fixes #1414
DATA RACE:
```
Read at 0x00c4214ee940 by goroutine 146:
github.com/tendermint/tendermint/consensus.(*peerStateStats).String()
<autogenerated>:1 +0x57
fmt.(*pp).handleMethods()
/usr/local/go/src/fmt/print.go:596 +0x3f4
fmt.(*pp).printArg()
/usr/local/go/src/fmt/print.go:679 +0x11f
fmt.(*pp).doPrintf()
/usr/local/go/src/fmt/print.go:996 +0x319
fmt.Sprintf()
/usr/local/go/src/fmt/print.go:196 +0x73
github.com/tendermint/tendermint/consensus.(*PeerState).StringIndented()
github.com/tendermint/tendermint/consensus/_test/_obj_test/reactor.go:1426 +0x573
github.com/tendermint/tendermint/consensus.(*PeerState).String()
github.com/tendermint/tendermint/consensus/_test/_obj_test/reactor.go:1419 +0x66
github.com/go-logfmt/logfmt.safeString()
/home/ubuntu/go/src/github.com/go-logfmt/logfmt/encode.go:299 +0x9d
github.com/go-logfmt/logfmt.writeValue()
/home/ubuntu/go/src/github.com/go-logfmt/logfmt/encode.go:217 +0x5a0
github.com/go-logfmt/logfmt.(*Encoder).EncodeKeyval()
/home/ubuntu/go/src/github.com/go-logfmt/logfmt/encode.go:61 +0x1dd
github.com/tendermint/tmlibs/log.tmfmtLogger.Log()
/home/ubuntu/go/src/github.com/tendermint/tmlibs/log/tmfmt_logger.go:107 +0x1001
github.com/tendermint/tmlibs/log.(*tmfmtLogger).Log()
<autogenerated>:1 +0x93
github.com/go-kit/kit/log.(*context).Log()
/home/ubuntu/go/src/github.com/go-kit/kit/log/log.go:124 +0x248
github.com/tendermint/tmlibs/log.(*tmLogger).Debug()
/home/ubuntu/go/src/github.com/tendermint/tmlibs/log/tm_logger.go:64 +0x1d0
github.com/tendermint/tendermint/consensus.(*PeerState).PickSendVote()
github.com/tendermint/tendermint/consensus/_test/_obj_test/reactor.go:1059 +0x242
github.com/tendermint/tendermint/consensus.(*ConsensusReactor).gossipVotesForHeight()
github.com/tendermint/tendermint/consensus/_test/_obj_test/reactor.go:789 +0x6ef
github.com/tendermint/tendermint/consensus.(*ConsensusReactor).gossipVotesRoutine()
github.com/tendermint/tendermint/consensus/_test/_obj_test/reactor.go:723 +0x1039
Previous write at 0x00c4214ee940 by goroutine 21:
github.com/tendermint/tendermint/consensus.(*PeerState).RecordVote()
github.com/tendermint/tendermint/consensus/_test/_obj_test/reactor.go:1242 +0x15a
github.com/tendermint/tendermint/consensus.(*ConsensusReactor).Receive()
github.com/tendermint/tendermint/consensus/_test/_obj_test/reactor.go:309 +0x32e6
github.com/tendermint/tendermint/p2p.createMConnection.func1()
/home/ubuntu/go/src/github.com/tendermint/tendermint/p2p/peer.go:365 +0xea
github.com/tendermint/tendermint/p2p/conn.(*MConnection).recvRoutine()
/home/ubuntu/go/src/github.com/tendermint/tendermint/p2p/conn/connection.go:531 +0x779
```
2018-04-05 11:42:45 +02:00
Anton Kaliaev
37ce6b195a
ValidatorSet#GetByAddress: return -1 if no validator was found
2018-04-04 10:42:34 +02:00
Ethan Buchman
5f548c7679
consensus: close pubsub channels. fixes #1372
2018-04-03 22:57:32 +03:00
Jae Kwon
196f8410ba
WIP commit; Fix types/results_test
2018-04-03 07:03:08 -07:00
Thomas Corbière
2644a529f0
Fix lint errors ( #1390 )
...
* use increment and decrement operators.
* remove unnecessary else branches.
* fix package comment with leading space.
* fix receiver names.
* fix error strings.
* remove omittable code.
* remove redundant return statement.
* Revert changes (code is generated.)
* use cfg as receiver name for all config-related types.
* use lsi as the receiver name for the LastSignedInfo type.
2018-04-02 10:21:17 +02:00
Anton Kaliaev
1c82281b77
make app_options -> app_state backwards compatible
2018-03-26 21:51:07 +02:00
Ethan Buchman
20b198681b
Merge pull request #1328 from tendermint/bucky/add-vote-readability
...
addVote readability
2018-03-19 12:24:28 +01:00
Anton Kaliaev
2c445059f2
mark peer as good every blocksToContributeToBecomeGoodPeer blocks
...
if enough peers are marked good eventually some will become unmarked, so
good to have a force that will continue to cycle them back into good
territory!
Refs #1317
2018-03-19 14:10:25 +03:00
Anton Kaliaev
ab59f64f57
test we record votes and block parts
...
Refs #1317
2018-03-19 13:17:11 +03:00
Anton Kaliaev
42e3457884
fix tracking of votes and blockparts to not allow old information
...
also remove mutex
Refs #1317
2018-03-19 13:17:06 +03:00
Anton Kaliaev
31f3dd42e7
mark peer as good only once
...
or should we do it every N blocks?
Refs #1317
2018-03-19 13:17:00 +03:00
Anton Kaliaev
5fab8e404d
replace magic number with blocksToContributeToBecomeGoodPeer const
...
Refs #1317
2018-03-19 13:16:56 +03:00
Ethan Buchman
ab7dea4f20
consensus: return from errors sooner in addVote
2018-03-18 23:09:04 +01:00
Ethan Buchman
b297efb532
consensus: return from go-routine in test
2018-03-18 23:05:04 +01:00
Anton Kaliaev
86ddf17db0
add a todo
...
Refs #1281
2018-03-15 11:58:20 +04:00
Anton Kaliaev
a655500047
fix copy-pasted comment [ci skip]
2018-03-15 11:58:20 +04:00
Anton Kaliaev
714f885dac
mark peer as good if it contributed enough votes or block parts
...
Refs #1147
2018-03-15 11:58:20 +04:00
Anton Kaliaev
b0d8f552c5
return err if peer has sent a vote that does not match our round
2018-03-15 11:58:20 +04:00
Anton Kaliaev
63cb69cb96
comment out ErrAddingVote because it breaks byzantine_test
2018-03-15 11:58:20 +04:00
Anton Kaliaev
266974cb59
stop peer if it sends invalid vote
2018-03-15 11:58:20 +04:00
Anton Kaliaev
4242352852
stop peer on decoding error
2018-03-15 11:58:19 +04:00
Ethan Frey
fff0c6cd8e
Add app_state from genesis file in InitChain message
2018-03-02 03:46:04 -05:00
Ethan Buchman
5378bfc5c7
types.SignBytes -> o.SignBytes
2018-03-02 01:50:17 -05:00
Ethan Buchman
ca3655a409
types: p2pID -> P2PID
2018-03-02 01:42:56 -05:00
Zarko Milosevic
d4e93a6de3
Separate ValidBlock rule from unlocking rule
2018-03-01 11:42:22 +01:00
Zarko Milosevic
4670857c15
Add support for ValidBlock mechanism for the simplest case
2018-03-01 11:42:22 +01:00
Zach
2cc63069c6
rename dummy to kvstore ( #1223 )
...
* remove accidental binary
* docs: s/Dummy&dummy/KVStore&kvstore/g
* glide update to abci
* update abci import paths
* dummy begone, hello kvstore
* RequestInitChain needs genesisBytes
* glide update
2018-02-27 18:01:10 +04:00
Zach Ramsay
3cd604562c
RequestInitChain needs genesisBytes
2018-02-21 03:43:47 +00:00
Anton Kaliaev
2a24ae90c1
fixes from Jae's review
...
1. remove pointer
2. add Quit() method to Service interface
2018-02-12 14:32:09 +04:00
Ethan Buchman
d34286c421
minor fixes - tests pass
2018-02-03 03:54:49 -05:00
Ethan Buchman
e7747f7d66
it compiles
2018-02-03 03:52:17 -05:00
Ethan Buchman
cd0fd06b0d
update for sdk2 libs. need to fix kv test
...
NOTE we only updating for tmlibs and abci
2018-02-03 03:35:02 -05:00
Ethan Buchman
ab13806276
consensus: print go routines in failed test
2018-01-25 01:22:53 -05:00
Ethan Buchman
3ae26bd6e6
consensus: fix SetLogger in tests
2018-01-24 23:34:57 -05:00
Ethan Buchman
87087b8acd
consensus: minor cosmetic
2018-01-23 21:41:13 -05:00
Ethan Buchman
ee674f919f
StopPeerForError in blockchain and consensus
2018-01-21 13:32:04 -05:00
Ethan Buchman
6f3d9b4be3
fix race
2018-01-19 01:36:52 -05:00
Ethan Buchman
f06cc6630b
mempool: cfg.CacheSize and expose InitWAL
2018-01-19 01:03:03 -05:00
Ethan Buchman
8171628ee5
make tests run faster
2018-01-19 00:59:09 -05:00
Ethan Buchman
1cb76625d3
consensus: rename test funcs
2018-01-19 00:59:09 -05:00
Ethan Buchman
b1485b181a
Merge branch 'p2p-consolidate' into p2p-id
2018-01-13 15:20:23 -05:00
Zach
e0e600df05
Merge branch 'develop' into config
2018-01-06 05:30:38 +00:00
Ethan Buchman
a17105fd46
p2p: peer.Key -> peer.ID
2018-01-01 22:39:05 -05:00
Ethan Buchman
ff99ca7cdf
bump wal test timeout
2017-12-29 17:51:13 -05:00
Ethan Buchman
6112578d07
ValidateBlock is a method on blockExec
2017-12-28 23:15:54 -05:00
Ethan Buchman
ae68fcb78a
move fireEvents to ApplyBlock
2017-12-28 23:15:54 -05:00
Ethan Buchman
1d6f00859d
fixes from review
2017-12-28 23:15:54 -05:00
Ethan Buchman
537b0dfa1a
use NopEventBus
2017-12-28 23:15:54 -05:00
Ethan Buchman
0acca7fe69
final updates for state
2017-12-28 23:15:54 -05:00
Ethan Buchman
f55135578c
state: move methods to funcs
2017-12-28 23:15:54 -05:00
Ethan Buchman
a8e625e99d
config: unexpose chainID
2017-12-28 20:49:02 +00:00
Zach Ramsay
9da5cd0180
rebase fix
2017-12-28 20:49:02 +00:00
Zach Ramsay
70ba608850
config: write all default options to config file
...
config: test the default file
docs: spiff up config
config: minor fixes & comments
config: simplify test
config; use a seperate config directory, #556
config: update docs & parameterize file paths
config: PR comments
config: use the default object
fix a rebase error
2017-12-28 20:49:02 +00:00
Anton Kaliaev
75182f7205
change directory for each call, not only for each test
...
Fixes #1026
2017-12-28 11:17:15 -06:00
Ethan Buchman
7d81a3f4a5
address some comments from review
2017-12-27 01:27:03 -05:00
Ethan Buchman
6a4fd46479
fixes from rebase
2017-12-26 20:42:34 -05:00
Ethan Buchman
1d021c2790
update consensus/test_data/many_blocks.cswal
2017-12-26 20:27:40 -05:00
Ethan Buchman
869d873d5c
state.ApplyBlock takes evpool and calls MarkEvidenceAsCommitted
2017-12-26 20:27:32 -05:00
Ethan Buchman
7a18fa887d
evidence linked with consensus/node. compiles
2017-12-26 20:26:21 -05:00
Ethan Buchman
f7731d38f6
some comments and cleanup
2017-12-26 20:25:14 -05:00
Ethan Buchman
10c43c9edc
introduce evidence store
2017-12-26 20:25:14 -05:00
Ethan Buchman
fe4b53a463
EvidencePool
2017-12-26 20:24:54 -05:00
Ethan Buchman
7d086e9524
check if we already have evidence
2017-12-26 20:21:17 -05:00
Ethan Buchman
6e9433c7a8
post rebase fix
2017-12-26 20:21:17 -05:00
Ethan Buchman
39299e5cc1
consensus: note about duplicate evidence
2017-12-26 20:21:17 -05:00
Ethan Buchman
4661c98c17
add pubkey to conflicting vote evidence
2017-12-26 20:21:17 -05:00
Ethan Buchman
7928659f70
track evidence, include in block
2017-12-26 20:21:17 -05:00
Ethan Buchman
f80f6445a6
fix test
2017-12-26 20:15:09 -05:00
Ethan Buchman
4171bd3bae
fixes
2017-12-26 19:24:45 -05:00
Ethan Buchman
d844799b3b
Merge branch '950-enforce-less-13-val-changes-per-block' into develop
2017-12-26 19:22:21 -05:00
Ethan Buchman
289d92c97d
consensus: remove log stmt. closes #987
2017-12-26 10:41:31 -05:00
Anton Kaliaev
0093f9877a
change voting power change, not number of vals
2017-12-25 17:49:36 -06:00
Anton Kaliaev
cf0b5d3715
enforce <1/3 validator updates
...
Refs #950
2017-12-25 12:10:53 -06:00
Ethan Buchman
38608b1b0f
comment and tmlibs fix
2017-12-21 18:32:40 -05:00
Ethan Buchman
3d00c477fc
separate block vs state based validation
2017-12-21 16:49:47 -05:00
Anton Kaliaev
843e1ed400
Updates -> ValidatoSetUpdates
2017-12-19 13:03:39 -06:00
Ethan Frey
960b25408f
Store LastConsensusHash in State as well
...
Update all BlockValidation that it matches the last state
2017-12-19 12:28:08 -05:00
Ethan Frey
d151e36ea8
Add ConsensusHash to header
2017-12-19 12:28:08 -05:00
Ethan Buchman
e0fe84a856
Merge branch 'develop' into 977-wal-generator
2017-12-19 11:11:26 -05:00
Ethan Buchman
cb3ac6987e
remove some debugs
2017-12-19 10:11:37 -05:00
Anton Kaliaev
5a83e58428
stop eventBus
2017-12-17 20:16:02 -06:00
Anton Kaliaev
3f02ab0ead
unidirectional channel
2017-12-16 22:20:07 -06:00
Anton Kaliaev
99c58fc561
enable logging for wal_generator and set timeout to 1 min
...
Refs #977
2017-12-16 21:59:10 -06:00
Ethan Buchman
a86df17ceb
crank city
2017-12-16 19:55:04 -05:00
Ethan Buchman
5d04ccbe51
excessive logging. update tmlibs for timer fix
2017-12-16 19:16:08 -05:00
Ethan Buchman
0ec7909ec3
more logging in p2p and consensus
2017-12-16 13:36:52 -05:00
Anton Kaliaev
f8f28c8942
enable logging for wal_generator and set timeout to 1 min
...
Refs #977
2017-12-15 16:15:09 -06:00
Ethan Buchman
eddabab5e4
Merge pull request #965 from tendermint/573-handle-corrupt-wal-file
...
Handle corrupt WAL file
2017-12-15 14:33:16 -05:00
Anton Kaliaev
d669816a1b
send absent validators in BeginBlock
...
Refs #668
2017-12-15 12:13:02 -06:00
Anton Kaliaev
e40689b9cc
PanicCrisis is deprecated
2017-12-15 11:59:45 -06:00
Anton Kaliaev
709cf18aef
add gofuzz test for consensus wal
2017-12-15 11:56:24 -06:00
Anton Kaliaev
e57cad6c3f
correct maxMsgSizeBytes
2017-12-15 11:42:53 -06:00
Anton Kaliaev
b78606d94f
Merge pull request #967 from tendermint/feature/total-tx
...
Add TotalTx to block header
2017-12-13 17:09:48 -06:00
Anton Kaliaev
0a2ecaa393
Merge pull request #953 from tendermint/feature/time-fields
...
Add Timestamp to Proposal/Vote
2017-12-13 12:18:55 -06:00
Ethan Frey
dedf03bb81
Add TotalTx to block header, issue #952
...
Update state to keep track of this info.
Change function args as needed.
Make NumTx also an int64 for consistency.
2017-12-13 12:20:53 +01:00
Anton Kaliaev
06aece31cf
lower the max message size
2017-12-12 13:02:40 -06:00
Ethan Buchman
e0296d6c3c
consensus: fix makeBlockchainFromWAL
2017-12-12 12:14:15 -05:00
Ethan Frey
a29c781295
Add default timestamp to all instances of *types.Vote
2017-12-12 12:59:51 +01:00
Anton Kaliaev
af79a2a59e
fix error msg
2017-12-11 19:50:05 -06:00
Anton Kaliaev
ee66476d62
set max msg size
...
otherwise, it is easy to get OutOfMemory panic (somebody can even expoit
this)
2017-12-11 19:48:57 -06:00
Anton Kaliaev
40f9261d48
handle data corruption errors
...
Refs #573
2017-12-11 19:48:20 -06:00
Anton Kaliaev
b2385b46cf
wait 5 sec for a block on CircleCI
...
Fixes:
```
--- FAIL: TestHandshakeReplaySome (12.40s)
replay_test.go:332: waited too long for tendermint to produce 6 blocks
```
2017-12-11 16:22:27 -06:00
Ethan Buchman
e7b9cd8ee8
Merge branch 'develop' into 785-wal-improvements
2017-12-10 19:45:52 -05:00
Ricardo Domingos
59e89e7664
consensus: Fix typo on ticker.go documentation
2017-12-09 13:14:53 +01:00
Anton Kaliaev
90944bb1a2
be specific about what type we're encoding
...
to be consistent with Decode, which returns TimedWALMessage
2017-12-07 11:45:50 -06:00
Anton Kaliaev
07571741c5
[consensus] remove WAL separator (Refs #785 )
...
We don't really need a separator unless we have complex structures
(rows, cells like RDBMS have https://www.sqlite.org/fileformat.html ).
2017-12-07 11:36:46 -06:00
Anton Kaliaev
5cb936fa00
fixes after my own review
2017-12-06 18:28:14 -06:00
Anton Kaliaev
c6f025f40e
generate WAL on the fly (Refs #468 )
2017-12-06 16:01:08 -06:00