Ethan Buchman
4bab34ae45
Merge pull request #2088 from tendermint/bucky/fix-evidence-test
...
consensus: Fix test for blocks with evidence
2018-07-27 14:06:12 -04:00
Ethan Buchman
fe5b0d7074
consensus: fix test for blocks with evidence
2018-07-27 14:00:05 -04:00
Anton Kaliaev
96ae535fb8
proto3 timestamp ( #2064 )
...
This PR changes ABCI time format from int64 (Unix seconds) to WKT (WellKnownType) google.protobuf.Timestamp.
Refs #1857
Reasons:
better precision
standard DT for proto
* update Gopkg.lock
* [makefile] remove extra grep
- go list excludes vendor by default now
* proto3 timestamp
* [docs/abci-spec] note about serialisation format
* make time non-nullable
2018-07-27 04:23:19 +02:00
Jae Kwon
d542d2c394
Fix 0.22.7, bump to 0.22.8
2018-07-26 18:08:09 -07:00
Ethan Buchman
0e127562bf
register evidence interface wherever its used
2018-07-26 18:53:19 -04:00
Ethan Buchman
6046b99197
consensus: include evidence in proposed block parts. fixes #2050
2018-07-24 21:58:39 -04:00
Ethan Buchman
ea31c4836a
Merge branch 'develop' into jae/literefactor4
2018-07-23 23:28:14 -04:00
Anton Kaliaev
94e8252607
#2021 follow up ( #2028 )
...
* update changelog
* txAvailable is always true
Refs #2021 , #1920
* remove debug message
No additional value. `enterPropose` log message should be enough.
Refs #2021 , #1920
2018-07-23 16:47:15 +04:00
srmo
e36ce6f893
fix race condition on proposal height for published txs ( #2021 )
...
* #1920 try to fix race condition on proposal height for published txs
- related to create_empty_blocks=false
- published height for accepted tx can be wrong (too low)
- use the actual mempool height + 1 for the proposal
- expose Height() on mempool
* #1920 add initial test for mempool.Height()
- not sure how to test the lock
- can the mutex reference be of type Locker?
-- this way, we can use a "mock" of the mutex to test triggering
* #1920 use the ConsensusState height in favor of mempool
- gets rid of indirections
- doesn't need any "+1" magic
* #1920 cosmetic
- if we use cs.Height, it's enough to evaluate right before propose
* #1920 cleanup TODO and non-needed code
* #1920 add changelog entry
2018-07-23 15:34:45 +04:00
ValarDragon
17c0029233
Merge remote-tracking branch 'origin/develop' into dev/refactor_crypto
2018-07-20 08:59:41 -07:00
Alexander Simmerl
ed8714e40c
Merge pull request #1965 from tendermint/693-part-2
...
make Block Header and Data non-pointers
2018-07-20 17:42:42 +02:00
Anton Kaliaev
5037dd40c5
use RWMutex for consensus state
...
allows multiple RPC requests to query consensus state
Refs #1772
2018-07-19 10:49:12 +04:00
ValarDragon
99e582d79a
crypto: Refactor to move files out of the top level directory
...
Currently the top level directory contains basically all of the code
for the crypto package. This PR moves the crypto code into submodules
in a similar manner to what `golang/x/crypto` does. This improves code
organization.
Ref discussion: https://github.com/tendermint/tendermint/pull/1966
Closes #1956
2018-07-18 08:38:44 -07:00
Ethan Buchman
c66e1514de
Merge branch 'develop' into 693-ensure-types-are-covered
2018-07-14 13:02:42 +01:00
Ethan Buchman
9b0b0b02d0
consensus: wait on stop if not fastsync
2018-07-14 12:53:54 +01:00
Anton Kaliaev
270659f03f
make Block Header and Data non-pointers
...
make BlockMeta Header a non-pointer
Refs #693
2018-07-13 12:05:54 +04:00
Anton Kaliaev
3ffda994c2
Revert "rename privval#GetAddress and GetPubKey to Address and PubKey"
...
This reverts commit 58d0c8de89bcc6c081c5b33683c2d0a4e1f83eef.
2018-07-12 22:40:07 +04:00
Anton Kaliaev
ff8ddee708
rename privval#GetAddress and GetPubKey to Address and PubKey
2018-07-12 22:40:06 +04:00
Anton Kaliaev
b271c40783
remove deprecated `app_options` field from genesis
2018-07-12 22:40:05 +04:00
Ethan Buchman
223095d12f
remove Wait from consensus reactor OnStop
2018-07-10 09:48:01 -04:00
Anton Kaliaev
9120fd5d14
unexport DecodeMessage functions
...
Refs #646
2018-07-09 13:01:23 +04:00
Anton Kaliaev
b242b15d40
wait until WAL closes the autogroup
...
Refs #1839
2018-07-04 13:59:16 +04:00
Ethan Buchman
5453aa6169
Merge branch 'develop' into jae/literefactor4
2018-07-02 14:57:30 -04:00
Ethan Buchman
d55243f0e6
fix import paths
2018-07-01 22:36:49 -04:00
Ethan Buchman
af703620d4
consensus: stop wal
2018-07-01 12:53:51 -04:00
Anton Kaliaev
f760c24ff0
[config] remove MaxBlockSizeTxs and MaxBlockSizeBytes in favor of consensus params
2018-06-29 12:40:32 +04:00
Jae Kwon
b51ed132f7
Fix test/p2p/pex circle tests; update consensus
2018-06-27 16:24:21 -07:00
Ethan Buchman
70d314312c
consensus: fix addProposalBlockPart
...
* When create_empty_blocks=false, we don't enterPropose until we
* receive a transaction, but if we then receive a complete proposal,
* we should enterPrevote. A guard in addProposalBlockPart was checking if
* step==Propose before calling enterPrevote, but we need it to be step<=Propose,
* since we may not have seen a tx.
* This was discovered by disabling mempool broadcast, sending txs to
* peers one a time, and observing their consensus logs.
2018-06-27 18:14:45 +04:00
Jae Kwon
8524a8da7f
Try to fix circle...
2018-06-27 04:22:30 -07:00
Jae Kwon
cfcbc61449
oops
2018-06-27 04:04:33 -07:00
Jae Kwon
9184733261
try it with new consensus?
2018-06-27 02:34:11 -07:00
Jae Kwon
37ef5485b4
Add logs to lite/*; Fix rpc status to return consensus height, not blockstore height
2018-06-26 16:53:06 -07:00
Jae Kwon
538c410bcd
Fixes from review
2018-06-25 18:16:16 -07:00
Jae Kwon
242a6037e8
Fixes from review
2018-06-25 17:12:52 -07:00
Jae Kwon
bf0ff212b9
Refactor "lite" to handle delayed validator set changes.
...
Also, fix consensus liveness issue.
2018-06-25 17:12:25 -07:00
Jae Kwon
a5b7ea93c4
Delay validator set changes by 1 block.
2018-06-25 16:59:00 -07:00
Alexander Simmerl
a605b66c5a
Move abci imports
2018-06-22 07:28:07 +02:00
Ethan Buchman
2b5229dd5e
Merge pull request #1782 from Liamsi/merge-city
...
Merge go-crypto into tendermint
2018-06-21 15:53:02 -07:00
Ethan Buchman
9cd9f3338b
Merge branch 'master' into develop
2018-06-21 12:57:09 -07:00
Liamsi
8329b86570
more changes from #1721
2018-06-20 20:25:08 -07:00
Liamsi
4fb40e5437
cherry pick @melekes changes
2018-06-20 20:04:43 -07:00
Liamsi
6677f81ffb
revert change from #1721
...
makes TestListener never quit
2018-06-20 17:48:04 -07:00
Liamsi
d2c05bc5b9
Revert "delete everything" (includes everything non-go-crypto)
...
This reverts commit 96a3502
2018-06-20 17:35:30 -07:00
Liamsi
96a3502126
delete everything
2018-06-20 15:19:08 -07:00
Anton Kaliaev
205d8b8062
fixes after @xla review
...
- move prometheus metrics into internal packages
- *Option structs
- misc. format changes
2018-06-20 12:40:25 +04:00
Anton Kaliaev
e4bb3566a0
move metrics constructors to a separate package
2018-06-20 12:40:25 +04:00
Anton Kaliaev
84812145cb
friendly apis for constructors
2018-06-20 12:40:25 +04:00
Anton Kaliaev
b10b0da3fd
bundle imports
2018-06-20 12:40:11 +04:00
Anton Kaliaev
7efb73aa18
mempool size metric
2018-06-20 12:38:45 +04:00
Anton Kaliaev
19699d644f
p2p metric, make height and totalTxs gauges
2018-06-20 12:38:45 +04:00
Anton Kaliaev
0cb50c05fc
add rounds metric
2018-06-20 12:38:45 +04:00
Anton Kaliaev
e58d674f4c
add validators power gauges
2018-06-20 12:38:45 +04:00
Anton Kaliaev
fad76e103b
extract metrics to provider, remove height label
2018-06-20 12:38:45 +04:00
Anton Kaliaev
489d9b9184
more metrics
2018-06-20 12:38:45 +04:00
Anton Kaliaev
3cdf3b670d
serve metrics under /metrics
2018-06-20 12:38:45 +04:00
Anton Kaliaev
5c869b5888
validator metrics
2018-06-20 12:38:45 +04:00
Anton Kaliaev
5c7093cc9f
go-kit metrics plus prometheus: one metric
2018-06-20 12:38:45 +04:00
Ethan Buchman
43745c83db
Merge branch 'release/v0.20.1' into develop
2018-06-20 00:08:51 -07:00
Ethan Buchman
a519825bf8
consensus: fixes #1754
...
* updateToState exits early if the state isn't new, which happens after
* fast syncing. This results in not sending a NewRoundStep message. The mempool
* reactor depends on PeerState, which is updated by NewRoundStep
* messages. If the peer never sends a NewRoundStep, the mempool reactor
* will think they're behind, and never forward transactions. Note this
* only happens when `create_empty_blocks = false`, because otherwise
* peers will move through the consensus state and send a NewRoundStep
* for a new step soon anyways. Simple fix is just to send the
* NewRoundStep message during updateToState even if exit early
2018-06-18 17:08:09 -07:00
ia
b5775b56c6
all: gofmt ( #1743 )
...
* all: gofmt
Run 'gofmt -w .' from project root.
* Update changelog to say that I ran gofmt
* Revert "Update changelog to say that I ran gofmt"
This reverts commit 956f133ff0354fd7338e7df7c823e6f98b655da6.
2018-06-15 02:03:50 +02:00
Ethan Buchman
9481cabd50
fixes from review
2018-06-06 20:45:20 -07:00
Ethan Buchman
8e45348737
update for abci v0.11.0 release. let InitChain update validators
2018-06-06 15:47:04 -07:00
Ethan Buchman
909f66e841
remove extra eventBus
2018-06-05 22:04:27 -07:00
Ethan Buchman
3d2c4fd309
update Evidence type - requires pubkey and valset to verify and convert to abci.Evidence
2018-06-05 22:04:26 -07:00
Ethan Buchman
866bcceb35
fix consensus tests
2018-06-05 22:00:25 -07:00
Ethan Buchman
7606b7595f
compiles
2018-06-05 22:00:25 -07:00
Ethan Buchman
825fdf2c24
Merge pull request #1679 from tendermint/flush-wal-on-stop
...
Flush cs.wal on stop
2018-06-05 17:14:19 -07:00
Ethan Buchman
3d33226e80
move types/services.go to state pkg. pass State to evpool.Update
2018-06-04 21:20:23 -07:00
Ethan Buchman
3445f1206e
Merge pull request #1683 from tendermint/bucky/test
...
fix byz-test
2018-06-04 21:09:10 -07:00
Ethan Buchman
097f778c1e
fix byz-test
2018-06-04 20:48:35 -07:00
Anton Kaliaev
1f22f34edf
flush wal group on stop
...
Refs #1659
Refs https://github.com/tendermint/tmlibs/pull/217
2018-06-04 16:47:44 +04:00
Alexander Simmerl
bf370d36c2
Extract priv_validator into first class package
...
This is a maintenance change to move the private validator package out
of the types and to a top-level location. There is no good reason to
keep it under the types and it will more clearly coommunicate where
additions related to the privval belong. It leaves the interface and the
mock in types for now as it would introduce circular dependency between
privval and types, this should be resolved eventually.
* mv priv_validator to privval pkg
* use consistent `privval` as import
Follow-up to #1255
2018-06-03 13:51:58 +02:00
Anton Kaliaev
708f35e5c1
do not look for height in older files if we've seen height - 1
...
Refs #1600
2018-05-25 15:11:15 +04:00
Anton Kaliaev
f3f5c7f472
we must only return io.EOF to progress to the next file in auto.Group
...
since we never write msg partially, if we've encountered io.EOF in the
middle of the msg, we must abort
2018-05-25 15:10:51 +04:00
Anton Kaliaev
68f6226bea
data is corrupted, but this requires manual intervention
...
i.e., can't be skipped
and we should only return DataCorruptionError if we can skip a msg safely
2018-05-25 15:10:51 +04:00
Anton Kaliaev
118b86b1ef
fix nil panic error
...
msg is nil and if we continue executing, we'll get nil exception at
`msg.Msg.(....)`
2018-05-25 15:10:51 +04:00
Anton Kaliaev
b9afcbe3a2
fix typo
2018-05-25 15:10:51 +04:00
Anton Kaliaev
a885af0826
Merge pull request #1574 from tendermint/847-separate-internal-pubsub
...
[pubsub] Prioritise internal subscribers (e.g. reactor) over external (e.g. RPC)
2018-05-24 21:09:56 +04:00
Ethan Buchman
3a947b0117
Merge pull request #1619 from tendermint/zach/cleaner-repo
...
clean up links & spec docs
2018-05-23 21:09:15 -04:00
Ethan Buchman
caf5afc084
Merge pull request #1520 from tendermint/bucky/p2p-same-ip
...
p2p: prevent connections from same ip
2018-05-23 20:57:17 -04:00
Zach Ramsay
b166831fb5
link to both consensus specs
2018-05-23 10:05:03 -04:00
Zach Ramsay
b4d10b5b91
consensus: link to spec from readme ( #1609 )
2018-05-23 09:41:54 -04:00
Anton Kaliaev
c6f612bfc3
subscribe before state emits NewRoundStep
...
I had to alter events package for that. Hope that's fine.
Refs #847
2018-05-21 10:51:47 +04:00
Anton Kaliaev
bb9aa85d22
copy events and pubsub packages from tmlibs
...
Refs #847
2018-05-21 10:51:47 +04:00
Anton Kaliaev
c4fef499b6
switch to events package
2018-05-21 10:50:55 +04:00
Anton Kaliaev
b77d5344fc
rename methods for clarity
2018-05-21 10:50:55 +04:00
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