Skip to content

feat: add state transition counter metrics - #49

Merged
MegaRedHand merged 3 commits into
mainfrom
state-transition-metrics
Jan 26, 2026
Merged

MegaRedHand merged 3 commits into
mainfrom
state-transition-metrics

Conversation

@MegaRedHand

Copy link
Copy Markdown
Collaborator

No description provided.

Add Group 2 metrics from the leanMetrics specification:
- lean_state_transition_slots_processed_total: Count of processed slots
- lean_state_transition_attestations_processed_total: Count of processed attestations
- lean_finalizations_total: Total finalization events with result label

The metrics module is added to the state_transition crate and
instrumented in process_slots() and process_attestations().
@MegaRedHand
MegaRedHand merged commit 0d08cee into main Jan 26, 2026
2 checks passed
@MegaRedHand
MegaRedHand deleted the state-transition-metrics branch January 26, 2026 13:53
tcoratger pushed a commit to tcoratger/ethlambda that referenced this pull request Oct 30, 2026
…re check (lambdaclass#49)

Every signature check decompressed and subgroup-checked each signer's public
key from its compressed bytes. A mainnet attestation aggregate carries a whole
committee of keys, the same active keys sign again every epoch, and that
repeated validation was nearly all of an aggregate's verification cost. With
aggregates validated in p2p, a slot's burst of them saturated rayon's pool on a
16-core follower and about 15% answered IGNORE(overloaded) unchecked; block
import saturates the same pool when a block's attestations are checked.

`key_validate` is a pure function of the key's bytes, so its successful answers
are now memoized in one process-wide cache keyed by those bytes. Keying by the
bytes rather than by validator index is what makes a hit exactly a fresh call's
answer on every fork, since an index names whatever key a given state says it
does. A key that fails is never cached, and the cache is bounded, so inputs
that are not a registry cannot grow it without limit. Hits resolve on the
calling thread and only misses are validated in parallel, so concurrent
gossip checks no longer queue already-validated keys on rayon.

`fast_aggregate_verify` over 512 signers: 4.7 ms with every key a miss
(validated across cores), 0.8 ms on one thread with every key a hit.
tcoratger pushed a commit to tcoratger/ethlambda that referenced this pull request Oct 30, 2026
Brings in lambdaclass#48, lambdaclass#19, lambdaclass#47 and lambdaclass#49. Both conflicts were tests added on both
sides of gossip/mod.rs and gossip/test_support.rs: kept all of them and
merged the test_support module doc to name every module it serves.
tcoratger pushed a commit to tcoratger/ethlambda that referenced this pull request Oct 30, 2026
…justifications

Picks up beacon-chain-integration (lambdaclass#48, lambdaclass#19, lambdaclass#47, lambdaclass#49) through the base
branch. Clean merge.
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