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

Cleanup: making process deposit more spec readable and fork specific #14139

Merged
merged 3 commits into from
Jun 25, 2024

Conversation

james-prysm
Copy link
Contributor

@james-prysm james-prysm commented Jun 24, 2024

What type of PR is this?

Other

What does this PR do? Why is it needed?

Currently, the ProcessDeposit function lives in a shared fork repo in the blocks package. To prepare for changes in 6110 I have broken the functions to match more closely with the consensus specs defined in https://github.com/ethereum/consensus-specs. As part of this PR I've moved the deposit functions from the blocks package to the altair package which will allow easier updating in future hard forks.

breaking out pr #13944

Which issues(s) does this PR fix?

Fixes #

Other notes for review

@james-prysm james-prysm added the Cleanup Code health! label Jun 24, 2024
@james-prysm james-prysm requested a review from a team as a code owner June 24, 2024 21:21
Copy link
Contributor

@saolyn saolyn left a comment

Choose a reason for hiding this comment

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

LGTM, mostly just moving tests around and some renaming. Might be good to wait for someone else to have a pass before merging

)

// ProcessPreGenesisDeposits processes a deposit for the beacon state before chainstart.
Copy link
Member

Choose a reason for hiding this comment

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

Why are these in altair? I think these additions are not part of altair hard fork right

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the alternative would be to break out process deposits into yet another for phase 0. I considered this but just decided to have the two ( altair and electra). if you think I should still break this out I can.
the issue with leaving it in the blocks package is the circular dependency, processPreGenesisDeposits calls process deposits which needs to specify a fork for process deposits, in this case it only makes sense to use the current version of process deposits

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.

Lgtm

@james-prysm james-prysm added this pull request to the merge queue Jun 25, 2024
@james-prysm james-prysm removed this pull request from the merge queue due to a manual request Jun 25, 2024
@james-prysm james-prysm added this pull request to the merge queue Jun 25, 2024
Merged via the queue into develop with commit 4722446 Jun 25, 2024
16 of 17 checks passed
@james-prysm james-prysm deleted the deposit-spec-readability branch June 25, 2024 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cleanup Code health!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants