Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ mkNodeConfig configFp_
, byronKeyFile = Just ""
, shelleyKESSource = Just (KESKeyFilePath "")
, shelleyVRFFile = Just ""
, shelleyBLSFile = Nothing
, shelleyCertFile = Just ""
, shelleyBulkCredsFile = Just ""
}
Expand Down
90 changes: 54 additions & 36 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,14 @@ 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 2026-06-29T22:49:53Z
, cardano-haskell-packages 2026-06-29T12:05:19Z
, hackage.haskell.org 2026-07-15T21:58:35Z
, cardano-haskell-packages 2026-07-27T20:44:57Z

constraints:
-- cardano-crypto-class is pinned back to crypton ^>=1.0 (the memory line) in the SRP; a
-- code-free ^>=1.1 refresh had swapped memory→ram and dragged the crypto closure off the
-- still-`memory` CHAP packages. Keep this global cap so nothing else pulls crypton 1.1 (ram).
, any.crypton < 1.1
-- haskell.nix patch does not work for 1.6.8
, any.crypton-x509-system < 1.6.8
-- haskell.nix tries to use 0.7.1.5 for some reason
Expand Down Expand Up @@ -79,6 +83,8 @@ package plutus-scripts-bench
allow-newer:
, io-sim:time
, io-classes:time
-- TODO: bump packages instead of this
, cardano-crypto-class

-- ekg-forward requires ouroboros-network ^>=1.2 but the SRP is still 1.1.0.0
allow-older:
Expand All @@ -88,35 +94,33 @@ allow-older:
-- Do NOT add more source-repository-package stanzas here unless they are strictly
-- temporary! Please read the section in CONTRIBUTING about updating dependencies.

-- Points to patch on top of ouroboros-consensus/leios-prototype
-- ouroboros-consensus ch1bo/use-bls-keys (Leios committee-from-stake, EB notifications).
source-repository-package
type: git
location: https://github.com/IntersectMBO/ouroboros-consensus
tag: 1c01d7ee86f814369b631a94426b77f633cee3ec
--sha256: sha256-kwmR3z/yw47pfWkNyX912mkFN5FSC3k2wpyvBq2RnrU=
tag: 6245bc91f7f7eb58392cfb8a70f99f6fa64119c6

-- Points to nfrisby-pr93-lookahead-merge-commit tag
source-repository-package
type: git
location: https://github.com/IntersectMBO/typed-protocols
tag: 9b4627221ae5d649f2303c6926a8dba3f9934658
--sha256: sha256-55skVYIR0WjXMwJEirLgF0HFHUpFLBppuV9gvTWqoOI=
subdir:
typed-protocols

-- Points to ouroboros-ledger/leios-prototype
-- cardano-ledger ch1bo/use-bls-keys (Leios key plumbing + byron-crypto memory revert).
source-repository-package
type: git
location: https://github.com/IntersectMBO/cardano-ledger
tag: fb8d6f8a83b0efb86281e0b80e7ffba160dad8b1
--sha256: sha256-U/vpyZNerL1YXiQg1TIAOL5L438NNE3XkuIYD0HPTJw=
tag: 3900d422812f11a4feecb997b8309118598290ec
subdir:
libs/cardano-data
libs/cardano-ledger-api
libs/small-steps
libs/cardano-ledger-binary
libs/cardano-ledger-core
libs/cardano-protocol-tpraos
eras/byron/crypto
eras/shelley/impl
eras/shelley/test-suite
eras/shelley-ma/test-suite
Expand All @@ -127,69 +131,83 @@ source-repository-package
eras/babbage/impl
eras/conway/impl
eras/dijkstra/impl
-- local toggle: comment the SRP above and uncomment to build against ../cardano-ledger
-- packages:
-- ../cardano-ledger/libs/cardano-data
-- ../cardano-ledger/libs/cardano-ledger-api
-- ../cardano-ledger/libs/small-steps
-- ../cardano-ledger/libs/cardano-ledger-binary
-- ../cardano-ledger/libs/cardano-ledger-core
-- ../cardano-ledger/libs/cardano-protocol-tpraos
-- ../cardano-ledger/eras/byron/crypto
-- ../cardano-ledger/eras/shelley/impl
-- ../cardano-ledger/eras/shelley/test-suite
-- ../cardano-ledger/eras/shelley-ma/test-suite
-- ../cardano-ledger/eras/mary/impl
-- ../cardano-ledger/eras/allegra/impl
-- ../cardano-ledger/eras/alonzo/impl
-- ../cardano-ledger/eras/alonzo/test-suite
-- ../cardano-ledger/eras/babbage/impl
-- ../cardano-ledger/eras/conway/impl
-- ../cardano-ledger/eras/dijkstra/impl

-- Points to ouroboros-network/leios-prototype
source-repository-package
type: git
location: https://github.com/IntersectMBO/ouroboros-network
tag: 4b3ab7664f609a1aee0f0c24dcfcfd0ab899fc42
--sha256: sha256-fIqpI2whstetodpiONmUDVgnhTpzXeq1/gmzuHItK5A=
subdir:
ouroboros-network
cardano-diffusion
network-mux

-- Points to cardano-api/leios-prototype
-- cardano-api ch1bo/use-bls-keys (FixedSizeCodec instances for Ed25519Bip32DSIGN).
source-repository-package
type: git
location: https://github.com/IntersectMBO/cardano-api
tag: 947645ea9c912da13feadc16bef44a7550c3c55b
--sha256: sha256-+fIsJuJV4YBSPdVe3wpIxq9lf6nAI5yB7qdzH0iKmrc=
tag: 07abb5f1e705e2d9abe3c2082a6704755ea922c9
subdir:
cardano-api
cardano-api-gen
cardano-rpc
-- local toggle: comment the SRP above and uncomment to build against ../cardano-api
-- packages:
-- ../cardano-api/cardano-api
-- ../cardano-api/cardano-api-gen
-- ../cardano-api/cardano-rpc

-- Points to cardano-cli/leios-prototype
source-repository-package
type: git
location: https://github.com/IntersectMBO/cardano-cli
tag: 2377354ca8d49cd86f63b7f095cfa340b514789d
--sha256: sha256-5c3FjK6Yi8hQEzvTIZ4Ri1wJNTReuKT1rX5+B3BonM4=
tag: 37219ab0218b51fcddf895e46beed99eb9aa46eb
subdir:
cardano-cli

source-repository-package
type: git
location: https://github.com/input-output-hk/kes-agent.git
tag: 4e7ec7b5102a030587413f4af770e87a15c9cb9c
--sha256: sha256-OUnBy86ny2RHHJZoOXPHeHbYwvWBHmnXoVyQp0FZjEA=
subdir:
kes-agent
kes-agent-crypto

-- source-repository-package
-- type: git
-- location: https://github.com/f-f/dmq-node.git
-- tag: b7d59834e52d46229bb3ff6e5595509eede730dd
-- --sha256: sha256-8GKAaNPRZkKsk10Emokrlnc0sQOx1aHUnggqlMdY0nw=
-- subdir:
-- dmq-node

source-repository-package
type: git
location: https://github.com/IntersectMBO/plutus.git
tag: b1db04cc425fab303ac3b79d7140dc2a17f29e6d
--sha256: sha256-XtYzjNVx4+IGWpgm+p/YTf56DrJtK0I98umZCTE3U80=
subdir:
plutus-core
plutus-ledger-api
plutus-tx
plutus-tx-plugin
plutus-metatheory
location: https://github.com/input-output-hk/ekg-forward
tag: 85470ae7e8fac9711682234ed39a36eec3d45a9b

-- cardano-base ch1bo/mk-committee (Leios committee/BLS + crypton memory revert).
source-repository-package
type: git
location: https://github.com/input-output-hk/ekg-forward
tag: 85470ae7e8fac9711682234ed39a36eec3d45a9b
--sha256: sha256-yk67GraJUsFi5mSETnaeuKNSnNRLOri6FK5yzmRLzxU=
location: https://github.com/IntersectMBO/cardano-base
tag: 9c6078d9c39c542abcb5912d0d7c222b7ba8a03d
subdir:
cardano-binary
cardano-crypto-class
cardano-crypto-leios
-- local toggle: comment the SRP above and uncomment to build against ../cardano-base
-- packages:
-- ../cardano-base/cardano-binary
-- ../cardano-base/cardano-crypto-class
-- ../cardano-base/cardano-crypto-leios
2 changes: 2 additions & 0 deletions cardano-node/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Next version

* Added a `--shelley-bls-key FILEPATH` option to `cardano-node run` for supplying a block producer's BLS (Leios) signing key alongside the existing VRF/KES/operational-certificate keys. The key is threaded into the consensus block-producer credentials and used as the Leios voting key. It is optional: producers that do not supply it no longer vote (previously a placeholder key was derived from cold-key material). Generate one with `cardano-cli dijkstra node key-gen-BLS`.

* Resolve relative `LeiosDbConfig` SQLite paths against `--database-path`, so the default `leios.db` is placed alongside `immutable/` and `volatile/`.

* Added txsSyncDurationTotal counter for tracking the total time spent syncing the mempool.
Expand Down
2 changes: 1 addition & 1 deletion cardano-node/src/Cardano/Node/Configuration/POM.hs
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ defaultPartialNodeConfiguration =
, pncDiffusionMode = Last $ Just InitiatorAndResponderDiffusionMode
, pncExperimentalProtocolsEnabled = Last $ Just False
, pncTopologyFile = Last . Just $ TopologyFile "configuration/cardano/mainnet-topology.json"
, pncProtocolFiles = Last . Just $ ProtocolFilepaths Nothing Nothing Nothing Nothing Nothing Nothing
, pncProtocolFiles = Last . Just $ ProtocolFilepaths Nothing Nothing Nothing Nothing Nothing Nothing Nothing
, pncValidateDB = Last $ Just False
, pncShutdownConfig = Last . Just $ ShutdownConfig Nothing Nothing
, pncStartAsNonProducingNode = Last $ Just False
Expand Down
11 changes: 11 additions & 0 deletions cardano-node/src/Cardano/Node/Parsers.hs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ nodeRunParser = do
byronKeyFile <- optional parseByronSigningKey
shelleyKESSource <- optional parseKesSourceFilePath
shelleyVRFFile <- optional parseVrfKeyFilePath
shelleyBLSFile <- optional parseBlsKeyFilePath
shelleyCertFile <- optional parseOperationalCertFilePath
shelleyBulkCredsFile <- optional parseBulkCredsFilePath
startAsNonProducingNode <- (\depr new -> Last depr <> Last new)
Expand Down Expand Up @@ -103,6 +104,7 @@ nodeRunParser = do
, byronKeyFile
, shelleyKESSource
, shelleyVRFFile
, shelleyBLSFile
, shelleyCertFile
, shelleyBulkCredsFile
}
Expand Down Expand Up @@ -412,6 +414,15 @@ parseVrfKeyFilePath =
<> completer (bashCompleter "file")
)

parseBlsKeyFilePath :: Parser FilePath
parseBlsKeyFilePath =
strOption
( long "shelley-bls-key"
<> metavar "FILEPATH"
<> help "Path to the BLS (Leios) signing key."
<> completer (bashCompleter "file")
)

parseStartAsNonProducingNodeDeprecated :: Parser (Maybe Bool)
parseStartAsNonProducingNodeDeprecated =
flag Nothing (Just True) $ mconcat
Expand Down
21 changes: 17 additions & 4 deletions cardano-node/src/Cardano/Node/Protocol/Shelley.hs
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,18 @@
readLeaderCredentialsSingleton
ProtocolFilepaths { shelleyCertFile = Just opCertFile,
shelleyVRFFile = Just vrfFile,
shelleyBLSFile = mBlsFile,
shelleyKESSource = Just kesSource
} = do
vrfSKey <-
firstExceptT FileError (newExceptT $ readFileTextEnvelope (File vrfFile))

-- The BLS (Leios) key is optional: only block producers participating in
-- Leios supply one alongside their VRF/KES/opcert credentials.
blsSKey <-
firstExceptT FileError $
traverse (\blsFile -> newExceptT $ readFileTextEnvelope (File blsFile)) mBlsFile

Check warning on line 197 in cardano-node/src/Cardano/Node/Protocol/Shelley.hs

View workflow job for this annotation

GitHub Actions / build

Suggestion in readLeaderCredentialsSingleton in module Cardano.Node.Protocol.Shelley: Avoid lambda ▫︎ Found: "\\ blsFile -> newExceptT $ readFileTextEnvelope (File blsFile)" ▫︎ Perhaps: "newExceptT . readFileTextEnvelope . File"

(credentialsSource, vkey) <- case kesSource of
KESKeyFilePath kesFile -> do
(OperationalCertificate opCert vkey, KesSigningKey kesKey) <-
Expand All @@ -202,7 +209,7 @@
OperationalCertificate _ vkey <- firstExceptT FileError $ newExceptT $ readFileTextEnvelope $ File opCertFile
pure (PraosCredentialsAgent socketFile, vkey)

return [mkPraosLeaderCredentials credentialsSource vkey vrfSKey]
return [mkPraosLeaderCredentials credentialsSource vkey vrfSKey blsSKey]

-- But not OK to supply some of the files without the others.
readLeaderCredentialsSingleton ProtocolFilepaths {shelleyCertFile = Nothing} =
Expand Down Expand Up @@ -252,7 +259,8 @@
KesSigningKey kesKey <- parseEnvelope scKes
let credentialsSource = PraosCredentialsUnsound opCert kesKey
vrfSKey <- parseEnvelope scVrf
pure $ mkPraosLeaderCredentials credentialsSource vkey vrfSKey
-- Bulk credentials files do not carry a BLS (Leios) key.
pure $ mkPraosLeaderCredentials credentialsSource vkey vrfSKey Nothing

readBulkFile
:: Maybe FilePath
Expand All @@ -277,20 +285,25 @@
PraosCredentialsSource StandardCrypto
-> VerificationKey StakePoolKey
-> SigningKey VrfKey
-> Maybe (SigningKey BlsKey)
-> ShelleyLeaderCredentials StandardCrypto
mkPraosLeaderCredentials
credentialsSource
(StakePoolVerificationKey vkey)
(VrfSigningKey vrfKey) =
(VrfSigningKey vrfKey)
mBlsKey =
ShelleyLeaderCredentials
{ shelleyLeaderCredentialsCanBeLeader =
PraosCanBeLeader {
praosCanBeLeaderCredentialsSource = credentialsSource,
praosCanBeLeaderColdVerKey = coerceKeyRole vkey,
praosCanBeLeaderSignKeyVRF = vrfKey
praosCanBeLeaderSignKeyVRF = vrfKey,
praosCanBeLeaderSignKeyBLS = unBlsSigningKey <$> mBlsKey
},
shelleyLeaderCredentialsLabel = "Shelley"
}
where
unBlsSigningKey (BlsSigningKey k) = k

parseEnvelope ::
HasTextEnvelope a
Expand Down
3 changes: 3 additions & 0 deletions cardano-node/src/Cardano/Node/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ data ProtocolFilepaths =
, byronKeyFile :: !(Maybe FilePath)
, shelleyKESSource :: !(Maybe KESSource)
, shelleyVRFFile :: !(Maybe FilePath)
, shelleyBLSFile :: !(Maybe FilePath)
, shelleyCertFile :: !(Maybe FilePath)
, shelleyBulkCredsFile :: !(Maybe FilePath)
} deriving (Eq, Show)
Expand All @@ -192,13 +193,15 @@ hasProtocolFile ProtocolFilepaths {
byronKeyFile,
shelleyKESSource,
shelleyVRFFile,
shelleyBLSFile,
shelleyCertFile,
shelleyBulkCredsFile
}
= isJust byronCertFile
|| isJust byronKeyFile
|| isJust shelleyKESSource
|| isJust shelleyVRFFile
|| isJust shelleyBLSFile
|| isJust shelleyCertFile
|| isJust shelleyBulkCredsFile

Expand Down
4 changes: 2 additions & 2 deletions cardano-node/test/Test/Cardano/Node/POM.hs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ testPartialCliConfig =
, pncDatabaseFile = mempty
, pncDiffusionMode = mempty
, pncExperimentalProtocolsEnabled = Last $ Just True
, pncProtocolFiles = Last . Just $ ProtocolFilepaths Nothing Nothing Nothing Nothing Nothing Nothing
, pncProtocolFiles = Last . Just $ ProtocolFilepaths Nothing Nothing Nothing Nothing Nothing Nothing Nothing
, pncValidateDB = Last $ Just True
, pncProtocolConfig = mempty
, pncMaxConcurrencyBulkSync = mempty
Expand Down Expand Up @@ -249,7 +249,7 @@ eExpectedConfig = do
, ncConfigFile = ConfigYamlFilePath "configuration/cardano/mainnet-config.json"
, ncTopologyFile = TopologyFile "configuration/cardano/mainnet-topology.json"
, ncDatabaseFile = OnePathForAllDbs "mainnet/db/"
, ncProtocolFiles = ProtocolFilepaths Nothing Nothing Nothing Nothing Nothing Nothing
, ncProtocolFiles = ProtocolFilepaths Nothing Nothing Nothing Nothing Nothing Nothing Nothing
, ncValidateDB = True
, ncProtocolConfig = testNodeProtocolConfiguration
, ncDiffusionMode = InitiatorAndResponderDiffusionMode
Expand Down
12 changes: 6 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading