Jasmina Malicevic
3ac1856579
linter error
2022-06-14 22:15:44 +02:00
Jasmina Malicevic
38b774601e
blocksync: verification refactored
2022-06-14 13:39:11 +02:00
Jasmina Malicevic
6f5978e906
blocksync: fixed bug if switching from statesync and no actual block in store
2022-05-24 17:13:05 +02:00
Jasmina Malicevic
e515dd4a8e
applied PR comment
2022-05-24 11:17:07 +02:00
Jasmina Malicevic
f8d3bf8e6d
Reverted increased test timeout
2022-05-24 11:13:39 +02:00
Jasmina Malicevic
dc4d7eac9b
blocksync: merged with master
2022-05-24 10:50:50 +02:00
Jasmina Malicevic
94d5ff1bf8
Merge remote-tracking branch 'origin' into jasmina/4457-blocksync-verification_part1
2022-05-24 00:03:09 +02:00
Jasmina Malicevic
7d8fc400b7
Applied comments from PR and minor cleanup
2022-05-23 23:59:19 +02:00
William Banfield
0cceadf4d4
abci++: add consensus parameter logic to control vote extension require height ( #8547 )
...
This PR makes vote extensions optional within Tendermint. A new ConsensusParams field, called ABCIParams.VoteExtensionsEnableHeight, has been added to toggle whether or not extensions should be enabled or disabled depending on the current height of the consensus engine. Related to: #8453
2022-05-20 17:46:52 -04:00
Jasmina Malicevic
70dc94456f
Merged with master and fixed linter error
2022-05-13 17:13:56 +02:00
Jasmina Malicevic
9dc425f2fa
blocksync: code refactoring and bug fix
2022-05-13 13:59:01 +02:00
Jasmina Malicevic
f776b6cea0
blocksync: code refactoring and bug fix
2022-05-13 12:47:19 +02:00
Jasmina Malicevic
47bd5cc65d
Minor comments from PR
2022-05-12 14:31:53 +02:00
Jasmina Malicevic
32e06ad80a
first merge with #8433
2022-05-11 17:41:54 +02:00
Jasmina Malicevic
54418abb3a
Merge remote-tracking branch 'origin' into jasmina/4457-blocksync-verification_part1
2022-05-11 17:11:25 +02:00
Jasmina Malicevic
2aef5ec1fa
blocksync: applied PR comment
2022-05-11 15:32:06 +02:00
Thane Thomson
06b1812094
abci++: Propagate vote extensions (RFC 017) ( #8433 )
...
* Add protos for ExtendedCommit
Cherry-pick from e73f0178b72a16ee81f8e856aadf651f2c62ec6e just the
changes to the .proto files, since we have deleted the .intermediate
files.
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* make proto-gen
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* BlockStore holds extended commit
Cherry-pick 8d504d4b50ec6afbdffe2df7ababbef30e15053d and fix conflicts.
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Reshuffle ExtendedCommit and ExtendedCommitSig
Separate the data structures and functions from their Commit-oriented
counterparts to adhere to the current coding style.
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Fix exit condition in blocksync
* Add note to remove TxResult proto
As Sergio pointed out in 3e31aa6f583cdc71e208ed03a82f1d804ec0de49, this
proto message can probably be removed. We should do this in a separate
PR.
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Lift termination condition into for loop
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Enforce vote extension signature requirement
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Expand on comment for PeekTwoBlocks for posterity
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Isolate TODO more clearly
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* make mockery
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Fix comment
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Make panic output from BlockStore.SaveBlock more readable
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Add helper methods to ExtendedCommitSig and ExtendedCommit
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Fix most tests except TestHandshake*
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Fix store prefix collision
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Fix TestBlockFetchAtHeight
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Remove global state from store tests
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Apply suggestions from code review
Co-authored-by: M. J. Fromberger <fromberger@interchain.io >
Co-authored-by: Sergio Mena <sergio@informal.systems >
* blocksync: Just return error
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* make format
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* types: Remove unused/commented-out code
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* blocksync: Change pool AddBlock function signature to return errors
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* types: Improve legibility of switch statements
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* blocksync: Expand on extended commit requirement in AddBlock description
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* blocksync: Return error without also logging it
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* consensus: Rename short-lived local variable
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* consensus: Allocate TODO to Sergio
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* evidence/pool_test: Inline slice construction
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* state: Rename LoadBlockExtCommit to LoadBlockExtendedCommit
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* proto: Remove TODO on TxResult
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* types: Minor format
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* types: Reformat ExtendedCommitSig.BlockID
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* types: Remove NewExtendedCommit constructor
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* types: Remove NewCommit constructor
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* types: Shorten receiver names for ExtendedCommit
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* types: Convert ExtendedCommit.Copy to a deep clone
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* types: Assign TODO to Sergio
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* types: Fix legibility nits
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* types: Improve legibility
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* store/state: Add TODO to move prefixes to common package
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Propagate validator info to PrepareProposal
In order to propagate validator voting power through to PrepareProposal,
we need to load the validator set info from the height corresponding to
the extended commit that we're passing through to PrepareProposal as the
"LocalLastCommit".
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Rename local var for clarity
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Fix TestMaxProposalBlockSize
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Rename local var for clarity
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Remove debug log
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Remove CommigSig.ForBlock helper
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Remove CommigSig.Absent helper
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Remove ExtendedCommitSig.ForBlock helper
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Remove ExtendedCommitSig.Absent helper
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* There are no extended commits below the initial height
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Fix comment grammar
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Remove JSON encoding from ExtendedCommit
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Embed CommitSig into ExtendedCommitSig instead of duplicating fields
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Rename ExtendedCommit vote_extension field to extension for consistency with domain types
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* blocksync: Panic if we peek a block without an extended commit
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Apply suggestions from code review
Co-authored-by: M. J. Fromberger <fromberger@interchain.io >
* Remove Sergio from TODO
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Increase hard-coded vote extension max size to 1MB
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* state: Remove unnecessary comment
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* state: Ensure no of commit sigs equals validator set length
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* make format
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* types: Minor legibility improvements
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Improve legibility
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* types: Remove unused GetVotes function on VoteSet
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Refactor TestMaxProposalBlockSize to construct more realistic extended commit
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Refactor buildExtendedCommitInfo to resemble buildLastCommitInfo
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Apply suggestions from code review
Co-authored-by: M. J. Fromberger <fromberger@interchain.io >
* abci++: Disable VerifyVoteExtension call on nil precommits (#8491 )
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* types: Require vote extensions on non-nil precommits and not otherwise
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Disable lint
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Increase timeout for TestReactorVotingPowerChange to counter flakiness
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Only sign and verify vote extensions in non-nil precommits
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Revert "Disable lint"
This reverts commit 6fffbf9402 .
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Add missing non-nil check uncovered non-deterministically in TestHandshakeReplayAll
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Expand error message for accuracy
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Only call ExtendVote when we make non-nil precommits
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Revert "Increase timeout for TestReactorVotingPowerChange to counter flakiness"
This reverts commit af514939db .
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Refactor ValidateBasic for ExtendedCommitSig for legibility
Signed-off-by: Thane Thomson <connect@thanethomson.com >
Co-authored-by: Sergio Mena <sergio@informal.systems >
Co-authored-by: M. J. Fromberger <fromberger@interchain.io >
2022-05-11 07:10:32 -04:00
Jasmina Malicevic
3395affe75
blocksync: fixed merge induced error
2022-05-11 13:07:41 +02:00
Jasmina Malicevic
8b68022d16
Merge remote-tracking branch 'origin' into jasmina/4457-blocksync-verification_part1
2022-05-11 13:05:10 +02:00
Callum Waters
a4c3b5cab4
validate block before we persist it ( #8493 )
2022-05-10 17:34:53 +02:00
Jasmina Malicevic
753413941f
blocksync: fixed behaviour when validation fails; appliead PR comments
2022-05-04 15:45:30 +02:00
Jasmina Malicevic
52bc079225
Merge remote-tracking branch 'origin' into jasmina/4457-blocksync-verification_part1
2022-05-03 12:56:33 +02:00
Sam Kleinman
cf2a00b398
p2p: avoid using p2p.Channel internals ( #8444 )
2022-04-29 17:21:36 -04:00
Jasmina Malicevic
abfc780202
Merge remote-tracking branch 'origin' into jasmina/4457-blocksync-verification_part1
2022-04-26 15:45:07 +02:00
Sam Kleinman
c372390fea
eventbus: publish without contexts ( #8369 )
2022-04-18 16:28:31 -04:00
Jasmina Malicevic
d22f4c458f
blocksync: separate verification into different file
2022-04-15 16:24:35 +02:00
Jasmina Malicevic
a6e0813be5
Merge remote-tracking branch 'origin/master' into jasmina/4457_block_sync_verification
2022-04-14 13:39:45 +02:00
Jasmina Malicevic
60eaa831af
blocksync: Verification using LastCommit of block at height H + 2
2022-04-14 13:37:26 +02:00
Sam Kleinman
9d20e06900
statesync+blocksync: move event publications into the sync operations ( #8274 )
2022-04-07 16:23:36 -04:00
Jasmina Malicevic
4ba3892b03
Merged with master
2022-04-07 14:45:24 +02:00
Jasmina Malicevic
07fac4ccc0
Merge remote-tracking branch 'origin' into jasmina/4457_block_sync_verification
2022-04-07 14:42:57 +02:00
Jasmina Malicevic
09f522b249
blocksync: Initial working commit with adjacent block verification
...
store: Added functions ot return protobuf objects for block and commit (perf opt)
proto: Added Commit to the BlockResponse message
- WARN: Manual proto files for blocksync
2022-04-07 14:25:09 +02:00
Sam Kleinman
9d1e8eaad4
node: remove channel and peer update initialization from construction ( #8238 )
2022-04-05 13:26:53 +00:00
Sam Kleinman
97f7021712
statesync: merge channel processing ( #8240 )
2022-04-04 12:31:15 -04:00
Sam Kleinman
13f7501950
blocksync: remove intermediate channel ( #8140 )
...
Based on local testing, I'm now convinced that this is ok, and also I think the fact that the new p2p layer has more caching and queue.
2022-03-17 22:20:59 +00:00
Sam Kleinman
07b46d5a05
blocksync: drop redundant shutdown mechanisms ( #8136 )
2022-03-17 13:30:13 -04:00
Sam Kleinman
0167f0d527
node: nodes should fetch state on startup ( #8062 )
2022-03-04 12:23:57 -05:00
Sam Kleinman
d187962ec0
blocksync: shutdown cleanup ( #7840 )
...
Now that shutdown is handled by contexts in most cases, I think it's
fair to cleanup the way this reactor shuts down. Additionaly there
were a few cases where the `blockSyncOutBridgeCh` was misshandled and
could have lead to a deadlock which I observed in some tests
2022-02-17 20:42:11 +00:00
Sam Kleinman
28d34d635c
service: change stop interface ( #7816 )
2022-02-17 11:23:32 -05:00
Sam Kleinman
e07c4cdcf2
node: collapse initialization internals ( #7567 )
2022-01-12 15:32:22 -05:00
Sam Kleinman
5bf1bdcfb4
reactors: skip log on some routine cancels ( #7556 )
2022-01-11 12:56:52 -05:00
Sam Kleinman
aa76a367e0
blocksync: standardize construction process ( #7531 )
2022-01-07 13:40:08 -05:00
Sam Kleinman
430817d9e9
types: remove panic from block methods ( #7501 )
2022-01-03 16:14:26 -05:00
M. J. Fromberger
ab7da86b06
Internalize libs/sync. ( #7450 )
...
Inline the one usage of this library, and remove the lib.
2021-12-14 15:14:30 -08:00
Sam Kleinman
65c0aaee5e
p2p: use recieve for channel iteration ( #7425 )
2021-12-13 11:04:44 -05:00
Sam Kleinman
bd6dc3ca88
p2p: refactor channel Send/out ( #7414 )
2021-12-09 14:03:41 -05:00
Sam Kleinman
cb88bd3941
p2p: migrate to use new interface for channel errors ( #7403 )
...
* p2p: migrate to use new interface for channel errors
* Update internal/p2p/p2ptest/require.go
Co-authored-by: M. J. Fromberger <michael.j.fromberger@gmail.com >
* rename
* feedback
Co-authored-by: M. J. Fromberger <michael.j.fromberger@gmail.com >
2021-12-08 14:05:01 +00:00
Sam Kleinman
892f5d9524
service: cleanup mempool and peer update shutdown ( #7401 )
2021-12-08 08:44:32 -05:00
Sam Kleinman
0ff3d4b89d
service: cleanup close channel in reactors ( #7399 )
2021-12-07 11:40:59 -05:00
Sam Kleinman
a62ac27047
service: remove exported logger from base implemenation ( #7381 )
2021-12-06 10:16:42 -05:00