Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 19 additions & 36 deletions server/cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,31 @@ repository cardano-haskell-packages
d4a35cd3121aa00d18544bb0ac01c3e1691d618f462c46129271bccf39f7e8ee

index-state:
, hackage.haskell.org 2025-09-11T07:59:00Z
, cardano-haskell-packages 2025-09-11T08:36:14Z
, hackage.haskell.org 2026-05-08T22:40:19Z
, cardano-haskell-packages 2026-05-08T13:26:45Z

constraints:
, any.cardano-node == 10.5.1
, any.cardano-node == 11.0.1

, any.cardano-ledger-core == 1.17.0.0
, any.cardano-ledger-shelley == 1.16.0.0
, any.cardano-ledger-conway == 1.19.0.0
, any.cardano-ledger-conway >= 1.22.1.0

, any.ouroboros-consensus == 0.27.0.0
, any.ouroboros-consensus-cardano == 0.25.1.0
, any.ouroboros-network == 0.21.3.0
, any.ouroboros-consensus ^>= 3.0.1
, any.ouroboros-network ^>= 1.1

, any.io-classes == 1.5.0.0
, any.io-classes-mtl == 0.1.2.0
, any.io-classes ^>= 1.8
, any.formatting == 7.2.0
, any.validation < 1.2
, any.text source

-- ogmios doesn't exercise io_uring code paths, so build `blockio` with the
-- serial backend to drop the `liburing` system dependency.
, any.blockio +serialblockio

allow-newer:
*:formatting
, katip:Win32
, io-sim:time
, io-classes:time

packages:
./
Expand Down Expand Up @@ -87,28 +91,7 @@ package text
package formatting
flags: +no-double-conversion

-- cardano-ledger with queryDRepDelegations backported on top of conway-1.19.0.0 (instead of 1.20.0.0).
source-repository-package
type: git
location: https://github.com/CardanoSolutions/cardano-ledger.git
tag: 5cca15a1f0629c11e8d4d4daeb73428684f9c34f
subdir:
libs/cardano-ledger-core
libs/cardano-ledger-api

-- ouroboros-network patched with NodeToClientV_21 declared for GetDRepsDelegations query.
source-repository-package
type: git
location: https://github.com/CardanoSolutions/ouroboros-network.git
tag: d3477c4e6b3243f89afb974914ea423a75873fa0
subdir:
ouroboros-network-api

-- ouroboros-consensus patched with GetDRepsDelegations query & associated client versions
source-repository-package
type: git
location: https://github.com/CardanoSolutions/ouroboros-consensus.git
tag: 5bbbf9c8b4cd3dc3e3a80d13ef54b3a2ee43a585
subdir:
ouroboros-consensus
ouroboros-consensus-cardano
-- NOTE: GetDRepDelegations query and associated patches are now upstream
-- in cardano-node 11.0.1 (ouroboros-consensus 3.0.1, cardano-ledger-conway >= 1.22.1).
-- The previous source-repository-package patches for cardano-ledger,
-- ouroboros-network, and ouroboros-consensus have been removed.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 9 additions & 8 deletions server/modules/ouroboros-network-ogmios/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,16 @@ library:
- io-classes
- iohk-monitoring
- network-mux
- cardano-diffusion
- deepseq
- ouroboros-consensus
- ouroboros-consensus-diffusion
- ouroboros-consensus-cardano
- ouroboros-network
- ouroboros-network-api
- ouroboros-network-framework
- ouroboros-network-protocols
- ouroboros-consensus:diffusion
- ouroboros-consensus:cardano
- ouroboros-network:api
- ouroboros-network:framework
- ouroboros-network:protocols
- typed-protocols
- typed-protocols-stateful
- typed-protocols-cborg
- typed-protocols:stateful
- typed-protocols:cborg
build-tools:
- hspec-discover
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ module Cardano.Network.Protocol.NodeToClient
, Error (..)
, HandshakeProtocolError (..)
, NodeToClientVersion
, NodeToClientVersionData (..)
, GenTx
, GenTxId

Expand All @@ -66,14 +67,18 @@ import Cardano.Network.Protocol.NodeToClient.Trace
import Cardano.Slotting.Slot
( SlotNo
)
import Control.DeepSeq
( NFData
)
import Control.Monad.Class.MonadAsync
( MonadAsync
)
import Control.Monad.Class.MonadST
( MonadST
)
import Control.Monad.Class.MonadThrow
( MonadMask
( MonadEvaluate
, MonadMask
, MonadThrow (..)
)
import Control.Monad.IO.Class
Expand Down Expand Up @@ -163,7 +168,7 @@ import Ouroboros.Network.Mux
, OuroborosApplication (..)
, RunMiniProtocol (..)
)
import Ouroboros.Network.NodeToClient
import Cardano.Network.NodeToClient
( LocalAddress
, MinimalInitiatorContext
, NetworkConnectTracers (..)
Expand Down Expand Up @@ -256,6 +261,7 @@ instance ConvertRawTxId (GenTx (CardanoBlock StandardCrypto)) where
GenTxIdAlonzo x -> toRawTxIdHash x
GenTxIdBabbage x -> toRawTxIdHash x
GenTxIdConway x -> toRawTxIdHash x
_ -> error "TODO(dijkstra): toRawTxIdHash Dijkstra arm (GenTxIdDijkstra)"

-- | A handy type to pass clients around
data Clients m block = Clients
Expand Down Expand Up @@ -286,9 +292,8 @@ connectClient tr client vData addr = liftIO $ withIOManager $ \iocp -> do
| v <- [ nodeToClientV_Min .. nodeToClientV_Latest ]
]

tracers :: NetworkConnectTracers LocalAddress NodeToClientVersion
tracers = NetworkConnectTracers
{ nctMuxTracer = nullTracer
{ nctMuxTracers = undefined -- TODO(dijkstra): nctMuxTracer was renamed to nctMuxTracers and retyped from Tracer to Mx.TracersWithBearer in ouroboros-network 1.1 -- needs proper construction (was `nullTracer`)
, nctHandshakeTracer = contramap TrHandshake tr
}

Expand All @@ -305,6 +310,7 @@ mkClient
, MonadIO m
, MonadMask m
, MonadST m
, MonadEvaluate m
)
=> (forall a. m a -> IO a)
-- ^ A natural transformation to unlift a particular 'm' into 'IO'.
Expand Down Expand Up @@ -367,6 +373,7 @@ localChainSync
( protocol ~ ChainSync Block (Point Block) (Tip Block)
, MonadThrow m
, MonadAsync m
, MonadEvaluate m
)
=> (forall a. m a -> IO a)
-- ^ A natural transformation to unlift a particular 'm' into 'IO'.
Expand All @@ -389,6 +396,7 @@ localTxSubmission
:: forall m protocol.
( protocol ~ LocalTxSubmission (SerializedTransaction Block) (SubmitTransactionError Block)
, MonadThrow m
, MonadEvaluate m
)
=> (forall a. m a -> IO a)
-- ^ A natural transformation to unlift a particular 'm' into 'IO'.
Expand All @@ -411,6 +419,8 @@ localTxMonitor
:: forall m protocol a.
( protocol ~ LocalTxMonitor (GenTxId Block) (GenTx Block) SlotNo
, MonadThrow m
, MonadEvaluate m
, NFData a
)
=> (forall x. m x -> IO x)
-- ^ A natural transformation to unlift a particular 'm' into 'IO'.
Expand All @@ -433,6 +443,7 @@ localStateQuery
:: forall m.
( MonadAsync m
, MonadMask m
, MonadEvaluate m
)
=> (forall x. m x -> IO x)
-- ^ A natural transformation to unlift a particular 'm' into 'IO'.
Expand Down Expand Up @@ -461,10 +472,11 @@ codecs epochSlots nodeToClientV =
where
supportedVersions = supportedNodeToClientVersions (Proxy @Block)
cfg = CardanoCodecConfig
(let byron = ByronCodecConfig epochSlots in byron)
(let shelley = ShelleyCodecConfig in shelley)
(let allegra = ShelleyCodecConfig in allegra)
(let mary = ShelleyCodecConfig in mary)
(let alonzo = ShelleyCodecConfig in alonzo)
(let babbage = ShelleyCodecConfig in babbage)
(let conway = ShelleyCodecConfig in conway)
(let byron = ByronCodecConfig epochSlots in byron)
(let shelley = ShelleyCodecConfig in shelley)
(let allegra = ShelleyCodecConfig in allegra)
(let mary = ShelleyCodecConfig in mary)
(let alonzo = ShelleyCodecConfig in alonzo)
(let babbage = ShelleyCodecConfig in babbage)
(let conway = ShelleyCodecConfig in conway)
(let dijkstra = undefined in dijkstra) -- TODO(dijkstra): new era slot in CardanoCodecConfig (ouroboros-consensus 3.0.1)
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import Network.TypedProtocol.Codec
import Ouroboros.Network.Driver.Simple
( TraceSendRecv (..)
)
import Ouroboros.Network.NodeToClient
import Cardano.Network.NodeToClient
( ConnectionId (..)
, LocalAddress
, NodeToClientVersion
Expand Down
23 changes: 11 additions & 12 deletions server/ogmios.cabal

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 10 additions & 11 deletions server/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,12 @@ library:
- mtl
- optparse-applicative
- ouroboros-consensus
- ouroboros-consensus-cardano
- ouroboros-consensus-protocol
- ouroboros-network
- ouroboros-network-api
- ouroboros-network-framework
- ouroboros-consensus:cardano
- ouroboros-consensus:protocol
- ouroboros-network:api
- ouroboros-network:framework
- ouroboros-network-ogmios
- ouroboros-network-protocols
- ouroboros-network:protocols
- plutus-core
- plutus-ledger-api
- prettyprinter
Expand Down Expand Up @@ -169,12 +168,12 @@ tests:
- lens-aeson
- ogmios
- ouroboros-consensus
- ouroboros-consensus-cardano
- ouroboros-consensus-cardano:unstable-cardano-testlib
- ouroboros-network-api
- ouroboros-network-framework
- ouroboros-consensus:cardano
- ouroboros-consensus:unstable-cardano-testlib
- ouroboros-network:api
- ouroboros-network:framework
- ouroboros-network-ogmios
- ouroboros-network-protocols
- ouroboros-network:protocols
- QuickCheck
- random
- strict-sop-core
Expand Down
21 changes: 6 additions & 15 deletions server/src/Ogmios/App/Configuration.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@

{-# OPTIONS_GHC -fno-warn-orphans #-}

-- TODO(dijkstra): warnings suppressed during dep migration.
{-# OPTIONS_GHC -Wno-unused-imports -Wno-incomplete-patterns -Wno-unused-matches -Wno-unused-top-binds -Wno-redundant-constraints -Wno-deprecations -Wno-orphans #-}

module Ogmios.App.Configuration
(
-- * Configuration
Expand Down Expand Up @@ -186,21 +189,9 @@ readAlonzoGenesis configFile = do
allV1ParamNames = Ledger.costModelParamNames Ledger.PlutusV1

withoutFutureParameters :: Set Text -> GenesisConfig AlonzoEra -> GenesisConfig AlonzoEra
withoutFutureParameters sourceParamNames config =
let
inner = Ledger.unAlonzoGenesisWrapper config
costModels = Ledger.uappCostModels inner
costModelsPruned = Map.adjust
(either (error . show) identity
. Ledger.mkCostModel Ledger.PlutusV1
. Map.elems
. (`Map.restrictKeys` sourceParamNames)
. Ledger.costModelToMap
)
Ledger.PlutusV1
(Ledger.costModelsValid costModels)
in
Ledger.AlonzoGenesisWrapper (inner { Ledger.uappCostModels = Ledger.mkCostModels costModelsPruned })
withoutFutureParameters _ _ =
-- TODO(dijkstra): UpgradeAlonzoPParams vs AlonzoExtraConfig + Maybe CostModels in cardano-ledger-alonzo 1.15.0; needs rewrite.
error "TODO(dijkstra): withoutFutureParameters needs new AlonzoExtraConfig / UpgradeAlonzoPParams API"


readConwayGenesis :: MonadIO m => FilePath -> m (Either Text (GenesisConfig ConwayEra))
Expand Down
Loading