Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
5ffa1b0
bump: iohkNix
johnalotoski May 11, 2026
fad8137
tracing: rm old tracing system cfg
johnalotoski May 11, 2026
28e8555
cfg/ci: update cfg to iohkNix and match ci
johnalotoski Jun 24, 2026
c2a1b39
nodeNixosSvc: add lib.types.path to avoid eval fails on path type checks
johnalotoski May 18, 2026
4ad0105
releaseBins: add mithril flake input and extract mithril-signer for x…
johnalotoski May 12, 2026
f655529
nodeNixosSvc: rm useNewTopology w/ p2p as the only networking mode
johnalotoski Jun 17, 2026
30d6475
nix: remove lmdb
johnalotoski Jun 18, 2026
44e27e6
nideNixosSvc: preserve new LedgerDB.Snapshots attrset on lsmt attrs m…
johnalotoski Jun 21, 2026
022386e
submitApiNixosSvc: update the submit-api service defn for new tracing…
johnalotoski Jun 21, 2026
74710e5
nixos: gate RTS stats/profiling flags + add `profilingoutputdir`
dermetfan Jun 9, 2026
25ffd5d
docker: move env snapshot to `/tmp`, drop dead topologyUpdater mapping
dermetfan Jun 9, 2026
7f54fdc
oci: redirect merge-mode writes to `/tmp`
dermetfan Jun 12, 2026
e43a247
oci: make mount-point directories group-writable for non-root operation
dermetfan Jun 12, 2026
7898cc5
nixosSvc: add profilingOutputDir; keep RTS stats, gate profiling/even…
johnalotoski Jun 26, 2026
553cda8
oci: direct RTS profiling output to /logs for the images only, not sc…
johnalotoski Jun 26, 2026
b976c03
oci: support ro root/non-root via symlink-following/TOCTOU protected …
johnalotoski Jun 26, 2026
b8a37f9
nixosTests: add OCI read-only/non-root tests for node, tracer and sub…
johnalotoski Jun 26, 2026
337111d
tracerOci: fix tracer aborting under set -e when CARDANO_MIN_LOG_SEVE…
johnalotoski Jun 26, 2026
f1b83de
bump: mithril for iohk -> IntersectMBO repo move
johnalotoski Jul 28, 2026
bd76447
bump: dmq-node for 0.7.0.0
johnalotoski Aug 3, 2026
dfdc32f
bump: mithril for v2630
johnalotoski Aug 5, 2026
807dfe8
nixosTests: ensure submit-api test uses binary artifact cfgs
johnalotoski Aug 3, 2026
72ae470
submitApiNixosSvc: source the config default from the environment att…
johnalotoski Aug 5, 2026
32d6667
submitApiNixosSvc: add a metricsPort option and pass it through to th…
johnalotoski Aug 5, 2026
0e36c73
nixosTests: assert submit-api Info traces reach the journal
johnalotoski Aug 5, 2026
c929787
cardano-submit-api: replace the legacy iohk-monitoring example config
johnalotoski Aug 5, 2026
bee660e
cardano-submit-api: drop dead error constructors, retarget test/run.s…
johnalotoski Aug 5, 2026
054e91e
cardano-submit-api: rewrite the README, drop the unmaintained swagger…
johnalotoski Aug 5, 2026
003575f
nixosTests: harden cardano-cli ping assertions with pipefail
johnalotoski Aug 5, 2026
7a7c2ba
nodeNixosSvc: narrow key and cert options to str
johnalotoski Aug 5, 2026
b20f7ce
oci: enforce the unshared /tmp runtime dir with a lock, ship /tmp sticky
johnalotoski Aug 5, 2026
b9596df
ci: align w/ peer snap and useLedgerAfterSlot updates
johnalotoski Aug 5, 2026
de932e4
cfg: rm dead mainnet-ci, byron-testnet config dirs
johnalotoski Aug 5, 2026
59c9b8c
doc: text cleanup, rm legacy log cfg line
johnalotoski Aug 5, 2026
09fa860
oci: correct env snapshot scope, add group 0 ipc perms note
johnalotoski Aug 5, 2026
5867d81
cabal: split the extra-packages comment per entry
johnalotoski Aug 5, 2026
6633cdf
nixosSvc: redirect the eventlog with -ol, widen the -po gate
johnalotoski Aug 6, 2026
4d19089
ociEntrypoint: dispatch cli mode before the NETWORK modes
johnalotoski Aug 6, 2026
c3a6e97
docs: mithril input shape; submit-api restart policy
johnalotoski Aug 6, 2026
db3f6cc
wb | reproducible SnapshotInterval behavior
fmaste Aug 6, 2026
7621d4f
wb | split genesis ripper dataset fields into files
fmaste Aug 6, 2026
725fcd2
nix: replace deprecated pkgs.hostPlatform with stdenv.hostPlatform
johnalotoski Aug 7, 2026
e360426
nixosNodeSvc: add optional bls key support
johnalotoski Aug 11, 2026
9c0ed43
docs: update changelog, docker readme, cfg comment
johnalotoski Aug 14, 2026
36a0ded
Bump dependencies for 11.1 node release
koslambrou Aug 14, 2026
18ee6f7
nix: restore lock pins, re-enable haddock ghc9124
johnalotoski Aug 15, 2026
07571db
Bump cardano-api to 11.5, cardano-rpc to 11.1, cardano-cli to 11.2.1
carbolymer Aug 17, 2026
42d848c
cabal: drop the stale alex extra-package; fix trailing whitespace
johnalotoski Aug 17, 2026
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
1 change: 0 additions & 1 deletion .github/workflows/check-mainnet-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ jobs:
'mainnet-byron-genesis.json'
'mainnet-checkpoints.json'
'mainnet-config.json'
'mainnet-config-legacy.json'
'mainnet-peer-snapshot.json'
'mainnet-shelley-genesis.json'
'mainnet-topology.json'
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ jobs:
with:
persist-credentials: false

- name: Enable long paths on Windows
if: runner.os == 'Windows'
run: git config --system core.longpaths true

- name: Cache and install Cabal dependencies
uses: input-output-hk/cardano-dev/actions/cabal-cache@e811e25d3927d62ba87f1762ea51c36e65f0b09a # cabal-cache-0.0.1.0
with:
Expand Down
2 changes: 1 addition & 1 deletion bench/cardano-profile/cardano-profile.cabal
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cabal-version: 3.0

name: cardano-profile
version: 11.0.1
version: 11.1.0
synopsis: A Cardano benchmarking profile generator
description: A Cardano benchmarking profile generator.
category: Cardano,
Expand Down
2 changes: 1 addition & 1 deletion bench/cardano-topology/cardano-topology.cabal
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cabal-version: 3.0

name: cardano-topology
version: 11.0.0
version: 11.1.0
synopsis: A cardano topology generator
description: A cardano topology generator.
category: Cardano,
Expand Down
2 changes: 1 addition & 1 deletion bench/locli/locli.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ library
, hashable
, optparse-applicative
, ouroboros-consensus:ouroboros-consensus
, ouroboros-network:api ^>= 1.1
, ouroboros-network:api ^>= 1.2
, sop-core
, split
, sqlite-easy >= 1.1.0.1
Expand Down
4 changes: 2 additions & 2 deletions bench/plutus-scripts-bench/plutus-scripts-bench.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 3.0
name: plutus-scripts-bench
version: 1.0.4.3
version: 1.0.5.0
synopsis: Plutus scripts used for benchmarking
description: Plutus scripts used for benchmarking.
category: Cardano,
Expand Down Expand Up @@ -82,7 +82,7 @@ library
-- IOG dependencies
--------------------------
build-depends:
, cardano-api ^>=11.3
, cardano-api ^>=11.5
, plutus-ledger-api ^>=1.65
, plutus-tx ^>=1.65
, plutus-tx-plugin ^>=1.65
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import Ouroboros.Network.Mux (MiniProtocolCb (..), OuroborosApplicatio
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 @@ -112,7 +113,7 @@ benchmarkConnectTxSubmit EnvConsts { .. } handshakeTracer submissionTracer codec
supportedVers = supportedNodeToNodeVersions (Proxy @blk)
myCodecs :: Codecs blk NtN.RemoteAddress DeserialiseFailure IO
ByteString ByteString ByteString ByteString ByteString ByteString
ByteString
ByteString ByteString ByteString
myCodecs = defaultCodecs codecConfig blkN2nVer encodeRemoteAddress decodeRemoteAddress n2nVer
peerMultiplex :: NtN.Versions NodeToNodeVersion
NtN.NodeToNodeVersionData
Expand All @@ -129,10 +130,11 @@ benchmarkConnectTxSubmit EnvConsts { .. } handshakeTracer submissionTracer codec
, NtN.diffusionMode = NtN.InitiatorOnlyDiffusionMode
, NtN.peerSharing = ownPeerSharing
, NtN.query = False
, NtN.perasSupport = PerasUnsupported
}) $
\n2nData ->
mkApp $
NtN.nodeToNodeProtocols NtN.defaultMiniProtocolParameters
NtN.nodeToNodeProtocols mempty NtN.defaultMiniProtocolParameters
NtN.NodeToNodeProtocols
{ NtN.chainSyncProtocol = InitiatorProtocolOnly $ MiniProtocolCb $ \_ctx channel ->
runPeer
Expand Down Expand Up @@ -160,6 +162,11 @@ benchmarkConnectTxSubmit EnvConsts { .. } handshakeTracer submissionTracer codec
(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"
Comment thread
f-f marked this conversation as resolved.
}
n2nVer
n2nData
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module Cardano.Benchmarking.GeneratorTx.SubmissionClient
, txSubmissionClient
) where

import Cardano.Api hiding (Active)
import Cardano.Api hiding (Active, CardanoBlock)

import Cardano.Benchmarking.LogTypes
import Cardano.Benchmarking.Types
Expand All @@ -36,7 +36,6 @@ import qualified Ouroboros.Consensus.Cardano.Block as Block
(TxId (GenTxIdAllegra, GenTxIdAlonzo, GenTxIdBabbage, GenTxIdConway, GenTxIdMary, GenTxIdShelley))
import Ouroboros.Consensus.Ledger.SupportsMempool (GenTxId)
import qualified Ouroboros.Consensus.Ledger.SupportsMempool as Mempool
import Ouroboros.Consensus.Shelley.Eras (StandardCrypto)
import qualified Ouroboros.Consensus.Shelley.Ledger.Mempool as Mempool (TxId (ShelleyTxId))
import Ouroboros.Network.Protocol.TxSubmission2.Client (ClientStIdle (..),
ClientStTxIds (..), ClientStTxs (..), TxSubmissionClient (..))
Expand Down
2 changes: 1 addition & 1 deletion bench/tx-generator/src/Cardano/Benchmarking/LogTypes.hs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module Cardano.Benchmarking.LogTypes
, TraceBenchTxSubmit (..)
) where

import Cardano.Api
import Cardano.Api hiding (CardanoBlock)

import Cardano.Benchmarking.OuroborosImports
import Cardano.Benchmarking.Types
Expand Down
19 changes: 8 additions & 11 deletions bench/tx-generator/src/Cardano/Benchmarking/OuroborosImports.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{- HLINT ignore "Eta reduce" -}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE TypeApplications #-}

module Cardano.Benchmarking.OuroborosImports
Expand Down Expand Up @@ -38,21 +37,19 @@ import Prelude

type CardanoBlock = Consensus.CardanoBlock StandardCrypto

toProtocolInfo :: SomeConsensusProtocol -> ProtocolInfo CardanoBlock
toProtocolInfo (SomeConsensusProtocol CardanoBlockType info) = fst $ protocolInfo @IO info
toProtocolInfo :: SomeConsensusProtocol -> IO (ProtocolInfo CardanoBlock)
toProtocolInfo (SomeConsensusProtocol CardanoBlockType info) = fst <$> protocolInfo @IO info
toProtocolInfo _ = error "toProtocolInfo unknown protocol"

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

protocolToCodecConfig :: SomeConsensusProtocol -> CodecConfig CardanoBlock
protocolToCodecConfig = configCodec . protocolToTopLevelConfig
protocolToCodecConfig :: SomeConsensusProtocol -> IO (CodecConfig CardanoBlock)
protocolToCodecConfig = fmap configCodec . protocolToTopLevelConfig

protocolToNetworkId :: SomeConsensusProtocol -> NetworkId
protocolToNetworkId :: SomeConsensusProtocol -> IO NetworkId
protocolToNetworkId ptcl
= Testnet $ getNetworkMagic $ configBlock $ protocolToTopLevelConfig ptcl
= Testnet . getNetworkMagic . configBlock <$> protocolToTopLevelConfig ptcl

makeLocalConnectInfo :: NetworkId -> SocketPath -> LocalNodeConnectInfo
makeLocalConnectInfo networkId socketPath
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ startProtocol configFile tracerSocket = do
setEnvGenesis $ getGenesis protocol
iomgr <- askIOManager

networkId <- liftIO $ protocolToNetworkId protocol
let
networkId = protocolToNetworkId protocol
tracerSocket' = (,,) iomgr networkId `fmap` tracerSocket

setEnvNetworkId networkId
Expand Down
7 changes: 3 additions & 4 deletions bench/tx-generator/src/Cardano/Benchmarking/Script/Core.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE NumericUnderscores #-}
{-# LANGUAGE PackageImports #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
Expand Down Expand Up @@ -59,7 +58,6 @@ import Prelude
import Control.Concurrent (threadDelay)
import Control.Monad
import Control.Monad.Trans.RWS.Strict (ask)
import "contra-tracer" Control.Tracer (Tracer (..))
import Data.ByteString.Lazy.Char8 as BSL (writeFile)
import Data.Ratio ((%))
import qualified Data.Text as Text (unpack)
Expand Down Expand Up @@ -139,11 +137,12 @@ getConnectClient = do
protocol <- getEnvProtocol
void $ return $ btSubmission2_ tracers
envConsts <- lift ask
codecConfig <- liftIO $ protocolToCodecConfig protocol
return $ benchmarkConnectTxSubmit
envConsts
(Tracer $ traceWith (btConnect_ tracers))
(mkTracer $ traceWith (btConnect_ tracers))
mempty -- (btSubmission2_ tracers)
(protocolToCodecConfig protocol)
codecConfig
networkMagic
waitBenchmark :: ActionM ()
waitBenchmark = do
Expand Down
12 changes: 6 additions & 6 deletions bench/tx-generator/src/Cardano/Benchmarking/Tracer.hs
Original file line number Diff line number Diff line change
Expand Up @@ -96,22 +96,22 @@ initTxGenTracers mbForwarding = mdo
confState <- emptyConfigReflection

let
mkTracer :: (LogFormatting a, MetaTrace a)
mkConfiguredTracer :: (LogFormatting a, MetaTrace a)
=> Text
-> Maybe (Trace IO FormattedMessage)
-> Maybe (Trace IO FormattedMessage)
-> IO (Trace IO a)
mkTracer namespace mbStdoutTracer' mbForwardingTracer'
mkConfiguredTracer namespace mbStdoutTracer' mbForwardingTracer'
| isPrefixSilent namespace = pure mempty
| otherwise = do
tracer <- generatorTracer namespace mbStdoutTracer' mbForwardingTracer'
configureTracers confState initialTraceConfig [tracer]
pure tracer

benchTracer <- mkTracer TracerNameBench mbStdoutTracer mbForwardingTracer
n2nSubmitTracer <- mkTracer TracerNameSubmitN2N mbStdoutTracer mbForwardingTracer
connectTracer <- mkTracer TracerNameConnect mbStdoutTracer mbForwardingTracer
submitTracer <- mkTracer TracerNameSubmit mbStdoutTracer mbForwardingTracer
benchTracer <- mkConfiguredTracer TracerNameBench mbStdoutTracer mbForwardingTracer
n2nSubmitTracer <- mkConfiguredTracer TracerNameSubmitN2N mbStdoutTracer mbForwardingTracer
connectTracer <- mkConfiguredTracer TracerNameConnect mbStdoutTracer mbForwardingTracer
submitTracer <- mkConfiguredTracer TracerNameSubmit mbStdoutTracer mbForwardingTracer

let
tracers = BenchTracers
Expand Down
56 changes: 39 additions & 17 deletions bench/tx-generator/src/Cardano/TxGenerator/Genesis.hs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ where

import Cardano.Api hiding (ShelleyGenesis)

import Cardano.Ledger.BaseTypes (StrictMaybe (..))
import qualified Cardano.Ledger.Coin as L
import Cardano.Ledger.Shelley.API (Addr (..))
import Cardano.Ledger.Shelley.Genesis (InjectionData (..), ShelleyExtraConfig (..))
import Cardano.TxGenerator.Fund
import Cardano.TxGenerator.Types
import Cardano.TxGenerator.Utils
Expand All @@ -45,36 +47,56 @@ genesisSecureInitialFund :: forall era. IsShelleyBasedEra era =>
-> SigningKey PaymentKey
-> TxGenTxParams
-> Either TxGenError (Tx era, Fund)
genesisSecureInitialFund networkId genesis srcKey destKey TxGenTxParams{txParamFee, txParamTTL}
= case genesisInitialFundForKey @era networkId genesis srcKey of
Nothing -> Left $ TxGenError "genesisSecureInitialFund: no fund found for given key in genesis"
Just (_, lovelace) ->
let
txOutValue :: TxOutValue era
txOutValue = lovelaceToTxOutValue (shelleyBasedEra @era) $ lovelace - txParamFee
in genesisExpenditure networkId srcKey destAddr txOutValue txParamFee txParamTTL destKey
genesisSecureInitialFund networkId genesis srcKey destKey TxGenTxParams{txParamFee, txParamTTL} = do
mFund <- genesisInitialFundForKey @era networkId genesis srcKey
case mFund of
Nothing -> Left $ TxGenError "genesisSecureInitialFund: no fund found for given key in genesis"
Just (_, lovelace) ->
let
txOutValue :: TxOutValue era
txOutValue = lovelaceToTxOutValue (shelleyBasedEra @era) $ lovelace - txParamFee
in genesisExpenditure networkId srcKey destAddr txOutValue txParamFee txParamTTL destKey
where
destAddr = keyAddress @era networkId destKey

genesisInitialFunds :: forall era. IsShelleyBasedEra era
=> NetworkId
-> ShelleyGenesis
-> [(AddressInEra era, L.Coin)]
genesisInitialFunds networkId g
= [ ( shelleyAddressInEra (shelleyBasedEra @era) $
-> Either TxGenError [(AddressInEra era, L.Coin)]
genesisInitialFunds networkId g = do
funds <- embeddedInitialFunds g
pure
[ ( shelleyAddressInEra (shelleyBasedEra @era) $
makeShelleyAddress networkId (fromShelleyPaymentCredential pcr) (fromShelleyStakeReference stref)
, coin
)
| (Addr _ pcr stref, coin) <- ListMap.toList $ sgInitialFunds g
]
, coin
)
| (Addr _ pcr stref, coin) <- funds
]

-- | 'embeddedInitialFunds' resolves the genesis initial funds, accepting both the
-- legacy top-level @initialFunds@ and the newer @extraConfig.initialFunds@
-- injection that @cardano-cli genesis create-testnet-data@ emits.
embeddedInitialFunds :: ShelleyGenesis -> Either TxGenError [(Addr, L.Coin)]
embeddedInitialFunds g =
case sgExtraConfig g of
SNothing -> Right legacy
SJust extraConfig -> case secInitialFunds extraConfig of
NoInjection -> Right legacy
_ | not (null legacy) ->
Left $ TxGenError "genesisInitialFunds: both initialFunds and extraConfig.initialFunds are populated; please use only one source"
EmbeddedInjection lm -> Right (ListMap.toList lm)
InjectionFromFile{} ->
Left $ TxGenError "genesisInitialFunds: file-based initial-funds injection is unsupported; expected embedded funds in extraConfig.initialFunds or initialFunds"
where
legacy = ListMap.toList $ sgInitialFunds g

genesisInitialFundForKey :: forall era. IsShelleyBasedEra era
=> NetworkId
-> ShelleyGenesis
-> SigningKey PaymentKey
-> Maybe (AddressInEra era, L.Coin)
-> Either TxGenError (Maybe (AddressInEra era, L.Coin))
genesisInitialFundForKey networkId genesis key
= find (isTxOutForKey . fst) (genesisInitialFunds networkId genesis)
= find (isTxOutForKey . fst) <$> genesisInitialFunds networkId genesis
where
isTxOutForKey = (keyAddress networkId key ==)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ import Data.Int (Int64)
import qualified Data.Map.Strict as Map
import qualified Data.Scientific as Scientific
import qualified Data.Text as Text
import Data.Word (Word16)
import Data.Word (Word16, Word32)
import GHC.Generics
import Lens.Micro ((&), (.~), (^.))
import Numeric.Natural (Natural)
Expand All @@ -83,7 +83,7 @@ convertToLedgerProtocolParameters sbe pp =

data ProtocolParameters
= ProtocolParameters
{ protocolParamProtocolVersion :: (Natural, Natural)
{ protocolParamProtocolVersion :: (Natural, Word32)
-- ^ Protocol version, major and minor. Updating the major version is
-- used to trigger hard forks.
-- (Major , Minor )
Expand Down Expand Up @@ -323,7 +323,7 @@ requireParam
requireParam paramName = maybe (Left $ PpceMissingParameter paramName)

-- Duplicated from "cardano-api" module "Cardano.Api.Internal.ProtocolParameters"
mkProtVer :: (Natural, Natural) -> Either ProtocolParametersConversionError Ledger.ProtVer
mkProtVer :: (Natural, Word32) -> Either ProtocolParametersConversionError Ledger.ProtVer
mkProtVer (majorProtVer, minorProtVer) =
maybeToRight (PpceVersionInvalid majorProtVer) $
(`Ledger.ProtVer` minorProtVer) <$> Ledger.mkVersion majorProtVer
Expand Down
10 changes: 4 additions & 6 deletions bench/tx-generator/src/Cardano/TxGenerator/Setup/NixService.hs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import Cardano.Api (AnyCardanoEra, mapFile)
import Cardano.CLI.Type.Common (FileDirection (..), SigningKeyFile)
import qualified Cardano.Ledger.Coin as L
import Cardano.Node.Configuration.NodeAddress (NodeAddress' (..),
NodeHostIPv4Address (..), NodeIPv4Address)
NodeIPv4Address)
import Cardano.Node.Types (AdjustFilePaths (..))
import Cardano.TxGenerator.Internal.Orphans ()
import Cardano.TxGenerator.Types
Expand Down Expand Up @@ -141,22 +141,20 @@ data NodeDescription =

instance FromJSON NodeDescription where
parseJSON = withObject "NodeDescription" \v -> do
unNodeHostIPv4Address
naHostAddress
<- v .: "addr" <?> Key "addr"
naPort <- fmap toEnum $
v .: "port" <?> Key "port"
let naHostAddress = NodeHostIPv4Address {..}
ndAddr = NodeAddress {..}
let ndAddr = NodeAddress {..}
ndName <- v .:? "name" <?> Key "name" .!= show ndAddr
pure $ NodeDescription {..}

instance ToJSON NodeDescription where
toJSON NodeDescription {ndAddr, ndName} = object
[ "name" .= ndName
, "addr" .= unNodeHostIPv4Address
, "addr" .= naHostAddress
, "port" .= fromEnum naPort ] where
_addr@NodeAddress {naHostAddress, naPort} = ndAddr
_hostAddr@NodeHostIPv4Address {unNodeHostIPv4Address} = naHostAddress


-- Long GC pauses on target nodes can trigger spurious MVar deadlock
Expand Down
Loading
Loading