feat(events): add block_gossip chain event#535
Draft
MegaRedHand wants to merge 2 commits into
Draft
Conversation
MegaRedHand
force-pushed
the
feat/events-attestation-aggregate
branch
from
July 21, 2026 22:44
51184e6 to
5be589f
Compare
Add the block_gossip topic to the /lean/v0/events stream, the analog of the beacon block_gossip event: a block seen on the network before import (import may pend it while its parent chain is fetched). Emitted from the blockchain actor's NewBlock handler rather than a second P2P-side publisher, so the actor stays the sole event publisher and the write flow stays one-directional. Fires for both gossip'd and by-root-fetched blocks, since both re-enter through NewBlock. Ungated like block (not recency-gated), so subscribers can watch sync progress. Low-rate (one per block), so the payload is built unconditionally behind emit's no-subscriber guard.
MegaRedHand
force-pushed
the
feat/events-block-gossip
branch
from
July 22, 2026 13:35
e17223c to
a492c00
Compare
MegaRedHand
changed the base branch from
feat/events-attestation-aggregate
to
main
July 22, 2026 13:35
This was referenced Jul 22, 2026
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.
Continues the chain-event pub-sub series (#516 / #517 / #518, all merged). Adds the beacon
block_gossipanalog.Event added
block_gossip{ slot, block }Notes
NewBlockhandler, not a second P2P-side publisher, so the actor stays the sole event publisher and the write flow stays one-directional (a core requirement of the series' design).NewBlock. Import may pend the block while its parent chain is fetched, so this precedes import.block(not recency-gated), so subscribers can watch sync progress. Low-rate (one per block), so the payload is built unconditionally behindemit's no-subscriber guard.Testing
cargo fmt,cargo clippy -p ethlambda-blockchain -p ethlambda-rpc(clean), blockchain lib + rpc events tests pass.Independent PR, based off
main. One of three sibling PRs continuing the series — alongside #533 (chain_reorg/safe_target) and #534 (attestation/aggregate), each independently based offmain. They touch overlapping regions ofevents.rs/docs/rpc.md, so whichever two merge later will each need a small conflict rebase. Opened as draft.