From 7236b7f746d8e909cb12f9a1cf8fd0fb230735ab Mon Sep 17 00:00:00 2001 From: kolam Date: Tue, 1 Sep 2026 16:39:03 -0400 Subject: [PATCH] Update bounds for 11.2 integration * Fix StakePoolParams construction: add sppBlsKey = SNothing for ledger 1.2 * Replace deprecated rawDeserialiseVerKeyDSIGN with rawDecodeFixedSized --- cabal.project | 97 ++++++++++++++++++- cardano-cli/CHANGELOG.md | 30 +++--- cardano-cli/cardano-cli.cabal | 2 +- .../Cardano/CLI/Compatible/Transaction/Run.hs | 4 +- .../EraBased/Genesis/CreateTestnetData/Run.hs | 1 + .../src/Cardano/CLI/EraBased/Genesis/Run.hs | 1 + .../src/Cardano/CLI/EraIndependent/Key/Run.hs | 6 +- flake.lock | 96 +++++++++++++++++- flake.nix | 35 ++++++- 9 files changed, 242 insertions(+), 30 deletions(-) diff --git a/cabal.project b/cabal.project index e55d84e8bd..487359e5d0 100644 --- a/cabal.project +++ b/cabal.project @@ -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-02T08:49:12Z packages: @@ -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 @@ -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: @@ -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 @@ -95,3 +117,70 @@ 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/IntersectMBO/cardano-ledger + tag: 620d2e31ad263bcfab4ad1516a9549c7b53c3ef6 + --sha256: sha256-LI0zqi99UaXksj+op2rLFL0aY+Ayt7EmxvQtUlJvHDg= + 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/plutus-preprocessor + 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: 4ee752860daff98f218ace65f828b1244a831055 + --sha256: sha256-rno71IrjiOfEeOVDqesedJ+3eAWXIBhy/OwtnS44po4= + subdir: + . + +source-repository-package + type: git + location: https://github.com/input-output-hk/cardano-api + tag: 6f93e4ab99973bd7249ed0208ddd9d5c36421ac8 + --sha256: sha256-AUGmRLi62RRl32H4nOnRTCGf7zL+bG5hLgmRiwmQ9ds= + subdir: + cardano-api + +source-repository-package + type: git + location: https://github.com/IntersectMBO/cardano-addresses + tag: f59608374d955b653624822429685114f41e2db2 + --sha256: sha256-HgLfcxlz%2BVC2ENmS5dP4S4dCtF6y9I9sjnd0EbDWo8k%3D + +source-repository-package + type: git + location: https://github.com/well-typed/grapesy + tag: bd6af64f69ff89e3a8fc02e2c81262e648f4715d + --sha256: sha256-4F+bUoytvrgOcQ8aIWbOY9uYsPoTZwQOlmh7ckgyK9M= + subdir: + grapesy + grpc-spec diff --git a/cardano-cli/CHANGELOG.md b/cardano-cli/CHANGELOG.md index f70d6eb17a..eac9120d04 100644 --- a/cardano-cli/CHANGELOG.md +++ b/cardano-cli/CHANGELOG.md @@ -57,37 +57,37 @@ [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` @@ -95,20 +95,20 @@ [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. @@ -118,7 +118,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) diff --git a/cardano-cli/cardano-cli.cabal b/cardano-cli/cardano-cli.cabal index a6d1bb11f6..9667194695 100644 --- a/cardano-cli/cardano-cli.cabal +++ b/cardano-cli/cardano-cli.cabal @@ -249,7 +249,7 @@ library cardano-api ^>=11.6, cardano-binary, cardano-crypto, - cardano-crypto-class ^>=2.5, + cardano-crypto-class ^>=2.6, cardano-crypto-wrapper ^>=1.7, cardano-data >=1.1, cardano-diffusion:ping ^>=1.1.1, diff --git a/cardano-cli/src/Cardano/CLI/Compatible/Transaction/Run.hs b/cardano-cli/src/Cardano/CLI/Compatible/Transaction/Run.hs index e488964a05..77308ba5de 100644 --- a/cardano-cli/src/Cardano/CLI/Compatible/Transaction/Run.hs +++ b/cardano-cli/src/Cardano/CLI/Compatible/Transaction/Run.hs @@ -211,10 +211,10 @@ mkTxCertificatesSbe era certs = Exp.TxCertificates . OMap.fromList $ map getStak getStakeCred :: (Exp.Certificate (ShelleyLedgerEra era), Exp.AnyWitness (ShelleyLedgerEra era)) -> ( Exp.Certificate (ShelleyLedgerEra era) - , Maybe (StakeCredential, Exp.AnyWitness (ShelleyLedgerEra era)) + , Maybe (Exp.AnyWitness (ShelleyLedgerEra era)) ) getStakeCred (c@(Exp.Certificate cert), wit) = - (c, (,wit) <$> Compatible.getTxCertWitness (convert era) cert) + (c, wit <$ Compatible.getTxCertWitness (convert era) cert) readUpdateProposalFile :: Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile) diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Genesis/CreateTestnetData/Run.hs b/cardano-cli/src/Cardano/CLI/EraBased/Genesis/CreateTestnetData/Run.hs index d43852bf05..93c06f2fe5 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Genesis/CreateTestnetData/Run.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Genesis/CreateTestnetData/Run.hs @@ -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 diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Genesis/Run.hs b/cardano-cli/src/Cardano/CLI/EraBased/Genesis/Run.hs index 093c768e38..1e4fa59fe5 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Genesis/Run.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Genesis/Run.hs @@ -986,6 +986,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 diff --git a/cardano-cli/src/Cardano/CLI/EraIndependent/Key/Run.hs b/cardano-cli/src/Cardano/CLI/EraIndependent/Key/Run.hs index 6f581620eb..0847c666e1 100644 --- a/cardano-cli/src/Cardano/CLI/EraIndependent/Key/Run.hs +++ b/cardano-cli/src/Cardano/CLI/EraIndependent/Key/Run.hs @@ -43,7 +43,7 @@ import Cardano.Api.Byron qualified as ByronApi import Cardano.Api.Crypto.Ed25519Bip32 (xPrvFromBytes) import Cardano.Api.Ledger qualified as L -import Cardano.Binary.FixedSizeCodec (rawDecodeFixedSized) +import Cardano.Binary.FixedSizeCodec qualified as FixedSized import Cardano.CLI.Byron.Key qualified as Byron import Cardano.CLI.Compatible.Exception import Cardano.CLI.EraIndependent.Key.Command qualified as Cmd @@ -498,7 +498,7 @@ runConvertITNBip32KeyCmd convertITNVerificationKey :: Text -> Either ItnKeyConversionError (VerificationKey StakeKey) convertITNVerificationKey pubKey = do (_, _, keyBS) <- first ItnKeyBech32DecodeError (decodeBech32 pubKey) - case rawDecodeFixedSized keyBS of + case FixedSized.rawDecodeFixedSized keyBS of Just verKey -> Right . StakeVerificationKey $ L.VKey verKey Nothing -> Left $ ItnVerificationKeyDeserialisationError keyBS @@ -506,7 +506,7 @@ convertITNVerificationKey pubKey = do convertITNSigningKey :: Text -> Either ItnKeyConversionError (SigningKey StakeKey) convertITNSigningKey privKey = do (_, _, keyBS) <- first ItnKeyBech32DecodeError (decodeBech32 privKey) - case rawDecodeFixedSized keyBS of + case FixedSized.rawDecodeFixedSized keyBS of Just signKey -> Right $ StakeSigningKey signKey Nothing -> Left $ ItnSigningKeyDeserialisationError keyBS diff --git a/flake.lock b/flake.lock index 0415beec53..b4fc089172 100644 --- a/flake.lock +++ b/flake.lock @@ -151,6 +151,40 @@ "type": "github" } }, + "cardano-addresses-src": { + "flake": false, + "locked": { + "lastModified": 1788294850, + "narHash": "sha256-HgLfcxlz+VC2ENmS5dP4S4dCtF6y9I9sjnd0EbDWo8k=", + "owner": "IntersectMBO", + "repo": "cardano-addresses", + "rev": "f59608374d955b653624822429685114f41e2db2", + "type": "github" + }, + "original": { + "owner": "IntersectMBO", + "repo": "cardano-addresses", + "rev": "f59608374d955b653624822429685114f41e2db2", + "type": "github" + } + }, + "cardano-api-src": { + "flake": false, + "locked": { + "lastModified": 1788456668, + "narHash": "sha256-AUGmRLi62RRl32H4nOnRTCGf7zL+bG5hLgmRiwmQ9ds=", + "owner": "input-output-hk", + "repo": "cardano-api", + "rev": "6f93e4ab99973bd7249ed0208ddd9d5c36421ac8", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "cardano-api", + "rev": "6f93e4ab99973bd7249ed0208ddd9d5c36421ac8", + "type": "github" + } + }, "cardano-dev": { "inputs": { "haskellNix": "haskellNix", @@ -177,6 +211,23 @@ "type": "github" } }, + "cardano-ledger-src": { + "flake": false, + "locked": { + "lastModified": 1788441480, + "narHash": "sha256-LI0zqi99UaXksj+op2rLFL0aY+Ayt7EmxvQtUlJvHDg=", + "owner": "IntersectMBO", + "repo": "cardano-ledger", + "rev": "620d2e31ad263bcfab4ad1516a9549c7b53c3ef6", + "type": "github" + }, + "original": { + "owner": "IntersectMBO", + "repo": "cardano-ledger", + "rev": "620d2e31ad263bcfab4ad1516a9549c7b53c3ef6", + "type": "github" + } + }, "cardano-shell": { "flake": false, "locked": { @@ -299,6 +350,23 @@ "type": "github" } }, + "grapesy-src": { + "flake": false, + "locked": { + "lastModified": 1785840312, + "narHash": "sha256-4F+bUoytvrgOcQ8aIWbOY9uYsPoTZwQOlmh7ckgyK9M=", + "owner": "well-typed", + "repo": "grapesy", + "rev": "bd6af64f69ff89e3a8fc02e2c81262e648f4715d", + "type": "github" + }, + "original": { + "owner": "well-typed", + "repo": "grapesy", + "rev": "bd6af64f69ff89e3a8fc02e2c81262e648f4715d", + "type": "github" + } + }, "hackage": { "flake": false, "locked": { @@ -384,11 +452,11 @@ "hackageNix": { "flake": false, "locked": { - "lastModified": 1785398528, - "narHash": "sha256-dl5vmLjnVynFaniJ60YNZfDT7m/psLU1P/bj+gwlZt8=", + "lastModified": 1788358854, + "narHash": "sha256-NIF+y/9ctwQILbHsCZCOFN7dxuwWXKnFn5T0+ya49+Y=", "owner": "input-output-hk", "repo": "hackage.nix", - "rev": "cee34cd6eac747364751d1971080bc72c461506d", + "rev": "04149d44d879f7115282c442f8904b5eb5a78c4e", "type": "github" }, "original": { @@ -1430,6 +1498,23 @@ "type": "github" } }, + "ouroboros-consensus-src": { + "flake": false, + "locked": { + "lastModified": 1788447168, + "narHash": "sha256-rno71IrjiOfEeOVDqesedJ+3eAWXIBhy/OwtnS44po4=", + "owner": "IntersectMBO", + "repo": "ouroboros-consensus", + "rev": "4ee752860daff98f218ace65f828b1244a831055", + "type": "github" + }, + "original": { + "owner": "IntersectMBO", + "repo": "ouroboros-consensus", + "rev": "4ee752860daff98f218ace65f828b1244a831055", + "type": "github" + } + }, "pre-commit-hooks": { "inputs": { "flake-compat": "flake-compat_3", @@ -1453,8 +1538,12 @@ "root": { "inputs": { "CHaP": "CHaP", + "cardano-addresses-src": "cardano-addresses-src", + "cardano-api-src": "cardano-api-src", "cardano-dev": "cardano-dev", + "cardano-ledger-src": "cardano-ledger-src", "flake-utils": "flake-utils", + "grapesy-src": "grapesy-src", "hackageNix": "hackageNix", "haskellNix": "haskellNix_2", "incl": "incl", @@ -1463,6 +1552,7 @@ "haskellNix", "nixpkgs-unstable" ], + "ouroboros-consensus-src": "ouroboros-consensus-src", "pre-commit-hooks": "pre-commit-hooks", "unstable": "unstable" } diff --git a/flake.nix b/flake.nix index d13d3c2554..c36b9e4607 100644 --- a/flake.nix +++ b/flake.nix @@ -20,6 +20,27 @@ pre-commit-hooks.url = "github:cachix/git-hooks.nix"; cardano-dev.url = "github:input-output-hk/cardano-dev"; + cardano-ledger-src = { + url = "github:IntersectMBO/cardano-ledger/620d2e31ad263bcfab4ad1516a9549c7b53c3ef6"; + flake = false; + }; + ouroboros-consensus-src = { + url = "github:IntersectMBO/ouroboros-consensus/4ee752860daff98f218ace65f828b1244a831055"; + flake = false; + }; + cardano-api-src = { + url = "github:input-output-hk/cardano-api/6f93e4ab99973bd7249ed0208ddd9d5c36421ac8"; + flake = false; + }; + grapesy-src = { + url = "github:well-typed/grapesy/bd6af64f69ff89e3a8fc02e2c81262e648f4715d"; + flake = false; + }; + cardano-addresses-src = { + url = "github:IntersectMBO/cardano-addresses/f59608374d955b653624822429685114f41e2db2"; + flake = false; + }; + CHaP = { url = "github:intersectmbo/cardano-haskell-packages?ref=repo"; flake = false; @@ -166,6 +187,11 @@ # inputMap = { "https://chap.intersectmbo.org/" = inputs.CHaP; + "https://github.com/IntersectMBO/cardano-ledger" = inputs.cardano-ledger-src; + "https://github.com/IntersectMBO/ouroboros-consensus" = inputs.ouroboros-consensus-src; + "https://github.com/input-output-hk/cardano-api" = inputs.cardano-api-src; + "https://github.com/well-typed/grapesy" = inputs.grapesy-src; + "https://github.com/IntersectMBO/cardano-addresses" = inputs.cardano-addresses-src; }; shell = { packages = p: [p.cardano-cli p.cardano-ledger-core p.cardano-api p.ouroboros-consensus]; @@ -210,13 +236,18 @@ ... }: let cliExe = "${config.hsPkgs.cardano-cli.components.exes.cardano-cli}/bin/cardano-cli${pkgs.stdenv.hostPlatform.extensions.executable}"; - needsQemu = pkgs.stdenv.hostPlatform.isLinux + needsQemu = + pkgs.stdenv.hostPlatform.isLinux && pkgs.stdenv.hostPlatform != pkgs.stdenv.buildPlatform && pkgs.stdenv.hostPlatform.parsed.cpu.name != pkgs.stdenv.buildPlatform.parsed.cpu.name; qemuWrapped = pkgs.buildPackages.writeShellScript "cardano-cli-qemu" '' exec ${pkgs.buildPackages.qemu}/bin/qemu-${pkgs.stdenv.hostPlatform.qemuArch} ${cliExe} "$@" ''; - exportCliPath = "export CARDANO_CLI=${if needsQemu then qemuWrapped else cliExe}"; + exportCliPath = "export CARDANO_CLI=${ + if needsQemu + then qemuWrapped + else cliExe + }"; mainnetConfigFiles = [ "configuration/cardano/mainnet-config.yaml" "configuration/cardano/mainnet-config.json"