Skip to content

[Leios prototype] Migrate EB announcement to Praos header#1978

Open
bladyjoker wants to merge 15 commits intoleios-prototypefrom
bladyjoker/leios-in-praos
Open

[Leios prototype] Migrate EB announcement to Praos header#1978
bladyjoker wants to merge 15 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
    • Add EbAnnouncement type that holds an EbHash and its size!
    • Remove the certifies field
  • Move the LeiosState from the Ledger to the ChainDepState
    • Adds 'cummulative' EB size tracking in the state (TODO: Grafana this)
  • 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
  • Introduces ForgeBlockArgs for my own sanity
  • FIX: EB only diffused if announced in forge

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 new fields to the PraosHeader.

@bladyjoker bladyjoker self-assigned this Apr 13, 2026
@bladyjoker bladyjoker closed this Apr 15, 2026
@bladyjoker bladyjoker force-pushed the bladyjoker/leios-in-praos branch from 2db7298 to 5c62210 Compare April 15, 2026 13:20
@bladyjoker bladyjoker reopened this Apr 15, 2026
@bladyjoker bladyjoker force-pushed the bladyjoker/leios-in-praos branch 2 times, most recently from 75a2479 to 5e5a4d8 Compare April 15, 2026 16:39
@bladyjoker bladyjoker requested review from ch1bo and dnadales April 16, 2026 12:08
@bladyjoker bladyjoker marked this pull request as ready for review April 16, 2026 12:09
lift $
leiosDecideForgeType blockForging $
LeiosDecideForgeTypeArgs
{ ldftaChainDepState = headerStateChainDep (headerState unticked)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

ldfta looks like your cat walked around on your keyboard 🐱

@bladyjoker bladyjoker changed the title Migrate EB announcement and certification flag to Praos header [Leios prototype] Migrate EB announcement and certification flag to Praos header Apr 21, 2026
@bladyjoker bladyjoker changed the title [Leios prototype] Migrate EB announcement and certification flag to Praos header [Leios prototype] Migrate EB announcement to Praos header Apr 21, 2026
@bladyjoker bladyjoker force-pushed the bladyjoker/leios-in-praos branch 2 times, most recently from 022eb48 to 6cfaa5d Compare April 21, 2026 13:41
@bladyjoker bladyjoker force-pushed the bladyjoker/leios-in-praos branch from 6cfaa5d to 1e7c387 Compare April 22, 2026 11:57
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

2 participants