Commit Graph

3604 Commits

Author SHA1 Message Date
Alexander Simmerl 79315efd1f
Merge pull request #1341 from EugeneChung/develop
Remove unnecessary bytes.Compare() call
2018-03-20 16:27:06 +01:00
Eugene Chung a61130aebb
Remove unnecessary bytes.Compare() call 2018-03-20 23:43:18 +09:00
Alexander Simmerl 5a51a0ba06
Merge pull request #1337 from tendermint/1296-follow-up
Follow up for /health endpoint
2018-03-20 10:36:47 +01:00
Ethan Buchman 0d0b56739d
Merge pull request #1335 from tendermint/zarko/1146-improve-bft-time-spec
Improve BFT time spec
2018-03-20 01:00:34 +01:00
Ethan Buchman eb1816c9ff
Merge pull request #1338 from tendermint/1266/xla-fix-flaky-testswitchreconnectstopersistentpeer
p2p: Keep reference to connections in test peer
2018-03-20 00:14:38 +01:00
Alexander Simmerl 50ae892d5e
p2p: Keep reference to connections in test peer
We observed non-deterministic test failures in one of our switch tests,
which would happen if the GC would run between iterations of the accept
loop. As we don't hold any reference to the connection the setup
finalizer might get triggered and therefore the file handle closed. For
the curious check the references on finalizers and the variable scoping
in the spec:

https://groups.google.com/forum/#!topic/golang-nuts/xWkhGJ5PY6c
https://groups.google.com/forum/#!topic/golang-nuts/d8aF4rAob7U/discussion
https://golang.org/ref/spec#Declarations_and_scope

Fixes #1266
2018-03-19 20:35:12 +01:00
Zarko Milosevic 5a79b3d74a Improve the spec to make explicit median computation based on voting power 2018-03-19 19:10:02 +01:00
Anton Kaliaev 460599ef75
fix comment 2018-03-19 20:01:43 +03:00
Anton Kaliaev 830bb72d6f
add Health method to clients
Refs #1296
2018-03-19 20:01:43 +03:00
Anton Kaliaev b11c26cc1c
update CHANGELOG 2018-03-19 19:53:28 +03:00
Constantine 152290db7e Add `\health` rpc endpoint (#1306)
* Init `\health` rpc endpoint

* remove additional info from `\health` rpc endpoint

* Cleanup imports

* Added time threshold for health check

* Update rpc doc

* Remove unnecessary checks for blocktime creation lag

* Clean up of unnecessary config usage
2018-03-19 19:39:37 +03:00
Ethan Buchman 20b198681b
Merge pull request #1328 from tendermint/bucky/add-vote-readability
addVote readability
2018-03-19 12:24:28 +01:00
Ethan Buchman 2bf106a1b3
Merge pull request #1333 from tendermint/1244-follow-up
consensus: fix tracking for MarkGood
2018-03-19 12:19:16 +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 d8b08cd943
return back panic in peer#onReceive
Refs #1317
2018-03-19 13:19:05 +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
Anton Kaliaev 701df09971
do not use keywords
Refs #1317
2018-03-19 13:16:02 +03:00
Ethan Buchman d350da3135 config: fix private_peer_ids 2018-03-18 23:55:44 +01: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
Ethan Buchman eaabdb5cac
Merge pull request #1282 from tendermint/1126-private-peers
private peers
2018-03-18 22:53:57 +01:00
racin 066aee3045 Documentation: The character for 1/3 fraction could not be rendered in PDF on readthedocs. (#1326) 2018-03-18 22:44:38 +03:00
Ethan Buchman ff1ec0260e
Merge pull request #1318 from tendermint/bucky/testnet-cmd-fix
testnet cmd: ensure config dir exists. closes #1290
2018-03-17 00:05:30 +01:00
Emmanuel T Odeke 7cb3188fbc testnet cmd: ensure config dir exists. closes #1290 2018-03-16 14:26:43 +01:00
Alexander Simmerl 9b9022f8df privVal: Improve SocketClient network code (#1315)
Follow-up to feedback from #1286, this change simplifies the connection
handling in the SocketClient and makes the communication via TCP more
robust. It introduces the tcpTimeoutListener to encapsulate accept and
i/o timeout handling as well as connection keep-alive, this type could
likely be upgraded to handle more fine-grained tuning of the tcp stack
(linger, nodelay, etc.) according to the properties we desire. The same
methods should be applied to the RemoteSigner which will be overhauled
when the priv_val_server is fleshed out.

* require private key
* simplify connect logic
* break out conn upgrades to tcpTimeoutListener
* extend test coverage and simplify component setup
2018-03-16 16:32:17 +04:00
Ethan Buchman 68e049d3af
Merge pull request #1244 from tendermint/1147-using-mark-good-and-stop-peer-for-error
Using MarkGood and StopPeerForError
2018-03-15 18:58:29 +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 bcf54b0aa3
PanicSanity is deprecated 2018-03-15 11:58:20 +04:00
Anton Kaliaev d86855ad7a
stop peer if it sends us msg with unknown channel 2018-03-15 11:58:20 +04:00
Anton Kaliaev d0c67bbe16
stop peer if evidence is not valid 2018-03-15 11:58:20 +04:00
Anton Kaliaev 4242352852
stop peer on decoding error 2018-03-15 11:58:19 +04:00
Anton Kaliaev f299689573
return back defaultChannelCapacity 2018-03-15 11:58:19 +04:00
Anton Kaliaev baf457e6d4
return error if peer sent us a block we didn't expect with a height too far ahead/behind 2018-03-15 11:58:19 +04:00
Anton Kaliaev 0c7e871ef0
[blockchain] replace timeoutsCh with more abstract errorsCh 2018-03-15 11:58:19 +04:00
Anton Kaliaev 87ce804b4a
cmn.PanicSanity is deprecated 2018-03-15 11:58:19 +04:00
Anton Kaliaev 2a258a2c3f
revert removing private peers from persistent 2018-03-15 11:55:30 +04:00
Anton Kaliaev a40518c7da
revert adding dial_peers's private flag 2018-03-15 11:55:30 +04:00
Anton Kaliaev 31deaa4a79
fix broken merge 2018-03-15 11:55:30 +04:00
Anton Kaliaev 736ea055a8
add a test for pex reactor 2018-03-15 11:55:30 +04:00
Anton Kaliaev a39aec0bae
rename private_peers to private_peer_ids to distinguish from peers 2018-03-15 11:55:30 +04:00
Anton Kaliaev 8bef3eb1f4
private peers
Refs #1126
2018-03-15 11:55:29 +04:00
Ethan Buchman 244d88dfda
Merge pull request #1314 from tendermint/add-go-amino-as-source-to-wire
Add go amino as source to wire
2018-03-15 01:10:38 +01:00