Support Dijkstra protocol parameters - #1309
Open
palas wants to merge 1 commit into
Open
Conversation
palas
requested review from
CarlosLopezDeLara,
Jimbo4350,
carbolymer,
disassembler and
erikd
as code owners
August 22, 2026 00:44
palas
force-pushed
the
support-dijkstra-pparams
branch
from
August 22, 2026 00:46
08006cc to
63c8ee2
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Extends cardano-api’s era-based protocol-parameter update machinery to support DijkstraEra, following the existing Conway-era pattern and wiring it into conversions and generators.
Changes:
- Added
DijkstraEraBasedProtocolParametersUpdateplusIntroducedInDijkstraPParamsand correspondingPParamsUpdateconversion helpers. - Implemented
fromLedgerPParamsUpdatesupport forDijkstraEraand extendedcreateEraBasedProtocolParamUpdateto include the new Dijkstra parameters. - Added a
Semigroupinstance forLedger.DijkstraPParams StrictMaybeand enabled Dijkstra generators in the test-gen layer.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| cardano-api/src/Cardano/Api/ProtocolParameters.hs | Adds Dijkstra-era protocol-parameter update constructor, new Dijkstra-introduced parameter record, and ledger conversion in both directions. |
| cardano-api/src/Cardano/Api/Internal/Orphans/Misc.hs | Adds Semigroup instance for Ledger.DijkstraPParams StrictMaybe mirroring the Conway pattern (including NoUpdate protocol version). |
| cardano-api/gen/Test/Gen/Cardano/Api/ProtocolParameters.hs | Enables Dijkstra-era generation and introduces generators for the new Dijkstra-introduced parameters. |
| .changes/20260822_120000_cardano-api_palas_dijkstra_protocol_parameters.yml | Documents the change (but needs reclassification to include breaking due to new public constructor). |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Add DijkstraEraBasedProtocolParametersUpdate with IntroducedInDijkstraPParams (the reference-script size and cost parameters new in Dijkstra), the fromLedgerPParamsUpdate conversion back into it, a Semigroup instance for DijkstraPParams updates and generators. The protocol version itself is not updatable in Dijkstra. Co-Authored-By: Konstantinos Lambrou-Latreille <konstantinos.lambrou@iohk.io>
palas
force-pushed
the
support-dijkstra-pparams
branch
from
August 22, 2026 01:00
63c8ee2 to
810540e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Add
DijkstraEraBasedProtocolParametersUpdatewithIntroducedInDijkstraPParams(the reference-script size and cost parameters new in Dijkstra), thefromLedgerPParamsUpdateconversion back into it, aSemigroupinstance forDijkstraPParamsupdates and generators. The protocol version itself is not updatable in Dijkstra.How to trust this PR
This is Conway's pattern extended by one era.
The new constructor, the
IntroducedInDijkstraPParamsrecord, its two conversion helpers, theSemigroupinstance and the generators each mirror theirConwaycounterpart line-for-line, including theNoUpdateprotocol-version arm, which is copied from theConwayinstance directly above it.The only genuinely new content is the four Dijkstra parameters, and those are read and written through the ledger's own
ppu…Llenses, so there is no hand-rolled logic to check. Two previously-erroring TODO stubs are filled (fromLedgerPParamsUpdateand the generator dispatch), and the new generators plug into the existing era-generic test machinery.Checklist
.changes/