Anton Kaliaev
3ffda994c2
Revert "rename privval#GetAddress and GetPubKey to Address and PubKey"
This reverts commit 58d0c8de89
.
6 years ago
Anton Kaliaev
ff8ddee708
rename privval#GetAddress and GetPubKey to Address and PubKey
6 years ago
Zach Ramsay
44dad6d70b
Revert "detele everything"
This reverts commit d02c5d1e30
.
6 years ago
Zach Ramsay
d02c5d1e30
detele everything
6 years ago
Ethan Buchman
d55243f0e6
fix import paths
6 years ago
Liamsi
d2c05bc5b9
Revert "delete everything" (includes everything non-go-crypto)
This reverts commit 96a3502
7 years ago
Liamsi
96a3502126
delete everything
7 years ago
Jae Kwon
ff5dfc0c15
Add more comments for Valid*
7 years ago
Ethan Buchman
e9804d76cf
fixes from review
7 years ago
Ethan Buchman
a41f0d3891
rpc: /consensus_state for simplified output
7 years ago
Ethan Buchman
658060150c
rpc: add voting power totals to vote bitarrays
7 years ago
Ethan Buchman
f33da8817a
rpc: lower_case peer_round_states, use a list, add the node_address
7 years ago
Jae Kwon
65ebbccb74
Add GoAmino DeepCopy() benchmark for RoundState
7 years ago
Ethan Buchman
f67c5a9e7b
forgot wire.go file
7 years ago
Ethan Buchman
a2d77cbe4e
add MarshalJSON methods to fix dump_consensus_state
7 years ago
Ethan Buchman
94c016a04e
use MarshalJSONIndent for init files. closes #1506
7 years ago
Jae Kwon
b20e777f53
lower_case json field names
7 years ago
Anton Kaliaev
cca1dd8e3e
removed excessive comment
Refs https://github.com/tendermint/tendermint/pull/1446#discussion_r180353446
7 years ago
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
```
7 years ago
Jae Kwon
196f8410ba
WIP commit; Fix types/results_test
7 years ago
Anton Kaliaev
b0d8f552c5
return err if peer has sent a vote that does not match our round
7 years ago
Ethan Buchman
ca3655a409
types: p2pID -> P2PID
7 years ago
Zarko Milosevic
4670857c15
Add support for ValidBlock mechanism for the simplest case
7 years ago
Ethan Buchman
ee674f919f
StopPeerForError in blockchain and consensus
7 years ago
Ethan Buchman
a17105fd46
p2p: peer.Key -> peer.ID
7 years ago
Ethan Buchman
a8e625e99d
config: unexpose chainID
7 years ago
Ethan Buchman
fe4b53a463
EvidencePool
7 years ago
Ethan Buchman
6e9433c7a8
post rebase fix
7 years ago
Ethan Frey
a29c781295
Add default timestamp to all instances of *types.Vote
7 years ago
Anton Kaliaev
922af7c405
int64 height
uint64 is considered dangerous. the details will follow in a blog post.
7 years ago
Anton Kaliaev
b3492356e6
uint64 height (Refs #911 )
7 years ago
Ethan Buchman
4b9dfc8990
consensus: fix for initializing block parts during catchup
7 years ago
Ethan Buchman
47f5e37205
copy RoundState for event
7 years ago
Anton Kaliaev
6d18e2f447
do not send whole round state via eventHub
Fixes
```
WARNING: DATA RACE
Write at 0x00c4200715b8 by goroutine 24:
github.com/tendermint/tendermint/consensus.(*ConsensusState).enterPrevote.func1()
/go/src/github.com/tendermint/tendermint/consensus/state.go:359 +0x3f
github.com/tendermint/tendermint/consensus.(*ConsensusState).enterPrevote()
/go/src/github.com/tendermint/tendermint/consensus/state.go:897 +0x8de
github.com/tendermint/tendermint/consensus.(*ConsensusState).addProposalBlockPart()
/go/src/github.com/tendermint/tendermint/consensus/state.go:1303 +0x701
github.com/tendermint/tendermint/consensus.(*ConsensusState).handleMsg()
/go/src/github.com/tendermint/tendermint/consensus/state.go:560 +0x88c
github.com/tendermint/tendermint/consensus.(*ConsensusState).receiveRoutine()
/go/src/github.com/tendermint/tendermint/consensus/state.go:525 +0x6d2
Previous read at 0x00c4200715b8 by goroutine 19:
github.com/tendermint/tendermint/consensus.makeRoundStepMessages()
/go/src/github.com/tendermint/tendermint/consensus/reactor.go:415 +0x192
github.com/tendermint/tendermint/consensus.(*ConsensusReactor).broadcastNewRoundStep()
/go/src/github.com/tendermint/tendermint/consensus/reactor.go:377 +0x3c
github.com/tendermint/tendermint/consensus.(*ConsensusReactor).broadcastNewRoundStepsAndVotes.func1()
/go/src/github.com/tendermint/tendermint/consensus/reactor.go:350 +0x275
```
7 years ago
Anton Kaliaev
dc0e8de9b0
extract some of the consensus types into ./types
so they can be used in rpc/core/types/responses.go.
```
So, it seems like we could use the actual structs here, but we don't want to have to import consensus to get them, as then clients are importing too much crap. So probably we should move some types from consensus into consensus/types so we can import.
Will these raw messages be identical to:
type ResultDumpConsensusState struct {
RoundState cstypes.RoundState
PeerRoundStates map[string]cstypes.PeerRoundState
}
```
https://github.com/tendermint/tendermint/pull/724#discussion_r143598193
7 years ago
Jae Kwon
1b9fd811a1
RPCResponse.Result && EventData are registered interfaces; -skip_upnp option
9 years ago
Jae Kwon
3be3647dc8
tendermint/binary -> tendermint/wire
9 years ago
Jae Kwon
1e7cc32597
tendermint/account -> acm
9 years ago
Ethan Buchman
dc7b912881
crypto byte arrays are fixed length
9 years ago
Jae Kwon
9965dd5de6
uint* to int* whereever appropriate; https://www.reddit.com/r/golang/comments/2q5vdu/int_vs_uint/
10 years ago
Jae Kwon
9e1794eaea
Fixed tests
10 years ago
Jae Kwon
9b96e2e171
ProposalPOLRound...
10 years ago
Jae Kwon
01b5540ffe
consensus/state is 2-step asynchronous
10 years ago
Ethan Buchman
41502e05c1
chain_id written as string not hex in WriteSignBytes
10 years ago
Ethan Buchman
2045aee9cd
pass chainID through sign interfaces
10 years ago
Ethan Buchman
8a2d9525f0
network > chain_id, put in genesis.json
10 years ago
Jae Kwon
489bf767cb
importing tendermint/config/tendermint_test applies the test config
10 years ago
Jae Kwon
75ef479547
Config is passed into each module. Remove tendermint/confer
10 years ago
Jae Kwon
85c8850ac2
Config names have no dots, are under_scored.
10 years ago
Jae Kwon
b92c0401e6
Made all JSON fields lower_case
10 years ago