Skip to content

Use Gloas activation/exit churn limits for queue churn display - #856

Open
barnabasbusa wants to merge 1 commit into
masterfrom
bbusa/gloas-churn-tooltip
Open

Use Gloas activation/exit churn limits for queue churn display#856
barnabasbusa wants to merge 1 commit into
masterfrom
bbusa/gloas-churn-tooltip

Conversation

@barnabasbusa

Copy link
Copy Markdown
Collaborator

Summary

The pending-deposits tooltip on the index page (and the deposits page header / network_overview API) showed a churn limit computed with the Electra get_activation_exit_churn_limit (CHURN_LIMIT_QUOTIENT = 2^16), while the queue time estimate next to it already used the Gloas get_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 uses GetActivationChurnLimit
  • handlers/api/network_overview_v1.go: ether_churn_per_day uses the activation churn; the exit-queue estimate uses the new GetExitChurnLimit (Gloas exit churn has no 256 ETH cap, so e.g. mainnet is ~1068 vs 256 ETH/epoch)
  • clients/consensus/chainstate.go: new GetExitChurnLimit, falling back to the shared Electra limit pre-Gloas
  • Unit test covering floor / mid-range / cap pre- and post-Gloas

No 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 vet
  • go test ./clients/consensus/ -run Churn

https://claude.ai/code/session_018rnAaHWq9mkEHdK7KVBi97

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

@redpandabot redpandabot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant