Skip to content

Migrate EB announcement and certification flag to Praos header#1978

Draft
bladyjoker wants to merge 3 commits intoleios-prototypefrom
bladyjoker/leios-in-praos
Draft

Migrate EB announcement and certification flag to Praos header#1978
bladyjoker wants to merge 3 commits intoleios-prototypefrom
bladyjoker/leios-in-praos

Conversation

@bladyjoker
Copy link
Copy Markdown
Contributor

@bladyjoker bladyjoker commented Apr 13, 2026

Resolves input-output-hk/ouroboros-leios#837

DONE

  • Move the EB announcement from the Ledger Block to the Praos Header
  • Move the Certifies flag from the Ledger Block to the Praos Header
    • It's a data BodyType = LedgerBlock | LeiosCertificate which would better be named data RbType = LedgerRbType | CertRbType or data BodyType = LedgerBlockBody | CertificateBody
  • Move the Certificate from the Ledger into Consensus
    • Ugh for now I'm keeping it in the Ledger because it's easier, albeit not ideal
  • Update to Ledger with backward compatible Block codec

NOTES

  • ResolveLeiosBlock machinery is a hack that works! We're blindly guessing that blk might contain something that can be resolved like a LeiosCertificate and it returns a blk that hopefully has a fully resolved blk that can be applied. Imo a morally correct approach would to have data RankingBlock blk = LedgerRb blk | CertRb LeiosCertificate which we can use to make such distinction and manage the resolution process here and elsewhere in the abstract code base where that distinction matters (like the ForgeLoop)
  • applyBlock currently does resolveLeiosBlock and then tickAndReapply which is not incorrect as in the case of there being a Leios Cert, we need to base changes from the associated EB on top of the prev Ledger State (I think that means we shouldn't tick?)
  • Apropos tx-centrifuge it doesn't seem like there's any way around breaking the API BlockFetch. For the current pragmatic solutions we hide the Certificate behind the blk and therefore BlockFetch will happily return you a Certificate which will break tx-centrifuge. That being said, ChainSync is also necessarily having a breaking change since we added 2 new fields to the PraosHeader.

@bladyjoker bladyjoker force-pushed the bladyjoker/leios-in-praos branch from 75a2479 to 5e5a4d8 Compare April 15, 2026 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Leios Prototype] Migrate announcement and certifies flag from the Ledger Block into the Praos Header

1 participant