Skip to content

Leios: add EB announcement diffusion (but don't otherwise leverage them yet) - #2132

Merged
ch1bo merged 31 commits into
leios-prototypefrom
nfrisby/leios-introduce-announcements
Jul 31, 2026
Merged

Leios: add EB announcement diffusion (but don't otherwise leverage them yet)#2132
ch1bo merged 31 commits into
leios-prototypefrom
nfrisby/leios-introduce-announcements

Conversation

@nfrisby

@nfrisby nfrisby commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

This PR relates to input-output-hk/ouroboros-leios#772 but doesn't close it.

  • That Issue also deserves documentation update.
  • This PR only adds generation and diffusion of announcements. It does not yet integrate them into the other Leios components that should be sensitive to them (LeiosFetch + LeiosVoting, off the top of my head). Generating and diffusing them is necessary first step.

I recommend reviewers start with these three modules---they're new, polymorphic, and entirely pure.

  • LeiosDemoLogic.Announcements
  • LeiosDemoLogic.Announcements.ElBimap
  • LeiosDemoLogic.Announcements.Validate (not as polymorphic as those two, but still blk-agnostic)

The rest of this PR is for the most part arranging to call this core logic from the correct places---the major exception to that characterization is that some important logic is added in LeiosDemoLogic---it's at least starting there instead of these three modules because is impure.

@nfrisby

nfrisby commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

This PR is in draft for two reasons:

edit: PR IntersectMBO/typed-protocols#93 superseded IntersectMBO/typed-protocols#92

edit: these have been fixed, and this PR is no longer in draft

@nfrisby nfrisby left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Self review of everything except the LeiosDemoLogic diff---which is going to get a lot attention from reviewers.

Comment thread ouroboros-consensus/src/ouroboros-consensus/LeiosDemoOnlyTestNotify.hs Outdated
Comment thread ouroboros-consensus/src/ouroboros-consensus/LeiosDemoTypes.hs
@nfrisby nfrisby changed the title Nfrisby/leios introduce announcements Leios: add EB announcement diffusion (but don't otherwise leverage them yet) Jul 17, 2026
@nfrisby
nfrisby requested a review from ch1bo July 17, 2026 12:54
@ch1bo ch1bo linked an issue Jul 17, 2026 that may be closed by this pull request
Comment thread cabal.project Outdated
cardano-diffusion
network-mux

-- Points to nfrisby-antipipelining1 tag

@nfrisby nfrisby Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@nfrisby
nfrisby force-pushed the nfrisby/leios-introduce-announcements branch from 93ef6c9 to dcd5e97 Compare July 17, 2026 13:08
nfrisby added a commit that referenced this pull request Jul 21, 2026
…ges (#2142)

- Payload is now Header blk instead of ().
- Handler merely traces a message with the header's Point instead of
throwing an error.

This PR makes a tiny change that will allow use to run the much more
significant patch in PR
#2132 in the
testnet without constant disconnections, which is desirable for
validating that PR before merging it.
@nfrisby nfrisby added the Leios label Jul 22, 2026
@nfrisby nfrisby moved this to 👀 In review in Consensus Team Backlog Jul 22, 2026
@nfrisby

nfrisby commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

See https://github.com/input-output-hk/ouroboros-leios/pull/1005/changes#r3673377092 for normative text that scopes over this PR (and more)

@nfrisby
nfrisby marked this pull request as ready for review July 29, 2026 10:46
nfrisby added 13 commits July 30, 2026 07:42
Prior to this commit, a peer that never sent
MsgLeiosNotificationRequestNext would have caused a space leak: it's
"subscription" TChans would have grown without bound.

A different fix would have been to use a bounded queue, whose length
is the maximum number of requests we'd allow from a peer before we
sent any responses. That would be simpler, but this new
"AntiPipelining" mechanism provides more precise back-pressure.

Instead of constantly draining the TChans, it'd be preferable for them
to not even exist as an intermediate buffer; that's a subsequent
refinement.
nfrisby added 17 commits July 30, 2026 07:44
…ation

For example: don't validate RbHeader fields that are irrelevant to the
EbAnnouncement (eg size of the body).

Fixes a bug: the previous classification of header validation errors as
tolerable-or-not was buggy, because Praos header validation short-circuits
(TPraos does not short-circuit).
SlotBeforeImmutableTip already catches announcements that are too old to even
validate. But we want even tighter restrictions than that, since stale
announcements are unhelpful.
@nfrisby
nfrisby force-pushed the nfrisby/leios-introduce-announcements branch from 7ac5100 to 827e083 Compare July 30, 2026 13:54
@nfrisby

nfrisby commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

I rebased onto 0acc63c84 - (origin/leios-prototype) Fix EB diffusion of already complete closures (#2144) (6 days ago) <Sebastian Nagel>

edit: I think https://github.com/IntersectMBO/cardano-node/tree/nfrisby/leios-introduce-announcements should be able to build using the new tip of this PR

2c6306d34 - (HEAD -> nfrisby/leios-introduce-announcements, origin/nfrisby/leios-introduce-announcements) WIP update SRP for recently-rebased tip of PR 2132 (60 seconds ago) <Nicolas Frisby>
d3dbca5a6 - WIP add age to EbAnnouncement tracers (37 minutes ago) <Nicolas Frisby>
148f62b49 - LeiosNotify Tracing: include identifying information in MsgLeiosBlockAnnouncement TraceSendRecv object (37 minutes ago) <Nicolas Frisby>
d4aaccd4d - WIP add EbAnnouncment tracers (37 minutes ago) <Nicolas Frisby>
7002fd091 - (origin/leios-prototype) Update SRPs to include bls key registration (6 days ago) <Sebastian Nagel>

@ch1bo ch1bo 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.

:shipit:

@ch1bo
ch1bo merged commit 5d1bd36 into leios-prototype Jul 31, 2026
10 of 18 checks passed
@ch1bo
ch1bo deleted the nfrisby/leios-introduce-announcements branch July 31, 2026 08:28
@github-project-automation github-project-automation Bot moved this from 👀 In review to ✅ Done in Consensus Team Backlog Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

Prototype EB announcements

2 participants