Use Gloas activation/exit churn limits for queue churn display - #856
Open
barnabasbusa wants to merge 1 commit into
Open
Use Gloas activation/exit churn limits for queue churn display#856barnabasbusa wants to merge 1 commit into
barnabasbusa wants to merge 1 commit into
Conversation
The deposit queue estimate already used the Gloas (EIP-8061) activation churn, but the "churn limit is X ETH per epoch" label on the index and deposits pages and the network overview API still used the Electra activation/exit churn (CHURN_LIMIT_QUOTIENT instead of CHURN_LIMIT_QUOTIENT_GLOAS), so the label could disagree with the estimate next to it. Add ChainState.GetExitChurnLimit and use the activation churn for the deposit churn display and the exit churn for the API exit-queue estimate. Claude-Session: https://claude.ai/code/session_018rnAaHWq9mkEHdK7KVBi97
There was a problem hiding this comment.
Switches the pending-deposits tooltip, deposits page header and network_overview API from the shared Electra activation/exit churn limit to the Gloas-specific activation churn for the deposit display, and adds GetExitChurnLimit (uncapped since Gloas) for the exit-queue estimate. The new functions match the upstream get_activation/get_exit_churn_limit spec exactly (verified against consensus-specs), mirror an already-merged implementation in indexer/beacon/statetransition/state.go, preserve pre-Gloas behavior via fallback, and the unit test's expectations are correct. Clean.
Reviewed 5 changed file(s) @ 437d9da7 — no blocking issues found.
"Perfect is the enemy of good." — Voltaire
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The pending-deposits tooltip on the index page (and the deposits page header /
network_overviewAPI) showed a churn limit computed with the Electraget_activation_exit_churn_limit(CHURN_LIMIT_QUOTIENT = 2^16), while the queue time estimate next to it already used the Gloasget_activation_churn_limit(EIP-8061,CHURN_LIMIT_QUOTIENT_GLOAS = 2^15). Between ~4.2M and ~16.8M ETH total active balance the displayed "X ETH per epoch" understated the real activation churn by up to 2x and disagreed with the estimate.handlers/index.go,handlers/deposits.go: churn label usesGetActivationChurnLimithandlers/api/network_overview_v1.go:ether_churn_per_dayuses the activation churn; the exit-queue estimate uses the newGetExitChurnLimit(Gloas exit churn has no 256 ETH cap, so e.g. mainnet is ~1068 vs 256 ETH/epoch)clients/consensus/chainstate.go: newGetExitChurnLimit, falling back to the shared Electra limit pre-GloasNo visible change on small devnets (both formulas hit the 128 ETH floor) or on mainnet-scale deposit churn (both hit the 256 ETH cap).
Test plan
go build ./...,go vetgo test ./clients/consensus/ -run Churnhttps://claude.ai/code/session_018rnAaHWq9mkEHdK7KVBi97