diff --git a/CHANGELOG.md b/CHANGELOG.md index bed2daef510..ecfb40bf62d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 As a minor extension, we also keep a semantic version for the `UNRELEASED` changes. -## Unreleased +## [0.20.0] - UNRELEASED - **IMPORTANT - Do not release this version** - Incremental commits - off-chain changes to make the incremental commits possible. @@ -23,6 +23,11 @@ changes. - Tested with `cardano-node 9.2.0` and `cardano-cli 9.4.1.0`. +- **BREAKING** Rewrite of the commit script in aiken: + - This makes `abort` and `collectCom` transactions more efficient and results + in a new maximum number of head participants being `8`. + - Changes script hashes in `hydra-plutus` + ## [0.19.0] - 2024-09-13 - Tested with `cardano-node 9.1.1` and `cardano-cli 9.2.1.0` diff --git a/flake.lock b/flake.lock index 1e1c8200078..55053db335f 100644 --- a/flake.lock +++ b/flake.lock @@ -66,6 +66,26 @@ "type": "github" } }, + "aiken": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs", + "rust-overlay": "rust-overlay" + }, + "locked": { + "lastModified": 1727863681, + "narHash": "sha256-lzSItBMYcZ7Q92+u/8XFoFgwslfkUBf8RqsunrIoruQ=", + "owner": "aiken-lang", + "repo": "aiken", + "rev": "c7ae161a39c29656938ce1c8d4f674e387980022", + "type": "github" + }, + "original": { + "owner": "aiken-lang", + "repo": "aiken", + "type": "github" + } + }, "blank": { "locked": { "lastModified": 1625557891, @@ -249,7 +269,7 @@ }, "cardano-automation": { "inputs": { - "flake-utils": "flake-utils", + "flake-utils": "flake-utils_2", "haskellNix": [ "cardano-node", "haskellNix" @@ -276,7 +296,7 @@ }, "cardano-mainnet-mirror": { "inputs": { - "nixpkgs": "nixpkgs_4" + "nixpkgs": "nixpkgs_6" }, "locked": { "lastModified": 1642701714, @@ -650,6 +670,24 @@ } }, "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1689068808, + "narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { "locked": { "lastModified": 1667395993, "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", @@ -664,7 +702,7 @@ "type": "github" } }, - "flake-utils_2": { + "flake-utils_3": { "locked": { "lastModified": 1653893745, "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", @@ -679,7 +717,7 @@ "type": "github" } }, - "flake-utils_3": { + "flake-utils_4": { "locked": { "lastModified": 1659877975, "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", @@ -694,7 +732,7 @@ "type": "github" } }, - "flake-utils_4": { + "flake-utils_5": { "locked": { "lastModified": 1653893745, "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", @@ -709,7 +747,7 @@ "type": "github" } }, - "flake-utils_5": { + "flake-utils_6": { "locked": { "lastModified": 1644229661, "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", @@ -813,7 +851,7 @@ }, "gomod2nix": { "inputs": { - "nixpkgs": "nixpkgs", + "nixpkgs": "nixpkgs_3", "utils": "utils" }, "locked": { @@ -1411,7 +1449,7 @@ "inputs": { "flake-parts": "flake-parts_2", "formal-ledger": "formal-ledger", - "nixpkgs": "nixpkgs_8" + "nixpkgs": "nixpkgs_10" }, "locked": { "lastModified": 1725260503, @@ -1475,7 +1513,7 @@ "iohk-nix": { "inputs": { "blst": "blst_2", - "nixpkgs": "nixpkgs_9", + "nixpkgs": "nixpkgs_11", "secp256k1": "secp256k1_2", "sodium": "sodium_2" }, @@ -1568,7 +1606,7 @@ }, "lint-utils": { "inputs": { - "flake-utils": "flake-utils_5", + "flake-utils": "flake-utils_6", "nixpkgs": [ "haskellNix", "nixpkgs" @@ -1640,7 +1678,7 @@ "inputs": { "crane": "crane", "flake-parts": "flake-parts_3", - "nixpkgs": "nixpkgs_10", + "nixpkgs": "nixpkgs_12", "treefmt-nix": "treefmt-nix" }, "locked": { @@ -1660,7 +1698,7 @@ }, "n2c": { "inputs": { - "flake-utils": "flake-utils_4", + "flake-utils": "flake-utils_5", "nixpkgs": [ "cardano-node", "cardano-automation", @@ -1686,7 +1724,7 @@ "nix": { "inputs": { "lowdown-src": "lowdown-src", - "nixpkgs": "nixpkgs_5", + "nixpkgs": "nixpkgs_7", "nixpkgs-regression": "nixpkgs-regression" }, "locked": { @@ -1744,7 +1782,7 @@ }, "nix-npm-buildpackage": { "inputs": { - "nixpkgs": "nixpkgs_11" + "nixpkgs": "nixpkgs_13" }, "locked": { "lastModified": 1686315622, @@ -1762,8 +1800,8 @@ }, "nix2container": { "inputs": { - "flake-utils": "flake-utils_2", - "nixpkgs": "nixpkgs_2" + "flake-utils": "flake-utils_3", + "nixpkgs": "nixpkgs_4" }, "locked": { "lastModified": 1658567952, @@ -1782,7 +1820,7 @@ "nix_2": { "inputs": { "lowdown-src": "lowdown-src_2", - "nixpkgs": "nixpkgs_7", + "nixpkgs": "nixpkgs_9", "nixpkgs-regression": "nixpkgs-regression_2" }, "locked": { @@ -1840,15 +1878,15 @@ }, "nixpkgs": { "locked": { - "lastModified": 1653581809, - "narHash": "sha256-Uvka0V5MTGbeOfWte25+tfRL3moECDh1VwokWSZUdoY=", - "owner": "NixOS", + "lastModified": 1725103162, + "narHash": "sha256-Ym04C5+qovuQDYL/rKWSR+WESseQBbNAe5DsXNx5trY=", + "owner": "nixos", "repo": "nixpkgs", - "rev": "83658b28fe638a170a19b8933aa008b30640fbd1", + "rev": "12228ff1752d7b7624a54e9c1af4b222b3c1073b", "type": "github" }, "original": { - "owner": "NixOS", + "owner": "nixos", "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" @@ -2211,6 +2249,37 @@ } }, "nixpkgs_10": { + "locked": { + "lastModified": 1718717814, + "narHash": "sha256-xB7AzKY4BP7yypo6g+sk1tnVK54sBIJMeEBB5CdbhT4=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "88af533d8ae8d1e7e4648decf7817ebff91abf56", + "type": "github" + }, + "original": { + "owner": "nixos", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_11": { + "locked": { + "lastModified": 1684171562, + "narHash": "sha256-BMUWjVWAUdyMWKk0ATMC9H0Bv4qAV/TXwwPUvTiC5IQ=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "55af203d468a6f5032a519cba4f41acf5a74b638", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "release-22.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_12": { "locked": { "lastModified": 1725816686, "narHash": "sha256-0Kq2MkQ/sQX1rhWJ/ySBBQlBJBUK8mPMDcuDhhdBkSU=", @@ -2226,7 +2295,7 @@ "type": "github" } }, - "nixpkgs_11": { + "nixpkgs_13": { "locked": { "lastModified": 1653917367, "narHash": "sha256-04MsJC0g9kE01nBuXThMppZK+yvCZECQnUaZKSU+HJo=", @@ -2241,6 +2310,38 @@ } }, "nixpkgs_2": { + "locked": { + "lastModified": 1718428119, + "narHash": "sha256-WdWDpNaq6u1IPtxtYHHWpl5BmabtpmLnMAx0RdJ/vo8=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e6cea36f83499eb4e9cd184c8a8e823296b50ad5", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1653581809, + "narHash": "sha256-Uvka0V5MTGbeOfWte25+tfRL3moECDh1VwokWSZUdoY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "83658b28fe638a170a19b8933aa008b30640fbd1", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { "locked": { "lastModified": 1654807842, "narHash": "sha256-ADymZpr6LuTEBXcy6RtFHcUZdjKTBRTMYwu19WOx17E=", @@ -2255,7 +2356,7 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_5": { "locked": { "lastModified": 1665087388, "narHash": "sha256-FZFPuW9NWHJteATOf79rZfwfRn5fE0wi9kRzvGfDHPA=", @@ -2271,7 +2372,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_6": { "locked": { "lastModified": 1642336556, "narHash": "sha256-QSPPbFEwy0T0DrIuSzAACkaANPQaR1lZR/nHZGz9z04=", @@ -2285,7 +2386,7 @@ "type": "indirect" } }, - "nixpkgs_5": { + "nixpkgs_7": { "locked": { "lastModified": 1657693803, "narHash": "sha256-G++2CJ9u0E7NNTAi9n5G8TdDmGJXcIjkJ3NF8cetQB8=", @@ -2301,7 +2402,7 @@ "type": "github" } }, - "nixpkgs_6": { + "nixpkgs_8": { "locked": { "lastModified": 1708343346, "narHash": "sha256-qlzHvterVRzS8fS0ophQpkh0rqw0abijHEOAKm0HmV0=", @@ -2317,7 +2418,7 @@ "type": "github" } }, - "nixpkgs_7": { + "nixpkgs_9": { "locked": { "lastModified": 1657693803, "narHash": "sha256-G++2CJ9u0E7NNTAi9n5G8TdDmGJXcIjkJ3NF8cetQB8=", @@ -2333,37 +2434,6 @@ "type": "github" } }, - "nixpkgs_8": { - "locked": { - "lastModified": 1718717814, - "narHash": "sha256-xB7AzKY4BP7yypo6g+sk1tnVK54sBIJMeEBB5CdbhT4=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "88af533d8ae8d1e7e4648decf7817ebff91abf56", - "type": "github" - }, - "original": { - "owner": "nixos", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_9": { - "locked": { - "lastModified": 1684171562, - "narHash": "sha256-BMUWjVWAUdyMWKk0ATMC9H0Bv4qAV/TXwwPUvTiC5IQ=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "55af203d468a6f5032a519cba4f41acf5a74b638", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "release-22.11", - "repo": "nixpkgs", - "type": "github" - } - }, "nosys": { "locked": { "lastModified": 1668010795, @@ -2494,6 +2564,7 @@ "root": { "inputs": { "CHaP": "CHaP", + "aiken": "aiken", "cardano-node": "cardano-node", "flake-parts": "flake-parts", "haskellNix": "haskellNix_2", @@ -2511,6 +2582,24 @@ "process-compose-flake": "process-compose-flake" } }, + "rust-overlay": { + "inputs": { + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1725330199, + "narHash": "sha256-oUkdPJIxP3r3YyVOBLkDVLIJiQV9YlrVqA+jNcdpCvM=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "a562172c72d00350f9f2ff830e6515b6e7bee6d5", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, "secp256k1": { "flake": false, "locked": { @@ -2616,7 +2705,7 @@ "blank": "blank", "devshell": "devshell", "dmerge": "dmerge", - "flake-utils": "flake-utils_3", + "flake-utils": "flake-utils_4", "makes": [ "cardano-node", "cardano-automation", @@ -2634,7 +2723,7 @@ ], "n2c": "n2c", "nixago": "nixago", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_5", "yants": "yants" }, "locked": { @@ -2688,7 +2777,7 @@ "std", "blank" ], - "nixpkgs": "nixpkgs_6", + "nixpkgs": "nixpkgs_8", "paisano": "paisano", "paisano-tui": "paisano-tui", "terranix": [ @@ -2727,6 +2816,21 @@ "type": "github" } }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "treefmt-nix": { "inputs": { "nixpkgs": [ @@ -2790,7 +2894,7 @@ }, "utils_2": { "inputs": { - "systems": "systems" + "systems": "systems_2" }, "locked": { "lastModified": 1710146030, diff --git a/flake.nix b/flake.nix index b874b02d248..596a53ceb5a 100644 --- a/flake.nix +++ b/flake.nix @@ -15,6 +15,7 @@ url = "github:IntersectMBO/cardano-haskell-packages?ref=repo"; flake = false; }; + aiken.url = "github:aiken-lang/aiken"; hls = { url = "github:haskell/haskell-language-server"; flake = false; @@ -70,6 +71,7 @@ inputs.nix-npm-buildpackage.overlays.default # Specific versions of tools we require (final: prev: { + aiken = inputs.aiken.packages.${system}.aiken; apply-refact = pkgs.haskell-nix.tool compiler "apply-refact" "0.14.0.0"; cabal-fmt = pkgs.haskell-nix.tool compiler "cabal-fmt" "0.1.12"; cabal-install = pkgs.haskell-nix.cabal-install.${compiler}; @@ -168,6 +170,7 @@ ]); devShells = import ./nix/hydra/shell.nix { + inherit (inputs) aiken; inherit inputs pkgs hsPkgs system pkgsLatest; ghc = pkgs.buildPackages.haskell-nix.compiler.${compiler}; }; diff --git a/hydra-cardano-api/hydra-cardano-api.cabal b/hydra-cardano-api/hydra-cardano-api.cabal index c844e1b68bd..04e94a7c733 100644 --- a/hydra-cardano-api/hydra-cardano-api.cabal +++ b/hydra-cardano-api/hydra-cardano-api.cabal @@ -81,7 +81,7 @@ library , base >=4.16 , base16-bytestring , bytestring - , cardano-api ^>=9.1 + , cardano-api ^>=9.3 , cardano-binary , cardano-crypto-class , cardano-ledger-allegra diff --git a/hydra-cardano-api/src/Hydra/Cardano/Api.hs b/hydra-cardano-api/src/Hydra/Cardano/Api.hs index 85bb4ab52f1..f6a3136d150 100644 --- a/hydra-cardano-api/src/Hydra/Cardano/Api.hs +++ b/hydra-cardano-api/src/Hydra/Cardano/Api.hs @@ -86,6 +86,7 @@ import Cardano.Api as X hiding ( import Cardano.Api.Byron as X ( Address (..), ) +import Cardano.Api.Experimental as X (UnsignedTx (..)) import Cardano.Api.Ledger as X ( PParams, ) @@ -205,7 +206,7 @@ pattern ShelleyAddressInAnyEra <- type BalancedTxBody = Cardano.Api.BalancedTxBody Era {-# COMPLETE BalancedTxBody #-} -pattern BalancedTxBody :: TxBodyContent BuildTx -> TxBody -> TxOut CtxTx -> Coin -> BalancedTxBody +pattern BalancedTxBody :: TxBodyContent BuildTx -> UnsignedTx Era -> TxOut CtxTx -> Coin -> BalancedTxBody pattern BalancedTxBody{balancedTxBodyContent, balancedTxBody, balancedTxChangeOutput, balancedTxFee} <- Cardano.Api.BalancedTxBody balancedTxBodyContent balancedTxBody balancedTxChangeOutput balancedTxFee where @@ -373,7 +374,7 @@ pattern TxBody{txBodyContent} <- {-# COMPLETE TxBody #-} createAndValidateTransactionBody :: TxBodyContent BuildTx -> Either TxBodyError TxBody -createAndValidateTransactionBody = Cardano.Api.createAndValidateTransactionBody shelleyBasedEra +createAndValidateTransactionBody = Cardano.Api.createTransactionBody shelleyBasedEra defaultTxBodyContent :: TxBodyContent BuildTx defaultTxBodyContent = Cardano.Api.defaultTxBodyContent shelleyBasedEra @@ -386,7 +387,7 @@ type TxBodyContent buidl = Cardano.Api.TxBodyContent buidl Era pattern TxBodyContent :: TxIns buidl -> TxInsCollateral -> - TxInsReference buidl -> + TxInsReference -> [TxOut CtxTx] -> TxTotalCollateral Era -> TxReturnCollateral CtxTx Era -> @@ -404,7 +405,7 @@ pattern TxBodyContent :: TxScriptValidity -> Maybe (Featured ConwayEraOnwards Era (TxProposalProcedures buidl Era)) -> Maybe (Featured ConwayEraOnwards Era (TxVotingProcedures buidl Era)) -> - Maybe (Featured ConwayEraOnwards Era Coin) -> + Maybe (Featured ConwayEraOnwards Era (Maybe Coin)) -> Maybe (Featured ConwayEraOnwards Era Coin) -> TxBodyContent buidl pattern TxBodyContent @@ -515,17 +516,17 @@ type TxIns buidl = [(TxIn, BuildTxWith buidl (Cardano.Api.Witness WitCtxTxIn Era -- ** TxInsReference -type TxInsReference buidl = Cardano.Api.TxInsReference buidl Era +type TxInsReference = Cardano.Api.TxInsReference Era {-# COMPLETE TxInsReferenceNone, TxInsReference #-} -pattern TxInsReferenceNone :: TxInsReference buidl +pattern TxInsReferenceNone :: TxInsReference pattern TxInsReferenceNone <- Cardano.Api.TxInsReferenceNone where TxInsReferenceNone = Cardano.Api.TxInsReferenceNone -pattern TxInsReference :: [TxIn] -> TxInsReference buidl +pattern TxInsReference :: [TxIn] -> TxInsReference pattern TxInsReference{txInsReference'} <- Cardano.Api.TxInsReference _ txInsReference' where diff --git a/hydra-cardano-api/src/Hydra/Cardano/Api/Pretty.hs b/hydra-cardano-api/src/Hydra/Cardano/Api/Pretty.hs index aa3e081f5a7..53cb6ad7ca5 100644 --- a/hydra-cardano-api/src/Hydra/Cardano/Api/Pretty.hs +++ b/hydra-cardano-api/src/Hydra/Cardano/Api/Pretty.hs @@ -16,6 +16,7 @@ import Data.Function (on) import Data.List (intercalate, sort, sortBy) import Data.Map.Strict qualified as Map import Data.Text qualified as T +import GHC.IsList (IsList (..)) import Hydra.Cardano.Api.ScriptData (fromLedgerData) -- | Obtain a human-readable pretty text representation of a transaction. @@ -76,6 +77,7 @@ renderTxWithUTxO utxo (Tx body _wits) = <> ("\n " <> prettyAddr (Api.txOutAddress o)) <> ("\n " <> prettyValue 1 (Api.txOutValue o)) <> ("\n " <> prettyDatumUtxo (Api.txOutDatum o)) + <> ("\n " <> prettyReferenceScript (Api.txOutReferenceScript o)) outputLines = [ "== OUTPUTS (" <> show (length outs) <> ")" @@ -96,7 +98,7 @@ renderTxWithUTxO utxo (Tx body _wits) = totalNumberOfAssets = let totalValue = foldMap Api.txOutValue outs - in length $ valueToList totalValue + in length $ toList totalValue validityLines = [ "== VALIDITY" @@ -124,6 +126,12 @@ renderTxWithUTxO utxo (Tx body _wits) = "TxOutDatumInline " <> prettyScriptData scriptData _ -> error "absurd" + prettyReferenceScript = \case + Api.ReferenceScriptNone -> + "ReferenceScriptNone" + (Api.ReferenceScript (Api.ScriptInAnyLang l s)) -> + "ReferenceScript " <> show l <> " " <> show (serialiseToRawBytesHexText (hashScript s)) + prettyDatumCtx = \case Api.TxOutDatumNone -> "TxOutDatumNone" diff --git a/hydra-cardano-api/src/Hydra/Cardano/Api/ReferenceScript.hs b/hydra-cardano-api/src/Hydra/Cardano/Api/ReferenceScript.hs index e856aad7d33..62da0c28a00 100644 --- a/hydra-cardano-api/src/Hydra/Cardano/Api/ReferenceScript.hs +++ b/hydra-cardano-api/src/Hydra/Cardano/Api/ReferenceScript.hs @@ -14,3 +14,11 @@ mkScriptRef = . toScriptInAnyLang . PlutusScript PlutusScriptV2 . fromPlutusScript + +-- | Construct a PlutusV3 'ReferenceScript' from any given Plutus script. +mkScriptRefV3 :: Plutus.SerialisedScript -> ReferenceScript Era +mkScriptRefV3 = + ReferenceScript babbageBasedEra + . toScriptInAnyLang + . PlutusScript PlutusScriptV3 + . fromPlutusScript diff --git a/hydra-cardano-api/src/Hydra/Cardano/Api/Value.hs b/hydra-cardano-api/src/Hydra/Cardano/Api/Value.hs index c1e03eac4d5..e5adf0f93ee 100644 --- a/hydra-cardano-api/src/Hydra/Cardano/Api/Value.hs +++ b/hydra-cardano-api/src/Hydra/Cardano/Api/Value.hs @@ -7,6 +7,7 @@ import Cardano.Ledger.Alonzo.Plutus.TxInfo qualified as Ledger import Cardano.Ledger.Core (getMinCoinTxOut) import Cardano.Ledger.Mary.Value qualified as Ledger import Data.Word (Word64) +import GHC.IsList (IsList (..)) import Hydra.Cardano.Api.CtxUTxO (ToUTxOContext (..)) import Hydra.Cardano.Api.PolicyId (fromPlutusCurrencySymbol) import PlutusLedgerApi.V1.Value (flattenValue) @@ -47,7 +48,7 @@ minUTxOValue pparams (TxOut addr val dat ref) = -- | Count number of assets in a 'Value'. valueSize :: Value -> Int -valueSize = length . valueToList +valueSize = length . toList -- | Access minted assets of a transaction, as an ordered association list. txMintAssets :: Tx era -> [(AssetId, Quantity)] @@ -56,7 +57,7 @@ txMintAssets = where asList = \case TxMintNone -> [] - TxMintValue _ val _ -> valueToList val + TxMintValue _ val _ -> toList val -- * Type Conversions @@ -80,7 +81,7 @@ toLedgerValue = -- | Convert a plutus 'Value' into a cardano-api 'Value'. fromPlutusValue :: Plutus.Value -> Maybe Value fromPlutusValue plutusValue = do - fmap valueFromList . mapM convertAsset $ flattenValue plutusValue + fmap fromList . mapM convertAsset $ flattenValue plutusValue where convertAsset (cs, tk, i) | cs == adaSymbol && tk == adaToken = diff --git a/hydra-cluster/config/devnet/genesis-conway.json b/hydra-cluster/config/devnet/genesis-conway.json index edcab640624..760995a34d4 100644 --- a/hydra-cluster/config/devnet/genesis-conway.json +++ b/hydra-cluster/config/devnet/genesis-conway.json @@ -18,9 +18,9 @@ "ppGovGroup": 0.75, "treasuryWithdrawal": 0.67 }, - "committeeMinSize": 0, - "committeeMaxTermLength": 365, - "govActionLifetime": 30, + "committeeMinSize": 7, + "committeeMaxTermLength": 146, + "govActionLifetime": 6, "govActionDeposit": 100000000000, "dRepDeposit": 500000000, "dRepActivity": 20, @@ -287,266 +287,17 @@ }, "committee": { "members": { - "scriptHash-ff9babf23fef3f54ec29132c07a8e23807d7b395b143ecd8ff79f4c7": 1000 + "scriptHash-df0e83bde65416dade5b1f97e7f115cc1ff999550ad968850783fe50": 580, + "scriptHash-b6012034ba0a7e4afbbf2c7a1432f8824aee5299a48e38e41a952686": 580, + "scriptHash-ce8b37a72b178a37bbd3236daa7b2c158c9d3604e7aa667e6c6004b7": 580, + "scriptHash-f0dc2c00d92a45521267be2d5de1c485f6f9d14466d7e16062897cf7": 580, + "scriptHash-349e55f83e9af24813e6cb368df6a80d38951b2a334dfcdf26815558": 580, + "scriptHash-84aebcfd3e00d0f87af918fc4b5e00135f407e379893df7e7d392c6a": 580, + "scriptHash-e8165b3328027ee0d74b1f07298cb092fd99aa7697a1436f5997f625": 580 }, "threshold": { "numerator": 2, "denominator": 3 } - }, - "minFeeRefScriptCostPerByte": 0, - "plutusV3CostModel": [ - 100788, - 420, - 1, - 1, - 1000, - 173, - 0, - 1, - 1000, - 59957, - 4, - 1, - 11183, - 32, - 201305, - 8356, - 4, - 16000, - 100, - 16000, - 100, - 16000, - 100, - 16000, - 100, - 16000, - 100, - 16000, - 100, - 100, - 100, - 16000, - 100, - 94375, - 32, - 132994, - 32, - 61462, - 4, - 72010, - 178, - 0, - 1, - 22151, - 32, - 91189, - 769, - 4, - 2, - 85848, - 123203, - 7305, - -900, - 1716, - 549, - 57, - 85848, - 0, - 1, - 1, - 1000, - 42921, - 4, - 2, - 24548, - 29498, - 38, - 1, - 898148, - 27279, - 1, - 51775, - 558, - 1, - 39184, - 1000, - 60594, - 1, - 141895, - 32, - 83150, - 32, - 15299, - 32, - 76049, - 1, - 13169, - 4, - 22100, - 10, - 28999, - 74, - 1, - 28999, - 74, - 1, - 43285, - 552, - 1, - 44749, - 541, - 1, - 33852, - 32, - 68246, - 32, - 72362, - 32, - 7243, - 32, - 7391, - 32, - 11546, - 32, - 85848, - 123203, - 7305, - -900, - 1716, - 549, - 57, - 85848, - 0, - 1, - 90434, - 519, - 0, - 1, - 74433, - 32, - 85848, - 123203, - 7305, - -900, - 1716, - 549, - 57, - 85848, - 0, - 1, - 1, - 85848, - 123203, - 7305, - -900, - 1716, - 549, - 57, - 85848, - 0, - 1, - 955506, - 213312, - 0, - 2, - 270652, - 22588, - 4, - 1457325, - 64566, - 4, - 20467, - 1, - 4, - 0, - 141992, - 32, - 100788, - 420, - 1, - 1, - 81663, - 32, - 59498, - 32, - 20142, - 32, - 24588, - 32, - 20744, - 32, - 25933, - 32, - 24623, - 32, - 43053543, - 10, - 53384111, - 14333, - 10, - 43574283, - 26308, - 10, - 16000, - 100, - 16000, - 100, - 962335, - 18, - 2780678, - 6, - 442008, - 1, - 52538055, - 3756, - 18, - 267929, - 18, - 76433006, - 8868, - 18, - 52948122, - 18, - 1995836, - 36, - 3227919, - 12, - 901022, - 1, - 166917843, - 4307, - 36, - 284546, - 36, - 158221314, - 26549, - 36, - 74698472, - 36, - 333849714, - 1, - 254006273, - 72, - 2174038, - 72, - 2261318, - 64571, - 4, - 207616, - 8310, - 4, - 1293828, - 28716, - 63, - 0, - 1, - 1006041, - 43623, - 251, - 0, - 1 - ], - "extraPraosEntropy": null + } } diff --git a/hydra-cluster/config/devnet/genesis-shelley.json b/hydra-cluster/config/devnet/genesis-shelley.json index 37e81defc7c..bb16c0822ca 100644 --- a/hydra-cluster/config/devnet/genesis-shelley.json +++ b/hydra-cluster/config/devnet/genesis-shelley.json @@ -30,7 +30,7 @@ "nOpt": 100, "poolDeposit": 0, "protocolVersion": { - "major": 7, + "major": 9, "minor": 0 }, "rho": 0.1, diff --git a/hydra-cluster/src/Hydra/Cluster/Faucet.hs b/hydra-cluster/src/Hydra/Cluster/Faucet.hs index 13f76b8980f..f56703085cc 100644 --- a/hydra-cluster/src/Hydra/Cluster/Faucet.hs +++ b/hydra-cluster/src/Hydra/Cluster/Faucet.hs @@ -64,9 +64,9 @@ seedFromFaucet node@RunningNode{networkId, nodeSocket} receivingVerificationKey let changeAddress = ShelleyAddressInEra (buildAddress faucetVk networkId) buildTransaction networkId nodeSocket changeAddress faucetUTxO [] [theOutput] >>= \case Left e -> throwIO $ FaucetFailedToBuildTx{reason = e} - Right body -> do - let signedTx = sign faucetSk body - submitTransaction networkId nodeSocket (sign faucetSk body) + Right tx -> do + let signedTx = sign faucetSk $ getTxBody tx + submitTransaction networkId nodeSocket signedTx pure signedTx receivingAddress = buildAddress receivingVerificationKey networkId @@ -138,7 +138,7 @@ returnFundsToFaucet' tracer RunningNode{networkId, nodeSocket} senderSk = do -- entire value is created and paid to the faucet address. buildTransaction networkId nodeSocket faucetAddress utxo [] [] >>= \case Left e -> throwIO $ FaucetFailedToBuildTx{reason = e} - Right body -> pure body + Right tx -> pure $ getTxBody tx -- Use the Faucet utxo to create the output at specified address createOutputAtAddress :: @@ -167,8 +167,10 @@ createOutputAtAddress node@RunningNode{networkId, nodeSocket} atAddress datum va collateralTxIns [output] >>= \case - Left e -> throwErrorAsException e - Right body -> do + Left e -> + throwErrorAsException e + Right x -> do + let body = getTxBody x let tx = makeSignedTransaction [makeShelleyKeyWitness body (WitnessPaymentKey faucetSk)] body submitTransaction networkId nodeSocket tx newUtxo <- awaitTransaction networkId nodeSocket tx @@ -193,7 +195,7 @@ calculateTxFee RunningNode{networkId, nodeSocket} secretKey utxo addr lovelace = let theOutput = TxOut addr (lovelaceToValue lovelace) TxOutDatumNone ReferenceScriptNone in buildTransaction networkId nodeSocket addr utxo [] [theOutput] >>= \case Left e -> throwIO $ FaucetFailedToBuildTx{reason = e} - Right body -> pure $ txFee' (sign secretKey body) + Right tx -> pure $ txFee' (sign secretKey $ getTxBody tx) -- | Try to submit tx and retry when some caught exception/s take place. retryOnExceptions :: (MonadCatch m, MonadDelay m) => Tracer m FaucetLog -> m a -> m a diff --git a/hydra-cluster/src/Hydra/Cluster/Scenarios.hs b/hydra-cluster/src/Hydra/Cluster/Scenarios.hs index a8236f4b805..4dbd23b6d17 100644 --- a/hydra-cluster/src/Hydra/Cluster/Scenarios.hs +++ b/hydra-cluster/src/Hydra/Cluster/Scenarios.hs @@ -501,8 +501,8 @@ singlePartyCommitsFromExternalTxBlueprint tracer workDir node hydraScriptsTxId = ReferenceScriptNone buildTransaction networkId nodeSocket someAddress utxoToCommit (fst <$> UTxO.pairs someUTxO) [someOutput] >>= \case Left e -> failure $ show e - Right body -> do - let unsignedTx = makeSignedTransaction [] body + Right tx -> do + let unsignedTx = makeSignedTransaction [] $ getTxBody tx let clientPayload = Aeson.object [ "blueprintTx" .= unsignedTx @@ -598,8 +598,8 @@ canSubmitTransactionThroughAPI tracer workDir node hydraScriptsTxId = -- prepare fully balanced tx body buildTransaction networkId nodeSocket bobsAddress bobUTxO (fst <$> UTxO.pairs bobUTxO) [carolsOutput] >>= \case Left e -> failure $ show e - Right body -> do - let unsignedTx = makeSignedTransaction [] body + Right tx -> do + let unsignedTx = makeSignedTransaction [] $ getTxBody tx let unsignedRequest = toJSON unsignedTx sendRequest hydraNodeId unsignedRequest `shouldThrow` expectErrorStatus 400 (Just "MissingVKeyWitnessesUTXOW") diff --git a/hydra-cluster/src/Hydra/Generator.hs b/hydra-cluster/src/Hydra/Generator.hs index 216a0281a78..4e6e4b9d8c0 100644 --- a/hydra-cluster/src/Hydra/Generator.hs +++ b/hydra-cluster/src/Hydra/Generator.hs @@ -148,8 +148,8 @@ generateDemoUTxODataset network nodeSocket allClientKeys nTxs = do ReferenceScriptNone buildTransaction network nodeSocket changeAddress faucetUTxO [] recipientOutputs >>= \case Left e -> throwIO $ FaucetFailedToBuildTx{reason = e} - Right body -> do - let signedTx = sign faucetSk body + Right tx -> do + let signedTx = sign faucetSk $ getTxBody tx pure signedTx let dataset clientKeys = generateClientDataset network fundingTransaction clientKeys nTxs generateOneSelfTransfer diff --git a/hydra-node/bench/tx-cost/TxCost.hs b/hydra-node/bench/tx-cost/TxCost.hs index abb539a5230..4902efeb1f6 100644 --- a/hydra-node/bench/tx-cost/TxCost.hs +++ b/hydra-node/bench/tx-cost/TxCost.hs @@ -219,15 +219,17 @@ computeAbortCost = computeFanOutCost :: IO [(NumParties, NumUTxO, Natural, TxSize, MemUnit, CpuUnit, Coin)] computeFanOutCost = do - interesting <- catMaybes <$> mapM (uncurry compute) [(p, u) | p <- [5], u <- [0, 1, 5, 10, 20, 30, 40, 50]] + interesting <- catMaybes <$> mapM (uncurry compute) [(p, u) | p <- [numberOfParties], u <- [0, 1, 5, 10, 20, 30, 40, 50]] limit <- maybeToList . getFirst <$> foldMapM (\(p, u) -> First <$> compute p u) - [(p, u) | p <- [5], u <- [100, 99 .. 0]] + [(p, u) | p <- [numberOfParties], u <- [100, 99 .. 0]] pure $ interesting <> limit where + numberOfParties = 10 + compute parties numElems = do (utxo, tx, knownUTxO) <- generate $ genFanoutTx parties numElems let utxoSerializedSize = serializedSize utxo diff --git a/hydra-node/src/Hydra/Chain.hs b/hydra-node/src/Hydra/Chain.hs index 20de71001c8..30a040fdf84 100644 --- a/hydra-node/src/Hydra/Chain.hs +++ b/hydra-node/src/Hydra/Chain.hs @@ -42,11 +42,12 @@ import Test.QuickCheck.Instances.Time () maxMainnetLovelace :: Coin maxMainnetLovelace = Coin 100_000_000 --- | Hardcoded limit for maximum number of parties in a head protocol --- The value is obtained from calculating the costs of running the scripts --- and on-chan validators (see 'computeCollectComCost' 'computeAbortCost') +-- | Hardcoded limit for maximum number of parties in a head protocol The value +-- is obtained from calculating the costs of running the scripts and on-chan +-- validators (see 'computeCollectComCost' 'computeAbortCost'). A too high +-- enough number would be detected by property and acceptance tests. maximumNumberOfParties :: Int -maximumNumberOfParties = 5 +maximumNumberOfParties = 8 -- | Data type used to post transactions on chain. It holds everything to -- construct corresponding Head protocol transactions. diff --git a/hydra-node/src/Hydra/Chain/CardanoClient.hs b/hydra-node/src/Hydra/Chain/CardanoClient.hs index 1d7f5d6219c..fbf46328e4f 100644 --- a/hydra-node/src/Hydra/Chain/CardanoClient.hs +++ b/hydra-node/src/Hydra/Chain/CardanoClient.hs @@ -95,14 +95,14 @@ buildTransaction :: [TxIn] -> -- | Outputs to create. [TxOut CtxTx] -> - IO (Either (TxBodyErrorAutoBalance Era) TxBody) + IO (Either (TxBodyErrorAutoBalance Era) Tx) buildTransaction networkId socket changeAddress utxoToSpend collateral outs = do pparams <- queryProtocolParameters networkId socket QueryTip systemStart <- querySystemStart networkId socket QueryTip eraHistory <- queryEraHistory networkId socket QueryTip stakePools <- queryStakePools networkId socket QueryTip pure $ - second balancedTxBody $ + second ((\(UnsignedTx unsignedTx) -> fromLedgerTx unsignedTx) . balancedTxBody) $ makeTransactionBodyAutoBalance shelleyBasedEra systemStart diff --git a/hydra-node/src/Hydra/Chain/Direct/State.hs b/hydra-node/src/Hydra/Chain/Direct/State.hs index 50352c45bd8..8b682874294 100644 --- a/hydra-node/src/Hydra/Chain/Direct/State.hs +++ b/hydra-node/src/Hydra/Chain/Direct/State.hs @@ -14,6 +14,7 @@ import Data.Fixed (Milli) import Data.Map qualified as Map import Data.Maybe (fromJust) import Data.Time.Clock.POSIX (posixSecondsToUTCTime) +import GHC.IsList qualified as IsList import Hydra.Cardano.Api ( AssetId (..), AssetName (AssetName), @@ -24,6 +25,7 @@ import Hydra.Cardano.Api ( NetworkMagic (NetworkMagic), PaymentKey, PlutusScriptV2, + PlutusScriptV3, PolicyId, Quantity (..), SerialiseAsRawBytes (serialiseToRawBytes), @@ -49,8 +51,7 @@ import Hydra.Cardano.Api ( txIns', txOutScriptData, txOutValue, - valueFromList, - valueToList, + txSpendingUTxO, pattern ByronAddressInEra, pattern ShelleyAddressInEra, pattern TxOut, @@ -77,13 +78,13 @@ import Hydra.Chain.Direct.Tx ( observeInitTx, txInToHeadSeed, ) -import Hydra.Contract.Commit qualified as Commit import Hydra.Contract.Head qualified as Head import Hydra.Contract.HeadState qualified as Head import Hydra.Contract.HeadTokens (headPolicyId, mkHeadTokenScript) import Hydra.Contract.Initial qualified as Initial import Hydra.Ledger.Cardano.Evaluate (genPointInTimeBefore, genValidityBoundsFromContestationPeriod, slotLength, systemStart) import Hydra.Ledger.Cardano.Time (slotNoFromUTCTime) +import Hydra.Plutus (commitValidatorScript) import Hydra.Plutus.Extras (posixToUTCTime) import Hydra.Tx ( CommitBlueprintTx (..), @@ -117,7 +118,7 @@ import Hydra.Tx.Init (initTx) import Hydra.Tx.OnChainId (OnChainId) import Hydra.Tx.Recover (recoverTx) import Hydra.Tx.Snapshot (genConfirmedSnapshot) -import Hydra.Tx.Utils (splitUTxO, txSpendingUTxO, verificationKeyToOnChainId) +import Hydra.Tx.Utils (splitUTxO, verificationKeyToOnChainId) import Test.Hydra.Tx.Fixture (testNetworkId) import Test.Hydra.Tx.Gen ( genOneUTxOFor, @@ -432,7 +433,7 @@ abort ctx seedTxIn spendableUTxO committedUTxO = do commits = UTxO.toMap $ UTxO.filter (isScriptTxOut commitScript) utxoOfThisHead' - commitScript = fromPlutusScript @PlutusScriptV2 Commit.validatorScript + commitScript = fromPlutusScript @PlutusScriptV3 commitValidatorScript headScript = fromPlutusScript @PlutusScriptV2 Head.validatorScript @@ -470,7 +471,7 @@ collect ctx headId headParameters utxoToCollect spendableUTxO = do where headScript = fromPlutusScript @PlutusScriptV2 Head.validatorScript - commitScript = fromPlutusScript @PlutusScriptV2 Commit.validatorScript + commitScript = fromPlutusScript @PlutusScriptV3 commitValidatorScript ChainContext{networkId, ownVerificationKey, scriptRegistry} = ctx @@ -745,7 +746,7 @@ utxoOfThisHead :: PolicyId -> UTxO -> UTxO utxoOfThisHead policy = UTxO.filter hasHeadToken where hasHeadToken = - isJust . find isHeadToken . valueToList . txOutValue + isJust . find isHeadToken . IsList.toList . txOutValue isHeadToken (assetId, quantity) = case assetId of @@ -1114,7 +1115,10 @@ genCommits' genUTxO ctx txInit = do in map (fmap (modifyTxOutValue (scaleQuantitiesDownBy numberOfUTxOs))) commitUTxOs scaleQuantitiesDownBy x = - valueFromList . map (\(an, Quantity q) -> (an, Quantity $ q `div` fromIntegral x)) . valueToList + -- XXX: Foldable Value instance would be nice here + IsList.fromList + . map (\(an, Quantity q) -> (an, Quantity $ q `div` fromIntegral x)) + . IsList.toList genCommitFor :: VerificationKey PaymentKey -> Gen UTxO genCommitFor vkey = diff --git a/hydra-node/src/Hydra/Chain/Direct/Tx.hs b/hydra-node/src/Hydra/Chain/Direct/Tx.hs index 9a12a6b1229..4d36e92edb7 100644 --- a/hydra-node/src/Hydra/Chain/Direct/Tx.hs +++ b/hydra-node/src/Hydra/Chain/Direct/Tx.hs @@ -12,13 +12,14 @@ module Hydra.Chain.Direct.Tx ( ) where import Hydra.Cardano.Api -import Hydra.Prelude +import Hydra.Prelude hiding (toList) import Cardano.Api.UTxO qualified as UTxO import Data.Aeson qualified as Aeson import Data.ByteString qualified as BS import Data.ByteString.Base16 qualified as Base16 import Data.Map qualified as Map +import GHC.IsList (IsList (..)) import Hydra.Contract.Commit qualified as Commit import Hydra.Contract.Deposit qualified as Deposit import Hydra.Contract.Head qualified as Head @@ -27,6 +28,7 @@ import Hydra.Contract.HeadTokens qualified as HeadTokens import Hydra.Contract.Initial qualified as Initial import Hydra.Data.ContestationPeriod qualified as OnChain import Hydra.Data.Party qualified as OnChain +import Hydra.Plutus (commitValidatorScript) import Hydra.Plutus.Extras (posixToUTCTime) import Hydra.Plutus.Orphans () import Hydra.Tx ( @@ -306,9 +308,9 @@ observeCommitTx networkId utxo tx = do initialScript = fromPlutusScript Initial.validatorScript - commitAddress = mkScriptAddress @PlutusScriptV2 networkId commitScript + commitAddress = mkScriptAddress networkId commitScript - commitScript = fromPlutusScript Commit.validatorScript + commitScript = fromPlutusScript @PlutusScriptV3 commitValidatorScript data CollectComObservation = CollectComObservation { threadOutput :: OpenThreadOutput @@ -604,7 +606,7 @@ txInToHeadSeed txin = UnsafeHeadSeed $ toStrict $ Aeson.encode txin findHeadAssetId :: TxOut ctx -> Maybe (PolicyId, AssetName) findHeadAssetId txOut = - flip findFirst (valueToList $ txOutValue txOut) $ \case + flip findFirst (toList $ txOutValue txOut) $ \case (AssetId pid aname, q) | aname == hydraHeadV1AssetName && q == 1 -> Just (pid, aname) diff --git a/hydra-node/src/Hydra/Chain/ScriptRegistry.hs b/hydra-node/src/Hydra/Chain/ScriptRegistry.hs index ee852734997..9236d1e46e0 100644 --- a/hydra-node/src/Hydra/Chain/ScriptRegistry.hs +++ b/hydra-node/src/Hydra/Chain/ScriptRegistry.hs @@ -17,11 +17,13 @@ import Hydra.Cardano.Api ( TxIx (..), WitCtx (..), examplePlutusScriptAlwaysFails, + getTxBody, getTxId, makeShelleyKeyWitness, makeSignedTransaction, mkScriptAddress, mkScriptRef, + mkScriptRefV3, mkTxOutAutoBalance, mkVkAddress, selectLovelace, @@ -29,10 +31,18 @@ import Hydra.Cardano.Api ( txOutValue, pattern TxOutDatumNone, ) -import Hydra.Chain.CardanoClient (QueryPoint (..), awaitTransaction, buildTransaction, queryProtocolParameters, queryUTxOByTxIn, queryUTxOFor, submitTransaction) -import Hydra.Contract.Commit qualified as Commit +import Hydra.Chain.CardanoClient ( + QueryPoint (..), + awaitTransaction, + buildTransaction, + queryProtocolParameters, + queryUTxOByTxIn, + queryUTxOFor, + submitTransaction, + ) import Hydra.Contract.Head qualified as Head import Hydra.Contract.Initial qualified as Initial +import Hydra.Plutus (commitValidatorScript) import Hydra.Tx.ScriptRegistry (ScriptRegistry (..), newScriptRegistry) -- | Query for 'TxIn's in the search for outputs containing all the reference @@ -77,9 +87,9 @@ publishHydraScripts networkId socketPath sk = do utxo <- queryUTxOFor networkId socketPath QueryTip vk let outputs = mkScriptTxOut pparams - <$> [ Initial.validatorScript - , Commit.validatorScript - , Head.validatorScript + <$> [ mkScriptRef Initial.validatorScript + , mkScriptRefV3 commitValidatorScript + , mkScriptRef Head.validatorScript ] totalDeposit = sum (selectLovelace . txOutValue <$> outputs) someUTxO = @@ -95,7 +105,8 @@ publishHydraScripts networkId socketPath sk = do >>= \case Left e -> throwErrorAsException e - Right body -> do + Right x -> do + let body = getTxBody x let tx = makeSignedTransaction [makeShelleyKeyWitness body (WitnessPaymentKey sk)] body submitTransaction networkId socketPath tx void $ awaitTransaction networkId socketPath tx @@ -105,13 +116,12 @@ publishHydraScripts networkId socketPath sk = do changeAddress = mkVkAddress networkId vk - mkScriptTxOut pparams script = + mkScriptTxOut pparams = mkTxOutAutoBalance pparams unspendableScriptAddress mempty TxOutDatumNone - (mkScriptRef script) unspendableScriptAddress = mkScriptAddress networkId $ examplePlutusScriptAlwaysFails WitCtxTxIn diff --git a/hydra-node/test/Hydra/Chain/Direct/StateSpec.hs b/hydra-node/test/Hydra/Chain/Direct/StateSpec.hs index 18d5f9c39c5..b860fe6e5df 100644 --- a/hydra-node/test/Hydra/Chain/Direct/StateSpec.hs +++ b/hydra-node/test/Hydra/Chain/Direct/StateSpec.hs @@ -488,8 +488,8 @@ prop_splitUTxO utxo = prop_canCloseFanoutEveryCollect :: Property prop_canCloseFanoutEveryCollect = monadicST $ do - let maxParties = 10 - ctx@HydraContext{ctxContestationPeriod} <- pickBlind $ genHydraContext maxParties + let moreThanSupported = maximumNumberOfParties * 2 + ctx@HydraContext{ctxContestationPeriod} <- pickBlind $ genHydraContext moreThanSupported cctx <- pickBlind $ pickChainContext ctx -- Init txInit <- pickBlind $ genInitTx ctx diff --git a/hydra-node/test/Hydra/Chain/Direct/TxSpec.hs b/hydra-node/test/Hydra/Chain/Direct/TxSpec.hs index 47b948ef9d8..4a7db82bd6a 100644 --- a/hydra-node/test/Hydra/Chain/Direct/TxSpec.hs +++ b/hydra-node/test/Hydra/Chain/Direct/TxSpec.hs @@ -42,11 +42,11 @@ import Hydra.Chain.Direct.Tx ( observeHeadTx, txInToHeadSeed, ) -import Hydra.Contract.Commit qualified as Commit import Hydra.Contract.HeadTokens (headPolicyId) import Hydra.Contract.Initial qualified as Initial import Hydra.Ledger.Cardano.Builder (addInputs, addReferenceInputs, addVkInputs, emptyTxBody, unsafeBuildTransaction) import Hydra.Ledger.Cardano.Evaluate (propTransactionEvaluates) +import Hydra.Plutus (commitValidatorScript) import Hydra.Tx.BlueprintTx (CommitBlueprintTx (..)) import Hydra.Tx.Commit (commitTx, mkCommitDatum) import Hydra.Tx.HeadId (headIdToCurrencySymbol, mkHeadId) @@ -359,7 +359,7 @@ generateCommitUTxOs parties = do mkCommitUTxO (vk, party) utxo = ( toUTxOContext $ TxOut - (mkScriptAddress @PlutusScriptV2 testNetworkId commitScript) + (mkScriptAddress testNetworkId commitScript) commitValue (mkTxOutDatumInline commitDatum) ReferenceScriptNone @@ -370,12 +370,12 @@ generateCommitUTxOs parties = do mconcat [ lovelaceToValue (Coin 2000000) , foldMap txOutValue utxo - , valueFromList + , fromList [ (AssetId testPolicyId (assetNameFromVerificationKey vk), 1) ] ] - commitScript = fromPlutusScript Commit.validatorScript + commitScript = fromPlutusScript @PlutusScriptV3 commitValidatorScript commitDatum = mkCommitDatum party utxo (toPlutusCurrencySymbol testPolicyId) @@ -407,7 +407,7 @@ genAbortableOutputs parties = toUTxOContext $ TxOut (mkScriptAddress @PlutusScriptV2 testNetworkId initialScript) - (valueFromList [(AssetId testPolicyId (assetNameFromVerificationKey vk), 1)]) + (fromList [(AssetId testPolicyId (assetNameFromVerificationKey vk), 1)]) (mkTxOutDatumInline initialDatum) ReferenceScriptNone diff --git a/hydra-node/test/Hydra/Ledger/CardanoSpec.hs b/hydra-node/test/Hydra/Ledger/CardanoSpec.hs index 93efe6a8fc6..a31617e4293 100644 --- a/hydra-node/test/Hydra/Ledger/CardanoSpec.hs +++ b/hydra-node/test/Hydra/Ledger/CardanoSpec.hs @@ -3,7 +3,7 @@ module Hydra.Ledger.CardanoSpec where import Hydra.Cardano.Api -import Hydra.Prelude +import Hydra.Prelude hiding (toList) import Test.Hydra.Prelude import Cardano.Ledger.Api (ensureMinCoinTxOut) @@ -12,6 +12,7 @@ import Data.Aeson (eitherDecode, encode) import Data.Aeson qualified as Aeson import Data.Aeson.Lens (key) import Data.Text (unpack) +import GHC.IsList (IsList (..)) import Hydra.Cardano.Api.Pretty (renderTx) import Hydra.Chain.ChainState (ChainSlot (ChainSlot)) import Hydra.JSONSchema (prop_validateJSONSchema) @@ -140,7 +141,7 @@ propRealisticValue value = numberOfAssets < 100 & counterexample ("too many individual assets: " <> show numberOfAssets) where - numberOfAssets = length (valueToList value) + numberOfAssets = length (toList value) -- | Check that an output has enough lovelace to cover asset deposits. propHasEnoughLovelace :: TxOut CtxUTxO -> Property @@ -180,7 +181,7 @@ propGeneratesGoodTxOut txOut = hasMultiAssets = any (\(an, _) -> an /= AdaAssetId) assets - assets = valueToList $ txOutValue txOut + assets = toList $ txOutValue txOut isVKOutput = case txOutAddress txOut of ByronAddressInEra ByronAddress{} -> False diff --git a/hydra-node/test/Hydra/Model.hs b/hydra-node/test/Hydra/Model.hs index 87a3eec4010..0dce252d97a 100644 --- a/hydra-node/test/Hydra/Model.hs +++ b/hydra-node/test/Hydra/Model.hs @@ -17,8 +17,9 @@ -- modelling more complex transactions schemes... module Hydra.Model where +import Data.Foldable qualified import Hydra.Cardano.Api hiding (utxoFromTx) -import Hydra.Prelude hiding (Any, label, lookup) +import Hydra.Prelude hiding (Any, label, lookup, toList) import Cardano.Api.UTxO (pairs) import Cardano.Api.UTxO qualified as UTxO @@ -40,6 +41,7 @@ import Data.Map ((!)) import Data.Map qualified as Map import Data.Maybe (fromJust) import Data.Set qualified as Set +import GHC.IsList (IsList (..)) import GHC.Natural (wordToNatural) import Hydra.API.ClientInput (ClientInput) import Hydra.API.ClientInput qualified as Input @@ -442,7 +444,7 @@ genPayment WorldState{hydraParties, hydraState} = case hydraState of Open{offChainState = OffChainState{confirmedUTxO}} -> do (from, value) <- - elements (filter (not . null . valueToList . snd) confirmedUTxO) + elements (filter (not . null . toList . snd) confirmedUTxO) let party = deriveParty $ fst $ fromJust $ List.find ((== from) . snd) hydraParties -- NOTE: It's perfectly possible this yields a payment to self and it -- assumes hydraParties is not empty else `elements` will crash @@ -544,7 +546,7 @@ instance -- sure that the fanout outputs match what we had in the open Head -- exactly. let sorted = sortOn (\o -> (txOutAddress o, selectLovelace (txOutValue o))) - sorted (toTxOuts finalUTxO) === sorted (toList result) + sorted (toTxOuts finalUTxO) === sorted (Data.Foldable.toList result) _ -> pure False _ -> pure True @@ -667,7 +669,7 @@ performCommit parties party paymentUTxO = do | cp == party, committedUTxO == realUTxO -> Just committedUTxO err@CommandFailed{} -> error $ show err _ -> Nothing - pure $ fromUtxo $ List.head $ toList observedUTxO + pure $ fromUtxo $ List.head $ Data.Foldable.toList observedUTxO where fromUtxo :: UTxO -> [(CardanoSigningKey, Value)] fromUtxo utxo = findSigningKey . (txOutAddress &&& txOutValue) . snd <$> pairs utxo @@ -738,7 +740,7 @@ performNewTx party tx = do party `sendsInput` Input.NewTx realTx lift $ do - waitUntilMatch (toList nodes) $ \case + waitUntilMatch (Data.Foldable.toList nodes) $ \case SnapshotConfirmed{snapshot = snapshot} -> txId realTx `elem` Snapshot.confirmed snapshot err@TxInvalid{} -> error ("expected tx to be valid: " <> show err) @@ -775,7 +777,7 @@ performInit party = do party `sendsInput` Input.Init nodes <- gets nodes lift $ - waitUntilMatch (toList nodes) $ \case + waitUntilMatch (Data.Foldable.toList nodes) $ \case HeadIsInitializing{} -> True err@CommandFailed{} -> error $ show err _ -> False @@ -786,7 +788,7 @@ performAbort party = do nodes <- gets nodes lift $ - waitUntilMatch (toList nodes) $ \case + waitUntilMatch (Data.Foldable.toList nodes) $ \case HeadIsAborted{} -> True err@CommandFailed{} -> error $ show err _ -> False @@ -799,7 +801,7 @@ performClose party = do party `sendsInput` Input.Close lift $ - waitUntilMatch (toList nodes) $ \case + waitUntilMatch (Data.Foldable.toList nodes) $ \case HeadIsClosed{} -> True err@CommandFailed{} -> error $ show err _ -> False @@ -833,7 +835,7 @@ performCloseWithInitialSnapshot st party = do SimulatedChainNetwork{closeWithInitialSnapshot} <- gets chain _ <- lift $ closeWithInitialSnapshot (party, toRealUTxO $ foldMap snd $ Map.toList committed) lift $ - waitUntilMatch (toList nodes) $ \case + waitUntilMatch (Data.Foldable.toList nodes) $ \case HeadIsClosed{snapshotNumber} -> -- we deliberately wait to see close with the initial snapshot -- here to mimic one node not seeing the confirmed tx diff --git a/hydra-node/test/Hydra/Model/MockChain.hs b/hydra-node/test/Hydra/Model/MockChain.hs index 6c5343a0d35..4917b97ddc2 100644 --- a/hydra-node/test/Hydra/Model/MockChain.hs +++ b/hydra-node/test/Hydra/Model/MockChain.hs @@ -3,7 +3,7 @@ module Hydra.Model.MockChain where -import Hydra.Cardano.Api hiding (txSpendingUTxO) +import Hydra.Cardano.Api import Hydra.Prelude hiding (Any, label) import Cardano.Api.UTxO (fromPairs) @@ -81,7 +81,7 @@ import Hydra.Tx.Environment (Environment (Environment, participants, party)) import Hydra.Tx.Party (Party (..), deriveParty, getParty) import Hydra.Tx.ScriptRegistry (registryUTxO) import Hydra.Tx.Snapshot (ConfirmedSnapshot (..)) -import Hydra.Tx.Utils (txSpendingUTxO, verificationKeyToOnChainId) +import Hydra.Tx.Utils (verificationKeyToOnChainId) import Test.Hydra.Tx.Fixture (testNetworkId) import Test.Hydra.Tx.Gen (genScriptRegistry, genTxOutAdaOnly) import Test.QuickCheck (getPositive) diff --git a/hydra-node/test/Hydra/Model/Payment.hs b/hydra-node/test/Hydra/Model/Payment.hs index ffba8bb8a4e..275d06aa6d0 100644 --- a/hydra-node/test/Hydra/Model/Payment.hs +++ b/hydra-node/test/Hydra/Model/Payment.hs @@ -6,11 +6,12 @@ module Hydra.Model.Payment where import Hydra.Cardano.Api -import Hydra.Prelude hiding (Any, label) +import Hydra.Prelude hiding (Any, label, toList) import Data.List qualified as List import Data.Set ((\\)) import Data.Set qualified as Set +import GHC.IsList (IsList (..)) import Hydra.Tx.IsTx (IsTx (..)) import Test.Hydra.Tx.Fixture (testNetworkId) import Test.Hydra.Tx.Gen (genKeyPair) @@ -99,10 +100,10 @@ instance IsTx Payment where utxoFromTx Payment{to, value} = [(to, value)] outputsOfUTxO = id withoutUTxO a b = - let as = second valueToList <$> a - bs = second valueToList <$> b + let as = second toList <$> a + bs = second toList <$> b result = Set.toList $ Set.fromList as \\ Set.fromList bs - in second valueFromList <$> result + in second fromList <$> result applyTx :: UTxOType Payment -> Payment -> UTxOType Payment applyTx utxo Payment{from, to, value} = diff --git a/hydra-node/test/Hydra/ModelSpec.hs b/hydra-node/test/Hydra/ModelSpec.hs index 23993ccd9f8..7bae4acc4ea 100644 --- a/hydra-node/test/Hydra/ModelSpec.hs +++ b/hydra-node/test/Hydra/ModelSpec.hs @@ -70,11 +70,11 @@ -- , Var 2 := Command{Model.party = Party{vkey = HydraVerificationKey (VerKeyEd25519DSIGN "3b6a27bcceb6a42d62a3a8d02a6f0d73653215771de243a63ac048a18b59da29")}, -- command = Init{contestationPeriod = -6.413670805613}} -- , Var 3 := Command{Model.party = Party{vkey = HydraVerificationKey (VerKeyEd25519DSIGN "264a0707979e0d6691f74b055429b5f318d39c2883bb509310b67424252e9ef2")}, --- command = Commit{Input.utxo = [("0106010101070600040403010600080805020003040508030307080706060608", valueFromList [(AdaAssetId, 18470954)])]}} +-- command = Commit{Input.utxo = [("0106010101070600040403010600080805020003040508030307080706060608", fromList [(AdaAssetId, 18470954)])]}} -- , Var 4 := Command{Model.party = Party{vkey = HydraVerificationKey (VerKeyEd25519DSIGN "1c02babf6d3d51b725db8b72043823d66634b39db74836b1494bdb647073d566")}, --- command = Commit{Input.utxo = [("0000070304040705060101030802010105080806050605070104030603010503", valueFromList [(AdaAssetId, 19691416)])]}} +-- command = Commit{Input.utxo = [("0000070304040705060101030802010105080806050605070104030603010503", fromList [(AdaAssetId, 19691416)])]}} -- , Var 5 := Command{Model.party = Party{vkey = HydraVerificationKey (VerKeyEd25519DSIGN "3b6a27bcceb6a42d62a3a8d02a6f0d73653215771de243a63ac048a18b59da29")}, --- command = Commit{Input.utxo = [("0100000008030606080507030707000607020508050000020207070508040800", valueFromList [(AdaAssetId, 7003529)])]}} +-- command = Commit{Input.utxo = [("0100000008030606080507030707000607020508050000020207070508040800", fromList [(AdaAssetId, 7003529)])]}} -- , Var 6 -- := Command -- { Model.party = Party{vkey = HydraVerificationKey (VerKeyEd25519DSIGN "3b6a27bcceb6a42d62a3a8d02a6f0d73653215771de243a63ac048a18b59da29")} @@ -84,7 +84,7 @@ -- Payment -- { from = "0100000008030606080507030707000607020508050000020207070508040800" -- , to = "0106010101070600040403010600080805020003040508030307080706060608" --- , value = valueFromList [(AdaAssetId, 7003529)] +-- , value = fromList [(AdaAssetId, 7003529)] -- } -- } -- } diff --git a/hydra-plutus/.gitignore b/hydra-plutus/.gitignore new file mode 100644 index 00000000000..567609b1234 --- /dev/null +++ b/hydra-plutus/.gitignore @@ -0,0 +1 @@ +build/ diff --git a/hydra-plutus/README.md b/hydra-plutus/README.md new file mode 100644 index 00000000000..739bc5ab68a --- /dev/null +++ b/hydra-plutus/README.md @@ -0,0 +1,22 @@ +# Hydra plutus scripts + +Most of our scripts are built using `plutus-tx` which are automatically built +when compiling the whole package. However, some validators are implemented using `aiken` and embedded into the Haskell library from the plutus blueprint in `plutus.json`. + +## Build + +It's important that we keep the traces of the aiken validators with `-t`: + +```sh +aiken build -t compact +cabal build +``` + +The resulting `plutus.json` is deliberately checked in and doubles as a golden +file for our tests. + +## Test + +```sh +cabal test +``` diff --git a/hydra-plutus/aiken.lock b/hydra-plutus/aiken.lock new file mode 100644 index 00000000000..017fbeb74de --- /dev/null +++ b/hydra-plutus/aiken.lock @@ -0,0 +1,15 @@ +# This file was generated by Aiken +# You typically do not need to edit this file + +[[requirements]] +name = "aiken-lang/stdlib" +version = "2.1.0" +source = "github" + +[[packages]] +name = "aiken-lang/stdlib" +version = "2.1.0" +requirements = [] +source = "github" + +[etags] diff --git a/hydra-plutus/aiken.toml b/hydra-plutus/aiken.toml new file mode 100644 index 00000000000..3399cb90b3c --- /dev/null +++ b/hydra-plutus/aiken.toml @@ -0,0 +1,9 @@ +name = "hydra/hydra-plutus" +version = "0.20.0" +license = "Apache-2.0" +description = "Aiken contracts for project 'hydra/hydra-plutus'" + +[[dependencies]] +name = "aiken-lang/stdlib" +version = "2.1.0" +source = "github" diff --git a/hydra-plutus/exe/inspect-script/Main.hs b/hydra-plutus/exe/inspect-script/Main.hs index eba50d7a565..2b7f9bca27e 100644 --- a/hydra-plutus/exe/inspect-script/Main.hs +++ b/hydra-plutus/exe/inspect-script/Main.hs @@ -9,7 +9,6 @@ import Data.ByteString.Lazy qualified as BL import Data.Text (pack) import Hydra.Cardano.Api.Prelude (unsafeHashFromBytes) import Hydra.Contract (scriptInfo) -import Hydra.Contract.Commit as Commit import Hydra.Contract.Hash qualified as Hash import Hydra.Contract.Head as Head import Hydra.Contract.HeadState as Head @@ -85,14 +84,11 @@ main = do scripts = [ (headScript, "headScript") , (initialScript, "initialScript") - , (commitScript, "commitScript") , (hashPlutusScript, "hashScript") ] headScript = Head.validatorScript - commitScript = Commit.validatorScript - initialScript = Initial.validatorScript hashPlutusScript = Hash.validatorScript @@ -100,7 +96,6 @@ main = do compiledScripts = [ (Compiled Head.compiledValidator, "headScript") , (Compiled Initial.compiledValidator, "initialScript") - , (Compiled Commit.compiledValidator, "commitScript") ] datums = diff --git a/hydra-plutus/hydra-plutus.cabal b/hydra-plutus/hydra-plutus.cabal index bd1b794abc2..bee8e3dbe5e 100644 --- a/hydra-plutus/hydra-plutus.cabal +++ b/hydra-plutus/hydra-plutus.cabal @@ -1,14 +1,16 @@ -cabal-version: 2.2 -name: hydra-plutus -version: 0.19.0 -synopsis: Hydra Plutus Contracts -author: IOG -copyright: 2022 IOG -license: Apache-2.0 +cabal-version: 2.2 +name: hydra-plutus +version: 0.20.0 +synopsis: Hydra Plutus Contracts +author: IOG +copyright: 2022 IOG +license: Apache-2.0 license-files: LICENSE NOTICE +extra-source-files: plutus.json + source-repository head type: git location: https://github.com/cardano-scaling/hydra @@ -59,6 +61,7 @@ library Hydra.Contract.Util Hydra.Data.ContestationPeriod Hydra.Data.Party + Hydra.Plutus Hydra.ScriptContext hs-source-dirs: src @@ -67,13 +70,16 @@ library , base , base16-bytestring , bytestring + , file-embed , hydra-cardano-api , hydra-plutus-extras , hydra-prelude - , plutus-core ^>=1.30 - , plutus-ledger-api ^>=1.30 - , plutus-tx ^>=1.30 - , plutus-tx-plugin ^>=1.30 + , lens + , lens-aeson + , plutus-core >=1.30 + , plutus-ledger-api >=1.30 + , plutus-tx >=1.30 + , plutus-tx-plugin >=1.30 , QuickCheck , serialise , template-haskell @@ -91,14 +97,20 @@ test-suite tests Spec build-depends: + , aeson , base + , bytestring + , filepath , hspec , hspec-golden , hydra-cardano-api , hydra-plutus , hydra-prelude , hydra-test-utils + , lens + , lens-aeson , plutus-ledger-api + , process , QuickCheck build-tool-depends: hspec-discover:hspec-discover diff --git a/hydra-plutus/plutus.json b/hydra-plutus/plutus.json new file mode 100644 index 00000000000..6e4f29e97d5 --- /dev/null +++ b/hydra-plutus/plutus.json @@ -0,0 +1,91 @@ +{ + "preamble": { + "title": "hydra/hydra-plutus", + "description": "Aiken contracts for project 'hydra/hydra-plutus'", + "version": "0.20.0", + "plutusVersion": "v3", + "compiler": { + "name": "Aiken", + "version": "v1.1.4+c7ae161" + }, + "license": "Apache-2.0" + }, + "validators": [ + { + "title": "commit.commit.spend", + "datum": { + "title": "datum", + "schema": { + "$ref": "#/definitions/commit~1Datum" + } + }, + "redeemer": { + "title": "redeemer", + "schema": { + "$ref": "#/definitions/commit~1Redeemer" + } + }, + "compiledCode": "5902ae010100323232323232323232322533300332323232325332330093001300b37540042646464a66666602800c2646464a66601e60060022a66602660246ea80245400803854ccc03cc01c00454ccc04cc048dd50048a80100700718081baa0081533300d3001300f37540042646464646464a6660266016602a6ea80344cc00cc01130103d87980003370e6660026eacc064c068c068c068c068c058dd50079bae30053016375400c91010b487964726148656164563100480044c94ccc050c020c058dd50008998021802a6103d87a8000300c333002375660346036602e6ea8c068c05cdd50009bae30063017375400e9110b4879647261486561645631001533015491054c35333b39001632533301800114c103d87a80001300333019301a0014bd701bac30053016375401e44464a66602c601c60306ea8004520001375a603860326ea8004c94ccc058c038c060dd50008a6103d87a8000132330010013756603a60346ea8008894ccc070004530103d87a8000132323232533301c337220100042a66603866e3c0200084c02ccc084dd4000a5eb80530103d87a8000133006006003375a603c0066eb8c070008c080008c078004c8cc004004010894ccc06c0045300103d87a8000132323232533301b337220100042a66603666e3c0200084c028cc080dd3000a5eb80530103d87a80001330060060033756603a0066eb8c06c008c07c008c074004dd2a400044a666024002294454cc04c00852812999808180218091baa001149103433031001491034330320023015301630160013013301037540042a6601c9201054c34333b350016370e900000580580580598089809001180800098061baa002370e90010b1806980700118060009806001180500098031baa00114984d95854cc0092401064c34323b333100165734ae7155ceaab9e5573eae815d0aba257481", + "hash": "ea444d37d226e71eef73ac78d149750da977feb588900135bf9e8221" + }, + { + "title": "commit.commit.else", + "redeemer": { + "schema": {} + }, + "compiledCode": "5902ae010100323232323232323232322533300332323232325332330093001300b37540042646464a66666602800c2646464a66601e60060022a66602660246ea80245400803854ccc03cc01c00454ccc04cc048dd50048a80100700718081baa0081533300d3001300f37540042646464646464a6660266016602a6ea80344cc00cc01130103d87980003370e6660026eacc064c068c068c068c068c058dd50079bae30053016375400c91010b487964726148656164563100480044c94ccc050c020c058dd50008998021802a6103d87a8000300c333002375660346036602e6ea8c068c05cdd50009bae30063017375400e9110b4879647261486561645631001533015491054c35333b39001632533301800114c103d87a80001300333019301a0014bd701bac30053016375401e44464a66602c601c60306ea8004520001375a603860326ea8004c94ccc058c038c060dd50008a6103d87a8000132330010013756603a60346ea8008894ccc070004530103d87a8000132323232533301c337220100042a66603866e3c0200084c02ccc084dd4000a5eb80530103d87a8000133006006003375a603c0066eb8c070008c080008c078004c8cc004004010894ccc06c0045300103d87a8000132323232533301b337220100042a66603666e3c0200084c028cc080dd3000a5eb80530103d87a80001330060060033756603a0066eb8c06c008c07c008c074004dd2a400044a666024002294454cc04c00852812999808180218091baa001149103433031001491034330320023015301630160013013301037540042a6601c9201054c34333b350016370e900000580580580598089809001180800098061baa002370e90010b1806980700118060009806001180500098031baa00114984d95854cc0092401064c34323b333100165734ae7155ceaab9e5573eae815d0aba257481", + "hash": "ea444d37d226e71eef73ac78d149750da977feb588900135bf9e8221" + } + ], + "definitions": { + "Data": { + "title": "Data", + "description": "Any Plutus data." + }, + "PolicyId": { + "title": "PolicyId", + "dataType": "bytes" + }, + "commit/Datum": { + "title": "Datum", + "anyOf": [ + { + "title": "Datum", + "dataType": "constructor", + "index": 0, + "fields": [ + { + "title": "party", + "$ref": "#/definitions/Data" + }, + { + "title": "commits", + "$ref": "#/definitions/Data" + }, + { + "title": "head_id", + "$ref": "#/definitions/PolicyId" + } + ] + } + ] + }, + "commit/Redeemer": { + "title": "Redeemer", + "anyOf": [ + { + "title": "ViaCollectCom", + "dataType": "constructor", + "index": 0, + "fields": [] + }, + { + "title": "ViaAbort", + "dataType": "constructor", + "index": 1, + "fields": [] + } + ] + } + } +} \ No newline at end of file diff --git a/hydra-plutus/scripts/mHead.plutus b/hydra-plutus/scripts/mHead.plutus index 47f5d66dfb9..06db58fe4de 100644 --- a/hydra-plutus/scripts/mHead.plutus +++ b/hydra-plutus/scripts/mHead.plutus @@ -1,5 +1,5 @@ { "type": "PlutusScriptV2", - "description": "hydra-mHead-0.18.1-138-g0dc75964c", - "cborHex": "5911635911600100003332323233223322323233223232323232323232323232222225335325335323232325335333573400203a0382244002264a66a666ae6800407807444880084c07d24103505431003370e900100199b8748000008d55cf0011aab9d0013754006266014921034d30360053353330082232333573400203803666e3c008004c024004c02cd40048800884cc074894cd40044070884d4008894cd4c8ccd5cd00081081019b88001480004c01800c407c004406054cc8d4cc02d241034d303100323301e225335001101c22153353500a2235004223253353335734002048046264666ae68004094090cdc3802001081199b8f004002101f130040010013301d225335001101a22133501b350022200230040013500122222222222200c15332323232323235330114901034d30320032333573400204204066e1cc94cd4ccc04088c8ccd5cd00081201199b8f00200150073013008213002001148000c8cc88c88c008004c098894cd4004400c884d400888cc020004c01800cc00488008c004880048cc00488cdc0001000a400066e0000520021325335330124901034d3033003302422533500110222213500222325335333573400205004e2602c0042600e00866e3c00801cd54014880044c94cd54cc8d4cc0512401034d30340032333573400204804666e1c010cc0184488c88c008004c0a0894cd4004400c884cc018008c0100040044cc06494cd4ccc04c88c8ccd5cd00081381319b8f002001004001215335001130264901034d303800221350022253350031533532333573400205405266e1c005200210291302a491034d303800221302c491034d30380013025491034d303700001330252253350011022221335023350022200130040010011021153353301825333500115016215335301b00121330164901034d31320032333573400204c04a66e3c0040144c0952401034d31320021501733025225335001102222133502335002220023004001001133013491034d303500533532333573400204604466e3cc01088800c0084d4c01088800888d403c88c94cd4ccd5cd000813813099199ab9a0010280273370e008004204c66e3c010008408440844084cc01803802040814018c00488800554d5400888ccd400854054854cd4cccccc06400488c94c8c8c8c8c8cd4ccd5cd0030148140a99a9999aab9f0072502323232302633027002001357440126ae840200ac84d4004894cd4c014008854cd4cccd55cf80112813919191815198158010009aba20043574200605e426a00244a66a66a01601800442a66a6666aae7c008940ac8c8c8c0b8cc0bc008004d5d10021aba10030332135001225335302b00221533533335573e0044a05e4646460640046ae88010d5d080181b90a99a9999998170009119299a999ab9a0010390381533533335573e0044a06646464606c6606e0040026ae88010d5d080181d909a80091299a99999981a0011119299a999ab9a00103f03e1533533335573e0044a0724646460780046ae88010d5d080182090a99a981b80090981d8008a81c8a81c0a81c19b8748000008940d8940d8940d8940d8854cd4cccd55cf8011281b91919181d0011aba20043574200607e42a66a6030002426072660760060022a06e2a06c2a06a2a0642a06466e1d20000022503025030250302503021303112222333300200f00b0070051300e4984c035261300c4984c02526130084984c01526130044984c00526130014988c94c8cd4ccd5cd0010158150a99a9999aab9f00925025232323028002357440166ae840280b4854cd4cccccc09000488c94cd4ccd5cd0008178170a99a9999aab9f0022502923232302c3302d002001357440086ae8400c0c484d4004894cd4c0a4008854cd4cccd55cf80112816919191818198188010009aba20043574200606a426a00244a66a66a02202400442a66a6666aae7c008940c48c8c8c0d0cc0d4008004d5d10021aba10030392135001225335301300221533533335573e0044a06a464646070660720040026ae88010d5d080181e909a80091299a980c00110a99a9999aab9f0022503923232303c002357440086ae8400c104854cd4c0dc00484c0ec48ccccc004040030020010008540e4540e0540dc540d0540cc540c0540bc540b0540ac540a0540a0cdc3a40000044a04c4a04c4a04c4a04c42604e24444600200a260049309800a4c260029311929919a999ab9a00202d02c1533533335573e0164a04e4646460540046ae88034d5d080601790a99a9999998130009119299a999ab9a0010310301533533335573e0044a05646464605c6605e0040026ae88010d5d0801819909a80091299a981580110a99a9999aab9f0022502f23232303233033002001357440086ae8400c0dc84d400488c94cd4cc00405400c854cd4cccd55cf8019281a11919181b9981c0010009aba200535742008078426a00244a66a602c00442a66a6666aae7c008940e08c8c8c0eccc0f0008004d5d10021aba10030402135001225335301b00221533533335573e0044a07846464607e660800040026ae88010d5d0801822109a80091299a980f80110a99a9999aab9f0022504023232304333044002001357440086ae8400c12084d4004894cd4c100008854cd4cccd55cf80112822119191823998240010009aba200435742006098426a00244a66a608800442a66a6666aae7c008941208c8c8c12ccc130008004d5d10021aba100305021350012253353301904800221533533335573e0044a09846464609e0046ae88010d5d080182a10a99a98168009098270919999999980081080e00c00a0080060040020010a8260a8258a8250a8238a8230a8218a8210a81f8a81f0a81d8a81d0a81b8a81b0a8198a81928098a8170a8168a8150a81519b8748000008940a0940a0940a0940a084c0a448888c0100144c00926130014984c005262325335333573400205c05a26050244440062a04e66e1d200600c3370e900200519b87480080208cccccc08000488c94cd4ccd5cd0008158150a99a9999aab9f00225025232323028002357440086ae8400c0b4854cd4c01800484c09c004540945409054090cdc3a40000044a0444a0444a0444a044466666603e00244a0444a0424a042460440024a042264464466666604200244a0484a0460044a0464a0466054446666aae7c004801494cd4c010d5d080110a99a98021aba2003213026335029002001150241325024300335744004056603e0464a66a60380024260400022a03c66e1d20000022501b2501b2501b2501b21533335001215017150162222132123330010040030023300911223223002001302b2253350011003221330060023004001003215017130224901034d3039002150162335500122337000029001240002a66a660020100062603a9201034d313100221533500110022213021491034d3131002233020225335001101d22132533535003222235004223350022502223253353335734002054052260486604a00c00e2a04666e3c00403884cd40800040084004c010004d40048888888888880284c0280084064d4004880084060c8c8c8c94cd4ccd5cd00080e00d89919191991091980080180119191919299a999ab9a001023022132323232323232323232332333233333233323332222222222221233333333333300100d00c00b00a009008007006005004003002330032323232325335333573400206c06a26644246600200600460306ae84008c018d5d09aba200213037490103505431003370e90000011aab9e00235573a0026ea8004d5d08081aba100e330030013574201a464646464a66a666ae680040d40d04c8c8c8cccc888848cccc00401401000c008c8c8c8c94cd4ccd5cd00081e01d89991091980080180118101aba10023300501f357426ae880084c0f5240103505431003370e90000011aab9e00235573a0026ea8d5d080298049aba1003323232325335333573400207807622444006264a66a666ae680040f40f04c84888c004010dd71aba10031325335333573400207c07a264244460040086ae840104c0fd24103505431003370e900200219b874800800ccdc3a40000046aae78008d55ce8009baa3574200466002eb8d5d09aba200222323232325335333573400207a0782a06c264a66a666ae680040f80f44c0e0c01cd5d08018981fa4903505431003370e900000199b8748008008d55cf0011aab9d00137540026ae88004d5d10010981b24903505431003370e90000011aab9e00235573a0026ea8004c004d5d080598009aba100a3002300275a6ae84020d5d08039aba10063300175c6ae840148c88c008dd60009819111999aab9f0012030233502f30043574200460066ae880080ccd5d08019980090009aba10022322300237560026062446666aae7c00480bc8c8cd40bccc0b4dd71aab9d001300535573c00260086ae8800cd5d08010191aba1357440026ae88004d5d10009aba2001357440026ae88004d5d10009aba2001357440026ae88004d5d10010981224903505431003370e90000011aab9e00235573a0026ea8d5d080299191919299a999ab9a001023022132122223003005375c6ae840084c94cd4ccd5cd00081201189909111180080298031aba10031325335333573400204a04826424444600400a60106ae840104c94cd4ccd5cd00081301289909111180200299191919299a999ab9a00102a029132122222223005008300d35742004264a66a666ae680040ac0a84c848888888c01c020c038d5d0801899299a999ab9a00102c02b133221222222233006009008300f357420086eb8d5d09aba20041325335333573400205a0582664424444444660040120106eb8d5d08029bae357426ae880144c94cd4ccd5cd0008170168999109111111198008048041bae3574200c6eb4d5d09aba20061325335333573400205e05c224444444008264a66a666ae680040c00bc44888888800c4c0c524103505431003370e900600419b874802801ccdc3a401000c66e1d20060053370e900200219b874800800ccdc3a40000046aae78008d55ce8009baa3574200a2604e920103505431003370e900300299b8748010010cdc3a400400666e1d200000235573c0046aae74004dd51aba13574400a464646464a66a666ae6800408c0884cc07cc8c8c8c94cd4ccd5cd00081381309bae357420042605092103505431003370e90000011aab9e00235573a0026ea8d5d08011bad357426ae880084c09124103505431003370e90000011aab9e00235573a0026ea80048c8c8c8c94cd4ccd5cd000811010899091180100198031aba10021325335333573400204604426466644424466600200a0080066eb4d5d08021bad357420026eb4d5d09aba20013574400626048920103505431003370e900100199b8748000008d55cf0011aab9d0013754002464646464a66a666ae680040840804c8488c00800cdd71aba10021325335333573400204404226424460020066eb8d5d080189811a48103505431003370e900100199b8748000008d55cf0011aab9d00137540022603a920103505431003370e90000011aab9e00235573a0026ea80045261301949103505435003015225335001101322135002223253353335734002032030264666ae68004068064cdc3801240042600e00866e3c00922010b48796472614865616456310022322300200130162253350011500e22135002225335330080020071301300113006003235001223233335002250022001250022500213263357389201024c68000152253350011011133573800402046a0024444444444440102601c921034d3132001300d491034d3039001300c491034d31300023223002001300e225335001100d2215335300500213004001100e2333333002001225005250042500425004230050012222223333333574800c4646600e6aae74004d55cf0009baa00723005375600e460086eb001c8c00cdd6803918011bae007010212230020031122001221233001003002221233001003002122002122122330010040031220021220012326335738002004240024646002002460044660040040029111c2fac819a1f4f14e29639d1414220d2a18b6abd6b8e444d88d0dda8ff0048811c04fa9fa7d6f2dac870291a1f2274a268b64401d91d92b4bf1423843b0001" + "description": "hydra-mHead-0.19.0-96-g4d48208d28", + "cborHex": "5911635911600100003332323233223322323233223232323232323232323232222225335325335323232325335333573400203a0382244002264a66a666ae6800407807444880084c07d24103505431003370e900100199b8748000008d55cf0011aab9d0013754006266014921034d30360053353330082232333573400203803666e3c008004c024004c02cd40048800884cc074894cd40044070884d4008894cd4c8ccd5cd00081081019b88001480004c01800c407c004406054cc8d4cc02d241034d303100323301e225335001101c22153353500a2235004223253353335734002048046264666ae68004094090cdc3802001081199b8f004002101f130040010013301d225335001101a22133501b350022200230040013500122222222222200c15332323232323235330114901034d30320032333573400204204066e1cc94cd4ccc04088c8ccd5cd00081201199b8f00200150073013008213002001148000c8cc88c88c008004c098894cd4004400c884d400888cc020004c01800cc00488008c004880048cc00488cdc0001000a400066e0000520021325335330124901034d3033003302422533500110222213500222325335333573400205004e2602c0042600e00866e3c00801cd54014880044c94cd54cc8d4cc0512401034d30340032333573400204804666e1c010cc0184488c88c008004c0a0894cd4004400c884cc018008c0100040044cc06494cd4ccc04c88c8ccd5cd00081381319b8f002001004001215335001130264901034d303800221350022253350031533532333573400205405266e1c005200210291302a491034d303800221302c491034d30380013025491034d303700001330252253350011022221335023350022200130040010011021153353301825333500115016215335301b00121330164901034d31320032333573400204c04a66e3c0040144c0952401034d31320021501733025225335001102222133502335002220023004001001133013491034d303500533532333573400204604466e3cc01088800c0084d4c01088800888d403c88c94cd4ccd5cd000813813099199ab9a0010280273370e008004204c66e3c010008408440844084cc01803802040814018c00488800554ccd4d54008880085404c854cd4cccccc05c00488c94c8c8c8c8c8cd4ccd5cd0030138130a99a9999aab9f0072502123232302433025002001357440126ae840200a484d4004894cd4c014008854cd4cccd55cf80112812919191814198148010009aba20043574200605a426a00244a66a66a01601800442a66a6666aae7c008940a48c8c8c0b0cc0b4008004d5d10021aba10030312135001225335302900221533533335573e0044a05a4646460600046ae88010d5d080181a90a99a9999998160009119299a999ab9a0010370361533533335573e0044a0624646460686606a0040026ae88010d5d080181c909a80091299a9999998190011119299a999ab9a00103d03c1533533335573e0044a06e4646460740046ae88010d5d080181f90a99a981a80090981c8008a81b8a81b0a81b19b8748000008940d0940d0940d0940d0854cd4cccd55cf8011281a91919181c0011aba20043574200607a42a66a603000242606e660720060022a06a2a0682a0662a0602a06066e1d20000022502e2502e2502e2502e21302f12222333300200f00b0070051300e4984c035261300c4984c02526130084984c01526130044984c00526130014988c94c8cd4ccd5cd0010148140a99a9999aab9f00925023232323026002357440166ae840280ac854cd4cccccc08800488c94cd4ccd5cd0008168160a99a9999aab9f0022502723232302a3302b002001357440086ae8400c0bc84d4004894cd4c09c008854cd4cccd55cf80112815919191817198178010009aba200435742006066426a00244a66a66a02202400442a66a6666aae7c008940bc8c8c8c0c8cc0cc008004d5d10021aba10030372135001225335301300221533533335573e0044a06646464606c6606e0040026ae88010d5d080181d909a80091299a980c00110a99a9999aab9f0022503723232303a002357440086ae8400c0fc854cd4c0d400484c0e448ccccc004040030020010008540dc540d8540d4540c8540c4540b8540b4540a8540a45409854098cdc3a40000044a0484a0484a0484a04842604a24444600200a260049309800a4c260029311929919a999ab9a00202b02a1533533335573e0164a04a4646460500046ae88034d5d080601690a99a9999998120009119299a999ab9a00102f02e1533533335573e0044a0524646460586605a0040026ae88010d5d0801818909a80091299a981480110a99a9999aab9f0022502d23232303033031002001357440086ae8400c0d484d400488c94cd4cc00405400c854cd4cccd55cf8019281911919181a9981b0010009aba200535742008074426a00244a66a602c00442a66a6666aae7c008940d88c8c8c0e4cc0e8008004d5d10021aba100303e2135001225335301b00221533533335573e0044a07446464607a6607c0040026ae88010d5d0801821109a80091299a980f80110a99a9999aab9f0022503e23232304133042002001357440086ae8400c11884d4004894cd4c0f8008854cd4cccd55cf80112821119191822998230010009aba200435742006094426a00244a66a608400442a66a6666aae7c008941188c8c8c124cc128008004d5d10021aba100304e21350012253353301904600221533533335573e0044a09446464609a0046ae88010d5d080182910a99a98168009098260919999999980081080e00c00a0080060040020010a8250a8248a8240a8228a8220a8208a8200a81e8a81e0a81c8a81c0a81a8a81a0a8188a81828098a8160a8158a8140a81419b87480000089409894098940989409884c09c48888c0100144c00926130014984c00526232533533357340020580562604c244440062a04a66e1d200600c3370e900200519b87480080208cccccc07800488c94cd4ccd5cd0008148140a99a9999aab9f00225023232323026002357440086ae8400c0ac854cd4c01800484c0940045408c5408854088cdc3a40000044a0404a0404a0404a040466666603a00244a0404a03e4a03e460400024a03e264464466666603e00244a0444a0420044a0424a0426050446666aae7c004801494cd4c010d5d080110a99a98021aba2003213024335027002001150221325022300335744004052603a0424a66a603400242603c0022a03866e1d2000002250192501925019250192153333500121501515014222213212333001004003002330071122322300200130292253350011003221330060023004001003215015130204901034d3039002150142335500122337000029001240002a66a660020100062603a9201034d313100221533500110022213021491034d3131002233020225335001101d22132533535003222235004223350022502223253353335734002054052260486604a00c00e2a04666e3c00403884cd40800040084004c010004d40048888888888880284c0280084064d4004880084060c8c8c8c94cd4ccd5cd00080e00d89919191991091980080180119191919299a999ab9a001023022132323232323232323232332333233333233323332222222222221233333333333300100d00c00b00a009008007006005004003002330032323232325335333573400206c06a26644246600200600460306ae84008c018d5d09aba200213037490103505431003370e90000011aab9e00235573a0026ea8004d5d08081aba100e330030013574201a464646464a66a666ae680040d40d04c8c8c8cccc888848cccc00401401000c008c8c8c8c94cd4ccd5cd00081e01d89991091980080180118101aba10023300501f357426ae880084c0f5240103505431003370e90000011aab9e00235573a0026ea8d5d080298049aba1003323232325335333573400207807622444006264a66a666ae680040f40f04c84888c004010dd71aba10031325335333573400207c07a264244460040086ae840104c0fd24103505431003370e900200219b874800800ccdc3a40000046aae78008d55ce8009baa3574200466002eb8d5d09aba200222323232325335333573400207a0782a06c264a66a666ae680040f80f44c0e0c01cd5d08018981fa4903505431003370e900000199b8748008008d55cf0011aab9d00137540026ae88004d5d10010981b24903505431003370e90000011aab9e00235573a0026ea8004c004d5d080598009aba100a3002300275a6ae84020d5d08039aba10063300175c6ae840148c88c008dd60009819111999aab9f0012030233502f30043574200460066ae880080ccd5d08019980090009aba10022322300237560026062446666aae7c00480bc8c8cd40bccc0b4dd71aab9d001300535573c00260086ae8800cd5d08010191aba1357440026ae88004d5d10009aba2001357440026ae88004d5d10009aba2001357440026ae88004d5d10010981224903505431003370e90000011aab9e00235573a0026ea8d5d080299191919299a999ab9a001023022132122223003005375c6ae840084c94cd4ccd5cd00081201189909111180080298031aba10031325335333573400204a04826424444600400a60106ae840104c94cd4ccd5cd00081301289909111180200299191919299a999ab9a00102a029132122222223005008300d35742004264a66a666ae680040ac0a84c848888888c01c020c038d5d0801899299a999ab9a00102c02b133221222222233006009008300f357420086eb8d5d09aba20041325335333573400205a0582664424444444660040120106eb8d5d08029bae357426ae880144c94cd4ccd5cd0008170168999109111111198008048041bae3574200c6eb4d5d09aba20061325335333573400205e05c224444444008264a66a666ae680040c00bc44888888800c4c0c524103505431003370e900600419b874802801ccdc3a401000c66e1d20060053370e900200219b874800800ccdc3a40000046aae78008d55ce8009baa3574200a2604e920103505431003370e900300299b8748010010cdc3a400400666e1d200000235573c0046aae74004dd51aba13574400a464646464a66a666ae6800408c0884cc07cc8c8c8c94cd4ccd5cd00081381309bae357420042605092103505431003370e90000011aab9e00235573a0026ea8d5d08011bad357426ae880084c09124103505431003370e90000011aab9e00235573a0026ea80048c8c8c8c94cd4ccd5cd000811010899091180100198031aba10021325335333573400204604426466644424466600200a0080066eb4d5d08021bad357420026eb4d5d09aba20013574400626048920103505431003370e900100199b8748000008d55cf0011aab9d0013754002464646464a66a666ae680040840804c8488c00800cdd71aba10021325335333573400204404226424460020066eb8d5d080189811a48103505431003370e900100199b8748000008d55cf0011aab9d00137540022603a920103505431003370e90000011aab9e00235573a0026ea80045261301949103505435003015225335001101322135002223253353335734002032030264666ae68004068064cdc3801240042600e00866e3c00922010b48796472614865616456310022322300200130162253350011500e22135002225335330080020071301300113006003235001223233335002250022001250022500213263357389201024c68000152253350011011133573800402046a0024444444444440102601c921034d3132001300d491034d3039001300c491034d31300023223002001300e225335001100d2215335300500213004001100e2333333002001225005250042500425004230050012222223333333574800c4646600e6aae74004d55cf0009baa00723005375600e460086eb001c8c00cdd6803918011bae007010212230020031122001221233001003002221233001003002122002122122330010040031220021220012326335738002004240024646002002460044660040040029111cb512161ccb0652d7e9a0b540e4a3c808f73d6558a4bcabf374d858800048811c2253ddd95837c7aacc8635a971caaea743434152dd8dd2849bdf41620001" } diff --git a/hydra-plutus/scripts/vCommit.plutus b/hydra-plutus/scripts/vCommit.plutus deleted file mode 100644 index fe6650bee67..00000000000 --- a/hydra-plutus/scripts/vCommit.plutus +++ /dev/null @@ -1,5 +0,0 @@ -{ - "type": "PlutusScriptV2", - "description": "hydra-vCommit-0.17.0-348-gd8c94a18c3", - "cborHex": "5906cc5906c9010000323233223322323232323323232322222533533300430050033232325333573466e1d2000002112200115333573466e1d200200211220021300c00b35573c0046aae74004dd50011991919191911919192999ab9a3370e90000010999109198008018011919192999ab9a3370e9000001099191919191919191919199999999999911111111111091999999999998008068060058050048040038030028020018011980e11919192999ab9a3370e900000109991091980080180118109aba10013016357426ae880044c08c088d55cf0011aab9d00137540026ae8402cd5d08051980e0091aba100933301675ca02a6ae84020ccc059d7280a9aba10073574200c6ae84014d5d08021980e3ae357420066ae84008ccc059d710009aba1001357426ae88004d5d10009aba2001357440026ae88004d5d10009aba2001357440026ae88004d5d10009aba20011301501435573c0046aae74004dd51aba10013232325333573466e1d2000002132122223003005375c6ae8400454ccd5cd19b87480080084c848888c004014c04cd5d08008a999ab9a3370e900200109909111180100298049aba100115333573466e1d20060021321222230040053232325333573466e1d2000002132122222223005008300c357420022a666ae68cdc3a400400426424444444600e01060186ae8400454ccd5cd19b87480100084cc8848888888cc018024020c030d5d08009bae357426ae8800454ccd5cd19b87480180084cc8848888888cc008024020dd71aba1001375c6ae84d5d10008a999ab9a3370e90040010999109111111198008048041bae357420026eb4d5d09aba200115333573466e1d200a00211222222200415333573466e1d200c0021122222220031301801735573c0046aae74004dd51aba10011301501435573c0046aae74004dd51aba135744002260240226aae78008d55ce8009baa0013223232325333573466e1d200000213232333322221233330010050040030023232325333573466e1d2000002133221233001003002300c35742002660140166ae84d5d10008980b80b1aab9e00235573a0026ea8d5d0801999805bae500a35742004646464a666ae68cdc3a4000004224440062a666ae68cdc3a4004004264244460020086eb8d5d08008a999ab9a3370e9002001099091118010021aba10011301701635573c0046aae74004dd51aba10013300775c6ae84d5d10009aba200135744002260240226aae78008d55ce8009baa001223232325333573466e1d2002002112200115333573466e1d20000021321223002003300535742002260240226aae78008d55ce8009baa00123232325333573466e1d200000213212230020033005357420022a666ae68cdc3a400400426466644424466600200a0080066eb4d5d08011bad357420026eb4d5d09aba2001357440022602001e6aae78008d55ce8009baa00123232325333573466e1d20000021321223002003375c6ae8400454ccd5cd19b87480080084c8488c00400cdd71aba10011300f00e35573c0046aae74004dd5000899800bae75a4464460046eac004c05088cccd55cf800900a91919a80a9991091980080180118031aab9d001300535573c00260086ae8800cd5d08010070008a4c2601292103505435003223232325333573466e1d200000213233322212333001004003002375c6ae84008c018d5d08009bae357426ae88004d5d1000898048041aab9e00235573a0026ea8004c0048c8c8c94ccd5cd19b87480000084cc8848cc00400c008c018d5d08009bae357426ae880044c02001cd55cf0011aab9d0013754002464460046eb0004c03488cccd55cf8009007119a80698021aba100230033574400400e4646464a666ae68cdc3a4000004266442466002006004646464a666ae68cdc3a400000426eb8d5d0800898048041aab9e00235573a0026ea8d5d08009bad357426ae880044c018014d55cf0011aab9d001375400292103505431003232222350032223232533500713300a49010343303100300135300900622222222222200813300a49010343303200300235533535300900622222222222200a1300b491035054380022100222220033013225335001101022135002225333573466e3c0080204c0480044c01800cc048894cd4004403c884d4008894ccd5cd19b8f0020071301200113006003235001220022253350011008133573800400e464c66ae7000400848004c01c894cd40044010884d4008894ccd5cd19b8f00200c1333573466e1d2001001009008130060033006225335001100322135002225333573466e3c00802c4ccd5cd19b874800800402001c4c01800c488008488004488008488488cc00401000d22010b4879647261486561645631002323001001230022330020020011" -} diff --git a/hydra-plutus/scripts/vDeposit.plutus b/hydra-plutus/scripts/vDeposit.plutus index a1c877beb6e..1f7969fe094 100644 --- a/hydra-plutus/scripts/vDeposit.plutus +++ b/hydra-plutus/scripts/vDeposit.plutus @@ -1,5 +1,5 @@ { "type": "PlutusScriptV2", - "description": "hydra-vDeposit-0.18.1-27-g5d6d4b00e", - "cborHex": "590ae4590ae10100003233322232332232323232323232323232323232323322323232323232323232323232323232323232222533533322253353232325333573466e1d2000002112200215333573466e1d20020021321223001003375a6ae840044c05c060d55cf0011aab9d001375400a20346442a6a6a6aa00444444444444400a440044466aa666a00442660109210344303400333573466e24004d401c88800807807c4c061241034430330013018491034430330013300749010344303500333573466e3cdc9180f99a8058019aa8021111111111110051b9230273024302b3500622200101e01d101d1350012200222533500110191335738004030646464a666ae68cdc3a4000004264646464a666ae68cdc3a4000004264666444246660020080060046eb8d5d08011bad35742002600a6ae84d5d10009aba20011301801935573c0046aae74004dd51aba1002300b23232325333573466e1d20000021332212330010030023013357420026eb8d5d09aba20011301801935573c0046aae74004dd50008980a00a9aab9e00235573a0026ea800cc8c8c94ccd5cd19b87480000084cc8848cc00400c008c8c8c94ccd5cd19b87480000084c8c8c8c8c8c8c8c8c8c8cccccccccccc88888888888848cccccccccccc00403403002c02802402001c01801401000c008cc06006cd5d08059980c00d9aba100a3301801e35742012666048eb9408cd5d08041998123ae50233574200e660300346ae84018ccc09007dd69aba10053232325333573466e1d20000021332212330010030023232325333573466e1d20000021332212330010030023301d75a6ae84004c070d5d09aba20011302702835573c0046aae74004dd51aba10013232325333573466e1d20000021332212330010030023301d75a6ae84004c070d5d09aba20011302702835573c0046aae74004dd51aba1357440022604804a6aae78008d55ce8009baa3574200866030eb8d5d080199981200c80a9aba100233302475c02a6ae84004c074d5d09aba2001357440026ae88004d5d10009aba2001357440026ae88004d5d10009aba2001357440026ae880044c05c060d55cf0011aab9d00137546ae84004c030d5d09aba20011301401535573c0046aae74004dd5000880e09808a481035054350033028221225333573466e240092000102715335001102722133502800233530061200133702008900100089000900091919192999ab9a3370e9000001080a0a999ab9a3370e9001001080a898078081aab9e00235573a0026ea800488c8c8c94ccd5cd19b87480000084488800854ccd5cd19b87480080084c84888c00c010c014d5d08008a999ab9a3370e900200108911000898078081aab9e00235573a0026ea80048c88c008dd60009812911999aab9f0012023233502230043574200460066ae880080408c8c8c94ccd5cd19b87480000084c848888c00c014dd71aba100115333573466e1d20020021321222230010053007357420022a666ae68cdc3a400800426424444600400a60146ae8400454ccd5cd19b87480180084c848888c010014c014d5d0800898060069aab9e00235573a0026ea80048c8c8c94ccd5cd19b87480000084c848888888c014020c024d5d08008a999ab9a3370e900100109909111111180380418049aba100115333573466e1d20040021332212222222330060090083009357420026eb8d5d09aba200115333573466e1d2006002133221222222233002009008375c6ae84004dd71aba1357440022a666ae68cdc3a40100042664424444444660020120106eb8d5d08009bad357426ae8800454ccd5cd19b874802800844888888801054ccd5cd19b874803000844888888800c4c02c030d55cf0011aab9d00137540024646464a666ae68cdc3a4000004266442466002006004600a6ae84004c01cd5d09aba20011300a00b35573c0046aae74004dd500091919192999ab9a3370e900000109991091980080180118029aba1001375a6ae84d5d1000898048051aab9e00235573a0026ea80048c8c8c94ccd5cd19b87480000084dd71aba10011300800935573c0046aae74004dd50009911919192999ab9a3370e900000109919199991110919998008028020018011919192999ab9a3370e900000109991091980080180118061aba10013300a00b357426ae880044c034038d55cf0011aab9d00137546ae8400cccc035d728061aba10023232325333573466e1d20000021122200315333573466e1d200200213212223001004375c6ae8400454ccd5cd19b87480100084c84888c008010d5d0800898068071aab9e00235573a0026ea8d5d080099803bae357426ae88004d5d10009aba20011300800935573c0046aae74004dd5000911919192999ab9a3370e900100108910008a999ab9a3370e9000001099091180100198029aba10011300800935573c0046aae74004dd500091919192999ab9a3370e9000001099091180100198029aba100115333573466e1d2002002132333222122333001005004003375a6ae84008dd69aba1001375a6ae84d5d10009aba20011300600735573c0046aae74004dd500091919192999ab9a3370e900000109909118010019bae357420022a666ae68cdc3a400400426424460020066eb8d5d0800898028031aab9e00235573a0026ea80048c98cd5ce000802a481035054310013300175ceb488c88c008dd5800980d111999aab9f001201823233501833221233001003002300635573a002600a6aae78004c010d5d10019aba1002005120011220021220013014225335001100b221337146eccd40088888cdd2a400066ae80d401088cdd2a400066ae80c02c008cd5d019806119a800919ba548000cd5d018068009bb10102223374a900119aba0375000666ae80dd400119aba037500026ec4048004dd880719aba033300b75266016ea48dd400080199aba05333500213374a90001bb100c213374a900219aba0001376201a4266e9520023357406ea4004dd880699aba03300a7520026ec4030c0100048cd40048cdd2a400066ae80dd48009bb100523374a900119aba037520026ec4014894cd400484cdd2a400066ae80c00c004dd8802899ba548008dd8802111911ba6300200130132253350011376400a4426a0044466ae80cdd8180400118038009803001a4c601e44a66a002260046006018442a66a0022004442600c600e00a601c44a66a0022016442a66a002200644266a01c6600e008004600c002601a444a66a0042002442a66a006200864442a666a6602200a0042a006266a01e0046601000e0022a006266a0180046600a002006601844a66a00220064426a0044466e28004c01800d22010035003222001350022220023500122200333230010012212323330022300222230030042300222230020042300222230010042353300400400335003001122223330042533500113350060070072215335001133500800300922153233353300d00500315001133300800333500b00500c002150011333006002233500b00500100122253350011335008335008003002300600932221533353300d00600215003133300800233500b0060050011500313350083350080030023006001222532335002130014988854c8ccd4cc03801c00c540044c011261500113330070022300633500c0070010012335009300333500900400a30070021220021221223300100400332223500222350022235005223500222533353300b00600215333573466e1c014004403854ccd5cd19b89005001100c100d13300b00600213300b006002225333573466e3c008004401454ccd5cd19b91002001100310041222003122200212220012323001001230022330020020011" + "description": "hydra-vDeposit-0.19.0-96-g4d48208d28", + "cborHex": "590bae590bab0100003233223332223233223232323232323232323232323232323232323232323232323232323232323232222533533322253353232325335333573466e1d2000002031030112200215335333573466e1d20020020310301321223001003375a6ae840044c05c060d55cf0011aab9d001375400a205c6442a66a6a6a6aa00444444444444400a4400444a666a00442660109210344303400333573466e24004d401c8880080c80cc4c061241034430330013018491034430330013300549010344303500333573466e3cdc9180d99a8048009aa8011111111111110051b923023302030273500422200103002f102f13500122002225335001102d1335738004058646464a66a666ae68cdc3a400000405c05a264646464a66a666ae68cdc3a4000004064062264666444246660020080060046eb8d5d08011bad35742002600a6ae84d5d10009aba20011301801935573c0046aae74004dd51aba1002300b23232325335333573466e1d20000020320311332212330010030023013357420026eb8d5d09aba20011301801935573c0046aae74004dd50008980a00a9aab9e00235573a0026ea800cc8c8c94cd4ccd5cd19b87480000080b80b44cc8848cc00400c008c8c8c94cd4ccd5cd19b87480000080c40c04c8c8c8c8c8c8c8c8c8c8cccccccccccc88888888888848cccccccccccc00403403002c02802402001c01801401000c008cc06006cd5d08059980c00d9aba100a3301801e35742012666048eb9408cd5d08041998123ae50233574200e660300346ae84018ccc09007dd69aba10053232325335333573466e1d200000203e03d1332212330010030023232325335333573466e1d20000020410401332212330010030023301d75a6ae84004c070d5d09aba20011302702835573c0046aae74004dd51aba10013232325335333573466e1d20000020410401332212330010030023301d75a6ae84004c070d5d09aba20011302702835573c0046aae74004dd51aba1357440022604804a6aae78008d55ce8009baa3574200866030eb8d5d080199981200c80a9aba100233302475c02a6ae84004c074d5d09aba2001357440026ae88004d5d10009aba2001357440026ae88004d5d10009aba2001357440026ae880044c05c060d55cf0011aab9d00137546ae84004c030d5d09aba20011301401535573c0046aae74004dd5000880c89808a481035054350033028221225335333573466e24009200002b02a10251533500110252213350260023353006120013370200890010008900090009191919299a999ab9a3370e900000101481408140a99a999ab9a3370e90010010148140814898078081aab9e00235573a0026ea800488c8c8c94cd4ccd5cd19b87480000080a40a04488800854cd4ccd5cd19b87480080080a40a04c84888c00c010c014d5d08008a99a999ab9a3370e900200101481408911000898078081aab9e00235573a0026ea80048c88c008dd60009812911999aab9f0012021233502030043574200460066ae880080408c8c8c94cd4ccd5cd19b87480000080980944c848888c00c014dd71aba100115335333573466e1d20020020260251321222230010053007357420022a66a666ae68cdc3a400800404c04a26424444600400a60146ae8400454cd4ccd5cd19b87480180080980944c848888c010014c014d5d0800898060069aab9e00235573a0026ea80048c8c8c94cd4ccd5cd19b87480000080940904c848888888c014020c024d5d08008a99a999ab9a3370e900100101281209909111111180380418049aba100115335333573466e1d20040020250241332212222222330060090083009357420026eb8d5d09aba200115335333573466e1d2006002025024133221222222233002009008375c6ae84004dd71aba1357440022a66a666ae68cdc3a401000404a0482664424444444660020120106eb8d5d08009bad357426ae8800454cd4ccd5cd19b874802800809409044888888801054cd4ccd5cd19b874803000809409044888888800c4c02c030d55cf0011aab9d00137540024646464a66a666ae68cdc3a4000004048046266442466002006004600a6ae84004c01cd5d09aba20011300a00b35573c0046aae74004dd50009191919299a999ab9a3370e900000101181109991091980080180118029aba1001375a6ae84d5d1000898048051aab9e00235573a0026ea80048c8c8c94cd4ccd5cd19b87480000080880844dd71aba10011300800935573c0046aae74004dd5000991191919299a999ab9a3370e90000010110108991919999111091999800802802001801191919299a999ab9a3370e900000101381309991091980080180118061aba10013300a00b357426ae880044c034038d55cf0011aab9d00137546ae8400cccc035d728061aba10023232325335333573466e1d20000020270261122200315335333573466e1d200200202702613212223001004375c6ae8400454cd4ccd5cd19b874801000809c0984c84888c008010d5d0800898068071aab9e00235573a0026ea8d5d080099803bae357426ae88004d5d10009aba20011300800935573c0046aae74004dd500091191919299a999ab9a3370e900100101101088910008a99a999ab9a3370e9000001011010899091180100198029aba10011300800935573c0046aae74004dd50009191919299a999ab9a3370e900000101000f899091180100198029aba100115335333573466e1d200200202001f132333222122333001005004003375a6ae84008dd69aba1001375a6ae84d5d10009aba20011300600735573c0046aae74004dd50009191919299a999ab9a3370e900000100f80f09909118010019bae357420022a66a666ae68cdc3a400400403e03c26424460020066eb8d5d0800898028031aab9e00235573a0026ea80048c98cd5ce000802a49035054310013300175ceb488c88c008dd5800980d111999aab9f001201623233501633221233001003002300635573a002600a6aae78004c010d5d10019aba1002005120013016225335001100b221337146eccd40088888cdd2a400066ae80d401088cdd2a400066ae80c02c008cd5d019806119a800919ba548000cd5d018068009bb100f2223374a900119aba0375000666ae80dd400119aba037500026ec4044004dd880699aba033300c75266018ea48dd400080199aba05333500213374a90001bb100b213374a900219aba000137620184266e9520023357406ea4004dd880619aba03300a7520026ec402cc0100048cd40048cdd2a400066ae80dd48009bb100423374a900119aba037520026ec4010894cd400484cdd2a400066ae80c00c004dd8802099ba548008dd8801a4c446446e98c008004c05088cd40052f5bded8c0446a0044466ae80cdd8180400118038009803001980891299a800898011801806110a99a800880111098031803802980811299a8008805910a99a800880191099a8071980380200118030009807911299a8010800910a99a801880219110a999a998088028010a801899a807801198040038008a801899a80600119802800801980711299a80088019109a8011119b8a001300600348810035003222001350022220023500122200333230010012212323330022300222230030042300222230020042300222230010042353300400400335003001122223330042533500113350060070072215335001133500800300922153233353300d00500315001133300800333500b00500c002150011333006002233500b00500100122253350011335008335008003002300600932221533353300d00600215003133300800233500b0060050011500313350083350080030023006001222532335002130014988854c8ccd4cc03801c00c540044c011261500113330070022300633500c0070010012335009300333500900400a30070021220021221223300100400332223500222350022235005223500222533353300b00600215335333573466e1c01400404003c403854cd4ccd5cd19b8900500101000f100c100d13300b00600213300b006002225335333573466e3c00800401c018401454cd4ccd5cd19b91002001007006100310041222003122200212220011220021220012323001001230022330020020011" } diff --git a/hydra-plutus/scripts/vHead.plutus b/hydra-plutus/scripts/vHead.plutus index b49363137fe..4e1ba156abd 100644 --- a/hydra-plutus/scripts/vHead.plutus +++ b/hydra-plutus/scripts/vHead.plutus @@ -1,5 +1,5 @@ { "type": "PlutusScriptV2", - "description": "hydra-vHead-0.18.1-138-g0dc75964c", - "cborHex": "5927bd5927ba01000032323332223233223232323232332232323322323232332232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323333222232323232323232323232323232323232323232323232323232323232322225335323232532333350043232323232215333333350091306a49884c1ad261306a498c8c8c8c8854cd4c061402c54cd54ccd5cd19b8735302d00d2222222220065005107b1335738921034831330007a153355333573466e254024d40188888888880144cd5ce2481034833310007a107b1533500123003533533300d500533333301550045006500a35302e00e22222222200430280870135302e00e222222222003001107c13357389201034833390007b22300453355333573466e3cd4c0bc03c88888888800cc0a4220044ccc0394018cccccc0594014cdc0a803a4004a0166a605e01e44444444400860521100200200420f820fa266ae712401034834300007c107a107a107a3232322335001153353302100f50051533553353323223002001308f012253350011080012215333573466e3c0140084204044c0100054031400841f44cd5ce2481034833380007c1535500d2222222222223535005220012233553335002215333573466e24005404c4230044cd5ce2481034833320008b011506115061153355335333502b08801501733509501501a5010108b011335738921034833360008a01153355335333573466e1cc1d5405cc1d9406022c042280454ccd5cd19b8735303d01d2222222220015012108b011335738921034833340008a0115333573466e1cd4c0f4074888888888004cdc028092808884580899ab9c491034833350008a011533533302a330900150185014330900135303d01d2222222220075011330900135303d01d2222222220095013153353303a5335304a01d21350012235001222200310960135533535501b22222222222200a130720352210022222003108b01133573892010248340008a01108a01108a01108a01108a01107c107c107c13500622222222200213500522222222200713500422222222200113500322222222200913500222222222200813500122222222200621306b498884d4028894cd4ccc06cd4008888888888888020d4014888888888024d4014888888888020c854cd54ccd5cd19b8f3027335017005500135006222222222004107b13357389201034834310007a153355333573466e3cd401888888888800cc09cc8cd4060014004cd408c015400441ec4cd5ce249034834320007a1350032222222222223535005220022253335002215333573466e24004d40548888888880044cd5ce2481034834330008901108a011507515075107a107a13500222222222222200a107921306b4984d4c0980188888888880084d4c0940148888888880204d4c09001088888888801454d54004888888888888cd40104c151262215335001100222130584984d4008880084c19126222323232215323333333500b1500121500213500a225332355333573466e3cd4c0b803488888004c0a4d5400488800c41ec4cd5ce2481034831370007a153355333573466e1d200035302e00d22222002107b1335738921034832300007a1533533301a330800135302e00d2222200400a330800135302e00d2222200300b330800135302e00d222220050091533553353302453500322222222222233500a10920122130770013232333074076002305200135004222222222222009355001222001107b1335738921034831390007a15335533530085335303a00d213500122350012222003108601107b1335738921034831360007a153355335333573466e1cd54004888008c1ac0281ec1e841ec4cd5ce249034831380007a153353301f00d00913018003107a107a107a107a107a107a130063500222222222222200c10792150022150022215003215002153333333500a13500922533533301a3500222222222222200800700832153353301e00c0081533533077302850013026335016306750013500322222222222200a107a133573892103483135000791079133004084013500222222222222200c107821306c4984c1ad2621306c49884c1b126221306d49884c1b1263086012232253350011003221350022253353304500b0011330083006304900100313300800700330880122533500110032213350850100230040013085012253350011333043081014800020404884c8d400c88d400c8c8894cd4cc0ecd40148888010d4c0f404488d40048888010401c54cd4cc11c0340144ccc130c00cc12c014cdc02400400400226660980080046660ec0f00026a00a4444006611a0244a66a002200644266a114020046008002600800261080244a66a00220e84426a00444a666ae68cdc780100389834000898030019919191910a9999999a80409834a4c6464646442a66a602ea0142a66aa666ae68cdc499b81353535500a222222222222005220012253335002210011506f1506f353535500a222222222222005220022253335002210011506e1506e5004107a133573892010348323200079153355333573466e1cd4c0b0030888888888004c8d403488d4008888888888888d4d401488004894ccd400884cdc00008090a83e0a83e2802083d099ab9c4910348323300079153353301e00c5003153355333573466e1cd4c0b0030888888888019400841e84cd5ce24903483133000791533553335001153355333573466e1d2000500215333573466e1d200035302c00c2222222220051333573466e3cd4c0b0030888888888010d4018888880041e81e441e441e441e84cd5ce2481034832380007921533533300c50063333330145004500335302d00d22222222200535302d00d22222222200430270860135302d00d222222222003001107b13357389201034832390007a22153355333573466e3cd4c0b803888888888800cc0a021c044ccc035401ccccccc0554014cdc0a802240046a605c01c44444444400a6a605c01c444444444008605010e0200200420f620f8266ae712401034833300007b153355335535302c00c22222222233500210830122108401107a133573892010348323600079153355335330295335303900c21350012235001222200310850135533535500a22222222222200a130610242210022222003107a133573892010248340007913330193307f35302c00c22222222200850053307f35302c00c22222222200750043307f35302c00c222222222009500310791079107910791079107910791079135004222220021350032222200513500222222003135001222220041306949884c1a92632322153353330173307d350042222200450063307d350042222200335302b00a222220033307d5003500532153355333573466e1cd4c0b002c88888008cdc024004a00620f2266ae7124103483231000781533533300a5007333333012500650033500222200235302c00b222220013025084013025500135002222003153355335330225335303800b2135001223500122220031084013330700723553355008130600232210022222003306f50011079133573892010248340007813301d00b5004107810781078133501435001222001533550071305f491035054390022100110771350022222200213500122222005221306b498841d84d4c098014888880144d4c094010888880104d400c88d40088888888888880284d40088800888c894cd54cd4ccd5cd19b87300d004300e00107307213002335500b004001107210731335738921034831320007230820122533500110732215350022233533500722222223335734666e54024cdc51bb3375200e66e28dd99ba8006337146eccdd400299b8a37666ea4010cdc51bb337520066eccdd480100083f03e80089803001883b1919192999ab9a3370e90000010999109198008018011919192999ab9a3370e9000001099191919191919191919199999999999911111111111091999999999998008068060058050048040038030028020018011983302d9aba100b3306605b35742014660cc0bc6ae84024ccc189d728309aba100833306275ca0c26ae8401ccc198168d5d080319983102fbad3574200a646464a666ae68cdc3a4000004266442466002006004646464a666ae68cdc3a4000004266442466002006004660bceb4d5d0800982e9aba135744002260d60d46aae78008d55ce8009baa35742002646464a666ae68cdc3a4000004266442466002006004660bceb4d5d0800982e9aba135744002260d60d46aae78008d55ce8009baa357426ae880044c1a019cd55cf0011aab9d00137546ae84010cc199d71aba1003333062059056357420046660c4eb8158d5d0800982e9aba1357440026ae88004d5d10009aba2001357440026ae88004d5d10009aba2001357440026ae88004d5d10008982d82d1aab9e00235573a0026ea8d5d080098261aba135744002260b00ae6aae78008d55ce8009baa0033232325333573466e1d200000211222222200515333573466e1d20020021321222222230010083232325333573466e1d20000021120011305a05935573c0046aae74004dd51aba100115333573466e1d20040021321222222230030083232325333573466e1d2000002132333222123330010040030023305c75c6ae84008dd69aba1001375a6ae84d5d10009aba20011305a05935573c0046aae74004dd51aba100115333573466e1d20060021321222222230060083232325333573466e1d20000021122200315333573466e1d2002002132122230020043305b75c6ae8400454ccd5cd19b87480100084cc884888cc004014010cc16dd71aba1001375c6ae84d5d10008982d02c9aab9e00235573a0026ea8d5d08008a999ab9a3370e90040010990911111118020041919192999ab9a3370e900000109909118010019982dbae357420022a666ae68cdc3a40040042664424466002008006660b6eb8d5d08009bae357426ae880044c168164d55cf0011aab9d00137546ae8400454ccd5cd19b874802800844888888801c54ccd5cd19b87480300084cc8848888888cc008024020dd69aba1001375a6ae84d5d10008982b82b1aab9e00235573a0026ea800cc8c8c94ccd5cd19b87480000084c8c8cccc09cc158d5d08019982c82d1aba1002375c6ae84004c13cd5d09aba2001357440026ae8800454ccd5cd19b87480080084c090c8c8c94ccd5cd19b87480000084c8c8c8ccccc0bcdd71aba10043305d05e3574200660b46ae84008dd69aba1001375c6ae84d5d10009aba2001357440026ae880044c164160d55cf0011aab9d00137546ae8400454ccd5cd19b87480100084c09cc8c8c94ccd5cd19b87480000084c8c8c8c8c8c8c8ccccccccc0c8dd71aba1008330610623574200e60bc6ae84018dd69aba1005375a6ae84010dd71aba1003375c6ae84008cc185d71aba1001375a6ae84d5d10009aba2001357440026ae88004d5d10009aba2001357440026ae880044c164160d55cf0011aab9d00137546ae8400454ccd5cd19b874801800840984c158154d55cf0011aab9d0013754006205c260a69201035054350033079221122533500210772215335003107922133507a33075004002335530081200100300112001222222123333330010070060050040030023077225335001148000884cdc024004600800260ec44a66a0022900011099b8048008c010004cc1d4884894ccd5cd19b890024800041cc54cd400441cc884cd41d0008cd4c01848004cdc0802240040022400246a002444444444444a66a601c01020e0266ae71241035530310006f30732253350011064223213500322300300130772253350011300600322135002225333573466e1d200000113006003106b22235003223500422350052253355335333500a067006005153353302700400313306700200110691069106a133573892102483200069330712212225335002153350011065221066221533500310662215335330070040021333530091200100700300110681200122232330742253350011300348000884d4008894ccd5cd19b8f002009130073370201c60180022600c0060084a666ae68cdc380099b8048008c014008418c4cd5ce24810348313400062306f225335001148000884cdc024004600800260dc44a66a00220084426a0044466e00004c01800c88c8d400c894cd4c01cd40088888888888880104c98cd5ce24902483600056232215335001153353002300b30063500522222222222200c10641335738921024835000632213263357389210248370005b30732253350011063221533533063005002106613004001306f225335001106b22135002223232330772253350011003221335074002300400100230070043302d00735001222200348000c1ac894cd4004419c884cd41a0008c010004c1a8894cd40044198884cd419c008c010004cc1a4884894ccd5cd19b8900248000400454cd4004419c884cd4c01848004cdc080224004002240026444666660060ae4600c0026660060ae4666ae68cdc3a40000020b60b402e004002446464464446600600400260da444a66a0042600a002442a66a006260100084426a00844646a00a44a66a6602200a0042a66a6601a00800226601801000c20ce2a66a6020008266018010014266006a66a602000220e6266a0e400e0e600c60ec444a66a00220ce4426a00444a66a602800226600e00c0062a66a6602a0120042a66a660220100022660200186660fa444a66a00420024426600a00266a0f600400600c00620d626600e66a0ec00800c00660d644a66a00220b84426a00444a66a60100022600c00620be60d444a66a00220b64426a00444a66a600e0022600c00620bc920103505438003066225335001105722135002225333573466e1d200000113006003105a23724600400260c844a66a002203e44266e28dd99a801111119ba548000cd5d01a8021119ba548000cd5d0180e80119aba03301e233500123374a900019aba0301f001376204244466e9520023357406ea000ccd5d01ba80023357406ea0004dd88118009bb101f335740666018ea5402c00ccd5d02999a801099ba548000dd880e9099ba548010cd5d00009bb101e213374a900119aba037520026ec4078cd5d01980e3a9001376203a600800246e48c068c05cc16c00488ccd5cd19b8f3766666008ea5400c008dd99998023a9500300105305213300175246ea000488c88dd31801000983111299a80089bb2015221350022233574066ec0c020008c01c004c01800cc894cd4c010c02c004854cccd4004840044c00d2622221300749884c01126130024988c98cd5ce2490248330004432253353003300a001215333350012130044984c00d26222213007498840044c00926232633573892010248330004332233333302100122532333573466e1d20000031533533335573e0044a0984609a660ae6ae8400cd5d1001823109a80091299a980400110a99a9999aab9f00225050230513305b357420066ae8800c12884d4004894cd4cc09809c008854cd4cccd55cf8011282a1182a9982f9aba10033574400609c426a00244a66a605a00442a66a6666aae7c008941608c8c8c16c008d5d10021aba1003052215335302e00121305a333301500b0070030011300e4984c035261300c4984c02526130084984c01526130044984c0052613001498c894ccd5cd19b874800801054cd4cccd55cf801928269191918280011aba20053574200808e42a66a66666604c00244a666ae68cdc3a40000042a66a6666aae7c004941408c144cc16cd5d08011aba200204a2135001225335302900221533533335573e0044a0a8460aa660be6ae8400cd5d1001827109a80091299a9981501580110a99a9999aab9f002250582305933063357420066ae8800c14884d4004894cd4c050008854cd4cccd55cf8011282e1182e998339aba1003357440060ac426a00244a66a606c00442a66a6666aae7c008941808c8c8c18c008d5d10021aba100305a21533530370012130623333302100f00b007003001150601505f1505e1505b1505a150571505615053150521504f1504f2504e2504e2504e2504e21304f3009001130034984c0092613002498c894ccd5cd19b874801001054cd4cccd55cf801928269191918280011aba20053574200808e42a66a66666604c00244a666ae68cdc3a40000042a66a6666aae7c004941408c144cc16cd5d08011aba200204a2135001225335302900221533533335573e0044a0a8460aa660be6ae8400cd5d1001827109a80091299a9981501580110a99a9999aab9f002250582305933063357420066ae8800c14884d4004894cd4c050008854cd4cccd55cf8011282e1182e998339aba1003357440060ac426a00244a66a606c00442a66a6666aae7c008941808c184cc1acd5d08019aba200305a2135001225335303a00221533533335573e0044a0c8460ca660de6ae8400cd5d100182f109a80091299a981e80110a99a9999aab9f002250682306933073357420066ae8800c18884d4004894cd4c104008854cd4cccd55cf80112836118369983b9aba1003357440060cc426a00244a66a6608408a00442a66a6666aae7c008941c08c8c8c1cc008d5d10021aba100306a215335304800121307233333333303001f01b01701300f00b007003001150701506f1506e1506b1506a150671506615063150621505f1505e1505b1505a150571505615053150521504f1504f2504e2504e2504e2504e21304f300c001130034984c009261300249894ccd5cd19b874801800c4c1300205412c941249412494124941248cccccc080004894ccd5cd19b874800000854cd4cccd55cf800928251191918268011aba20033574200408842a66a60440024260980022a0942a0922a0924a0904a0904a0904a090424444600800a24444006444424444666600401000e00c00a424444600200a4444444442466666666600201401201000e00c00a00800600444444246666600200c00a008006004644a6a0024466a6a0044444444444440142600893110a99a998039a80111110021a9804802911a80091110020980f8010980324c464c66ae71241034831310003b223500222350032232335005233500425333573466e3c0080045400c413081308cd4010813094ccd5cd19b8f00200115003104c153350032153350022133500223350022335002233500223304d002001204f2335002204f23304d00200122204f222335004204f2225333573466e1c01800c54ccd5cd19b8700500213300f00400110511051104a153350012104a104a22333573466e1c00800411411094cd4c008004840044c98cd5ce24810248380003823500122350022222222222223333500d2014201420142330622253350011504d22135002225350022235009223355333573466e3c0100084ccd5cd19b8700300105b05a105a130560081300a00700d233500123374a900019aba037520026ec40108cdd2a400466ae80dd48009bb1004225335001213374a900019aba030030013762008266e952002376200693281b982691299a800898011801824910a99a800880111098031803802982611299a8008824110a99a800880191099a8259980380200118030009825911299a8010800910a99a801880219110a999a998270028010a801899a826001198040038008a801899a82480119802800801982511299a800880291099a801111b8a001300400122333573466e1d200230053300300235001222200303a039232253355335300200121303600115034213304c225335001104822132533535003225333573466e1d20020011303d0021503c2133504b00100210013004001001104530492253350011503422135002225333573466e3c00801c4c0e40044c01800d2201003046225335001148000884cdc02400460080024a66a646466666601400444a666ae68cdc3a40000042a66a6666aae7c004940d08c0d4cc0fcd5d08011aba200202e2135001225335300b00221533533335573e0044a07046072660866ae8400cd5d1001819109a80091299a980500110a99a9999aab9f0022503c23232303f002357440086ae8400c0d8854cd4c04c00484c0f8ccc04001c00c004540f0540ec540e8540dc540d8540cc540cc940c8940c8940c8940c8c0108cccccc028004894ccd5cd19b874800000854cd4cccd55cf8009281a1181a9981f9aba10023574400405c426a00244a66a601800442a66a6666aae7c008940e08c8c8c0ec008d5d10021aba1003032215335300f00121303a123300100400215038150371503615033150332503225032250322503230090012135001222002104022212333001004003002232233333300800122503125030002250302503030442233335573e002460620824a66a60086ae84008854cd4c010d5d100190981999a8210010008a818899281898019aba200202a25335300300121302e0011502c2333333004001225333573466e1d20000021533533335573e0024a05c4605e660726ae84008d5d1001014109a80091299a999999804801112999ab9a3370e90000010a99a9999aab9f00125033232323036002357440066ae840080b4854cd4c02800484c0d4004540cc540c8540c8940c4940c4940c4940c4854cd4cccd55cf8011281911919181a8011aba20043574200605842a66a6014002426068660920060022a0642a0622a0602a05a2a05a4a0584a0584a0584a058466666600600244a0584a0564a0564a05646058002466666600400244a0564a0544a054460560024a0544444446666666ae900188c8cc01cd55ce8009aab9e001375400e4600a6eac01c8c010dd6003918019bad00723002375c00e0504a6a0024444666a004264c66ae712410248390002621001213263357389210348313000027303c22533500110382213350393500222330360023302923370490008008009802000899319ab9c4901034833330001f2326335738921034833370001f200123232325333573466e1d2000002102a15333573466e1d2002002102b1301201135573c0046aae74004dd5000911919192999ab9a3370e9000001089110010a999ab9a3370e90010010990911180180218029aba100115333573466e1d2004002112220011301201135573c0046aae74004dd500091919192999ab9a3370e90000010990911118018029bae357420022a666ae68cdc3a400400426424444600200a600e6ae8400454ccd5cd19b87480100084c848888c008014c028d5d08008a999ab9a3370e900300109909111180200298029aba10011301000f35573c0046aae74004dd500091919192999ab9a3370e900000109909111111180280418049aba100115333573466e1d20020021321222222230070083009357420022a666ae68cdc3a400800426644244444446600c01201060126ae84004dd71aba1357440022a666ae68cdc3a400c0042664424444444660040120106eb8d5d08009bae357426ae8800454ccd5cd19b87480200084cc8848888888cc004024020dd71aba1001375a6ae84d5d10008a999ab9a3370e90050010891111110020a999ab9a3370e9006001089111111001898078071aab9e00235573a0026ea80048c8c8c94ccd5cd19b87480000084cc8848cc00400c008c014d5d080098039aba1357440022601c01a6aae78008d55ce8009baa00123232325333573466e1d20000021330363005357420026eb4d5d09aba20011300d00c35573c0046aae74004dd500091919192999ab9a3370e900000109bae35742002260180166aae78008d55ce8009baa0013223232325333573466e1d200000213232333322221233330010050040030023232325333573466e1d2000002133221233001003002300c35742002660140166ae84d5d1000898088081aab9e00235573a0026ea8d5d0801999805bae500a35742004646464a666ae68cdc3a4000004224440062a666ae68cdc3a4004004264244460020086eb8d5d08008a999ab9a3370e9002001099091118010021aba10011301101035573c0046aae74004dd51aba10013300775c6ae84d5d10009aba200135744002260180166aae78008d55ce8009baa001223232325333573466e1d20020021501f15333573466e1d200000213020300535742002260180166aae78008d55ce8009baa00123232325333573466e1d200000213212230020033005357420022a666ae68cdc3a400400426466644424466600200a0080066eb4d5d08011bad357420026eb4d5d09aba200135744002260140126aae78008d55ce8009baa00123232325333573466e1d20000021321223002003375c6ae8400454ccd5cd19b87480080084c8488c00400cdd71aba10011300900835573c0046aae74004dd5000899800bae75a4464460046eac004c0bc88cccd55cf800901611919a8161981398031aab9d001300535573c00260086ae8800cd5d080100a91919192999ab9a3370e900000109bad357420022600c00a6aae78008d55ce8009baa00149010350543100232633573800201e464460046eb0004c0a888cccd55cf8009013919a81318021aba100230033574400402046eb8004c09c894cd4004520002213370090011802000981311299a8008a400044266e0120023004001132633573892103483434000093024225335001148000884cdc0240046008002604644a66a002203e44266a0044444660220260066008002604444a66a00220244426a00444a666ae68cdc7a4410b4879647261486561645631000021333573466e1d2002001017016130060033021225335001148000884cdc0240046008002264c66ae712410348323700004132633573892103483235000031326335738921034832340000223263357389210248310000212001301b225335001101722133500222223300900b00330040012322230033009333500b00a002001301b225335001101722133501835002223301500233008233350012330094800000488cc0280080048cc0240052000001300400123223002001301a2253350011016221335017350022233014002300700130040012233700004002424460040062244002602a44a66a002202244266a0246a004446601e004666a0024601800244666a0140120040024601a002600800244666ae68cdc780100080280209911119191980c91299a800880191099a80b0011802000980100218029980c11299a800880a11099299a9a80191911801005980f11299a80088079109a80111299a99808001003880909803001899a80b00180088009802000801180b91299a800880991099a80a1a8011119198090019800804180e91299a80089aa8088019109a80111299a998078010040891119801005002098030019802000980991299a800880791099a8081a801111980680118060009802000891001091000980811299a800880611099a8069a801111980500118048009802000980791299a800880591099a8061a80111198048011aa8038009802000909111801802089091118008021109198008018011a8019110009a8011110011a800911001999180080091091919980111801111180180211801111180100211801111180080211a998020020019a801800891111998021299a800899a803003803910a99a800899a804001804910a99199a998068028018a800899980400199a8058028060010a8008999803001119a805802800800911299a800899a80419a804001801180300499110a999a998068030010a801899980400119a8058030028008a801899a80419a804001801180300091129919a80109800a4c442a64666a6601c00e0062a00226008930a80089998038011180319a806003800800919a804980199a80480200518038010910010910911980080200199111a801111a801111a802911a801112999a998058030010a999ab9a3370e00a002201c2a666ae68cdc480280088060806899805803001099805803001112999ab9a3371e004002200a2a666ae68cdc8801000880188020911001891100109110009109198008018011191800800918011198010010009" + "description": "hydra-vHead-0.19.0-96-g4d48208d28", + "cborHex": "592a2a592a2701000032323322333222323322323232323233223232323232332232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323333222232323232323232323232323232323232323232323232323232323232322225335323232532333350043232323232215333333350091306a49884c1ad261306a498c8c8c8c8c8c8854cd4c069403454cd54cd4ccd5cd19b8735302f00f222222222006500208c0108b01108c0113357389201034831330008b01153355335333573466e25402cd402088888888801422c04230044230044cd5ce249034833310008b01153353350012533533300f500633333301750045003500c353030010222222222004302a08701353030010222222222003001108d011335738921034833390008c012253355335333573466e3cd4c0c404488888888800cc0ac2200423804234044ccc041401ccccccc0614014cdc0a80224004a01a6a6062022444444444008605611002002004211a02211c02266ae71241034834300008d01153353302100f50031533553353323223002001308f01225335001108f012215335333573466e3c01400824404240044240044c010005403140104230044cd5ce2481034833380008b0115335353535500d222222222222005220012253335002215335333573466e24005402823c0423804423c044cd5ce249034833320008e011505515055153355335333501d07a500933508501500c5004108c011335738921034833360008b01153355335333573466e1cc19d4024c1a140282300422c0454cd4ccd5cd19b8735302f00f222222222001500708c0108b01108c0113357389201034833340008b0115335333573466e1cd4c0bc03c888888888004cdc02803a8030460084580884600899ab9c4901034833350008b011533533301c3308001500a5005330800135302f00f2222222220075006330800135302f00f2222222220095003153353302c5335303c00f21353500122001222200310860135533535500d22222222222200a130640272210022222003108c01133573892010248340008b01108b01108b01108b01108b01108b01108b01108b01108b01108b01108b0113500622222222200613500522222222200913500422222222200213500322222222200813500222222222200713500122222222200121306b498884d4028894cd4ccc06cd4008888888888888020d4014888888888024d4014888888888020c854cd54cd4ccd5cd19b8f302733501700550013500622222222200408a0108901108a011335738921034834310008901153355335333573466e3cd401888888888800cc09cc8cd4060014004cd408c015400422804224044228044cd5ce24810348343200089011353535003222222222222005220022253335002215335333573466e24004d402488888888800423004234044234044cd5ce249034834330008c01150691506910890110890113500222222222222200a10880121306b4984d4c0980188888888880084d4c0940148888888880204d4c09001088888888801454cd4d540048888888888880104c1212622153350011002221304c4984d4008880084c19126222323232215323333333500b1500121500213500a225332355335333573466e3cd4c0b803488888004c0a4d5400488800c22804224044228044cd5ce249034831370008901153355335333573466e1d200035302e00d2222200208a0108901108a01133573892010348323000089011533533301a3307e35302e00d2222200400a3307e35302e00d2222200300b3307e35302e00d222220050091533553353302453353500322222222222200a108401221306b0013232333074076002305200135004222222222222009355001222001108a01133573892103483139000890115335533530085335303a00d213535001220012222003108401108a011335738921034831360008901153355335333573466e1cd54004888008c1ac02822804224044228044cd5ce249034831380008901153353301f00d00913018003108901108901108901108901108901108901130063500222222222222200c1088012150022150022215003215002153333333500a13500922533533301a3500222222222222200800700832153353301e00c0081533533077302850013026335016306750013500322222222222200a1089011335738921034831350008801108801133004082013500222222222222200c10870121306c4984c1ad2621306c49884c1b126221306d49884c1b1263086012232253350011003221350022253353304500b001133008300630490010031330080070033088012253350011003221335083010023004001308501225335001133304307f480001fc884c8d400c88d400c8c8894cd4cc0ecd40148888010d4d4c0f4044880048888010401c54cd4cc11c0340144ccc130c00cc12c014cdc02400400400226660980080046660ec0f00026a00a4444006611a0244a66a002200644266a110020046008002600800261080244a66a0022106024426a00444a66a666ae68cdc7801003844008438089834000898030019919191910a9999999a80409834a4c6464646442a66a602ea0142a66aa66a666ae68cdc499b81353535500a222222222222005220012253335002210011506f1506f353535500a222222222222005220022253335002210011506e1506e5004089010880110890113357389201034832320008801153355335333573466e1cd4c0b0030888888888004c8d403488d4d4d400888888888888801488004894ccd400884cdc00008030a8380a83828020448084400884480899ab9c4901034832330008801153353301e00c5003153355335333573466e1cd4c0b0030888888888019400822404220044224044cd5ce24810348313300088011533553335001153355335333573466e1d20005002089010880115335333573466e1d200035302c00c22222222200508901088011333573466e3cd4c0b0030888888888010d40188888800422404220044220044220044224044cd5ce248103483238000880121533533300c50063333330145004500335302d00d22222222200535302d00d22222222200430270840135302d00d222222222003001108a011335738920103483239000890122153355335333573466e3cd4c0b803888888888800cc0a02140422c04228044ccc035401ccccccc0554014cdc0a802240046a605c01c44444444400a6a605c01c444444444008605010a02002004211402211602266ae71241034833300008a01153355335533535302c00c22222222200210890122108a0110890113357389201034832360008801153355335330295335303900c21353500122001222200310830135533535500a22222222222200a13061024221002222200310890113357389201024834000880113330193307d35302c00c22222222200850053307d35302c00c22222222200750043307d35302c00c2222222220095003108801108801108801108801108801108801108801108801135004222220021350032222200513500222222003135001222220041306949884c1a92632322153353330173307b350042222200450063307b350042222200335302b00a222220033307b5003500532153355335333573466e1cd4c0b002c88888008cdc024004a0061100210e02211002266ae7124010348323100087011533533300a5007333333012500650033500222200235302c00b222220013025082013025500135002222003153355335330225335303800b2135350012200122220031082013330700723553355008130600232210022222003306f500110880113357389201024834000870113301d00b5004108701108701108701133501435001222001533550071305f49103505439002210011086011350022222200213500122222005221306b49884214044d4c098014888880144d4c094010888880104d4d400c880088888888888880284d40088800888c894cd54cd4ccd5cd19b87300d004300e001082010810113002335500b00400110810110820113357389210348313200081013082012253350011082012215335350022233500722222223335734666e54024cdc51bb3375200e66e28dd99ba8006337146eccdd400299b8a37666ea4010cdc51bb337520066eccdd4801000846808460080089802000884180991919299a999ab9a3370e90000010400083f899910919800801801191919299a999ab9a3370e90000010418084100899191919191919191919199999999999911111111111091999999999998008068060058050048040038030028020018011983302d9aba100b3306605b35742014660cc0bc6ae84024ccc189d728309aba100833306275ca0c26ae8401ccc198168d5d080319983102fbad3574200a646464a66a666ae68cdc3a40000041200211e02266442466002006004646464a66a666ae68cdc3a40000041260212402266442466002006004660bceb4d5d0800982e9aba135744002260d60d46aae78008d55ce8009baa35742002646464a66a666ae68cdc3a40000041260212402266442466002006004660bceb4d5d0800982e9aba135744002260d60d46aae78008d55ce8009baa357426ae880044c1a019cd55cf0011aab9d00137546ae84010cc199d71aba1003333062059056357420046660c4eb8158d5d0800982e9aba1357440026ae88004d5d10009aba2001357440026ae88004d5d10009aba2001357440026ae88004d5d10008982d82d1aab9e00235573a0026ea8d5d080098261aba135744002260b00ae6aae78008d55ce8009baa0033232325335333573466e1d200000207f07e11222222200515335333573466e1d200200207f07e1321222222230010083232325335333573466e1d200000208201081011120011305a05935573c0046aae74004dd51aba100115335333573466e1d200400207f07e1321222222230030083232325335333573466e1d20000020820108101132333222123330010040030023305c75c6ae84008dd69aba1001375a6ae84d5d10009aba20011305a05935573c0046aae74004dd51aba100115335333573466e1d200600207f07e1321222222230060083232325335333573466e1d200000208201081011122200315335333573466e1d20020020820108101132122230020043305b75c6ae8400454cd4ccd5cd19b874801000820804204044cc884888cc004014010cc16dd71aba1001375c6ae84d5d10008982d02c9aab9e00235573a0026ea8d5d08008a99a999ab9a3370e900400103f83f099091111111802004191919299a999ab9a3370e9000001041008408089909118010019982dbae357420022a66a666ae68cdc3a400400410402102022664424466002008006660b6eb8d5d08009bae357426ae880044c168164d55cf0011aab9d00137546ae8400454cd4ccd5cd19b87480280081fc1f844888888801c54cd4ccd5cd19b87480300081fc1f84cc8848888888cc008024020dd69aba1001375a6ae84d5d10008982b82b1aab9e00235573a0026ea800cc8c8c94cd4ccd5cd19b87480000081f81f44c8c8cccc09cc158d5d08019982c82d1aba1002375c6ae84004c13cd5d09aba2001357440026ae8800454cd4ccd5cd19b87480080081f81f44c090c8c8c94cd4ccd5cd19b874800000820404200044c8c8c8ccccc0bcdd71aba10043305d05e3574200660b46ae84008dd69aba1001375c6ae84d5d10009aba2001357440026ae880044c164160d55cf0011aab9d00137546ae8400454cd4ccd5cd19b87480100081f81f44c09cc8c8c94cd4ccd5cd19b874800000820404200044c8c8c8c8c8c8c8ccccccccc0c8dd71aba1008330610623574200e60bc6ae84018dd69aba1005375a6ae84010dd71aba1003375c6ae84008cc185d71aba1001375a6ae84d5d10009aba2001357440026ae88004d5d10009aba2001357440026ae880044c164160d55cf0011aab9d00137546ae8400454cd4ccd5cd19b87480180081f81f440984c158154d55cf0011aab9d0013754006205c260a6921035054350033079221122533500210752215335003107722133507833073004002335530081200100300112001222222123333330010070060050040030023077225335001148000884cdc024004600800260ec44a66a0022900011099b8048008c010004cc1d4884894cd4ccd5cd19b89002480001dc1d841c454cd400441c4884cd41c8008cd4c01848004cdc0802240040022400246a002444444444444a66a601c01020fe266ae712401035530310007e30732253350011073223213500322300300130772253350011300600322135002225335333573466e1d200000107b07a13006003107a22235003223500422350052253355335333500a06700600515335330270040031330670020011078107810791335738920102483200078330712212225335002153350011074221075221533500310752215335330070040021333530091200100700300110771200122232330742253350011300348000884d4008894cd4ccd5cd19b8f002009078077130073370201c60180022600c0060084a66a666ae68cdc380099b8048008c0140081c81c441c84cd5ce24810348313400071306f225335001148000884cdc024004600800260dc44a66a00220084426a0044466e00004c01800c88c8d400c894cd4c01cd40088888888888880104c98cd5ce24902483600056232215335001153353002300b30063500522222222222200c10731335738921024835000722213263357389210248370005b30732253350011072221533533063005002107513004001306f225335001106922135002223232330772253350011003221335072002300400100230070043302d00735001222200348000c1ac894cd40044194884cd4198008c010004c1a8894cd40044190884cd4194008c010004cc1a4884894cd4ccd5cd19b89002480001ac1a8400454cd40044194884cd4c01848004cdc080224004002240026444666660060ae4600c0026660060ae4666ae68cdc3a40000020d40d202e004002446464464446600600400260da444a66a0042600a002442a66a006260100084426a00844646a00a44a66a6602200a0042a66a6601a00800226601801000c20ec2a66a6020008266018010014266006a66a602000220e2266a0e000e0e200c60ec444a66a00220ec4426a00444a66a602800226600e00c0062a66a6602a0120042a66a660220100022660200186660fa444a66a00420024426600a00266a0f200400600c00620f426600e66a0e800800c00660d644a66a00220d64426a00444a66a60100022600c00620dc60d444a66a00220d44426a00444a66a600e0022600c00620da92103505438003066225335001106622135002225335333573466e1d200000106a06913006003106923724600400260c844a66a002203e44266e28dd99a801111119ba548000cd5d01a8021119ba548000cd5d0180e80119aba03301e233500123374a900019aba0301f001376204244466e9520023357406ea000ccd5d01ba80023357406ea0004dd88118009bb101f335740666018ea5402c00ccd5d02999a801099ba548000dd880e9099ba548010cd5d00009bb101e213374a900119aba037520026ec4078cd5d01980e3a9001376203a600800246e48c068c05cc16400488ccd5cd19b8f3766666008ea5400c008dd99998023a9500300106206113300175246ea000488c88dd3180100098311119a800a5eb7bdb18088d400888cd5d019bb030080023007001300600332253353004300b00121533335001210011300349888884c01d262130044984c0092623263357389210248330004432253353003300a001215333350012130044984c00d26222213007498840044c00926232633573892010248330004332233333302100122532335333573466e1d200000306005f1533533335573e0044a0984609a660aa6ae8400cd5d1001823109a80091299a980400110a99a9999aab9f002250502305133059357420066ae8800c12884d4004894cd4cc09809c008854cd4cccd55cf8011282a1182a9982e9aba10033574400609c426a00244a66a605a00442a66a6666aae7c008941608c8c8c16c008d5d10021aba1003052215335302e00121305a333301500b0070030011300e4984c035261300c4984c02526130084984c01526130044984c0052613001498c894cd4ccd5cd19b874800801018418054cd4cccd55cf801928269191918280011aba20053574200808e42a66a66666604c00244a66a666ae68cdc3a40000040c80c62a66a6666aae7c004941408c144cc164d5d08011aba200204a2135001225335302900221533533335573e0044a0a8460aa660ba6ae8400cd5d1001827109a80091299a9981501580110a99a9999aab9f002250582305933061357420066ae8800c14884d4004894cd4c050008854cd4cccd55cf8011282e1182e998329aba1003357440060ac426a00244a66a606c00442a66a6666aae7c008941808c8c8c18c008d5d10021aba100305a21533530370012130623333302100f00b007003001150601505f1505e1505b1505a150571505615053150521504f1504f2504e2504e2504e2504e21304f3009001130034984c0092613002498c894cd4ccd5cd19b874801001018418054cd4cccd55cf801928269191918280011aba20053574200808e42a66a66666604c00244a66a666ae68cdc3a40000040c80c62a66a6666aae7c004941408c144cc164d5d08011aba200204a2135001225335302900221533533335573e0044a0a8460aa660ba6ae8400cd5d1001827109a80091299a9981501580110a99a9999aab9f002250582305933061357420066ae8800c14884d4004894cd4c050008854cd4cccd55cf8011282e1182e998329aba1003357440060ac426a00244a66a606c00442a66a6666aae7c008941808c184cc1a4d5d08019aba200305a2135001225335303a00221533533335573e0044a0c8460ca660da6ae8400cd5d100182f109a80091299a981e80110a99a9999aab9f002250682306933071357420066ae8800c18884d4004894cd4c104008854cd4cccd55cf80112836118369983a9aba1003357440060cc426a00244a66a6608408a00442a66a6666aae7c008941c08c8c8c1cc008d5d10021aba100306a215335304800121307233333333303001f01b01701300f00b007003001150701506f1506e1506b1506a150671506615063150621505f1505e1505b1505a150571505615053150521504f1504f2504e2504e2504e2504e21304f300c001130034984c009261300249894cd4ccd5cd19b874801800c18017c4c1300205412c941249412494124941248cccccc080004894cd4ccd5cd19b874800000817817454cd4cccd55cf800928251191918268011aba20033574200408842a66a60440024260980022a0942a0922a0924a0904a0904a0904a090424444600800a24444006444424444666600401000e00c00a424444600200a4444444442466666666600201401201000e00c00a00800600444444246666600200c00a008006004644a66a6a6a002440044444444444440142600493110a99a998029a80111110021a9a98038019100091110020980e8010980224c464c66ae712401034831310003b223500222350032232335005233500425335333573466e3c00800417016c5400c416c816c8cd4010816c94cd4ccd5cd19b8f00200105c05b15003105b153350032153350022133500223350022335002233500223304d002001205e2335002205e23304d00200122205e222335004205e2225335333573466e1c01800c18418054cd4ccd5cd19b8700500206106013300f0040011060106010591533500121059105922333573466e1c00800415014c94cd4c008004840044c98cd5ce24810248380003823500122350022222222222223333500d2014201420142330622253350011504d22135002225335350022235009225335333573466e3c0100081a81a44ccd5cd19b8700300106a0691069130520041300600300d233500123374a900019aba037520026ec40108cdd2a400466ae80dd48009bb1004225335001213374a900019aba030030013762008266e952002376200693281b982691299a800898011801823910a99a800880111098031803802982611299a8008823110a99a800880191099a8249980380200118030009825911299a8010800910a99a801880219110a999a998260028010a801899a825001198040038008a801899a82380119802800801982511299a800880291099a801111b8a001300400122333573466e1d2002300533003002350012222003049048232253355335300200121303600115034213304c225335001104622132533535003225335333573466e1d20020010510501303d0021503c2133504900100210013004001001104330492253350011503422135002225335333573466e3c00801c1341304c0e40044c01800d221003046225335001148000884cdc02400460080024a66a646466666601400444a66a666ae68cdc3a400000409008e2a66a6666aae7c004940d08c0d4cc0f4d5d08011aba200202e2135001225335300b00221533533335573e0044a07046072660826ae8400cd5d1001819109a80091299a980500110a99a9999aab9f0022503c23232303f002357440086ae8400c0d8854cd4c04c00484c0f8ccc04001c00c004540f0540ec540e8540dc540d8540cc540cc940c8940c8940c8940c8c0108cccccc028004894cd4ccd5cd19b874800000812011c54cd4cccd55cf8009281a1181a9981e9aba10023574400405c426a00244a66a601800442a66a6666aae7c008940e08c8c8c0ec008d5d10021aba1003032215335300f00121303a123300100400215038150371503615033150332503225032250322503230090012135001222002103e22212333001004003002232233333300800122503125030002250302503030442233335573e0024606207e4a66a60086ae84008854cd4c010d5d100190981999a8200010008a818899281898019aba200202a25335300300121302e0011502c2333333004001225335333573466e1d20000020420411533533335573e0024a05c4605e6606e6ae84008d5d1001014109a80091299a99999980480111299a999ab9a3370e90000010238230a99a9999aab9f00125033232323036002357440066ae840080b4854cd4c02800484c0d4004540cc540c8540c8940c4940c4940c4940c4854cd4cccd55cf8011281911919181a8011aba20043574200605842a66a6014002426068660920060022a0642a0622a0602a05a2a05a4a0584a0584a0584a058466666600600244a0584a0564a0564a05646058002466666600400244a0564a0544a054460560024a0544444446666666ae900188c8cc01cd55ce8009aab9e001375400e4600a6eac01c8c010dd6003918019bad00723002375c00e0504a666a6a0024444004264c66ae712410248390002221001213263357389210348313000023303c22533500110362213350373500222330340023302923370490008008009802000899319ab9c4901034833330001f2326335738921034833370001f200123232325335333573466e1d200000203a039103915335333573466e1d200200203a039103a1301201135573c0046aae74004dd500091191919299a999ab9a3370e900000101d01c889110010a99a999ab9a3370e900100101d01c8990911180180218029aba100115335333573466e1d200400203a039112220011301201135573c0046aae74004dd50009191919299a999ab9a3370e900000101c01b8990911118018029bae357420022a66a666ae68cdc3a400400407006e26424444600200a600e6ae8400454cd4ccd5cd19b87480100080e00dc4c848888c008014c028d5d08008a99a999ab9a3370e900300101c01b89909111180200298029aba10011301000f35573c0046aae74004dd50009191919299a999ab9a3370e900000101b81b09909111111180280418049aba100115335333573466e1d20020020370361321222222230070083009357420022a66a666ae68cdc3a400800406e06c26644244444446600c01201060126ae84004dd71aba1357440022a66a666ae68cdc3a400c00406e06c2664424444444660040120106eb8d5d08009bae357426ae8800454cd4ccd5cd19b87480200080dc0d84cc8848888888cc004024020dd71aba1001375a6ae84d5d10008a99a999ab9a3370e900500101b81b0891111110020a99a999ab9a3370e900600101b81b089111111001898078071aab9e00235573a0026ea80048c8c8c94cd4ccd5cd19b87480000080d80d44cc8848cc00400c008c014d5d080098039aba1357440022601c01a6aae78008d55ce8009baa00123232325335333573466e1d20000020350341330363005357420026eb4d5d09aba20011300d00c35573c0046aae74004dd50009191919299a999ab9a3370e900000101a01989bae35742002260180166aae78008d55ce8009baa0013223232325335333573466e1d200000203403313232333322221233330010050040030023232325335333573466e1d2000002039038133221233001003002300c35742002660140166ae84d5d1000898088081aab9e00235573a0026ea8d5d0801999805bae500a35742004646464a66a666ae68cdc3a4000004072070224440062a66a666ae68cdc3a4004004072070264244460020086eb8d5d08008a99a999ab9a3370e900200101c81c099091118010021aba10011301101035573c0046aae74004dd51aba10013300775c6ae84d5d10009aba200135744002260180166aae78008d55ce8009baa001223232325335333573466e1d20020020340331501f15335333573466e1d200000203403313020300535742002260180166aae78008d55ce8009baa00123232325335333573466e1d200000203203113212230020033005357420022a66a666ae68cdc3a400400406406226466644424466600200a0080066eb4d5d08011bad357420026eb4d5d09aba200135744002260140126aae78008d55ce8009baa00123232325335333573466e1d20000020310301321223002003375c6ae8400454cd4ccd5cd19b87480080080c40c04c8488c00400cdd71aba10011300900835573c0046aae74004dd5000899800bae75a4464460046eac004c0bc88cccd55cf800901511919a8151981298031aab9d001300535573c00260086ae8800cd5d080100a9191919299a999ab9a3370e900000101701689bad357420022600c00a6aae78008d55ce8009baa0014910350543100232633573800201e464460046eb0004c0a888cccd55cf8009012919a81218021aba100230033574400402046eb8004c09c894cd4004520002213370090011802000981311299a8008a400044266e0120023004001132633573892103483434000093024225335001148000884cdc0240046008002604644a66a002203a44266a0044444660220260066008002604444a66a00220424426a00444a66a666ae68cdc7a450b4879647261486561645631000020260251333573466e1d2002001026025130060033021225335001148000884cdc0240046008002264c66ae712410348323700004132633573892103483235000031326335738921034832340000223263357389210248310000212001301b225335001101522133500222223300900b00330040012322230033009333500b00a002001301b225335001101522133501635002223301300233008233350012330094800000488cc0280080048cc0240052000001300400123223002001301a2253350011014221335015350022233012002300700130040012233700004002424460040062244002602a44a66a002201e44266a0206a004446601a004666a0024601400244666a01401200400246016002600800244666ae68cdc780100080a00989911119191980c91299a800880191099a80a0011802000980100218029980c11299a800880911099299a9a80191911801005980f11299a800880f1109a80111299a99808001003881089803001899a80a00180088009802000801180b91299a800880891099a8091a8011119198080019800804180e91299a80089aa8078019109a80111299a998078010040891119801005002098030019802000980991299a800880691099a8071a801111980580118050009802000980911299a800880611099a8069a801111980500118048009802000980891299a800880591099a8061a80111198048011aa8038009802000909111801802089091118008021109198008018011a8019110009a8011110011a800911001999180080091091919980111801111180180211801111180100211801111180080211a998020020019a801800891111998021299a800899a803003803910a99a800899a804001804910a99199a998068028018a800899980400199a8058028060010a8008999803001119a805802800800911299a800899a80419a804001801180300499110a999a998068030010a801899980400119a8058030028008a801899a80419a804001801180300091129919a80109800a4c442a64666a6601c00e0062a00226008930a80089998038011180319a806003800800919a804980199a80480200518038010910010910911980080200199111a9a80111001111a9a80191001112999a998038020010a99a999ab9a3370e00600201801620142a66a666ae68cdc48018008060058804080489980380200109980380200111299a999ab9a3371e00400200e00c200a2a66a666ae68cdc8801000803803080188020911001891100109110008910010910009109198008018011191800800918011198010010009" } diff --git a/hydra-plutus/scripts/vInitial.plutus b/hydra-plutus/scripts/vInitial.plutus index 8eefd92b352..8751f213599 100644 --- a/hydra-plutus/scripts/vInitial.plutus +++ b/hydra-plutus/scripts/vInitial.plutus @@ -1,5 +1,5 @@ { "type": "PlutusScriptV2", - "description": "hydra-vInitial-0.17.0-348-gd8c94a18c3", - "cborHex": "590ed4590ed10100003323233223322323233223232323232323232323233223232323232323232323232323232323223323232323232323222225335333004375c006646464a666ae68cdc3a400000422440042a666ae68cdc3a40040042642446002006660100126ae840044c090034d55cf0011aab9d0013754004646464a666ae68cdc3a4000004266442466002006004646464a666ae68cdc3a40000042646464646464646464646666666666664444444444442466666666666600201a01801601401201000e00c00a0080060046602a4646464a666ae68cdc3a400000426644246600200600460346ae84004c06cd5d09aba20011303501e35573c0046aae74004dd50009aba100b357420146602a02e6ae84024ccc071d7280d9aba100833301c75ca0366ae8401cd5d08031aba1005357420086602aeb8d5d08019aba100233301c75c40026ae84004d5d09aba2001357440026ae88004d5d10009aba2001357440026ae88004d5d10009aba2001357440026ae880044c09c040d55cf0011aab9d00137546ae84004c8c8c94ccd5cd19b87480000084c848888c00c014dd71aba100115333573466e1d2002002132122223001005300c357420022a666ae68cdc3a400800426424444600400a601c6ae8400454ccd5cd19b87480180084c848888c010014c8c8c94ccd5cd19b87480000084c848888888c014020c044d5d08008a999ab9a3370e900100109909111111180380418089aba100115333573466e1d20040021332212222222330060090083011357420026eb8d5d09aba200115333573466e1d2006002133221222222233002009008375c6ae84004dd71aba1357440022a666ae68cdc3a40100042664424444444660020120106eb8d5d08009bad357426ae8800454ccd5cd19b874802800844888888801054ccd5cd19b874803000844888888800c4c0a804cd55cf0011aab9d00137546ae840044c09c040d55cf0011aab9d00137546ae84d5d1000898120069aab9e00235573a0026ea800440984c0852410350543500232230023758002605e446666aae7c00480c08cd40bcc010d5d080118019aba200202023232325333573466e1d20000021330273232325333573466e1d20000021375c6ae840044c08802cd55cf0011aab9d00137546ae84004dd69aba1357440022603e0106aae78008d55ce8009baa0013223232325333573466e1d200000213232333322221233330010050040030023232325333573466e1d2000002133221233001003002300c35742002660140166ae84d5d1000898120069aab9e00235573a0026ea8d5d08019998063ae500b35742004646464a666ae68cdc3a4000004224440062a666ae68cdc3a4004004264244460020086eb8d5d08008a999ab9a3370e9002001099091118010021aba10011302400d35573c0046aae74004dd51aba10013300775c6ae84d5d10009aba2001357440022603e0106aae78008d55ce8009baa001223232325333573466e1d20020021502815333573466e1d2000002130293005357420022603e0106aae78008d55ce8009baa00123232325333573466e1d200000213212230020033005357420022a666ae68cdc3a400400426466644424466600200a0080066eb4d5d08011bad357420026eb4d5d09aba2001357440022603a00c6aae78008d55ce8009baa00123232325333573466e1d20000021321223002003375c6ae8400454ccd5cd19b87480080084c8488c00400cdd71aba10011301c00535573c0046aae74004dd5000a49035054310013300175ceb488c88c008dd58009814911999aab9f001202a23233502a3302c300635573a002600a6aae78004c010d5d10019aba100201a3323232323222322253350021330084910349303100300330093500122002323232215332353300d4910349303300323230213301a00200133301801a5004332323223002001303922533500110032213335006220023013301200230040013500122001321233001002037301801a5002323017301f3301000b0015005153353300d49010349303400302333035500135500422002153353300d490103493133003302b35500422001009153353300d491034930320032323233039225335001103622153353005002103913004001002302d00230303550062222222222220045335330362253350011502f221350022253353303100200f130340011300600350032153350011302549103493036002213500222533500315333573466e1d20020011002130294910349303600221302b491034930360013024491034930350013300d490103493134003030300e50051031103110311330352253350011035221335036325355009222222222222335300d00c210011303449103493135003039225335001150322213500222533533033002008130370041300600330040010011030153353500322350022222222222223333500d2021202120212330422253350011503b221350022253353303c002007130400041300600300d21300a30090011031153353300b006500113020491034931320022135002225335003153335002130244910349303900215335333333015001225333573466e1d20000021533533335573e0024a06246064660726ae84008d5d1001014109a80091299aa99a980c80110981a8008a81990a99a9999aab9f00225035230363303d357420066ae8800c0b084d4004894cd4cccccc0780088940e4940e0070940e0940e0854cd4cccd55cf8011281c91919181e0011aba20043574200606042a66a603e002426076246660020100080042a0722a0702a06e2a0682a0662a0602a0604a05e4a05e4a05e4a05e426a002444660740040022604a9210349313100213025490103493130002213026491034931320013500122002302e225335001102b22135002225333573466e3c00801c4c03c0044c01800c8d4004880048d4004888800c894cd4004409c4cd5ce00101311a800911111111111004111981491299a800881491099299a9a80191111a8021119a8011281612999ab9a3371e00201c2605a6606800a00c2a0584266a058002004200260080026a002444444444444014002604a44a66a00220444426a00444a666ae68cdc7a450b4879647261486561645631000021333573466e1d20010010270261300600330242233335573e0024603e04a4a66a66666600a6ae84008894ccd5cd19b874800000854cd4cccd55cf8009281091811198149aba100235744004030426a00244a66a66666601400444a666ae68cdc3a40000042a66a6666aae7c004940988c09ccc0b8d5d08011aba200201d213500122533533333300f002225333573466e1d20000021533533335573e0024a05646464605c0046ae8800cd5d080101110a99a98088009098168008a8158a8150a8151281492814928149281490a99a9999aab9f0022502a23232302d002357440086ae8400c084854cd4cccccc0440048940b0940ac940ac8c0b0004940ac84c0b0cc0a800c004540a8540a4540a0540945409494090940909409094090854cd4cccd55cf801128129191918140011aba20043574200603842a66a601600242604e24660020080042a04a2a0482a0462a0402a0404a03e4a03e4a03e4a03e42a66a60086ae8800c84c084cd40980080045407c4c9407cc00cd5d100100a919999980100091280e9280e1280e1280e1180e8009111111999999aba40062323300735573a0026aae78004dd5003918029bab00723004375800e460066eb401c8c008dd700380ba80c181011299a8008810110999802803801180200091911180199802801000981011299a800881011099a8109a80111198128011981311299a800881311099a8139a8011119815801199a80091980724000002446601e00400246601c002900018020008009802000911802199a80280a8010009119b80002001301c225335001101c22133501d3500222330210023335001230090012233350090190020012300a00130040011322223232330212253350011003221335022002300400130020043005330202253350011020221325335350032322300200b302622533500110242213500222533533010002007102713006003133502200300110013004001002301f225335001101f22133502035002223233025003300100830252253350011355012003221350022253353300f002008112223300200a004130060033004001301b225335001101b22133501c350022233020002300d0013004001301a225335001101a22133501b35002223301f002300c00130040013019225335001101922133501a35002223301e00235500a00130040013018225335001101822133501935002220013004001301722533500110152232135003223003001301b2253350011300600322135002322253335001230043300d4800000488c014cc0380080048c010cc0340052000233500113005002101b22333573466e2000800404c05084888c00c0104484888c004010c04c88d4004894cd400854cd4004404c884c01d241034930370022153350031300749103493038002213500422350042253353301437666a006444466e9520003357406a0084466e952000335740602a00466ae80cc0588cd40048cdd2a400066ae80c05c004dd880d11119ba548008cd5d01ba80033357406ea0008cd5d01ba800137620380026ec4060cd5d019980aba93301575246ea000400ccd5d02999a801099ba548000dd880b1099ba548010cd5d00009bb1017213374a900119aba037520026ec405ccd5d01980a3a9001376202c0022a66a66026008004260186603c00e00a20342034464c66ae70004008480048cd40048cdd2a400066ae80dd48009bb100523374a900119aba037520026ec4014894cd400484cdd2a400066ae80c00c004dd8802899ba548008dd8802111911ba6300200130102253350011376400a4426a0044466ae80cdd8180400118038009803001a4c446a004446a00644a666ae68cdc78020010999ab9a3370e00600201c01a201a44666ae68cdc7801000804804110919800801801109118010018891000980391299a800880391099a8040011802000980311299a8008802111909a801911801800980511299a800898030019109a801112999ab9a3370e900000089803001880589100109100089100109109119800802001910919800801801119180080091801119801001000a451c2043a9f1a685bcf491413a5f139ee42e335157c8c6bc8d9e4018669d0001" + "description": "hydra-vInitial-0.19.0-96-g4d48208d28", + "cborHex": "590f7e590f7b0100003323233223322323233223232323232323232323233223232323232323232323232323232323223323232323232323222225335333004375c006646464a66a666ae68cdc3a400000406406222440042a66a666ae68cdc3a40040040640622642446002006660100126ae840044c090034d55cf0011aab9d0013754004646464a66a666ae68cdc3a4000004064062266442466002006004646464a66a666ae68cdc3a400000406a0682646464646464646464646666666666664444444444442466666666666600201a01801601401201000e00c00a0080060046602a4646464a66a666ae68cdc3a400000408608426644246600200600460346ae84004c06cd5d09aba20011303501e35573c0046aae74004dd50009aba100b357420146602a02e6ae84024ccc071d7280d9aba100833301c75ca0366ae8401cd5d08031aba1005357420086602aeb8d5d08019aba100233301c75c40026ae84004d5d09aba2001357440026ae88004d5d10009aba2001357440026ae88004d5d10009aba2001357440026ae880044c09c040d55cf0011aab9d00137546ae84004c8c8c94cd4ccd5cd19b87480000080d40d04c848888c00c014dd71aba100115335333573466e1d2002002035034132122223001005300c357420022a66a666ae68cdc3a400800406a06826424444600400a601c6ae8400454cd4ccd5cd19b87480180080d40d04c848888c010014c8c8c94cd4ccd5cd19b87480000080e00dc4c848888888c014020c044d5d08008a99a999ab9a3370e900100101c01b89909111111180380418089aba100115335333573466e1d20040020380371332212222222330060090083011357420026eb8d5d09aba200115335333573466e1d2006002038037133221222222233002009008375c6ae84004dd71aba1357440022a66a666ae68cdc3a401000407006e2664424444444660020120106eb8d5d08009bad357426ae8800454cd4ccd5cd19b87480280080e00dc44888888801054cd4ccd5cd19b87480300080e00dc44888888800c4c0a804cd55cf0011aab9d00137546ae840044c09c040d55cf0011aab9d00137546ae84d5d1000898120069aab9e00235573a0026ea800440944c0852410350543500232230023758002605e446666aae7c00480c08cd40bcc010d5d080118019aba200202023232325335333573466e1d200000202d02c1330273232325335333573466e1d200000203002f1375c6ae840044c08802cd55cf0011aab9d00137546ae84004dd69aba1357440022603e0106aae78008d55ce8009baa0013223232325335333573466e1d200000202d02c13232333322221233330010050040030023232325335333573466e1d2000002032031133221233001003002300c35742002660140166ae84d5d1000898120069aab9e00235573a0026ea8d5d08019998063ae500b35742004646464a66a666ae68cdc3a4000004064062224440062a66a666ae68cdc3a4004004064062264244460020086eb8d5d08008a99a999ab9a3370e9002001019018899091118010021aba10011302400d35573c0046aae74004dd51aba10013300775c6ae84d5d10009aba2001357440022603e0106aae78008d55ce8009baa001223232325335333573466e1d200200202d02c1502815335333573466e1d200000202d02c130293005357420022603e0106aae78008d55ce8009baa00123232325335333573466e1d200000202b02a13212230020033005357420022a66a666ae68cdc3a400400405605426466644424466600200a0080066eb4d5d08011bad357420026eb4d5d09aba2001357440022603a00c6aae78008d55ce8009baa00123232325335333573466e1d200000202a0291321223002003375c6ae8400454cd4ccd5cd19b87480080080a80a44c8488c00400cdd71aba10011301c00535573c0046aae74004dd5000a481035054310013300175ceb488c88c008dd58009814911999aab9f001202a23233502a3302c300635573a002600a6aae78004c010d5d10019aba100201a3323232323222322253350021330084910349303100300330093500122002323232215332353300d4910349303300323230213301a00200133301801a5004332323223002001303922533500110032213335006220023013301200230040013500122001321233001002037301801a5002323017301f3301000b0015005153353300d49010349303400302333035500135500422002153353300d490103493133003302b35500422001009153353300d491034930320032323233039225335001103622153353005002103913004001002302d00230303550062222222222220045335330362253350011502f221350022253353303100200f130340011300600350032153350011302549103493036002213500222533500315335333573466e1d200200103703610021302949010349303600221302b491034930360013024491034930350013300d490103493134003030300e50051031103110311330352253350011035221335036325335355009222222222222300d00c210011302849103493135003039225335001150322213500222533533033002008130370041300600330040010011030153353500322350022222222222223333500d2021202120212330422253350011503b221350022253353303c002007130400041300600300d21300a30090011031153353300b006500113020491034931320022135002225335003153335002130244910349303900215335333333015001225335333573466e1d20000020350341533533335573e0024a06246064660726ae84008d5d1001014109a80091299aa99a980c80110981a8008a81990a99a9999aab9f00225035230363303d357420066ae8800c0b084d4004894cd4cccccc0780088940e4940e0070940e0940e0854cd4cccd55cf8011281c91919181e0011aba20043574200606042a66a603e002426076246660020100080042a0722a0702a06e2a0682a0662a0602a0604a05e4a05e4a05e4a05e426a002444660740040022604a92010349313100213025490103493130002213026491034931320013500122002302e225335001102b22135002225335333573466e3c00801c0c00bc4c03c0044c01800c8d4004880048d4004888800c894cd4004409c4cd5ce00101311a800911111111111004111981491299a800881491099299a9a80191111a8021119a801128161299a999ab9a3371e00201c0620602605a6606800a00c2a0584266a058002004200260080026a002444444444444014002604a44a66a00220444426a00444a66a666ae68cdc7a4410b4879647261486561645631000020270261333573466e1d20010010270261300600330242233335573e0024603e04a4a66a66666600a6ae84008894cd4ccd5cd19b874800000809409054cd4cccd55cf8009281091811198149aba100235744004030426a00244a66a66666601400444a66a666ae68cdc3a40000040540522a66a6666aae7c004940988c09ccc0b8d5d08011aba200201d213500122533533333300f002225335333573466e1d200000202f02e1533533335573e0024a05646464605c0046ae8800cd5d080101110a99a98088009098168008a8158a8150a8151281492814928149281490a99a9999aab9f0022502a23232302d002357440086ae8400c084854cd4cccccc0440048940b0940ac940ac8c0b0004940ac84c0b0cc0a800c004540a8540a4540a0540945409494090940909409094090854cd4cccd55cf801128129191918140011aba20043574200603842a66a601600242604e24660020080042a04a2a0482a0462a0402a0404a03e4a03e4a03e4a03e42a66a60086ae8800c84c084cd40980080045407c4c9407cc00cd5d100100a919999980100091280e9280e1280e1280e1180e8009111111999999aba40062323300735573a0026aae78004dd5003918029bab00723004375800e460066eb401c8c008dd700380ba80c181011299a8008810110999802803801180200091911180199802801000981011299a800881011099a8109a80111198128011981311299a800881311099a8139a8011119815801199a80091980724000002446601e00400246601c002900018020008009802000911802199a80280a8010009119b80002001301c225335001101c22133501d3500222330210023335001230090012233350090190020012300a00130040011322223232330212253350011003221335022002300400130020043005330202253350011020221325335350032322300200b302622533500110242213500222533533010002007102713006003133502200300110013004001002301f225335001101f22133502035002223233025003300100830252253350011355012003221350022253353300f002008112223300200a004130060033004001301b225335001101b22133501c350022233020002300d0013004001301a225335001101a22133501b35002223301f002300c00130040013019225335001101922133501a35002223301e00235500a00130040013018225335001101822133501935002220013004001301722533500110152232135003223003001301b2253350011300600322135002225335333500123300c4800000488cc0340080048cc030005200013006003101c22333573466e2000800404c05084888c00c0104484888c004010c04c88d4004894cd400854cd4004404c884c01d2401034930370022153350031300749103493038002213500422350042253353301437666a006444466e9520003357406a0084466e952000335740602a00466ae80cc0588cd40048cdd2a400066ae80c05c004dd880c91119ba548008cd5d01ba80033357406ea0008cd5d01ba800137620360026ec405ccd5d019980b3a93301675246ea000400ccd5d02999a801099ba548000dd880a9099ba548010cd5d00009bb1016213374a900119aba037520026ec4058cd5d01980a3a9001376202a0022a66a66026008004260186603c00e00a20342034464c66ae70004008480048cd40048cdd2a400066ae80dd48009bb100423374a900119aba037520026ec4010894cd400484cdd2a400066ae80c00c004dd8802099ba548008dd8801a4c446446e98c008004c03c88cd40052f5bded8c0446a0044466ae80cdd8180400118038009803001911a801111a80191299a999ab9a3371e00800401c01a2666ae68cdc3801800807006880691199ab9a3371e004002012010442466002006004424460040062244002600e44a66a002200e44266a0100046008002600c44a66a0022008446426a006446006002601444a66a0022600c0064426a00444a66a666ae68cdc3a40000020180162600c00620162440042440022440042442446600200800644246600200600446460020024600446600400400291011cea444d37d226e71eef73ac78d149750da977feb588900135bf9e82210001" } diff --git a/hydra-plutus/src/Hydra/Contract.hs b/hydra-plutus/src/Hydra/Contract.hs index d77a0bf5b45..bae1df2da99 100644 --- a/hydra-plutus/src/Hydra/Contract.hs +++ b/hydra-plutus/src/Hydra/Contract.hs @@ -7,16 +7,18 @@ import Codec.Serialise (serialise) import Data.ByteString qualified as BS import Data.ByteString.Lazy qualified as BSL import Hydra.Cardano.Api ( + PlutusScriptVersion (PlutusScriptV3), ScriptHash, fromPlutusScript, hashScript, pattern PlutusScript, ) -import Hydra.Contract.Commit qualified as Commit +import Hydra.Cardano.Api.Prelude qualified as Api import Hydra.Contract.Deposit qualified as Deposit import Hydra.Contract.Head qualified as Head import Hydra.Contract.HeadTokens qualified as HeadTokens import Hydra.Contract.Initial qualified as Initial +import Hydra.Plutus (commitValidatorScript) import PlutusLedgerApi.V2 (TxId (..), TxOutRef (..), toBuiltin) -- | Information about relevant Hydra scripts. @@ -46,8 +48,8 @@ scriptInfo = , mintingScriptSize = scriptSize $ HeadTokens.mintingPolicyScript defaultOutRef , initialScriptHash = plutusScriptHash Initial.validatorScript , initialScriptSize = scriptSize Initial.validatorScript - , commitScriptHash = plutusScriptHash Commit.validatorScript - , commitScriptSize = scriptSize Commit.validatorScript + , commitScriptHash = hashScript $ Api.PlutusScript PlutusScriptV3 $ fromPlutusScript commitValidatorScript + , commitScriptSize = scriptSize commitValidatorScript , headScriptHash = plutusScriptHash Head.validatorScript , headScriptSize = scriptSize Head.validatorScript , depositScriptHash = plutusScriptHash Deposit.validatorScript diff --git a/hydra-plutus/src/Hydra/Contract/Commit.hs b/hydra-plutus/src/Hydra/Contract/Commit.hs index 93ef8beef17..b8bc9536060 100644 --- a/hydra-plutus/src/Hydra/Contract/Commit.hs +++ b/hydra-plutus/src/Hydra/Contract/Commit.hs @@ -1,10 +1,4 @@ {-# LANGUAGE TemplateHaskell #-} -{-# OPTIONS_GHC -fno-specialize #-} -{-# OPTIONS_GHC -fplugin-opt PlutusTx.Plugin:conservative-optimisation #-} -{-# OPTIONS_GHC -fplugin-opt PlutusTx.Plugin:defer-errors #-} --- Plutus core version to compile to. In babbage era, that is Cardano protocol --- version 7 and 8, only plutus-core version 1.0.0 is available. -{-# OPTIONS_GHC -fplugin-opt PlutusTx.Plugin:target-version=1.0.0 #-} -- | The validator used to collect & open or abort a Head. module Hydra.Contract.Commit where @@ -13,35 +7,21 @@ import PlutusTx.Prelude import Codec.Serialise (deserialiseOrFail, serialise) import Data.ByteString.Lazy (fromStrict, toStrict) -import Hydra.Cardano.Api (CtxUTxO, PlutusScriptVersion (PlutusScriptV2), fromPlutusTxOut, fromPlutusTxOutRef, toPlutusTxOut, toPlutusTxOutRef) +import Hydra.Cardano.Api (CtxUTxO, fromPlutusTxOut, fromPlutusTxOutRef, toPlutusTxOut, toPlutusTxOutRef) import Hydra.Cardano.Api qualified as OffChain import Hydra.Cardano.Api.Network (Network) -import Hydra.Contract.CommitError (CommitError (..), errorCode) -import Hydra.Contract.Util (hasST, mustBurnST) import Hydra.Data.Party (Party) -import Hydra.Plutus.Extras (ValidatorType, scriptValidatorHash, wrapValidator) -import Hydra.ScriptContext (ScriptContext (..), TxInfo (..)) import PlutusLedgerApi.V2 ( CurrencySymbol, Datum (..), Redeemer (Redeemer), - ScriptHash, - SerialisedScript, TxOutRef, - serialiseCompiledCode, - txOutValue, ) -import PlutusTx (CompiledCode, fromData, toBuiltinData, toData) +import PlutusTx (fromData, toBuiltinData, toData) import PlutusTx qualified import Prelude qualified as Haskell -data CommitRedeemer - = ViaCollectCom - | ViaAbort - -PlutusTx.unstableMakeIsData ''CommitRedeemer - --- | A data type representing committed outputs on-chain. Besides recording the +-- | A data type representing comitted outputs on-chain. Besides recording the -- original 'TxOutRef', it also stores a binary representation compatible -- between on- and off-chain code to be hashed in the validators. data Commit = Commit @@ -81,43 +61,20 @@ deserializeCommit network Commit{input, preSerializedOutput} = -- based on mock crypto. When we move to real crypto we could simply use -- the PT's token name to identify the committing party type DatumType = (Party, [Commit], CurrencySymbol) -type RedeemerType = CommitRedeemer --- | The v_commit validator verifies that: --- --- * spent in a transaction also consuming a v_head output --- --- * ST is burned if the redeemer is 'ViaAbort' --- --- * ST is present in the output if the redeemer is 'ViaCollectCom' -validator :: DatumType -> RedeemerType -> ScriptContext -> Bool -validator (_party, _commit, headId) r ctx = - case r of - -- NOTE: The reimbursement of the committed output 'commit' is - -- delegated to the 'head' script who has more information to do it. - ViaAbort -> - traceIfFalse - $(errorCode STNotBurnedError) - (mustBurnST (txInfoMint $ scriptContextTxInfo ctx) headId) - ViaCollectCom -> - traceIfFalse - $(errorCode STIsMissingInTheOutput) - (hasST headId headOutputValue) - where - headOutputValue = - txOutValue . head $ txInfoOutputs (scriptContextTxInfo ctx) - -compiledValidator :: CompiledCode ValidatorType -compiledValidator = - $$(PlutusTx.compile [||wrap validator||]) - where - wrap = wrapValidator @DatumType @RedeemerType +data CommitRedeemer + = ViaCollectCom + | ViaAbort -validatorScript :: SerialisedScript -validatorScript = serialiseCompiledCode compiledValidator +PlutusTx.unstableMakeIsData ''CommitRedeemer -validatorHash :: ScriptHash -validatorHash = scriptValidatorHash PlutusScriptV2 validatorScript +-- TODO: Note that we now have datum and the redeemer duplicated in haskell and +-- on aiken side. Idea is to remove these types from haskell land but we want to +-- wait on the plutus team to implement +-- [CIP-57](https://github.com/cardano-foundation/CIPs/tree/master/CIP-0057) +-- which will allow us to parse the 'plutus.json' datum and redeemer definitions +-- directly to Plutus `Data` . +type RedeemerType = CommitRedeemer datum :: DatumType -> Datum datum a = Datum (toBuiltinData a) diff --git a/hydra-plutus/src/Hydra/Contract/Initial.hs b/hydra-plutus/src/Hydra/Contract/Initial.hs index df74dc4f603..063686e2b9e 100644 --- a/hydra-plutus/src/Hydra/Contract/Initial.hs +++ b/hydra-plutus/src/Hydra/Contract/Initial.hs @@ -11,12 +11,13 @@ module Hydra.Contract.Initial where import PlutusTx.Prelude -import Hydra.Cardano.Api (PlutusScriptVersion (PlutusScriptV2)) +import Hydra.Cardano.Api (PlutusScriptVersion (..)) import Hydra.Contract.Commit (Commit (..)) import Hydra.Contract.Commit qualified as Commit import Hydra.Contract.Error (errorCode) import Hydra.Contract.InitialError (InitialError (..)) import Hydra.Contract.Util (mustBurnST) +import Hydra.Plutus (commitValidatorScript) import Hydra.Plutus.Extras (ValidatorType, scriptValidatorHash, wrapValidator) import Hydra.ScriptContext ( ScriptContext (..), @@ -179,7 +180,7 @@ checkCommit commitValidator headId committedRefs context = compiledValidator :: CompiledCode ValidatorType compiledValidator = $$(PlutusTx.compile [||wrap . validator||]) - `PlutusTx.unsafeApplyCode` PlutusTx.liftCode plcVersion100 Commit.validatorHash + `PlutusTx.unsafeApplyCode` PlutusTx.liftCode plcVersion100 (scriptValidatorHash PlutusScriptV3 commitValidatorScript) where wrap = wrapValidator @DatumType @RedeemerType diff --git a/hydra-plutus/src/Hydra/Plutus.hs b/hydra-plutus/src/Hydra/Plutus.hs new file mode 100644 index 00000000000..2f2de40e174 --- /dev/null +++ b/hydra-plutus/src/Hydra/Plutus.hs @@ -0,0 +1,35 @@ +{-# LANGUAGE TemplateHaskell #-} + +-- | Module to load and provide the Hydra scripts. +module Hydra.Plutus where + +import Hydra.Prelude + +import Control.Lens ((^.)) +import Data.Aeson qualified as Aeson +import Data.Aeson.Lens (key, nth, _String) +import Data.ByteString.Base16 qualified as Base16 +import Data.FileEmbed (embedFile, makeRelativeToProject) +import PlutusLedgerApi.Common (SerialisedScript) + +-- | Loads the "plutus.json" blueprint and provides the decoded JSON. +blueprintJSON :: Aeson.Value +blueprintJSON = + case Aeson.decodeStrict $(makeRelativeToProject "./plutus.json" >>= embedFile) of + Nothing -> error "Invalid blueprint: plutus.json" + Just value -> value + +-- | Access the commit validator script from the 'blueprintJSON'. +commitValidatorScript :: SerialisedScript +commitValidatorScript = + case Base16.decode base16Bytes of + Left e -> error $ "Failed to decode commit validator: " <> show e + Right bytes -> toShort bytes + where + base16Bytes = encodeUtf8 base16Text + + -- NOTE: we are using a hardcoded index to access the commit validator. + -- This is fragile and will raise problems when we move another plutus validator + -- to Aiken. + -- Reference: https://github.com/cardano-foundation/CIPs/tree/master/CIP-0057 + base16Text = blueprintJSON ^. key "validators" . nth 0 . key "compiledCode" . _String diff --git a/hydra-plutus/test/Hydra/Plutus/GoldenSpec.hs b/hydra-plutus/test/Hydra/Plutus/GoldenSpec.hs index b66da1d77f9..5b028b66463 100644 --- a/hydra-plutus/test/Hydra/Plutus/GoldenSpec.hs +++ b/hydra-plutus/test/Hydra/Plutus/GoldenSpec.hs @@ -23,7 +23,6 @@ import Hydra.Cardano.Api ( writeFileTextEnvelope, pattern PlutusScript, ) -import Hydra.Contract.Commit qualified as Commit import Hydra.Contract.Deposit qualified as Deposit import Hydra.Contract.Head qualified as Head import Hydra.Contract.HeadTokens qualified as HeadTokens @@ -31,14 +30,19 @@ import Hydra.Contract.Initial qualified as Initial import Hydra.Version (gitDescribe) import PlutusLedgerApi.V2 (serialiseCompiledCode) import PlutusLedgerApi.V2 qualified as Plutus +import System.Process (readProcess) import Test.Hspec.Golden (Golden (..)) spec :: Spec spec = do + it "Commit validator script" $ do + original <- readFileBS "plutus.json" + -- This re-generate plutus.json + void $ readProcess "aiken" ["build", "-t", "compact"] "" + regenerated <- readFileBS "plutus.json" + regenerated `shouldBe` original it "Initial validator script" $ goldenScript "vInitial" Initial.validatorScript - it "Commit validator script" $ - goldenScript "vCommit" Commit.validatorScript it "Head validator script" $ goldenScript "vHead" Head.validatorScript it "Head minting policy script" $ diff --git a/hydra-plutus/validators/commit.ak b/hydra-plutus/validators/commit.ak new file mode 100644 index 00000000000..89678b8c909 --- /dev/null +++ b/hydra-plutus/validators/commit.ak @@ -0,0 +1,84 @@ +use aiken/collection/list +use cardano/assets.{PolicyId, Value} +use cardano/transaction.{OutputReference, Transaction} + +// TODO: Party is not used on-chain but is needed off-chain while it's still +// based on mock crypto. When we move to real crypto we could simply use +// the PT's token name to identify the committing party +pub type Datum { + party: Data, + commits: Data, + head_id: PolicyId +} + +pub type Redeemer { + ViaCollectCom + ViaAbort +} + +const hydra_head_v1: ByteArray = "HydraHeadV1" + +type CommitError { + STNotBurnedError + STIsMissingInTheOutput +} + +fn toErrorCode(err: CommitError) -> String { + when err is { + STNotBurnedError -> @"C01" + STIsMissingInTheOutput -> @"C02" + } +} + +// | The validator used to collect & open or abort a Head. +// | The v_commit validator verifies that: +// +// * spent in a transaction also consuming a v_head output +// +// * ST is burned if the redeemer is 'ViaAbort' +// +// * ST is present in the output if the redeemer is 'ViaCollectCom' +validator commit { + spend(datum: Option, redeemer: Redeemer, _utxo: OutputReference, self: Transaction) -> Bool { + expect Some(datum) = datum + when redeemer is { + // NOTE: The reimbursement of the committed output 'commit' is + // delegated to the 'head' script who has more information to do it. + ViaAbort -> + traceIfFalse( + toErrorCode(STNotBurnedError), + must_burn_st(datum.head_id, self.mint)? + ) + ViaCollectCom -> { + expect Some(head_output) = self.outputs |> list.head + traceIfFalse( + toErrorCode(STIsMissingInTheOutput), + has_st(datum.head_id, head_output.value)?, + ) + } + } + } +} + +fn has_st(head_id: PolicyId, value: Value) -> Bool { + assets.quantity_of(value, head_id, hydra_head_v1) == 1 +} + +fn must_burn_st(head_id: PolicyId, mint: Value) -> Bool { + let quantity = + mint + |> assets.quantity_of(head_id, hydra_head_v1) + + quantity == -1 +} + +// Helpers + +fn traceIfFalse(traceLog: String, predicate: Bool) -> Bool { + if predicate { + True + } else { + trace traceLog + False + } +} diff --git a/hydra-tx/exe/Main.hs b/hydra-tx/exe/Main.hs index a92bd0f932d..630cfd0f656 100644 --- a/hydra-tx/exe/Main.hs +++ b/hydra-tx/exe/Main.hs @@ -1,21 +1,19 @@ module Main where -import Hydra.Cardano.Api (TxIx (..), networkIdToNetwork, textEnvelopeToJSON, pattern TxIn) import Hydra.Prelude import Cardano.Api.UTxO (UTxO) import Cardano.Api.UTxO qualified as UTxO import Data.Aeson (eitherDecodeFileStrict) +import Hydra.Cardano.Api (TxIx (..), networkIdToNetwork, textEnvelopeToJSON, txSpendingUTxO, pattern TxIn) import Hydra.Tx.BlueprintTx (CommitBlueprintTx (..)) import Hydra.Tx.Deposit (depositTx, observeDepositTxOut) import Hydra.Tx.Recover (recoverTx) -import Hydra.Tx.Utils (txSpendingUTxO) -import Options +import Options (Command (..), DepositOptions (..), RecoverOptions (..), parseHydraCommand) main :: IO () -main = do - cmd <- parseHydraCommand - case cmd of +main = + parseHydraCommand >>= \case Deposit DepositOptions{networkId, headId, outFile, utxoFilePath, depositDeadline} -> eitherDecodeFileStrict utxoFilePath >>= \case Left err -> die $ "failed to parse provided UTXO file! " <> err diff --git a/hydra-tx/hydra-tx.cabal b/hydra-tx/hydra-tx.cabal index bb49da6900c..f0e842c32c1 100644 --- a/hydra-tx/hydra-tx.cabal +++ b/hydra-tx/hydra-tx.cabal @@ -80,7 +80,6 @@ library , cardano-crypto-class , cardano-ledger-alonzo , cardano-ledger-api - , cardano-ledger-babbage:testlib , cardano-ledger-binary , cardano-ledger-core , cardano-ledger-shelley diff --git a/hydra-tx/src/Hydra/Ledger/Cardano/Builder.hs b/hydra-tx/src/Hydra/Ledger/Cardano/Builder.hs index 6df7b7f6c84..255f2e11056 100644 --- a/hydra-tx/src/Hydra/Ledger/Cardano/Builder.hs +++ b/hydra-tx/src/Hydra/Ledger/Cardano/Builder.hs @@ -127,7 +127,7 @@ mintTokens script redeemer assets tx = (t, m) mintedTokens' = - mintedTokens <> valueFromList (fmap (first (AssetId policyId)) assets) + mintedTokens <> fromList (fmap (first (AssetId policyId)) assets) mintedWitnesses' = BuildTxWith $ mintedWitnesses <> Map.singleton policyId mintingWitness diff --git a/hydra-tx/src/Hydra/Ledger/Cardano/Evaluate.hs b/hydra-tx/src/Hydra/Ledger/Cardano/Evaluate.hs index ce20bcd2964..c695fd13eec 100644 --- a/hydra-tx/src/Hydra/Ledger/Cardano/Evaluate.hs +++ b/hydra-tx/src/Hydra/Ledger/Cardano/Evaluate.hs @@ -24,6 +24,7 @@ import Cardano.Ledger.BaseTypes (BoundedRational (boundRational), ProtVer (..), import Cardano.Ledger.Coin (Coin (Coin)) import Cardano.Ledger.Core (PParams, ppMaxTxSizeL) import Cardano.Ledger.Plutus ( + Language (..), LegacyPlutusArgs (..), PlutusArgs (..), PlutusLanguage (decodePlutusRunnable), @@ -33,7 +34,6 @@ import Cardano.Ledger.Plutus ( isLanguage, unPlutusV2Args, ) -import Cardano.Ledger.Plutus.Language (Language (PlutusV2)) import Cardano.Ledger.Val (Val ((<+>)), (<×>)) import Cardano.Slotting.EpochInfo (EpochInfo, fixedEpochInfo) import Cardano.Slotting.Slot (EpochNo (EpochNo), EpochSize (EpochSize), SlotNo (SlotNo)) @@ -292,8 +292,14 @@ pparams = { prSteps = fromJust $ boundRational $ 721 % 10000000 , prMem = fromJust $ boundRational $ 577 % 10000 } - & ppProtocolVersionL .~ ProtVer{pvMajor = natVersion @8, pvMinor = 0} - & ppCostModelsL .~ mkCostModels (Map.fromList [(PlutusV2, plutusV2CostModel)]) + & ppProtocolVersionL .~ ProtVer{pvMajor = natVersion @9, pvMinor = 0} + & ppCostModelsL + .~ mkCostModels + ( Map.fromList + [ (PlutusV2, plutusV2CostModel) + , (PlutusV3, plutusV3CostModel) + ] + ) maxTxSize :: Natural maxTxSize = 16384 @@ -447,6 +453,265 @@ genPointInTimeAfter deadline = do -- ** Plutus cost model fixtures +-- | Current (2024-10-03) mainnet PlutusV3 cost model. +plutusV3CostModel :: CostModel +plutusV3CostModel = + either (error . show) id $ + mkCostModel + PlutusV3 + [ 100788 + , 420 + , 1 + , 1 + , 1000 + , 173 + , 0 + , 1 + , 1000 + , 59957 + , 4 + , 1 + , 11183 + , 32 + , 201305 + , 8356 + , 4 + , 16000 + , 100 + , 16000 + , 100 + , 16000 + , 100 + , 16000 + , 100 + , 16000 + , 100 + , 16000 + , 100 + , 100 + , 100 + , 16000 + , 100 + , 94375 + , 32 + , 132994 + , 32 + , 61462 + , 4 + , 72010 + , 178 + , 0 + , 1 + , 22151 + , 32 + , 91189 + , 769 + , 4 + , 2 + , 85848 + , 123203 + , 7305 + , -900 + , 1716 + , 549 + , 57 + , 85848 + , 0 + , 1 + , 1 + , 1000 + , 42921 + , 4 + , 2 + , 24548 + , 29498 + , 38 + , 1 + , 898148 + , 27279 + , 1 + , 51775 + , 558 + , 1 + , 39184 + , 1000 + , 60594 + , 1 + , 141895 + , 32 + , 83150 + , 32 + , 15299 + , 32 + , 76049 + , 1 + , 13169 + , 4 + , 22100 + , 10 + , 28999 + , 74 + , 1 + , 28999 + , 74 + , 1 + , 43285 + , 552 + , 1 + , 44749 + , 541 + , 1 + , 33852 + , 32 + , 68246 + , 32 + , 72362 + , 32 + , 7243 + , 32 + , 7391 + , 32 + , 11546 + , 32 + , 85848 + , 123203 + , 7305 + , -900 + , 1716 + , 549 + , 57 + , 85848 + , 0 + , 1 + , 90434 + , 519 + , 0 + , 1 + , 74433 + , 32 + , 85848 + , 123203 + , 7305 + , -900 + , 1716 + , 549 + , 57 + , 85848 + , 0 + , 1 + , 1 + , 85848 + , 123203 + , 7305 + , -900 + , 1716 + , 549 + , 57 + , 85848 + , 0 + , 1 + , 955506 + , 213312 + , 0 + , 2 + , 270652 + , 22588 + , 4 + , 1457325 + , 64566 + , 4 + , 20467 + , 1 + , 4 + , 0 + , 141992 + , 32 + , 100788 + , 420 + , 1 + , 1 + , 81663 + , 32 + , 59498 + , 32 + , 20142 + , 32 + , 24588 + , 32 + , 20744 + , 32 + , 25933 + , 32 + , 24623 + , 32 + , 43053543 + , 10 + , 53384111 + , 14333 + , 10 + , 43574283 + , 26308 + , 10 + , 16000 + , 100 + , 16000 + , 100 + , 962335 + , 18 + , 2780678 + , 6 + , 442008 + , 1 + , 52538055 + , 3756 + , 18 + , 267929 + , 18 + , 76433006 + , 8868 + , 18 + , 52948122 + , 18 + , 1995836 + , 36 + , 3227919 + , 12 + , 901022 + , 1 + , 166917843 + , 4307 + , 36 + , 284546 + , 36 + , 158221314 + , 26549 + , 36 + , 74698472 + , 36 + , 333849714 + , 1 + , 254006273 + , 72 + , 2174038 + , 72 + , 2261318 + , 64571 + , 4 + , 207616 + , 8310 + , 4 + , 1293828 + , 28716 + , 63 + , 0 + , 1 + , 1006041 + , 43623 + , 251 + , 0 + , 1 + ] + -- | Current (2023-08-04) mainnet PlutusV2 cost model. plutusV2CostModel :: CostModel plutusV2CostModel = diff --git a/hydra-tx/src/Hydra/Tx/Abort.hs b/hydra-tx/src/Hydra/Tx/Abort.hs index 359f555c27b..a5f27bfccc8 100644 --- a/hydra-tx/src/Hydra/Tx/Abort.hs +++ b/hydra-tx/src/Hydra/Tx/Abort.hs @@ -19,6 +19,7 @@ import Hydra.Ledger.Cardano.Builder ( emptyTxBody, unsafeBuildTransaction, ) +import Hydra.Plutus (commitValidatorScript) import Hydra.Tx (ScriptRegistry (..)) import Hydra.Tx.Utils (headTokensFromValue) @@ -55,7 +56,7 @@ abortTx committedUTxO scriptRegistry vk (headInput, initialHeadOutput) headToken unsafeBuildTransaction $ emptyTxBody & addInputs ((headInput, headWitness) : initialInputs <> commitInputs) - & addReferenceInputs [initialScriptRef, commitScriptRef, headScriptRef] + & addReferenceInputs ([headScriptRef, initialScriptRef] <> [commitScriptRef | not $ null commitInputs]) & addOutputs reimbursedOutputs & burnTokens headTokenScript Burn headTokens & addExtraRequiredSigners [verificationKeyHash vk] @@ -103,7 +104,7 @@ abortTx committedUTxO scriptRegistry vk (headInput, initialHeadOutput) headToken commitScriptRef = fst (commitReference scriptRegistry) commitScript = - fromPlutusScript @PlutusScriptV2 Commit.validatorScript + fromPlutusScript @PlutusScriptV3 commitValidatorScript commitRedeemer = toScriptData (Commit.redeemer Commit.ViaAbort) diff --git a/hydra-tx/src/Hydra/Tx/CollectCom.hs b/hydra-tx/src/Hydra/Tx/CollectCom.hs index a544534d96f..91234a4d728 100644 --- a/hydra-tx/src/Hydra/Tx/CollectCom.hs +++ b/hydra-tx/src/Hydra/Tx/CollectCom.hs @@ -18,6 +18,7 @@ import Hydra.Ledger.Cardano.Builder ( emptyTxBody, unsafeBuildTransaction, ) +import Hydra.Plutus (commitValidatorScript) import Hydra.Tx.ContestationPeriod (toChain) import Hydra.Tx.HeadId (HeadId, headIdToCurrencySymbol) import Hydra.Tx.HeadParameters (HeadParameters (..)) @@ -95,6 +96,6 @@ collectComTx networkId scriptRegistry vk headId headParameters (headInput, initi commitValue = mconcat $ txOutValue <$> Map.elems commits commitScript = - fromPlutusScript @PlutusScriptV2 Commit.validatorScript + fromPlutusScript @PlutusScriptV3 commitValidatorScript commitRedeemer = toScriptData $ Commit.redeemer Commit.ViaCollectCom diff --git a/hydra-tx/src/Hydra/Tx/Commit.hs b/hydra-tx/src/Hydra/Tx/Commit.hs index 98604d782e9..723651e5a3a 100644 --- a/hydra-tx/src/Hydra/Tx/Commit.hs +++ b/hydra-tx/src/Hydra/Tx/Commit.hs @@ -28,6 +28,7 @@ import Data.Sequence.Strict qualified as StrictSeq import Data.Set qualified as Set import Hydra.Contract.Commit qualified as Commit import Hydra.Contract.Initial qualified as Initial +import Hydra.Plutus (commitValidatorScript) import Hydra.Tx.BlueprintTx (CommitBlueprintTx (..)) import Hydra.Tx.HeadId (HeadId, headIdToCurrencySymbol) import Hydra.Tx.Party (Party, partyToChain) @@ -115,10 +116,10 @@ commitTx networkId scriptRegistry headId party commitBlueprintTx (initialInput, TxOut commitAddress commitValue commitDatum ReferenceScriptNone commitScript = - fromPlutusScript Commit.validatorScript + fromPlutusScript @PlutusScriptV3 commitValidatorScript commitAddress = - mkScriptAddress @PlutusScriptV2 networkId commitScript + mkScriptAddress networkId commitScript utxoToCommit = UTxO.fromPairs $ mapMaybe (\txin -> (txin,) <$> UTxO.resolve txin lookupUTxO) committedTxIns diff --git a/hydra-tx/src/Hydra/Tx/Init.hs b/hydra-tx/src/Hydra/Tx/Init.hs index e9b0b90e1d2..bc3abbbb0d5 100644 --- a/hydra-tx/src/Hydra/Tx/Init.hs +++ b/hydra-tx/src/Hydra/Tx/Init.hs @@ -43,7 +43,7 @@ mkHeadOutput :: NetworkId -> PolicyId -> TxOutDatum ctx -> TxOut ctx mkHeadOutput networkId tokenPolicyId datum = TxOut (mkScriptAddress @PlutusScriptV2 networkId headScript) - (valueFromList [(AssetId tokenPolicyId hydraHeadV1AssetName, 1)]) + (fromList [(AssetId tokenPolicyId hydraHeadV1AssetName, 1)]) datum ReferenceScriptNone where @@ -69,7 +69,7 @@ mkInitialOutput networkId seedTxIn participant = where tokenPolicyId = HeadTokens.headPolicyId seedTxIn initialValue = - valueFromList [(AssetId tokenPolicyId (onChainIdToAssetName participant), 1)] + fromList [(AssetId tokenPolicyId (onChainIdToAssetName participant), 1)] initialAddress = mkScriptAddress @PlutusScriptV2 networkId initialScript initialScript = diff --git a/hydra-tx/src/Hydra/Tx/IsTx.hs b/hydra-tx/src/Hydra/Tx/IsTx.hs index 0c7061de37c..73eed851e04 100644 --- a/hydra-tx/src/Hydra/Tx/IsTx.hs +++ b/hydra-tx/src/Hydra/Tx/IsTx.hs @@ -23,7 +23,6 @@ import Formatting.Buildable (build) import Hydra.Cardano.Api.Tx qualified as Api import Hydra.Cardano.Api.UTxO qualified as Api import Hydra.Contract.Head qualified as Head -import Hydra.Tx.Utils (txSpendingUTxO) import PlutusLedgerApi.V2 (fromBuiltin) -- | Types of transactions that can be used by the Head protocol. The associated @@ -168,7 +167,7 @@ instance IsTx Tx where -- NOTE: See note from `Head.hashTxOuts`. hashUTxO = fromBuiltin . Head.hashTxOuts . mapMaybe toPlutusTxOut . toList - txSpendingUTxO = Hydra.Tx.Utils.txSpendingUTxO + txSpendingUTxO = Api.txSpendingUTxO utxoFromTx = Api.utxoFromTx diff --git a/hydra-tx/src/Hydra/Tx/Utils.hs b/hydra-tx/src/Hydra/Tx/Utils.hs index 3e6ebbac85d..7d0e4ca0a8e 100644 --- a/hydra-tx/src/Hydra/Tx/Utils.hs +++ b/hydra-tx/src/Hydra/Tx/Utils.hs @@ -1,21 +1,19 @@ module Hydra.Tx.Utils where import Hydra.Cardano.Api -import Hydra.Prelude +import Hydra.Prelude hiding (toList) import Cardano.Api.UTxO qualified as UTxO -import Cardano.Ledger.Alonzo.Core (auxDataHashTxBodyL, auxDataTxL, bodyTxL, inputsTxBodyL, mkBasicTx) import Cardano.Ledger.Alonzo.Tx qualified as Ledger -import Cardano.Ledger.Api (AlonzoTxAuxData (..), hashTxAuxData, mkBasicTxBody) +import Cardano.Ledger.Api (AlonzoTxAuxData (..), auxDataHashTxBodyL, auxDataTxL, bodyTxL, hashTxAuxData) import Control.Lens ((.~), (^.)) import Data.Map.Strict qualified as Map import Data.Maybe.Strict (StrictMaybe (..)) -import Data.Set qualified as Set +import GHC.IsList (IsList (..)) import Hydra.Contract.Util (hydraHeadV1) import Hydra.Tx.OnChainId (OnChainId (..)) import Ouroboros.Consensus.Shelley.Eras qualified as Ledger import PlutusLedgerApi.V2 (fromBuiltin, getPubKeyHash) -import Test.Cardano.Ledger.Babbage.Arbitrary () hydraHeadV1AssetName :: AssetName hydraHeadV1AssetName = AssetName (fromBuiltin hydraHeadV1) @@ -54,7 +52,7 @@ verificationKeyToOnChainId = headTokensFromValue :: PlutusScript -> Value -> [(AssetName, Quantity)] headTokensFromValue headTokenScript v = [ (assetName, q) - | (AssetId pid assetName, q) <- valueToList v + | (AssetId pid assetName, q) <- toList v , pid == scriptPolicyId (PlutusScript headTokenScript) ] @@ -84,14 +82,3 @@ addMetadata (TxMetadata newMetadata) blueprintTx tx = tx & auxDataTxL .~ SJust newAuxData & bodyTxL . auxDataHashTxBodyL .~ SJust (hashTxAuxData newAuxData) - --- | Create a transaction spending all given `UTxO`. -txSpendingUTxO :: UTxO -> Tx -txSpendingUTxO utxo = - fromLedgerTx $ - mkBasicTx - ( mkBasicTxBody - & inputsTxBodyL .~ (toLedgerTxIn `Set.map` inputs) - ) - where - inputs = UTxO.inputSet utxo diff --git a/hydra-tx/test/Hydra/Tx/Contract/Abort.hs b/hydra-tx/test/Hydra/Tx/Contract/Abort.hs index 80903e1c6ff..96484edc6f3 100644 --- a/hydra-tx/test/Hydra/Tx/Contract/Abort.hs +++ b/hydra-tx/test/Hydra/Tx/Contract/Abort.hs @@ -10,7 +10,6 @@ import Hydra.Prelude import Cardano.Api.UTxO qualified as UTxO import Data.List qualified as List import Data.Map qualified as Map -import Hydra.Contract.Commit qualified as Commit import Hydra.Contract.CommitError (CommitError (..)) import Hydra.Contract.Error (toErrorCode) import Hydra.Contract.HeadError (HeadError (..)) @@ -19,6 +18,7 @@ import Hydra.Contract.HeadTokens (headPolicyId, mkHeadTokenScript) import Hydra.Contract.HeadTokensError (HeadTokensError (..)) import Hydra.Contract.Initial qualified as Initial import Hydra.Contract.InitialError (InitialError (STNotBurned)) +import Hydra.Plutus (commitValidatorScript) import Hydra.Tx ( HeadParameters (..), Party, @@ -131,7 +131,7 @@ propHasCommit (_, utxo) = & counterexample ("UTxO: " <> decodeUtf8 (encodePretty utxo)) & counterexample ("Looking for Commit Script: " <> show addr) where - addr = mkScriptAddress @PlutusScriptV2 testNetworkId (fromPlutusScript Commit.validatorScript) + addr = mkScriptAddress testNetworkId (fromPlutusScript @PlutusScriptV3 commitValidatorScript) paysToCommitScript txOut = txOutAddress txOut == addr @@ -253,7 +253,7 @@ genAbortMutation (tx, utxo) = ] ++ divertFunds , SomeMutation (pure $ toErrorCode STNotBurnedError) DoNotBurnST - <$> changeMintedTokens tx (valueFromList [(AssetId (headPolicyId testSeedInput) hydraHeadV1AssetName, 1)]) + <$> changeMintedTokens tx (fromList [(AssetId (headPolicyId testSeedInput) hydraHeadV1AssetName, 1)]) , SomeMutation (pure $ toErrorCode STNotBurned) DoNotBurnSTInitial - <$> changeMintedTokens tx (valueFromList [(AssetId (headPolicyId testSeedInput) hydraHeadV1AssetName, 1)]) + <$> changeMintedTokens tx (fromList [(AssetId (headPolicyId testSeedInput) hydraHeadV1AssetName, 1)]) ] diff --git a/hydra-tx/test/Hydra/Tx/Contract/CollectCom.hs b/hydra-tx/test/Hydra/Tx/Contract/CollectCom.hs index 60128ec9a92..3f35f9b6055 100644 --- a/hydra-tx/test/Hydra/Tx/Contract/CollectCom.hs +++ b/hydra-tx/test/Hydra/Tx/Contract/CollectCom.hs @@ -4,13 +4,13 @@ module Hydra.Tx.Contract.CollectCom where import Hydra.Cardano.Api -import Hydra.Prelude hiding (label) +import Hydra.Prelude hiding (label, toList) import Cardano.Api.UTxO qualified as UTxO import Data.List qualified as List import Data.Map qualified as Map import Data.Maybe (fromJust) -import Hydra.Contract.Commit qualified as Commit +import GHC.IsList (IsList (..)) import Hydra.Contract.CommitError (CommitError (STIsMissingInTheOutput)) import Hydra.Contract.Error (toErrorCode) import Hydra.Contract.HeadError (HeadError (..)) @@ -20,7 +20,7 @@ import Hydra.Contract.Initial qualified as Initial import Hydra.Contract.InitialError (InitialError (ExpectedSingleCommitOutput, LockedValueDoesNotMatch)) import Hydra.Contract.Util (UtilError (MintingOrBurningIsForbidden)) import Hydra.Data.Party qualified as OnChain -import Hydra.Plutus.Orphans () +import Hydra.Plutus (commitValidatorScript) import Hydra.Tx (HeadParameters (..), Party, partyToChain) import Hydra.Tx.CollectCom ( collectComTx, @@ -173,12 +173,12 @@ healthyCommitOutput participant party committed = txIn = genTxIn `genForParty` party commitScript = - fromPlutusScript Commit.validatorScript + fromPlutusScript @PlutusScriptV3 commitValidatorScript commitAddress = - mkScriptAddress @PlutusScriptV2 testNetworkId commitScript + mkScriptAddress testNetworkId commitScript commitValue = foldMap txOutValue committed - <> valueFromList + <> fromList [ (AssetId testPolicyId (onChainIdToAssetName participant), 1) ] commitDatum = @@ -287,13 +287,13 @@ genCollectComMutation (tx, _utxo) = extractHeadOutputValue :: TxOut CtxTx -> PolicyId -> Gen Mutation extractHeadOutputValue headTxOut policyId = do removedValue <- do - let allAssets = valueToList $ txOutValue headTxOut + let allAssets = toList $ txOutValue headTxOut nonPTs = flip filter allAssets $ \case (AssetId pid _, _) -> pid /= policyId _ -> True (assetId, Quantity n) <- elements nonPTs q <- Quantity <$> choose (1, n) - pure $ valueFromList [(assetId, q)] + pure $ fromList [(assetId, q)] -- Add another output which would extract the 'removedValue'. The ledger would -- require this to have a balanced transaction. extractionTxOut <- do diff --git a/hydra-tx/test/Hydra/Tx/Contract/Commit.hs b/hydra-tx/test/Hydra/Tx/Contract/Commit.hs index e431087d41a..db7d1fc7b7e 100644 --- a/hydra-tx/test/Hydra/Tx/Contract/Commit.hs +++ b/hydra-tx/test/Hydra/Tx/Contract/Commit.hs @@ -2,7 +2,7 @@ -- 'healthyCommitTx' gets mutated by an arbitrary 'CommitMutation'. module Hydra.Tx.Contract.Commit where -import Hydra.Cardano.Api hiding (txSpendingUTxO) +import Hydra.Cardano.Api import Hydra.Prelude import Cardano.Api.UTxO qualified as UTxO @@ -20,7 +20,7 @@ import Hydra.Tx (CommitBlueprintTx (..), Party, mkHeadId) import Hydra.Tx.Commit (commitTx) import Hydra.Tx.Init (mkInitialOutput) import Hydra.Tx.ScriptRegistry (registryUTxO) -import Hydra.Tx.Utils (txSpendingUTxO, verificationKeyToOnChainId) +import Hydra.Tx.Utils (verificationKeyToOnChainId) import Test.Hydra.Tx.Fixture qualified as Fixture import Test.Hydra.Tx.Gen (genAddressInEra, genMintedOrBurnedValue, genScriptRegistry, genSigningKey, genUTxOAdaOnlyOfSize, genValue, genVerificationKey) import Test.Hydra.Tx.Mutation ( diff --git a/hydra-tx/test/Hydra/Tx/Contract/Deposit.hs b/hydra-tx/test/Hydra/Tx/Contract/Deposit.hs index 1c9a6474bbd..72068c1ee10 100644 --- a/hydra-tx/test/Hydra/Tx/Contract/Deposit.hs +++ b/hydra-tx/test/Hydra/Tx/Contract/Deposit.hs @@ -1,12 +1,11 @@ module Hydra.Tx.Contract.Deposit where -import Hydra.Cardano.Api hiding (txSpendingUTxO) +import Hydra.Cardano.Api import Hydra.Prelude import Hydra.Tx (mkHeadId) import Hydra.Tx.BlueprintTx (CommitBlueprintTx (..)) import Hydra.Tx.Deposit (depositTx) -import Hydra.Tx.Utils (txSpendingUTxO) import Test.Hydra.Tx.Fixture (testNetworkId, testPolicyId) import Test.Hydra.Tx.Gen (genUTxOAdaOnlyOfSize) diff --git a/hydra-tx/test/Hydra/Tx/Contract/FanOut.hs b/hydra-tx/test/Hydra/Tx/Contract/FanOut.hs index d0dd5a291ef..3828c20e99c 100644 --- a/hydra-tx/test/Hydra/Tx/Contract/FanOut.hs +++ b/hydra-tx/test/Hydra/Tx/Contract/FanOut.hs @@ -4,9 +4,10 @@ module Hydra.Tx.Contract.FanOut where import Hydra.Cardano.Api -import Hydra.Prelude hiding (label) +import Hydra.Prelude hiding (label, toList) import Cardano.Api.UTxO as UTxO +import GHC.IsList (IsList (..)) import Hydra.Contract.Error (toErrorCode) import Hydra.Contract.HeadError (HeadError (..)) import Hydra.Contract.HeadState qualified as Head @@ -56,7 +57,7 @@ healthyFanoutTx = headOutput = modifyTxOutValue (<> participationTokens) headOutput' participationTokens = - valueFromList $ + fromList $ map ( \party -> (AssetId testPolicyId (AssetName . serialiseToRawBytes . verificationKeyHash . vkey $ party), 1) @@ -121,7 +122,7 @@ genFanoutMutation (tx, _utxo) = , -- Spec: All tokens are burnt |{cid 7→ · 7→ −1} ∈ mint| = m′ + 1. SomeMutation (pure $ toErrorCode BurntTokenNumberMismatch) MutateThreadTokenQuantity <$> do (token, _) <- elements burntTokens - changeMintedTokens tx (valueFromList [(token, 1)]) + changeMintedTokens tx (fromList [(token, 1)]) , -- Spec: The first m outputs are distributing funds according to η. That is, the outputs exactly -- correspond to the UTxO canonically combined U SomeMutation (pure $ toErrorCode FanoutUTxOHashMismatch) MutateAddUnexpectedOutput . PrependOutput <$> do @@ -147,6 +148,6 @@ genFanoutMutation (tx, _utxo) = burntTokens = case txMintValue $ txBodyContent $ txBody tx of TxMintValueNone -> error "expected minted value" - TxMintValue v _ -> valueToList v + TxMintValue v _ -> toList v genSlotBefore (SlotNo slot) = SlotNo <$> choose (0, slot) diff --git a/hydra-tx/test/Hydra/Tx/Contract/Recover.hs b/hydra-tx/test/Hydra/Tx/Contract/Recover.hs index 12e41a77328..c4765716078 100644 --- a/hydra-tx/test/Hydra/Tx/Contract/Recover.hs +++ b/hydra-tx/test/Hydra/Tx/Contract/Recover.hs @@ -1,6 +1,6 @@ module Hydra.Tx.Contract.Recover where -import Hydra.Cardano.Api hiding (txSpendingUTxO) +import Hydra.Cardano.Api import Hydra.Prelude import Cardano.Api.UTxO qualified as UTxO @@ -17,7 +17,6 @@ import Hydra.Tx.BlueprintTx (CommitBlueprintTx (..)) import Hydra.Tx.Deposit (depositTx) import Hydra.Tx.HeadId (mkHeadId) import Hydra.Tx.Recover (recoverTx) -import Hydra.Tx.Utils (txSpendingUTxO) import PlutusLedgerApi.V2 (CurrencySymbol, POSIXTime) import Test.Hydra.Tx.Fixture (testNetworkId, testPolicyId) import Test.Hydra.Tx.Gen (genUTxOAdaOnlyOfSize, genValue) diff --git a/hydra-tx/testlib/Test/Hydra/Tx/Gen.hs b/hydra-tx/testlib/Test/Hydra/Tx/Gen.hs index 39875621000..400a6419732 100644 --- a/hydra-tx/testlib/Test/Hydra/Tx/Gen.hs +++ b/hydra-tx/testlib/Test/Hydra/Tx/Gen.hs @@ -4,7 +4,7 @@ module Test.Hydra.Tx.Gen where import Hydra.Cardano.Api -import Hydra.Prelude +import Hydra.Prelude hiding (toList) import Cardano.Api.UTxO qualified as UTxO import Cardano.Crypto.DSIGN qualified as CC @@ -16,11 +16,12 @@ import Codec.CBOR.Magic (uintegerFromBytes) import Data.ByteString qualified as BS import Data.Map.Strict qualified as Map import Data.Maybe (fromJust) -import Hydra.Contract.Commit qualified as Commit +import GHC.IsList (IsList (..)) import Hydra.Contract.Head qualified as Head import Hydra.Contract.HeadTokens (headPolicyId) import Hydra.Contract.Initial qualified as Initial import Hydra.Contract.Util (hydraHeadV1) +import Hydra.Plutus (commitValidatorScript) import Hydra.Tx (ScriptRegistry (..)) import Hydra.Tx.Close (OpenThreadOutput) import Hydra.Tx.Commit (mkCommitDatum) @@ -205,7 +206,7 @@ genScriptRegistry = do ) , commitReference = ( TxIn txId' (TxIx 1) - , txOut{txOutReferenceScript = mkScriptRef Commit.validatorScript} + , txOut{txOutReferenceScript = mkScriptRefV3 commitValidatorScript} ) , headReference = ( TxIn txId' (TxIx 2) @@ -241,7 +242,7 @@ instance Arbitrary (TxOut CtxUTxO) where shrinkValue :: Value -> [Value] shrinkValue = - shrinkMapBy valueFromList valueToList shrinkListAggressively + shrinkMapBy fromList toList shrinkListAggressively shrinkUTxO :: UTxO -> [UTxO] shrinkUTxO = shrinkMapBy (UTxO . fromList) UTxO.pairs (shrinkList shrinkOne) @@ -272,7 +273,7 @@ genMintedOrBurnedValue = do ] tokenName <- oneof [arbitrary, pure (AssetName $ fromBuiltin hydraHeadV1)] quantity <- arbitrary `suchThat` (/= 0) - pure $ valueFromList [(AssetId policyId tokenName, Quantity quantity)] + pure $ fromList [(AssetId policyId tokenName, Quantity quantity)] -- NOTE: Uses 'testPolicyId' for the datum. genAbortableOutputs :: [Party] -> Gen ([(TxIn, TxOut CtxUTxO)], [(TxIn, TxOut CtxUTxO, UTxO)]) @@ -301,12 +302,12 @@ genAbortableOutputs parties = initialTxOut vk = toUTxOContext $ TxOut - (mkScriptAddress @PlutusScriptV2 testNetworkId initialScript) - (valueFromList [(AssetId testPolicyId (assetNameFromVerificationKey vk), 1)]) + (mkScriptAddress testNetworkId initialScript) + (fromList [(AssetId testPolicyId (assetNameFromVerificationKey vk), 1)]) (mkTxOutDatumInline initialDatum) ReferenceScriptNone - initialScript = fromPlutusScript Initial.validatorScript + initialScript = fromPlutusScript @PlutusScriptV2 Initial.validatorScript initialDatum = Initial.datum (toPlutusCurrencySymbol testPolicyId) @@ -330,7 +331,7 @@ generateCommitUTxOs parties = do mkCommitUTxO (vk, party) utxo = ( toUTxOContext $ TxOut - (mkScriptAddress @PlutusScriptV2 testNetworkId commitScript) + (mkScriptAddress testNetworkId commitScript) commitValue (mkTxOutDatumInline commitDatum) ReferenceScriptNone @@ -341,12 +342,12 @@ generateCommitUTxOs parties = do mconcat [ lovelaceToValue (Coin 2000000) , foldMap txOutValue utxo - , valueFromList + , fromList [ (AssetId testPolicyId (assetNameFromVerificationKey vk), 1) ] ] - commitScript = fromPlutusScript Commit.validatorScript + commitScript = fromPlutusScript @PlutusScriptV3 commitValidatorScript commitDatum = mkCommitDatum party utxo (toPlutusCurrencySymbol testPolicyId) diff --git a/hydra-tx/testlib/Test/Hydra/Tx/Mutation.hs b/hydra-tx/testlib/Test/Hydra/Tx/Mutation.hs index 08261ed216c..e521e9e83d5 100644 --- a/hydra-tx/testlib/Test/Hydra/Tx/Mutation.hs +++ b/hydra-tx/testlib/Test/Hydra/Tx/Mutation.hs @@ -144,6 +144,7 @@ import Control.Lens (set, view, (.~), (^.)) import Data.Map qualified as Map import Data.Sequence.Strict qualified as StrictSeq import Data.Set qualified as Set +import GHC.IsList (IsList (..)) import Hydra.Cardano.Api.Pretty (renderTxWithUTxO) import Hydra.Contract.Head qualified as Head import Hydra.Contract.HeadState qualified as Head @@ -151,7 +152,7 @@ import Hydra.Data.ContestationPeriod import Hydra.Data.Party qualified as Data (Party) import Hydra.Ledger.Cardano.Evaluate (evaluateTx) import Hydra.Plutus.Orphans () -import Hydra.Prelude hiding (label) +import Hydra.Prelude hiding (label, toList) import Hydra.Tx.Utils (findFirst, onChainIdToAssetName, verificationKeyToOnChainId) import PlutusLedgerApi.V2 (CurrencySymbol, POSIXTime, toData) import PlutusLedgerApi.V2 qualified as Plutus @@ -466,7 +467,7 @@ applyMutation mutation (tx@(Tx body wits), utxo) = case mutation of (AssetId pid _, _) -> Just pid (AdaAssetId, _) -> Nothing ) - $ valueToList mint + $ toList mint mint = fromLedgerMultiAsset $ view mintTxBodyL ledgerBody @@ -578,7 +579,7 @@ addParticipationTokens vks txOut = where val' = txOutValue txOut - <> valueFromList + <> fromList [ (AssetId testPolicyId (onChainIdToAssetName oid), 1) | oid <- participants ] @@ -708,7 +709,7 @@ changeMintedValueQuantityFrom tx exclude = pure mempty TxMintValue v _ -> do someQuantity <- fromInteger <$> arbitrary `suchThat` (/= exclude) `suchThat` (/= 0) - pure . valueFromList $ map (second $ const someQuantity) $ valueToList v + pure . fromList $ map (second $ const someQuantity) $ toList v where mintedValue = txMintValue $ txBodyContent $ txBody tx @@ -735,12 +736,12 @@ addPTWithQuantity tx quantity = TxMintValue v _ -> do -- NOTE: We do not expect Ada or any other assets to be minted, so -- we can take the policy id from the head - case Prelude.head $ valueToList v of + case Prelude.head $ toList v of (AdaAssetId, _) -> error "unexpected mint of Ada" (AssetId pid _an, _) -> do -- Some arbitrary token name, which could correspond to a pub key hash pkh <- arbitrary - pure $ v <> valueFromList [(AssetId pid pkh, quantity)] + pure $ v <> fromList [(AssetId pid pkh, quantity)] TxMintValueNone -> pure mempty where @@ -754,7 +755,7 @@ replacePolicyIdWith original replacement = -- | Replace first given 'PolicyId' with the second argument in the whole 'Value'. replacePolicyInValue :: PolicyId -> PolicyId -> Value -> Value replacePolicyInValue original replacement = - valueFromList . map replaceAssetId . valueToList + fromList . map replaceAssetId . toList where replaceAssetId (aid, q) = case aid of AssetId pid an @@ -968,11 +969,11 @@ removePTFromMintedValue :: TxOut CtxUTxO -> Tx -> Value removePTFromMintedValue output tx = case txMintValue $ txBodyContent $ txBody tx of TxMintValueNone -> error "expected minted value" - TxMintValue v _ -> valueFromList $ filter (not . isPT) $ valueToList v + TxMintValue v _ -> fromList $ filter (not . isPT) $ toList v where outValue = txOutValue output assetNames = - [ (policyId, pkh) | (AssetId policyId pkh, _) <- valueToList outValue, policyId == testPolicyId + [ (policyId, pkh) | (AssetId policyId pkh, _) <- toList outValue, policyId == testPolicyId ] (headId, assetName) = case assetNames of diff --git a/nix/hydra/packages.nix b/nix/hydra/packages.nix index a63e3768db7..6d4b6dfdfe0 100644 --- a/nix/hydra/packages.nix +++ b/nix/hydra/packages.nix @@ -134,7 +134,10 @@ rec { }; hydra-plutus-tests = pkgs.mkShellNoCC { name = "hydra-plutus-tests"; - buildInputs = [ nativePkgs.hydra-plutus.components.tests.tests ]; + buildInputs = [ + nativePkgs.hydra-plutus.components.tests.tests + pkgs.aiken + ]; }; hydra-node-tests = pkgs.mkShellNoCC { name = "hydra-node-tests"; diff --git a/nix/hydra/shell.nix b/nix/hydra/shell.nix index 2468d894a6d..8bdb0cbe541 100644 --- a/nix/hydra/shell.nix +++ b/nix/hydra/shell.nix @@ -8,6 +8,7 @@ , pkgs , ghc , pkgsLatest +, aiken }: let @@ -18,6 +19,8 @@ let pkgs.cabal-install # Handy tool to debug the cabal build plan pkgs.cabal-plan + # To compile hydra scripts + aiken.packages.${system}.aiken # To interact with cardano-node and integration tests pkgs.cardano-cli # For integration tests