From 9bed9ca66fb4d0d7854e748c681d842bac202051 Mon Sep 17 00:00:00 2001 From: Javier Sagredo Date: Fri, 24 Oct 2025 14:11:04 +0200 Subject: [PATCH] Update to LSM --- cabal.project | 65 +++++++++++++++++-- .../CLI/EraBased/Script/Certificate/Read.hs | 6 +- flake.lock | 6 +- 3 files changed, 66 insertions(+), 11 deletions(-) diff --git a/cabal.project b/cabal.project index d4f940f150..c7eb6742da 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 2025-11-05T09:40:54Z + , hackage.haskell.org 2025-12-03T15:53:31Z , cardano-haskell-packages 2025-11-24T10:27:41Z packages: @@ -58,11 +58,64 @@ semaphore: True -- Always write GHC env files, because they are needed for ghci. write-ghc-environment-files: always -if impl (ghc >= 9.12) - allow-newer: - -- https://github.com/kapralVV/Unique/issues/11 - , Unique:hashable - -- IMPORTANT -- Do NOT add more source-repository-package stanzas here unless they are strictly -- temporary! Please read the section in CONTRIBUTING about updating dependencies. + +source-repository-package + type: git + location: https://github.com/IntersectMBO/cardano-api + tag: 3d33855a5af6c6f2bb37b0c417f1ceb474ae079f + --sha256: sha256-zsEu8ZxF5/fLgokv/4kkII3j8/JbCvrnsHDueQyI6xI= + subdir: + cardano-api + +source-repository-package + type: git + location: https://github.com/IntersectMBO/ouroboros-consensus + tag: baf4ebbd924433543f8c5142b370b1061ac2e7bb + --sha256: sha256-dCNFxrLF7MPqNRc9aIwl2AZpjHqw9dGerTudo7GQzao= + subdir: + ouroboros-consensus + ouroboros-consensus-cardano + ouroboros-consensus-diffusion + +source-repository-package + type: git + location: https://github.com/IntersectMBO/cardano-ledger + tag: fb09078fa55015c881303a2ddb609c024cec258f + --sha256: sha256-9Y9CRiyMn0AWD+C4aNVMaJgrj3FDAYfCX4VrLvtoMaI= + subdir: + eras/allegra/impl + eras/alonzo/impl + eras/alonzo/test-suite + eras/babbage/impl + eras/conway/impl + eras/dijkstra/impl + eras/mary/impl + eras/shelley/impl + eras/shelley/test-suite + eras/shelley-ma/test-suite + libs/cardano-ledger-api + libs/cardano-ledger-core + libs/cardano-ledger-binary + libs/cardano-protocol-tpraos + libs/non-integral + libs/small-steps + libs/cardano-data + libs/set-algebra + libs/vector-map + eras/byron/chain/executable-spec + eras/byron/ledger/executable-spec + eras/byron/ledger/impl + eras/byron/crypto + +-- Backported version of https://github.com/IntersectMBO/ouroboros-network/pull/5161 +source-repository-package + type: git + location: https://github.com/IntersectMBO/ouroboros-network + tag: dfcb1f9c578ec8cd5114fea9696e7be6c9001323 + --sha256: sha256-omXPdi/T/f3gq9rOH20zX+x3WvaxlB704g07RF/13Nk= + subdir: + ouroboros-network-api + ouroboros-network diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Script/Certificate/Read.hs b/cardano-cli/src/Cardano/CLI/EraBased/Script/Certificate/Read.hs index b8061e3391..04dc3e9416 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Script/Certificate/Read.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Script/Certificate/Read.hs @@ -26,6 +26,7 @@ import Cardano.CLI.Orphan () import Cardano.CLI.Read import Cardano.CLI.Type.Common (CertificateFile) import Cardano.Ledger.Core qualified as L +import Cardano.Ledger.Dijkstra.Scripts qualified as Dijkstra import Cardano.Ledger.Plutus.Language qualified as L import Cardano.Ledger.Plutus.Language qualified as Plutus @@ -125,8 +126,9 @@ convertTotimelock -> Api.Script Api.SimpleScript' -> SimpleScript (LedgerEra era) convertTotimelock era (Api.SimpleScript s) = - let native :: L.NativeScript (LedgerEra era) = obtainCommonConstraints era $ Api.toAllegraTimelock s - in obtainCommonConstraints era $ SimpleScript native + obtainCommonConstraints era $ case era of + ConwayEra -> SimpleScript $ Api.toAllegraTimelock @(LedgerEra ConwayEra) s + DijkstraEra -> SimpleScript $ Dijkstra.upgradeTimelock $ Api.toAllegraTimelock @(LedgerEra ConwayEra) s readCertificateScriptWitnesses :: IsEra era diff --git a/flake.lock b/flake.lock index fa2a54fb4e..be0a3b2a12 100644 --- a/flake.lock +++ b/flake.lock @@ -226,11 +226,11 @@ "hackageNix": { "flake": false, "locked": { - "lastModified": 1762335884, - "narHash": "sha256-wFZpsYUWC5yJiUmTd8DxvoPeI54g3WI/5ABg8+V1seI=", + "lastModified": 1764932461, + "narHash": "sha256-+aMywxHRjMT6UySqNRuE3Q/LGENW2j8E+PDGS5s+Xl8=", "owner": "input-output-hk", "repo": "hackage.nix", - "rev": "360cc2f68f50eb0d48adab0e08f702dd606f9e82", + "rev": "f964c738b8ff95bdd2f30364b39fd360de9f7ba1", "type": "github" }, "original": {