Repository navigation
feat: add peer connection metrics - #48
Merged
Merged
Conversation
Add the following metrics from the leanMetrics specification: - lean_connected_peers: Gauge with client label tracking connected peer count - lean_peer_connection_events_total: Counter with direction and result labels - lean_peer_disconnection_events_total: Counter with direction and reason labels Connection events are tracked in the p2p event loop by handling SwarmEvent::ConnectionEstablished, SwarmEvent::ConnectionClosed, SwarmEvent::OutgoingConnectionError, and SwarmEvent::IncomingConnectionError.
tcoratger
pushed a commit
to tcoratger/ethlambda
that referenced
this pull request
Oct 30, 2026
…ot (lambdaclass#48) hold_block_for_columns asked peers for the missing columns the moment it held a block. A block's columns are published alongside it, so at that moment the rest are almost always still in flight on gossip, and the peers asked usually do not have them yet either: they answer empty and the lookup burns its attempts. On the mainnet followers at the tip, gossip completed every held block within 0.3 s (p99), and stored columns equalled gossip-decoded columns, so the by-root fetch contributed nothing while putting hundreds of mostly empty requests an hour on the wire. The per-slot re-drive already re-asks for every held block's missing columns. Make it the only asker: a new hold waits for gossip, and the first tick after it asks for whatever is still missing.
tcoratger
pushed a commit
to tcoratger/ethlambda
that referenced
this pull request
Oct 30, 2026
…next slot (lambdaclass#52) lambdaclass#48 left every held block's columns to gossip until the next slot's redrive, because at the tip gossip completes a held block within a fraction of a second and an immediate by-root ask only raced it. A block that is already older than the current slot has no gossip left to wait for: its columns went out long before this node held it. Range-synced catch-up is exactly that case. After a fresh checkpoint sync on a mainnet follower, the 72 blocks from before the restart were each held missing every custody column and each waited out a redrive, so the follower imported about one block per slot and its lag stayed flat for eight minutes. A block held at a slot older than the current one now asks by root at hold time. A block at or ahead of the current slot keeps lambdaclass#48's behavior. The condition is the block's age rather than its source, since age is what decides whether gossip can still deliver the columns. Repeated holds of one block cost nothing extra: the p2p side merges a repeat ask into the lookup already in flight for that root.
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.
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.
This PR adds the "Network Metrics" from leanMetrics:
lean_connected_peerslean_peer_connection_events_totallean_peer_disconnection_events_total