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

EIP-7002: Add ExecutionLayerWithdrawalRequest for Electra #8197

Merged
merged 29 commits into from
Apr 17, 2024
Merged

EIP-7002: Add ExecutionLayerWithdrawalRequest for Electra #8197

merged 29 commits into from
Apr 17, 2024

Conversation

jtraglia
Copy link
Contributor

@jtraglia jtraglia commented Apr 14, 2024

PR Description

This is still a work in progress. This PR will:

  • Rename ExecutionLayerExit to ExecutionLayerWithdrawalRequest.
  • Add new amount field to ExecutionLayerWithdrawalRequest.
  • Update processExecutionLayerWithdrawalRequests.

Currently, the plan is to merge ExecutionLayerExit (EIP-7002) into ExecutionLayerWithdrawalRequest (EIP-7251) since it's the same concept. This can be seen in this PR by Alex Stokes:

Sorry in advance, this PR touches a lot of files. Ideally it would be broken up into multiple PRs, but the changes are relatively simple and breaking it up would be more complicated in my opinion. But if that's desirable, it might be possible.

Documentation

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

Changelog

  • I thought about adding a changelog entry, and added one if I deemed necessary.

@lucassaldanha
Copy link
Member

The OpenApi integration test is failing because we need to create a schema/ExecutionLayerWithdrawRequest.json file with the expected schema (replacing schema/ExecutionLayerExit.json)

@jtraglia
Copy link
Contributor Author

@lucassaldanha I'm pretty sure I will need help writing computeExitEpochAndUpdateChurn. I'm not exactly sure where this function should go, probably not in MutableBeaconStateElectra though.

@lucassaldanha
Copy link
Member

@lucassaldanha I'm pretty sure I will need help writing computeExitEpochAndUpdateChurn. I'm not exactly sure where this function should go, probably not in MutableBeaconStateElectra though.

We have a BeaconStateMutators with a specific version for different forks like BeaconStateMutatorsBellatrix. We would need a BeaconStateMutatorsElectra to start. I know @rolfyone was working on some of those I'll check with him what he is up to and get back to you.

@lucassaldanha lucassaldanha removed the request for review from StefanBratanov April 15, 2024 23:21
@rolfyone
Copy link
Contributor

We have a BeaconStateMutators with a specific version for different forks like BeaconStateMutatorsBellatrix. We would need a BeaconStateMutatorsElectra to start. I know @rolfyone was working on some of those I'll check with him what he is up to and get back to you.

I'll take a look

@lucassaldanha
Copy link
Member

@lucassaldanha I'm pretty sure I will need help writing computeExitEpochAndUpdateChurn. I'm not exactly sure where this function should go, probably not in MutableBeaconStateElectra though.

@rolfyone has implemented this function and it has been merged already. Look for BeaconStateMutatorsElectra.

@jtraglia
Copy link
Contributor Author

@lucassaldanha @rolfyone thanks for your help 😄 this should be ready for review now.

@jtraglia jtraglia marked this pull request as ready for review April 16, 2024 16:11
@lucassaldanha
Copy link
Member

It looks like the naming was updated to ExecutionLayerWithdrawalRequest (using withdrawAL). So we need to update this PR to reflect this.

@jtraglia
Copy link
Contributor Author

It looks like the naming was updated to ExecutionLayerWithdrawalRequest (using withdrawAL). So we need to update this PR to reflect this.

Ah I didn't notice that 😢 no problem, will update! Shouldn't be nearly as difficult.

@lucassaldanha
Copy link
Member

It looks like the naming was updated to ExecutionLayerWithdrawalRequest (using withdrawAL). So we need to update this PR to reflect this.

Ah I didn't notice that 😢 no problem, will update! Shouldn't be nearly as difficult.

I just noticed it today hehe. I actually prefer the new name so won't complain about it!

The logic seems to be ok so as soon as the names are fixed we can merge it.

@jtraglia jtraglia changed the title Add ExecutionLayerWithdrawRequest for Electra Add ExecutionLayerWithdrawalRequest for Electra Apr 17, 2024
import tech.pegasys.teku.spec.datastructures.execution.versions.electra.ExecutionLayerWithdrawalRequestSchema;
import tech.pegasys.teku.spec.util.DataStructureUtil;

class ExecutionLayerWithdrawalRequestTest {

Check notice

Code scanning / CodeQL

Unused classes and interfaces Note test

Unused class: ExecutionLayerWithdrawalRequestTest is not referenced within this codebase. If not used as an external API it should be removed.
@lucassaldanha
Copy link
Member

I guess we still need to rename the field in a couple of places? Some of the property tests failed.

@jtraglia
Copy link
Contributor Author

I guess we still need to rename the field in a couple of places? Some of the property tests failed.

Ah yeah, sorry, missed some of the upper case names. Hopefully that should be it.

@lucassaldanha lucassaldanha enabled auto-merge (squash) April 17, 2024 19:02
@lucassaldanha lucassaldanha changed the title Add ExecutionLayerWithdrawalRequest for Electra EIP-7002: Add ExecutionLayerWithdrawalRequest for Electra Apr 17, 2024
@lucassaldanha lucassaldanha merged commit caf58d7 into Consensys:master Apr 17, 2024
15 of 16 checks passed
@jtraglia jtraglia deleted the el-withdraw-request branch April 18, 2024 02:08
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.

3 participants