diff --git a/cabal.project b/cabal.project index a06da34..53ca3fc 100644 --- a/cabal.project +++ b/cabal.project @@ -1,4 +1,5 @@ -index-state: 2022-02-22T20:47:03Z +-- Bump this if you need newer packages. +index-state: 2022-05-18T00:00:00Z packages: ./. @@ -9,10 +10,11 @@ write-ghc-environment-files: never tests: true benchmarks: true --- Plutus apps revision from 2022-04-06 +-- Plutus apps revision from 2022-07-05 source-repository-package type: git location: https://github.com/input-output-hk/plutus-apps.git + tag: 194022c32b72c5f16472d718f75981264ace97b3 subdir: doc freer-extras @@ -27,11 +29,11 @@ source-repository-package plutus-pab plutus-pab-executables plutus-playground-server + plutus-script-utils + plutus-streaming + plutus-tx-constraints plutus-use-cases - quickcheck-dynamic web-ghc - tag: v2022-04-06 - -- The following sections are copied from the 'plutus-apps' repository cabal.project at the revision -- given above. @@ -50,15 +52,28 @@ benchmarks: true test-show-details: streaming allow-newer: - size-based:template-haskell + *:aeson + , size-based:template-haskell constraints: - -- Because later versions of hedgehog introduce a change which break 'cardano-ledger': - -- Test/Cardano/Chain/Delegation/Model.hs:91:41: error: - -- • Could not deduce (TraversableB SignalSDELEG) - -- TODO: Try to remove on next `cardano-node` version upgrade. - hedgehog >= 1.0.2 && < 1.1 + aeson >= 2 + , hedgehog >= 1.1 + +-- COPIED FROM PLUTUS-APPS +-- The plugin will typically fail when producing Haddock documentation. However, +-- in this instance you can simply tell it to defer any errors to runtime (which +-- will never happen since you're building documentation). +-- +-- So, any package using 'PlutusTx.compile' in the code for which you need to +-- generate haddock documentation should use the following 'haddock-options'. +package plutus-ledger + haddock-options: "--optghc=-fplugin-opt PlutusTx.Plugin:defer-errors" +package plutus-script-utils + haddock-options: "--optghc=-fplugin-opt PlutusTx.Plugin:defer-errors" +package plutus-contract + haddock-options: "--optghc=-fplugin-opt PlutusTx.Plugin:defer-errors" +-- COPIED FROM PLUTUS-APPS -- These packages appear in our dependency tree and are very slow to build. -- Empirically, turning off optimization shaves off ~50% build time. -- It also mildly improves recompilation avoidance. @@ -82,6 +97,8 @@ package cardano-wallet-launcher package cardano-wallet-core-integration optimization: False +-- ALL THE SOURCE-REPOSITORY-PACKAGE STANZAS ARE COPIED FROM PLUTUS-APPS + -- Direct dependency. -- Are you thinking of updating this tag to some other commit? -- Please ensure that the commit you are about to use is the latest one from @@ -95,7 +112,7 @@ package cardano-wallet-core-integration source-repository-package type: git location: https://github.com/input-output-hk/iohk-monitoring-framework - tag: 46f994e216a1f8b36fe4669b47b2a7011b0e153c + tag: 066f7002aac5a0efc20e49643fea45454f226caa subdir: contra-tracer iohk-monitoring @@ -105,11 +122,13 @@ source-repository-package plugins/backend-monitoring plugins/backend-trace-forwarder --- Direct dependency. +-- Should follow cardano-node. +-- But in case there are failures with the plutus version, update to the latest +-- commit hash of the release/1.0.0 plutus branch. source-repository-package type: git location: https://github.com/input-output-hk/plutus - tag: 4127e9cd6e889824d724c30eae55033cb50cbf3e + tag: 69ab98c384703172f898eb5bcad1078ded521426 subdir: plutus-core plutus-ledger-api @@ -119,6 +138,12 @@ source-repository-package stubs/plutus-ghc-stub word-array +-- Should follow cardano-node +source-repository-package + type: git + location: https://github.com/input-output-hk/ekg-forward + tag: 297cd9db5074339a2fb2e5ae7d0780debb670c63 + -- Should follow plutus. source-repository-package type: git @@ -143,10 +168,12 @@ source-repository-package -- As, for example, bumping the node first highly risks breaking API with the wallet. -- Unless early bug fixes are required, this is fine as the wallet tracks stable releases of the node. -- And it is indeed nice for plutus-apps to track stable releases of the node too. +-- +-- The current version is dated 2022/06/28. source-repository-package type: git location: https://github.com/input-output-hk/cardano-wallet - tag: f6d4db733c4e47ee11683c343b440552f59beff7 + tag: a73d8c9717dc4e174745f8568d6f3fe84f0f9d76 subdir: lib/cli lib/core @@ -158,55 +185,52 @@ source-repository-package lib/strict-non-empty-containers lib/test-utils lib/text-class - -- Should follow cardano-wallet. --- Currently tracking v1.34.1. +-- More precisally, this should be a version compatible with the current +-- Cardano mainnet (>=1.35). +-- Current version is dated to 2022/06/25. source-repository-package type: git location: https://github.com/input-output-hk/cardano-node - tag: 73f9a746362695dc2cb63ba757fbcabb81733d23 + tag: 1.35.0 + --sha256: 06arx9hv7dn3qxfy83f0b6018rxbsvh841nvfyg5w6qclm1hddj7 subdir: cardano-api cardano-cli cardano-git-rev cardano-node + cardano-submit-api cardano-testnet trace-dispatcher trace-forward trace-resources - -source-repository-package - type: git - location: https://github.com/input-output-hk/ekg-forward - tag: 297cd9db5074339a2fb2e5ae7d0780debb670c63 - + source-repository-package type: git location: https://github.com/input-output-hk/cardano-config - tag: e9de7a2cf70796f6ff26eac9f9540184ded0e4e6 - --sha256: 1wm1c99r5zvz22pdl8nhkp13falvqmj8dgkm8fxskwa9ydqz01ld + tag: 1646e9167fab36c0bff82317743b96efa2d3adaa -- Using a fork until our patches can be merged upstream source-repository-package type: git location: https://github.com/input-output-hk/optparse-applicative tag: 7497a29cb998721a9068d5725d49461f2bba0e7a - --sha256: 1gvsrg925vynwgqwplgjmp53vj953qyh3wbdf34pw21c8r47w35r source-repository-package type: git location: https://github.com/input-output-hk/hedgehog-extras - tag: edf6945007177a638fbeb8802397f3a6f4e47c14 - --sha256: 0wc7qzkc7j4ns2rz562h6qrx2f8xyq7yjcb7zidnj7f6j0pcd0i9 + tag: 967d79533c21e33387d0227a5f6cc185203fe658 -- Should follow cardano-wallet. source-repository-package type: git location: https://github.com/input-output-hk/cardano-ledger - tag: 1a9ec4ae9e0b09d54e49b2a40c4ead37edadcce5 + tag: ce3057e0863304ccb3f79d78c77136219dc786c6 + --sha256: 19ijcy1sl1iqa7diy5nsydnjsn3281kp75i2i42qv0fpn58238s9 subdir: eras/alonzo/impl + eras/babbage/impl eras/byron/chain/executable-spec eras/byron/crypto eras/byron/crypto/test @@ -220,7 +244,7 @@ source-repository-package libs/cardano-ledger-core libs/cardano-ledger-pretty libs/cardano-protocol-tpraos - libs/compact-map + libs/vector-map libs/non-integral libs/set-algebra libs/small-steps @@ -230,10 +254,9 @@ source-repository-package source-repository-package type: git location: https://github.com/input-output-hk/ouroboros-network - tag: 4fac197b6f0d2ff60dc3486c593b68dc00969fbf + tag: a65c29b6a85e90d430c7f58d362b7eb097fd4949 + --sha256: 1fmab5hmi1y8lss97xh6hhikmyhsx9x31yhvg6zpr2kcq7kc6qkf subdir: - io-classes - io-sim monoidal-synchronisation network-mux ntp-client @@ -245,7 +268,23 @@ source-repository-package ouroboros-network ouroboros-network-framework ouroboros-network-testing + +-- Should follow cardano-node. +source-repository-package + type: git + location: https://github.com/input-output-hk/io-sim + tag: 57e888b1894829056cb00b7b5785fdf6a74c3271 + subdir: + io-classes + io-sim strict-stm + +-- Should follow cardano-node. +source-repository-package + type: git + location: https://github.com/input-output-hk/typed-protocols + tag: 181601bc3d9e9d21a671ce01e0b481348b3ca104 + subdir: typed-protocols typed-protocols-cborg typed-protocols-examples @@ -254,13 +293,14 @@ source-repository-package source-repository-package type: git location: https://github.com/input-output-hk/cardano-base - tag: 41545ba3ac6b3095966316a99883d678b5ab8da8 + tag: 0f3a867493059e650cda69e20a5cbf1ace289a57 subdir: base-deriving-via binary binary/test cardano-crypto-class cardano-crypto-praos + cardano-crypto-tests measures orphans-deriving-via slotting @@ -285,7 +325,7 @@ source-repository-package source-repository-package type: git location: https://github.com/input-output-hk/cardano-addresses - tag: 71006f9eb956b0004022e80aadd4ad50d837b621 + tag: b6f2f3cef01a399376064194fd96711a5bdba4a7 subdir: command-line core @@ -301,3 +341,31 @@ source-repository-package type: git location: https://github.com/input-output-hk/Win32-network tag: 3825d3abf75f83f406c1f7161883c438dac7277d + +-- Until https://github.com/tibbe/ekg-json/pull/12 gets merged with aeson2 support +source-repository-package + type: git + location: https://github.com/vshabanov/ekg-json + tag: 00ebe7211c981686e65730b7144fbf5350462608 + +-- TODO This is a compatibility shim to make it easier for our library dependencies to +-- be compatible with both aeson 1 & 2. Once downstream projects are all upgraded to +-- work with aeson-2, library dependencies will need to be updated to no longer use +-- this compatibility shim and have bounds to indicate they work with aeson-2 only. +-- After this, the dependency to hw-aeson can be dropped. +source-repository-package + type: git + location: https://github.com/haskell-works/hw-aeson + tag: d99d2f3e39a287607418ae605b132a3deb2b753f + --sha256: 1vxqcwjg9q37wbwi27y9ba5163lzfz51f1swbi0rp681yg63zvn4 + +-- Temporary indexing +source-repository-package + type: git + location: https://github.com/raduom/hysterical-screams + tag: 4c523469e9efd3f0d10d17da3304923b7b0e0674 + +source-repository-package + type: git + location: https://github.com/input-output-hk/quickcheck-dynamic + tag: c272906361471d684440f76c297e29ab760f6a1e diff --git a/examples/src/Plutus/Contracts/Game.hs b/examples/src/Plutus/Contracts/Game.hs index 74625d2..fd7edba 100644 --- a/examples/src/Plutus/Contracts/Game.hs +++ b/examples/src/Plutus/Contracts/Game.hs @@ -45,11 +45,11 @@ import Data.Map (Map) import qualified Data.Map as Map import Data.Maybe (catMaybes) import Ledger (Address, Datum (Datum), ScriptContext, Validator, Value) -import qualified Ledger import qualified Ledger.Ada as Ada import qualified Ledger.Constraints as Constraints import Ledger.Tx (ChainIndexTxOut (..)) import qualified Ledger.Typed.Scripts as Scripts +import Plutus.Script.Utils.V1.Address (mkValidatorAddress) import Playground.Contract import Plutus.Contract import Plutus.Contract.Trace as X @@ -80,7 +80,7 @@ gameInstance :: Scripts.TypedValidator Game gameInstance = Scripts.mkTypedValidator @Game $$(PlutusTx.compile [|| validateGuess ||]) $$(PlutusTx.compile [|| wrap ||]) where - wrap = Scripts.wrapValidator @HashedString @ClearString + wrap = Scripts.mkUntypedValidator @HashedString @ClearString -- create a data script for the guessing game by hashing the string -- and lifting the hash to its on-chain representation @@ -105,7 +105,7 @@ gameValidator = Scripts.validatorScript gameInstance -- | The address of the game (the hash of its validator script) gameAddress :: Address -gameAddress = Ledger.scriptAddress gameValidator +gameAddress = mkValidatorAddress gameValidator -- | Parameters for the "lock" endpoint data LockParams = LockParams diff --git a/nix/pkgs/haskell/haskell.nix b/nix/pkgs/haskell/haskell.nix index 24343d5..60a6223 100644 --- a/nix/pkgs/haskell/haskell.nix +++ b/nix/pkgs/haskell/haskell.nix @@ -22,24 +22,31 @@ let # If using materialization, be sure to disable it when source-repo-override is set or it won't take effect. sha256map = { - "https://github.com/input-output-hk/plutus-apps.git"."v2022-04-06" = "13yg3vb6a6gmjawlfa3wam5c6krqm7lip4w1p0j30hflca23x2h2"; + "https://github.com/input-output-hk/plutus-apps.git"."194022c32b72c5f16472d718f75981264ace97b3" = "0ln7ydg79gk5vxcqkc1lqaq57bpmbpy5sq9rjnriy4a0vhvqc2dx"; "https://github.com/input-output-hk/ekg-forward"."297cd9db5074339a2fb2e5ae7d0780debb670c63" = "1zcwry3y5rmd9lgxy89wsb3k4kpffqji35dc7ghzbz603y1gy24g"; - "https://github.com/input-output-hk/cardano-addresses"."71006f9eb956b0004022e80aadd4ad50d837b621" = "11dl3fmq7ry5wdmz8kw07ji8yvrxnrsf7pgilw5q9mi4aqyvnaqk"; - "https://github.com/input-output-hk/cardano-base"."41545ba3ac6b3095966316a99883d678b5ab8da8" = "0icq9y3nnl42fz536da84414av36g37894qnyw4rk3qkalksqwir"; - "https://github.com/input-output-hk/cardano-config"."e9de7a2cf70796f6ff26eac9f9540184ded0e4e6" = "1wm1c99r5zvz22pdl8nhkp13falvqmj8dgkm8fxskwa9ydqz01ld"; + "https://github.com/input-output-hk/cardano-addresses"."b6f2f3cef01a399376064194fd96711a5bdba4a7" = "10yj47gay72kx6v564qlfiigggcpqfdzrg61ii8p25m5n8ijz045"; + "https://github.com/input-output-hk/cardano-base"."0f3a867493059e650cda69e20a5cbf1ace289a57" = "0p0az3sbkhb7njji8xxdrfb0yx2gc8fmrh872ffm8sfip1w29gg1"; + "https://github.com/input-output-hk/cardano-config"."1646e9167fab36c0bff82317743b96efa2d3adaa" = "sha256-TNbpnR7llUgBN2WY7CryMxNVupBIUH01h1hRNHoxboY="; "https://github.com/input-output-hk/cardano-crypto"."f73079303f663e028288f9f4a9e08bcca39a923e" = "1n87i15x54s0cjkh3nsxs4r1x016cdw1fypwmr68936n3xxsjn6q"; - "https://github.com/input-output-hk/cardano-ledger"."1a9ec4ae9e0b09d54e49b2a40c4ead37edadcce5" = "0avzyiqq0m8njd41ck9kpn992yq676b1az9xs77977h7cf85y4wm"; - "https://github.com/input-output-hk/cardano-node"."73f9a746362695dc2cb63ba757fbcabb81733d23" = "1hh53whcj5y9kw4qpkiza7rmkniz18r493vv4dzl1a8r5fy3b2bv"; - "https://github.com/input-output-hk/cardano-prelude"."bb4ed71ba8e587f672d06edf9d2e376f4b055555" = "00h10l5mmiza9819p9v5q5749nb9pzgi20vpzpy1d34zmh6gf1cj"; - "https://github.com/input-output-hk/cardano-wallet"."f6d4db733c4e47ee11683c343b440552f59beff7" = "0gb3zyv3q5v5sd8r29s02yc0brwq5a01is9c0n528391n2r8g1yy"; + "https://github.com/input-output-hk/cardano-ledger"."ce3057e0863304ccb3f79d78c77136219dc786c6" = "19ijcy1sl1iqa7diy5nsydnjsn3281kp75i2i42qv0fpn58238s9"; + "https://github.com/input-output-hk/cardano-node"."1.35.0" = "06arx9hv7dn3qxfy83f0b6018rxbsvh841nvfyg5w6qclm1hddj7"; + "https://github.com/input-output-hk/cardano-prelude"."bb4ed71ba8e587f672d06edf9d2e376f4b055555" = "sha256-kgX3DKyfjBb8/XcDEd+/adlETsFlp5sCSurHWgsFAQI="; + "https://github.com/input-output-hk/cardano-wallet"."a73d8c9717dc4e174745f8568d6f3fe84f0f9d76" = "19srmc3rg8db73mfqnpdacmlpbp2x5mb4pi82mv14innhdl01jlx"; "https://github.com/input-output-hk/goblins"."cde90a2b27f79187ca8310b6549331e59595e7ba" = "17c88rbva3iw82yg9srlxjv2ia5wjb9cyqw44hik565f5v9svnyg"; - "https://github.com/input-output-hk/iohk-monitoring-framework"."46f994e216a1f8b36fe4669b47b2a7011b0e153c" = "1il8fx3misp3650ryj368b3x95ksz01zz3x0z9k00807j93d0ka0"; - "https://github.com/input-output-hk/ouroboros-network"."4fac197b6f0d2ff60dc3486c593b68dc00969fbf" = "1b43vbdsr9m3ry1kgag2p2ixpv54gw7a4vvmndxl6knqg8qbsb8b"; - "https://github.com/input-output-hk/plutus"."4127e9cd6e889824d724c30eae55033cb50cbf3e" = "186w0x7vk8m8npmsfg9pdkxds0rlj6bmhr8nkgn96rkvaz5azjsb"; + "https://github.com/input-output-hk/hedgehog-extras"."967d79533c21e33387d0227a5f6cc185203fe658" = "0rbqb7a64aya1qizlr3im06hdydg9zr6sl3i8bvqqlf7kpa647sd"; + "https://github.com/input-output-hk/iohk-monitoring-framework"."066f7002aac5a0efc20e49643fea45454f226caa" = "0s6x4in11k5ba7nl7la896g28sznf9185xlqg9c604jqz58vj9nj"; + "https://github.com/input-output-hk/io-sim"."57e888b1894829056cb00b7b5785fdf6a74c3271" = "sha256-TviSvCBEYtlKEo9qJmE8pCE25nMjDi8HeIAFniunaM8="; + "https://github.com/input-output-hk/optparse-applicative"."7497a29cb998721a9068d5725d49461f2bba0e7a" = "1gvsrg925vynwgqwplgjmp53vj953qyh3wbdf34pw21c8r47w35r"; + "https://github.com/input-output-hk/ouroboros-network"."a65c29b6a85e90d430c7f58d362b7eb097fd4949" = "1fmab5hmi1y8lss97xh6hhikmyhsx9x31yhvg6zpr2kcq7kc6qkf"; + "https://github.com/input-output-hk/plutus"."69ab98c384703172f898eb5bcad1078ded521426" = "0n3acmb6amyz11zqqcv7h8b2y4gdaly8a3zsc5yi7nfpj93h6g01"; "https://github.com/input-output-hk/purescript-bridge"."47a1f11825a0f9445e0f98792f79172efef66c00" = "0da1vn2l6iyfxcjk58qal1l4755v92zi6yppmjmqvxf1gacyf9px"; "https://github.com/input-output-hk/servant-purescript"."44e7cacf109f84984cd99cd3faf185d161826963" = "10pb0yfp80jhb9ryn65a4rha2lxzsn2vlhcc6xphrrkf4x5lhzqc"; + "https://github.com/input-output-hk/typed-protocols"."181601bc3d9e9d21a671ce01e0b481348b3ca104" = "sha256-5Wof5yTKb12EPY6B8LfapX18xNZZpF+rvhnQ88U6KdM="; "https://github.com/input-output-hk/Win32-network"."3825d3abf75f83f406c1f7161883c438dac7277d" = "19wahfv726fa3mqajpqdqhnl9ica3xmf68i254q45iyjcpj1psqx"; "https://github.com/Quid2/flat"."ee59880f47ab835dbd73bea0847dab7869fc20d8" = "1lrzknw765pz2j97nvv9ip3l1mcpf2zr4n56hwlz0rk7wq7ls4cm"; + "https://github.com/vshabanov/ekg-json"."00ebe7211c981686e65730b7144fbf5350462608" = "sha256-VT8Ur585TCn03P2TVi6t92v2Z6tl8vKijICjse6ocv8="; + "https://github.com/raduom/hysterical-screams"."4c523469e9efd3f0d10d17da3304923b7b0e0674" = "0w118v4vffrsjxfmwfv8qcn2qxmxpd1gxwcjnda91qz09jnpg0vp"; + "https://github.com/input-output-hk/quickcheck-dynamic"."c272906361471d684440f76c297e29ab760f6a1e" = "sha256-TioJQASNrQX6B3n2Cv43X2olyT67//CFQqcpvNW7N60="; }; modules = [ @@ -59,4 +66,4 @@ let inherit source-repo-override; }; in - project \ No newline at end of file + project diff --git a/nix/sources.json b/nix/sources.json index cd345ef..001ce61 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -1,14 +1,14 @@ { "plutus-apps": { - "branch": "v2022-04-06", + "branch": "v1.0.0-rc1", "description": "The Plutus application platform", "homepage": "", "owner": "input-output-hk", "repo": "plutus-apps", - "rev": "e4062bca213f233cdf9822833b07aa69dff6d22a", - "sha256": "13yg3vb6a6gmjawlfa3wam5c6krqm7lip4w1p0j30hflca23x2h2", + "rev": "194022c32b72c5f16472d718f75981264ace97b3", + "sha256": "0ln7ydg79gk5vxcqkc1lqaq57bpmbpy5sq9rjnriy4a0vhvqc2dx", "type": "tarball", - "url": "https://github.com/input-output-hk/plutus-apps/archive/e4062bca213f233cdf9822833b07aa69dff6d22a.tar.gz", + "url": "https://github.com/input-output-hk/plutus-apps/archive/194022c32b72c5f16472d718f75981264ace97b3.tar.gz", "url_template": "https://github.com///archive/.tar.gz" } } diff --git a/plutus-starter.cabal b/plutus-starter.cabal index f3d70ae..76c9091 100644 --- a/plutus-starter.cabal +++ b/plutus-starter.cabal @@ -32,7 +32,7 @@ common lang ghc-options: -Wall -Wnoncanonical-monad-instances -Wincomplete-uni-patterns -Wincomplete-record-updates - -Wredundant-constraints -Widentities -rtsopts + -Wredundant-constraints -Widentities -- See Plutus Tx readme -fobject-code -fno-ignore-interface-pragmas -fno-omit-interface-pragmas if flag(defer-plugin-errors) @@ -54,6 +54,7 @@ library plutus-ledger -any, plutus-ledger-api -any, plutus-ledger-constraints -any, + plutus-script-utils, plutus-tx -any, plutus-tx-plugin -any, text -any, @@ -73,14 +74,14 @@ test-suite plutus-example-projects-test plutus-contract -any, plutus-pab -any, plutus-ledger -any, - plutus-starter -any + plutus-starter -any, build-depends: base >=4.9 && <5, tasty -any, tasty-hunit -any, text -any, tasty-hedgehog >=0.2.0.0 - + executable plutus-starter-pab import: lang