Skip to content
Draft
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
13 changes: 13 additions & 0 deletions .changes/20260904_fix_dijkstra_era_commands.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
project: cardano-cli

pr: 1439

kind:
- bugfix

description: |
Fix Dijkstra era commands (BLS key generation/hashing, proof of possession, 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.
105 changes: 101 additions & 4 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ 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
, hackage.haskell.org 2026-09-02T14:05:07Z
, cardano-haskell-packages 2026-09-04T06:57:08Z

packages:
Expand All @@ -35,10 +35,8 @@ 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
Expand Down Expand Up @@ -70,6 +68,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 @@ -83,6 +98,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 All @@ -95,3 +117,78 @@ if impl(ghc >= 9.14)
, time-locale-compat:time
, with-utf8:base
-- cabal-allow-newer end

source-repository-package
type: git
location: https://github.com/input-output-hk/kes-agent
tag: 4625f3cf543566517d08882e659c97932d106d86
--sha256: sha256-CSHWndpeJFqCEFNT6ysfyN6x+O4vZ9TtYOOsZKcLnIA=
subdir:
kes-agent
kes-agent-crypto

source-repository-package
type: git
location: https://github.com/IntersectMBO/cardano-ledger
tag: fb723848a28256fe372ea9ba692eccded6a12a53
--sha256: sha256-iL61RTn4OPRNzzPn/2YcVJNMJYolXghaQ9cDG/DOOWM=
subdir:
eras/allegra/impl
eras/alonzo/impl
eras/babbage/impl
eras/byron/chain/executable-spec
eras/byron/crypto
eras/byron/ledger/executable-spec
eras/byron/ledger/impl
eras/conway/impl
eras/dijkstra/impl
eras/mary/impl
eras/shelley/impl
eras/shelley/test-suite
libs/cardano-data
libs/cardano-ledger-api
libs/cardano-ledger-binary
libs/cardano-ledger-core
libs/cardano-protocol
libs/cardano-protocol-tpraos
libs/non-integral
libs/small-steps
libs/vector-map

source-repository-package
type: git
location: https://github.com/intersectmbo/cardano-base.git
--sha256: sha256-WUBluY6UqvBkS5cNsJnKMOaW+1dTfL3mg8iq/kVPV0o=
tag: d92e2e3841eaad354c5e1ef77b458b347f471271
subdir: cardano-crypto-leios

source-repository-package
type: git
location: https://github.com/IntersectMBO/ouroboros-consensus
tag: 835d3747eb2fbd6b7d69e73245ec7c9703faec21
--sha256: sha256-ZDAPypcfLn7xzUyxcI7ktHxnvUKtPEHcPR522+c04Ao=
subdir:
.

source-repository-package
type: git
location: https://github.com/well-typed/grapesy
tag: bd6af64f69ff89e3a8fc02e2c81262e648f4715d
--sha256: sha256-4F+bUoytvrgOcQ8aIWbOY9uYsPoTZwQOlmh7ckgyK9M=
subdir:
grapesy
grpc-spec

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-crypto
tag: ac2e12a471b735ad80949bcbf0f6f634e5dbef77
--sha256: sha256-NvbMk41W2PQy2H91nkG0GtPyGDwia0y6DQNNf9RtoAc=

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-api
tag: 6095192558ff527fc73eb06a9862da62d7fb0949
--sha256: sha256-6mBza4a3Plu9f3ZFfJNUufj5ckx7bNefvYW8atUz0j8=
subdir:
cardano-api
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
4 changes: 2 additions & 2 deletions cardano-cli/cardano-cli.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,8 @@ library
cardano-api ^>=11.7,
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-git-rev ^>=0.2.2,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ import Cardano.CLI.Type.Error.StakePoolCmdError
import Cardano.CLI.Type.Key
import Cardano.Crypto.Hash qualified as Crypto
import Cardano.Ledger.Conway.Genesis (ConwayExtraConfig (..))
import Cardano.Ledger.Shelley qualified as L
import Cardano.Ledger.Shelley.Genesis (InjectionData (..), ShelleyExtraConfig (..))
import Cardano.Prelude (canonicalEncodePretty)
import Cardano.Protocol.Crypto qualified as C
Expand Down Expand Up @@ -453,7 +454,7 @@ runGenesisCreateTestNetDataCmd
mkPoolDir idx = poolsDir </> ("pool" <> show idx)

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

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

Expand All @@ -777,7 +778,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 +803,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 +828,7 @@ computeInsecureStakeKeyAddr g0 = do
computeDelegation
:: NetworkId
-> (VerificationKey PaymentKey, VerificationKey StakeKey)
-> L.StakePoolParams
-> L.StakePoolParams L.ShelleyEra
-> Delegation
computeDelegation nw (paymentVK, stakeVK) dPoolParams = do
let paymentCredential = PaymentCredentialByKey (verificationKeyHash paymentVK)
Expand All @@ -849,7 +851,7 @@ updateOutputTemplate
-- ^ Total amount of lovelace
-> [AddressInEra ShelleyEra]
-- ^ UTxO addresses that are not delegating
-> [(L.KeyHash L.StakePool, L.StakePoolParams)]
-> [(L.KeyHash L.StakePool, L.StakePoolParams L.ShelleyEra)]
-- ^ Pool map
-> [(L.KeyHash L.Staking, L.KeyHash L.StakePool)]
-- ^ Delegaton map
Expand Down
14 changes: 8 additions & 6 deletions cardano-cli/src/Cardano/CLI/EraBased/Genesis/Run.hs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ import Cardano.Crypto qualified as CC
import Cardano.Crypto.Hash qualified as Crypto
import Cardano.Crypto.Signing qualified as Byron
import Cardano.Ledger.BaseTypes (unNonZero)
import Cardano.Ledger.Shelley qualified as L
import Cardano.Ledger.Shelley.Genesis (InjectionData (..), ShelleyExtraConfig (..))
import Cardano.Protocol.Crypto qualified as C

Expand Down Expand Up @@ -747,7 +748,7 @@ runGenesisCreateStakedCmd
where
adjustTemplate t = t{sgNetworkMagic = unNetworkMagic (toNetworkMagic networkId)}
mkDelegationMapEntry
:: Delegation -> (L.KeyHash L.Staking, L.StakePoolParams)
:: Delegation -> (L.KeyHash L.Staking, L.StakePoolParams L.ShelleyEra)
mkDelegationMapEntry d = (dDelegStaking d, dPoolParams d)

-- -------------------------------------------------------------------------------------------------
Expand All @@ -763,7 +764,7 @@ updateOutputTemplate
-- ^ Number of UTxO addresses that are delegating
-> [AddressInEra ShelleyEra]
-- ^ UTxO addresses that are not delegating
-> [(L.KeyHash L.StakePool, L.StakePoolParams)]
-> [(L.KeyHash L.StakePool, L.StakePoolParams L.ShelleyEra)]
-- ^ Pool map
-> [(L.KeyHash L.Staking, L.KeyHash L.StakePool)]
-- ^ Delegaton map
Expand Down Expand Up @@ -950,7 +951,7 @@ createPoolCredentials fmt dir index = do
data Delegation = Delegation
{ dInitialUtxoAddr :: !(AddressInEra ShelleyEra)
, dDelegStaking :: !(L.KeyHash L.Staking)
, dPoolParams :: !L.StakePoolParams
, dPoolParams :: !(L.StakePoolParams L.ShelleyEra)
}
deriving (Generic, NFData)

Expand All @@ -961,7 +962,7 @@ buildPoolParams
-> Maybe Word
-> Map Word [L.StakePoolRelay]
-- ^ User submitted stake pool relay map
-> ExceptT GenesisCmdError IO L.StakePoolParams
-> ExceptT GenesisCmdError IO (L.StakePoolParams L.ShelleyEra)
buildPoolParams nw dir index specifiedRelays = do
StakePoolVerificationKey poolColdVK <-
firstExceptT (GenesisCmdStakePoolCmdError . StakePoolCmdReadFileError)
Expand All @@ -986,6 +987,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 Down Expand Up @@ -1041,7 +1043,7 @@ writeBulkPoolCredentials dir bulkIx poolIxs = do
computeInsecureDelegation
:: StdGen
-> NetworkId
-> L.StakePoolParams
-> L.StakePoolParams L.ShelleyEra
-> IO (StdGen, Delegation)
computeInsecureDelegation g0 nw pool = do
(paymentVK, g1) <- first getVerificationKey <$> generateInsecureSigningKey g0 AsPaymentKey
Expand Down Expand Up @@ -1091,7 +1093,7 @@ updateTemplate
-- ^ Amount of lovelace not delegated
-> [AddressInEra ShelleyEra]
-- ^ UTxO addresses that are not delegating
-> Map (L.KeyHash L.Staking) L.StakePoolParams
-> Map (L.KeyHash L.Staking) (L.StakePoolParams L.ShelleyEra)
-- ^ Genesis staking: pools/delegation map & delegated initial UTxO spec
-> Lovelace
-- ^ Number of UTxO Addresses for delegation
Expand Down
2 changes: 1 addition & 1 deletion cardano-cli/src/Cardano/CLI/EraBased/Query/Run.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1173,7 +1173,7 @@ writePoolState
:: Exp.Era era
-> Vary [FormatJson, FormatYaml]
-> Maybe (File () Out)
-> SerialisedPoolState
-> SerialisedPoolState era
-> ExceptT QueryCmdError IO ()
writePoolState era outputFormat mOutFile serialisedCurrentEpochState = do
poolState <-
Expand Down
Loading
Loading