-
Notifications
You must be signed in to change notification settings - Fork 527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reject future blocks #1509
Reject future blocks #1509
Conversation
1fec499
to
7ef787f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should add a flag to the genesis
command as well. Even though we will have this parameter as a part of on-chain governance soon, for the first start of the chain, we need to specify it in the genesis
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree with @goran-ethernal and @stana-miric:
BlockTimeDrift
should beuint64
, and- a flag should be exposed in the genesis command in order to configure it initially.
Also, 2 out of 3 tests in the TestE2E_Consensus_Basic_WithNonValidators
test are failing (the ones which are restarting nodes and letting them sync). I haven't realized why exactly, but have seen this error message in basically all of the validator nodes:
2023-05-17T09:29:38.694Z [DEBUG] polygon.server.polybft.consensus_runtime: HasQuorum has been called but proposer could not be retrieved: error="get latest proposer not found - height: 14, round: 3, pc height: 14, pc round: 0"
# Conflicts: # consensus/polybft/polybft_config.go
Description
The PR add validations for header in
validationHeaderFields
. Changes includes check for future block, which includes checking if the timestamp is within predefined time slot oftime.Now().UTC().Unix()
. If not, we assume that it is a future block and reject it.Changes include
Breaking changes
Please complete this section if any breaking changes have been made, otherwise delete it
Checklist
Testing
Manual tests
Please complete this section if you ran manual tests for this functionality, otherwise delete it
Documentation update
Please link the documentation update PR in this section if it's present, otherwise delete it
Additional comments
Please post additional comments in this section if you have them, otherwise delete it