Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cardano-node 10.0 release #5998

Merged
merged 7 commits into from
Oct 18, 2024
Merged
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
10 changes: 5 additions & 5 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.0
version: 1.0.4.1
synopsis: Plutus scripts used for benchmarking
description: Plutus scripts used for benchmarking.
category: Cardano,
Expand Down Expand Up @@ -80,10 +80,10 @@ library
-- IOG dependencies
--------------------------
build-depends:
, cardano-api ^>=9.3
, plutus-ledger-api ^>=1.32
, plutus-tx ^>=1.32
, plutus-tx-plugin ^>=1.32
, cardano-api ^>=10.0
, plutus-ledger-api ^>=1.36
, plutus-tx ^>=1.36
, plutus-tx-plugin ^>=1.36

------------------------
-- Non-IOG dependencies
Expand Down
4 changes: 4 additions & 0 deletions bench/tx-generator/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# ChangeLog

## 2.14.2 -- Oct 2024

* Bump for Node 10

## 2.14.1 -- June 2024
* A new NixSvcOptions field is introduced: `_nix_keepalive`
and it's propagated down to the `kaClient` that does keepalives.
Expand Down
2 changes: 2 additions & 0 deletions bench/tx-generator/src/Cardano/Benchmarking/Command.hs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ import Data.Foldable as Fold (forM_)
import Data.List as List (unwords)
import Data.Time.Format as Time (defaultTimeLocale, formatTime)
import Data.Time.Clock.System as Time (getSystemTime, systemToUTCTime)
import Foreign.C (Errno(..))
import GHC.Weak as Weak (deRefWeak)

import System.Posix.Signals as Sig (Handler (CatchInfo),
Expand All @@ -64,6 +65,7 @@ import GHC.Conc.Sync as Conc (threadLabel)
#endif

#ifdef UNIX
deriving instance Show Errno
deriving instance Show SignalInfo
deriving instance Show SignalSpecificInfo
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ benchmarkConnectTxSubmit EnvConsts { .. } handshakeTracer submissionTracer codec
OuroborosApplication $ fold bundle

n2nVer :: NodeToNodeVersion
n2nVer = NodeToNodeV_12
n2nVer = NodeToNodeV_14
blkN2nVer :: BlockNodeToNodeVersion blk
blkN2nVer = supportedVers Map.! n2nVer
supportedVers :: Map.Map NodeToNodeVersion (BlockNodeToNodeVersion blk)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-}

{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}
Expand All @@ -26,10 +24,11 @@ module Cardano.Benchmarking.GeneratorTx.SubmissionClient
) where

import Cardano.Api hiding (Active)
import Cardano.Api.Shelley (fromShelleyTxId, toConsensusGenTx)
import Cardano.Api.Shelley (fromShelleyTxId, toConsensusGenTx, Tx (..))

import Cardano.Benchmarking.LogTypes
import Cardano.Benchmarking.Types
import qualified Cardano.Ledger.Core as Ledger
import Cardano.Logging
import Cardano.Prelude hiding (ByteString, atomically, retry, state, threadDelay)
import Cardano.Tracing.OrphanInstances.Byron ()
Expand All @@ -40,7 +39,7 @@ import Cardano.Tracing.OrphanInstances.Shelley ()
import qualified Ouroboros.Consensus.Cardano as Consensus (CardanoBlock)
import qualified Ouroboros.Consensus.Cardano.Block as Block
(TxId (GenTxIdAllegra, GenTxIdAlonzo, GenTxIdBabbage, GenTxIdConway, GenTxIdMary, GenTxIdShelley))
import Ouroboros.Consensus.Ledger.SupportsMempool (GenTx, GenTxId, txInBlockSize)
import Ouroboros.Consensus.Ledger.SupportsMempool (GenTx, 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))
Expand All @@ -57,6 +56,8 @@ import qualified Data.List as L
import qualified Data.List.Extra as L
import qualified Data.List.NonEmpty as NE
import qualified Data.Text as T
import Lens.Micro ((^.))

type CardanoBlock = Consensus.CardanoBlock StandardCrypto

data SubmissionThreadStats
Expand Down Expand Up @@ -85,10 +86,9 @@ type LocalState era = (TxSource era, UnAcked (Tx era), SubmissionThreadStats)
type EndOfProtocolCallback m = SubmissionThreadStats -> m ()

txSubmissionClient
:: forall m era tx.
:: forall m era.
( MonadIO m, MonadFail m
, IsShelleyBasedEra era
, tx ~ Tx era
)
=> Trace m NodeToNodeSubmissionTrace
-> Trace m (TraceBenchTxSubmit TxId)
Expand All @@ -110,11 +110,11 @@ txSubmissionClient tr bmtr initialTxSource endOfProtocolCallback =
traceWith bmtr $ SubmissionClientDiscardAcknowledged (getTxId . getTxBody <$> acked)
return (txSource, UnAcked stillUnacked, newStats)

queueNewTxs :: [tx] -> LocalState era -> LocalState era
queueNewTxs :: [Tx era] -> LocalState era -> LocalState era
queueNewTxs newTxs (txSource, UnAcked unAcked, stats)
= (txSource, UnAcked (newTxs <> unAcked), stats)

client ::LocalState era -> ClientStIdle (GenTxId CardanoBlock) (GenTx CardanoBlock) m ()
client :: LocalState era -> ClientStIdle (GenTxId CardanoBlock) (GenTx CardanoBlock) m ()

client localState = ClientStIdle
{ recvMsgRequestTxIds = requestTxIds localState
Expand Down Expand Up @@ -177,12 +177,15 @@ txSubmissionClient tr bmtr initialTxSource endOfProtocolCallback =
, stsUnavailable =
stsUnavailable stats + Unav (length missIds)}))

txToIdSize :: tx -> (GenTxId CardanoBlock, SizeInBytes)
txToIdSize = (Mempool.txId &&& (SizeInBytes . txInBlockSize)) . toGenTx

toGenTx :: tx -> GenTx CardanoBlock
toGenTx tx = toConsensusGenTx $ TxInMode (shelleyBasedEra @era) tx
txToIdSize :: Tx era -> (GenTxId CardanoBlock, SizeInBytes)
txToIdSize = (Mempool.txId . toGenTx) &&& (SizeInBytes . fromInteger . getTxSize)
where
getTxSize :: Tx era -> Integer
getTxSize (ShelleyTx sbe tx) =
shelleyBasedEraConstraints sbe $ tx ^. Ledger.sizeTxF

toGenTx :: Tx era -> GenTx CardanoBlock
toGenTx tx = toConsensusGenTx $ TxInMode shelleyBasedEra tx

fromGenTxId :: GenTxId CardanoBlock -> TxId
fromGenTxId (Block.GenTxIdShelley (Mempool.ShelleyTxId i)) = fromShelleyTxId i
Expand Down
7 changes: 4 additions & 3 deletions bench/tx-generator/tx-generator.cabal
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cabal-version: 3.0

name: tx-generator
version: 2.14.1
version: 2.14.2
synopsis: A transaction workload generator for Cardano clusters
description: A transaction workload generator for Cardano clusters.
category: Cardano,
Expand Down Expand Up @@ -106,9 +106,9 @@ library
, attoparsec-aeson
, base16-bytestring
, bytestring
, cardano-api ^>= 9.3
, cardano-api ^>= 10.0
, cardano-binary
, cardano-cli ^>= 9.4
, cardano-cli ^>= 10.0
, cardano-crypto-class
, cardano-crypto-wrapper
, cardano-data
Expand All @@ -129,6 +129,7 @@ library
, generic-monoid
, ghc-prim
, io-classes
, microlens
, mtl
, network
, network-mux
Expand Down
5 changes: 3 additions & 2 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ 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 2024-09-05T18:39:40Z
, cardano-haskell-packages 2024-09-10T12:51:27Z
, hackage.haskell.org 2024-10-10T00:52:24Z
, cardano-haskell-packages 2024-10-17T12:07:57Z

packages:
cardano-node
Expand Down Expand Up @@ -59,6 +59,7 @@ package plutus-scripts-bench

constraints:
, wai-extra < 3.1.15
, Cabal < 3.14

allow-newer:
, katip:Win32
Expand Down
6 changes: 3 additions & 3 deletions cardano-node-chairman/cardano-node-chairman.cabal
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cabal-version: 3.0

name: cardano-node-chairman
version: 9.0.0
version: 10.0.0
synopsis: The cardano full node
description: The cardano full node.
category: Cardano,
Expand Down Expand Up @@ -44,7 +44,7 @@ executable cardano-node-chairman
build-depends: cardano-api
, cardano-crypto-class
, cardano-git-rev ^>= 0.2.2
, cardano-node ^>= 9.2
, cardano-node ^>= 10.0
, cardano-prelude
, containers
, contra-tracer
Expand Down Expand Up @@ -89,5 +89,5 @@ test-suite chairman-tests
ghc-options: -threaded -rtsopts "-with-rtsopts=-N -T"

build-tool-depends: cardano-node:cardano-node
, cardano-cli:cardano-cli ^>= 9.4
, cardano-cli:cardano-cli ^>= 10.0
, cardano-node-chairman:cardano-node-chairman
22 changes: 11 additions & 11 deletions cardano-node/cardano-node.cabal
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cabal-version: 3.0

name: cardano-node
version: 9.2.0
version: 10.0
synopsis: The cardano full node
description: The cardano full node.
category: Cardano,
Expand Down Expand Up @@ -38,8 +38,8 @@ common project-config
-Wpartial-fields
-Wredundant-constraints
-Wunused-packages
common maybe-Win32
if os(windows)
common maybe-Win32
if os(windows)
build-depends: Win32

common maybe-unix
Expand All @@ -55,7 +55,7 @@ common text
library
import: project-config
, maybe-unix
, maybe-Win32
, maybe-Win32
, text
if flag(unexpected_thunks)
cpp-options: -DUNEXPECTED_THUNKS
Expand Down Expand Up @@ -145,7 +145,7 @@ library
, async
, base16-bytestring
, bytestring
, cardano-api ^>= 9.3
, cardano-api ^>= 10.0
, cardano-crypto-class
, cardano-crypto-wrapper
, cardano-git-rev ^>=0.2.2
Expand Down Expand Up @@ -186,14 +186,14 @@ library
, network-mux >= 0.4
, nothunks
, optparse-applicative-fork >= 0.18.1
, ouroboros-consensus ^>= 0.20
, ouroboros-consensus-cardano ^>= 0.19
, ouroboros-consensus-diffusion ^>= 0.17
, ouroboros-consensus ^>= 0.21
, ouroboros-consensus-cardano ^>= 0.20
, ouroboros-consensus-diffusion ^>= 0.18
, ouroboros-consensus-protocol
, ouroboros-network-api ^>= 0.9
, ouroboros-network-api ^>= 0.10
, ouroboros-network ^>= 0.17
, ouroboros-network-framework
, ouroboros-network-protocols ^>= 0.10
, ouroboros-network-protocols ^>= 0.11
, prettyprinter
, prettyprinter-ansi-terminal
, psqueues
Expand All @@ -207,7 +207,7 @@ library
, strict-stm
, time
, trace-dispatcher ^>= 2.7.0
, trace-forward ^>= 2.2.7
, trace-forward ^>= 2.2.8
, trace-resources ^>= 0.2.2
, tracer-transformers
, transformers
Expand Down
6 changes: 3 additions & 3 deletions cardano-node/src/Cardano/Node/Configuration/POM.hs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ import Cardano.Node.Protocol.Types (Protocol (..))
import Cardano.Node.Types
import Cardano.Tracing.Config
import Cardano.Tracing.OrphanInstances.Network ()
import Ouroboros.Consensus.Mempool (MempoolCapacityBytes (..),
MempoolCapacityBytesOverride (..))
import Ouroboros.Consensus.Ledger.SupportsMempool
import Ouroboros.Consensus.Mempool (MempoolCapacityBytesOverride (..))
import Ouroboros.Consensus.Node (NodeDatabasePaths (..))
import qualified Ouroboros.Consensus.Node as Consensus (NetworkP2PMode (..))
import Ouroboros.Consensus.Storage.LedgerDB.DiskPolicy (NumOfDiskSnapshots (..),
Expand Down Expand Up @@ -361,7 +361,7 @@ instance FromJSON PartialNodeConfiguration where
where
parseMempoolCapacityBytesOverride v = parseNoOverride <|> parseOverride
where
parseNoOverride = fmap (MempoolCapacityBytesOverride . MempoolCapacityBytes) <$> v .:? "MempoolCapacityBytesOverride"
parseNoOverride = fmap (MempoolCapacityBytesOverride . ByteSize32) <$> v .:? "MempoolCapacityBytesOverride"
parseOverride = do
maybeString :: Maybe String <- v .:? "MempoolCapacityBytesOverride"
case maybeString of
Expand Down
Loading
Loading