Skip to content
Draft
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
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ import Ouroboros.Network.KeepAlive
import Ouroboros.Network.Magic
import Ouroboros.Network.Mux (MiniProtocolCb (..), OuroborosApplication (..),
OuroborosBundle, RunMiniProtocol (..))
import Ouroboros.Network.PerasSupport (PerasSupport (..))
import Ouroboros.Network.PeerSelection.PeerSharing (PeerSharing (..))
import Ouroboros.Network.PeerSelection.PeerSharing.Codec (decodeRemoteAddress,
encodeRemoteAddress)
import Ouroboros.Network.PerasSupport (PerasSupport (..))
import Ouroboros.Network.Protocol.BlockFetch.Client (BlockFetchClient (..),
blockFetchClientPeer)
import Ouroboros.Network.Protocol.Handshake.Version (simpleSingletonVersions)
Expand Down Expand Up @@ -156,17 +156,16 @@ benchmarkConnectTxSubmit EnvConsts { .. } handshakeTracer submissionTracer codec
(cTxSubmission2Codec myCodecs)
channel
(txSubmissionClientPeer myTxSubClient)
, NtN.perasCertDiffusionProtocol = InitiatorProtocolOnly $ MiniProtocolCb $ \_ctx _channel ->
pure ((), Nothing)
, NtN.perasVoteDiffusionProtocol = InitiatorProtocolOnly $ MiniProtocolCb $ \_ctx _channel ->
pure ((), Nothing)
, NtN.peerSharingProtocol = InitiatorProtocolOnly $ MiniProtocolCb $ \_ctx channel ->
runPeer
mempty
(cPeerSharingCodec myCodecs)
channel
(peerSharingClientPeer peerSharingClientNull)
-- TODO Peras is not supported here
, NtN.perasCertDiffusionProtocol = InitiatorProtocolOnly $ MiniProtocolCb $ \_ctx _channel ->
error "tx-generator: Peras cert diffusion is unsupported"
, NtN.perasVoteDiffusionProtocol = InitiatorProtocolOnly $ MiniProtocolCb $ \_ctx _channel ->
error "tx-generator: Peras vote diffusion is unsupported"
}
n2nVer
n2nData
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{- HLINT ignore "Eta reduce" -}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE TypeApplications #-}

module Cardano.Benchmarking.OuroborosImports
Expand Down Expand Up @@ -42,7 +43,9 @@ toProtocolInfo (SomeConsensusProtocol CardanoBlockType info) = fst <$> protocolI
toProtocolInfo _ = error "toProtocolInfo unknown protocol"

protocolToTopLevelConfig :: SomeConsensusProtocol -> IO (TopLevelConfig CardanoBlock)
protocolToTopLevelConfig ptcl = pInfoConfig <$> toProtocolInfo ptcl
protocolToTopLevelConfig ptcl = do
ProtocolInfo {pInfoConfig} <- toProtocolInfo ptcl
pure pInfoConfig

protocolToCodecConfig :: SomeConsensusProtocol -> IO (CodecConfig CardanoBlock)
protocolToCodecConfig = fmap configCodec . protocolToTopLevelConfig
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ queryEra = do
AnyCardanoEra era <- mapExceptT liftIO .
modifyError (Env.TxGenError . TxGenError . show) $
queryNodeLocalState localNodeConnectInfo (SpecificPoint $ chainTipToChainPoint chainTip) QueryCurrentEra
caseByronOrShelleyBasedEra
inEonForEra
(liftTxGenError $ TxGenError "queryEra Byron not supported")
(return . AnyShelleyBasedEra)
era
Expand Down
4 changes: 2 additions & 2 deletions bench/tx-generator/src/Cardano/Benchmarking/Tracer.hs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import Cardano.Node.Tracing.NodeInfo ()
import Ouroboros.Network.IOManager (IOManager)
import qualified Ouroboros.Network.Protocol.TxSubmission2.Type as TxSubmission
import Ouroboros.Network.Tracing ()
import Network.Mux.Tracing ()

import Control.Exception (SomeException (..))
import Control.Monad (forM, guard)
Expand All @@ -51,7 +52,6 @@ import Data.Maybe (fromMaybe)
import qualified Data.Text as Text
import Data.Time.Clock
import GHC.Generics
import Network.Mux.Tracing ()
import qualified Network.TypedProtocol.Codec as TypedProtocol

import Trace.Forward.Forwarding (InitForwardingConfig (..), initForwardingDelayed)
Expand Down Expand Up @@ -182,7 +182,7 @@ configSilent :: ConfigOption
configSilent = ConfSeverity (SeverityF Nothing)

initialTraceConfig :: TraceConfig
initialTraceConfig = emptyTraceConfig
initialTraceConfig = emptyTraceConfig
{ tcOptions = Map.fromList
[ ([], [configSilent])
, setMaxDetail TracerNameBench
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ requireParam paramName = maybe (Left $ PpceMissingParameter paramName)
mkProtVer :: (Natural, Word32) -> Either ProtocolParametersConversionError Ledger.ProtVer
mkProtVer (majorProtVer, minorProtVer) =
maybeToRight (PpceVersionInvalid majorProtVer) $
(`Ledger.ProtVer` minorProtVer) <$> Ledger.mkVersion majorProtVer
(`Ledger.ProtVer` fromIntegral minorProtVer) <$> Ledger.mkVersion majorProtVer

-- Duplicated from "cardano-api" module "Cardano.Api.Internal.ProtocolParameters"
boundRationalEither
Expand Down Expand Up @@ -528,7 +528,7 @@ fromShelleyCommonPParams
fromShelleyCommonPParams pp =
ProtocolParameters
{ protocolParamProtocolVersion = case pp ^. ppProtocolVersionL of
Ledger.ProtVer a b -> (Ledger.getVersion a, b)
Ledger.ProtVer a b -> (Ledger.getVersion a, fromIntegral b)
, protocolParamMaxBlockHeaderSize = fromIntegral $ pp ^. ppMaxBHSizeL
, protocolParamMaxBlockBodySize = fromIntegral $ pp ^. ppMaxBBSizeL
, protocolParamMaxTxSize = fromIntegral $ pp ^. ppMaxTxSizeL
Expand Down
4 changes: 2 additions & 2 deletions bench/tx-generator/tx-generator.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ library
, network-mux
, network-uri
, optparse-applicative
, ouroboros-consensus:{ouroboros-consensus, cardano, diffusion} >= 4.2.0.1
, ouroboros-network:{api, framework, tracing, ouroboros-network, protocols} >= 1.1
, ouroboros-consensus:{ouroboros-consensus, cardano, diffusion} >= 4.0
, ouroboros-network:{api, framework, ouroboros-network, protocols, tracing} >= 1.2
, plutus-ledger-api
, plutus-tx
, random
Expand Down
208 changes: 117 additions & 91 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ repository cardano-haskell-packages
-- See CONTRIBUTING for information about these, including some Nix commands
-- you need to run if you change them
index-state:
, hackage.haskell.org 2026-08-14T13:38:07Z
, hackage.haskell.org 2026-09-02T14:05:07Z
, cardano-haskell-packages 2026-09-04T09:27:20Z

constraints:
-- haskell.nix patch does not work for 1.6.8
-- grapesy currently depends on crypton-x509-system (>=1.6 && <1.7)
, any.crypton-x509-system < 1.6.8 || >= 1.7

, any.crypton-x509-system < 1.6.8 || > 1.6.8
-- haskell.nix tries to use 0.7.1.5 for some reason
, any.proto-lens >= 0.7.1.7
-- https://github.com/channable/alfred-margaret/pull/76
, any.alfred-margaret < 2.1.1.0 || > 2.1.1.0
-- Force cardano-crypto-class 2.6.x to avoid backtracking into 2.5.x
, any.cardano-crypto-class ^>= 2.6

-- acts has a finitary flag; disabling it avoids pulling in finitary entirely,
-- which sidesteps the GHC type-checker plugin incompatibility with
Expand All @@ -48,9 +48,8 @@ packages:
bench/trace-schemas/scripts/schema-gen
trace-forward

-- Shipped as a release binary but not a dependency of any local package, so it
-- has to be added to the install plan explicitly.
extra-packages: dmq-node >= 0.7.0.0
-- Needed when cross compiling
extra-packages: alex, dmq-node >= 0.4.2.0

program-options
ghc-options: -Werror
Expand All @@ -65,104 +64,131 @@ package cryptonite
-- generation is dubious. Set the flag so we use /dev/urandom by default.
flags: -support_rdrand

package snap-server
flags: -openssl

package bitvec
flags: -simd

package cardano-diffusion
flags: +optparse-applicative-fork

-- required for haddocks to build successfully
package plutus-scripts-bench
haddock-options: "--optghc=-fplugin-opt=PlutusTx.Plugin:defer-errors"

-- There is a suspected bug in `cabal` (https://github.com/haskell/cabal/issues/11663)
-- that can be worked around with the following allow-newer stanzas
allow-newer:
-- cborg-0.2.10.0 bounds base < 4.22 but GHC 9.14 ships base-4.22
, cborg:base
, io-sim:time
, io-classes:time

-- cabal-allow-newer begin
if impl(ghc >= 9.14)
allow-newer:
, async-timer:unliftio-core
, attoparsec-iso8601:time
, bytestring-trie:base
, canonical-json:containers
, cborg:base
, cborg:containers
, cborg-json:aeson
, cborg-json:base
, compact:base
, crypton-connection:tls
, dependent-map:containers
, diff-containers:base
, dictionary-sharing:containers
, dmq-node:containers
, dmq-node:time
, ekg-json:aeson
, ekg-json:text
, ekg-prometheus-adapter:containers
, ekg-wai:time
, errors:transformers-compat
, fs-sim:QuickCheck
, grapesy:aeson
, grapesy:base
, grapesy:containers
, grapesy:time-manager
, grapesy:tls
, grpc-spec:aeson
, grpc-spec:base
, grpc-spec:containers
, iohk-monitoring:contra-tracer
, lens-family:containers
, lens-family-core:containers
, locli:ouroboros-network
, microstache:aeson
, monad-control:transformers-compat
, nothunks:containers
, nothunks:time
, optparse-generic:time
, partial-order:containers
, pipes-safe:containers
, pipes-safe:mtl
, pipes-safe:primitive
, pipes-safe:transformers
, prometheus:containers
, safe-wild-cards:template-haskell
, serdoc-core:template-haskell
, serialise:base
, serialise:containers
, serialise:time
, servant:QuickCheck
, servant:base
, servant-server:aeson
, servant-server:attoparsec
, servant-server:base
, servant-server:base-compat
, servant-server:base64-bytestring
, servant-server:bytestring
, servant-server:containers
, servant-server:http-api-data
, servant-server:http-types
, servant-server:network
, servant-server:servant
, servant-server:text
, servant-server:transformers
, servant-server:warp
, strict-checked-vars:io-classes
, strict-stm:base
, strict-stm:io-classes
, tdigest:base
, time-locale-compat:time
, tracer-transformers:contra-tracer
, vary:aeson
, with-utf8:base
-- cabal-allow-newer end
, cardano-ping:network-mux
, grapesy:aeson
, grapesy:crypton-x509
, grapesy:crypton-x509-store
, grapesy:crypton-x509-system
, grapesy:crypton-x509-validation
, grapesy:http2
, grapesy:http2-tls
, grapesy:network-run
, grapesy:tls
, grpc-spec:aeson
, http-api-data:text-iso8601
-- kes-agent bounds cardano-crypto-class ^>=2.5 but we have a newer version
, kes-agent:cardano-crypto-class
, kes-agent-crypto:cardano-crypto-class
-- plutus-scripts-bench bounds cardano-api ^>=11.5 but we have 11.6
, plutus-scripts-bench:cardano-api
-- plutus-scripts-bench bounds plutus-* ^>=1.65 but we have 1.68
, plutus-scripts-bench:plutus-ledger-api
, plutus-scripts-bench:plutus-tx
, plutus-scripts-bench:plutus-tx-plugin

-- TODO Remove once ouroboros-consensus 4.3 is released, and we remove the ouroboros-consensus SRP
allow-older:
-- dmq-node-0.7.1.0 lower-bounds ouroboros-consensus >=4.1 but we have 4.0
, dmq-node:ouroboros-consensus

-- IMPORTANT
-- Do NOT add more source-repository-package stanzas here unless they are strictly
-- temporary! Please read the section in CONTRIBUTING about updating dependencies.

source-repository-package
type: git
location: https://github.com/input-output-hk/kes-agent
tag: 4625f3cf543566517d08882e659c97932d106d86
--sha256: sha256-CSHWndpeJFqCEFNT6ysfyN6x+O4vZ9TtYOOsZKcLnIA=
subdir:
kes-agent
kes-agent-crypto

source-repository-package
type: git
location: https://github.com/IntersectMBO/cardano-ledger
tag: fb723848a28256fe372ea9ba692eccded6a12a53
--sha256: sha256-iL61RTn4OPRNzzPn/2YcVJNMJYolXghaQ9cDG/DOOWM=
subdir:
eras/allegra/impl
eras/alonzo/impl
eras/babbage/impl
eras/byron/chain/executable-spec
eras/byron/crypto
eras/byron/ledger/executable-spec
eras/byron/ledger/impl
eras/conway/impl
eras/dijkstra/impl
eras/mary/impl
eras/shelley/impl
eras/shelley/test-suite
libs/cardano-data
libs/cardano-ledger-api
libs/cardano-ledger-binary
libs/cardano-ledger-core
libs/cardano-protocol
libs/cardano-protocol-tpraos
libs/non-integral
libs/small-steps
libs/vector-map

source-repository-package
type: git
location: https://github.com/intersectmbo/cardano-base.git
--sha256: sha256-WUBluY6UqvBkS5cNsJnKMOaW+1dTfL3mg8iq/kVPV0o=
tag: d92e2e3841eaad354c5e1ef77b458b347f471271
subdir: cardano-crypto-leios

source-repository-package
type: git
location: https://github.com/IntersectMBO/ouroboros-consensus
tag: 835d3747eb2fbd6b7d69e73245ec7c9703faec21
--sha256: sha256-ZDAPypcfLn7xzUyxcI7ktHxnvUKtPEHcPR522+c04Ao=
subdir:
.

source-repository-package
type: git
location: https://github.com/well-typed/grapesy
tag: bd6af64f69ff89e3a8fc02e2c81262e648f4715d
--sha256: sha256-4F+bUoytvrgOcQ8aIWbOY9uYsPoTZwQOlmh7ckgyK9M=
subdir:
grapesy
grpc-spec

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-crypto
tag: ac2e12a471b735ad80949bcbf0f6f634e5dbef77
--sha256: sha256-NvbMk41W2PQy2H91nkG0GtPyGDwia0y6DQNNf9RtoAc=

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-api
tag: 6095192558ff527fc73eb06a9862da62d7fb0949
--sha256: sha256-6mBza4a3Plu9f3ZFfJNUufj5ckx7bNefvYW8atUz0j8=
subdir:
cardano-api
cardano-rpc

source-repository-package
type: git
location: https://github.com/IntersectMBO/cardano-cli
tag: efc7514dddce8999e66f7a48dcd1a5c9a8e981cf
--sha256: sha256-3maT6ogGaR9WJXsC0OZpvpLS2uv9JvWoJp5klSSLH6I=
subdir:
cardano-cli
2 changes: 1 addition & 1 deletion cardano-node-chairman/cardano-node-chairman.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ test-suite chairman-tests

build-depends: , cardano-api
, cardano-testnet
, cardano-crypto-class ^>=2.5
, cardano-crypto-class ^>=2.6
, data-default-class
, filepath
, hedgehog
Expand Down
4 changes: 2 additions & 2 deletions cardano-node/cardano-node.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ library
, bytestring
, cardano-api ^>= 11.7
, cardano-data
, cardano-crypto-class ^>=2.5
, cardano-crypto-class ^>=2.6
, cardano-crypto-wrapper
, cardano-git-rev ^>=0.2.2
, cardano-ledger-alonzo
Expand Down Expand Up @@ -176,7 +176,7 @@ library
, network-mux >= 0.8
, nothunks
, optparse-applicative
, ouroboros-consensus:{ouroboros-consensus, lsm, cardano, diffusion, protocol} ^>= 4.2.0.1
, ouroboros-consensus:{ouroboros-consensus, lsm, cardano, diffusion, protocol} >= 4.0
, ouroboros-network:{api, ouroboros-network, orphan-instances, framework, protocols, tracing} ^>= 1.2
, cardano-diffusion:{api, cardano-diffusion, tracing, orphan-instances} ^>=1.1.1
, prettyprinter
Expand Down
Loading
Loading