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

Pectra EIPs 6110, 7002, 7685 #7421

Merged
merged 349 commits into from
Sep 23, 2024
Merged

Pectra EIPs 6110, 7002, 7685 #7421

merged 349 commits into from
Sep 23, 2024

Conversation

MarekM25
Copy link
Contributor

@MarekM25 MarekM25 commented Sep 12, 2024

Changes

https://eips.ethereum.org/EIPS/eip-6110
https://eips.ethereum.org/EIPS/eip-7002
https://eips.ethereum.org/EIPS/eip-7685

This PR contains Pectra EIPs without consolidations, 7702, and changes to payloadBodies.

Please note, the PR was initially reviewed by a few people but wasn't merged because of the wrong system call approach. There were hundreds of conflicts with master, so pay attention to it during the review.

I can't test Pectra features in this PR in isolation from other Pectra PRs. However, I decided to split the PRs for easier review. Of course, we can do regression testing with the current master.

Types of changes

What types of changes does your code introduce?

  • Bugfix (a non-breaking change that fixes an issue)
  • New feature (a non-breaking change that adds functionality)
  • Breaking change (a change that causes existing functionality not to work as expected)
  • Optimization
  • Refactoring
  • Documentation update
  • Build-related changes
  • Other: Description

Testing

Requires testing

  • Yes
  • No

If yes, did you write tests?

  • Yes
  • No

Notes on testing

Optional. Remove if not applicable.

Documentation

Requires documentation update

  • Yes
  • No

If yes, link the PR to the docs update or the issue with the details labeled docs. Remove if not applicable.

Requires explanation in Release Notes

  • Yes
  • No

If yes, fill in the details here. Remove if not applicable.

Demuirgos and others added 30 commits February 7, 2024 10:52
Co-authored-by: Amirul Ashraf <asdacap@gmail.com>
Co-authored-by: Ben Adams <thundercat@illyriad.co.uk>

[TestFixture]
[Parallelizable(ParallelScope.All)]
[Explicit("These tests are not ready yet")]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It will be updated after merging all Pectra's PRs: #7422

@MarekM25 MarekM25 changed the title [WIP] Merging Pectra eips [WIP] Pectra EIPs 6110, 7002, 7685 Sep 13, 2024
@MarekM25 MarekM25 changed the title [WIP] Pectra EIPs 6110, 7002, 7685 Pectra EIPs 6110, 7002, 7685 Sep 13, 2024
@MarekM25 MarekM25 marked this pull request as ready for review September 13, 2024 15:36
@MarekM25 MarekM25 requested a review from rubo as a code owner September 13, 2024 15:36
Copy link
Contributor

@smartprogrammer93 smartprogrammer93 left a comment

Choose a reason for hiding this comment

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

LGTM

src/Nethermind/Nethermind.State/Proofs/RequestsTrie.cs Outdated Show resolved Hide resolved
src/Nethermind/Nethermind.Specs/ReleaseSpec.cs Outdated Show resolved Hide resolved
Copy link
Member

@LukaszRozmej LukaszRozmej left a comment

Choose a reason for hiding this comment

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

Overall approve but a few details to iron-out

Comment on lines +30 to +32
// The below addresses are added for all forks, but the given EIPs can be enabled at a specific timestamp or block.
Eip7002ContractAddress = Eip7002Constants.WithdrawalRequestPredeployAddress;
DepositContractAddress = Eip6110Constants.MainnetDepositContractAddress;
Copy link
Member

Choose a reason for hiding this comment

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

Why not add them in Prague fork only?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If you move them to Prague, the tests will fail. The addresses are not activated at any specific block/timestamp; they exist in the chainspec.

A potential solution would be moving them to a separate class of ForkIndependent properties.
cc: @rjnrohit

Copy link
Member

Choose a reason for hiding this comment

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

Can you explain why tests would fail?

WithdrawalRequest = 1
}

public class ConsensusRequest
Copy link
Member

Choose a reason for hiding this comment

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

Maybe out of scope of this PR and we can do that in the next one: Shouldn't we create proper class hierarchy deserialization?

Copy link
Contributor Author

@MarekM25 MarekM25 Sep 17, 2024

Choose a reason for hiding this comment

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

There is a class hierarchy, not sure what exactly do you mean. But let's treat it out of scope of this PR :) You can discuss with @rjnrohit

Copy link
Member

Choose a reason for hiding this comment

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

Not put every property in base class, but put them in correct derived classes:

https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/polymorphism

Copy link
Member

Choose a reason for hiding this comment

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

@LukaszRozmej
Copy link
Member

Addressed most of the comments in #7458

@MarekM25 MarekM25 merged commit 719ea82 into master Sep 23, 2024
66 checks passed
@MarekM25 MarekM25 deleted the pectra_eips branch September 23, 2024 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants