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

DONOTMERGE SRPs for thread debugging #6089

Draft
wants to merge 15 commits into
base: master
Choose a base branch
from
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
2 changes: 1 addition & 1 deletion bench/cardano-topology/NOTICE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2021-2023 Input Output Global Inc (IOG), 2023-2024 Intersect.
Copyright 2021-2023 Input Output Global Inc (IOG), 2023-2025 Intersect.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion bench/cardano-topology/cardano-topology.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ synopsis: A cardano topology generator
description: A cardano topology generator.
category: Cardano,
Test,
copyright: 2021-2023 Input Output Global Inc (IOG), 2023-2024 Intersect.
copyright: 2021-2023 Input Output Global Inc (IOG), 2023-2025 Intersect.
author: IOHK
maintainer: [email protected]
license: Apache-2.0
Expand Down
2 changes: 1 addition & 1 deletion bench/locli/NOTICE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2021-2023 Input Output Global Inc (IOG), 2023-2024 Intersect.
Copyright 2021-2023 Input Output Global Inc (IOG), 2023-2025 Intersect.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion bench/locli/locli.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ synopsis: Cardano log analysis CLI
description: Cardano log analysis CLI.
category: Cardano,
Logging,
copyright: 2021-2023 Input Output Global Inc (IOG), 2023-2024 Intersect.
copyright: 2021-2023 Input Output Global Inc (IOG), 2023-2025 Intersect.
author: IOHK
maintainer: [email protected]
license: Apache-2.0
Expand Down
2 changes: 1 addition & 1 deletion bench/plutus-scripts-bench/NOTICE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2023 Input Output Global Inc (IOG), 2023-2024 Intersect.
Copyright 2023 Input Output Global Inc (IOG), 2023-2025 Intersect.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
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 @@ -10,7 +10,7 @@ maintainer: [email protected]
license: Apache-2.0
license-files: LICENSE
NOTICE
copyright: 2023 Input Output Global Inc (IOG), 2023-2024 Intersect.
copyright: 2023 Input Output Global Inc (IOG), 2023-2025 Intersect.
build-type: Simple

flag unexpected_thunks
Expand Down
2 changes: 1 addition & 1 deletion bench/tx-generator/NOTICE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2019-2023 Input Output Global Inc (IOG), 2023-2024 Intersect.
Copyright 2019-2023 Input Output Global Inc (IOG), 2023-2025 Intersect.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
3 changes: 1 addition & 2 deletions bench/tx-generator/tx-generator.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ synopsis: A transaction workload generator for Cardano clusters
description: A transaction workload generator for Cardano clusters.
category: Cardano,
Test,
copyright: 2019-2023 Input Output Global Inc (IOG), 2023-2024 Intersect.
copyright: 2019-2023 Input Output Global Inc (IOG), 2023-2025 Intersect.
author: IOHK
maintainer: [email protected]
license: Apache-2.0
Expand Down Expand Up @@ -158,7 +158,6 @@ library
, transformers-except
, unordered-containers
, yaml
, microlens

default-language: Haskell2010
default-extensions: OverloadedStrings
Expand Down
63 changes: 62 additions & 1 deletion cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repository cardano-haskell-packages
-- you need to run if you change them
index-state:
, hackage.haskell.org 2025-01-01T23:24:19Z
, cardano-haskell-packages 2025-01-16T11:44:54Z
, cardano-haskell-packages 2025-01-22T16:50:05Z

packages:
cardano-node
Expand Down Expand Up @@ -64,3 +64,64 @@ allow-newer:
-- 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/jasagredo/async
tag: 57b9ef37662b4c978eef7bc6bd255c9a89d7d731

source-repository-package
type: git
location: https://github.com/jasagredo/katip
tag: 186a10c0f92d84375ff69db1d9e0a33adda9d2b8
subdir:
katip

source-repository-package
type: git
location: https://github.com/jasagredo/wai
tag: eebc207b826f923c50e9d21fe39d8793b5248a58
subdir:
warp

source-repository-package
type: git
location: https://github.com/jasagredo/ekg-wai
tag: 7373a7826abfd5093be931c36542e52421012154

source-repository-package
type: git
location: https://github.com/IntersectMBO/ouroboros-network
tag: a00bcfef4a8599a60adb5f908ec56249bcd6ac9d
subdir:
ouroboros-network
ouroboros-network-framework

source-repository-package
type: git
location: https://github.com/IntersectMBO/ouroboros-consensus
tag: b38ca254f73aae13eb50b2ea9eae786e14ae7a01
subdir:
ouroboros-consensus
ouroboros-consensus-diffusion

source-repository-package
type: git
location: https://github.com/input-output-hk/iohk-monitoring-framework
tag: 45fef502fd0380425fd7ff83cd0bf6764f063853
subdir:
iohk-monitoring
plugins/backend-ekg
plugins/backend-aggregation
plugins/backend-monitoring

source-repository-package
type: git
location: https://github.com/IntersectMBO/Win32-network
tag: e09fd544175b35779204fbeadcd0a37fc4f92220

source-repository-package
type: git
location: https://github.com/input-output-hk/io-sim
tag: d037df6436c270cbb40d58d72cad19dac8b79bab
subdir:
io-classes
2 changes: 1 addition & 1 deletion cardano-node-capi/NOTICE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2021-2023 Input Output Global Inc (IOG), 2023-2024 Intersect.
Copyright 2021-2023 Input Output Global Inc (IOG), 2023-2025 Intersect.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion cardano-node-capi/cardano-node-capi.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ synopsis: FFI C library for Cardano
description: ffi c library around the full node.
category: Cardano,
FFI,
copyright: 2021-2023 Input Output Global Inc (IOG), 2023-2024 Intersect.
copyright: 2021-2023 Input Output Global Inc (IOG), 2023-2025 Intersect.
author: IOHK
maintainer: [email protected]
license: Apache-2.0
Expand Down
2 changes: 1 addition & 1 deletion cardano-node-chairman/NOTICE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2020-2023 Input Output Global Inc (IOG), 2023-2024 Intersect.
Copyright 2020-2023 Input Output Global Inc (IOG), 2023-2025 Intersect.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
4 changes: 2 additions & 2 deletions cardano-node-chairman/cardano-node-chairman.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ synopsis: The cardano full node
description: The cardano full node.
category: Cardano,
Test,
copyright: 2020-2023 Input Output Global Inc (IOG), 2023-2024 Intersect.
copyright: 2020-2023 Input Output Global Inc (IOG), 2023-2025 Intersect.
author: IOHK
maintainer: [email protected]
license: Apache-2.0
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 ^>= 10.1.1
, cardano-node ^>= 10.2
, cardano-prelude
, containers
, contra-tracer
Expand Down
39 changes: 38 additions & 1 deletion cardano-node/ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,59 @@
# Changelog for cardano-node

## Next version
## 10.2 -- January 2025

- Use p2p network stack by default, warn when using the legacy network stack.

- Deprecate some CLI flags corresponding to low-level consensus options. They are
still accepted but a warning is emitted on startup on stderr suggesting to set
them in the configuration file instead:
- `--mempool-capacity-override` and `--no-mempool-capacity-override` can be set in the configuration file via the key `MempoolCapacityBytesOverride`.
- `--snapshot-interval` can be set in the configuration file via the key `SnapshotInterval`.
- `--num-of-disk-snapshots` can be set in the configuration file via the key `NumOfDiskSnapshots`.

- Ledger peer snapshot path entry added to topology JSON parser,
which a new decoder function `readPeerSnapshotFile` processes
at startup and SIGHUP. Data is available to the diffusion layer
via TVar.

- Configuration changes:
- Add `ConsensusMode` and `MinBigLedgerPeersForTrustedState`
- Add Genesis config
- Add `diffusionMode` to local root peers group configuration
- Add `DoDiskSnapshotChecksum`

- Change fallback node name for trace forwarding from `host:port` to `host_port`

- Use metric names of old-tracing in new-tracing as well, and fix some metrics in new tracing.

- Tracing updates:
- Add support for `ChainSelStarvationEvent`, `ExtValidationError`
- Add support for `KeepAlive` protocol
- Add support for `LocalStateQuery` protocol
- Add support for `UsingBigLedgerPeerSnapshot`, `VerifyPeerSnapshot`
- Add support for `ConnectionError`
- Add support for `AddNewNodeIdMapping`
- Add support for `PeerFetch` and `PeerStarvedUs`
- Add support for `SnapshotMissingChecksum`
- Add support for stateful messages
- Add `maximumKesEvolutions` to `InvalidKesSignatureOCERT` event
- Rename kind field of all `MuxXxx` trace messages to be `Mux.Xxx`
- Rename fields in `RotatedDynamo` event to `oldPeer`, `newPeer`
- Rename `ConnectTo` to `Connect`
- Change format of `GenesisPoint`, `LabelPeer`, `DecisionEvent`
- Change format of `ConnectionManagerState`
- Change format of `AddedToCurrentChain`
- Drop support for `ClientAgency`, `ServerAgency`
- Drop support for `FetchDecision declined`, `FetchDecision results`
- Drop support for `StakeKeyInRewardsDELEG`
- Drop support for `ChainSelectionForFutureBlock`, `BlockInTheFuture`,
`CandidateContainsFutureBlocks`, `CandidateContainsFutureBlocksExceedingClockSkew`,
`InvalidBlockReason`

- Drop NodeToClient versions 9 through 15, and add 19

- Increase minor protocol version to `10.3`

## 8.2.1 -- August 2023

- prevent SIGHUP from killing node during ledger replay
Expand Down
2 changes: 1 addition & 1 deletion cardano-node/NOTICE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2019-2023 Input Output Global Inc (IOG), 2023-2024 Intersect.
Copyright 2019-2023 Input Output Global Inc (IOG), 2023-2025 Intersect.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
16 changes: 10 additions & 6 deletions cardano-node/app/cardano-node.hs
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,14 @@ import System.IO (hPutStrLn, stderr)

import Paths_cardano_node (version)

import GHC.Conc

main :: IO ()
main = do
Crypto.cryptoInit

myThreadId >>= flip labelThread "main"

toplevelExceptionHandler $ do
cmd <- Opt.customExecParser p opts

Expand All @@ -45,15 +49,15 @@ main = do
p = Opt.prefs Opt.showHelpOnEmpty

warnIfSet :: PartialNodeConfiguration -> (PartialNodeConfiguration -> Last a) -> String -> String -> IO ()
warnIfSet args f name key =
maybe
(pure ())
(\_ -> hPutStrLn stderr $ "WARNING: Option --" ++ name ++ " was set via CLI flags.\
warnIfSet args f name key =
maybe
(pure ())
(\_ -> hPutStrLn stderr $ "WARNING: Option --" ++ name ++ " was set via CLI flags.\
\ This CLI flag will be removed in upcoming node releases.\
\ Please, set this configuration option in the configuration file instead with key " ++ key ++ ".")
\ Please, set this configuration option in the configuration file instead with key " ++ key ++ ".")
$ getLast
$ f args

opts :: Opt.ParserInfo Command
opts =
Opt.info (fmap RunCmd nodeCLIParser
Expand Down
9 changes: 5 additions & 4 deletions cardano-node/cardano-node.cabal
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
cabal-version: 3.0

name: cardano-node
version: 10.1.4
version: 10.2
synopsis: The cardano full node
description: The cardano full node.
category: Cardano,
Validator,
copyright: 2019-2023 Input Output Global Inc (IOG), 2023-2024 Intersect.
copyright: 2019-2023 Input Output Global Inc (IOG), 2023-2025 Intersect.
author: IOHK
maintainer: [email protected]
license: Apache-2.0
Expand Down Expand Up @@ -207,8 +207,8 @@ library
, strict-sop-core
, strict-stm
, time
, trace-dispatcher ^>= 2.7.0
, trace-forward ^>= 2.2.8
, trace-dispatcher ^>= 2.8.0
, trace-forward ^>= 2.2.9
, trace-resources ^>= 0.2.3
, tracer-transformers
, transformers
Expand All @@ -223,6 +223,7 @@ executable cardano-node
main-is: cardano-node.hs
ghc-options: -threaded
-rtsopts
-debug

if arch(arm)
ghc-options: "-with-rtsopts=-T -I0 -A16m -N1 --disable-delayed-os-memory-return"
Expand Down
5 changes: 4 additions & 1 deletion cardano-node/src/Cardano/Node/Configuration/Logging.hs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ import Cardano.Slotting.Slot (EpochSize (..))
import Cardano.Tracing.Config (TraceOptions (..))
import Cardano.Tracing.OrphanInstances.Common ()
import Paths_cardano_node (version)
import GHC.Conc (labelThread, myThreadId)

--------------------------------
-- Layer
Expand Down Expand Up @@ -285,7 +286,9 @@ createLoggingLayer ver nodeConfig' p = do
pure ()

startCapturingMetrics _ tr = do
void . Async.async . forever $ do
void . Async.async $ do
myThreadId >>= flip labelThread "Metrics capturing (cardano-node)"
forever $ do
readResourceStats
>>= maybe (pure ())
(traceResourceStats
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,12 @@ readTopologyFile nc tr = do
]
genesisIncompatible
= Text.pack $ "Cardano.Node.Configuration.Topology.readTopologyFile: "
<> "Bootstrap peers are not used in Genesis consensus mode."
<> "Bootstrap peers (field 'bootstrapPeers') are not compatible "
<> "with Genesis syncing mode, reverting to 'DontUseBootstrapPeers'. "
<> "Big ledger peers will be leveraged for decentralized syncing - it "
<> "is recommened to provide an up-to-date big ledger peer snapshot file "
<> "(field 'peerSnapshotFile' in topology configuration) to facilitate "
<> "this process."
handlerBootstrap :: Text
handlerBootstrap = mconcat
[ "You seem to have not configured any trustable peers. "
Expand Down
2 changes: 1 addition & 1 deletion cardano-node/src/Cardano/Node/Protocol/Cardano.hs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ mkSomeConsensusProtocolCardano NodeByronProtocolConfiguration {
shelleyGenesisHash,
shelleyBasedLeaderCredentials = shelleyLeaderCredentials
}
, Consensus.cardanoProtocolVersion = ProtVer (natVersion @10) 2
, Consensus.cardanoProtocolVersion = ProtVer (natVersion @10) 3
-- The remaining arguments specify the parameters needed to transition between two eras
, Consensus.cardanoLedgerTransitionConfig =
Ledger.mkLatestTransitionConfig
Expand Down
7 changes: 5 additions & 2 deletions cardano-node/src/Cardano/Node/Run.hs
Original file line number Diff line number Diff line change
Expand Up @@ -930,7 +930,7 @@ mkP2PArguments NodeConfiguration {
, P2P.daMinBigLedgerPeersForTrustedState = ncMinBigLedgerPeersForTrustedState
}
where
deadlineTargets = Configuration.defaultDeadlineTargets {
deadlineTargets = PeerSelectionTargets {
targetNumberOfRootPeers = ncDeadlineTargetOfRootPeers,
targetNumberOfKnownPeers = ncDeadlineTargetOfKnownPeers,
targetNumberOfEstablishedPeers = ncDeadlineTargetOfEstablishedPeers,
Expand All @@ -939,7 +939,10 @@ mkP2PArguments NodeConfiguration {
targetNumberOfEstablishedBigLedgerPeers = ncDeadlineTargetOfEstablishedBigLedgerPeers,
targetNumberOfActiveBigLedgerPeers = ncDeadlineTargetOfActiveBigLedgerPeers
}
syncTargets = Configuration.defaultSyncTargets {
syncTargets = PeerSelectionTargets {
targetNumberOfRootPeers = 0,
targetNumberOfKnownPeers = 0,
targetNumberOfEstablishedPeers = 0,
targetNumberOfActivePeers = ncSyncTargetOfActivePeers,
targetNumberOfKnownBigLedgerPeers = ncSyncTargetOfKnownBigLedgerPeers,
targetNumberOfEstablishedBigLedgerPeers = ncSyncTargetOfEstablishedBigLedgerPeers,
Expand Down
4 changes: 2 additions & 2 deletions cardano-node/src/Cardano/Node/Tracing/Tracers/ChainDB.hs
Original file line number Diff line number Diff line change
Expand Up @@ -633,8 +633,8 @@ instance ( LogFormatting (Header blk)
, IntM "slotInEpoch" (fromIntegral slotInEpoch)
, IntM "epoch" (fromIntegral (unEpochNo epoch))
, PrometheusM "tipBlock" [("hash",tipBlockHash)
,("parent hash",tipBlockParentHash)
,("issuer verification key hash", tipBlockIssuerVkHashText)]
,("parent_hash",tipBlockParentHash)
,("issuer_verification_key_hash", tipBlockIssuerVkHashText)]
]
asMetrics _ = []

Expand Down
Loading
Loading