Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
NanuIjaz committed Mar 1, 2024
2 parents 343fa94 + f7900cd commit af48377
Show file tree
Hide file tree
Showing 38 changed files with 729 additions and 276 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check-mainnet-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
for f in "${test_files[@]}"; do
nix_file="result/$f"
repo_file="configuration/cardano/$f"
if ! jq -e --argfile nix "$nix_file" --argfile repo "$repo_file" -n '$repo | reduce keys[] as $k (true; . and $repo[$k] == $nix[$k])' &>/dev/null ; then
if ! jq -e --slurpfile nix "$nix_file" --slurpfile repo "$repo_file" -n '$repo | reduce keys[] as $k (true; . and $repo[$k] == $nix[$k])' &>/dev/null ; then
echo "Nix file $nix_file does not have all the same top-level entries as the file from repository $repo_file"
diff "$nix_file" "$repo_file"
exit 1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:

env:
# Modify this value to "invalidate" the cabal cache.
CABAL_CACHE_VERSION: "2024-02-26-4"
CABAL_CACHE_VERSION: "2024-02-29"

concurrency:
group: >
Expand Down
6 changes: 3 additions & 3 deletions bench/locli/locli.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ library
, optparse-generic
, ouroboros-consensus
-- for Data.SOP.Strict:
, ouroboros-network ^>= 0.11
, ouroboros-network ^>= 0.12
, ouroboros-network-api
, process
, quiet
Expand Down Expand Up @@ -170,12 +170,12 @@ test-suite test-locli
hs-source-dirs: test
main-is: test-locli.hs
type: exitcode-stdio-1.0
ghc-options: -threaded -rtsopts -with-rtsopts=-N -with-rtsopts=-T
ghc-options: -threaded -rtsopts "-with-rtsopts=-N -T"

build-depends: cardano-prelude
, containers
, hedgehog
, hedgehog-extras ^>= 0.6.1.0
, hedgehog-extras < 0.6.2
, locli
, text

Expand Down
2 changes: 1 addition & 1 deletion bench/plutus-scripts-bench/plutus-scripts-bench.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ library
-- IOG dependencies
--------------------------
build-depends:
, cardano-api ^>= 8.39
, cardano-api ^>= 8.39.2.0
, plutus-ledger-api >=1.0.0
, plutus-tx >=1.0.0
, plutus-tx-plugin ^>=1.21
Expand Down
8 changes: 4 additions & 4 deletions bench/tx-generator/tx-generator.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ library
, attoparsec-aeson
, base16-bytestring
, bytestring
, cardano-api ^>= 8.39
, cardano-api ^>= 8.39.2.0
, cardano-binary
, cardano-cli ^>= 8.20.2.0
, cardano-cli ^>= 8.20.3.0
, cardano-crypto-class
, cardano-crypto-wrapper
, cardano-data
Expand Down Expand Up @@ -238,7 +238,7 @@ test-suite tx-generator-test
-fno-warn-missing-import-lists
-fno-warn-safe
-fno-warn-unsafe
-threaded -rtsopts -with-rtsopts=-N -with-rtsopts=-T
-threaded -rtsopts "-with-rtsopts=-N -T"

benchmark tx-generator-bench
import: project-config
Expand All @@ -256,4 +256,4 @@ benchmark tx-generator-bench
-fno-warn-missing-import-lists
-fno-warn-safe
-fno-warn-unsafe
-threaded -rtsopts -with-rtsopts=-N -with-rtsopts=-T
-threaded -rtsopts "-with-rtsopts=-N -T"
4 changes: 2 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-02-21T10:56:14Z
, cardano-haskell-packages 2024-02-23T22:53:00Z
, hackage.haskell.org 2024-02-27T08:06:51Z
, cardano-haskell-packages 2024-02-26T17:55:44Z

packages:
cardano-git-rev
Expand Down
2 changes: 1 addition & 1 deletion cardano-node-chairman/app/Cardano/Chairman.hs
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ chainSyncClient tracer sockPath chainsVar secParam = ChainSyncClient $ pure $
}
where
clientStIdle :: ClientStIdle BlockInMode ChainPoint ChainTip IO ()
clientStIdle = SendMsgRequestNext clientStNext (pure clientStNext)
clientStIdle = SendMsgRequestNext (pure ()) clientStNext

clientStNext :: ClientStNext BlockInMode ChainPoint ChainTip IO ()
clientStNext = ClientStNext
Expand Down
8 changes: 4 additions & 4 deletions cardano-node-chairman/cardano-node-chairman.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ executable cardano-node-chairman
build-depends: cardano-api
, cardano-crypto-class
, cardano-git-rev
, cardano-node ^>= 8.8
, cardano-node ^>= 8.9
, cardano-prelude
, containers
, contra-tracer
Expand Down Expand Up @@ -72,7 +72,7 @@ test-suite chairman-tests
, cardano-crypto-class ^>= 2.1.2
, filepath
, hedgehog
, hedgehog-extras ^>= 0.6.1.0
, hedgehog-extras < 0.6.2
, network
, process
, random
Expand All @@ -85,8 +85,8 @@ test-suite chairman-tests
Spec.Chairman.Cardano
Spec.Network

ghc-options: -threaded -rtsopts -with-rtsopts=-N -with-rtsopts=-T
ghc-options: -threaded -rtsopts "-with-rtsopts=-N -T"

build-tool-depends: cardano-node:cardano-node
, cardano-cli:cardano-cli ^>= 8.20.2.0
, cardano-cli:cardano-cli ^>= 8.20.3.0
, cardano-node-chairman:cardano-node-chairman
18 changes: 9 additions & 9 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: 8.8.1
version: 8.9.0
synopsis: The cardano full node
description: The cardano full node.
category: Cardano,
Expand Down Expand Up @@ -144,7 +144,7 @@ library
, async
, base16-bytestring
, bytestring
, cardano-api ^>= 8.39
, cardano-api ^>= 8.39.2.0
, cardano-crypto-class
, cardano-crypto-wrapper
, cardano-git-rev
Expand All @@ -171,7 +171,7 @@ library
, formatting
, generic-data
, hostname
, io-classes >= 0.3
, io-classes >= 1.4
, iohk-monitoring
, iproute
, lobemo-backend-aggregation
Expand All @@ -183,14 +183,14 @@ library
, network-mux >= 0.4
, nothunks
, optparse-applicative-fork >= 0.18.1
, ouroboros-consensus ^>= 0.15
, ouroboros-consensus-cardano ^>= 0.13
, ouroboros-consensus-diffusion ^>= 0.10
, ouroboros-consensus ^>= 0.16
, ouroboros-consensus-cardano ^>= 0.14
, ouroboros-consensus-diffusion ^>= 0.11
, ouroboros-consensus-protocol
, ouroboros-network-api
, ouroboros-network ^>= 0.11
, ouroboros-network ^>= 0.12
, ouroboros-network-framework
, ouroboros-network-protocols ^>= 0.7
, ouroboros-network-protocols ^>= 0.8
, prettyprinter
, prettyprinter-ansi-terminal
, psqueues
Expand Down Expand Up @@ -276,4 +276,4 @@ test-suite cardano-node-test
Test.Cardano.Tracing.NewTracing.Consistency
Test.Cardano.Tracing.OrphanInstances.HardFork

ghc-options: -threaded -rtsopts -with-rtsopts=-N -with-rtsopts=-T
ghc-options: -threaded -rtsopts "-with-rtsopts=-N -T"
19 changes: 14 additions & 5 deletions cardano-node/src/Cardano/Node/Configuration/POM.hs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ import Cardano.Tracing.OrphanInstances.Network ()
import Ouroboros.Consensus.Mempool (MempoolCapacityBytes (..),
MempoolCapacityBytesOverride (..))
import qualified Ouroboros.Consensus.Node as Consensus (NetworkP2PMode (..))
import Ouroboros.Consensus.Storage.LedgerDB.DiskPolicy (SnapshotInterval (..))
import Ouroboros.Consensus.Storage.LedgerDB.DiskPolicy (NumOfDiskSnapshots (..),
SnapshotInterval (..))
import Ouroboros.Network.NodeToNode (AcceptedConnectionsLimit (..), DiffusionMode (..))
import Ouroboros.Network.PeerSelection.PeerSharing (PeerSharing (..))

Expand Down Expand Up @@ -101,8 +102,9 @@ data NodeConfiguration
, ncProtocolConfig :: !NodeProtocolConfiguration

-- Node parameters, not protocol-specific:
, ncDiffusionMode :: !DiffusionMode
, ncSnapshotInterval :: !SnapshotInterval
, ncDiffusionMode :: !DiffusionMode
, ncNumOfDiskSnapshots :: !NumOfDiskSnapshots
, ncSnapshotInterval :: !SnapshotInterval

-- | During the development and integration of new network protocols
-- (node-to-node and node-to-client) we wish to be able to test them
Expand Down Expand Up @@ -182,8 +184,9 @@ data PartialNodeConfiguration
, pncProtocolConfig :: !(Last NodeProtocolConfiguration)

-- Node parameters, not protocol-specific:
, pncDiffusionMode :: !(Last DiffusionMode)
, pncSnapshotInterval :: !(Last SnapshotInterval)
, pncDiffusionMode :: !(Last DiffusionMode )
, pncNumOfDiskSnapshots :: !(Last NumOfDiskSnapshots)
, pncSnapshotInterval :: !(Last SnapshotInterval)
, pncExperimentalProtocolsEnabled :: !(Last Bool)

-- BlockFetch configuration
Expand Down Expand Up @@ -241,6 +244,8 @@ instance FromJSON PartialNodeConfiguration where
pncSocketPath <- Last <$> v .:? "SocketPath"
pncDiffusionMode
<- Last . fmap getDiffusionMode <$> v .:? "DiffusionMode"
pncNumOfDiskSnapshots
<- Last . fmap RequestedNumOfDiskSnapshots <$> v .:? "NumOfDiskSnapshots"
pncSnapshotInterval
<- Last . fmap RequestedSnapshotInterval <$> v .:? "SnapshotInterval"
pncExperimentalProtocolsEnabled <- fmap Last $ do
Expand Down Expand Up @@ -320,6 +325,7 @@ instance FromJSON PartialNodeConfiguration where
pncProtocolConfig
, pncSocketConfig = Last . Just $ SocketConfig mempty mempty mempty pncSocketPath
, pncDiffusionMode
, pncNumOfDiskSnapshots
, pncSnapshotInterval
, pncExperimentalProtocolsEnabled
, pncMaxConcurrencyBulkSync
Expand Down Expand Up @@ -490,6 +496,7 @@ defaultPartialNodeConfiguration =
, pncLoggingSwitch = Last $ Just True
, pncSocketConfig = Last . Just $ SocketConfig mempty mempty mempty mempty
, pncDiffusionMode = Last $ Just InitiatorAndResponderDiffusionMode
, pncNumOfDiskSnapshots = Last $ Just DefaultNumOfDiskSnapshots
, pncSnapshotInterval = Last $ Just DefaultSnapshotInterval
, pncExperimentalProtocolsEnabled = Last $ Just False
, pncTopologyFile = Last . Just $ TopologyFile "configuration/cardano/mainnet-topology.json"
Expand Down Expand Up @@ -541,6 +548,7 @@ makeNodeConfiguration pnc = do
logMetrics <- lastToEither "Missing LogMetrics" $ pncLogMetrics pnc
traceConfig <- first Text.unpack $ partialTraceSelectionToEither $ pncTraceConfig pnc
diffusionMode <- lastToEither "Missing DiffusionMode" $ pncDiffusionMode pnc
numOfDiskSnapshots <- lastToEither "Missing NumOfDiskSnapshots" $ pncNumOfDiskSnapshots pnc
snapshotInterval <- lastToEither "Missing SnapshotInterval" $ pncSnapshotInterval pnc
shutdownConfig <- lastToEither "Missing ShutdownConfig" $ pncShutdownConfig pnc
socketConfig <- lastToEither "Missing SocketConfig" $ pncSocketConfig pnc
Expand Down Expand Up @@ -609,6 +617,7 @@ makeNodeConfiguration pnc = do
, ncProtocolConfig = protocolConfig
, ncSocketConfig = socketConfig
, ncDiffusionMode = diffusionMode
, ncNumOfDiskSnapshots = numOfDiskSnapshots
, ncSnapshotInterval = snapshotInterval
, ncExperimentalProtocolsEnabled = experimentalProtocols
, ncMaxConcurrencyBulkSync = getLast $ pncMaxConcurrencyBulkSync pnc
Expand Down
Loading

0 comments on commit af48377

Please sign in to comment.