diff --git a/cabal.project b/cabal.project index 14aaca30e6..1cdead7a97 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-09-11T01:58:40Z + , hackage.haskell.org 2025-10-23T13:39:53Z , cardano-haskell-packages 2025-10-21T11:16:53Z packages: @@ -55,12 +55,6 @@ write-ghc-environment-files: always jobs: $ncpus semaphore: True -if impl (ghc >= 9.12) - allow-newer: - -- https://github.com/kapralVV/Unique/issues/11 - , Unique:hashable - - -- WASM compilation specific if arch(wasm32) @@ -175,4 +169,53 @@ if arch(wasm32) -- IMPORTANT -- Do NOT add more source-repository-package stanzas here unless they are strictly --- temporary! Please read the section in CONTRIBUTING about updating dependencies. \ No newline at end of file +-- temporary! Please read the section in CONTRIBUTING about updating dependencies. +source-repository-package + type: git + location: https://github.com/IntersectMBO/ouroboros-consensus + tag: 513d27d99b2486bf16d44a9f845ddb358244673f + --sha256: 0brlyrvhqxcpya6frx1w5bwbpz5bjjsvxm26951vf2lxah8rx8hp + 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: 1385b53cefb81e79553b6b0252537455833ea9c4 + --sha256: sha256-zZ7WsMfRs1fG16bmvI5vIh4fhQ8RGyEvYGLSWlrxpg0= + subdir: + ouroboros-network-api + ouroboros-network diff --git a/cardano-api/cardano-api.cabal b/cardano-api/cardano-api.cabal index c8e5a97f0d..e0c7634a7a 100644 --- a/cardano-api/cardano-api.cabal +++ b/cardano-api/cardano-api.cabal @@ -131,7 +131,7 @@ library cardano-ledger-binary >=1.6, cardano-ledger-byron >=1.2, cardano-ledger-conway >=1.19, - cardano-ledger-core >=1.17 && <1.19, + cardano-ledger-core >=1.17 && <1.20, cardano-ledger-dijkstra >=0.1, cardano-ledger-mary >=1.8, cardano-ledger-shelley >=1.16, @@ -169,8 +169,8 @@ library ouroboros-network-framework, ouroboros-network-protocols >=0.15, parsec, - plutus-core ^>=1.53, - plutus-ledger-api ^>=1.53, + plutus-core ^>=1.53.1, + plutus-ledger-api ^>=1.53.1, pretty-simple, prettyprinter, prettyprinter-ansi-terminal, @@ -311,7 +311,7 @@ library gen build-depends: FailT, - QuickCheck <2.16, + QuickCheck, aeson >=1.5.6.0, base16-bytestring, bytestring, @@ -352,7 +352,7 @@ test-suite cardano-api-test buildable: False build-depends: FailT, - QuickCheck <2.16, + QuickCheck, aeson >=1.5.6.0, base16-bytestring, bytestring, @@ -450,8 +450,8 @@ test-suite cardano-api-golden hedgehog >=1.1, hedgehog-extras ^>=0.10, microlens, - plutus-core ^>=1.53, - plutus-ledger-api ^>=1.53, + plutus-core ^>=1.53.1, + plutus-ledger-api ^>=1.53.1, tasty, tasty-discover, tasty-hedgehog, diff --git a/cardano-api/src/Cardano/Api/Era/Internal/Eon/AlonzoEraOnwards.hs b/cardano-api/src/Cardano/Api/Era/Internal/Eon/AlonzoEraOnwards.hs index d48f1fa643..484b1cd4fc 100644 --- a/cardano-api/src/Cardano/Api/Era/Internal/Eon/AlonzoEraOnwards.hs +++ b/cardano-api/src/Cardano/Api/Era/Internal/Eon/AlonzoEraOnwards.hs @@ -29,7 +29,6 @@ import Cardano.Binary import Cardano.Crypto.Hash.Blake2b qualified as Blake2b import Cardano.Crypto.Hash.Class qualified as C import Cardano.Crypto.VRF qualified as C -import Cardano.Ledger.Allegra.Scripts qualified as L import Cardano.Ledger.Alonzo.Plutus.Context qualified as Plutus import Cardano.Ledger.Alonzo.Scripts qualified as L import Cardano.Ledger.Alonzo.Tx qualified as L @@ -107,11 +106,9 @@ type AlonzoEraOnwardsConstraints era = , L.EraUTxO (ShelleyLedgerEra era) , L.HashAnnotated (L.TxBody (ShelleyLedgerEra era)) L.EraIndependentTxBody , L.MaryEraTxBody (ShelleyLedgerEra era) - , L.NativeScript (ShelleyLedgerEra era) ~ L.Timelock (ShelleyLedgerEra era) , Plutus.EraPlutusContext (ShelleyLedgerEra era) , L.Script (ShelleyLedgerEra era) ~ L.AlonzoScript (ShelleyLedgerEra era) , L.ScriptsNeeded (ShelleyLedgerEra era) ~ L.AlonzoScriptsNeeded (ShelleyLedgerEra era) - , L.ShelleyEraTxCert (ShelleyLedgerEra era) , L.Value (ShelleyLedgerEra era) ~ L.MaryValue , FromCBOR (Consensus.ChainDepState (ConsensusProtocol era)) , FromCBOR (DebugLedgerState era) @@ -131,7 +128,7 @@ alonzoEraOnwardsConstraints = \case AlonzoEraOnwardsAlonzo -> id AlonzoEraOnwardsBabbage -> id AlonzoEraOnwardsConway -> id - AlonzoEraOnwardsDijkstra -> const $ error "alonzoEraOnwardsConstraints: Dijkstra era not yet supported" + AlonzoEraOnwardsDijkstra -> id {-# DEPRECATED alonzoEraOnwardsToShelleyBasedEra "Use 'convert' instead." #-} alonzoEraOnwardsToShelleyBasedEra :: AlonzoEraOnwards era -> ShelleyBasedEra era diff --git a/cardano-api/src/Cardano/Api/Experimental/Era.hs b/cardano-api/src/Cardano/Api/Experimental/Era.hs index 8effb65f7d..c2199142d9 100644 --- a/cardano-api/src/Cardano/Api/Experimental/Era.hs +++ b/cardano-api/src/Cardano/Api/Experimental/Era.hs @@ -309,7 +309,6 @@ type EraCommonConstraints era = , L.EraTxOut (LedgerEra era) , L.EraUTxO (LedgerEra era) , FromCBOR (ChainDepState (ConsensusProtocol era)) - , L.NativeScript (LedgerEra era) ~ L.Timelock (LedgerEra era) , PraosProtocolSupportsNode (ConsensusProtocol era) , ShelleyLedgerEra era ~ LedgerEra era , ToJSON (ChainDepState (ConsensusProtocol era)) diff --git a/cardano-api/src/Cardano/Api/Experimental/Plutus/Internal/Shim/LegacyScripts.hs b/cardano-api/src/Cardano/Api/Experimental/Plutus/Internal/Shim/LegacyScripts.hs index 009a701f74..d0816ee016 100644 --- a/cardano-api/src/Cardano/Api/Experimental/Plutus/Internal/Shim/LegacyScripts.hs +++ b/cardano-api/src/Cardano/Api/Experimental/Plutus/Internal/Shim/LegacyScripts.hs @@ -37,6 +37,7 @@ import Cardano.Binary qualified as CBOR import Cardano.Ledger.Alonzo.Scripts qualified as L import Cardano.Ledger.BaseTypes (Version) import Cardano.Ledger.Core qualified as L +import Cardano.Ledger.Dijkstra.Scripts qualified as Dijkstra import Cardano.Ledger.Plutus.Language qualified as L import Data.Text qualified as Text @@ -96,7 +97,11 @@ convertToNewScriptWitness eon (Old.SimpleScriptWitness _ scriptOrRefInput) witne convertTotimelock :: AlonzoEraOnwards era -> Old.SimpleScript -> L.NativeScript (ShelleyLedgerEra era) -convertTotimelock eon s = alonzoEraOnwardsConstraints eon $ Old.toAllegraTimelock s +convertTotimelock eon s = alonzoEraOnwardsConstraints eon $ case eon of + AlonzoEraOnwardsAlonzo -> Old.toAllegraTimelock s + AlonzoEraOnwardsBabbage -> Old.toAllegraTimelock s + AlonzoEraOnwardsConway -> Old.toAllegraTimelock s + AlonzoEraOnwardsDijkstra -> Dijkstra.upgradeTimelock (Old.toAllegraTimelock s) createPlutusScriptDatum :: Witnessable thing era diff --git a/cardano-api/src/Cardano/Api/LedgerState.hs b/cardano-api/src/Cardano/Api/LedgerState.hs index 1c32a76e80..9612d3e633 100644 --- a/cardano-api/src/Cardano/Api/LedgerState.hs +++ b/cardano-api/src/Cardano/Api/LedgerState.hs @@ -10,6 +10,7 @@ {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeOperators #-} +{-# OPTIONS_GHC -Wno-x-ord-preserving-coercions #-} module Cardano.Api.LedgerState ( -- * Initialization / Accumulation @@ -207,6 +208,7 @@ import Ouroboros.Consensus.Shelley.HFEras qualified as Shelley import Ouroboros.Consensus.Shelley.Ledger.Block qualified as Shelley import Ouroboros.Consensus.Shelley.Ledger.Ledger qualified as Shelley import Ouroboros.Consensus.TypeFamilyWrappers (WrapLedgerEvent (WrapLedgerEvent)) +import Ouroboros.Consensus.Util (coerceMapKeys) import Ouroboros.Network.Block (blockNo) import Ouroboros.Network.Block qualified import Ouroboros.Network.Protocol.ChainSync.Client qualified as CS @@ -2285,7 +2287,7 @@ getLedgerTablesUTxOValues sbe tbs = -> Map TxIn (TxOut CtxUTxO era) ejectTables idx = let Consensus.LedgerTables (Ledger.ValuesMK values) = HFC.ejectLedgerTables idx tbs - in Map.mapKeys fromShelleyTxIn $ Map.map (fromShelleyTxOut sbe) values + in Map.mapKeys fromShelleyTxIn $ coerceMapKeys $ Map.map (fromShelleyTxOut sbe) values in case sbe of ShelleyBasedEraShelley -> ejectTables (IS IZ) diff --git a/cardano-api/src/Cardano/Api/Plutus/Internal/Script.hs b/cardano-api/src/Cardano/Api/Plutus/Internal/Script.hs index 8c30f37b44..9de29c612d 100644 --- a/cardano-api/src/Cardano/Api/Plutus/Internal/Script.hs +++ b/cardano-api/src/Cardano/Api/Plutus/Internal/Script.hs @@ -1242,7 +1242,7 @@ toShelleyScript (ScriptInEra langInEra (SimpleScript script)) = SimpleScriptInAlonzo -> Alonzo.NativeScript (toAllegraTimelock script) SimpleScriptInBabbage -> Alonzo.NativeScript (toAllegraTimelock script) SimpleScriptInConway -> Alonzo.NativeScript (toAllegraTimelock script) - SimpleScriptInDijkstra -> Alonzo.NativeScript (toAllegraTimelock script) + SimpleScriptInDijkstra -> Alonzo.NativeScript (Dijkstra.upgradeTimelock (toAllegraTimelock script)) toShelleyScript ( ScriptInEra langInEra diff --git a/flake.lock b/flake.lock index e3333b5f10..2e1fdf57ec 100644 --- a/flake.lock +++ b/flake.lock @@ -244,11 +244,11 @@ "hackageNix": { "flake": false, "locked": { - "lastModified": 1757556832, - "narHash": "sha256-wYDrrdoMjh0Zgmshm5YpM3b/n3U5I9cCw1790g9gKPM=", + "lastModified": 1761747429, + "narHash": "sha256-IiiJK9IDV176KId+hdcf02pDvQc4thp+1DFIFH64kdw=", "owner": "input-output-hk", "repo": "hackage.nix", - "rev": "42d89c223129ae35497ed4b4f3882071ccf8bef7", + "rev": "58e6659ae6f2ba5c0fc4e7e8a985c65d03eaf7aa", "type": "github" }, "original": {