Skip to content

[Peras 63] Add PerasState to ExtLedgerState - #2230

Open
agustinmista wants to merge 3 commits into
peras/rewire-global-blocksupportsperas-typesfrom
peras/add-peras-state-to-ext-ledger-state
Open

[Peras 63] Add PerasState to ExtLedgerState#2230
agustinmista wants to merge 3 commits into
peras/rewire-global-blocksupportsperas-typesfrom
peras/add-peras-state-to-ext-ledger-state

Conversation

@agustinmista

@agustinmista agustinmista commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

This PR:

  • Adds PerasState to ExtLedgerState and its ticked form, tracking the Peras epoch-context resolver and latest on-chain Peras certificate round.
  • Updates ticking to advance the Peras resolver (block application now detects Peras certificates and monotonically updates the cached latest certificate round).
  • Adds Ouroboros.Consensus.Peras.Voting.Mock, providing mock voting-committee input derived from the mock ledger’s pool-stake distribution for Peras-enabled test blocks.
  • Adds a handle for reading the resolver from the current ledger state (mkPerasEpochContextResolverHandle).
  • Updates all production, mock, and test node initialisation paths to construct Peras state.
  • Extends ExtLedgerState CBOR/disk serialisation to persist Peras state (backwards compatible).
  • Threads the required Peras, epoch-context, and hard-fork constraints through LedgerDB, ChainDB, node runtime, hard-fork combinators, DB analyser, benchmarks, and test infrastructure.
  • Updates ChainDB models/state-machine tests and test blocks, including mock voting-committee support and supporting instances (Show, Eq, NoThunks, CBOR, etc.).
  • Regenerates the ten ExtLedgerState golden files.

Please note that some of the new instances required here are placeholders to be updated in tandem with getting rid of the degenerate BlockSupportsPeras instance.

Moreover, the bulk of the changes happen in a handful of files, the rest being mostly plumbing. Enabling Hide whitespace in the diff view helps a bit :)

@agustinmista
agustinmista force-pushed the peras/add-peras-state-to-ext-ledger-state branch 3 times, most recently from 5bb6779 to 7745ce6 Compare August 24, 2026 13:46
@agustinmista agustinmista changed the title [Peras 62] Add PerasState to ExtLedgerState [Peras ?] Add PerasState to ExtLedgerState Aug 24, 2026
@agustinmista agustinmista self-assigned this Aug 24, 2026
@agustinmista agustinmista changed the title [Peras ?] Add PerasState to ExtLedgerState [Peras 63] Add PerasState to ExtLedgerState Aug 24, 2026
@agustinmista agustinmista moved this to Waiting for Client ( IoG ) review ( Q ) in cardano-peras Aug 24, 2026
@agustinmista
agustinmista force-pushed the peras/add-peras-state-to-ext-ledger-state branch 2 times, most recently from 7f0317d to aaf79c2 Compare August 25, 2026 09:50
@agustinmista
agustinmista changed the base branch from peras/default-blocksupportsperas-operations to peras/rewire-global-blocksupportsperas-types August 25, 2026 09:53
@agustinmista
agustinmista force-pushed the peras/add-peras-state-to-ext-ledger-state branch 2 times, most recently from dd94b59 to 9c8ee0b Compare August 25, 2026 11:57
@agustinmista
agustinmista marked this pull request as ready for review August 25, 2026 13:44
agustinmista and others added 3 commits August 31, 2026 15:24
Co-authored-by: Agustin Mista <agustin.mista@tweag.io>
Co-authored-by: Thomas BAGREL <thomas.bagrel@tweag.io>
Co-authored-by: Nicolas BACQUEY <nicolas.bacquey@tweag.io>
@agustinmista
agustinmista force-pushed the peras/add-peras-state-to-ext-ledger-state branch from 7ca1f82 to a9a0d38 Compare August 31, 2026 13:28
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.

1 participant