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

prysmctl: check capella fork for blstoexecutionchange #12039

Merged
merged 10 commits into from
Feb 24, 2023

Conversation

james-prysm
Copy link
Contributor

What type of PR is this?

Feature

What does this PR do? Why is it needed?

Adding in fork checking to make sure capella is enabled before submitting blstoexecutionchanges as the api endpoint does not throw an error for messages prior to the fork.

@james-prysm james-prysm requested a review from a team as a code owner February 23, 2023 16:52
@james-prysm james-prysm self-assigned this Feb 23, 2023
Copy link
Member

@terencechain terencechain left a comment

Choose a reason for hiding this comment

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

Aren't they signed with the genesis fork version these days?

Copy link
Contributor

@potuz potuz left a comment

Choose a reason for hiding this comment

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

Looks good to me, just wondering why not simply checking against current epoch instead of the current head fork

@@ -87,6 +89,13 @@ func callWithdrawalEndpoints(ctx context.Context, host string, request []*apimid
if err != nil {
return err
}
fork, err := client.GetFork(ctx, "head")
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't it simpler to check that CapellaForkEpoch is set and then that current epoch is higher than that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah that's true, at first I thought I somehow I could compare the output of fork response with version.Capella somehow and winded up on this road 😓

@potuz
Copy link
Contributor

potuz commented Feb 24, 2023

Aren't they signed with the genesis fork version these days?

They are but the idea is not making it easier for users to shoot their feet by including them now. And only allow these changes to be post-Capella. Users that insist on flooding the fork should find their way

@prylabs-bulldozer prylabs-bulldozer bot merged commit 8918e8c into develop Feb 24, 2023
@delete-merged-branch delete-merged-branch bot deleted the prysmctl-withdrawal-fork-restriction branch February 24, 2023 16:28
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.

3 participants