31 Commits

Author SHA1 Message Date
Ethan Frey
a29c781295 Add default timestamp to all instances of *types.Vote 2017-12-12 12:59:51 +01:00
Anton Kaliaev
922af7c405
int64 height
uint64 is considered dangerous. the details will follow in a blog post.
2017-12-01 19:04:53 -06:00
Anton Kaliaev
b3492356e6 uint64 height (Refs #911) 2017-12-01 17:17:22 -05:00
Ethan Buchman
4b9dfc8990 consensus: fix for initializing block parts during catchup 2017-11-09 18:14:41 +00:00
Ethan Buchman
47f5e37205 copy RoundState for event 2017-11-07 23:57:23 +00:00
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
```
2017-10-30 00:32:23 -05:00
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
2017-10-10 12:39:21 +04:00
Jae Kwon
1b9fd811a1 RPCResponse.Result && EventData are registered interfaces; -skip_upnp option 2015-08-11 11:01:18 -07:00
Jae Kwon
3be3647dc8 tendermint/binary -> tendermint/wire 2015-07-28 12:18:17 -07:00
Jae Kwon
1e7cc32597 tendermint/account -> acm 2015-07-19 09:40:55 -07:00
Ethan Buchman
dc7b912881 crypto byte arrays are fixed length 2015-07-17 17:19:16 -04:00
Jae Kwon
9965dd5de6 uint* to int* whereever appropriate; https://www.reddit.com/r/golang/comments/2q5vdu/int_vs_uint/ 2015-06-25 20:28:34 -07:00
Jae Kwon
9e1794eaea Fixed tests 2015-06-24 14:04:40 -07:00
Jae Kwon
9b96e2e171 ProposalPOLRound... 2015-06-22 19:04:31 -07:00
Jae Kwon
01b5540ffe consensus/state is 2-step asynchronous 2015-06-19 15:30:21 -07:00
Ethan Buchman
41502e05c1 chain_id written as string not hex in WriteSignBytes 2015-05-30 20:20:04 -04:00
Ethan Buchman
2045aee9cd pass chainID through sign interfaces 2015-05-29 18:14:19 -04:00
Ethan Buchman
8a2d9525f0 network > chain_id, put in genesis.json 2015-05-29 18:14:19 -04:00
Jae Kwon
489bf767cb importing tendermint/config/tendermint_test applies the test config 2015-05-17 16:19:58 -07:00
Jae Kwon
75ef479547 Config is passed into each module. Remove tendermint/confer 2015-05-17 16:19:57 -07:00
Jae Kwon
85c8850ac2 Config names have no dots, are under_scored. 2015-05-12 17:40:29 -07:00
Jae Kwon
b92c0401e6 Made all JSON fields lower_case 2015-05-01 17:26:49 -07:00
Jae Kwon
5366d808ba Proposal WriteSignBytes is JSON 2015-04-27 21:06:36 -07:00
Jae Kwon
2ba6f86f2e Add Network to SignBytes, to prevent network clashes 2015-04-20 23:59:52 -07:00
Jae Kwon
13b6508ecd Package import path change 2015-04-01 17:30:16 -07:00
Ethan Buchman
60f166e823 tendermint2 2015-03-31 15:33:31 -07:00
Jae Kwon
87e1f76324 tendermint/block -> tendermint/types and tendermint/blockchain 2015-03-22 19:00:08 -07:00
Jae Kwon
0a6c28c2da block module -> import as blk 2015-01-15 22:43:15 -08:00
Jae Kwon
135894ea88 Dot import -> named import
Changed modulename_ to short module names
Also removed Unreader, replaced with PrefixdReader in select locations
2015-01-14 20:34:53 -08:00
Jae Kwon
383335d93c Added README docs for account/binary and renamed UInt -> Uint etc. 2014-12-22 18:10:17 -08:00
Jae Kwon
61d1635085 Fixed tests 2014-12-21 21:47:38 -08:00