Author | SHA1 | Message | Date |
---|---|---|---|
Sam Kleinman |
dbfd6fc613
|
consensus: reduce shared state in tests (#6313) | 4 years ago |
Marko |
efd2fde474
|
privval: add ctx to privval interface (#6240)
## Description - Add `context.Context` to Privval interface This pr does not introduce context into our custom privval connection protocol because this will be removed in the next release. When this pr is released. |
4 years ago |
Aleksandr Bezobchuk |
16bbe8c862
|
consensus: p2p refactor (#5969) | 4 years ago |
Alessio Treglia |
0de4bec862
|
use Cleanup(),TempDir() in test cases (#5723)
Replace defer with t.Cleanup(). Replace the combination of ioutil.TempDir, error checking and defer os.RemoveAll() with Go testing.T's new TempDir() helper. Mark auxiliary functions as test helpers. |
4 years ago |
Marko |
b8d08b9ef4
|
lint: add errchecks (#5316)
## Description Work towards enabling errcheck ref #5059 |
4 years ago |
Anton Kaliaev | 480b995a31 |
consensus: Do not allow signatures for a wrong block in commits
Closes #4926 The dump consensus state had this: "last_commit": { "votes": [ "Vote{0:04CBBF43CA3E 385085/00/2(Precommit) 1B73DA9FC4C8 42C97B86D89D @ 2020-05-27T06:46:51.042392895Z}", "Vote{1:055799E028FA 385085/00/2(Precommit) 652B08AD61EA 0D507D7FA3AB @ 2020-06-28T04:57:29.20793209Z}", "Vote{2:056024CFA910 385085/00/2(Precommit) 652B08AD61EA C8E95532A4C3 @ 2020-06-28T04:57:29.452696998Z}", "Vote{3:0741C95814DA 385085/00/2(Precommit) 652B08AD61EA 36D567615F7C @ 2020-06-28T04:57:29.279788593Z}", Note there's a precommit in there from the first val from May (2020-05-27) while the rest are from today (2020-06-28). It suggests there's a validator from an old instance of the network at this height (they're using the same chain-id!). Obviously a single bad validator shouldn't be an issue. But the Commit refactor work introduced a bug. When we propose a block, we get the block.LastCommit by calling MakeCommit on the set of precommits we saw for the last height. This set may include precommits for a different block, and hence the block.LastCommit we propose may include precommits that aren't actually for the last block (but of course +2/3 will be). Before v0.33, we just skipped over these precommits during verification. But in v0.33, we expect all signatures for a blockID to be for the same block ID! Thus we end up proposing a block that we can't verify. |
5 years ago |