Skip to content

DONOTMERGE full EB diffusion specification - #2093

Draft
nfrisby wants to merge 16 commits into
leios-prototypefrom
nfrisby/redo-leios-fetch-with-spec
Draft

DONOTMERGE full EB diffusion specification#2093
nfrisby wants to merge 16 commits into
leios-prototypefrom
nfrisby/redo-leios-fetch-with-spec

Conversation

@nfrisby

@nfrisby nfrisby commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

This PR is the result of my past couple weeks of writing up the full EB diffusion spec now that we sorted out our decision rules earlier this month.

(I fully expect these files to relocate before we merge this; this is just where Claude happened to spawn them.)

Protocol storms are not addressed yet, but Giorgos has a proposal for that I'll finally read Real Soon Now. I'm hoping it won't be too disruptive to integrate it here.

Current status of this PR:

  • I wrote Spec.md first. I recommend reading that first while ignoring §3.
    • One key idea: this text includes necessary behaviors to compensate for L_hdr violations. We expect them to be rare, but certainly not impossible. The main point being: a node might need to download two EBs for some elections: the first it saw announced and also the one that got certified: if L_hdr is respected, then those must be the same EB.
    • The "full Skew Fallback" is trying to recover more quickly/aggressively when L_hdr is violated.
    • The RefModel.hs doesn't do full Skew Fallback (yet).
  • Then I started on RefModel.hs and Claude and I did a lot of iteration there. SPEC-DRIFT.md is a (very verbose) TODO list of the changes that need to be folded back into Spec.md. But I think the key ideas in Spec.md survived.
  • One mudpit I got slowed down in: deduping the work for different announcements of the exact same EB body (ie same hash) ended up being quite a lot of details. I think we could drop a chunk of complexity we didn't try to handle that (ideally rare) scenario.

@nfrisby
nfrisby requested a review from ch1bo June 28, 2026 23:54

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

Have not gotten further :/

Comment on lines +17 to +20
cert's identity, since a cert binds to its `RbHeader`, not merely the `EbHash` it names). An announcement is
an `RbHeader` (it announces an EB and declares its body and
closure sizes); `HeaderHash` is its hash, and the whole header travels on the wire and is validated
(signature/KES, etc.) on receipt — `ebHash`, `bodySize`, and `closureSize` are read from the validated

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

An announcement is an RbHeader (it announces an EB and declares its body and closure sizes); HeaderHash is its hash, and the whole header travels on the wire and is validated (signature/KES, etc.) on receipt — ebHash, bodySize, and closureSize are read from the validated header.

Would it not make more sense to define an Announcement, along with it's requirements:

  • references a Praos block/chain to extend (header hash)
  • references an EB that aims to extend
  • references a slot that is used to validate the announced closure
  • is authenticated and bound to an Election
  • is small enough to be broadcast (< 1kB encoded)
  • is quick to validate (< 1ms)

Then, the extended Praos block header (= RbHeader) is just the realization of an Announcement?


data Ifaces m = Ifaces { ifDb :: LeiosDb m, ifTxc :: TxCache m, ifMem :: Mempool m }

-- TODO consider having the decision logic send body requests to

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.

Just FYI: this TODO's text is the result of my tightly-timeboxed attempt at considering the trade-off of switching away from "offers" to "pre-requests". @ch1bo reminded me of this alternative during our 1:1 yesterday. (If my recollection is accurate, I think the idea originated from discussions at Buidler Fest in March 2026 (which I didn't attend).)

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.

2 participants