Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
e7f2f50
Resolve erroneous line overwrite
jutaro Jun 24, 2025
b691d46
releaseArtifacts: add cardano-tracer to the bins as a musl build
johnalotoski Jul 1, 2025
60a8955
tx-generator/gen-plutus: add to musl for release artifact inclusion
johnalotoski Jul 3, 2025
aec8314
tx-generator: is already excluded by cabal on windows
johnalotoski Jul 3, 2025
ee03bcc
tx-generator: use set-git-rev for release bin version stamping
johnalotoski Jul 3, 2025
3238dd0
tx-generator: use passthru noGitRev for workbench ops
johnalotoski Jul 3, 2025
063fe1e
releaseBins: switch to an allowList rather than denyList approach
johnalotoski Jul 8, 2025
32510c3
nixStyle: inherit reused lib/builtins in flake.nix
johnalotoski Jul 8, 2025
f0e43cd
StartAsNonProducingNode: configuration option
coot Jul 8, 2025
167da25
peer sharing: default configuration value
coot Jul 10, 2025
e499a04
bump ouroboros-network deps
crocodile-dentist Jul 17, 2025
c1a9731
peer-sharing: default value only decided based on protocol files
coot Jul 15, 2025
a806c68
Renamed --non-producer-node to --start-as-non-producer-node
coot Jul 15, 2025
ca1ec27
Bump node version to 10.5.1
Jimbo4350 Jul 2, 2025
80b704d
leiosdemo202510: half way through adding LeiosNotify tracers
nfrisby Oct 24, 2025
8123a78
fixup prev
nfrisby Oct 25, 2025
7aebae9
leiosdemo202510: half way through adding LeiosFetch tracers
nfrisby Oct 25, 2025
89628e7
leiosdemo202510: plug in demoNewLeiosDbConnectionIO
nfrisby Oct 26, 2025
6119c5c
WIP add Leios demo Consensus s-r-p
nfrisby Oct 27, 2025
84f760f
leiosdemo202510: enable the Leios TraceSendRecv tracers, except Docum…
nfrisby Oct 30, 2025
95f4960
leiosdemo202510: enable the Leios Kernel&Peer tracers
nfrisby Oct 30, 2025
9e457f9
leiosdemo202511: fixup build for ouroboros-network:runDriver* and Tra…
nfrisby Nov 25, 2025
6ac41d4
leiosdemo202511: hacky special case for mux_tm
nfrisby Nov 27, 2025
93d2c84
leiosdemo202511: integrate ouroboros-network BearerBytes
nfrisby Nov 27, 2025
b1dc13a
Add ouroboros-network and ouroboros-consensus SRPs for the Leios 2025…
bladyjoker Dec 3, 2025
202d6bf
Merge remote-tracking branch 'origin/nfrisby/leios-202511-demo' into …
bladyjoker Dec 3, 2025
5c62bb9
Updates ouroboros-consensus and ouroboros-network SRPs to latest in N…
bladyjoker Dec 3, 2025
71c79d8
Do not elide eb hash in traces
ch1bo Dec 15, 2025
b6a9eb6
Upstream trace conversion into ouroboros-consensus
ch1bo Dec 15, 2025
b79718e
Merge pull request #6397 from IntersectMBO/ch1bo/leios-consistent-traces
ch1bo Dec 17, 2025
f0ef9b8
Update ouroboros-consensus srp
ch1bo Jan 8, 2026
9a429a3
Bump ouroboros-consensus srp
ch1bo Jan 21, 2026
378beef
leios: Fixes compilation due to missing pattern matches
bladyjoker Jan 23, 2026
e5cd1fe
leios: Defines new metrics, wires in ConsensusJson
bladyjoker Jan 27, 2026
16b828c
leios: Add transaction counts to metrics
bladyjoker Jan 28, 2026
70911d1
leios: Update ouroboros-consensus and ouroboros-network SRPs
bladyjoker Jan 28, 2026
7ef9ef7
leios: Update ouroboros-consensus SRP
bladyjoker Jan 28, 2026
0040565
Merge pull request #6416 from IntersectMBO/leios-prototype-jan2026
bladyjoker Jan 28, 2026
399ef9c
Disable codeowners on leios-prototype branch
ch1bo Jan 29, 2026
0b70e41
Define metrics from separate TraceLeiosBlockForged event
ch1bo Jan 29, 2026
e90f99e
Bump o-c srp
ch1bo Jan 29, 2026
3c3a683
Merge pull request #6423 from IntersectMBO/ch1bo/leios-prototype-mono…
ch1bo Jan 29, 2026
61722be
Fix import to LeiosDemoDb
ch1bo Feb 2, 2026
0a5e9b1
Bump o-c to abstracted LeiosDemoDbHandle
ch1bo Feb 9, 2026
c601a7a
Use updated leios-prototype with new db schema
ch1bo Feb 4, 2026
2d8ff7b
Share same LeiosDB handle across threads
ch1bo Feb 11, 2026
8409d7b
Bump o-c to latest prototype PR
ch1bo Feb 11, 2026
84bd07a
Error severity for LeiosDbExceptions
ch1bo Feb 18, 2026
1b04586
Bump o-c srp to latest leios-prototype
ch1bo Feb 19, 2026
56a7cea
Use latest o-c with points/bitmaps on LeiosBlockTxs responses
ch1bo Feb 19, 2026
667132f
Increase severity of mux and connection handler errors
ch1bo Feb 23, 2026
1ce288a
Bump o-c: use fixed leios encoders
ch1bo Feb 23, 2026
75881ef
Bump o-c/leios-prototype for improved fetch logic
ch1bo Mar 5, 2026
01decec
Bump leios-prototype packages
ch1bo Mar 22, 2026
c53f7c0
Use mutexed leiosdemodb
ch1bo Mar 23, 2026
99f9641
Bump o-c leios-prototype
ch1bo Apr 21, 2026
d7c0514
Expose cumulative tx bytes as a Prometheus metric
dnadales Apr 15, 2026
a9ae633
Update the leios-prototype SRP
dnadales Apr 21, 2026
45bc900
Merge pull request #6536 from IntersectMBO/dnadales/cumulative-tx-byt…
dnadales Apr 21, 2026
6ad8324
nodeCabal: add cardano-protocol-tpraos from ledger srp
johnalotoski Apr 21, 2026
5d74aac
leios: Bump ouroboros-consensus and cardano-ledger
bladyjoker Apr 16, 2026
f8ec77c
leios: Restricts only to required cardano-ledger libs
bladyjoker Apr 21, 2026
dd476fd
leios: Fixes missing "endorser block" metrics and tracing errors
bladyjoker Apr 22, 2026
df3c0ca
leios: Bump ouroboros-consensus
bladyjoker Apr 22, 2026
09acf4e
leios: Bump ouroboros-consensus and cardano-ledger with compat fixes
bladyjoker Apr 24, 2026
c0afb52
leios: Bump to latest ouroboros-consensus/leios-prototype
bladyjoker Apr 27, 2026
411c62b
Merge pull request #6537 from IntersectMBO/bladyjoker/leios-integrate…
bladyjoker Apr 27, 2026
6ad885d
Update tracers with new message
ch1bo Apr 28, 2026
8681961
Use o-c with LeiosNotify toObject encoder
ch1bo May 11, 2026
4ed4a16
Merge pull request #6556 from IntersectMBO/ch1bo/leios-voting
ch1bo May 11, 2026
21c430e
Reset leios-prototype to 11.0.1 (chunked recreation follows)
ch1bo May 19, 2026
55a1067
Pin SRPs at the Leios prototype remake forks (consensus / ledger / ne…
ch1bo May 18, 2026
bbb3d1c
leiosdemo202511: fixup build for ouroboros-network:runDriver* and Tra…
nfrisby Nov 25, 2025
c051f22
N2: wire Leios tracers into cardano-node Tracers / OrphanInstances
ch1bo May 18, 2026
a7d5a6f
N3: LeiosDbConfig configuration entry + thread to consensus
bladyjoker May 4, 2026
f16f423
tx-generator: adapt to Leios-extended Codecs + Reception-wrapped recv
ch1bo May 18, 2026
5ee1ab7
Remake forging and cumulative tx bytes metrics
ch1bo May 22, 2026
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
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
511 changes: 511 additions & 0 deletions bench-7950

Large diffs are not rendered by default.

3,933 changes: 3,933 additions & 0 deletions bench-9950

Large diffs are not rendered by default.

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 @@ -82,7 +82,7 @@ library
-- IOG dependencies
--------------------------
build-depends:
, cardano-api ^>=11.0
, cardano-api ^>= 11.0 || ^>= 11.1
, plutus-ledger-api ^>=1.63
, plutus-tx ^>=1.63
, plutus-tx-plugin ^>=1.63
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,11 @@ benchmarkConnectTxSubmit EnvConsts { .. } handshakeTracer submissionTracer codec
blkN2nVer = supportedVers Map.! n2nVer
supportedVers :: Map.Map NodeToNodeVersion (BlockNodeToNodeVersion blk)
supportedVers = supportedNodeToNodeVersions (Proxy @blk)
-- Codecs gained two type params for LeiosNotify (bLN) and LeiosFetch (bLF)
-- via the Leios chunks; they are unused on the tx-generator initiator path.
myCodecs :: Codecs blk NtN.RemoteAddress DeserialiseFailure IO
ByteString ByteString ByteString ByteString ByteString ByteString
ByteString
ByteString ByteString ByteString
myCodecs = defaultCodecs codecConfig blkN2nVer encodeRemoteAddress decodeRemoteAddress n2nVer
peerMultiplex :: NtN.Versions NodeToNodeVersion
NtN.NodeToNodeVersionData
Expand Down Expand Up @@ -170,14 +172,14 @@ benchmarkConnectTxSubmit EnvConsts { .. } handshakeTracer submissionTracer codec
=> NodeToNodeVersion
-> remotePeer
-> Channel IO ByteString
-> IO ((), Maybe ByteString)
-> IO ((), Maybe (Mux.Reception ByteString))
kaClient _version them channel = do
keepAliveRng <- newStdGen
peerGSVMap <- liftIO . newTVarIO $ Map.singleton them defaultGSV
runPeerWithLimits
mempty
(cKeepAliveCodec myCodecs)
(byteLimitsKeepAlive (const 0)) -- TODO: Real Bytelimits, see #1727
byteLimitsKeepAlive
timeLimitsKeepAlive
channel
$ keepAliveClientPeer
Expand Down
6 changes: 3 additions & 3 deletions bench/tx-generator/tx-generator.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ library
, attoparsec-aeson
, base16-bytestring
, bytestring
, cardano-api ^>= 11.0
, cardano-api ^>= 11.0 || ^>= 11.1
, cardano-binary
, cardano-cli ^>= 11.0
, cardano-cli ^>= 11.0 || ^>= 11.1
, cardano-crypto-class
, cardano-crypto-wrapper
, cardano-data
Expand Down Expand Up @@ -142,7 +142,7 @@ library
, network-mux
, optparse-applicative
, ouroboros-consensus:{ouroboros-consensus, cardano, diffusion} >= 3.0.1
, ouroboros-network:{api, framework, framework-tracing, ouroboros-network, protocols} >= 1.1
, ouroboros-network:{api, framework, framework-tracing, tracing, ouroboros-network, protocols} >= 1.1
, plutus-ledger-api
, plutus-tx
, random
Expand Down
42 changes: 41 additions & 1 deletion cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ packages:
trace-forward

-- Needed when cross compiling
extra-packages: alex, dmq-node >= 0.4.2.0
extra-packages: alex
-- dmq-node dropped: the latest CHaP version (0.4.2.0) requires
-- ouroboros-network:framework-tracing, a sublib that doesn't exist
-- in the leios-prototype-remake network fork. Re-add once a newer
-- dmq-node release tracks the post-split network layout.

program-options
ghc-options: -Werror
Expand Down Expand Up @@ -89,6 +93,42 @@ allow-newer:
-- Do NOT add more source-repository-package stanzas here unless they are strictly
-- temporary! Please read the section in CONTRIBUTING about updating dependencies.

-- Pin ouroboros-consensus at the Leios prototype remake branch — five chunks
-- on top of upstream main: mempool access + forging, diffusion (LeiosNotify +
-- LeiosFetch + Reception migration), resolving + chain inclusion, voting,
-- and the ImmDBServer schedule-driven demo.
-- See IntersectMBO/ouroboros-consensus#2041.
source-repository-package
type: git
location: https://github.com/IntersectMBO/ouroboros-consensus
tag: 663412f5546a5913ed8197024f82b11b61d3d3dd
--sha256: sha256-UG7hzcE8OoDZNJ/i6XZ5XCiwdTIlAOfUSEtmASQCPO4=

-- Pin cardano-ledger at the Leios prototype remake branch — adds
-- 'Maybe LeiosCert' on the Dijkstra block body (Dijkstra-only).
-- See IntersectMBO/cardano-ledger#5839.
source-repository-package
type: git
location: https://github.com/IntersectMBO/cardano-ledger
tag: c47305fcf47bd77437b837d0dfb9cb4181bfbc77
--sha256: 1db2xc2gs44g5035srqzgqkbv3a2yacmvnwchd1jnjrfkibnxnak
subdir:
libs/cardano-ledger-core
eras/dijkstra/impl

-- Pin ouroboros-network at the Leios prototype remake branch — adds the
-- 'BearerBytes' class and arrival-time 'Reception' on recv.
-- See IntersectMBO/ouroboros-network#5370.
source-repository-package
type: git
location: https://github.com/IntersectMBO/ouroboros-network
tag: 98229666bf4e2fcd365f4cf583c0efeb76e2e1b7
--sha256: 1ix6hlrvyrxwy54lq410prjvby31fz8y1hxrkc1np86zc8kan3m4
subdir:
ouroboros-network
cardano-diffusion
network-mux

if impl(ghc >= 9.12)
-- GHC 9.12 support - master branch
source-repository-package
Expand Down
2 changes: 1 addition & 1 deletion cardano-node-chairman/cardano-node-chairman.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,5 @@ test-suite chairman-tests
ghc-options: -threaded -rtsopts "-with-rtsopts=-N -T"

build-tool-depends: cardano-node:cardano-node
, cardano-cli:cardano-cli ^>= 11.0
, cardano-cli:cardano-cli ^>= 11.0 || ^>= 11.1
, cardano-node-chairman:cardano-node-chairman
5 changes: 3 additions & 2 deletions cardano-node/cardano-node.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ library
exposed-modules: Cardano.Node.Configuration.Logging
Cardano.Node.Configuration.NodeAddress
Cardano.Node.Configuration.POM
Cardano.Node.Configuration.Leios
Cardano.Node.Configuration.LedgerDB
Cardano.Node.Configuration.Socket
Cardano.Node.Configuration.TopologyP2P
Expand Down Expand Up @@ -138,7 +139,7 @@ library
, async
, base16-bytestring
, bytestring
, cardano-api ^>= 11.0
, cardano-api ^>= 11.0 || ^>= 11.1
, cardano-data
, cardano-crypto-class ^>=2.3
, cardano-crypto-wrapper
Expand Down Expand Up @@ -187,7 +188,7 @@ library
, nothunks
, optparse-applicative
, ouroboros-consensus:{ouroboros-consensus, lmdb, lsm, cardano, diffusion, protocol} ^>= 3.0.1
, ouroboros-network:{api, ouroboros-network, orphan-instances, framework, protocols, framework-tracing, tracing} ^>= 1.1
, ouroboros-network:{api, ouroboros-network, orphan-instances, framework, framework-tracing, protocols, tracing} ^>= 1.1
, cardano-diffusion:{api, cardano-diffusion, orphan-instances, tracing} ^>=1.0
, prettyprinter
, prettyprinter-ansi-terminal
Expand Down
34 changes: 34 additions & 0 deletions cardano-node/src/Cardano/Node/Configuration/Leios.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}

module Cardano.Node.Configuration.Leios(
LeiosDbConfig(..)
) where

import Data.Aeson (FromJSON (parseJSON), ToJSON (toJSON), Value (String), object,
withObject, (.:), (.=))

data LeiosDbConfig = LeiosDbInMemory
| LeiosDbSQLite !FilePath
deriving (Eq, Show)

instance FromJSON LeiosDbConfig where
parseJSON = withObject "LeiosDbConfig" $ \o -> do
backend :: String <- o .: "Backend"
case backend of
"InMemory" -> return LeiosDbInMemory
"SQLite" -> do
fp <- o .: "Filepath"
return $ LeiosDbSQLite fp
_ -> fail $ "Invalid LeiosDb backend " <> backend <> ", did you mean InMemory or SQLite?"

instance ToJSON LeiosDbConfig where
toJSON LeiosDbInMemory =
object
[ "Backend" .= String "InMemory"
]
toJSON (LeiosDbSQLite fp) =
object
[ "Backend" .= String "SQLite",
"Filepath" .= fp
]
18 changes: 18 additions & 0 deletions cardano-node/src/Cardano/Node/Configuration/POM.hs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import Cardano.Network.ConsensusMode (ConsensusMode (..), defaultConse
import qualified Cardano.Network.Diffusion.Configuration as Cardano
import Cardano.Network.PeerSelection (NumberOfBigLedgerPeers (..))
import Cardano.Node.Configuration.LedgerDB
import Cardano.Node.Configuration.Leios (LeiosDbConfig (..))
import Cardano.Node.Configuration.Socket (SocketConfig (..))
import Cardano.Node.Handlers.Shutdown
import Cardano.Node.Protocol.Types (Protocol (..))
Expand Down Expand Up @@ -209,6 +210,9 @@ data NodeConfiguration

, ncTxSubmissionLogicVersion :: TxSubmissionLogicVersion
, ncTxSubmissionInitDelay :: TxSubmissionInitDelay

-- Leios
, ncLeiosDbConfig :: LeiosDbConfig
} deriving (Eq, Show)

-- | We expose the `Ouroboros.Network.Mux.ForkPolicy` as a `NodeConfiguration` field.
Expand Down Expand Up @@ -316,6 +320,9 @@ data PartialNodeConfiguration

-- gRPC
, pncRpcConfig :: !PartialRpcConfig

-- Leios
, pncLeiosDbConfig :: !(Last LeiosDbConfig)
} deriving (Eq, Generic, Show)

instance AdjustFilePaths PartialNodeConfiguration where
Expand Down Expand Up @@ -443,6 +450,9 @@ instance FromJSON PartialNodeConfiguration where
maybe (pncTxSubmissionInitDelay defaultPartialNodeConfiguration) (fmap TxSubmissionInitDelay)
<$> v .:? "TxSubmissionInitDelay"
pncTxSubmissionInitDelay <- parseInitDelay

pncLeiosDbConfig <- Last <$> v .:? "LeiosDbConfig"

pure PartialNodeConfiguration {
pncProtocolConfig
, pncSocketConfig = Last . Just $ SocketConfig mempty mempty mempty pncSocketPath
Expand Down Expand Up @@ -493,6 +503,7 @@ instance FromJSON PartialNodeConfiguration where
, pncRpcConfig
, pncTxSubmissionLogicVersion = txSubmissionLogicVersion
, pncTxSubmissionInitDelay
, pncLeiosDbConfig
}
where
parseMempoolCapacityBytesOverride v = parseNoOverride <|> parseOverride
Expand Down Expand Up @@ -762,6 +773,8 @@ defaultPartialNodeConfiguration =

, pncTxSubmissionLogicVersion = Last $ Just TxSubmissionLogicV1
, pncTxSubmissionInitDelay = Last $ Just defaultTxSubmissionInitDelay

, pncLeiosDbConfig = Last (Just (LeiosDbSQLite "leios.db"))
}

lastOption :: Parser a -> Parser (Last a)
Expand Down Expand Up @@ -918,6 +931,10 @@ makeNodeConfiguration pnc = do

ncRpcConfig <- makeRpcConfig $ (pncRpcConfig pnc){nodeSocketPath=ncSocketPath socketConfig}

ncLeiosDbConfig <-
lastToEither "Missing LeiosDbConfig"
$ pncLeiosDbConfig pnc

return $ NodeConfiguration
{ ncConfigFile = configFile
, ncTopologyFile = topologyFile
Expand Down Expand Up @@ -969,6 +986,7 @@ makeNodeConfiguration pnc = do
, ncRpcConfig
, ncTxSubmissionLogicVersion
, ncTxSubmissionInitDelay
, ncLeiosDbConfig
}

ncProtocol :: NodeConfiguration -> Protocol
Expand Down
22 changes: 22 additions & 0 deletions cardano-node/src/Cardano/Node/Orphans.hs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
Expand All @@ -16,9 +17,19 @@ import Cardano.Api (FromCBOR (..), HasTextEnvelope (..), HasTypeProxy
import qualified Cardano.Crypto.KES.Class as Crypto
import Cardano.Protocol.Crypto (KES, StandardCrypto)
import Ouroboros.Consensus.Node
import Ouroboros.Consensus.Byron.Ledger.Block (ByronBlock)
import Ouroboros.Consensus.HardFork.Combinator (HardForkBlock)
import Ouroboros.Consensus.Node.Genesis (GenesisConfigFlags (..))
import Ouroboros.Consensus.Protocol.Praos (Praos)
import Ouroboros.Consensus.Protocol.Praos.Common (PraosCredentialsSource (..))
import Ouroboros.Consensus.Protocol.TPraos (TPraos)
import Ouroboros.Consensus.Shelley.HFEras ()
import Ouroboros.Consensus.Shelley.ShelleyHFC (ShelleyBlockHFC)
import Ouroboros.Consensus.Storage.LedgerDB.Forker (ResolveLeiosBlock)
import Ouroboros.Consensus.Storage.LedgerDB.Snapshots (Flag (..))
import Cardano.Ledger.Api.Era
(AllegraEra, AlonzoEra, BabbageEra, ConwayEra,
MaryEra, ShelleyEra)
import Ouroboros.Network.SizeInBytes (SizeInBytes (..))

import Data.Aeson.Types
Expand Down Expand Up @@ -83,3 +94,14 @@ instance HasTextEnvelope (PraosCredentialsSource StandardCrypto) where
textEnvelopeType _ =
"PraosCredentialsSource_"
<> fromString (Crypto.algorithmNameKES (Proxy @(KES StandardCrypto)))

-- 'ResolveLeiosBlock' instances for the HFC-wrapped 'ByronBlock' and per-era
-- 'ShelleyBlockHFC'. These use the class default (no-op resolution), since
-- only the Cardano 'HardForkBlock' carries the Dijkstra-era EB closure splice.
instance ResolveLeiosBlock (HardForkBlock '[ByronBlock])
instance ResolveLeiosBlock (ShelleyBlockHFC (TPraos c) ShelleyEra)
instance ResolveLeiosBlock (ShelleyBlockHFC (TPraos c) AllegraEra)
instance ResolveLeiosBlock (ShelleyBlockHFC (TPraos c) MaryEra)
instance ResolveLeiosBlock (ShelleyBlockHFC (TPraos c) AlonzoEra)
instance ResolveLeiosBlock (ShelleyBlockHFC (Praos c) BabbageEra)
instance ResolveLeiosBlock (ShelleyBlockHFC (Praos c) ConwayEra)
1 change: 1 addition & 0 deletions cardano-node/src/Cardano/Node/Parsers.hs
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ nodeRunParser = do
, pncRpcConfig
, pncTxSubmissionLogicVersion = mempty
, pncTxSubmissionInitDelay = mempty
, pncLeiosDbConfig = mempty
}

parseSocketPath :: Text -- ^ option name
Expand Down
2 changes: 2 additions & 0 deletions cardano-node/src/Cardano/Node/Protocol/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import qualified Cardano.Api as Api
import Cardano.Node.Orphans ()
import Cardano.Node.Queries (HasKESInfo, HasKESMetricsData)
import Cardano.Node.TraceConstraints (TraceConstraints)
import qualified Ouroboros.Consensus.Storage.LedgerDB.Forker
import Ouroboros.Network.Block (HeaderHash)

import Control.DeepSeq (NFData)
Expand Down Expand Up @@ -48,6 +49,7 @@ data SomeConsensusProtocol where
, TraceConstraints blk
, Api.ToCBOR (HeaderHash blk)
, Api.FromCBOR (HeaderHash blk)
, Ouroboros.Consensus.Storage.LedgerDB.Forker.ResolveLeiosBlock blk
)
=> Api.BlockType blk
-> Api.ProtocolInfoArgs blk
Expand Down
23 changes: 18 additions & 5 deletions cardano-node/src/Cardano/Node/Queries.hs
Original file line number Diff line number Diff line change
Expand Up @@ -234,16 +234,18 @@ instance All GetKESInfo xs => GetKESInfo (HardForkBlock xs) where
-- * General ledger
--
class LedgerQueries blk where
ledgerUtxoSize :: LedgerState blk EmptyMK -> Int
ledgerDelegMapSize :: LedgerState blk EmptyMK -> Int
ledgerUtxoSize :: LedgerState blk EmptyMK -> Int
ledgerDelegMapSize :: LedgerState blk EmptyMK -> Int
ledgerCumulativeTxBytes :: LedgerState blk EmptyMK -> Word64

class LedgerConwayQueries blk where
ledgerDRepCount :: LedgerState blk EmptyMK -> Int
ledgerDRepMapSize :: LedgerState blk EmptyMK -> Int

instance LedgerQueries Byron.ByronBlock where
ledgerUtxoSize = Map.size . Byron.unUTxO . Byron.cvsUtxo . Byron.byronLedgerState
ledgerDelegMapSize _ = 0
ledgerDelegMapSize _ = 0
ledgerCumulativeTxBytes _ = 0

instance (Ledger.EraAccounts era, Shelley.EraCertState era) => LedgerQueries (Shelley.ShelleyBlock protocol era) where
ledgerUtxoSize =
Expand All @@ -265,6 +267,7 @@ instance (Ledger.EraAccounts era, Shelley.EraCertState era) => LedgerQueries (Sh
. Shelley.certPStateL
)
. Shelley.shelleyLedgerState
ledgerCumulativeTxBytes = Shelley.shelleyCumulativeTxBytes

instance Conway.ConwayEraCertState era => LedgerConwayQueries (Shelley.ShelleyBlock protocol era) where
ledgerDRepCount =
Expand All @@ -289,8 +292,9 @@ instance Conway.ConwayEraCertState era => LedgerConwayQueries (Shelley.ShelleyBl

instance (LedgerQueries x, NoHardForks x)
=> LedgerQueries (HardForkBlock '[x]) where
ledgerUtxoSize = ledgerUtxoSize . unFlip . project . Flip
ledgerDelegMapSize = ledgerDelegMapSize . unFlip . project . Flip
ledgerUtxoSize = ledgerUtxoSize . unFlip . project . Flip
ledgerDelegMapSize = ledgerDelegMapSize . unFlip . project . Flip
ledgerCumulativeTxBytes = ledgerCumulativeTxBytes . unFlip . project . Flip

instance (LedgerConwayQueries x, NoHardForks x)
=> LedgerConwayQueries (HardForkBlock '[x]) where
Expand All @@ -316,6 +320,15 @@ instance LedgerQueries (Cardano.CardanoBlock c) where
Cardano.LedgerStateBabbage ledgerBabbage -> ledgerDelegMapSize ledgerBabbage
Cardano.LedgerStateConway ledgerConway -> ledgerDelegMapSize ledgerConway
Cardano.LedgerStateDijkstra ledgerDijkstra -> ledgerDelegMapSize ledgerDijkstra
ledgerCumulativeTxBytes = \case
Cardano.LedgerStateByron ledgerByron -> ledgerCumulativeTxBytes ledgerByron
Cardano.LedgerStateShelley ledgerShelley -> ledgerCumulativeTxBytes ledgerShelley
Cardano.LedgerStateAllegra ledgerAllegra -> ledgerCumulativeTxBytes ledgerAllegra
Cardano.LedgerStateMary ledgerMary -> ledgerCumulativeTxBytes ledgerMary
Cardano.LedgerStateAlonzo ledgerAlonzo -> ledgerCumulativeTxBytes ledgerAlonzo
Cardano.LedgerStateBabbage ledgerBabbage -> ledgerCumulativeTxBytes ledgerBabbage
Cardano.LedgerStateConway ledgerConway -> ledgerCumulativeTxBytes ledgerConway
Cardano.LedgerStateDijkstra ledgerDijkstra -> ledgerCumulativeTxBytes ledgerDijkstra

instance LedgerConwayQueries (Cardano.CardanoBlock c) where
ledgerDRepCount = \case
Expand Down
Loading
Loading