Skip to content
Merged
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
@@ -0,0 +1,7 @@
description: |
`stake-pool registration-certificate` can now register a stake pool's BLS voting key. The new `--bls-signing-key-file FILEPATH` option is era-gated: it is mandatory from the Dijkstra era onwards and not offered in Conway or earlier, so existing Conway invocations are unaffected. The signing key is read as a text envelope (produce one with `node key-gen-BLS`) and converted to the registered verification key plus proof of possession via `toLedgerBlsKey`.
Genesis pool parameters built by `genesis create-staked` and `genesis create-testnet-data` set the new ledger `sppBlsKey` field to `SNothing`.
kind:
- feature
pr: 1439
project: cardano-cli
9 changes: 9 additions & 0 deletions .changes/20260904_fix_dijkstra_era_commands.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
project: cardano-cli

pr: 1439

kind:
- bugfix

description: |
Fix Dijkstra era commands (BLS key generation, transaction witness/assemble) that were failing with "TODO DijkstraEra" because the era dispatch in runAnyEraCommand was unconditionally calling obtainCommonConstraints, which is not yet implemented for DijkstraEra. Commands that do not require EraCommonConstraints now work correctly for the Dijkstra era.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
description: |
Add new Leios parameters to create-protocol-parameters-update command line options
kind:
- feature
pr: 1439
project: cardano-cli
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
project: cardano-cli

pr: 1439

kind:
- breaking

description: |
Removed the `node issue-pop-BLS` and `node key-hash-BLS` commands. A pool's BLS proof of possession is now built straight into the registration certificate from the signing key given to `stake-pool registration-certificate --bls-signing-key-file`, so there is no need to issue one as a standalone artifact; a standalone BLS key hash was never needed at all. Both commands shipped in 10.16.0.0 but no node release ever made use of their output, so removing them breaks no existing workflow. `node key-gen-BLS` is unaffected, and either command can be reinstated if a concrete use case turns up.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
project: cardano-cli

pr: 1439

kind:
- compatible

description: |
Adapt to cardano-ledger-core 1.22, where `mkStakePoolState` stamps a pool's BLS voting key with the epoch its registration takes effect in. The pool-state query does not report that epoch yet, so `query pool-state` fills `bksRegisteredIn` with the epoch the parameters take effect in: the current epoch for the active parameters and the next one for the future parameters. The reported value is a placeholder until the ledger exposes the real one (https://github.com/IntersectMBO/cardano-ledger/issues/6147); the feature is not yet used on mainnet.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
.stack-work/
.ghc.environment.*
.nix-shell-cabal.project
.direnv
.envrc
/cabal.project.diff
/cabal.project.freeze
/cabal.project.local*
Expand Down
39 changes: 34 additions & 5 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ 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-07-30T07:30:12Z
, cardano-haskell-packages 2026-09-24T00:08:56Z
, hackage.haskell.org 2026-09-02T14:05:07Z
, cardano-haskell-packages 2026-10-06T19:41:19Z

packages:
cardano-cli
Expand All @@ -35,16 +35,21 @@ extra-packages: Cabal

if impl(ghc < 9.14)
constraints:
-- hourglass and time-hourglass both in dependency tree break musl build
, time-hourglass < 0
-- haskell.nix patch does not work for 1.6.8
, any.crypton-x509-system < 1.6.8
, any.crypton-x509-system (< 1.6.8 || >= 1.7)

if os(windows)
constraints: time ^>=1.14
allow-newer: *:time
-- Needed for running tests with WINE (see https://github.com/haskell/network/issues/604)
constraints: network <3.2.8.0
-- cardano-config and kes-agent (pulled in by ouroboros-consensus 5.0 and
-- cardano-api) require network ^>=3.2.8, but they only need APIs that are
-- already in 3.2.7, so let them accept the WINE-compatible network pinned
-- above.
allow-older:
, cardano-config:network
, kes-agent:network

-- cardano-ledger-binary 1.9.0.0 reversed the byte order of relay IPv4 addresses (cardano-cli#1442)
constraints: cardano-ledger-binary >=1.9.1
Expand Down Expand Up @@ -73,6 +78,23 @@ write-ghc-environment-files: always
-- Do NOT add more source-repository-package stanzas here unless they are strictly
-- temporary! Please read the section in CONTRIBUTING about updating dependencies.

-- Allow network-mux 0.11 from SRP (cardano-ping 0.10 on CHaP expects ^>=0.10)
-- Allow grapesy deps with updated bounds (matching cardano-node)
allow-newer:
, cardano-ping:network-mux
, grapesy:aeson
, grapesy:crypton-x509
, grapesy:crypton-x509-store
, grapesy:crypton-x509-system
, grapesy:crypton-x509-validation
, grapesy:http2
, grapesy:http2-tls
, grapesy:network-run
, grapesy:tls
-- kes-agent bounds cardano-crypto-class ^>=2.5 but we have a newer version
, kes-agent:cardano-crypto-class
, kes-agent-crypto:cardano-crypto-class

-- cabal-allow-newer begin
if impl(ghc >= 9.14)
allow-newer:
Expand All @@ -86,6 +108,13 @@ if impl(ghc >= 9.14)
, dictionary-sharing:containers
, diff-containers:base
, fs-sim:QuickCheck
, grapesy:base
, grapesy:containers
, grapesy:tls
, grpc-spec:base
, grpc-spec:containers
, lens-family:containers
, lens-family-core:containers
, lsm-tree:data-elevator
, ordered-containers:containers
, partial-order:containers
Expand Down
30 changes: 15 additions & 15 deletions cardano-cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,58 +63,58 @@
[PR 1396](https://github.com/intersectmbo/cardano-cli/pull/1396)

- new `cardano-cli ping` api

`cardano-cli ping` allows now to ping multiple servers, does domain name
resolution and supports SRV records (as specified in
https://cips.cardano.org/cip/CIP-0155)

Some examples:

Run a ping against two ip addresses, ipv4 & ipv6
```bash
cardano-cli ping 127.0.0.1:3001 [::1]:3001
```

Run a ping against a domain name:
```bash
cardano-cli ping my.domain.com:3001
```

Run a ping against an SRV domain.
According to CIP#0155 the SRV record needs to be registered at
`_cardano._tcp.srv.domain.com`
```bash
cardano-cli ping srv.domain.com
```

Run a ping against unix socket
```bash
cardano-cli ping /var/run/cardano-node.socket
```

`cardano-cli` ping has three modes of operation:

* ping mode: `--mode ping` (the default)
* tip mode `--mode tip`
* query handshake parameters: `--mode query`
(breaking, feature)
[PR 1384](https://github.com/intersectmbo/cardano-cli/pull/1384)

- The interface for `cardano-cli ping` has been reshuffled:

Removed:

* `-h`/`--host`, `-u`/`--unixsock` and `-p`/`--port`. The target is now given as a
positional argument instead (see below).
* `-Q`/`--query-versions`, replaced by `--mode query`.
* `-t`/`--tip`, replaced by `--mode tip`.

Renamed:

* `-m`/`--magic` is now `-m`/`--network-magic`.

Added:

* A positional `ADDRS` argument, which accepts one or more targets: an IP/DNS address
with a port (`127.0.0.1:3001`, `[::1]:3001`, `example.org:3001`), an SRV name, or a
UNIX socket path.
Expand All @@ -124,7 +124,7 @@
(default `_cardano._tcp`).
* `--color COLOR`, one of `auto`, `never` or `always`.
* `--short-hash`, to show an abbreviated tip hash.

Note that `-h` is now only a short form of `--help`; it no longer means `--host`.
(breaking, feature)
[PR 1384](https://github.com/intersectmbo/cardano-cli/pull/1384)
Expand Down
11 changes: 5 additions & 6 deletions cardano-cli/cardano-cli.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -246,13 +246,13 @@ library
binary,
bytestring,
canonical-json,
cardano-api ^>=11.7,
cardano-api ^>=11.8,
cardano-binary,
cardano-crypto,
cardano-crypto-class ^>=2.5,
cardano-crypto-wrapper ^>=1.7,
cardano-crypto-class ^>=2.6,
cardano-crypto-wrapper ^>=1.8,
cardano-data >=1.1,
cardano-diffusion:ping ^>=1.1.1,
cardano-diffusion:ping ^>=1.3,
cardano-git-rev ^>=0.2.2,
cardano-ledger-api,
cardano-ledger-conway,
Expand Down Expand Up @@ -483,6 +483,7 @@ test-suite cardano-cli-golden
Test.Golden.CreateStaked
Test.Golden.CreateTestnetData
Test.Golden.Debug.TransactionView
Test.Golden.Dijkstra.StakePool.RegistrationCertificate
Test.Golden.Dijkstra.Transaction.Assemble
Test.Golden.ErrorsSpec
Test.Golden.Genesis.Common
Expand All @@ -509,12 +510,10 @@ test-suite cardano-cli-golden
Test.Golden.Shelley.Metadata.StakePoolMetadata
Test.Golden.Shelley.MultiSig.Address
Test.Golden.Shelley.Node.IssueOpCert
Test.Golden.Shelley.Node.IssuePopBls
Test.Golden.Shelley.Node.KeyGen
Test.Golden.Shelley.Node.KeyGenBls
Test.Golden.Shelley.Node.KeyGenKes
Test.Golden.Shelley.Node.KeyGenVrf
Test.Golden.Shelley.Node.KeyHashBls
Test.Golden.Shelley.StakeAddress.Build
Test.Golden.Shelley.StakeAddress.DeregistrationCertificate
Test.Golden.Shelley.StakeAddress.KeyGen
Expand Down
1 change: 1 addition & 0 deletions cardano-cli/src/Cardano/CLI/Compatible/StakePool/Run.hs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ runStakePoolRegistrationCertificateCmd
StakePoolParameters
{ stakePoolId = stakePoolId'
, stakePoolVRF = vrfKeyHash'
, stakePoolBlsKey = Nothing
, stakePoolCost = poolCost
, stakePoolMargin = poolMargin
, stakePoolRewardAccount = rewardAccountAddr
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ runGenesisCreateTestNetDataCmd
mkPoolDir idx = poolsDir </> ("pool" <> show idx)

mkDelegationMapEntry
:: Delegation -> (L.KeyHash L.Staking, L.StakePoolParams)
:: Delegation -> (L.KeyHash L.Staking, GenesisStakePoolParams)
mkDelegationMapEntry d = (dDelegStaking d, dPoolParams d)

addCommitteeToConwayGenesis
Expand Down Expand Up @@ -765,7 +765,7 @@ createPoolCredentials fmt dir = do
data Delegation = Delegation
{ dInitialUtxoAddr :: !(AddressInEra ShelleyEra)
, dDelegStaking :: !(L.KeyHash L.Staking)
, dPoolParams :: !L.StakePoolParams
, dPoolParams :: !GenesisStakePoolParams
}
deriving (Generic, NFData)

Expand All @@ -777,7 +777,7 @@ buildPoolParams
-- ^ The index of the pool being built. Starts at 0.
-> Map Word [L.StakePoolRelay]
-- ^ User submitted stake pool relay map. Starts at 0
-> ExceptT GenesisCmdError IO L.StakePoolParams
-> ExceptT GenesisCmdError IO (L.StakePoolParams era)
buildPoolParams nw dir index specifiedRelays = do
StakePoolVerificationKey poolColdVK <-
firstExceptT (GenesisCmdStakePoolCmdError . StakePoolCmdReadFileError)
Expand All @@ -802,6 +802,7 @@ buildPoolParams nw dir index specifiedRelays = do
, L.sppMargin = minBound
, L.sppAccountAddress =
toShelleyStakeAddr $ makeStakeAddress nw $ StakeCredentialByKey (verificationKeyHash rewardsSVK)
, L.sppBlsKey = L.SNothing
, L.sppOwners = mempty
, L.sppRelays = lookupPoolRelay specifiedRelays
, L.sppMetadata = L.SNothing
Expand All @@ -826,7 +827,7 @@ computeInsecureStakeKeyAddr g0 = do
computeDelegation
:: NetworkId
-> (VerificationKey PaymentKey, VerificationKey StakeKey)
-> L.StakePoolParams
-> GenesisStakePoolParams
-> Delegation
computeDelegation nw (paymentVK, stakeVK) dPoolParams = do
let paymentCredential = PaymentCredentialByKey (verificationKeyHash paymentVK)
Expand All @@ -849,7 +850,7 @@ updateOutputTemplate
-- ^ Total amount of lovelace
-> [AddressInEra ShelleyEra]
-- ^ UTxO addresses that are not delegating
-> [(L.KeyHash L.StakePool, L.StakePoolParams)]
-> [(L.KeyHash L.StakePool, GenesisStakePoolParams)]
-- ^ Pool map
-> [(L.KeyHash L.Staking, L.KeyHash L.StakePool)]
-- ^ Delegaton map
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
{-# LANGUAGE TypeApplications #-}

module Cardano.CLI.EraBased.Genesis.Internal.Common
( decodeShelleyGenesisFile
( GenesisStakePoolParams
, decodeShelleyGenesisFile
, decodeAlonzoGenesisFile
, decodeConwayGenesisFile
, decodeDijkstraGenesisFile
Expand All @@ -35,6 +36,7 @@ import Cardano.Crypto.Hash (HashAlgorithm)
import Cardano.Crypto.Hash qualified as Hash
import Cardano.Crypto.Random qualified as Crypto
import Cardano.Ledger.Dijkstra.Genesis (DijkstraGenesis (..))
import Cardano.Ledger.Shelley qualified as L

import Data.Aeson qualified as A
import Data.Binary.Get qualified as Bin
Expand Down Expand Up @@ -91,6 +93,15 @@ readAndDecodeGenesisFileWith decode' fpath = do
. hoistEither
$ decode' lbs

-- | Stake pool parameters for the Shelley genesis file.
--
-- Pinned to 'L.ShelleyEra' because the ledger's 'ShelleyGenesisStaking' field
-- @sgsPools@ requires @StakePoolParams ShelleyEra@. The era index on
-- 'L.StakePoolParams' is phantom (cardano-ledger-core 1.22) and is dropped by
-- 'mkStakePoolState' when the initial pool state is built, so this holds for
-- whichever era the chain starts in.
type GenesisStakePoolParams = L.StakePoolParams L.ShelleyEra

genStuffedAddress :: L.Network -> IO (AddressInEra ShelleyEra)
genStuffedAddress network = do
paymentCredential <-
Expand Down
Loading
Loading