diff --git a/cabal.project b/cabal.project index b2e5f12c4d0..90a628fbc50 100644 --- a/cabal.project +++ b/cabal.project @@ -13,14 +13,26 @@ 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-08-14T13:38:07Z - , cardano-haskell-packages 2026-08-25T16:32:51Z + , hackage.haskell.org 2026-09-02T20:56:27Z + , cardano-haskell-packages 2026-09-02T08:49:12Z constraints: -- haskell.nix patch does not work for 1.6.8 -- grapesy currently depends on crypton-x509-system (>=1.6 && <1.7) , any.crypton-x509-system < 1.6.8 || >= 1.7 + -- EXPERIMENT: force cardano-crypto-class up to the 2.6.x line (which + -- requires crypton ^>=1.1) to see how far the crypton >= 1.1 / memory -> + -- ram migration gets. Several local packages pin cardano-crypto-class + -- ^>=2.5, so their bound needs an allow-newer below too. + , any.cardano-crypto-class ^>=2.6 + + -- EXPERIMENT: cardano-crypto-1.2.0 (the version the solver reaches for + -- otherwise) still uses the old `memory` package for ByteArrayAccess, + -- which doesn't unify with crypton-1.1.4's `ram`-based Digest instances. + -- cardano-crypto-1.4.0 (already in CHaP) has switched to ram >=0.22. + , any.cardano-crypto >= 1.4 + -- haskell.nix tries to use 0.7.1.5 for some reason , any.proto-lens >= 0.7.1.7 -- https://github.com/channable/alfred-margaret/pull/76 @@ -84,6 +96,29 @@ allow-newer: , io-sim:time , io-classes:time + -- EXPERIMENT: these packages pin cardano-crypto-class to <2.6 (either + -- ^>=2.5 or an explicit >=x.y && <2.6); let them accept the 2.6.x line + -- so crypton can move to >= 1.1. (cardano-api's own bound is already + -- ^>=2.6 on the erikd/crypton+ram SRP, cardano-node/-chairman/ + -- cardano-submit-api/cardano-testnet's own bounds were widened to + -- ^>=2.5||^>=2.6 directly, and ouroboros-consensus's own bound is already + -- ^>=2.5||^>=2.6 on the erikd/ram SRP, so none of those need an entry + -- here.) + , cardano-cli:cardano-crypto-class + , cardano-ledger-binary:cardano-crypto-class + , cardano-ledger-core:cardano-crypto-class + , cardano-ledger-mary:cardano-crypto-class + , cardano-ledger-shelley:cardano-crypto-class + , cardano-protocol:cardano-crypto-class + , cardano-protocol-tpraos:cardano-crypto-class + , kes-agent:cardano-crypto-class + , kes-agent-crypto:cardano-crypto-class + + -- EXPERIMENT: cardano-cli (CHaP, unmodified) pins cardano-crypto-wrapper + -- ^>=1.7; let it accept the erikd/ram-based 1.8.0.0 SRP above. + -- (cardano-api's own bound is already ^>=1.7||^>=1.8, no entry needed.) + , cardano-cli:cardano-crypto-wrapper + -- cabal-allow-newer begin if impl(ghc >= 9.14) allow-newer: @@ -166,3 +201,65 @@ if impl(ghc >= 9.14) -- Do NOT add more source-repository-package stanzas here unless they are strictly -- temporary! Please read the section in CONTRIBUTING about updating dependencies. +-- cardano-ledger PR #5999 (erikd/ram): +-- https://github.com/IntersectMBO/cardano-ledger/pull/5999 +-- cardano-crypto-wrapper bumped to 1.8.0.0, crypton ^>=1.1, and +-- build-depends swapped from memory to ram (module names are identical +-- between the two packages, so no source-import changes were needed). +source-repository-package + type: git + location: https://github.com/IntersectMBO/cardano-ledger.git + tag: 661a7b853be392968ee7442799ee23bec6604c92 + subdir: eras/byron/crypto + +-- ouroboros-consensus PR #2213 (erikd/ram): +-- https://github.com/IntersectMBO/ouroboros-consensus/pull/2213 +-- based directly on the released ouroboros-consensus-4.1.0.0 tag (version +-- unchanged), plus a Byron backport and "Updates for crypton/memory/ram +-- changes", which widens its own cardano-crypto-class bound to +-- ^>=2.5||^>=2.6 natively (no more allow-newer needed for it). The .cabal +-- lives at the repo root (its own cabal.project says `packages: .`), so no +-- subdir is needed. +source-repository-package + type: git + location: https://github.com/IntersectMBO/ouroboros-consensus.git + tag: 6a0f887a9940a283b99f7b6c2a9efedc425b2e1c + +-- cardano-api PR #1292 (erikd/crypton+ram): +-- https://github.com/IntersectMBO/cardano-api/pull/1292 +-- now rebased onto ouroboros-consensus ^>=4.0||^>=4.1 / ouroboros-network +-- ^>=1.2 (matching what's resolved above), with cardano-crypto-class +-- ^>=2.6 and cardano-crypto-wrapper ^>=1.7||^>=1.8 accepted natively, and +-- no more `memory` dependency anywhere. +source-repository-package + type: git + location: https://github.com/IntersectMBO/cardano-api.git + tag: f0a61f6966ac94db41d81e00bc31a2e3ca2c9a0f + subdir: cardano-api + +-- cardano-api PR #1292 (erikd/crypton+ram): +-- https://github.com/IntersectMBO/cardano-api/pull/1292 +-- cardano-rpc lives in the same repo/commit as the cardano-api SRP above +-- and needs to move in lockstep with it -- CHaP's released +-- cardano-rpc-11.1.0.0 still depends on memory and also has an unrelated +-- API drift against this cardano-api's Cardano.Api.Consensus exports +-- (byronGenesis/byronProtocolParams/cardanoLedgerTransitionConfig), both +-- of which this PR's cardano-rpc has already been updated for. +source-repository-package + type: git + location: https://github.com/IntersectMBO/cardano-api.git + tag: f0a61f6966ac94db41d81e00bc31a2e3ca2c9a0f + subdir: cardano-rpc + +-- cardano-cli PR #1417 (erikd/crypton-ram): +-- https://github.com/IntersectMBO/cardano-cli/pull/1417 +-- now properly rebased onto the released cardano-cli-11.2.2.0 tag, plus one +-- commit adapting to unrelated upstream cardano-api API removals +-- (closed-range eon eliminators, Data.Validation's liftError). Still pins +-- cardano-crypto-class ^>=2.5 and cardano-crypto-wrapper ^>=1.7 natively +-- (unchanged), so the existing allow-newer entries for those still apply. +source-repository-package + type: git + location: https://github.com/IntersectMBO/cardano-cli.git + tag: 5ebc9398ce86226344153f24194cf954929e1150 + subdir: cardano-cli diff --git a/cardano-node-chairman/cardano-node-chairman.cabal b/cardano-node-chairman/cardano-node-chairman.cabal index ad7d2db8659..72a2ae91d89 100644 --- a/cardano-node-chairman/cardano-node-chairman.cabal +++ b/cardano-node-chairman/cardano-node-chairman.cabal @@ -67,7 +67,7 @@ test-suite chairman-tests build-depends: , cardano-api , cardano-testnet - , cardano-crypto-class ^>=2.5 + , cardano-crypto-class ^>=2.5 || ^>=2.6 , data-default-class , filepath , hedgehog diff --git a/cardano-node/cardano-node.cabal b/cardano-node/cardano-node.cabal index f50385340cc..6ae87d2bd8e 100644 --- a/cardano-node/cardano-node.cabal +++ b/cardano-node/cardano-node.cabal @@ -135,7 +135,7 @@ library , bytestring , cardano-api ^>= 11.6 , cardano-data - , cardano-crypto-class ^>=2.5 + , cardano-crypto-class ^>=2.5 || ^>=2.6 , cardano-crypto-wrapper , cardano-git-rev ^>=0.2.2 , cardano-ledger-alonzo @@ -176,7 +176,7 @@ library , network-mux >= 0.8 , nothunks , optparse-applicative - , ouroboros-consensus:{ouroboros-consensus, lsm, cardano, diffusion, protocol} ^>= 4.1 + , ouroboros-consensus:{ouroboros-consensus, lsm, cardano, diffusion, protocol} ^>= 4.1 || ^>= 4.2 , ouroboros-network:{api, ouroboros-network, orphan-instances, framework, protocols, tracing} ^>= 1.2 , cardano-diffusion:{api, cardano-diffusion, tracing, orphan-instances} ^>=1.1.1 , prettyprinter diff --git a/cardano-submit-api/cardano-submit-api.cabal b/cardano-submit-api/cardano-submit-api.cabal index 72a8278e1ec..2e4d602917b 100644 --- a/cardano-submit-api/cardano-submit-api.cabal +++ b/cardano-submit-api/cardano-submit-api.cabal @@ -42,7 +42,7 @@ library , cardano-api ^>= 11.6 , cardano-binary , cardano-cli ^>= 11.2.2 - , cardano-crypto-class ^>=2.5 + , cardano-crypto-class ^>=2.5 || ^>=2.6 , containers , ekg-core , http-media @@ -99,4 +99,4 @@ test-suite unit main-is: test.hs hs-source-dirs: test build-depends: base - , cardano-crypto-class ^>=2.5 + , cardano-crypto-class ^>=2.5 || ^>=2.6 diff --git a/cardano-testnet/cardano-testnet.cabal b/cardano-testnet/cardano-testnet.cabal index 3b6f4836e67..e4ced4007d8 100644 --- a/cardano-testnet/cardano-testnet.cabal +++ b/cardano-testnet/cardano-testnet.cabal @@ -43,7 +43,7 @@ library , bytestring , cardano-api ^>= 11.6 , cardano-cli:{cardano-cli, cardano-cli-test-lib} ^>= 11.2.2 - , cardano-crypto-class ^>=2.5 + , cardano-crypto-class ^>=2.5 || ^>=2.6 , cardano-crypto-wrapper , cardano-git-rev ^>= 0.2.2 , cardano-ledger-alonzo @@ -154,7 +154,7 @@ executable cardano-testnet main-is: cardano-testnet.hs - build-depends: cardano-crypto-class ^>=2.5 + build-depends: cardano-crypto-class ^>=2.5 || ^>=2.6 , cardano-cli , cardano-testnet , optparse-applicative-fork diff --git a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Rpc/FetchBlock.hs b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Rpc/FetchBlock.hs index ca8d385c8ba..82aef741aa2 100644 --- a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Rpc/FetchBlock.hs +++ b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Rpc/FetchBlock.hs @@ -98,12 +98,14 @@ hprop_rpc_fetch_block = integrationRetryWorkspace 2 "rpc-fetch-block" $ \tempAbs -- Call FetchBlock via gRPC let blockRef = def & U5c.slot .~ slot & U5c.hash .~ tipHash - request = def & U5c.ref .~ blockRef + request = def & U5c.ref .~ [blockRef] response <- H.evalIO . Rpc.withConnection def rpcServer $ \conn -> Rpc.nonStreaming conn (Rpc.rpc @(Rpc.Protobuf U5c.SyncService "fetchBlock")) request - let block = response ^. U5c.block + block <- case response ^. U5c.block of + [b] -> pure b + _ -> H.failure -- Verify nativeBytes is non-empty let rawBytes = block ^. U5c.nativeBytes @@ -147,11 +149,11 @@ hprop_rpc_fetch_block = integrationRetryWorkspace 2 "rpc-fetch-block" $ \tempAbs H.note_ "FetchBlock with an unknown block hash fails with NOT_FOUND" fetchBlockExpectingError GrpcNotFound $ - def & U5c.slot .~ slot & U5c.hash .~ BS.replicate 32 0xab + [def & U5c.slot .~ slot & U5c.hash .~ BS.replicate 32 0xab] H.note_ "FetchBlock with an invalid hash length fails with INVALID_ARGUMENT" fetchBlockExpectingError GrpcInvalidArgument $ - def & U5c.slot .~ slot & U5c.hash .~ "abc" + [def & U5c.slot .~ slot & U5c.hash .~ "abc"] H.note_ "ReadTip returns the current tip" readTipResponse <- H.evalIO . Rpc.withConnection def rpcServer $ \conn -> @@ -252,11 +254,15 @@ hprop_rpc_fetch_block = integrationRetryWorkspace 2 "rpc-fetch-block" $ \tempAbs H.note_ "Fetch the block containing the submitted transaction and verify its transactions" let txBlockRef = def & U5c.slot .~ txBlockSlot & U5c.hash .~ txBlockHash - txBlockRequest = def & U5c.ref .~ txBlockRef + txBlockRequest = def & U5c.ref .~ [txBlockRef] txBlockResponse <- H.evalIO . Rpc.withConnection def rpcServer $ \conn -> Rpc.nonStreaming conn (Rpc.rpc @(Rpc.Protobuf U5c.SyncService "fetchBlock")) txBlockRequest - let fetchedTxs = txBlockResponse ^. U5c.block . U5c.cardano . U5c.body . U5c.tx + txBlock <- case txBlockResponse ^. U5c.block of + [b] -> pure b + _ -> H.failure + + let fetchedTxs = txBlock ^. U5c.cardano . U5c.body . U5c.tx H.note_ "Ensure the fetched block contains all transactions of the block" length fetchedTxs H.=== txBlockTxCount @@ -383,11 +389,15 @@ hprop_rpc_fetch_block = integrationRetryWorkspace 2 "rpc-fetch-block" $ \tempAbs H.note_ "Fetch the block containing the minting transaction and verify the minted assets" let mintBlockRef = def & U5c.slot .~ mintBlockSlot & U5c.hash .~ mintBlockHash - mintBlockRequest = def & U5c.ref .~ mintBlockRef + mintBlockRequest = def & U5c.ref .~ [mintBlockRef] mintBlockResponse <- H.evalIO . Rpc.withConnection def rpcServer $ \conn -> Rpc.nonStreaming conn (Rpc.rpc @(Rpc.Protobuf U5c.SyncService "fetchBlock")) mintBlockRequest - let mintFetchedTxs = mintBlockResponse ^. U5c.block . U5c.cardano . U5c.body . U5c.tx + mintBlock <- case mintBlockResponse ^. U5c.block of + [b] -> pure b + _ -> H.failure + + let mintFetchedTxs = mintBlock ^. U5c.cardano . U5c.body . U5c.tx H.note_ "Ensure the fetched block contains all transactions of the block" length mintFetchedTxs H.=== mintBlockTxCount