Skip to content

Commit 86c8beb

Browse files
committed
Bump consensus version
1 parent c6f48e8 commit 86c8beb

File tree

7 files changed

+2377
-2019
lines changed

7 files changed

+2377
-2019
lines changed

cabal.project

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ repository cardano-haskell-packages
1414
-- you need to run if you change them
1515
index-state:
1616
, hackage.haskell.org 2025-09-24T20:00:55Z
17-
, cardano-haskell-packages 2025-09-24T15:29:30Z
17+
, cardano-haskell-packages 2025-09-30T09:59:24Z
1818

1919
packages:
2020
cardano-node
@@ -91,21 +91,7 @@ source-repository-package
9191
source-repository-package
9292
type: git
9393
location: https://github.com/IntersectMBO/cardano-api
94-
tag: 7388805c2a56e2f628ca46924c648268cc61bbd2
95-
--sha256: sha256-YdFyulwmlwLDjVd6Bk+8IxQAdBSRCpacL5HzW3aCb7c=
94+
tag: cee9b20505a407b55f3b7b335e857d61d71ae196
95+
--sha256: sha256-ijMOji6MNupx6eewRJcWpuoxitp4rw8nnccr/Ay+tTo=
9696
subdir:
9797
cardano-api
98-
99-
source-repository-package
100-
type: git
101-
location: https://github.com/IntersectMBO/ouroboros-consensus
102-
-- latest master
103-
tag: ac1a8db76f4c7a38a9a6b962a40fa722d5bd55a6
104-
--sha256: sha256-8MlAxCi1wXLc2p0csYTKZ4RW7+uqWvxOBs5IhISzwxk=
105-
subdir:
106-
ouroboros-consensus
107-
ouroboros-consensus-cardano
108-
ouroboros-consensus-diffusion
109-
ouroboros-consensus-protocol
110-
sop-extras
111-
strict-sop-core

cardano-node/cardano-node.cabal

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ library
175175
, hostname
176176
, io-classes:{io-classes,strict-stm,si-timers} >= 1.5
177177
, iohk-monitoring ^>= 0.2
178+
, kes-agent ^>=0.2
178179
, microlens
179180
, mmap
180181
, network-mux
@@ -188,9 +189,9 @@ library
188189
, network-mux >= 0.8
189190
, nothunks
190191
, optparse-applicative-fork >= 0.18.1
191-
, ouroboros-consensus ^>= 0.27
192-
, ouroboros-consensus-cardano ^>= 0.25
193-
, ouroboros-consensus-diffusion ^>= 0.23
192+
, ouroboros-consensus ^>= 0.28
193+
, ouroboros-consensus-cardano ^>= 0.26
194+
, ouroboros-consensus-diffusion ^>= 0.24
194195
, ouroboros-consensus-protocol
195196
, ouroboros-network-api ^>= 0.16
196197
, ouroboros-network:{ouroboros-network, cardano-diffusion, orphan-instances} ^>= 0.22.3

cardano-node/src/Cardano/Node/Run.hs

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ import qualified Ouroboros.Consensus.Config as Consensus
7070
import Ouroboros.Consensus.Config.SupportsNode (ConfigSupportsNode (..))
7171
import Ouroboros.Consensus.Node (SnapshotPolicyArgs (..),
7272
NodeDatabasePaths (..), RunNodeArgs (..), StdRunNodeArgs (..))
73+
import Ouroboros.Consensus.Protocol.Praos.AgentClient (KESAgentClientTrace)
7374
import Ouroboros.Consensus.Ledger.SupportsMempool (GenTxId)
7475
import Ouroboros.Consensus.Node (RunNodeArgs (..),
7576
SnapshotPolicyArgs (..), StdRunNodeArgs (..))
@@ -241,23 +242,20 @@ handleNodeWithTracers cmdPc nc p@(SomeConsensusProtocol blockType runP) = do
241242
(getLast (pncConfigFile cmdPc))
242243
case ncTraceConfig nc of
243244
TraceDispatcher{} -> do
244-
-- TODO fix
245-
blockForging <- snd (Api.protocolInfo runP)
245+
blockForging <- snd (Api.protocolInfo runP) nullTracer
246246
tracers <-
247247
initTraceDispatcher
248248
nc
249249
p
250250
networkMagic
251251
nodeKernelData
252-
-- TODO fix
253252
(null blockForging)
254253

255254
startupInfo <- getStartupInfo nc p fp
256255
mapM_ (traceWith $ startupTracer tracers) startupInfo
257256
traceNodeStartupInfo (nodeStartupInfoTracer tracers) startupInfo
258257
-- sends initial BlockForgingUpdate
259258
let isNonProducing = ncStartAsNonProducingNode nc
260-
-- TODO fix
261259
traceWith (startupTracer tracers)
262260
(BlockForgingUpdate (if isNonProducing || null blockForging
263261
then DisabledBlockForging
@@ -301,8 +299,7 @@ handleNodeWithTracers cmdPc nc p@(SomeConsensusProtocol blockType runP) = do
301299

302300
traceWith (nodeVersionTracer tracers) getNodeVersion
303301
let isNonProducing = ncStartAsNonProducingNode nc
304-
-- TODO fix
305-
blockForging <- snd (Api.protocolInfo runP)
302+
blockForging <- snd (Api.protocolInfo runP) nullTracer
306303
traceWith (startupTracer tracers)
307304
(BlockForgingUpdate (if isNonProducing || null blockForging
308305
then DisabledBlockForging
@@ -472,8 +469,7 @@ handleSimpleNode blockType runP tracers nc onKernel = do
472469
, rnProtocolInfo = pInfo
473470
, rnNodeKernelHook = \registry nodeKernel -> do
474471
-- set the initial block forging
475-
-- TODO fix
476-
blockForging <- snd (Api.protocolInfo runP)
472+
blockForging <- snd (Api.protocolInfo runP) (Consensus.kesAgentTracer $ consensusTracers tracers)
477473

478474
unless (ncStartAsNonProducingNode nc) $
479475
setBlockForging nodeKernel blockForging
@@ -546,7 +542,7 @@ handleSimpleNode blockType runP tracers nc onKernel = do
546542
nodeArgs {
547543
rnNodeKernelHook = \registry nodeKernel -> do
548544
-- reinstall `SIGHUP` handler
549-
installSigHUPHandler (startupTracer tracers) blockType nc nodeKernel
545+
installSigHUPHandler (startupTracer tracers) (Consensus.kesAgentTracer $ consensusTracers tracers) blockType nc nodeKernel
550546
localRootsVar publicRootsVar useLedgerVar useBootstrapVar
551547
ledgerPeerSnapshotPathVar ledgerPeerSnapshotVar
552548
rnNodeKernelHook nodeArgs registry nodeKernel
@@ -639,6 +635,7 @@ handleSimpleNode blockType runP tracers nc onKernel = do
639635
-- | The P2P SIGHUP handler can update block forging & reconfigure network topology.
640636
--
641637
installSigHUPHandler :: Tracer IO (StartupTrace blk)
638+
-> Tracer IO KESAgentClientTrace
642639
-> Api.BlockType blk
643640
-> NodeConfiguration
644641
-> NodeKernel IO RemoteAddress (ConnectionId LocalAddress) blk
@@ -650,14 +647,14 @@ installSigHUPHandler :: Tracer IO (StartupTrace blk)
650647
-> StrictTVar IO (Maybe LedgerPeerSnapshot)
651648
-> IO ()
652649
#ifndef UNIX
653-
installSigHUPHandler _ _ _ _ _ _ _ _ _ _ = return ()
650+
installSigHUPHandler _ _ _ _ _ _ _ _ _ _ _ = return ()
654651
#else
655-
installSigHUPHandler startupTracer blockType nc nodeKernel localRootsVar publicRootsVar useLedgerVar
652+
installSigHUPHandler startupTracer kesAgentTracer blockType nc nodeKernel localRootsVar publicRootsVar useLedgerVar
656653
useBootstrapPeersVar ledgerPeerSnapshotPathVar ledgerPeerSnapshotVar =
657654
void $ Signals.installHandler
658655
Signals.sigHUP
659656
(Signals.Catch $ do
660-
updateBlockForging startupTracer blockType nodeKernel nc
657+
updateBlockForging startupTracer kesAgentTracer blockType nodeKernel nc
661658
updateTopologyConfiguration startupTracer nc localRootsVar publicRootsVar
662659
useLedgerVar useBootstrapPeersVar ledgerPeerSnapshotPathVar
663660
void $ updateLedgerPeerSnapshot
@@ -673,11 +670,12 @@ installSigHUPHandler startupTracer blockType nc nodeKernel localRootsVar publicR
673670

674671
#ifdef UNIX
675672
updateBlockForging :: Tracer IO (StartupTrace blk)
673+
-> Tracer IO KESAgentClientTrace
676674
-> Api.BlockType blk
677675
-> NodeKernel IO RemoteAddress (ConnectionId LocalAddress) blk
678676
-> NodeConfiguration
679677
-> IO ()
680-
updateBlockForging startupTracer blockType nodeKernel nc = do
678+
updateBlockForging startupTracer kesAgentTracer blockType nodeKernel nc = do
681679
eitherSomeProtocol <- runExceptT $ mkConsensusProtocol
682680
(ncProtocolConfig nc)
683681
(Just (ncProtocolFiles nc))
@@ -693,8 +691,7 @@ updateBlockForging startupTracer blockType nodeKernel nc = do
693691
case Api.reflBlockType blockType blockType' of
694692
Just Refl -> do
695693
-- TODO: check if runP' has changed
696-
-- TODO fix
697-
blockForging <- snd (Api.protocolInfo runP')
694+
blockForging <- snd (Api.protocolInfo runP') kesAgentTracer
698695
traceWith startupTracer
699696
(BlockForgingUpdate (if null blockForging
700697
then DisabledBlockForging

cardano-node/src/Cardano/Node/Tracing/Tracers.hs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,11 @@ mkConsensusTracers configReflection trBase trForward mbTrEKG _trDataPoint trConf
333333
["Consensus", "CSJ"]
334334
configureTracers configReflection trConfig [consensusCsjTr]
335335

336+
!consensusKesAgentTr <- mkCardanoTracer
337+
trBase trForward mbTrEKG
338+
["Consensus", "KESAgent"]
339+
configureTracers configReflection trConfig [consensusKesAgentTr]
340+
336341
!consensusDbfTr <- mkCardanoTracer
337342
trBase trForward mbTrEKG
338343
["Consensus", "DevotedBlockFetch"]
@@ -384,6 +389,8 @@ mkConsensusTracers configReflection trBase trForward mbTrEKG _trDataPoint trConf
384389
traceWith consensusCsjTr
385390
, Consensus.dbfTracer = Tracer $
386391
traceWith consensusDbfTr
392+
, Consensus.kesAgentTracer = Tracer $
393+
traceWith consensusKesAgentTr
387394
}
388395

389396
mkNodeToClientTracers :: forall blk.

0 commit comments

Comments
 (0)