From 5d74aac2f3f2fdce989c42d1195a804f88677250 Mon Sep 17 00:00:00 2001 From: Drazen Popovic Date: Thu, 16 Apr 2026 14:46:50 +0200 Subject: [PATCH 1/5] leios: Bump ouroboros-consensus and cardano-ledger --- cabal.project | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/cabal.project b/cabal.project index e0be13bd995..0a70bdcf9e4 100644 --- a/cabal.project +++ b/cabal.project @@ -31,17 +31,6 @@ packages: trace-dispatcher trace-resources trace-forward - -- ../cardano-api/cardano-api - -- ../ouroboros-consensus/ouroboros-consensus - -- ../ouroboros-consensus/ouroboros-consensus-cardano - -- ../ouroboros-consensus/ouroboros-consensus-protocol - -- ../ouroboros-consensus/ouroboros-consensus-diffusion - -- ../ouroboros-consensus/ouroboros-consensus-observe - -- ../cardano-ledger/eras/alonzo/impl - -- ../cardano-ledger/eras/conway/impl - -- ../cardano-ledger/eras/shelley/impl - -- ../cardano-ledger/eras/shelley/test-suite - -- ../cardano-ledger/libs/cardano-ledger-core extra-packages: Cabal @@ -134,13 +123,21 @@ source-repository-package source-repository-package type: git location: https://github.com/IntersectMBO/cardano-ledger.git - tag: 1327573bfb86f7e596151f77d03fc38982be8749 - --sha256: sha256-CzA6eucrpsc8WMAtG9aNP0DcGtCxghHe0HSX+Yxvcd8= + tag: 22d32274ca2657f2966873b225aa9604852c4c77 + --sha256: sha256-TnHTS2FDeUQoa3dIPSZwZ16svGw990arktNVx7z7aWY= subdir: + eras/allegra/impl eras/alonzo/impl + eras/alonzo/test-suite + eras/babbage/impl + eras/babbage/test-suite eras/conway/impl + eras/conway/test-suite + eras/mary/impl eras/shelley/impl eras/shelley/test-suite + eras/shelley-ma/test-suite + libs/cardano-ledger-api libs/cardano-ledger-core libs/cardano-protocol-tpraos From f8ec77c3807aa5e0ddb9ae95e958d93bf6d21cd4 Mon Sep 17 00:00:00 2001 From: Drazen Popovic Date: Tue, 21 Apr 2026 16:13:01 +0200 Subject: [PATCH 2/5] leios: Restricts only to required cardano-ledger libs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Otherwise we can't compile due to error: builder for '/nix/store/jvg1kv1bjbl1m88qm02hdyq460pxg8gc-cardano-ledger-binary-lib-testlib-1.6.0.0.drv' failed with exit code 1; last 10 log lines: > ‘withGenTerm cddlData (Cuddle.Name ruleName)’ > In the expression: > withGenTerm cddlData (Cuddle.Name ruleName) > $ roundTripAnnExample lbl version version trip > | > 130 | withGenTerm cddlData (Cuddle.Name ruleName) $ > | ^^^^^^^^^^^^^^^^^^^^ --- cabal.project | 8 -------- 1 file changed, 8 deletions(-) diff --git a/cabal.project b/cabal.project index 0a70bdcf9e4..a0f4154bc5f 100644 --- a/cabal.project +++ b/cabal.project @@ -126,18 +126,10 @@ source-repository-package tag: 22d32274ca2657f2966873b225aa9604852c4c77 --sha256: sha256-TnHTS2FDeUQoa3dIPSZwZ16svGw990arktNVx7z7aWY= subdir: - eras/allegra/impl eras/alonzo/impl - eras/alonzo/test-suite - eras/babbage/impl - eras/babbage/test-suite eras/conway/impl - eras/conway/test-suite - eras/mary/impl eras/shelley/impl eras/shelley/test-suite - eras/shelley-ma/test-suite - libs/cardano-ledger-api libs/cardano-ledger-core libs/cardano-protocol-tpraos From dd476fd762c966d149dbe9d4413db28bdc9919a5 Mon Sep 17 00:00:00 2001 From: Drazen Popovic Date: Wed, 22 Apr 2026 13:22:15 +0200 Subject: [PATCH 3/5] leios: Fixes missing "endorser block" metrics and tracing errors --- .../Cardano/Node/Tracing/Tracers/Consensus.hs | 59 +++++++++++-------- cardano-node/src/Cardano/Tracing/Config.hs | 3 +- 2 files changed, 34 insertions(+), 28 deletions(-) diff --git a/cardano-node/src/Cardano/Node/Tracing/Tracers/Consensus.hs b/cardano-node/src/Cardano/Node/Tracing/Tracers/Consensus.hs index 76d3a74c101..720b49dda6d 100644 --- a/cardano-node/src/Cardano/Node/Tracing/Tracers/Consensus.hs +++ b/cardano-node/src/Cardano/Node/Tracing/Tracers/Consensus.hs @@ -2285,40 +2285,47 @@ instance ( StandardHash blk forHuman = showT ------ - instance LogFormatting TraceLeiosKernel where - forHuman = showT - forMachine _dtal = traceLeiosKernelToObject - - asMetrics (TraceLeiosBlockForged{eb, ebMeasure}) = - [ CounterM "Forge.endorser-block.total-count" Nothing - , CounterM "Forge.endorser-block.total-tx-count" (Just . fromIntegral . length $ leiosEbTxs eb) - , CounterM "Forge.endorser-block.total-tx-bytes" (Just . fromInteger . toInteger . unByteSize32 . txMeasureMetricTxSizeBytes $ ebMeasure) - , CounterM "Forge.endorser-block.total-tx-xu-memory" (Just . fromInteger . toInteger . txMeasureMetricExUnitsMemory $ ebMeasure) - , CounterM "Forge.endorser-block.total-tx-xu-time" (Just . fromInteger . toInteger . txMeasureMetricExUnitsSteps $ ebMeasure) - , CounterM "Forge.endorser-block.total-tx-ref-script-size-bytes" (Just . fromInteger . toInteger . unByteSize32 . txMeasureMetricRefScriptsSizeBytes $ ebMeasure) - ] - asMetrics _ = [] + forHuman = showT + forMachine _dtal = traceLeiosKernelToObject + + asMetrics (TraceLeiosBlockForged{eb, ebMeasure}) = + [ CounterM "Forge.endorser-block.total-count" Nothing + , CounterM "Forge.endorser-block.total-tx-count" (Just . fromIntegral . length $ leiosEbTxs eb) + , CounterM "Forge.endorser-block.total-tx-bytes" (Just . fromInteger . toInteger . unByteSize32 . txMeasureMetricTxSizeBytes $ ebMeasure) + , CounterM "Forge.endorser-block.total-tx-xu-memory" (Just . fromInteger . toInteger . txMeasureMetricExUnitsMemory $ ebMeasure) + , CounterM "Forge.endorser-block.total-tx-xu-time" (Just . fromInteger . toInteger . txMeasureMetricExUnitsSteps $ ebMeasure) + , CounterM "Forge.endorser-block.total-tx-ref-script-size-bytes" (Just . fromInteger . toInteger . unByteSize32 . txMeasureMetricRefScriptsSizeBytes $ ebMeasure) + ] + asMetrics _ = [] instance MetaTrace TraceLeiosKernel where - namespaceFor _ = Namespace [] [] + namespaceFor _ = Namespace [ ] [ "TraceLeiosKernel" ] - severityFor _ (Just TraceLeiosDbException{}) = Just Error - severityFor _ _ = Just Debug + severityFor _ (Just TraceLeiosDbException{}) = Just Error + severityFor _ _ = Just Debug - documentFor _ = Nothing - allNamespaces = [ Namespace [] [] ] + documentFor _ = Nothing + allNamespaces = [Namespace [] [ "TraceLeiosKernel" ]] + + metricsDocFor _ = + [ ("Forge.endorser-block.total-count", "Counter of forged endorser blocks") + , ("Forge.endorser-block.total-tx-count", "Total number of transactions in the forged endorser block") + , ("Forge.endorser-block.total-tx-bytes", "Total transaction bytes in the forged endorser block") + , ("Forge.endorser-block.total-tx-xu-memory", "Total execution units (memory) in the forged endorser block") + , ("Forge.endorser-block.total-tx-xu-time", "Total execution units (time) in the forged endorser block") + , ("Forge.endorser-block.total-tx-ref-script-size-bytes", "Total reference script size bytes in the forged endorser block") + ] instance LogFormatting TraceLeiosPeer where - forHuman = showT - forMachine _dtal = traceLeiosPeerToObject + forHuman = showT + forMachine _dtal = traceLeiosPeerToObject instance MetaTrace TraceLeiosPeer where - namespaceFor _ = Namespace [] [] + namespaceFor _ = Namespace [] [ "TraceLeiosPeer" ] - severityFor _ (Just TraceLeiosPeerDbException{}) = Just Error - severityFor _ _ = Just Debug + severityFor _ (Just TraceLeiosPeerDbException{}) = Just Error + severityFor _ _ = Just Debug - documentFor _ = Nothing - allNamespaces = [ Namespace [] [] ] + documentFor _ = Nothing + allNamespaces = [Namespace [] [ "TraceLeiosPeer" ]] diff --git a/cardano-node/src/Cardano/Tracing/Config.hs b/cardano-node/src/Cardano/Tracing/Config.hs index 158c0a498d6..48a42106f10 100644 --- a/cardano-node/src/Cardano/Tracing/Config.hs +++ b/cardano-node/src/Cardano/Tracing/Config.hs @@ -351,8 +351,7 @@ instance Semigroup PartialTraceSelection where instance FromJSON PartialTraceSelection where parseJSON = withObject "PartialTraceSelection" $ \v -> do - PartialTraceSelection - <$> Last <$> v .:? "TracingVerbosity" + (PartialTraceSelection . Last <$> (v .:? "TracingVerbosity")) <*> parseTracer (Proxy @TraceAcceptPolicy) v <*> parseTracer (Proxy @TraceBlockchainTime) v <*> parseTracer (Proxy @TraceBlockFetchClient) v From df3c0ca56b6a55edf76e1ce87e00289508040fa9 Mon Sep 17 00:00:00 2001 From: Drazen Popovic Date: Wed, 22 Apr 2026 14:15:40 +0200 Subject: [PATCH 4/5] leios: Bump ouroboros-consensus --- cabal.project | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cabal.project b/cabal.project index a0f4154bc5f..abdeedf6b00 100644 --- a/cabal.project +++ b/cabal.project @@ -110,8 +110,8 @@ source-repository-package source-repository-package type: git location: https://github.com/IntersectMBO/ouroboros-consensus - tag: 8eeb4c4e50477c9470dce221ba1396bab6fbf472 - --sha256: sha256-Lt/S/thAvAvkdJ5Gn1ErxRnMLPUY5UvxX2IFHQM+1sA= + tag: 1e7c387d40d1bd4c95b6d042ffd801aefb127c93 + --sha256: sha256-jz/rM/mzWaoXD9FQFqaLn+iYWsfCpdmXLQHVDy4+aUU= subdir: ouroboros-consensus ouroboros-consensus-cardano From 09acf4e898a723748a8e6f29fd603c4ce91ddd9d Mon Sep 17 00:00:00 2001 From: Drazen Popovic Date: Fri, 24 Apr 2026 21:24:07 +0200 Subject: [PATCH 5/5] leios: Bump ouroboros-consensus and cardano-ledger with compat fixes --- cabal.project | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cabal.project b/cabal.project index abdeedf6b00..6d7a68407d3 100644 --- a/cabal.project +++ b/cabal.project @@ -110,8 +110,8 @@ source-repository-package source-repository-package type: git location: https://github.com/IntersectMBO/ouroboros-consensus - tag: 1e7c387d40d1bd4c95b6d042ffd801aefb127c93 - --sha256: sha256-jz/rM/mzWaoXD9FQFqaLn+iYWsfCpdmXLQHVDy4+aUU= + tag: 0dac44526e8ee9fa49cddaa164bd3beea4cdc0d1 + --sha256: sha256-pshHHLhM4EdsZhBK16N1FDQ3clsCMjGT08yWJYsAuH8= subdir: ouroboros-consensus ouroboros-consensus-cardano @@ -123,8 +123,8 @@ source-repository-package source-repository-package type: git location: https://github.com/IntersectMBO/cardano-ledger.git - tag: 22d32274ca2657f2966873b225aa9604852c4c77 - --sha256: sha256-TnHTS2FDeUQoa3dIPSZwZ16svGw990arktNVx7z7aWY= + tag: 6b831537f4dd3863da18c9a2a82b81d946a12052 + --sha256: sha256-YI5tb+kcY4uDOCiK42AD+j1JvfVWc8IgO6Acr7HBEnc= subdir: eras/alonzo/impl eras/conway/impl