-
-
Notifications
You must be signed in to change notification settings - Fork 325
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
feat: eip-6110 deprecate eth1 data poll #7414
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## unstable #7414 +/- ##
============================================
+ Coverage 48.50% 50.25% +1.74%
============================================
Files 602 602
Lines 40355 40375 +20
Branches 2069 2205 +136
============================================
+ Hits 19576 20292 +716
+ Misses 20741 20043 -698
- Partials 38 40 +2 |
Performance Report✔️ no performance regression detected Full benchmark results
|
const finalizedCheckpoint = this.chain.forkChoice.getFinalizedCheckpoint(); | ||
const fork = this.config.getForkInfoAtEpoch(finalizedCheckpoint.epoch).name; | ||
|
||
if (isForkPostElectra(fork)) { |
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.
can't we just check the fork based on current slot? it's good to only stop polling if finalized state is electra but I think we shouldn't even call getStateByCheckpoint
if it's not even electra fork
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.
can't we just check the fork based on current slot?
Just checking slot based on clock is not enough. There is a short transition period in Electra where we still need to poll and process eth1 deposits. We can only stop polling when all the eth1 deposits in the queue have been processed
it's good to only stop polling if finalized state is electra but I think we shouldn't even call getStateByCheckpoint if it's not even electra fork
getFinalizedCheckpoint()
is a simple call as fcStore.justified.checkpoint
is always cached. We can add an additional electra fork check based on clock slot in L253 but this would only avoid calling getFinalizedCheckpoint()
in deneb. But we ultimately need to check if finalized state is in Electra, and then further check if finalized state's eth1DepositIndex
has reached a certain height in order to stop polling.
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.
There is a short transition period in Electra where we still need to poll and process eth1 deposits
I know but at the earliest we would run the deposit index check if it's post-electra based on clock slot, and then we can load the state and check the index
Co-authored-by: Nico Flaig <[email protected]>
it's not about EIP inclusion, it's about stop eth1 data polling. I mean if Pectra is released soon with reasonable |
Ah I see what you mean. Yes, if the latest finalized checkpoint has no more new eth1 deposits processed, then the deposit contract snapshot is "frozen". At that point there is no need to maintain the repositories in #7388. I even think at some point we can just hard code a |
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.
LGTM
Eth1 data poll is not needed anymore in Pectra after all eth1 deposits are processed.
Introduce mechanism to stop the polling.
Note in the case of Lodestar starting up in Electra, Eth1 data poll may run for 1 epoch but no data will actually get polled and then
PrepareNextSlotScheduler.stopEth1Polling()
will stop it.Part of #6341