-
Notifications
You must be signed in to change notification settings - Fork 886
Return eth1_data early post transition #7248
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR explicitly returns state.eth1_data() early if state.eth1_deposit_index equals the deposit_requests_start_index, ensuring compliance with the Electra:EIP6110 specification.
- Updated DummyEth1ChainBackend to include the early return.
- Added similar logic in CachingEth1Backend to enforce correct behavior post transition.
This looks ok, but I'm not sure if it's comprehensive enough to silence all deposit related warnings post Electra? Things I've heard users complain about failing:
I don't have any more time to look at this week, but will dive back in on Monday |
I think this is kinda hard to do. In order to do this, we need to somehow tell the eth1 service to stop fetching logs after the electra_fork_epoch + the transition period in which we fill in all bridge deposits. I think this would be a decent amount of work for writing that code would literally go away the first release after electra so I'm not super keen on that.
This will be an issue for users who try to do a fresh checkpoint sync from a server that has passed the transition period and isn't able to finalize the snapshot anymore. I think the impact would be not too bad. We saw those issues on holesky because a lot of people were doing fresh syncs, but I didn't see it as much on sepolia. Correct me if i'm wrong here cc @chong-he I can't think of changes that are simple and high impact in terms of fewer unnessary error logs for users. I feel the best way forward would be to make a release with #7133 around the time when the ELs do their releases to drop pre-merge history post electra. |
Yes we don't see the log from Sepolia. They are from Holesky testnet, probably because of fresh checkpoint sync as you mentioned |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I'm satisfied that this matches the spec for get_eth1_vote
(https://github.com/ethereum/consensus-specs/blob/dev/specs/electra/validator.md#deposits), and that we will return vec![]
once all the old-style deposits are processed.
I made a commit on my fork where I renamed some variables to convince myself that we were matching the spec.
Issue Addressed
N/A
Proposed Changes
Return state.eth1_data() early if we have passed the transition period post electra. Even if we don't return early, the function would still return state.eth1_data() based on the current conditions. However, doing this explicitly here to match the spec. This covers setting the right eth1_data in our block.
The other thing we need to ensure is that the deposits returned by the eth1_chain is empty post transition.
The only way we get non-empty deposits post the transition is if
state.eth1_deposit_index
in the below code is less thanmin(deposit_requests_start_index, state.eth1_data().deposit_count)
.lighthouse/beacon_node/beacon_chain/src/eth1_chain.rs
Lines 543 to 579 in 0850bcf
This can never happen because state.eth1_deposit_index will be equal to state.eth1_data.deposit count and cannot exceed the value.
@michaelsproul @ethDreamer please double check the logic for deposits being empty post transition. Following the logic in the spec makes my head hurt.