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

Withdrawals wiring #4968

Merged
merged 9 commits into from
Jan 22, 2023
Merged

Withdrawals wiring #4968

merged 9 commits into from
Jan 22, 2023

Conversation

jframe
Copy link
Contributor

@jframe jframe commented Jan 20, 2023

PR description

Final piece to wire together withdrawals and adding missing pieces

  • withdrawalsRoot calculation
  • withdrawals block body RLP encoding
  • add withdrawalsRoot and withdrawals when creating a block
  • validate withdrawals when validating mainnet blocks
  • fix invalid withdrawals root during backwards sync
  • include withdrawalsRoot when creating new header in EngineNewPayload

Fixed Issue(s)

Documentation

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

Changelog

@jframe jframe changed the title Withdrawals root encoding Withdrawals wiring Jan 20, 2023
Copy link
Contributor

@siladu siladu left a comment

Choose a reason for hiding this comment

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

LGTM

import org.mockito.junit.jupiter.MockitoExtension;

@ExtendWith(MockitoExtension.class)
class MainnetBlockBodyValidatorTest {
Copy link
Contributor

Choose a reason for hiding this comment

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

nice!

jframe and others added 9 commits January 22, 2023 23:24
Signed-off-by: Jason Frame <jason.frame@consensys.net>
Signed-off-by: Jason Frame <jason.frame@consensys.net>
Signed-off-by: Jason Frame <jason.frame@consensys.net>
Add withdrawalsRoot as part of BodyIdentifier
Add comment to avoid new issues when adding new fields to BlockBody

Signed-off-by: Jason Frame <jason.frame@consensys.net>
Signed-off-by: Jason Frame <jason.frame@consensys.net>
…bled at genesis

Signed-off-by: Jason Frame <jason.frame@consensys.net>
Signed-off-by: Jason Frame <jason.frame@consensys.net>
Signed-off-by: Jason Frame <jason.frame@consensys.net>
Add empty withdrawals in GenesisState for shanghai at genesis
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
@siladu siladu marked this pull request as ready for review January 22, 2023 22:26
@siladu siladu enabled auto-merge (squash) January 22, 2023 22:26
@siladu siladu merged commit f4a6219 into hyperledger:main Jan 22, 2023
@jframe jframe added TeamGroot GH issues worked on by Groot Team EIP Ethereum Improvement Proposal mainnet labels Jan 25, 2023
elenduuche pushed a commit to elenduuche/besu that referenced this pull request Aug 16, 2023
* add withdrawalRoot computation

Signed-off-by: Jason Frame <jason.frame@consensys.net>

* include withdrawalsRoot and withdrawals when creating block

Signed-off-by: Jason Frame <jason.frame@consensys.net>

* validate withdrawals when validation mainnet blocks

Signed-off-by: Jason Frame <jason.frame@consensys.net>

* Fix invalid withdrawals root during backwards sync

Add withdrawalsRoot as part of BodyIdentifier
Add comment to avoid new issues when adding new fields to BlockBody

Signed-off-by: Jason Frame <jason.frame@consensys.net>

* Include withdrawalsRoot when creating new header in EngineNewPayload

Signed-off-by: Jason Frame <jason.frame@consensys.net>

* Use empty trie hash in genesis for withdrawalsRoot if shanghai is enabled at genesis

Signed-off-by: Jason Frame <jason.frame@consensys.net>

* Revert testing changes to AbstractEngineNewPayload

Signed-off-by: Jason Frame <jason.frame@consensys.net>

* Fix BesuController tests failing after GenesisState change

Signed-off-by: Jason Frame <jason.frame@consensys.net>

* Missing withdrawals wiring in BlockProcessor

Add empty withdrawals in GenesisState for shanghai at genesis
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>

Signed-off-by: Jason Frame <jason.frame@consensys.net>
Co-authored-by: Simon Dudley <simon.dudley@consensys.net>
eum602 pushed a commit to lacchain/besu that referenced this pull request Nov 3, 2023
* add withdrawalRoot computation

Signed-off-by: Jason Frame <jason.frame@consensys.net>

* include withdrawalsRoot and withdrawals when creating block

Signed-off-by: Jason Frame <jason.frame@consensys.net>

* validate withdrawals when validation mainnet blocks

Signed-off-by: Jason Frame <jason.frame@consensys.net>

* Fix invalid withdrawals root during backwards sync

Add withdrawalsRoot as part of BodyIdentifier
Add comment to avoid new issues when adding new fields to BlockBody

Signed-off-by: Jason Frame <jason.frame@consensys.net>

* Include withdrawalsRoot when creating new header in EngineNewPayload

Signed-off-by: Jason Frame <jason.frame@consensys.net>

* Use empty trie hash in genesis for withdrawalsRoot if shanghai is enabled at genesis

Signed-off-by: Jason Frame <jason.frame@consensys.net>

* Revert testing changes to AbstractEngineNewPayload

Signed-off-by: Jason Frame <jason.frame@consensys.net>

* Fix BesuController tests failing after GenesisState change

Signed-off-by: Jason Frame <jason.frame@consensys.net>

* Missing withdrawals wiring in BlockProcessor

Add empty withdrawals in GenesisState for shanghai at genesis
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>

Signed-off-by: Jason Frame <jason.frame@consensys.net>
Co-authored-by: Simon Dudley <simon.dudley@consensys.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EIP Ethereum Improvement Proposal mainnet TeamGroot GH issues worked on by Groot Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants