Skip to content
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

After merge add a rule to check that the current block is more recent than its parent #4066

Merged
merged 4 commits into from
Jul 8, 2022

Conversation

fab-10
Copy link
Contributor

@fab-10 fab-10 commented Jul 6, 2022

Signed-off-by: Fabio Di Fabio fabio.difabio@consensys.net

PR description

In PoS current block timestamp must be greather than its parent block timestamp, so adding a new header validation rule to check that.
There is also a fix in the shouldUsePostMergeRules that was not correctly checking for TD >= TTD.

With this the Hive test Invalid Ancestor Chain Re-Org, Invalid Timestamp, Invalid P9', Reveal using sync passes.

Fixed Issue(s)

Documentation

  • I thought about documentation and added the doc-change-required label to this PR if
    updates are required.

Changelog

@fab-10 fab-10 force-pushed the incremental-timestamp-rule branch from 32c0f37 to 8c6060d Compare July 6, 2022 18:37
… than its parent

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
@fab-10 fab-10 added the mainnet label Jul 7, 2022
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
@fab-10 fab-10 force-pushed the incremental-timestamp-rule branch from 8c6060d to 4f5b69e Compare July 7, 2022 08:56
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
@fab-10 fab-10 marked this pull request as ready for review July 7, 2022 11:51
Copy link
Contributor

@macfarla macfarla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fab-10 fab-10 merged commit 93b8770 into hyperledger:main Jul 8, 2022
@fab-10 fab-10 deleted the incremental-timestamp-rule branch July 8, 2022 09:19
eum602 pushed a commit to lacchain/besu that referenced this pull request Nov 3, 2023
… than its parent (hyperledger#4066)

* After merge add a rule to check that the current block is more recent than its parent

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* Update CHANGELOG

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* Unit test

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants