Home / KtorZ / cardano-ogmios
May 13, 11-12 PM (0)
May 13, 12-1 PM (0)
May 13, 1-2 PM (0)
May 13, 2-3 PM (0)
May 13, 3-4 PM (0)
May 13, 4-5 PM (0)
May 13, 5-6 PM (0)
May 13, 6-7 PM (7)
May 13, 7-8 PM (0)
May 13, 8-9 PM (1)
May 13, 9-10 PM (0)
May 13, 10-11 PM (0)
May 13, 11-12 AM (0)
May 14, 12-1 AM (0)
May 14, 1-2 AM (0)
May 14, 2-3 AM (0)
May 14, 3-4 AM (0)
May 14, 4-5 AM (11)
May 14, 5-6 AM (0)
May 14, 6-7 AM (0)
May 14, 7-8 AM (0)
May 14, 8-9 AM (0)
May 14, 9-10 AM (0)
May 14, 10-11 AM (0)
May 14, 11-12 PM (0)
May 14, 12-1 PM (0)
May 14, 1-2 PM (0)
May 14, 2-3 PM (0)
May 14, 3-4 PM (0)
May 14, 4-5 PM (0)
May 14, 5-6 PM (0)
May 14, 6-7 PM (0)
May 14, 7-8 PM (0)
May 14, 8-9 PM (0)
May 14, 9-10 PM (1)
May 14, 10-11 PM (0)
May 14, 11-12 AM (1)
May 15, 12-1 AM (0)
May 15, 1-2 AM (1)
May 15, 2-3 AM (2)
May 15, 3-4 AM (0)
May 15, 4-5 AM (0)
May 15, 5-6 AM (0)
May 15, 6-7 AM (0)
May 15, 7-8 AM (0)
May 15, 8-9 AM (0)
May 15, 9-10 AM (0)
May 15, 10-11 AM (0)
May 15, 11-12 PM (0)
May 15, 12-1 PM (0)
May 15, 1-2 PM (0)
May 15, 2-3 PM (0)
May 15, 3-4 PM (0)
May 15, 4-5 PM (0)
May 15, 5-6 PM (0)
May 15, 6-7 PM (0)
May 15, 7-8 PM (0)
May 15, 8-9 PM (0)
May 15, 9-10 PM (0)
May 15, 10-11 PM (0)
May 15, 11-12 AM (0)
May 16, 12-1 AM (0)
May 16, 1-2 AM (0)
May 16, 2-3 AM (0)
May 16, 3-4 AM (0)
May 16, 4-5 AM (0)
May 16, 5-6 AM (0)
May 16, 6-7 AM (0)
May 16, 7-8 AM (0)
May 16, 8-9 AM (0)
May 16, 9-10 AM (0)
May 16, 10-11 AM (0)
May 16, 11-12 PM (0)
May 16, 12-1 PM (0)
May 16, 1-2 PM (0)
May 16, 2-3 PM (0)
May 16, 3-4 PM (0)
May 16, 4-5 PM (0)
May 16, 5-6 PM (0)
May 16, 6-7 PM (0)
May 16, 7-8 PM (0)
May 16, 8-9 PM (0)
May 16, 9-10 PM (5)
May 16, 10-11 PM (2)
May 16, 11-12 AM (0)
May 17, 12-1 AM (2)
May 17, 1-2 AM (0)
May 17, 2-3 AM (0)
May 17, 3-4 AM (0)
May 17, 4-5 AM (0)
May 17, 5-6 AM (0)
May 17, 6-7 AM (0)
May 17, 7-8 AM (0)
May 17, 8-9 AM (0)
May 17, 9-10 AM (0)
May 17, 10-11 AM (0)
May 17, 11-12 PM (0)
May 17, 12-1 PM (0)
May 17, 1-2 PM (0)
May 17, 2-3 PM (0)
May 17, 3-4 PM (0)
May 17, 4-5 PM (0)
May 17, 5-6 PM (0)
May 17, 6-7 PM (1)
May 17, 7-8 PM (1)
May 17, 8-9 PM (0)
May 17, 9-10 PM (0)
May 17, 10-11 PM (0)
May 17, 11-12 AM (0)
May 18, 12-1 AM (0)
May 18, 1-2 AM (0)
May 18, 2-3 AM (0)
May 18, 3-4 AM (0)
May 18, 4-5 AM (0)
May 18, 5-6 AM (0)
May 18, 6-7 AM (0)
May 18, 7-8 AM (0)
May 18, 8-9 AM (0)
May 18, 9-10 AM (0)
May 18, 10-11 AM (0)
May 18, 11-12 PM (0)
May 18, 12-1 PM (0)
May 18, 1-2 PM (0)
May 18, 2-3 PM (0)
May 18, 3-4 PM (0)
May 18, 4-5 PM (0)
May 18, 5-6 PM (0)
May 18, 6-7 PM (0)
May 18, 7-8 PM (0)
May 18, 8-9 PM (0)
May 18, 9-10 PM (0)
May 18, 10-11 PM (0)
May 18, 11-12 AM (0)
May 19, 12-1 AM (0)
May 19, 1-2 AM (0)
May 19, 2-3 AM (0)
May 19, 3-4 AM (0)
May 19, 4-5 AM (8)
May 19, 5-6 AM (0)
May 19, 6-7 AM (0)
May 19, 7-8 AM (0)
May 19, 8-9 AM (0)
May 19, 9-10 AM (0)
May 19, 10-11 AM (0)
May 19, 11-12 PM (0)
May 19, 12-1 PM (0)
May 19, 1-2 PM (0)
May 19, 2-3 PM (0)
May 19, 3-4 PM (0)
May 19, 4-5 PM (0)
May 19, 5-6 PM (0)
May 19, 6-7 PM (0)
May 19, 7-8 PM (0)
May 19, 8-9 PM (1)
May 19, 9-10 PM (0)
May 19, 10-11 PM (1)
May 19, 11-12 AM (0)
May 20, 12-1 AM (0)
May 20, 1-2 AM (0)
May 20, 2-3 AM (0)
May 20, 3-4 AM (0)
May 20, 4-5 AM (0)
May 20, 5-6 AM (0)
May 20, 6-7 AM (0)
May 20, 7-8 AM (0)
May 20, 8-9 AM (0)
May 20, 9-10 AM (0)
May 20, 10-11 AM (0)
May 20, 11-12 PM (0)
45 commits this week May 13, 2026 - May 20, 2026
WIP: stub out source to compile against new deps
ogmios:lib:ogmios now builds end-to-end (59/59 modules) against
cardano-node 11.0.1 / ouroboros-consensus 3.0.1 / ouroboros-network 1.1
/ cardano-ledger-core 1.20 / -conway 1.22.1 / -alonzo 1.15.

This commit only carries _mechanical_ adaptation + stubs marked with
`TODO(dijkstra): ...` `error` calls. None of the stubbed code paths are
functional at runtime — they exist solely to push the library through
typecheck so we can see the full surface area of what the dep bump
breaks before we start fixing things in earnest.

100 TODO(dijkstra) markers across 24 files. Major themes:
  - Sh.body/wits/auxiliaryData -> Sh.stBody/stWits/stAuxData
    (Alonzo: atBody/atWits/atAuxData/atIsValid; Conway: same pattern)
  - Sh.txSeqTxns'/Al.txSeqTxns -> shelleyBlockBodyTxs/alonzoBlockBodyTxs
  - Cardano.Ledger.Shelley.BlockChain  -> .BlockBody
  - Cardano.Ledger.Alonzo.TxSeq        -> .BlockBody
  - Cardano.Ledger.PoolParams          -> Cardano.Ledger.State
  - ppRewardAccount -> sppAccountAddress; pp* -> spp* prefix
  - serialiseRewardAccount -> serialiseAccountAddress
  - RewardAccount -> AccountAddress (constructor + type)
  - upgradeTxBody moved Cardano.Ledger.Core -> Cardano.Ledger.Api.Tx.Body
  - asTreasury/asReserves -> Ledger.casTreasury/casReserves
  - Genesis (KeyRole) renamed to GenesisRole; type data KeyRole now
    type-level only, so 'StakePool/'Staking/'Witness/'DRepRole/etc.
    drop the tick prefix
  - Ouroboros.Network.NodeToClient[.Version] -> Cardano.Network.NodeToClient
    (cardano-diffusion); ogmios src goes through the local
    Cardano.Network.Protocol.NodeToClient re-export
  - NetworkConnectTracers: nctMuxTracer -> nctMuxTracers, retyped to
    Mx.TracersWithBearer; outer type gains an `m` parameter
  - CardanoCodecConfig gains a new Dijkstra slot
  - new MonadEvaluate m constraint propagated through localChainSync /
    localTxSubmission / localTxMonitor / localStateQuery / mkClient /
    connectHealthCheckClient / newWebSocketApp; NFData a on localTxMonitor
  - App monad derives MonadEvaluate
  - Sh.Tx/Sh.ShelleyTx kinds gained a TxLevel param (use TopTx)
  - Sh.RewardAccount, Ledger.PoolParams, Sh.ShelleyTxBody, Al.AlonzoTxBody
    are now pattern synonyms, not types -> Ledger.AccountAddress /
    Ledger.StakePoolParams / Ledger.TxBody Ledger.TopTx era
  - Sh.WitVKey now in Cardano.Ledger.Keys.WitVKey
  - encodeTx now matches on (Sh.MkShelleyTx x) for Shelley; Allegra /
    Mary / Alonzo / Babbage / Conway equivalents stubbed (PR #461 uses
    bodyTxL/witsTxL/auxDataTxL lenses; not adopted here yet)
  - encodePParamsHKD stubbed in Shelley / Alonzo / Babbage / Conway —
    sppKeyDeposit etc. now return Compact Coin; signature needs an
    extra encodeCompact callback
  - encodeAuxiliaryData / encodeScript in Alonzo stubbed —
    Al.TimelockScript constructor removed in cardano-ledger-alonzo 1.15
  - encodeGenesis Alonzo stubbed — AlonzoGenesis field types changed
    (Maybe CostModels; Word32/Word16 vs Natural)
  - withoutFutureParameters in Configuration stubbed —
    UpgradeAlonzoPParams vs AlonzoExtraConfig
  - All era PredicateFailure encoders stubbed (Shelley / Allegra /
    Mary / Alonzo / Babbage / Conway) — NonEmpty / NonEmptySet
    container types in ledger 1.18.1+, plus many constructor renames
    (WithdrawalsNotInRewardsDELEGS removed, MissingRequiredSigners,
    TriesToForgeADA, StakeKeyHasNonZeroRewardAccountBalanceDELEG ->
    ...HasNonZeroAccountBalanceDELEG, etc.)
  - Rewards.rewardsProvenance / .circulation stubbed — ChainAccountState
    / ActiveStake / StakePoolSnapShot / NonZero Coin; mkPoolRewardInfo
    arity changed
  - Ledger.scriptPurposeInMostRecentEra stubbed — MostRecentEra is now
    Dijkstra, needs an extra upgradePlutusPurposeAsIx step plus a new
    AlonzoBasedEra arm
  - EraTranslation: `instance Upgrade AlonzoTx ConwayEra` commented
    out — AlonzoTx kind changed to `TxLevel -> Type -> Type`
  - Json.encodeTx / Json.encodeSubmitTransactionError stubbed —
    ApplyTxError is now a type only; pattern needs an accessor
  - keepRedundantConstraint era-guard in TxSubmission / Query / TxMonitor
    detuned (era constraint dropped) — must be re-armed against
    DijkstraEra once Cardano.Ledger.Dijkstra.Era is wired in
  - Dijkstra arms stubbed in fromEraIndex (Prelude), eraIndexToCardanoEra
    (Health), toRawTxIdHash, GenTxDijkstra dispatch (TxSubmission
    inputs/outputs)
  - Werror cascades suppressed file-locally with
    -Wno-{unused-imports,unused-matches,unused-top-binds,unused-imports,
    incomplete-patterns,redundant-constraints,dodgy-imports/-exports,
    deprecations,orphans} for the heavily-stubbed modules

Next step: each TODO(dijkstra) is a unit of real work. Recommended
approach is to walk the categories above starting from the most
isolated (Rewards, EraTranslation) and work outward to the encoders.
upgrade dependencies to cardano-node==11.0.1
Removes the three CardanoSolutions/* source-repository-package forks
(cardano-ledger, ouroboros-network, ouroboros-consensus) whose
GetDRepDelegations / NodeToClientV_21 / queryDRepDelegations patches
are now upstream in ouroboros-consensus 3.0.1, ouroboros-network 1.1,
and cardano-ledger-conway 1.22.1. Adds `blockio +serialblockio` to
drop the liburing system dependency.
fix: reorder transaction deserialization and fix mempool UTxO era
utxoFromMempool initialized with UTxOInBabbageEra, causing all
evaluations to hit the Babbage rejection branch even for Conway
transactions. Changed to UTxOInConwayEra.

Reorder deserialiseCBOR to try Conway and Dijkstra before Babbage.
Conway transactions can successfully deserialize as Babbage (the
Babbage decoder accepts Conway-era CBOR), wrapping them as
GenTxBabbage and rejecting them as "unsupported era". Older eras
kept as fallbacks for specific diagnostics.

Use eraProtVerHigh in transaction deserialization to accept
transactions from any protocol version within an era (e.g.
Conway PV9 through PV11).

Co-Authored-By: Claude <[email protected]>
update: enable Dijkstra ApplyTxError and GenTx generators
Schema fixes for Dijkstra-era validation:
- Add SubmitTransactionFailure entries: 3169 (PointerAddressInCollateralReturn),
  3170 (SpendingOutputFromSubTransaction)
- Add ScriptPurpose<Guard> and Clause<Guard> to cardano.json
- Fix AccountBalanceInterval: use anyOf instead of oneOf
- Make ProposedProtocolParameters minFeeReferenceScripts sub-fields optional

Enable Dijkstra ApplyTxError generator and Dijkstra GenTx generator.
GenTx uses genDijkstraShelleyTx which strips sub-transactions to
avoid MemoBytes CBOR round-trip failures in mock protocol peers.

Dijkstra block generation remains excluded: randomly generated blocks
fail CBOR round-tripping in the ChainSync mock peer, likely due to
block header/body hash inconsistency. The consensus codec itself
supports Dijkstra's 5-segment block body.

Add test dependencies: cardano-data, cardano-ledger-dijkstra:testlib.
Import Dijkstra Arbitrary instances.

Co-Authored-By: Claude <[email protected]>
update: add Dijkstra generators and guard purpose to schema
- Add GenTxIdDijkstra to genGenTxId
- Add Dijkstra context error to genContextError
- Add Dijkstra-era MissingScript to genScriptFailure
- Add "guard" to script purpose enum in cardano.json
- Remove stale FIXME comment in Generators.hs
- Regenerate EvaluateTransactionResponse test vectors

Co-Authored-By: Claude <[email protected]>
update: add Dijkstra-specific fields to cardano.json schema
Add schema definitions for new Dijkstra era fields:
- Transaction: requiredExtraGuards, directDeposits,
  accountBalanceIntervals, subTransactions, requiredTopLevelGuards
- ProtocolParameters: maxReferenceScriptsSizePerBlock
- New types: AccountBalanceInterval (with oneOf for bound variants),
  TopLevelGuard, SubTransaction

New JSON field names introduced across all Dijkstra commits:

  Transaction body (TopTx):
  - requiredExtraGuards: script hash guards (new Dijkstra field)
  - directDeposits: account address to coin map
  - accountBalanceIntervals: list of interval constraints per account
  - subTransactions: nested sub-transactions
  - fee: moved to TopTx-only (SubTx has no fee)

  Transaction body (SubTx):
  - requiredTopLevelGuards: guard credentials with optional datums

  AccountBalanceInterval fields:
  - greaterThanOrEqualTo: inclusive lower bound (coin)
  - strictlyLessThan: exclusive upper bound (coin)

  TopLevelGuard fields:
  - credential: guard credential (key hash or script hash)
  - datum: optional inline datum

  ProtocolParameters:
  - maxReferenceScriptsSizePerBlock: new Dijkstra param

  Script purpose enum:
  - "guard": new Dijkstra script purpose

  Error codes:
  - 3169: PointerAddressInCollateralReturn
  - 3170: SpendingOutputFromSubTransaction

Co-Authored-By: Claude <[email protected]>
fix: nest ref-script params in minFeeReferenceScripts for all cases
Both full PParams and PParamsUpdate nest range and multiplier inside
minFeeReferenceScripts to preserve Conway's API shape. For full
PParams, all three sub-fields are always present. For updates, only
the sub-fields being updated are included, and the key is omitted
entirely when none of the three are updated.

Co-Authored-By: Claude <[email protected]>
fix: restore NodeToClientVersion gating in TxMonitor mempool lookup
Gate Dijkstra behind nodeToClientV > V_23 since V_23 is the latest
NodeToClientVersion in ouroboros-consensus 3.0.1.0 and is negotiated
by all networks with node 11.0.1.

On Dijkstra networks (future V_24+), Dijkstra is tried first. On
Conway networks, Conway is tried first. Each list is ordered from
most probable era to least probable.

Verified on preview and preprod that GenTxIdDijkstra does not crash
the node (returns false, loop continues), so this is a performance
optimization to avoid unnecessary round-trips on non-Dijkstra
networks.

Co-Authored-By: Claude <[email protected]>
update: enable Dijkstra ApplyTxError and GenTx generators
Schema fixes for Dijkstra-era validation:
- Add SubmitTransactionFailure entries: 3169 (PointerAddressInCollateralReturn),
  3170 (SpendingOutputFromSubTransaction)
- Add ScriptPurpose<Guard> and Clause<Guard> to cardano.json
- Fix AccountBalanceInterval: use anyOf instead of oneOf
- Make ProposedProtocolParameters minFeeReferenceScripts sub-fields optional

Enable Dijkstra ApplyTxError generator and Dijkstra GenTx generator.
GenTx uses genDijkstraShelleyTx which strips sub-transactions to
avoid MemoBytes CBOR round-trip failures in mock protocol peers.

Dijkstra block generation remains excluded: randomly generated blocks
fail CBOR round-tripping in the ChainSync mock peer, likely due to
block header/body hash inconsistency. The consensus codec itself
supports Dijkstra's 5-segment block body.

Add test dependencies: cardano-data, cardano-ledger-dijkstra:testlib.
Import Dijkstra Arbitrary instances.

Co-Authored-By: Claude <[email protected]>
update: add Dijkstra generators and guard purpose to schema
- Add GenTxIdDijkstra to genGenTxId
- Add Dijkstra context error to genContextError
- Add Dijkstra-era MissingScript to genScriptFailure
- Add "guard" to script purpose enum in cardano.json
- Remove stale FIXME comment in Generators.hs
- Regenerate EvaluateTransactionResponse test vectors

Co-Authored-By: Claude <[email protected]>
update: add Dijkstra-specific fields to cardano.json schema
Add schema definitions for new Dijkstra era fields:
- Transaction: requiredExtraGuards, directDeposits,
  accountBalanceIntervals, subTransactions, requiredTopLevelGuards
- ProtocolParameters: maxReferenceScriptsSizePerBlock
- New types: AccountBalanceInterval (with oneOf for bound variants),
  TopLevelGuard, SubTransaction

New JSON field names introduced across all Dijkstra commits:

  Transaction body (TopTx):
  - requiredExtraGuards: script hash guards (new Dijkstra field)
  - directDeposits: account address to coin map
  - accountBalanceIntervals: list of interval constraints per account
  - subTransactions: nested sub-transactions
  - fee: moved to TopTx-only (SubTx has no fee)

  Transaction body (SubTx):
  - requiredTopLevelGuards: guard credentials with optional datums

  AccountBalanceInterval fields:
  - greaterThanOrEqualTo: inclusive lower bound (coin)
  - strictlyLessThan: exclusive upper bound (coin)

  TopLevelGuard fields:
  - credential: guard credential (key hash or script hash)
  - datum: optional inline datum

  ProtocolParameters:
  - maxReferenceScriptsSizePerBlock: new Dijkstra param

  Script purpose enum:
  - "guard": new Dijkstra script purpose

  Error codes:
  - 3169: PointerAddressInCollateralReturn
  - 3170: SpendingOutputFromSubTransaction

Co-Authored-By: Claude <[email protected]>
fix: nest ref-script params in minFeeReferenceScripts for all cases
Both full PParams and PParamsUpdate nest range and multiplier inside
minFeeReferenceScripts to preserve Conway's API shape. For full
PParams, all three sub-fields are always present. For updates, only
the sub-fields being updated are included, and the key is omitted
entirely when none of the three are updated.

Co-Authored-By: Claude <[email protected]>
fix: restore NodeToClientVersion gating in TxMonitor mempool lookup
The node throws an exception if sent a GenTxId for an era that
hasn't hard-forked yet (see b62f0a4e). Gate Dijkstra behind
nodeToClientV >= V_23 since V_22 is the latest released version
and Dijkstra is only reachable on experimental testnets.

On Dijkstra networks (V_23+), Dijkstra is tried first. On Conway
networks, Conway is tried first. Each list is ordered from most
probable era to least probable.

Note: V_23 is a proxy for "has the Dijkstra hard fork happened",
not a protocol-level gate. The ShelleyBlock SupportedNetworkProtocolVersion
instance includes all eras at all versions (TODO #2668 in
ouroboros-consensus to make it era-specific).

Co-Authored-By: Claude <[email protected]>
update: add sub-transaction encoding for Dijkstra TopTx/SubTx
- Extract shared TxBody fields into encodeSharedTxBody
- Add encodeSubTx and encodeSubTxBody for Tx SubTx DijkstraEra
- Encode requiredTopLevelGuards in sub-transaction bodies
- Pass MetadataFormat through encodeTxBody for sub-tx metadata

Note: TopTx-only fields (collaterals, fee) are appended after
shared fields rather than interleaved in Conway's original order.
This is a trade-off for code sharing via encodeSharedTxBody —
JSON objects are unordered by spec so no client impact.

Co-Authored-By: Claude <[email protected]>
update: native Dijkstra encoders for PParams, guards and new TxBody fields
- Replace downgradePParamsHKD with native encoder exposing real
  Dijkstra ref-script parameters (refScriptCostStride,
  refScriptCostMultiplier, maxRefScriptSizePerTx,
  maxRefScriptSizePerBlock)
- Wire up guards field via guardsTxBodyL replacing reqSignerHashesTxBodyL
- Wire up directDeposits and accountBalanceIntervals TxBody fields
- Fix DijkstraUnRegCert incorrectly mapped to ConwayRegCert
- Fix stale module comment referencing CBOR roundtrip

Co-Authored-By: Claude <[email protected]>