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.