diff --git a/.buildkite/bench-restore.sh b/.buildkite/bench-restore.sh index c2abb7e0511..a3cdc3bf977 100755 --- a/.buildkite/bench-restore.sh +++ b/.buildkite/bench-restore.sh @@ -1,5 +1,5 @@ #! /usr/bin/env nix-shell -#! nix-shell -i bash -p nix coreutils gnugrep gawk time haskellPackages.hp2pretty buildkite-agent gnuplot +#! nix-shell -i bash -p coreutils gnugrep gawk time haskellPackages.hp2pretty buildkite-agent gnuplot set -euo pipefail @@ -30,7 +30,7 @@ bench="./bench-restore/bin/restore $network --node-db $node_db" echo "--- Run benchmarks - $network" -command time -o $total_time -v $bench +RTS -N2 -qg -A1m -I0 -T -M16G -h -RTS 2>&1 | tee $log +command time -o $total_time -v $bench +RTS -N2 -qg -A1m -I0 -T -M16G -RTS 2>&1 | tee $log grep -v INFO $log | awk '/All results/,EOF { print $0 }' >$results @@ -38,8 +38,20 @@ echo "+++ Results - $network" cat $results -mv restore.hp $artifact_name.hp -hp2pretty $artifact_name.hp +# https://input-output.atlassian.net/browse/ADP-3078 +# +# With GHC 8.10.7 we used to use the -h flag to generate a heap profile file +# restore.hp which was then converted to a pretty graph. +# +# With the GHC 9.2.8 using the -h flag (or -hT) causes the benchmark to +# become many times slower so the code below is commented out to unblock +# the migration to 9.2.8. +# +# In the long run we shouldn't benchmark with -h anyway, but rather +# perform profiling separately. + +# mv restore.hp $artifact_name.hp +# hp2pretty $artifact_name.hp GNUPLOT_PROGRAM=$( cat <= 0.4.0 - , cardano-binary == 1.5.* , openapi3 >= 3.2.0 , libsystemd-journal >= 1.4.4 , systemd >= 2.3.0 @@ -162,43 +146,22 @@ constraints: , Cabal >= 3.4.0.0 , async-timer >= 0.2.0.0 , unliftio-core >= 0.2.0.1 - , cardano-api >= 1.35.6 - , cardano-node >= 1.35.6 , generic-arbitrary >= 0.2.2 , iohk-monitoring >= 0.1.11 - -- Could probably be bumped with minor work in the wallet - , resource-pool >= 0.2.3.2 + -- lower versions of katip won't build with the Win32-2.12.0.1 + -- which is shipped with the ghc-9.2.8 + , katip >= 0.8.7.4 + + -- Cardano Node dependencies: + , cardano-api ^>=8.2 + , cardano-slotting >= 0.1 + , ouroboros-network ^>= 0.8.1.0 -- TH Name shadowing warnings need to be addressed when bumping to 2.13.3.5 , persistent == 2.13.3.3 - -- Copied from cardano-node's cabal.project: - , systemd >= 2.3.0 - -- systemd-2.3.0 requires at least network 3.1.1.0 but it doesn't declare - -- that dependency - , network >= 3.1.1.0 - , HSOpenSSL >= 0.11.7.2 - , cardano-prelude >= 0.1.0.0 - , base-deriving-via >= 0.1.0.0 - , cardano-binary >= 1.5.0 - , cardano-binary-test >= 1.3.0 - , cardano-crypto-class >= 2.0.0.0.1 - , cardano-crypto-praos >= 2.0.0.0.1 - , cardano-crypto-tests >= 2.0.0.0.1 - , cardano-slotting >= 0.1.0.0 - , measures >= 0.1.0.0 - , orphans-deriving-via >= 0.1.0.0 - , plutus-core >= 1.0.0.1 - , plutus-ledger-api >= 1.0.0.1 - , plutus-tx >= 1.0.0.0 - , plutus-tx-plugin >= 1.0.0.0 - , prettyprinter-configurable >= 0.1.0.0 - , plutus-ghc-stub >= 8.6.5 - , word-array >= 0.1.0.0 - -- Haddock is broken in this release. Waiting for the next release - , http2 < 4.0.0 -- Related to: https://github.com/haskell/cabal/issues/8554 if impl(ghc == 8.10.7) diff --git a/docker-compose.yml b/docker-compose.yml index 8c0613296b1..4ac3c6a7924 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,7 @@ version: "3.5" services: cardano-node: - image: inputoutput/cardano-node:1.35.4 + image: inputoutput/cardano-node:8.1.1 environment: NETWORK: CARDANO_NODE_SOCKET_PATH: /ipc/node.socket diff --git a/docs/developers/Building.md b/docs/developers/Building.md index c2c0ac0df47..57088b3e46e 100644 --- a/docs/developers/Building.md +++ b/docs/developers/Building.md @@ -6,7 +6,7 @@ | | **Supported version** | **Dependency?** | | --- | --- | --- | -| [ghc][] | == 8.10.7 | Required | +| [ghc][] | == 9.2.8 | Required | | [cabal][] | >= 3.4.0.0 | Required | | [[Nix]] | >= 2.5.1 | Optional | diff --git a/flake.lock b/flake.lock index 2758faebf74..e060c11ffc9 100644 --- a/flake.lock +++ b/flake.lock @@ -3,11 +3,11 @@ "CHaP": { "flake": false, "locked": { - "lastModified": 1679576818, - "narHash": "sha256-bsmI+91hGtJaxBa9V6QRA6wnh4cRhLo5m7HnVn428KU=", + "lastModified": 1687545169, + "narHash": "sha256-odkMdGM8WsflO/IzGRah90KHVrlWs5yYWhCTgVh3wig=", "owner": "input-output-hk", "repo": "cardano-haskell-packages", - "rev": "4a15403f6adbac6f47bcedbabac946f9c2636e59", + "rev": "1eacb7fae052b01c3eaf172b5cc403d600d225e3", "type": "github" }, "original": { @@ -20,11 +20,11 @@ "CHaP_2": { "flake": false, "locked": { - "lastModified": 1666726035, - "narHash": "sha256-EBodp9DJb8Z+aVbuezVwLJ9Q9XIJUXFd/n2skay3FeU=", + "lastModified": 1686070892, + "narHash": "sha256-0yAYqvCg2/aby4AmW0QQK9RKnU1siQczfbUC6hOU02w=", "owner": "input-output-hk", "repo": "cardano-haskell-packages", - "rev": "b074321c4c8cbf2c3789436ab11eaa43e1c441a7", + "rev": "596cf203a0a1ba252a083a79d384325000faeb49", "type": "github" }, "original": { @@ -50,7 +50,7 @@ "type": "github" } }, - "HTTP_10": { + "HTTP_2": { "flake": false, "locked": { "lastModified": 1451647621, @@ -66,9391 +66,2057 @@ "type": "github" } }, - "HTTP_11": { - "flake": false, + "blank": { "locked": { - "lastModified": 1451647621, - "narHash": "sha256-oHIyw3x0iKBexEo49YeUDV1k74ZtyYKGR2gNJXXRxts=", - "owner": "phadej", - "repo": "HTTP", - "rev": "9bc0996d412fef1787449d841277ef663ad9a915", + "lastModified": 1625557891, + "narHash": "sha256-O8/MWsPBGhhyPoPLHZAuoZiiHo9q6FLlEeIDEXuj6T4=", + "owner": "divnix", + "repo": "blank", + "rev": "5a5d2684073d9f563072ed07c871d577a6c614a8", "type": "github" }, "original": { - "owner": "phadej", - "repo": "HTTP", + "owner": "divnix", + "repo": "blank", "type": "github" } }, - "HTTP_12": { + "blst": { "flake": false, "locked": { - "lastModified": 1451647621, - "narHash": "sha256-oHIyw3x0iKBexEo49YeUDV1k74ZtyYKGR2gNJXXRxts=", - "owner": "phadej", - "repo": "HTTP", - "rev": "9bc0996d412fef1787449d841277ef663ad9a915", + "lastModified": 1656163412, + "narHash": "sha256-xero1aTe2v4IhWIJaEDUsVDOfE77dOV5zKeHWntHogY=", + "owner": "supranational", + "repo": "blst", + "rev": "03b5124029979755c752eec45f3c29674b558446", "type": "github" }, "original": { - "owner": "phadej", - "repo": "HTTP", + "owner": "supranational", + "repo": "blst", + "rev": "03b5124029979755c752eec45f3c29674b558446", "type": "github" } }, - "HTTP_13": { + "blst_2": { "flake": false, "locked": { - "lastModified": 1451647621, - "narHash": "sha256-oHIyw3x0iKBexEo49YeUDV1k74ZtyYKGR2gNJXXRxts=", - "owner": "phadej", - "repo": "HTTP", - "rev": "9bc0996d412fef1787449d841277ef663ad9a915", + "lastModified": 1656163412, + "narHash": "sha256-xero1aTe2v4IhWIJaEDUsVDOfE77dOV5zKeHWntHogY=", + "owner": "supranational", + "repo": "blst", + "rev": "03b5124029979755c752eec45f3c29674b558446", "type": "github" }, "original": { - "owner": "phadej", - "repo": "HTTP", + "owner": "supranational", + "repo": "blst", + "rev": "03b5124029979755c752eec45f3c29674b558446", "type": "github" } }, - "HTTP_14": { + "cabal-32": { "flake": false, "locked": { - "lastModified": 1451647621, - "narHash": "sha256-oHIyw3x0iKBexEo49YeUDV1k74ZtyYKGR2gNJXXRxts=", - "owner": "phadej", - "repo": "HTTP", - "rev": "9bc0996d412fef1787449d841277ef663ad9a915", + "lastModified": 1603716527, + "narHash": "sha256-X0TFfdD4KZpwl0Zr6x+PLxUt/VyKQfX7ylXHdmZIL+w=", + "owner": "haskell", + "repo": "cabal", + "rev": "48bf10787e27364730dd37a42b603cee8d6af7ee", "type": "github" }, "original": { - "owner": "phadej", - "repo": "HTTP", + "owner": "haskell", + "ref": "3.2", + "repo": "cabal", "type": "github" } }, - "HTTP_15": { + "cabal-32_2": { "flake": false, "locked": { - "lastModified": 1451647621, - "narHash": "sha256-oHIyw3x0iKBexEo49YeUDV1k74ZtyYKGR2gNJXXRxts=", - "owner": "phadej", - "repo": "HTTP", - "rev": "9bc0996d412fef1787449d841277ef663ad9a915", + "lastModified": 1603716527, + "narHash": "sha256-X0TFfdD4KZpwl0Zr6x+PLxUt/VyKQfX7ylXHdmZIL+w=", + "owner": "haskell", + "repo": "cabal", + "rev": "48bf10787e27364730dd37a42b603cee8d6af7ee", "type": "github" }, "original": { - "owner": "phadej", - "repo": "HTTP", + "owner": "haskell", + "ref": "3.2", + "repo": "cabal", "type": "github" } }, - "HTTP_16": { + "cabal-34": { "flake": false, "locked": { - "lastModified": 1451647621, - "narHash": "sha256-oHIyw3x0iKBexEo49YeUDV1k74ZtyYKGR2gNJXXRxts=", - "owner": "phadej", - "repo": "HTTP", - "rev": "9bc0996d412fef1787449d841277ef663ad9a915", + "lastModified": 1645834128, + "narHash": "sha256-wG3d+dOt14z8+ydz4SL7pwGfe7SiimxcD/LOuPCV6xM=", + "owner": "haskell", + "repo": "cabal", + "rev": "5ff598c67f53f7c4f48e31d722ba37172230c462", "type": "github" }, "original": { - "owner": "phadej", - "repo": "HTTP", + "owner": "haskell", + "ref": "3.4", + "repo": "cabal", "type": "github" } }, - "HTTP_17": { + "cabal-34_2": { "flake": false, "locked": { - "lastModified": 1451647621, - "narHash": "sha256-oHIyw3x0iKBexEo49YeUDV1k74ZtyYKGR2gNJXXRxts=", - "owner": "phadej", - "repo": "HTTP", - "rev": "9bc0996d412fef1787449d841277ef663ad9a915", + "lastModified": 1645834128, + "narHash": "sha256-wG3d+dOt14z8+ydz4SL7pwGfe7SiimxcD/LOuPCV6xM=", + "owner": "haskell", + "repo": "cabal", + "rev": "5ff598c67f53f7c4f48e31d722ba37172230c462", "type": "github" }, "original": { - "owner": "phadej", - "repo": "HTTP", + "owner": "haskell", + "ref": "3.4", + "repo": "cabal", "type": "github" } }, - "HTTP_18": { + "cabal-36": { "flake": false, "locked": { - "lastModified": 1451647621, - "narHash": "sha256-oHIyw3x0iKBexEo49YeUDV1k74ZtyYKGR2gNJXXRxts=", - "owner": "phadej", - "repo": "HTTP", - "rev": "9bc0996d412fef1787449d841277ef663ad9a915", + "lastModified": 1669081697, + "narHash": "sha256-I5or+V7LZvMxfbYgZATU4awzkicBwwok4mVoje+sGmU=", + "owner": "haskell", + "repo": "cabal", + "rev": "8fd619e33d34924a94e691c5fea2c42f0fc7f144", "type": "github" }, "original": { - "owner": "phadej", - "repo": "HTTP", + "owner": "haskell", + "ref": "3.6", + "repo": "cabal", "type": "github" } }, - "HTTP_19": { + "cabal-36_2": { "flake": false, "locked": { - "lastModified": 1451647621, - "narHash": "sha256-oHIyw3x0iKBexEo49YeUDV1k74ZtyYKGR2gNJXXRxts=", - "owner": "phadej", - "repo": "HTTP", - "rev": "9bc0996d412fef1787449d841277ef663ad9a915", + "lastModified": 1669081697, + "narHash": "sha256-I5or+V7LZvMxfbYgZATU4awzkicBwwok4mVoje+sGmU=", + "owner": "haskell", + "repo": "cabal", + "rev": "8fd619e33d34924a94e691c5fea2c42f0fc7f144", "type": "github" }, "original": { - "owner": "phadej", - "repo": "HTTP", + "owner": "haskell", + "ref": "3.6", + "repo": "cabal", "type": "github" } }, - "HTTP_2": { - "flake": false, + "cardano-automation": { + "inputs": { + "flake-utils": "flake-utils", + "haskellNix": [ + "cardano-node-runtime", + "haskellNix" + ], + "nixpkgs": [ + "cardano-node-runtime", + "nixpkgs" + ], + "tullia": [ + "cardano-node-runtime", + "tullia" + ] + }, "locked": { - "lastModified": 1451647621, - "narHash": "sha256-oHIyw3x0iKBexEo49YeUDV1k74ZtyYKGR2gNJXXRxts=", - "owner": "phadej", - "repo": "HTTP", - "rev": "9bc0996d412fef1787449d841277ef663ad9a915", + "lastModified": 1679408951, + "narHash": "sha256-xM78upkrXjRu/739V/IxFrA9m+6rvgOiolt4ReKLAog=", + "owner": "input-output-hk", + "repo": "cardano-automation", + "rev": "628f135d243d4a9e388c187e4c6179246038ee72", "type": "github" }, "original": { - "owner": "phadej", - "repo": "HTTP", + "owner": "input-output-hk", + "repo": "cardano-automation", "type": "github" } }, - "HTTP_3": { - "flake": false, + "cardano-mainnet-mirror": { + "inputs": { + "nixpkgs": "nixpkgs" + }, "locked": { - "lastModified": 1451647621, - "narHash": "sha256-oHIyw3x0iKBexEo49YeUDV1k74ZtyYKGR2gNJXXRxts=", - "owner": "phadej", - "repo": "HTTP", - "rev": "9bc0996d412fef1787449d841277ef663ad9a915", + "lastModified": 1642701714, + "narHash": "sha256-SR3luE+ePX6U193EKE/KSEuVzWAW0YsyPYDC4hOvALs=", + "owner": "input-output-hk", + "repo": "cardano-mainnet-mirror", + "rev": "819488be9eabbba6aaa7c931559bc584d8071e3d", "type": "github" }, "original": { - "owner": "phadej", - "repo": "HTTP", + "owner": "input-output-hk", + "ref": "nix", + "repo": "cardano-mainnet-mirror", "type": "github" } }, - "HTTP_4": { - "flake": false, + "cardano-node-runtime": { + "inputs": { + "CHaP": "CHaP_2", + "cardano-automation": "cardano-automation", + "cardano-mainnet-mirror": "cardano-mainnet-mirror", + "customConfig": "customConfig", + "em": "em", + "empty-flake": "empty-flake", + "flake-compat": "flake-compat", + "hackageNix": "hackageNix", + "haskellNix": "haskellNix", + "hostNixpkgs": [ + "cardano-node-runtime", + "nixpkgs" + ], + "iohkNix": "iohkNix", + "nix2container": "nix2container", + "nixpkgs": [ + "cardano-node-runtime", + "haskellNix", + "nixpkgs-unstable" + ], + "ops-lib": "ops-lib", + "std": [ + "cardano-node-runtime", + "tullia", + "std" + ], + "tullia": "tullia", + "utils": "utils_2" + }, "locked": { - "lastModified": 1451647621, - "narHash": "sha256-oHIyw3x0iKBexEo49YeUDV1k74ZtyYKGR2gNJXXRxts=", - "owner": "phadej", - "repo": "HTTP", - "rev": "9bc0996d412fef1787449d841277ef663ad9a915", + "lastModified": 1687190129, + "narHash": "sha256-JCa9+QhZ2RVSIKkhz2WCZqTKCgdUSuezWS2YsQ5vhM4=", + "owner": "input-output-hk", + "repo": "cardano-node", + "rev": "6f79e5c3ea109a70cd01910368e011635767305a", "type": "github" }, "original": { - "owner": "phadej", - "repo": "HTTP", + "owner": "input-output-hk", + "ref": "8.1.1", + "repo": "cardano-node", "type": "github" } }, - "HTTP_5": { + "cardano-shell": { "flake": false, "locked": { - "lastModified": 1451647621, - "narHash": "sha256-oHIyw3x0iKBexEo49YeUDV1k74ZtyYKGR2gNJXXRxts=", - "owner": "phadej", - "repo": "HTTP", - "rev": "9bc0996d412fef1787449d841277ef663ad9a915", + "lastModified": 1608537748, + "narHash": "sha256-PulY1GfiMgKVnBci3ex4ptk2UNYMXqGjJOxcPy2KYT4=", + "owner": "input-output-hk", + "repo": "cardano-shell", + "rev": "9392c75087cb9a3d453998f4230930dea3a95725", "type": "github" }, "original": { - "owner": "phadej", - "repo": "HTTP", + "owner": "input-output-hk", + "repo": "cardano-shell", "type": "github" } }, - "HTTP_6": { + "cardano-shell_2": { "flake": false, "locked": { - "lastModified": 1451647621, - "narHash": "sha256-oHIyw3x0iKBexEo49YeUDV1k74ZtyYKGR2gNJXXRxts=", - "owner": "phadej", - "repo": "HTTP", - "rev": "9bc0996d412fef1787449d841277ef663ad9a915", + "lastModified": 1608537748, + "narHash": "sha256-PulY1GfiMgKVnBci3ex4ptk2UNYMXqGjJOxcPy2KYT4=", + "owner": "input-output-hk", + "repo": "cardano-shell", + "rev": "9392c75087cb9a3d453998f4230930dea3a95725", "type": "github" }, "original": { - "owner": "phadej", - "repo": "HTTP", + "owner": "input-output-hk", + "repo": "cardano-shell", "type": "github" } }, - "HTTP_7": { - "flake": false, + "check-flake": { "locked": { - "lastModified": 1451647621, - "narHash": "sha256-oHIyw3x0iKBexEo49YeUDV1k74ZtyYKGR2gNJXXRxts=", - "owner": "phadej", - "repo": "HTTP", - "rev": "9bc0996d412fef1787449d841277ef663ad9a915", + "lastModified": 1662502605, + "narHash": "sha256-jAT55UhabAxLAVGanxjnNdzH2/oX2ZjLsL4i2jPIP+g=", + "owner": "srid", + "repo": "check-flake", + "rev": "48a17393ed4fcd523399d6602c283775b5127295", "type": "github" }, "original": { - "owner": "phadej", - "repo": "HTTP", + "owner": "srid", + "repo": "check-flake", "type": "github" } }, - "HTTP_8": { - "flake": false, + "check-flake_2": { "locked": { - "lastModified": 1451647621, - "narHash": "sha256-oHIyw3x0iKBexEo49YeUDV1k74ZtyYKGR2gNJXXRxts=", - "owner": "phadej", - "repo": "HTTP", - "rev": "9bc0996d412fef1787449d841277ef663ad9a915", + "lastModified": 1662502605, + "narHash": "sha256-jAT55UhabAxLAVGanxjnNdzH2/oX2ZjLsL4i2jPIP+g=", + "owner": "srid", + "repo": "check-flake", + "rev": "48a17393ed4fcd523399d6602c283775b5127295", "type": "github" }, "original": { - "owner": "phadej", - "repo": "HTTP", + "owner": "srid", + "repo": "check-flake", "type": "github" } }, - "HTTP_9": { - "flake": false, + "customConfig": { "locked": { - "lastModified": 1451647621, - "narHash": "sha256-oHIyw3x0iKBexEo49YeUDV1k74ZtyYKGR2gNJXXRxts=", - "owner": "phadej", - "repo": "HTTP", - "rev": "9bc0996d412fef1787449d841277ef663ad9a915", - "type": "github" + "lastModified": 1630400035, + "narHash": "sha256-MWaVOCzuFwp09wZIW9iHq5wWen5C69I940N1swZLEQ0=", + "owner": "input-output-hk", + "repo": "empty-flake", + "rev": "2040a05b67bf9a669ce17eca56beb14b4206a99a", + "type": "github" }, "original": { - "owner": "phadej", - "repo": "HTTP", + "owner": "input-output-hk", + "repo": "empty-flake", "type": "github" } }, - "blank": { + "customConfig_2": { "locked": { - "lastModified": 1625557891, - "narHash": "sha256-O8/MWsPBGhhyPoPLHZAuoZiiHo9q6FLlEeIDEXuj6T4=", - "owner": "divnix", - "repo": "blank", - "rev": "5a5d2684073d9f563072ed07c871d577a6c614a8", + "lastModified": 1630400035, + "narHash": "sha256-MWaVOCzuFwp09wZIW9iHq5wWen5C69I940N1swZLEQ0=", + "owner": "input-output-hk", + "repo": "empty-flake", + "rev": "2040a05b67bf9a669ce17eca56beb14b4206a99a", "type": "github" }, "original": { - "owner": "divnix", - "repo": "blank", + "owner": "input-output-hk", + "repo": "empty-flake", "type": "github" } }, - "cabal-32": { - "flake": false, + "devshell": { + "inputs": { + "flake-utils": [ + "cardano-node-runtime", + "tullia", + "std", + "flake-utils" + ], + "nixpkgs": [ + "cardano-node-runtime", + "tullia", + "std", + "nixpkgs" + ] + }, "locked": { - "lastModified": 1603716527, - "narHash": "sha256-X0TFfdD4KZpwl0Zr6x+PLxUt/VyKQfX7ylXHdmZIL+w=", - "owner": "haskell", - "repo": "cabal", - "rev": "48bf10787e27364730dd37a42b603cee8d6af7ee", + "lastModified": 1663445644, + "narHash": "sha256-+xVlcK60x7VY1vRJbNUEAHi17ZuoQxAIH4S4iUFUGBA=", + "owner": "numtide", + "repo": "devshell", + "rev": "e3dc3e21594fe07bdb24bdf1c8657acaa4cb8f66", "type": "github" }, "original": { - "owner": "haskell", - "ref": "3.2", - "repo": "cabal", + "owner": "numtide", + "repo": "devshell", "type": "github" } }, - "cabal-32_10": { - "flake": false, + "dmerge": { + "inputs": { + "nixlib": [ + "cardano-node-runtime", + "tullia", + "std", + "nixpkgs" + ], + "yants": [ + "cardano-node-runtime", + "tullia", + "std", + "yants" + ] + }, "locked": { - "lastModified": 1603716527, - "narHash": "sha256-sDbrmur9Zfp4mPKohCD8IDZfXJ0Tjxpmr2R+kg5PpSY=", - "owner": "haskell", - "repo": "cabal", - "rev": "94aaa8e4720081f9c75497e2735b90f6a819b08e", + "lastModified": 1659548052, + "narHash": "sha256-fzI2gp1skGA8mQo/FBFrUAtY0GQkAIAaV/V127TJPyY=", + "owner": "divnix", + "repo": "data-merge", + "rev": "d160d18ce7b1a45b88344aa3f13ed1163954b497", "type": "github" }, "original": { - "owner": "haskell", - "ref": "3.2", - "repo": "cabal", + "owner": "divnix", + "repo": "data-merge", "type": "github" } }, - "cabal-32_11": { + "em": { "flake": false, "locked": { - "lastModified": 1603716527, - "narHash": "sha256-sDbrmur9Zfp4mPKohCD8IDZfXJ0Tjxpmr2R+kg5PpSY=", - "owner": "haskell", - "repo": "cabal", - "rev": "94aaa8e4720081f9c75497e2735b90f6a819b08e", + "lastModified": 1684791668, + "narHash": "sha256-JyPm0RiWCfy/8rs7wd/IRSWIz+bTkD78uxIMnKktU2g=", + "owner": "deepfire", + "repo": "em", + "rev": "302cdf6d654fb18baff0213bdfa41a653774585a", "type": "github" }, "original": { - "owner": "haskell", - "ref": "3.2", - "repo": "cabal", + "owner": "deepfire", + "repo": "em", "type": "github" } }, - "cabal-32_12": { - "flake": false, + "ema": { + "inputs": { + "check-flake": "check-flake", + "flake-parts": "flake-parts", + "flake-root": "flake-root", + "haskell-flake": "haskell-flake", + "nixpkgs": "nixpkgs_8", + "treefmt-nix": "treefmt-nix" + }, "locked": { - "lastModified": 1603716527, - "narHash": "sha256-sDbrmur9Zfp4mPKohCD8IDZfXJ0Tjxpmr2R+kg5PpSY=", - "owner": "haskell", - "repo": "cabal", - "rev": "94aaa8e4720081f9c75497e2735b90f6a819b08e", + "lastModified": 1685469753, + "narHash": "sha256-97b7df7/9yaMzv/Rl1mF5dH7dEsR/DMQAHZX3qEzE7U=", + "owner": "srid", + "repo": "ema", + "rev": "5d47724589b1b1bce4b49279e800254114a1c88a", "type": "github" }, "original": { - "owner": "haskell", - "ref": "3.2", - "repo": "cabal", + "owner": "srid", + "repo": "ema", "type": "github" } }, - "cabal-32_13": { - "flake": false, + "ema_2": { + "inputs": { + "check-flake": [ + "emanote", + "check-flake" + ], + "flake-parts": [ + "emanote", + "flake-parts" + ], + "flake-root": [ + "emanote", + "flake-root" + ], + "haskell-flake": [ + "emanote", + "haskell-flake" + ], + "nixpkgs": [ + "emanote", + "nixpkgs" + ], + "treefmt-nix": [ + "emanote", + "treefmt-nix" + ] + }, "locked": { - "lastModified": 1603716527, - "narHash": "sha256-sDbrmur9Zfp4mPKohCD8IDZfXJ0Tjxpmr2R+kg5PpSY=", - "owner": "haskell", - "repo": "cabal", - "rev": "94aaa8e4720081f9c75497e2735b90f6a819b08e", + "lastModified": 1678746319, + "narHash": "sha256-vOh7o0AK2PohGa1LPTAGIPmua1beR67XowEcaI8UPhg=", + "owner": "srid", + "repo": "ema", + "rev": "b46a08d7a26491b9801642ab9c13e94f929c6a90", "type": "github" }, "original": { - "owner": "haskell", - "ref": "3.2", - "repo": "cabal", + "owner": "srid", + "repo": "ema", "type": "github" } }, - "cabal-32_14": { - "flake": false, + "emanote": { + "inputs": { + "check-flake": "check-flake_2", + "ema": "ema_2", + "flake-parts": "flake-parts_2", + "flake-root": "flake-root_2", + "haskell-flake": "haskell-flake_2", + "nixpkgs": "nixpkgs_10", + "systems": "systems", + "treefmt-nix": "treefmt-nix_2" + }, "locked": { - "lastModified": 1603716527, - "narHash": "sha256-sDbrmur9Zfp4mPKohCD8IDZfXJ0Tjxpmr2R+kg5PpSY=", - "owner": "haskell", - "repo": "cabal", - "rev": "94aaa8e4720081f9c75497e2735b90f6a819b08e", + "lastModified": 1687282304, + "narHash": "sha256-69exHcIjkYmJtXmHiJEgma0jhg90DpH2PXNGkQgxnM0=", + "owner": "srid", + "repo": "emanote", + "rev": "fec2dc9b8336a2ab5c4218af4c10b4ebc88a4540", "type": "github" }, "original": { - "owner": "haskell", - "ref": "3.2", - "repo": "cabal", + "owner": "srid", + "repo": "emanote", "type": "github" } }, - "cabal-32_15": { - "flake": false, + "empty-flake": { "locked": { - "lastModified": 1603716527, - "narHash": "sha256-sDbrmur9Zfp4mPKohCD8IDZfXJ0Tjxpmr2R+kg5PpSY=", - "owner": "haskell", - "repo": "cabal", - "rev": "94aaa8e4720081f9c75497e2735b90f6a819b08e", + "lastModified": 1630400035, + "narHash": "sha256-MWaVOCzuFwp09wZIW9iHq5wWen5C69I940N1swZLEQ0=", + "owner": "input-output-hk", + "repo": "empty-flake", + "rev": "2040a05b67bf9a669ce17eca56beb14b4206a99a", "type": "github" }, "original": { - "owner": "haskell", - "ref": "3.2", - "repo": "cabal", + "owner": "input-output-hk", + "repo": "empty-flake", "type": "github" } }, - "cabal-32_16": { + "flake-compat": { "flake": false, "locked": { - "lastModified": 1603716527, - "narHash": "sha256-sDbrmur9Zfp4mPKohCD8IDZfXJ0Tjxpmr2R+kg5PpSY=", - "owner": "haskell", - "repo": "cabal", - "rev": "94aaa8e4720081f9c75497e2735b90f6a819b08e", + "lastModified": 1647532380, + "narHash": "sha256-wswAxyO8AJTH7d5oU8VK82yBCpqwA+p6kLgpb1f1PAY=", + "owner": "input-output-hk", + "repo": "flake-compat", + "rev": "7da118186435255a30b5ffeabba9629c344c0bec", "type": "github" }, "original": { - "owner": "haskell", - "ref": "3.2", - "repo": "cabal", + "owner": "input-output-hk", + "ref": "fixes", + "repo": "flake-compat", "type": "github" } }, - "cabal-32_17": { + "flake-compat_2": { "flake": false, "locked": { - "lastModified": 1603716527, - "narHash": "sha256-sDbrmur9Zfp4mPKohCD8IDZfXJ0Tjxpmr2R+kg5PpSY=", - "owner": "haskell", - "repo": "cabal", - "rev": "94aaa8e4720081f9c75497e2735b90f6a819b08e", + "lastModified": 1672831974, + "narHash": "sha256-z9k3MfslLjWQfnjBtEtJZdq3H7kyi2kQtUThfTgdRk0=", + "owner": "input-output-hk", + "repo": "flake-compat", + "rev": "45f2638735f8cdc40fe302742b79f248d23eb368", "type": "github" }, "original": { - "owner": "haskell", - "ref": "3.2", - "repo": "cabal", + "owner": "input-output-hk", + "ref": "hkm/gitlab-fix", + "repo": "flake-compat", "type": "github" } }, - "cabal-32_18": { + "flake-compat_3": { "flake": false, "locked": { - "lastModified": 1603716527, - "narHash": "sha256-sDbrmur9Zfp4mPKohCD8IDZfXJ0Tjxpmr2R+kg5PpSY=", - "owner": "haskell", - "repo": "cabal", - "rev": "94aaa8e4720081f9c75497e2735b90f6a819b08e", + "lastModified": 1650374568, + "narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "b4a34015c698c7793d592d66adbab377907a2be8", "type": "github" }, "original": { - "owner": "haskell", - "ref": "3.2", - "repo": "cabal", + "owner": "edolstra", + "repo": "flake-compat", "type": "github" } }, - "cabal-32_19": { + "flake-compat_4": { "flake": false, "locked": { - "lastModified": 1603716527, - "narHash": "sha256-X0TFfdD4KZpwl0Zr6x+PLxUt/VyKQfX7ylXHdmZIL+w=", - "owner": "haskell", - "repo": "cabal", - "rev": "48bf10787e27364730dd37a42b603cee8d6af7ee", + "lastModified": 1635892615, + "narHash": "sha256-harGbMZr4hzat2BWBU+Y5OYXlu+fVz7E4WeQzHi5o8A=", + "owner": "input-output-hk", + "repo": "flake-compat", + "rev": "eca47d3377946315596da653862d341ee5341318", "type": "github" }, "original": { - "owner": "haskell", - "ref": "3.2", - "repo": "cabal", + "owner": "input-output-hk", + "repo": "flake-compat", "type": "github" } }, - "cabal-32_2": { + "flake-compat_5": { "flake": false, "locked": { - "lastModified": 1603716527, - "narHash": "sha256-X0TFfdD4KZpwl0Zr6x+PLxUt/VyKQfX7ylXHdmZIL+w=", - "owner": "haskell", - "repo": "cabal", - "rev": "48bf10787e27364730dd37a42b603cee8d6af7ee", + "lastModified": 1672831974, + "narHash": "sha256-z9k3MfslLjWQfnjBtEtJZdq3H7kyi2kQtUThfTgdRk0=", + "owner": "input-output-hk", + "repo": "flake-compat", + "rev": "45f2638735f8cdc40fe302742b79f248d23eb368", "type": "github" }, "original": { - "owner": "haskell", - "ref": "3.2", - "repo": "cabal", + "owner": "input-output-hk", + "ref": "hkm/gitlab-fix", + "repo": "flake-compat", "type": "github" } }, - "cabal-32_3": { - "flake": false, + "flake-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, "locked": { - "lastModified": 1603716527, - "narHash": "sha256-X0TFfdD4KZpwl0Zr6x+PLxUt/VyKQfX7ylXHdmZIL+w=", - "owner": "haskell", - "repo": "cabal", - "rev": "48bf10787e27364730dd37a42b603cee8d6af7ee", + "lastModified": 1678379998, + "narHash": "sha256-TZdfNqftHhDuIFwBcN9MUThx5sQXCTeZk9je5byPKRw=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "c13d60b89adea3dc20704c045ec4d50dd964d447", "type": "github" }, "original": { - "owner": "haskell", - "ref": "3.2", - "repo": "cabal", + "owner": "hercules-ci", + "repo": "flake-parts", "type": "github" } }, - "cabal-32_4": { - "flake": false, + "flake-parts_2": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib_2" + }, "locked": { - "lastModified": 1603716527, - "narHash": "sha256-sDbrmur9Zfp4mPKohCD8IDZfXJ0Tjxpmr2R+kg5PpSY=", - "owner": "haskell", - "repo": "cabal", - "rev": "94aaa8e4720081f9c75497e2735b90f6a819b08e", + "lastModified": 1671710971, + "narHash": "sha256-YZdt5IJrfsdUTtVB94EMsBvaJbK9ve6QaZyzRuup+sY=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "98bec08c58a9547d705f2f5e300ac8eef6665e52", "type": "github" }, "original": { - "owner": "haskell", - "ref": "3.2", - "repo": "cabal", + "owner": "hercules-ci", + "repo": "flake-parts", "type": "github" } }, - "cabal-32_5": { - "flake": false, + "flake-root": { "locked": { - "lastModified": 1603716527, - "narHash": "sha256-sDbrmur9Zfp4mPKohCD8IDZfXJ0Tjxpmr2R+kg5PpSY=", - "owner": "haskell", - "repo": "cabal", - "rev": "94aaa8e4720081f9c75497e2735b90f6a819b08e", + "lastModified": 1671378805, + "narHash": "sha256-yqGxyzMN2GuppwG3dTWD1oiKxi+jGYP7D1qUSc5vKhI=", + "owner": "srid", + "repo": "flake-root", + "rev": "dc7ba6166e478804a9da6881aa48c45d300075cf", "type": "github" }, "original": { - "owner": "haskell", - "ref": "3.2", - "repo": "cabal", + "owner": "srid", + "repo": "flake-root", "type": "github" } }, - "cabal-32_6": { - "flake": false, + "flake-root_2": { "locked": { - "lastModified": 1603716527, - "narHash": "sha256-sDbrmur9Zfp4mPKohCD8IDZfXJ0Tjxpmr2R+kg5PpSY=", - "owner": "haskell", - "repo": "cabal", - "rev": "94aaa8e4720081f9c75497e2735b90f6a819b08e", + "lastModified": 1671378805, + "narHash": "sha256-yqGxyzMN2GuppwG3dTWD1oiKxi+jGYP7D1qUSc5vKhI=", + "owner": "srid", + "repo": "flake-root", + "rev": "dc7ba6166e478804a9da6881aa48c45d300075cf", "type": "github" }, "original": { - "owner": "haskell", - "ref": "3.2", - "repo": "cabal", + "owner": "srid", + "repo": "flake-root", "type": "github" } }, - "cabal-32_7": { - "flake": false, + "flake-utils": { "locked": { - "lastModified": 1603716527, - "narHash": "sha256-sDbrmur9Zfp4mPKohCD8IDZfXJ0Tjxpmr2R+kg5PpSY=", - "owner": "haskell", - "repo": "cabal", - "rev": "94aaa8e4720081f9c75497e2735b90f6a819b08e", + "lastModified": 1667395993, + "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", "type": "github" }, "original": { - "owner": "haskell", - "ref": "3.2", - "repo": "cabal", + "owner": "numtide", + "repo": "flake-utils", "type": "github" } }, - "cabal-32_8": { - "flake": false, + "flake-utils_2": { "locked": { - "lastModified": 1603716527, - "narHash": "sha256-sDbrmur9Zfp4mPKohCD8IDZfXJ0Tjxpmr2R+kg5PpSY=", - "owner": "haskell", - "repo": "cabal", - "rev": "94aaa8e4720081f9c75497e2735b90f6a819b08e", + "lastModified": 1679360468, + "narHash": "sha256-LGnza3cfXF10Biw3ZTg0u9o9t7s680Ww200t5KkHTh8=", + "owner": "hamishmack", + "repo": "flake-utils", + "rev": "e1ea268ff47ad475443dbabcd54744b4e5b9d4f5", "type": "github" }, "original": { - "owner": "haskell", - "ref": "3.2", - "repo": "cabal", + "owner": "hamishmack", + "ref": "hkm/nested-hydraJobs", + "repo": "flake-utils", "type": "github" } }, - "cabal-32_9": { - "flake": false, + "flake-utils_3": { "locked": { - "lastModified": 1603716527, - "narHash": "sha256-sDbrmur9Zfp4mPKohCD8IDZfXJ0Tjxpmr2R+kg5PpSY=", - "owner": "haskell", - "repo": "cabal", - "rev": "94aaa8e4720081f9c75497e2735b90f6a819b08e", + "lastModified": 1653893745, + "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1", "type": "github" }, "original": { - "owner": "haskell", - "ref": "3.2", - "repo": "cabal", + "owner": "numtide", + "repo": "flake-utils", "type": "github" } }, - "cabal-34": { - "flake": false, + "flake-utils_4": { "locked": { - "lastModified": 1640353650, - "narHash": "sha256-N1t6M3/wqj90AEdRkeC8i923gQYUpzSr8b40qVOZ1Rk=", - "owner": "haskell", - "repo": "cabal", - "rev": "942639c18c0cd8ec53e0a6f8d120091af35312cd", + "lastModified": 1653893745, + "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1", "type": "github" }, "original": { - "owner": "haskell", - "ref": "3.4", - "repo": "cabal", + "owner": "numtide", + "repo": "flake-utils", "type": "github" } }, - "cabal-34_10": { - "flake": false, + "flake-utils_5": { "locked": { - "lastModified": 1622475795, - "narHash": "sha256-chwTL304Cav+7p38d9mcb+egABWmxo2Aq+xgVBgEb/U=", - "owner": "haskell", - "repo": "cabal", - "rev": "b086c1995cdd616fc8d91f46a21e905cc50a1049", + "lastModified": 1659877975, + "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", "type": "github" }, "original": { - "owner": "haskell", - "ref": "3.4", - "repo": "cabal", + "owner": "numtide", + "repo": "flake-utils", "type": "github" } }, - "cabal-34_11": { - "flake": false, - "locked": { - "lastModified": 1622475795, - "narHash": "sha256-chwTL304Cav+7p38d9mcb+egABWmxo2Aq+xgVBgEb/U=", - "owner": "haskell", - "repo": "cabal", - "rev": "b086c1995cdd616fc8d91f46a21e905cc50a1049", - "type": "github" + "flake-utils_6": { + "inputs": { + "systems": "systems_2" }, - "original": { - "owner": "haskell", - "ref": "3.4", - "repo": "cabal", - "type": "github" - } - }, - "cabal-34_12": { - "flake": false, "locked": { - "lastModified": 1622475795, - "narHash": "sha256-chwTL304Cav+7p38d9mcb+egABWmxo2Aq+xgVBgEb/U=", - "owner": "haskell", - "repo": "cabal", - "rev": "b086c1995cdd616fc8d91f46a21e905cc50a1049", + "lastModified": 1687171271, + "narHash": "sha256-BJlq+ozK2B1sJDQXS3tzJM5a+oVZmi1q0FlBK/Xqv7M=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "abfb11bd1aec8ced1c9bb9adfe68018230f4fb3c", "type": "github" }, "original": { - "owner": "haskell", - "ref": "3.4", - "repo": "cabal", + "owner": "numtide", + "repo": "flake-utils", "type": "github" } }, - "cabal-34_13": { - "flake": false, + "flake-utils_7": { "locked": { - "lastModified": 1622475795, - "narHash": "sha256-chwTL304Cav+7p38d9mcb+egABWmxo2Aq+xgVBgEb/U=", - "owner": "haskell", - "repo": "cabal", - "rev": "b086c1995cdd616fc8d91f46a21e905cc50a1049", + "lastModified": 1679360468, + "narHash": "sha256-LGnza3cfXF10Biw3ZTg0u9o9t7s680Ww200t5KkHTh8=", + "owner": "hamishmack", + "repo": "flake-utils", + "rev": "e1ea268ff47ad475443dbabcd54744b4e5b9d4f5", "type": "github" }, "original": { - "owner": "haskell", - "ref": "3.4", - "repo": "cabal", + "owner": "hamishmack", + "ref": "hkm/nested-hydraJobs", + "repo": "flake-utils", "type": "github" } }, - "cabal-34_14": { + "ghc-8.6.5-iohk": { "flake": false, "locked": { - "lastModified": 1622475795, - "narHash": "sha256-chwTL304Cav+7p38d9mcb+egABWmxo2Aq+xgVBgEb/U=", - "owner": "haskell", - "repo": "cabal", - "rev": "b086c1995cdd616fc8d91f46a21e905cc50a1049", + "lastModified": 1600920045, + "narHash": "sha256-DO6kxJz248djebZLpSzTGD6s8WRpNI9BTwUeOf5RwY8=", + "owner": "input-output-hk", + "repo": "ghc", + "rev": "95713a6ecce4551240da7c96b6176f980af75cae", "type": "github" }, "original": { - "owner": "haskell", - "ref": "3.4", - "repo": "cabal", + "owner": "input-output-hk", + "ref": "release/8.6.5-iohk", + "repo": "ghc", "type": "github" } }, - "cabal-34_15": { + "ghc-8.6.5-iohk_2": { "flake": false, "locked": { - "lastModified": 1622475795, - "narHash": "sha256-chwTL304Cav+7p38d9mcb+egABWmxo2Aq+xgVBgEb/U=", - "owner": "haskell", - "repo": "cabal", - "rev": "b086c1995cdd616fc8d91f46a21e905cc50a1049", + "lastModified": 1600920045, + "narHash": "sha256-DO6kxJz248djebZLpSzTGD6s8WRpNI9BTwUeOf5RwY8=", + "owner": "input-output-hk", + "repo": "ghc", + "rev": "95713a6ecce4551240da7c96b6176f980af75cae", "type": "github" }, "original": { - "owner": "haskell", - "ref": "3.4", - "repo": "cabal", + "owner": "input-output-hk", + "ref": "release/8.6.5-iohk", + "repo": "ghc", "type": "github" } }, - "cabal-34_16": { - "flake": false, + "gomod2nix": { + "inputs": { + "nixpkgs": "nixpkgs_4", + "utils": "utils" + }, "locked": { - "lastModified": 1622475795, - "narHash": "sha256-chwTL304Cav+7p38d9mcb+egABWmxo2Aq+xgVBgEb/U=", - "owner": "haskell", - "repo": "cabal", - "rev": "b086c1995cdd616fc8d91f46a21e905cc50a1049", + "lastModified": 1655245309, + "narHash": "sha256-d/YPoQ/vFn1+GTmSdvbSBSTOai61FONxB4+Lt6w/IVI=", + "owner": "tweag", + "repo": "gomod2nix", + "rev": "40d32f82fc60d66402eb0972e6e368aeab3faf58", "type": "github" }, "original": { - "owner": "haskell", - "ref": "3.4", - "repo": "cabal", + "owner": "tweag", + "repo": "gomod2nix", "type": "github" } }, - "cabal-34_17": { + "hackage": { "flake": false, "locked": { - "lastModified": 1622475795, - "narHash": "sha256-chwTL304Cav+7p38d9mcb+egABWmxo2Aq+xgVBgEb/U=", - "owner": "haskell", - "repo": "cabal", - "rev": "b086c1995cdd616fc8d91f46a21e905cc50a1049", + "lastModified": 1687653101, + "narHash": "sha256-WUTDUPiy4vn8/cqgSSD0QWHebJUEImvQ8TnkXM6ekBI=", + "owner": "input-output-hk", + "repo": "hackage.nix", + "rev": "87e7a3acf58cff183a06d967cecfd164b94fc2ab", "type": "github" }, "original": { - "owner": "haskell", - "ref": "3.4", - "repo": "cabal", + "owner": "input-output-hk", + "repo": "hackage.nix", "type": "github" } }, - "cabal-34_18": { + "hackageNix": { "flake": false, "locked": { - "lastModified": 1622475795, - "narHash": "sha256-chwTL304Cav+7p38d9mcb+egABWmxo2Aq+xgVBgEb/U=", - "owner": "haskell", - "repo": "cabal", - "rev": "b086c1995cdd616fc8d91f46a21e905cc50a1049", + "lastModified": 1685492843, + "narHash": "sha256-X8dNs5Gfc2ucfaWAgZ1VmkpBB4Cb44EQZu0b7tkvz2Y=", + "owner": "input-output-hk", + "repo": "hackage.nix", + "rev": "e7407bab324eb2445bda58c5ffac393e80dda1e4", "type": "github" }, "original": { - "owner": "haskell", - "ref": "3.4", - "repo": "cabal", + "owner": "input-output-hk", + "repo": "hackage.nix", "type": "github" } }, - "cabal-34_19": { - "flake": false, + "haskell-flake": { "locked": { - "lastModified": 1645834128, - "narHash": "sha256-wG3d+dOt14z8+ydz4SL7pwGfe7SiimxcD/LOuPCV6xM=", - "owner": "haskell", - "repo": "cabal", - "rev": "5ff598c67f53f7c4f48e31d722ba37172230c462", + "lastModified": 1685469326, + "narHash": "sha256-esxJLsGexI/J6Fc32tJd2p3K5IOBZSCHgFvegjIpc+0=", + "owner": "srid", + "repo": "haskell-flake", + "rev": "996f5c2cdc67285c4990df378976f9dbf26f8401", "type": "github" }, "original": { - "owner": "haskell", - "ref": "3.4", - "repo": "cabal", + "owner": "srid", + "repo": "haskell-flake", "type": "github" } }, - "cabal-34_2": { - "flake": false, + "haskell-flake_2": { "locked": { - "lastModified": 1640353650, - "narHash": "sha256-N1t6M3/wqj90AEdRkeC8i923gQYUpzSr8b40qVOZ1Rk=", - "owner": "haskell", - "repo": "cabal", - "rev": "942639c18c0cd8ec53e0a6f8d120091af35312cd", + "lastModified": 1685469326, + "narHash": "sha256-esxJLsGexI/J6Fc32tJd2p3K5IOBZSCHgFvegjIpc+0=", + "owner": "srid", + "repo": "haskell-flake", + "rev": "996f5c2cdc67285c4990df378976f9dbf26f8401", "type": "github" }, "original": { - "owner": "haskell", - "ref": "3.4", - "repo": "cabal", + "owner": "srid", + "repo": "haskell-flake", "type": "github" } }, - "cabal-34_3": { - "flake": false, + "haskellNix": { + "inputs": { + "HTTP": "HTTP", + "cabal-32": "cabal-32", + "cabal-34": "cabal-34", + "cabal-36": "cabal-36", + "cardano-shell": "cardano-shell", + "flake-compat": "flake-compat_2", + "flake-utils": "flake-utils_2", + "ghc-8.6.5-iohk": "ghc-8.6.5-iohk", + "hackage": [ + "cardano-node-runtime", + "hackageNix" + ], + "hls-1.10": "hls-1.10", + "hpc-coveralls": "hpc-coveralls", + "hydra": "hydra", + "iserv-proxy": "iserv-proxy", + "nixpkgs": [ + "cardano-node-runtime", + "nixpkgs" + ], + "nixpkgs-2003": "nixpkgs-2003", + "nixpkgs-2105": "nixpkgs-2105", + "nixpkgs-2111": "nixpkgs-2111", + "nixpkgs-2205": "nixpkgs-2205", + "nixpkgs-2211": "nixpkgs-2211", + "nixpkgs-unstable": "nixpkgs-unstable", + "old-ghc-nix": "old-ghc-nix", + "stackage": "stackage" + }, "locked": { - "lastModified": 1640353650, - "narHash": "sha256-N1t6M3/wqj90AEdRkeC8i923gQYUpzSr8b40qVOZ1Rk=", - "owner": "haskell", - "repo": "cabal", - "rev": "942639c18c0cd8ec53e0a6f8d120091af35312cd", + "lastModified": 1685495397, + "narHash": "sha256-BwbWroS1Qm8BiHatG5+iHMHN5U6kqOccewBROUYuMKw=", + "owner": "input-output-hk", + "repo": "haskell.nix", + "rev": "d07c42cdb1cf88d0cab27d3090b00cb3899643c9", "type": "github" }, "original": { - "owner": "haskell", - "ref": "3.4", - "repo": "cabal", + "owner": "input-output-hk", + "repo": "haskell.nix", "type": "github" } }, - "cabal-34_4": { - "flake": false, - "locked": { - "lastModified": 1622475795, - "narHash": "sha256-chwTL304Cav+7p38d9mcb+egABWmxo2Aq+xgVBgEb/U=", - "owner": "haskell", - "repo": "cabal", - "rev": "b086c1995cdd616fc8d91f46a21e905cc50a1049", - "type": "github" + "haskellNix_2": { + "inputs": { + "HTTP": "HTTP_2", + "cabal-32": "cabal-32_2", + "cabal-34": "cabal-34_2", + "cabal-36": "cabal-36_2", + "cardano-shell": "cardano-shell_2", + "flake-compat": "flake-compat_5", + "flake-utils": "flake-utils_7", + "ghc-8.6.5-iohk": "ghc-8.6.5-iohk_2", + "hackage": [ + "hackage" + ], + "hls-1.10": "hls-1.10_2", + "hls-2.0": "hls-2.0", + "hpc-coveralls": "hpc-coveralls_2", + "hydra": "hydra_2", + "iserv-proxy": "iserv-proxy_2", + "nixpkgs": [ + "nixpkgs" + ], + "nixpkgs-2003": "nixpkgs-2003_2", + "nixpkgs-2105": "nixpkgs-2105_2", + "nixpkgs-2111": "nixpkgs-2111_2", + "nixpkgs-2205": "nixpkgs-2205_2", + "nixpkgs-2211": "nixpkgs-2211_2", + "nixpkgs-2305": "nixpkgs-2305", + "nixpkgs-unstable": "nixpkgs-unstable_2", + "old-ghc-nix": "old-ghc-nix_2", + "stackage": "stackage_2" }, - "original": { - "owner": "haskell", - "ref": "3.4", - "repo": "cabal", - "type": "github" - } - }, - "cabal-34_5": { - "flake": false, "locked": { - "lastModified": 1622475795, - "narHash": "sha256-chwTL304Cav+7p38d9mcb+egABWmxo2Aq+xgVBgEb/U=", - "owner": "haskell", - "repo": "cabal", - "rev": "b086c1995cdd616fc8d91f46a21e905cc50a1049", + "lastModified": 1687654292, + "narHash": "sha256-ZVpyLpd3SqvB9WQoIIm4krqyvp/rXSJtqoP3o/vUstU=", + "owner": "input-output-hk", + "repo": "haskell.nix", + "rev": "3547f24a928eebd6acbb5a1eba0eefa1770796da", "type": "github" }, "original": { - "owner": "haskell", - "ref": "3.4", - "repo": "cabal", + "owner": "input-output-hk", + "repo": "haskell.nix", "type": "github" } }, - "cabal-34_6": { + "hls-1.10": { "flake": false, "locked": { - "lastModified": 1622475795, - "narHash": "sha256-chwTL304Cav+7p38d9mcb+egABWmxo2Aq+xgVBgEb/U=", + "lastModified": 1680000865, + "narHash": "sha256-rc7iiUAcrHxwRM/s0ErEsSPxOR3u8t7DvFeWlMycWgo=", "owner": "haskell", - "repo": "cabal", - "rev": "b086c1995cdd616fc8d91f46a21e905cc50a1049", + "repo": "haskell-language-server", + "rev": "b08691db779f7a35ff322b71e72a12f6e3376fd9", "type": "github" }, "original": { "owner": "haskell", - "ref": "3.4", - "repo": "cabal", + "ref": "1.10.0.0", + "repo": "haskell-language-server", "type": "github" } }, - "cabal-34_7": { + "hls-1.10_2": { "flake": false, "locked": { - "lastModified": 1622475795, - "narHash": "sha256-chwTL304Cav+7p38d9mcb+egABWmxo2Aq+xgVBgEb/U=", + "lastModified": 1680000865, + "narHash": "sha256-rc7iiUAcrHxwRM/s0ErEsSPxOR3u8t7DvFeWlMycWgo=", "owner": "haskell", - "repo": "cabal", - "rev": "b086c1995cdd616fc8d91f46a21e905cc50a1049", + "repo": "haskell-language-server", + "rev": "b08691db779f7a35ff322b71e72a12f6e3376fd9", "type": "github" }, "original": { "owner": "haskell", - "ref": "3.4", - "repo": "cabal", + "ref": "1.10.0.0", + "repo": "haskell-language-server", "type": "github" } }, - "cabal-34_8": { + "hls-2.0": { "flake": false, "locked": { - "lastModified": 1622475795, - "narHash": "sha256-chwTL304Cav+7p38d9mcb+egABWmxo2Aq+xgVBgEb/U=", + "lastModified": 1684398654, + "narHash": "sha256-RW44up2BIyBBYN6tZur5f9kDDR3kr0Rd+TgPbLTfwB4=", "owner": "haskell", - "repo": "cabal", - "rev": "b086c1995cdd616fc8d91f46a21e905cc50a1049", + "repo": "haskell-language-server", + "rev": "20c6d1e731cd9c0beef7338e2fc7a8126ba9b6fb", "type": "github" }, "original": { "owner": "haskell", - "ref": "3.4", - "repo": "cabal", + "ref": "2.0.0.0", + "repo": "haskell-language-server", "type": "github" } }, - "cabal-34_9": { + "hpc-coveralls": { "flake": false, "locked": { - "lastModified": 1622475795, - "narHash": "sha256-chwTL304Cav+7p38d9mcb+egABWmxo2Aq+xgVBgEb/U=", - "owner": "haskell", - "repo": "cabal", - "rev": "b086c1995cdd616fc8d91f46a21e905cc50a1049", + "lastModified": 1607498076, + "narHash": "sha256-8uqsEtivphgZWYeUo5RDUhp6bO9j2vaaProQxHBltQk=", + "owner": "sevanspowell", + "repo": "hpc-coveralls", + "rev": "14df0f7d229f4cd2e79f8eabb1a740097fdfa430", "type": "github" }, "original": { - "owner": "haskell", - "ref": "3.4", - "repo": "cabal", + "owner": "sevanspowell", + "repo": "hpc-coveralls", "type": "github" } }, - "cabal-36": { + "hpc-coveralls_2": { "flake": false, "locked": { - "lastModified": 1641652457, - "narHash": "sha256-BlFPKP4C4HRUJeAbdembX1Rms1LD380q9s0qVDeoAak=", - "owner": "haskell", - "repo": "cabal", - "rev": "f27667f8ec360c475027dcaee0138c937477b070", + "lastModified": 1607498076, + "narHash": "sha256-8uqsEtivphgZWYeUo5RDUhp6bO9j2vaaProQxHBltQk=", + "owner": "sevanspowell", + "repo": "hpc-coveralls", + "rev": "14df0f7d229f4cd2e79f8eabb1a740097fdfa430", "type": "github" }, "original": { - "owner": "haskell", - "ref": "3.6", - "repo": "cabal", + "owner": "sevanspowell", + "repo": "hpc-coveralls", "type": "github" } }, - "cabal-36_10": { - "flake": false, + "hydra": { + "inputs": { + "nix": "nix", + "nixpkgs": [ + "cardano-node-runtime", + "haskellNix", + "hydra", + "nix", + "nixpkgs" + ] + }, "locked": { - "lastModified": 1640163203, - "narHash": "sha256-TwDWP2CffT0j40W6zr0J1Qbu+oh3nsF1lUx9446qxZM=", - "owner": "haskell", - "repo": "cabal", - "rev": "ecf418050c1821f25e2e218f1be94c31e0465df1", + "lastModified": 1671755331, + "narHash": "sha256-hXsgJj0Cy0ZiCiYdW2OdBz5WmFyOMKuw4zyxKpgUKm4=", + "owner": "NixOS", + "repo": "hydra", + "rev": "f48f00ee6d5727ae3e488cbf9ce157460853fea8", "type": "github" }, "original": { - "owner": "haskell", - "ref": "3.6", - "repo": "cabal", - "type": "github" + "id": "hydra", + "type": "indirect" } }, - "cabal-36_11": { - "flake": false, + "hydra_2": { + "inputs": { + "nix": "nix_2", + "nixpkgs": [ + "haskellNix", + "hydra", + "nix", + "nixpkgs" + ] + }, "locked": { - "lastModified": 1640163203, - "narHash": "sha256-TwDWP2CffT0j40W6zr0J1Qbu+oh3nsF1lUx9446qxZM=", - "owner": "haskell", - "repo": "cabal", - "rev": "ecf418050c1821f25e2e218f1be94c31e0465df1", + "lastModified": 1671755331, + "narHash": "sha256-hXsgJj0Cy0ZiCiYdW2OdBz5WmFyOMKuw4zyxKpgUKm4=", + "owner": "NixOS", + "repo": "hydra", + "rev": "f48f00ee6d5727ae3e488cbf9ce157460853fea8", "type": "github" }, "original": { - "owner": "haskell", - "ref": "3.6", - "repo": "cabal", - "type": "github" + "id": "hydra", + "type": "indirect" } }, - "cabal-36_12": { - "flake": false, + "incl": { + "inputs": { + "nixlib": [ + "cardano-node-runtime", + "tullia", + "std", + "nixpkgs" + ] + }, "locked": { - "lastModified": 1640163203, - "narHash": "sha256-TwDWP2CffT0j40W6zr0J1Qbu+oh3nsF1lUx9446qxZM=", - "owner": "haskell", - "repo": "cabal", - "rev": "ecf418050c1821f25e2e218f1be94c31e0465df1", + "lastModified": 1669263024, + "narHash": "sha256-E/+23NKtxAqYG/0ydYgxlgarKnxmDbg6rCMWnOBqn9Q=", + "owner": "divnix", + "repo": "incl", + "rev": "ce7bebaee048e4cd7ebdb4cee7885e00c4e2abca", "type": "github" }, "original": { - "owner": "haskell", - "ref": "3.6", - "repo": "cabal", + "owner": "divnix", + "repo": "incl", "type": "github" } }, - "cabal-36_13": { - "flake": false, + "iohkNix": { + "inputs": { + "blst": "blst", + "nixpkgs": [ + "cardano-node-runtime", + "nixpkgs" + ], + "secp256k1": "secp256k1", + "sodium": "sodium" + }, "locked": { - "lastModified": 1640163203, - "narHash": "sha256-TwDWP2CffT0j40W6zr0J1Qbu+oh3nsF1lUx9446qxZM=", - "owner": "haskell", - "repo": "cabal", - "rev": "ecf418050c1821f25e2e218f1be94c31e0465df1", + "lastModified": 1684223806, + "narHash": "sha256-IyLoP+zhuyygLtr83XXsrvKyqqLQ8FHXTiySFf4FJOI=", + "owner": "input-output-hk", + "repo": "iohk-nix", + "rev": "86421fdd89b3af43fa716ccd07638f96c6ecd1e4", "type": "github" }, "original": { - "owner": "haskell", - "ref": "3.6", - "repo": "cabal", + "owner": "input-output-hk", + "repo": "iohk-nix", "type": "github" } }, - "cabal-36_14": { - "flake": false, + "iohkNix_2": { + "inputs": { + "blst": "blst_2", + "nixpkgs": [ + "nixpkgs" + ], + "secp256k1": "secp256k1_2", + "sodium": "sodium_2" + }, "locked": { - "lastModified": 1640163203, - "narHash": "sha256-TwDWP2CffT0j40W6zr0J1Qbu+oh3nsF1lUx9446qxZM=", - "owner": "haskell", - "repo": "cabal", - "rev": "ecf418050c1821f25e2e218f1be94c31e0465df1", + "lastModified": 1687457666, + "narHash": "sha256-Fpf3SHzt3aAt2lyQzrrhWGt5NAL0LDS/mBYTp9+jbfA=", + "owner": "input-output-hk", + "repo": "iohk-nix", + "rev": "694dcf154be8b276fb1196552dadbc3aedcc8613", "type": "github" }, "original": { - "owner": "haskell", - "ref": "3.6", - "repo": "cabal", + "owner": "input-output-hk", + "repo": "iohk-nix", "type": "github" } }, - "cabal-36_15": { + "iserv-proxy": { "flake": false, "locked": { - "lastModified": 1669081697, - "narHash": "sha256-I5or+V7LZvMxfbYgZATU4awzkicBwwok4mVoje+sGmU=", - "owner": "haskell", - "repo": "cabal", - "rev": "8fd619e33d34924a94e691c5fea2c42f0fc7f144", - "type": "github" + "lastModified": 1670983692, + "narHash": "sha256-avLo34JnI9HNyOuauK5R69usJm+GfW3MlyGlYxZhTgY=", + "ref": "hkm/remote-iserv", + "rev": "50d0abb3317ac439a4e7495b185a64af9b7b9300", + "revCount": 10, + "type": "git", + "url": "https://gitlab.haskell.org/hamishmack/iserv-proxy.git" }, "original": { - "owner": "haskell", - "ref": "3.6", - "repo": "cabal", - "type": "github" + "ref": "hkm/remote-iserv", + "type": "git", + "url": "https://gitlab.haskell.org/hamishmack/iserv-proxy.git" } }, - "cabal-36_2": { + "iserv-proxy_2": { "flake": false, "locked": { - "lastModified": 1641652457, - "narHash": "sha256-BlFPKP4C4HRUJeAbdembX1Rms1LD380q9s0qVDeoAak=", - "owner": "haskell", - "repo": "cabal", - "rev": "f27667f8ec360c475027dcaee0138c937477b070", - "type": "github" + "lastModified": 1670983692, + "narHash": "sha256-avLo34JnI9HNyOuauK5R69usJm+GfW3MlyGlYxZhTgY=", + "ref": "hkm/remote-iserv", + "rev": "50d0abb3317ac439a4e7495b185a64af9b7b9300", + "revCount": 10, + "type": "git", + "url": "https://gitlab.haskell.org/hamishmack/iserv-proxy.git" }, "original": { - "owner": "haskell", - "ref": "3.6", - "repo": "cabal", - "type": "github" + "ref": "hkm/remote-iserv", + "type": "git", + "url": "https://gitlab.haskell.org/hamishmack/iserv-proxy.git" } }, - "cabal-36_3": { + "lowdown-src": { "flake": false, "locked": { - "lastModified": 1641652457, - "narHash": "sha256-BlFPKP4C4HRUJeAbdembX1Rms1LD380q9s0qVDeoAak=", - "owner": "haskell", - "repo": "cabal", - "rev": "f27667f8ec360c475027dcaee0138c937477b070", + "lastModified": 1633514407, + "narHash": "sha256-Dw32tiMjdK9t3ETl5fzGrutQTzh2rufgZV4A/BbxuD4=", + "owner": "kristapsdz", + "repo": "lowdown", + "rev": "d2c2b44ff6c27b936ec27358a2653caaef8f73b8", "type": "github" }, "original": { - "owner": "haskell", - "ref": "3.6", - "repo": "cabal", + "owner": "kristapsdz", + "repo": "lowdown", "type": "github" } }, - "cabal-36_4": { + "lowdown-src_2": { "flake": false, "locked": { - "lastModified": 1640163203, - "narHash": "sha256-TwDWP2CffT0j40W6zr0J1Qbu+oh3nsF1lUx9446qxZM=", - "owner": "haskell", - "repo": "cabal", - "rev": "ecf418050c1821f25e2e218f1be94c31e0465df1", + "lastModified": 1633514407, + "narHash": "sha256-Dw32tiMjdK9t3ETl5fzGrutQTzh2rufgZV4A/BbxuD4=", + "owner": "kristapsdz", + "repo": "lowdown", + "rev": "d2c2b44ff6c27b936ec27358a2653caaef8f73b8", "type": "github" }, "original": { - "owner": "haskell", - "ref": "3.6", - "repo": "cabal", + "owner": "kristapsdz", + "repo": "lowdown", "type": "github" } }, - "cabal-36_5": { - "flake": false, - "locked": { - "lastModified": 1640163203, - "narHash": "sha256-TwDWP2CffT0j40W6zr0J1Qbu+oh3nsF1lUx9446qxZM=", - "owner": "haskell", - "repo": "cabal", - "rev": "ecf418050c1821f25e2e218f1be94c31e0465df1", - "type": "github" - }, - "original": { - "owner": "haskell", - "ref": "3.6", - "repo": "cabal", - "type": "github" - } - }, - "cabal-36_6": { - "flake": false, - "locked": { - "lastModified": 1640163203, - "narHash": "sha256-TwDWP2CffT0j40W6zr0J1Qbu+oh3nsF1lUx9446qxZM=", - "owner": "haskell", - "repo": "cabal", - "rev": "ecf418050c1821f25e2e218f1be94c31e0465df1", - "type": "github" - }, - "original": { - "owner": "haskell", - "ref": "3.6", - "repo": "cabal", - "type": "github" - } - }, - "cabal-36_7": { - "flake": false, - "locked": { - "lastModified": 1640163203, - "narHash": "sha256-TwDWP2CffT0j40W6zr0J1Qbu+oh3nsF1lUx9446qxZM=", - "owner": "haskell", - "repo": "cabal", - "rev": "ecf418050c1821f25e2e218f1be94c31e0465df1", - "type": "github" - }, - "original": { - "owner": "haskell", - "ref": "3.6", - "repo": "cabal", - "type": "github" - } - }, - "cabal-36_8": { - "flake": false, - "locked": { - "lastModified": 1640163203, - "narHash": "sha256-TwDWP2CffT0j40W6zr0J1Qbu+oh3nsF1lUx9446qxZM=", - "owner": "haskell", - "repo": "cabal", - "rev": "ecf418050c1821f25e2e218f1be94c31e0465df1", - "type": "github" - }, - "original": { - "owner": "haskell", - "ref": "3.6", - "repo": "cabal", - "type": "github" - } - }, - "cabal-36_9": { - "flake": false, - "locked": { - "lastModified": 1640163203, - "narHash": "sha256-TwDWP2CffT0j40W6zr0J1Qbu+oh3nsF1lUx9446qxZM=", - "owner": "haskell", - "repo": "cabal", - "rev": "ecf418050c1821f25e2e218f1be94c31e0465df1", - "type": "github" - }, - "original": { - "owner": "haskell", - "ref": "3.6", - "repo": "cabal", - "type": "github" - } - }, - "cardano-mainnet-mirror": { - "inputs": { - "nixpkgs": "nixpkgs" - }, - "locked": { - "lastModified": 1642701714, - "narHash": "sha256-SR3luE+ePX6U193EKE/KSEuVzWAW0YsyPYDC4hOvALs=", - "owner": "input-output-hk", - "repo": "cardano-mainnet-mirror", - "rev": "819488be9eabbba6aaa7c931559bc584d8071e3d", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "ref": "nix", - "repo": "cardano-mainnet-mirror", - "type": "github" - } - }, - "cardano-mainnet-mirror_10": { - "inputs": { - "nixpkgs": "nixpkgs_13" - }, - "locked": { - "lastModified": 1642701714, - "narHash": "sha256-SR3luE+ePX6U193EKE/KSEuVzWAW0YsyPYDC4hOvALs=", - "owner": "input-output-hk", - "repo": "cardano-mainnet-mirror", - "rev": "819488be9eabbba6aaa7c931559bc584d8071e3d", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "ref": "nix", - "repo": "cardano-mainnet-mirror", - "type": "github" - } - }, - "cardano-mainnet-mirror_11": { - "inputs": { - "nixpkgs": "nixpkgs_14" - }, - "locked": { - "lastModified": 1642701714, - "narHash": "sha256-SR3luE+ePX6U193EKE/KSEuVzWAW0YsyPYDC4hOvALs=", - "owner": "input-output-hk", - "repo": "cardano-mainnet-mirror", - "rev": "819488be9eabbba6aaa7c931559bc584d8071e3d", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "ref": "nix", - "repo": "cardano-mainnet-mirror", - "type": "github" - } - }, - "cardano-mainnet-mirror_12": { - "inputs": { - "nixpkgs": "nixpkgs_15" - }, - "locked": { - "lastModified": 1642701714, - "narHash": "sha256-SR3luE+ePX6U193EKE/KSEuVzWAW0YsyPYDC4hOvALs=", - "owner": "input-output-hk", - "repo": "cardano-mainnet-mirror", - "rev": "819488be9eabbba6aaa7c931559bc584d8071e3d", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "ref": "nix", - "repo": "cardano-mainnet-mirror", - "type": "github" - } - }, - "cardano-mainnet-mirror_2": { - "inputs": { - "nixpkgs": "nixpkgs_4" - }, - "locked": { - "lastModified": 1642701714, - "narHash": "sha256-SR3luE+ePX6U193EKE/KSEuVzWAW0YsyPYDC4hOvALs=", - "owner": "input-output-hk", - "repo": "cardano-mainnet-mirror", - "rev": "819488be9eabbba6aaa7c931559bc584d8071e3d", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "ref": "nix", - "repo": "cardano-mainnet-mirror", - "type": "github" - } - }, - "cardano-mainnet-mirror_3": { - "inputs": { - "nixpkgs": "nixpkgs_6" - }, - "locked": { - "lastModified": 1642701714, - "narHash": "sha256-SR3luE+ePX6U193EKE/KSEuVzWAW0YsyPYDC4hOvALs=", - "owner": "input-output-hk", - "repo": "cardano-mainnet-mirror", - "rev": "819488be9eabbba6aaa7c931559bc584d8071e3d", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "ref": "nix", - "repo": "cardano-mainnet-mirror", - "type": "github" - } - }, - "cardano-mainnet-mirror_4": { - "inputs": { - "nixpkgs": "nixpkgs_7" - }, - "locked": { - "lastModified": 1642701714, - "narHash": "sha256-SR3luE+ePX6U193EKE/KSEuVzWAW0YsyPYDC4hOvALs=", - "owner": "input-output-hk", - "repo": "cardano-mainnet-mirror", - "rev": "819488be9eabbba6aaa7c931559bc584d8071e3d", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "ref": "nix", - "repo": "cardano-mainnet-mirror", - "type": "github" - } - }, - "cardano-mainnet-mirror_5": { - "inputs": { - "nixpkgs": "nixpkgs_8" - }, - "locked": { - "lastModified": 1642701714, - "narHash": "sha256-SR3luE+ePX6U193EKE/KSEuVzWAW0YsyPYDC4hOvALs=", - "owner": "input-output-hk", - "repo": "cardano-mainnet-mirror", - "rev": "819488be9eabbba6aaa7c931559bc584d8071e3d", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "ref": "nix", - "repo": "cardano-mainnet-mirror", - "type": "github" - } - }, - "cardano-mainnet-mirror_6": { - "inputs": { - "nixpkgs": "nixpkgs_9" - }, - "locked": { - "lastModified": 1642701714, - "narHash": "sha256-SR3luE+ePX6U193EKE/KSEuVzWAW0YsyPYDC4hOvALs=", - "owner": "input-output-hk", - "repo": "cardano-mainnet-mirror", - "rev": "819488be9eabbba6aaa7c931559bc584d8071e3d", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "ref": "nix", - "repo": "cardano-mainnet-mirror", - "type": "github" - } - }, - "cardano-mainnet-mirror_7": { + "n2c": { "inputs": { - "nixpkgs": "nixpkgs_10" + "flake-utils": [ + "cardano-node-runtime", + "tullia", + "std", + "flake-utils" + ], + "nixpkgs": [ + "cardano-node-runtime", + "tullia", + "std", + "nixpkgs" + ] }, "locked": { - "lastModified": 1642701714, - "narHash": "sha256-SR3luE+ePX6U193EKE/KSEuVzWAW0YsyPYDC4hOvALs=", - "owner": "input-output-hk", - "repo": "cardano-mainnet-mirror", - "rev": "819488be9eabbba6aaa7c931559bc584d8071e3d", + "lastModified": 1665039323, + "narHash": "sha256-SAh3ZjFGsaCI8FRzXQyp56qcGdAqgKEfJWPCQ0Sr7tQ=", + "owner": "nlewo", + "repo": "nix2container", + "rev": "b008fe329ffb59b67bf9e7b08ede6ee792f2741a", "type": "github" }, "original": { - "owner": "input-output-hk", - "ref": "nix", - "repo": "cardano-mainnet-mirror", + "owner": "nlewo", + "repo": "nix2container", "type": "github" } }, - "cardano-mainnet-mirror_8": { + "nix": { "inputs": { - "nixpkgs": "nixpkgs_11" + "lowdown-src": "lowdown-src", + "nixpkgs": "nixpkgs_2", + "nixpkgs-regression": "nixpkgs-regression" }, "locked": { - "lastModified": 1642701714, - "narHash": "sha256-SR3luE+ePX6U193EKE/KSEuVzWAW0YsyPYDC4hOvALs=", - "owner": "input-output-hk", - "repo": "cardano-mainnet-mirror", - "rev": "819488be9eabbba6aaa7c931559bc584d8071e3d", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "ref": "nix", - "repo": "cardano-mainnet-mirror", - "type": "github" - } - }, - "cardano-mainnet-mirror_9": { - "inputs": { - "nixpkgs": "nixpkgs_12" - }, - "locked": { - "lastModified": 1642701714, - "narHash": "sha256-SR3luE+ePX6U193EKE/KSEuVzWAW0YsyPYDC4hOvALs=", - "owner": "input-output-hk", - "repo": "cardano-mainnet-mirror", - "rev": "819488be9eabbba6aaa7c931559bc584d8071e3d", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "ref": "nix", - "repo": "cardano-mainnet-mirror", - "type": "github" - } - }, - "cardano-node-1_35_4": { - "inputs": { - "CHaP": "CHaP_2", - "cardano-mainnet-mirror": "cardano-mainnet-mirror", - "cardano-node-workbench": "cardano-node-workbench", - "customConfig": "customConfig_2", - "flake-compat": "flake-compat_2", - "hackageNix": "hackageNix", - "haskellNix": "haskellNix_2", - "hostNixpkgs": [ - "cardano-node-1_35_4", - "nixpkgs" - ], - "iohkNix": "iohkNix_2", - "nixTools": "nixTools", - "nixpkgs": [ - "cardano-node-1_35_4", - "haskellNix", - "nixpkgs-unstable" - ], - "node-measured": "node-measured", - "node-process": "node-process_2", - "node-snapshot": "node-snapshot_2", - "plutus-apps": "plutus-apps_4", - "utils": "utils_18" - }, - "locked": { - "lastModified": 1667644902, - "narHash": "sha256-WRRzfpDc+YVmTNbN9LNYY4dS8o21p/6NoKxtcZmoAcg=", - "owner": "input-output-hk", - "repo": "cardano-node", - "rev": "ebc7be471b30e5931b35f9bbc236d21c375b91bb", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "ref": "1.35.4", - "repo": "cardano-node", - "type": "github" - } - }, - "cardano-node-snapshot": { - "inputs": { - "customConfig": "customConfig_6", - "haskellNix": "haskellNix_6", - "iohkNix": "iohkNix_6", - "membench": "membench_4", - "nixpkgs": [ - "cardano-node-1_35_4", - "node-measured", - "node-measured", - "membench", - "cardano-node-snapshot", - "haskellNix", - "nixpkgs-2105" - ], - "plutus-example": "plutus-example", - "utils": "utils_5" - }, - "locked": { - "lastModified": 1645120669, - "narHash": "sha256-2MKfGsYS5n69+pfqNHb4IH/E95ok1MD7mhEYfUpRcz4=", - "owner": "input-output-hk", - "repo": "cardano-node", - "rev": "7f00e3ea5a61609e19eeeee4af35241571efdf5c", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-node", - "rev": "30d62b86e7b98da28ef8ad9412e4e00a1ba1231d", - "type": "github" - } - }, - "cardano-node-snapshot_2": { - "inputs": { - "customConfig": "customConfig_7", - "haskellNix": "haskellNix_7", - "iohkNix": "iohkNix_7", - "membench": "membench_5", - "nixpkgs": [ - "cardano-node-1_35_4", - "node-measured", - "node-measured", - "membench", - "cardano-node-snapshot", - "membench", - "cardano-node-snapshot", - "haskellNix", - "nixpkgs-2105" - ], - "utils": "utils_3" - }, - "locked": { - "lastModified": 1644954571, - "narHash": "sha256-c6MM1mQoS/AnTIrwaRmITK4L4i9lLNtkjOUHiseBtUs=", - "owner": "input-output-hk", - "repo": "cardano-node", - "rev": "30d62b86e7b98da28ef8ad9412e4e00a1ba1231d", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-node", - "rev": "30d62b86e7b98da28ef8ad9412e4e00a1ba1231d", - "type": "github" - } - }, - "cardano-node-snapshot_3": { - "inputs": { - "customConfig": "customConfig_10", - "haskellNix": "haskellNix_10", - "iohkNix": "iohkNix_10", - "membench": "membench_7", - "nixpkgs": [ - "cardano-node-1_35_4", - "node-measured", - "node-process", - "membench", - "cardano-node-snapshot", - "haskellNix", - "nixpkgs-2105" - ], - "plutus-example": "plutus-example_3", - "utils": "utils_9" - }, - "locked": { - "lastModified": 1645120669, - "narHash": "sha256-2MKfGsYS5n69+pfqNHb4IH/E95ok1MD7mhEYfUpRcz4=", - "owner": "input-output-hk", - "repo": "cardano-node", - "rev": "7f00e3ea5a61609e19eeeee4af35241571efdf5c", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-node", - "rev": "30d62b86e7b98da28ef8ad9412e4e00a1ba1231d", - "type": "github" - } - }, - "cardano-node-snapshot_4": { - "inputs": { - "customConfig": "customConfig_11", - "haskellNix": "haskellNix_11", - "iohkNix": "iohkNix_11", - "membench": "membench_8", - "nixpkgs": [ - "cardano-node-1_35_4", - "node-measured", - "node-process", - "membench", - "cardano-node-snapshot", - "membench", - "cardano-node-snapshot", - "haskellNix", - "nixpkgs-2105" - ], - "utils": "utils_7" - }, - "locked": { - "lastModified": 1644954571, - "narHash": "sha256-c6MM1mQoS/AnTIrwaRmITK4L4i9lLNtkjOUHiseBtUs=", - "owner": "input-output-hk", - "repo": "cardano-node", - "rev": "30d62b86e7b98da28ef8ad9412e4e00a1ba1231d", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-node", - "rev": "30d62b86e7b98da28ef8ad9412e4e00a1ba1231d", - "type": "github" - } - }, - "cardano-node-snapshot_5": { - "inputs": { - "customConfig": "customConfig_14", - "haskellNix": "haskellNix_14", - "iohkNix": "iohkNix_14", - "membench": "membench_10", - "nixpkgs": [ - "cardano-node-1_35_4", - "node-measured", - "node-snapshot", - "membench", - "cardano-node-snapshot", - "haskellNix", - "nixpkgs-2105" - ], - "utils": "utils_11" - }, - "locked": { - "lastModified": 1644954571, - "narHash": "sha256-c6MM1mQoS/AnTIrwaRmITK4L4i9lLNtkjOUHiseBtUs=", - "owner": "input-output-hk", - "repo": "cardano-node", - "rev": "30d62b86e7b98da28ef8ad9412e4e00a1ba1231d", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-node", - "rev": "30d62b86e7b98da28ef8ad9412e4e00a1ba1231d", - "type": "github" - } - }, - "cardano-node-snapshot_6": { - "inputs": { - "customConfig": "customConfig_17", - "haskellNix": "haskellNix_17", - "iohkNix": "iohkNix_17", - "membench": "membench_12", - "nixpkgs": [ - "cardano-node-1_35_4", - "node-snapshot", - "membench", - "cardano-node-snapshot", - "haskellNix", - "nixpkgs-2105" - ], - "utils": "utils_15" - }, - "locked": { - "lastModified": 1644954571, - "narHash": "sha256-c6MM1mQoS/AnTIrwaRmITK4L4i9lLNtkjOUHiseBtUs=", - "owner": "input-output-hk", - "repo": "cardano-node", - "rev": "30d62b86e7b98da28ef8ad9412e4e00a1ba1231d", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-node", - "rev": "30d62b86e7b98da28ef8ad9412e4e00a1ba1231d", - "type": "github" - } - }, - "cardano-node-workbench": { - "inputs": { - "cardano-node-workbench": "cardano-node-workbench_2", - "customConfig": "customConfig", - "flake-compat": "flake-compat", - "haskellNix": "haskellNix", - "hostNixpkgs": [ - "cardano-node-1_35_4", - "cardano-node-workbench", - "nixpkgs" - ], - "iohkNix": "iohkNix", - "membench": "membench", - "nixpkgs": [ - "cardano-node-1_35_4", - "cardano-node-workbench", - "haskellNix", - "nixpkgs-2105" - ], - "plutus-apps": "plutus-apps", - "utils": "utils" - }, - "locked": { - "lastModified": 1647983004, - "narHash": "sha256-29kzatjbzREnXoT6Yh89OC82C5qI8eCVZhm4OeSjrgw=", - "owner": "input-output-hk", - "repo": "cardano-node", - "rev": "ed9932c52aaa535b71f72a5b4cc0cecb3344a5a3", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-node", - "rev": "ed9932c52aaa535b71f72a5b4cc0cecb3344a5a3", - "type": "github" - } - }, - "cardano-node-workbench_2": { - "flake": false, - "locked": { - "lastModified": 1647605822, - "narHash": "sha256-bhgSsshidZ7dOPpXdG88pIqhy5VgXWi3LXtR78oDiEo=", - "owner": "input-output-hk", - "repo": "cardano-node", - "rev": "44ac30fb04d02d41ba005ca5228db9b5e9b887d2", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-node", - "rev": "44ac30fb04d02d41ba005ca5228db9b5e9b887d2", - "type": "github" - } - }, - "cardano-node-workbench_3": { - "inputs": { - "cardano-node-workbench": "cardano-node-workbench_4", - "customConfig": "customConfig_3", - "flake-compat": "flake-compat_4", - "haskellNix": "haskellNix_3", - "hostNixpkgs": [ - "cardano-node-1_35_4", - "node-measured", - "cardano-node-workbench", - "nixpkgs" - ], - "iohkNix": "iohkNix_3", - "membench": "membench_2", - "nixpkgs": [ - "cardano-node-1_35_4", - "node-measured", - "cardano-node-workbench", - "haskellNix", - "nixpkgs-2105" - ], - "plutus-apps": "plutus-apps_2", - "utils": "utils_2" - }, - "locked": { - "lastModified": 1647983004, - "narHash": "sha256-29kzatjbzREnXoT6Yh89OC82C5qI8eCVZhm4OeSjrgw=", - "owner": "input-output-hk", - "repo": "cardano-node", - "rev": "ed9932c52aaa535b71f72a5b4cc0cecb3344a5a3", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-node", - "rev": "ed9932c52aaa535b71f72a5b4cc0cecb3344a5a3", - "type": "github" - } - }, - "cardano-node-workbench_4": { - "flake": false, - "locked": { - "lastModified": 1647605822, - "narHash": "sha256-bhgSsshidZ7dOPpXdG88pIqhy5VgXWi3LXtR78oDiEo=", - "owner": "input-output-hk", - "repo": "cardano-node", - "rev": "44ac30fb04d02d41ba005ca5228db9b5e9b887d2", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-node", - "rev": "44ac30fb04d02d41ba005ca5228db9b5e9b887d2", - "type": "github" - } - }, - "cardano-node-workbench_5": { - "flake": false, - "locked": { - "lastModified": 1647605822, - "narHash": "sha256-bhgSsshidZ7dOPpXdG88pIqhy5VgXWi3LXtR78oDiEo=", - "owner": "input-output-hk", - "repo": "cardano-node", - "rev": "44ac30fb04d02d41ba005ca5228db9b5e9b887d2", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-node", - "rev": "44ac30fb04d02d41ba005ca5228db9b5e9b887d2", - "type": "github" - } - }, - "cardano-node-workbench_6": { - "flake": false, - "locked": { - "lastModified": 1647605822, - "narHash": "sha256-bhgSsshidZ7dOPpXdG88pIqhy5VgXWi3LXtR78oDiEo=", - "owner": "input-output-hk", - "repo": "cardano-node", - "rev": "44ac30fb04d02d41ba005ca5228db9b5e9b887d2", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-node", - "rev": "44ac30fb04d02d41ba005ca5228db9b5e9b887d2", - "type": "github" - } - }, - "cardano-shell": { - "flake": false, - "locked": { - "lastModified": 1608537748, - "narHash": "sha256-PulY1GfiMgKVnBci3ex4ptk2UNYMXqGjJOxcPy2KYT4=", - "owner": "input-output-hk", - "repo": "cardano-shell", - "rev": "9392c75087cb9a3d453998f4230930dea3a95725", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-shell", - "type": "github" - } - }, - "cardano-shell_10": { - "flake": false, - "locked": { - "lastModified": 1608537748, - "narHash": "sha256-PulY1GfiMgKVnBci3ex4ptk2UNYMXqGjJOxcPy2KYT4=", - "owner": "input-output-hk", - "repo": "cardano-shell", - "rev": "9392c75087cb9a3d453998f4230930dea3a95725", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-shell", - "type": "github" - } - }, - "cardano-shell_11": { - "flake": false, - "locked": { - "lastModified": 1608537748, - "narHash": "sha256-PulY1GfiMgKVnBci3ex4ptk2UNYMXqGjJOxcPy2KYT4=", - "owner": "input-output-hk", - "repo": "cardano-shell", - "rev": "9392c75087cb9a3d453998f4230930dea3a95725", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-shell", - "type": "github" - } - }, - "cardano-shell_12": { - "flake": false, - "locked": { - "lastModified": 1608537748, - "narHash": "sha256-PulY1GfiMgKVnBci3ex4ptk2UNYMXqGjJOxcPy2KYT4=", - "owner": "input-output-hk", - "repo": "cardano-shell", - "rev": "9392c75087cb9a3d453998f4230930dea3a95725", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-shell", - "type": "github" - } - }, - "cardano-shell_13": { - "flake": false, - "locked": { - "lastModified": 1608537748, - "narHash": "sha256-PulY1GfiMgKVnBci3ex4ptk2UNYMXqGjJOxcPy2KYT4=", - "owner": "input-output-hk", - "repo": "cardano-shell", - "rev": "9392c75087cb9a3d453998f4230930dea3a95725", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-shell", - "type": "github" - } - }, - "cardano-shell_14": { - "flake": false, - "locked": { - "lastModified": 1608537748, - "narHash": "sha256-PulY1GfiMgKVnBci3ex4ptk2UNYMXqGjJOxcPy2KYT4=", - "owner": "input-output-hk", - "repo": "cardano-shell", - "rev": "9392c75087cb9a3d453998f4230930dea3a95725", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-shell", - "type": "github" - } - }, - "cardano-shell_15": { - "flake": false, - "locked": { - "lastModified": 1608537748, - "narHash": "sha256-PulY1GfiMgKVnBci3ex4ptk2UNYMXqGjJOxcPy2KYT4=", - "owner": "input-output-hk", - "repo": "cardano-shell", - "rev": "9392c75087cb9a3d453998f4230930dea3a95725", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-shell", - "type": "github" - } - }, - "cardano-shell_16": { - "flake": false, - "locked": { - "lastModified": 1608537748, - "narHash": "sha256-PulY1GfiMgKVnBci3ex4ptk2UNYMXqGjJOxcPy2KYT4=", - "owner": "input-output-hk", - "repo": "cardano-shell", - "rev": "9392c75087cb9a3d453998f4230930dea3a95725", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-shell", - "type": "github" - } - }, - "cardano-shell_17": { - "flake": false, - "locked": { - "lastModified": 1608537748, - "narHash": "sha256-PulY1GfiMgKVnBci3ex4ptk2UNYMXqGjJOxcPy2KYT4=", - "owner": "input-output-hk", - "repo": "cardano-shell", - "rev": "9392c75087cb9a3d453998f4230930dea3a95725", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-shell", - "type": "github" - } - }, - "cardano-shell_18": { - "flake": false, - "locked": { - "lastModified": 1608537748, - "narHash": "sha256-PulY1GfiMgKVnBci3ex4ptk2UNYMXqGjJOxcPy2KYT4=", - "owner": "input-output-hk", - "repo": "cardano-shell", - "rev": "9392c75087cb9a3d453998f4230930dea3a95725", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-shell", - "type": "github" - } - }, - "cardano-shell_19": { - "flake": false, - "locked": { - "lastModified": 1608537748, - "narHash": "sha256-PulY1GfiMgKVnBci3ex4ptk2UNYMXqGjJOxcPy2KYT4=", - "owner": "input-output-hk", - "repo": "cardano-shell", - "rev": "9392c75087cb9a3d453998f4230930dea3a95725", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-shell", - "type": "github" - } - }, - "cardano-shell_2": { - "flake": false, - "locked": { - "lastModified": 1608537748, - "narHash": "sha256-PulY1GfiMgKVnBci3ex4ptk2UNYMXqGjJOxcPy2KYT4=", - "owner": "input-output-hk", - "repo": "cardano-shell", - "rev": "9392c75087cb9a3d453998f4230930dea3a95725", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-shell", - "type": "github" - } - }, - "cardano-shell_3": { - "flake": false, - "locked": { - "lastModified": 1608537748, - "narHash": "sha256-PulY1GfiMgKVnBci3ex4ptk2UNYMXqGjJOxcPy2KYT4=", - "owner": "input-output-hk", - "repo": "cardano-shell", - "rev": "9392c75087cb9a3d453998f4230930dea3a95725", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-shell", - "type": "github" - } - }, - "cardano-shell_4": { - "flake": false, - "locked": { - "lastModified": 1608537748, - "narHash": "sha256-PulY1GfiMgKVnBci3ex4ptk2UNYMXqGjJOxcPy2KYT4=", - "owner": "input-output-hk", - "repo": "cardano-shell", - "rev": "9392c75087cb9a3d453998f4230930dea3a95725", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-shell", - "type": "github" - } - }, - "cardano-shell_5": { - "flake": false, - "locked": { - "lastModified": 1608537748, - "narHash": "sha256-PulY1GfiMgKVnBci3ex4ptk2UNYMXqGjJOxcPy2KYT4=", - "owner": "input-output-hk", - "repo": "cardano-shell", - "rev": "9392c75087cb9a3d453998f4230930dea3a95725", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-shell", - "type": "github" - } - }, - "cardano-shell_6": { - "flake": false, - "locked": { - "lastModified": 1608537748, - "narHash": "sha256-PulY1GfiMgKVnBci3ex4ptk2UNYMXqGjJOxcPy2KYT4=", - "owner": "input-output-hk", - "repo": "cardano-shell", - "rev": "9392c75087cb9a3d453998f4230930dea3a95725", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-shell", - "type": "github" - } - }, - "cardano-shell_7": { - "flake": false, - "locked": { - "lastModified": 1608537748, - "narHash": "sha256-PulY1GfiMgKVnBci3ex4ptk2UNYMXqGjJOxcPy2KYT4=", - "owner": "input-output-hk", - "repo": "cardano-shell", - "rev": "9392c75087cb9a3d453998f4230930dea3a95725", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-shell", - "type": "github" - } - }, - "cardano-shell_8": { - "flake": false, - "locked": { - "lastModified": 1608537748, - "narHash": "sha256-PulY1GfiMgKVnBci3ex4ptk2UNYMXqGjJOxcPy2KYT4=", - "owner": "input-output-hk", - "repo": "cardano-shell", - "rev": "9392c75087cb9a3d453998f4230930dea3a95725", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-shell", - "type": "github" - } - }, - "cardano-shell_9": { - "flake": false, - "locked": { - "lastModified": 1608537748, - "narHash": "sha256-PulY1GfiMgKVnBci3ex4ptk2UNYMXqGjJOxcPy2KYT4=", - "owner": "input-output-hk", - "repo": "cardano-shell", - "rev": "9392c75087cb9a3d453998f4230930dea3a95725", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-shell", - "type": "github" - } - }, - "customConfig": { - "locked": { - "lastModified": 1630400035, - "narHash": "sha256-MWaVOCzuFwp09wZIW9iHq5wWen5C69I940N1swZLEQ0=", - "owner": "input-output-hk", - "repo": "empty-flake", - "rev": "2040a05b67bf9a669ce17eca56beb14b4206a99a", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "empty-flake", - "type": "github" - } - }, - "customConfig_10": { - "locked": { - "lastModified": 1630400035, - "narHash": "sha256-MWaVOCzuFwp09wZIW9iHq5wWen5C69I940N1swZLEQ0=", - "owner": "input-output-hk", - "repo": "empty-flake", - "rev": "2040a05b67bf9a669ce17eca56beb14b4206a99a", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "empty-flake", - "type": "github" - } - }, - "customConfig_11": { - "locked": { - "lastModified": 1630400035, - "narHash": "sha256-MWaVOCzuFwp09wZIW9iHq5wWen5C69I940N1swZLEQ0=", - "owner": "input-output-hk", - "repo": "empty-flake", - "rev": "2040a05b67bf9a669ce17eca56beb14b4206a99a", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "empty-flake", - "type": "github" - } - }, - "customConfig_12": { - "locked": { - "lastModified": 1630400035, - "narHash": "sha256-MWaVOCzuFwp09wZIW9iHq5wWen5C69I940N1swZLEQ0=", - "owner": "input-output-hk", - "repo": "empty-flake", - "rev": "2040a05b67bf9a669ce17eca56beb14b4206a99a", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "empty-flake", - "type": "github" - } - }, - "customConfig_13": { - "locked": { - "lastModified": 1630400035, - "narHash": "sha256-MWaVOCzuFwp09wZIW9iHq5wWen5C69I940N1swZLEQ0=", - "owner": "input-output-hk", - "repo": "empty-flake", - "rev": "2040a05b67bf9a669ce17eca56beb14b4206a99a", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "empty-flake", - "type": "github" - } - }, - "customConfig_14": { - "locked": { - "lastModified": 1630400035, - "narHash": "sha256-MWaVOCzuFwp09wZIW9iHq5wWen5C69I940N1swZLEQ0=", - "owner": "input-output-hk", - "repo": "empty-flake", - "rev": "2040a05b67bf9a669ce17eca56beb14b4206a99a", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "empty-flake", - "type": "github" - } - }, - "customConfig_15": { - "locked": { - "lastModified": 1630400035, - "narHash": "sha256-MWaVOCzuFwp09wZIW9iHq5wWen5C69I940N1swZLEQ0=", - "owner": "input-output-hk", - "repo": "empty-flake", - "rev": "2040a05b67bf9a669ce17eca56beb14b4206a99a", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "empty-flake", - "type": "github" - } - }, - "customConfig_16": { - "locked": { - "lastModified": 1630400035, - "narHash": "sha256-MWaVOCzuFwp09wZIW9iHq5wWen5C69I940N1swZLEQ0=", - "owner": "input-output-hk", - "repo": "empty-flake", - "rev": "2040a05b67bf9a669ce17eca56beb14b4206a99a", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "empty-flake", - "type": "github" - } - }, - "customConfig_17": { - "locked": { - "lastModified": 1630400035, - "narHash": "sha256-MWaVOCzuFwp09wZIW9iHq5wWen5C69I940N1swZLEQ0=", - "owner": "input-output-hk", - "repo": "empty-flake", - "rev": "2040a05b67bf9a669ce17eca56beb14b4206a99a", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "empty-flake", - "type": "github" - } - }, - "customConfig_18": { - "locked": { - "lastModified": 1630400035, - "narHash": "sha256-MWaVOCzuFwp09wZIW9iHq5wWen5C69I940N1swZLEQ0=", - "owner": "input-output-hk", - "repo": "empty-flake", - "rev": "2040a05b67bf9a669ce17eca56beb14b4206a99a", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "empty-flake", - "type": "github" - } - }, - "customConfig_19": { - "locked": { - "lastModified": 1630400035, - "narHash": "sha256-MWaVOCzuFwp09wZIW9iHq5wWen5C69I940N1swZLEQ0=", - "owner": "input-output-hk", - "repo": "empty-flake", - "rev": "2040a05b67bf9a669ce17eca56beb14b4206a99a", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "empty-flake", - "type": "github" - } - }, - "customConfig_2": { - "locked": { - "lastModified": 1630400035, - "narHash": "sha256-MWaVOCzuFwp09wZIW9iHq5wWen5C69I940N1swZLEQ0=", - "owner": "input-output-hk", - "repo": "empty-flake", - "rev": "2040a05b67bf9a669ce17eca56beb14b4206a99a", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "empty-flake", - "type": "github" - } - }, - "customConfig_3": { - "locked": { - "lastModified": 1630400035, - "narHash": "sha256-MWaVOCzuFwp09wZIW9iHq5wWen5C69I940N1swZLEQ0=", - "owner": "input-output-hk", - "repo": "empty-flake", - "rev": "2040a05b67bf9a669ce17eca56beb14b4206a99a", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "empty-flake", - "type": "github" - } - }, - "customConfig_4": { - "locked": { - "lastModified": 1630400035, - "narHash": "sha256-MWaVOCzuFwp09wZIW9iHq5wWen5C69I940N1swZLEQ0=", - "owner": "input-output-hk", - "repo": "empty-flake", - "rev": "2040a05b67bf9a669ce17eca56beb14b4206a99a", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "empty-flake", - "type": "github" - } - }, - "customConfig_5": { - "locked": { - "lastModified": 1630400035, - "narHash": "sha256-MWaVOCzuFwp09wZIW9iHq5wWen5C69I940N1swZLEQ0=", - "owner": "input-output-hk", - "repo": "empty-flake", - "rev": "2040a05b67bf9a669ce17eca56beb14b4206a99a", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "empty-flake", - "type": "github" - } - }, - "customConfig_6": { - "locked": { - "lastModified": 1630400035, - "narHash": "sha256-MWaVOCzuFwp09wZIW9iHq5wWen5C69I940N1swZLEQ0=", - "owner": "input-output-hk", - "repo": "empty-flake", - "rev": "2040a05b67bf9a669ce17eca56beb14b4206a99a", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "empty-flake", - "type": "github" - } - }, - "customConfig_7": { - "locked": { - "lastModified": 1630400035, - "narHash": "sha256-MWaVOCzuFwp09wZIW9iHq5wWen5C69I940N1swZLEQ0=", - "owner": "input-output-hk", - "repo": "empty-flake", - "rev": "2040a05b67bf9a669ce17eca56beb14b4206a99a", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "empty-flake", - "type": "github" - } - }, - "customConfig_8": { - "locked": { - "lastModified": 1630400035, - "narHash": "sha256-MWaVOCzuFwp09wZIW9iHq5wWen5C69I940N1swZLEQ0=", - "owner": "input-output-hk", - "repo": "empty-flake", - "rev": "2040a05b67bf9a669ce17eca56beb14b4206a99a", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "empty-flake", - "type": "github" - } - }, - "customConfig_9": { - "locked": { - "lastModified": 1630400035, - "narHash": "sha256-MWaVOCzuFwp09wZIW9iHq5wWen5C69I940N1swZLEQ0=", - "owner": "input-output-hk", - "repo": "empty-flake", - "rev": "2040a05b67bf9a669ce17eca56beb14b4206a99a", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "empty-flake", - "type": "github" - } - }, - "devshell": { - "inputs": { - "flake-utils": [ - "haskellNix", - "tullia", - "std", - "flake-utils" - ], - "nixpkgs": [ - "haskellNix", - "tullia", - "std", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1663445644, - "narHash": "sha256-+xVlcK60x7VY1vRJbNUEAHi17ZuoQxAIH4S4iUFUGBA=", - "owner": "numtide", - "repo": "devshell", - "rev": "e3dc3e21594fe07bdb24bdf1c8657acaa4cb8f66", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "devshell", - "type": "github" - } - }, - "dmerge": { - "inputs": { - "nixlib": [ - "haskellNix", - "tullia", - "std", - "nixpkgs" - ], - "yants": [ - "haskellNix", - "tullia", - "std", - "yants" - ] - }, - "locked": { - "lastModified": 1659548052, - "narHash": "sha256-fzI2gp1skGA8mQo/FBFrUAtY0GQkAIAaV/V127TJPyY=", - "owner": "divnix", - "repo": "data-merge", - "rev": "d160d18ce7b1a45b88344aa3f13ed1163954b497", - "type": "github" - }, - "original": { - "owner": "divnix", - "repo": "data-merge", - "type": "github" - } - }, - "ema": { - "inputs": { - "flake-compat": "flake-compat_8", - "flake-utils": "flake-utils_19", - "nixpkgs": "nixpkgs_16", - "pre-commit-hooks": "pre-commit-hooks" - }, - "locked": { - "lastModified": 1646661767, - "narHash": "sha256-5zxUr3nO4r04K5WGrW/+nW84qbOW8wNJLt902yQmyF4=", - "owner": "srid", - "repo": "ema", - "rev": "bcabc170b7de9cdd83b4bbcf59130b54933602ea", - "type": "github" - }, - "original": { - "owner": "srid", - "repo": "ema", - "type": "github" - } - }, - "ema_2": { - "flake": false, - "locked": { - "lastModified": 1655231448, - "narHash": "sha256-LmAnOFKiqOWW9cQNZCbqFF0N1Mx073908voXz+4Fzic=", - "owner": "srid", - "repo": "ema", - "rev": "da5b29f03c1edfb7f947666a5a818fb97cc3c229", - "type": "github" - }, - "original": { - "owner": "srid", - "ref": "multisite", - "repo": "ema", - "type": "github" - } - }, - "emanote": { - "inputs": { - "ema": "ema_2", - "flake-parts": "flake-parts", - "haskell-flake": "haskell-flake", - "nixpkgs": "nixpkgs_19", - "tailwind-haskell": "tailwind-haskell" - }, - "locked": { - "lastModified": 1655823900, - "narHash": "sha256-YEDJxa2gPf2+GGyrkFz4EliCml1FyDualZtbbZEmljA=", - "owner": "srid", - "repo": "emanote", - "rev": "147528d9df81b881214652ce0cefec0b3d52965e", - "type": "github" - }, - "original": { - "owner": "srid", - "repo": "emanote", - "type": "github" - } - }, - "flake-compat": { - "flake": false, - "locked": { - "lastModified": 1647532380, - "narHash": "sha256-wswAxyO8AJTH7d5oU8VK82yBCpqwA+p6kLgpb1f1PAY=", - "owner": "input-output-hk", - "repo": "flake-compat", - "rev": "7da118186435255a30b5ffeabba9629c344c0bec", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "ref": "fixes", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_10": { - "flake": false, - "locked": { - "lastModified": 1672831974, - "narHash": "sha256-z9k3MfslLjWQfnjBtEtJZdq3H7kyi2kQtUThfTgdRk0=", - "owner": "input-output-hk", - "repo": "flake-compat", - "rev": "45f2638735f8cdc40fe302742b79f248d23eb368", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "ref": "hkm/gitlab-fix", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_11": { - "flake": false, - "locked": { - "lastModified": 1650374568, - "narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "b4a34015c698c7793d592d66adbab377907a2be8", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_2": { - "flake": false, - "locked": { - "lastModified": 1647532380, - "narHash": "sha256-wswAxyO8AJTH7d5oU8VK82yBCpqwA+p6kLgpb1f1PAY=", - "owner": "input-output-hk", - "repo": "flake-compat", - "rev": "7da118186435255a30b5ffeabba9629c344c0bec", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "ref": "fixes", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_3": { - "flake": false, - "locked": { - "lastModified": 1635892615, - "narHash": "sha256-harGbMZr4hzat2BWBU+Y5OYXlu+fVz7E4WeQzHi5o8A=", - "owner": "input-output-hk", - "repo": "flake-compat", - "rev": "eca47d3377946315596da653862d341ee5341318", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_4": { - "flake": false, - "locked": { - "lastModified": 1647532380, - "narHash": "sha256-wswAxyO8AJTH7d5oU8VK82yBCpqwA+p6kLgpb1f1PAY=", - "owner": "input-output-hk", - "repo": "flake-compat", - "rev": "7da118186435255a30b5ffeabba9629c344c0bec", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "ref": "fixes", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_5": { - "flake": false, - "locked": { - "lastModified": 1638445031, - "narHash": "sha256-dtIZLlf2tfYeLvpZa/jFxP5HvfoXAzr7X76yn6FQAdM=", - "owner": "input-output-hk", - "repo": "flake-compat", - "rev": "20f79e3976b76a37090fbeec7b49dc08dac96b8e", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "ref": "fixes", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_6": { - "flake": false, - "locked": { - "lastModified": 1638445031, - "narHash": "sha256-dtIZLlf2tfYeLvpZa/jFxP5HvfoXAzr7X76yn6FQAdM=", - "owner": "input-output-hk", - "repo": "flake-compat", - "rev": "20f79e3976b76a37090fbeec7b49dc08dac96b8e", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "ref": "fixes", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_7": { - "flake": false, - "locked": { - "lastModified": 1638445031, - "narHash": "sha256-dtIZLlf2tfYeLvpZa/jFxP5HvfoXAzr7X76yn6FQAdM=", - "owner": "input-output-hk", - "repo": "flake-compat", - "rev": "20f79e3976b76a37090fbeec7b49dc08dac96b8e", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "ref": "fixes", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_8": { - "flake": false, - "locked": { - "lastModified": 1641205782, - "narHash": "sha256-4jY7RCWUoZ9cKD8co0/4tFARpWB+57+r1bLLvXNJliY=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "b7547d3eed6f32d06102ead8991ec52ab0a4f1a7", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_9": { - "flake": false, - "locked": { - "lastModified": 1635892615, - "narHash": "sha256-harGbMZr4hzat2BWBU+Y5OYXlu+fVz7E4WeQzHi5o8A=", - "owner": "input-output-hk", - "repo": "flake-compat", - "rev": "eca47d3377946315596da653862d341ee5341318", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-parts": { - "inputs": { - "nixpkgs": "nixpkgs_18" - }, - "locked": { - "lastModified": 1655570068, - "narHash": "sha256-KUSd2a6KgYTHd2l3Goee/P+DrAC6n1Tau+7V68czSZU=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "6dbc77b9c0477f8a9a6a9081077bb38c6a3dbb3a", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-utils": { - "locked": { - "lastModified": 1644229661, - "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_10": { - "locked": { - "lastModified": 1623875721, - "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_11": { - "locked": { - "lastModified": 1623875721, - "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_12": { - "locked": { - "lastModified": 1623875721, - "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_13": { - "locked": { - "lastModified": 1623875721, - "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_14": { - "locked": { - "lastModified": 1623875721, - "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_15": { - "locked": { - "lastModified": 1623875721, - "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_16": { - "locked": { - "lastModified": 1623875721, - "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_17": { - "locked": { - "lastModified": 1623875721, - "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_18": { - "locked": { - "lastModified": 1623875721, - "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_19": { - "locked": { - "lastModified": 1642700792, - "narHash": "sha256-XqHrk7hFb+zBvRg6Ghl+AZDq03ov6OshJLiSWOoX5es=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "846b2ae0fc4cc943637d3d1def4454213e203cba", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_2": { - "locked": { - "lastModified": 1644229661, - "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_20": { - "locked": { - "lastModified": 1619345332, - "narHash": "sha256-qHnQkEp1uklKTpx3MvKtY6xzgcqXDsz5nLilbbuL+3A=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "2ebf2558e5bf978c7fb8ea927dfaed8fefab2e28", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_21": { - "locked": { - "lastModified": 1652776076, - "narHash": "sha256-gzTw/v1vj4dOVbpBSJX4J0DwUR6LIyXo7/SuuTJp1kM=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "04c1b180862888302ddfb2e3ad9eaa63afc60cf8", - "type": "github" - }, - "original": { - "owner": "numtide", - "ref": "v1.0.0", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_22": { - "locked": { - "lastModified": 1653893745, - "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_23": { - "locked": { - "lastModified": 1667395993, - "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_24": { - "locked": { - "lastModified": 1678901627, - "narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_25": { - "locked": { - "lastModified": 1653893745, - "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_26": { - "locked": { - "lastModified": 1659877975, - "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_3": { - "locked": { - "lastModified": 1644229661, - "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_4": { - "locked": { - "lastModified": 1623875721, - "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_5": { - "locked": { - "lastModified": 1623875721, - "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_6": { - "locked": { - "lastModified": 1623875721, - "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_7": { - "locked": { - "lastModified": 1623875721, - "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_8": { - "locked": { - "lastModified": 1623875721, - "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_9": { - "locked": { - "lastModified": 1623875721, - "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "ghc-8.6.5-iohk": { - "flake": false, - "locked": { - "lastModified": 1600920045, - "narHash": "sha256-DO6kxJz248djebZLpSzTGD6s8WRpNI9BTwUeOf5RwY8=", - "owner": "input-output-hk", - "repo": "ghc", - "rev": "95713a6ecce4551240da7c96b6176f980af75cae", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "ref": "release/8.6.5-iohk", - "repo": "ghc", - "type": "github" - } - }, - "ghc-8.6.5-iohk_10": { - "flake": false, - "locked": { - "lastModified": 1600920045, - "narHash": "sha256-DO6kxJz248djebZLpSzTGD6s8WRpNI9BTwUeOf5RwY8=", - "owner": "input-output-hk", - "repo": "ghc", - "rev": "95713a6ecce4551240da7c96b6176f980af75cae", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "ref": "release/8.6.5-iohk", - "repo": "ghc", - "type": "github" - } - }, - "ghc-8.6.5-iohk_11": { - "flake": false, - "locked": { - "lastModified": 1600920045, - "narHash": "sha256-DO6kxJz248djebZLpSzTGD6s8WRpNI9BTwUeOf5RwY8=", - "owner": "input-output-hk", - "repo": "ghc", - "rev": "95713a6ecce4551240da7c96b6176f980af75cae", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "ref": "release/8.6.5-iohk", - "repo": "ghc", - "type": "github" - } - }, - "ghc-8.6.5-iohk_12": { - "flake": false, - "locked": { - "lastModified": 1600920045, - "narHash": "sha256-DO6kxJz248djebZLpSzTGD6s8WRpNI9BTwUeOf5RwY8=", - "owner": "input-output-hk", - "repo": "ghc", - "rev": "95713a6ecce4551240da7c96b6176f980af75cae", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "ref": "release/8.6.5-iohk", - "repo": "ghc", - "type": "github" - } - }, - "ghc-8.6.5-iohk_13": { - "flake": false, - "locked": { - "lastModified": 1600920045, - "narHash": "sha256-DO6kxJz248djebZLpSzTGD6s8WRpNI9BTwUeOf5RwY8=", - "owner": "input-output-hk", - "repo": "ghc", - "rev": "95713a6ecce4551240da7c96b6176f980af75cae", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "ref": "release/8.6.5-iohk", - "repo": "ghc", - "type": "github" - } - }, - "ghc-8.6.5-iohk_14": { - "flake": false, - "locked": { - "lastModified": 1600920045, - "narHash": "sha256-DO6kxJz248djebZLpSzTGD6s8WRpNI9BTwUeOf5RwY8=", - "owner": "input-output-hk", - "repo": "ghc", - "rev": "95713a6ecce4551240da7c96b6176f980af75cae", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "ref": "release/8.6.5-iohk", - "repo": "ghc", - "type": "github" - } - }, - "ghc-8.6.5-iohk_15": { - "flake": false, - "locked": { - "lastModified": 1600920045, - "narHash": "sha256-DO6kxJz248djebZLpSzTGD6s8WRpNI9BTwUeOf5RwY8=", - "owner": "input-output-hk", - "repo": "ghc", - "rev": "95713a6ecce4551240da7c96b6176f980af75cae", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "ref": "release/8.6.5-iohk", - "repo": "ghc", - "type": "github" - } - }, - "ghc-8.6.5-iohk_16": { - "flake": false, - "locked": { - "lastModified": 1600920045, - "narHash": "sha256-DO6kxJz248djebZLpSzTGD6s8WRpNI9BTwUeOf5RwY8=", - "owner": "input-output-hk", - "repo": "ghc", - "rev": "95713a6ecce4551240da7c96b6176f980af75cae", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "ref": "release/8.6.5-iohk", - "repo": "ghc", - "type": "github" - } - }, - "ghc-8.6.5-iohk_17": { - "flake": false, - "locked": { - "lastModified": 1600920045, - "narHash": "sha256-DO6kxJz248djebZLpSzTGD6s8WRpNI9BTwUeOf5RwY8=", - "owner": "input-output-hk", - "repo": "ghc", - "rev": "95713a6ecce4551240da7c96b6176f980af75cae", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "ref": "release/8.6.5-iohk", - "repo": "ghc", - "type": "github" - } - }, - "ghc-8.6.5-iohk_18": { - "flake": false, - "locked": { - "lastModified": 1600920045, - "narHash": "sha256-DO6kxJz248djebZLpSzTGD6s8WRpNI9BTwUeOf5RwY8=", - "owner": "input-output-hk", - "repo": "ghc", - "rev": "95713a6ecce4551240da7c96b6176f980af75cae", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "ref": "release/8.6.5-iohk", - "repo": "ghc", - "type": "github" - } - }, - "ghc-8.6.5-iohk_19": { - "flake": false, - "locked": { - "lastModified": 1600920045, - "narHash": "sha256-DO6kxJz248djebZLpSzTGD6s8WRpNI9BTwUeOf5RwY8=", - "owner": "input-output-hk", - "repo": "ghc", - "rev": "95713a6ecce4551240da7c96b6176f980af75cae", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "ref": "release/8.6.5-iohk", - "repo": "ghc", - "type": "github" - } - }, - "ghc-8.6.5-iohk_2": { - "flake": false, - "locked": { - "lastModified": 1600920045, - "narHash": "sha256-DO6kxJz248djebZLpSzTGD6s8WRpNI9BTwUeOf5RwY8=", - "owner": "input-output-hk", - "repo": "ghc", - "rev": "95713a6ecce4551240da7c96b6176f980af75cae", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "ref": "release/8.6.5-iohk", - "repo": "ghc", - "type": "github" - } - }, - "ghc-8.6.5-iohk_3": { - "flake": false, - "locked": { - "lastModified": 1600920045, - "narHash": "sha256-DO6kxJz248djebZLpSzTGD6s8WRpNI9BTwUeOf5RwY8=", - "owner": "input-output-hk", - "repo": "ghc", - "rev": "95713a6ecce4551240da7c96b6176f980af75cae", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "ref": "release/8.6.5-iohk", - "repo": "ghc", - "type": "github" - } - }, - "ghc-8.6.5-iohk_4": { - "flake": false, - "locked": { - "lastModified": 1600920045, - "narHash": "sha256-DO6kxJz248djebZLpSzTGD6s8WRpNI9BTwUeOf5RwY8=", - "owner": "input-output-hk", - "repo": "ghc", - "rev": "95713a6ecce4551240da7c96b6176f980af75cae", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "ref": "release/8.6.5-iohk", - "repo": "ghc", - "type": "github" - } - }, - "ghc-8.6.5-iohk_5": { - "flake": false, - "locked": { - "lastModified": 1600920045, - "narHash": "sha256-DO6kxJz248djebZLpSzTGD6s8WRpNI9BTwUeOf5RwY8=", - "owner": "input-output-hk", - "repo": "ghc", - "rev": "95713a6ecce4551240da7c96b6176f980af75cae", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "ref": "release/8.6.5-iohk", - "repo": "ghc", - "type": "github" - } - }, - "ghc-8.6.5-iohk_6": { - "flake": false, - "locked": { - "lastModified": 1600920045, - "narHash": "sha256-DO6kxJz248djebZLpSzTGD6s8WRpNI9BTwUeOf5RwY8=", - "owner": "input-output-hk", - "repo": "ghc", - "rev": "95713a6ecce4551240da7c96b6176f980af75cae", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "ref": "release/8.6.5-iohk", - "repo": "ghc", - "type": "github" - } - }, - "ghc-8.6.5-iohk_7": { - "flake": false, - "locked": { - "lastModified": 1600920045, - "narHash": "sha256-DO6kxJz248djebZLpSzTGD6s8WRpNI9BTwUeOf5RwY8=", - "owner": "input-output-hk", - "repo": "ghc", - "rev": "95713a6ecce4551240da7c96b6176f980af75cae", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "ref": "release/8.6.5-iohk", - "repo": "ghc", - "type": "github" - } - }, - "ghc-8.6.5-iohk_8": { - "flake": false, - "locked": { - "lastModified": 1600920045, - "narHash": "sha256-DO6kxJz248djebZLpSzTGD6s8WRpNI9BTwUeOf5RwY8=", - "owner": "input-output-hk", - "repo": "ghc", - "rev": "95713a6ecce4551240da7c96b6176f980af75cae", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "ref": "release/8.6.5-iohk", - "repo": "ghc", - "type": "github" - } - }, - "ghc-8.6.5-iohk_9": { - "flake": false, - "locked": { - "lastModified": 1600920045, - "narHash": "sha256-DO6kxJz248djebZLpSzTGD6s8WRpNI9BTwUeOf5RwY8=", - "owner": "input-output-hk", - "repo": "ghc", - "rev": "95713a6ecce4551240da7c96b6176f980af75cae", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "ref": "release/8.6.5-iohk", - "repo": "ghc", - "type": "github" - } - }, - "gomod2nix": { - "inputs": { - "nixpkgs": "nixpkgs_22", - "utils": "utils_19" - }, - "locked": { - "lastModified": 1655245309, - "narHash": "sha256-d/YPoQ/vFn1+GTmSdvbSBSTOai61FONxB4+Lt6w/IVI=", - "owner": "tweag", - "repo": "gomod2nix", - "rev": "40d32f82fc60d66402eb0972e6e368aeab3faf58", - "type": "github" - }, - "original": { - "owner": "tweag", - "repo": "gomod2nix", - "type": "github" - } - }, - "hackage": { - "flake": false, - "locked": { - "lastModified": 1648689423, - "narHash": "sha256-5zEPRdHArPtFv/6gRVZXcxG2Wps5qoUAxBjbxd7UjQ4=", - "owner": "input-output-hk", - "repo": "hackage.nix", - "rev": "aa3358e56f0184f636254ed8124275c84e66c43b", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "hackage.nix", - "type": "github" - } - }, - "hackageNix": { - "flake": false, - "locked": { - "lastModified": 1665882657, - "narHash": "sha256-3eiHY9Lt2vTeMsrT6yssbd+nfx/i5avfxosigx7bCxU=", - "owner": "input-output-hk", - "repo": "hackage.nix", - "rev": "8e5b6856f99ed790c387fa76bdad9dcc94b3a54c", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "hackage.nix", - "type": "github" - } - }, - "hackage_10": { - "flake": false, - "locked": { - "lastModified": 1643073363, - "narHash": "sha256-66oSXQKEDIOSQ2uKAS9facCX/Zuh/jFgyFDtxEqN9sk=", - "owner": "input-output-hk", - "repo": "hackage.nix", - "rev": "4ef9bd3a32316ce236164c7ebff00ebeb33236e2", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "hackage.nix", - "type": "github" - } - }, - "hackage_11": { - "flake": false, - "locked": { - "lastModified": 1639098768, - "narHash": "sha256-DZ4sG8FeDxWvBLixrj0jELXjtebZ0SCCPmQW43HNzIE=", - "owner": "input-output-hk", - "repo": "hackage.nix", - "rev": "c7b123af6b0b9b364cab03363504d42dca16a4b5", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "hackage.nix", - "type": "github" - } - }, - "hackage_12": { - "flake": false, - "locked": { - "lastModified": 1643073363, - "narHash": "sha256-66oSXQKEDIOSQ2uKAS9facCX/Zuh/jFgyFDtxEqN9sk=", - "owner": "input-output-hk", - "repo": "hackage.nix", - "rev": "4ef9bd3a32316ce236164c7ebff00ebeb33236e2", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "hackage.nix", - "type": "github" - } - }, - "hackage_13": { - "flake": false, - "locked": { - "lastModified": 1643073363, - "narHash": "sha256-66oSXQKEDIOSQ2uKAS9facCX/Zuh/jFgyFDtxEqN9sk=", - "owner": "input-output-hk", - "repo": "hackage.nix", - "rev": "4ef9bd3a32316ce236164c7ebff00ebeb33236e2", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "hackage.nix", - "type": "github" - } - }, - "hackage_14": { - "flake": false, - "locked": { - "lastModified": 1639098768, - "narHash": "sha256-DZ4sG8FeDxWvBLixrj0jELXjtebZ0SCCPmQW43HNzIE=", - "owner": "input-output-hk", - "repo": "hackage.nix", - "rev": "c7b123af6b0b9b364cab03363504d42dca16a4b5", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "hackage.nix", - "type": "github" - } - }, - "hackage_15": { - "flake": false, - "locked": { - "lastModified": 1643073363, - "narHash": "sha256-66oSXQKEDIOSQ2uKAS9facCX/Zuh/jFgyFDtxEqN9sk=", - "owner": "input-output-hk", - "repo": "hackage.nix", - "rev": "4ef9bd3a32316ce236164c7ebff00ebeb33236e2", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "hackage.nix", - "type": "github" - } - }, - "hackage_16": { - "flake": false, - "locked": { - "lastModified": 1643073363, - "narHash": "sha256-66oSXQKEDIOSQ2uKAS9facCX/Zuh/jFgyFDtxEqN9sk=", - "owner": "input-output-hk", - "repo": "hackage.nix", - "rev": "4ef9bd3a32316ce236164c7ebff00ebeb33236e2", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "hackage.nix", - "type": "github" - } - }, - "hackage_17": { - "flake": false, - "locked": { - "lastModified": 1639098768, - "narHash": "sha256-DZ4sG8FeDxWvBLixrj0jELXjtebZ0SCCPmQW43HNzIE=", - "owner": "input-output-hk", - "repo": "hackage.nix", - "rev": "c7b123af6b0b9b364cab03363504d42dca16a4b5", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "hackage.nix", - "type": "github" - } - }, - "hackage_18": { - "flake": false, - "locked": { - "lastModified": 1678753597, - "narHash": "sha256-u+m4eGVCtj92I0RVXyS8sLxPqmqjTTK4/QE8FgYJHfc=", - "owner": "input-output-hk", - "repo": "hackage.nix", - "rev": "fc76032f699f69d2cfd65c147ba1ed480e278f1b", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "hackage.nix", - "type": "github" - } - }, - "hackage_2": { - "flake": false, - "locked": { - "lastModified": 1648084640, - "narHash": "sha256-VZtCnrP+pQX/t1u1faiPppDq3R6siaxFlfYN/IRyETY=", - "owner": "input-output-hk", - "repo": "hackage.nix", - "rev": "e7a26675f853b5c206256bcabeed4f8c1153ba99", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "hackage.nix", - "type": "github" - } - }, - "hackage_3": { - "flake": false, - "locked": { - "lastModified": 1643073363, - "narHash": "sha256-66oSXQKEDIOSQ2uKAS9facCX/Zuh/jFgyFDtxEqN9sk=", - "owner": "input-output-hk", - "repo": "hackage.nix", - "rev": "4ef9bd3a32316ce236164c7ebff00ebeb33236e2", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "hackage.nix", - "type": "github" - } - }, - "hackage_4": { - "flake": false, - "locked": { - "lastModified": 1643073363, - "narHash": "sha256-66oSXQKEDIOSQ2uKAS9facCX/Zuh/jFgyFDtxEqN9sk=", - "owner": "input-output-hk", - "repo": "hackage.nix", - "rev": "4ef9bd3a32316ce236164c7ebff00ebeb33236e2", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "hackage.nix", - "type": "github" - } - }, - "hackage_5": { - "flake": false, - "locked": { - "lastModified": 1643073363, - "narHash": "sha256-66oSXQKEDIOSQ2uKAS9facCX/Zuh/jFgyFDtxEqN9sk=", - "owner": "input-output-hk", - "repo": "hackage.nix", - "rev": "4ef9bd3a32316ce236164c7ebff00ebeb33236e2", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "hackage.nix", - "type": "github" - } - }, - "hackage_6": { - "flake": false, - "locked": { - "lastModified": 1643073363, - "narHash": "sha256-66oSXQKEDIOSQ2uKAS9facCX/Zuh/jFgyFDtxEqN9sk=", - "owner": "input-output-hk", - "repo": "hackage.nix", - "rev": "4ef9bd3a32316ce236164c7ebff00ebeb33236e2", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "hackage.nix", - "type": "github" - } - }, - "hackage_7": { - "flake": false, - "locked": { - "lastModified": 1639098768, - "narHash": "sha256-DZ4sG8FeDxWvBLixrj0jELXjtebZ0SCCPmQW43HNzIE=", - "owner": "input-output-hk", - "repo": "hackage.nix", - "rev": "c7b123af6b0b9b364cab03363504d42dca16a4b5", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "hackage.nix", - "type": "github" - } - }, - "hackage_8": { - "flake": false, - "locked": { - "lastModified": 1643073363, - "narHash": "sha256-66oSXQKEDIOSQ2uKAS9facCX/Zuh/jFgyFDtxEqN9sk=", - "owner": "input-output-hk", - "repo": "hackage.nix", - "rev": "4ef9bd3a32316ce236164c7ebff00ebeb33236e2", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "hackage.nix", - "type": "github" - } - }, - "hackage_9": { - "flake": false, - "locked": { - "lastModified": 1643073363, - "narHash": "sha256-66oSXQKEDIOSQ2uKAS9facCX/Zuh/jFgyFDtxEqN9sk=", - "owner": "input-output-hk", - "repo": "hackage.nix", - "rev": "4ef9bd3a32316ce236164c7ebff00ebeb33236e2", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "hackage.nix", - "type": "github" - } - }, - "haskell-flake": { - "locked": { - "lastModified": 1654001497, - "narHash": "sha256-GfrpyoQrVT9Z/j9its8BQs3I5O5X5Lc2IkK922bz7zg=", - "owner": "srid", - "repo": "haskell-flake", - "rev": "4c0b0ff295f0b97238a600d2381c37ee46b67f9c", - "type": "github" - }, - "original": { - "owner": "srid", - "repo": "haskell-flake", - "type": "github" - } - }, - "haskellNix": { - "inputs": { - "HTTP": "HTTP", - "cabal-32": "cabal-32", - "cabal-34": "cabal-34", - "cabal-36": "cabal-36", - "cardano-shell": "cardano-shell", - "flake-utils": "flake-utils", - "ghc-8.6.5-iohk": "ghc-8.6.5-iohk", - "hackage": "hackage", - "hpc-coveralls": "hpc-coveralls", - "hydra": "hydra", - "nix-tools": "nix-tools", - "nixpkgs": [ - "cardano-node-1_35_4", - "cardano-node-workbench", - "nixpkgs" - ], - "nixpkgs-2003": "nixpkgs-2003", - "nixpkgs-2105": "nixpkgs-2105", - "nixpkgs-2111": "nixpkgs-2111", - "nixpkgs-unstable": "nixpkgs-unstable", - "old-ghc-nix": "old-ghc-nix", - "stackage": "stackage" - }, - "locked": { - "lastModified": 1648689547, - "narHash": "sha256-ea8Celj9aPb1HG8mGNorqMr5+3xZzjuhjF89Mj4hSLU=", - "owner": "input-output-hk", - "repo": "haskell.nix", - "rev": "3fbb17e63c4e052c8289858fa6444d1c66ab6f52", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "haskell.nix", - "type": "github" - } - }, - "haskellNix_10": { - "inputs": { - "HTTP": "HTTP_10", - "cabal-32": "cabal-32_10", - "cabal-34": "cabal-34_10", - "cabal-36": "cabal-36_9", - "cardano-shell": "cardano-shell_10", - "flake-utils": "flake-utils_10", - "ghc-8.6.5-iohk": "ghc-8.6.5-iohk_10", - "hackage": "hackage_9", - "hpc-coveralls": "hpc-coveralls_10", - "nix-tools": "nix-tools_9", - "nixpkgs": [ - "cardano-node-1_35_4", - "node-measured", - "node-process", - "membench", - "cardano-node-snapshot", - "nixpkgs" - ], - "nixpkgs-2003": "nixpkgs-2003_10", - "nixpkgs-2105": "nixpkgs-2105_10", - "nixpkgs-2111": "nixpkgs-2111_10", - "nixpkgs-unstable": "nixpkgs-unstable_10", - "old-ghc-nix": "old-ghc-nix_10", - "stackage": "stackage_10" - }, - "locked": { - "lastModified": 1643073543, - "narHash": "sha256-g2l/KDWzMRTFRugNVcx3CPZeyA5BNcH9/zDiqFpprB4=", - "owner": "input-output-hk", - "repo": "haskell.nix", - "rev": "14f740c7c8f535581c30b1697018e389680e24cb", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "haskell.nix", - "type": "github" - } - }, - "haskellNix_11": { - "inputs": { - "HTTP": "HTTP_11", - "cabal-32": "cabal-32_11", - "cabal-34": "cabal-34_11", - "cabal-36": "cabal-36_10", - "cardano-shell": "cardano-shell_11", - "flake-utils": "flake-utils_11", - "ghc-8.6.5-iohk": "ghc-8.6.5-iohk_11", - "hackage": "hackage_10", - "hpc-coveralls": "hpc-coveralls_11", - "nix-tools": "nix-tools_10", - "nixpkgs": [ - "cardano-node-1_35_4", - "node-measured", - "node-process", - "membench", - "cardano-node-snapshot", - "membench", - "cardano-node-snapshot", - "nixpkgs" - ], - "nixpkgs-2003": "nixpkgs-2003_11", - "nixpkgs-2105": "nixpkgs-2105_11", - "nixpkgs-2111": "nixpkgs-2111_11", - "nixpkgs-unstable": "nixpkgs-unstable_11", - "old-ghc-nix": "old-ghc-nix_11", - "stackage": "stackage_11" - }, - "locked": { - "lastModified": 1643073543, - "narHash": "sha256-g2l/KDWzMRTFRugNVcx3CPZeyA5BNcH9/zDiqFpprB4=", - "owner": "input-output-hk", - "repo": "haskell.nix", - "rev": "14f740c7c8f535581c30b1697018e389680e24cb", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "haskell.nix", - "type": "github" - } - }, - "haskellNix_12": { - "inputs": { - "HTTP": "HTTP_12", - "cabal-32": "cabal-32_12", - "cabal-34": "cabal-34_12", - "cardano-shell": "cardano-shell_12", - "flake-utils": "flake-utils_12", - "ghc-8.6.5-iohk": "ghc-8.6.5-iohk_12", - "hackage": "hackage_11", - "hpc-coveralls": "hpc-coveralls_12", - "nix-tools": "nix-tools_11", - "nixpkgs": [ - "cardano-node-1_35_4", - "node-measured", - "node-process", - "membench", - "cardano-node-snapshot", - "plutus-example", - "nixpkgs" - ], - "nixpkgs-2003": "nixpkgs-2003_12", - "nixpkgs-2105": "nixpkgs-2105_12", - "nixpkgs-2111": "nixpkgs-2111_12", - "nixpkgs-unstable": "nixpkgs-unstable_12", - "old-ghc-nix": "old-ghc-nix_12", - "stackage": "stackage_12" - }, - "locked": { - "lastModified": 1639098904, - "narHash": "sha256-7VrCNEaKGLm4pTOS11dt1dRL2033oqrNCfal0uONsqA=", - "owner": "input-output-hk", - "repo": "haskell.nix", - "rev": "b18c6ce0867fee77f12ecf41dc6c67f7a59d9826", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "haskell.nix", - "type": "github" - } - }, - "haskellNix_13": { - "inputs": { - "HTTP": "HTTP_13", - "cabal-32": "cabal-32_13", - "cabal-34": "cabal-34_13", - "cabal-36": "cabal-36_11", - "cardano-shell": "cardano-shell_13", - "flake-utils": "flake-utils_13", - "ghc-8.6.5-iohk": "ghc-8.6.5-iohk_13", - "hackage": "hackage_12", - "hpc-coveralls": "hpc-coveralls_13", - "nix-tools": "nix-tools_12", - "nixpkgs": [ - "cardano-node-1_35_4", - "node-measured", - "node-snapshot", - "nixpkgs" - ], - "nixpkgs-2003": "nixpkgs-2003_13", - "nixpkgs-2105": "nixpkgs-2105_13", - "nixpkgs-2111": "nixpkgs-2111_13", - "nixpkgs-unstable": "nixpkgs-unstable_13", - "old-ghc-nix": "old-ghc-nix_13", - "stackage": "stackage_13" - }, - "locked": { - "lastModified": 1643073543, - "narHash": "sha256-g2l/KDWzMRTFRugNVcx3CPZeyA5BNcH9/zDiqFpprB4=", - "owner": "input-output-hk", - "repo": "haskell.nix", - "rev": "14f740c7c8f535581c30b1697018e389680e24cb", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "haskell.nix", - "type": "github" - } - }, - "haskellNix_14": { - "inputs": { - "HTTP": "HTTP_14", - "cabal-32": "cabal-32_14", - "cabal-34": "cabal-34_14", - "cabal-36": "cabal-36_12", - "cardano-shell": "cardano-shell_14", - "flake-utils": "flake-utils_14", - "ghc-8.6.5-iohk": "ghc-8.6.5-iohk_14", - "hackage": "hackage_13", - "hpc-coveralls": "hpc-coveralls_14", - "nix-tools": "nix-tools_13", - "nixpkgs": [ - "cardano-node-1_35_4", - "node-measured", - "node-snapshot", - "membench", - "cardano-node-snapshot", - "nixpkgs" - ], - "nixpkgs-2003": "nixpkgs-2003_14", - "nixpkgs-2105": "nixpkgs-2105_14", - "nixpkgs-2111": "nixpkgs-2111_14", - "nixpkgs-unstable": "nixpkgs-unstable_14", - "old-ghc-nix": "old-ghc-nix_14", - "stackage": "stackage_14" - }, - "locked": { - "lastModified": 1643073543, - "narHash": "sha256-g2l/KDWzMRTFRugNVcx3CPZeyA5BNcH9/zDiqFpprB4=", - "owner": "input-output-hk", - "repo": "haskell.nix", - "rev": "14f740c7c8f535581c30b1697018e389680e24cb", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "haskell.nix", - "type": "github" - } - }, - "haskellNix_15": { - "inputs": { - "HTTP": "HTTP_15", - "cabal-32": "cabal-32_15", - "cabal-34": "cabal-34_15", - "cardano-shell": "cardano-shell_15", - "flake-utils": "flake-utils_15", - "ghc-8.6.5-iohk": "ghc-8.6.5-iohk_15", - "hackage": "hackage_14", - "hpc-coveralls": "hpc-coveralls_15", - "nix-tools": "nix-tools_14", - "nixpkgs": [ - "cardano-node-1_35_4", - "node-measured", - "node-snapshot", - "plutus-example", - "nixpkgs" - ], - "nixpkgs-2003": "nixpkgs-2003_15", - "nixpkgs-2105": "nixpkgs-2105_15", - "nixpkgs-2111": "nixpkgs-2111_15", - "nixpkgs-unstable": "nixpkgs-unstable_15", - "old-ghc-nix": "old-ghc-nix_15", - "stackage": "stackage_15" - }, - "locked": { - "lastModified": 1639098904, - "narHash": "sha256-7VrCNEaKGLm4pTOS11dt1dRL2033oqrNCfal0uONsqA=", - "owner": "input-output-hk", - "repo": "haskell.nix", - "rev": "b18c6ce0867fee77f12ecf41dc6c67f7a59d9826", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "haskell.nix", - "type": "github" - } - }, - "haskellNix_16": { - "inputs": { - "HTTP": "HTTP_16", - "cabal-32": "cabal-32_16", - "cabal-34": "cabal-34_16", - "cabal-36": "cabal-36_13", - "cardano-shell": "cardano-shell_16", - "flake-utils": "flake-utils_16", - "ghc-8.6.5-iohk": "ghc-8.6.5-iohk_16", - "hackage": "hackage_15", - "hpc-coveralls": "hpc-coveralls_16", - "nix-tools": "nix-tools_15", - "nixpkgs": [ - "cardano-node-1_35_4", - "node-snapshot", - "nixpkgs" - ], - "nixpkgs-2003": "nixpkgs-2003_16", - "nixpkgs-2105": "nixpkgs-2105_16", - "nixpkgs-2111": "nixpkgs-2111_16", - "nixpkgs-unstable": "nixpkgs-unstable_16", - "old-ghc-nix": "old-ghc-nix_16", - "stackage": "stackage_16" - }, - "locked": { - "lastModified": 1643073543, - "narHash": "sha256-g2l/KDWzMRTFRugNVcx3CPZeyA5BNcH9/zDiqFpprB4=", - "owner": "input-output-hk", - "repo": "haskell.nix", - "rev": "14f740c7c8f535581c30b1697018e389680e24cb", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "haskell.nix", - "type": "github" - } - }, - "haskellNix_17": { - "inputs": { - "HTTP": "HTTP_17", - "cabal-32": "cabal-32_17", - "cabal-34": "cabal-34_17", - "cabal-36": "cabal-36_14", - "cardano-shell": "cardano-shell_17", - "flake-utils": "flake-utils_17", - "ghc-8.6.5-iohk": "ghc-8.6.5-iohk_17", - "hackage": "hackage_16", - "hpc-coveralls": "hpc-coveralls_17", - "nix-tools": "nix-tools_16", - "nixpkgs": [ - "cardano-node-1_35_4", - "node-snapshot", - "membench", - "cardano-node-snapshot", - "nixpkgs" - ], - "nixpkgs-2003": "nixpkgs-2003_17", - "nixpkgs-2105": "nixpkgs-2105_17", - "nixpkgs-2111": "nixpkgs-2111_17", - "nixpkgs-unstable": "nixpkgs-unstable_17", - "old-ghc-nix": "old-ghc-nix_17", - "stackage": "stackage_17" - }, - "locked": { - "lastModified": 1643073543, - "narHash": "sha256-g2l/KDWzMRTFRugNVcx3CPZeyA5BNcH9/zDiqFpprB4=", - "owner": "input-output-hk", - "repo": "haskell.nix", - "rev": "14f740c7c8f535581c30b1697018e389680e24cb", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "haskell.nix", - "type": "github" - } - }, - "haskellNix_18": { - "inputs": { - "HTTP": "HTTP_18", - "cabal-32": "cabal-32_18", - "cabal-34": "cabal-34_18", - "cardano-shell": "cardano-shell_18", - "flake-utils": "flake-utils_18", - "ghc-8.6.5-iohk": "ghc-8.6.5-iohk_18", - "hackage": "hackage_17", - "hpc-coveralls": "hpc-coveralls_18", - "nix-tools": "nix-tools_17", - "nixpkgs": [ - "cardano-node-1_35_4", - "node-snapshot", - "plutus-example", - "nixpkgs" - ], - "nixpkgs-2003": "nixpkgs-2003_18", - "nixpkgs-2105": "nixpkgs-2105_18", - "nixpkgs-2111": "nixpkgs-2111_18", - "nixpkgs-unstable": "nixpkgs-unstable_18", - "old-ghc-nix": "old-ghc-nix_18", - "stackage": "stackage_18" - }, - "locked": { - "lastModified": 1639098904, - "narHash": "sha256-7VrCNEaKGLm4pTOS11dt1dRL2033oqrNCfal0uONsqA=", - "owner": "input-output-hk", - "repo": "haskell.nix", - "rev": "b18c6ce0867fee77f12ecf41dc6c67f7a59d9826", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "haskell.nix", - "type": "github" - } - }, - "haskellNix_19": { - "inputs": { - "HTTP": "HTTP_19", - "cabal-32": "cabal-32_19", - "cabal-34": "cabal-34_19", - "cabal-36": "cabal-36_15", - "cardano-shell": "cardano-shell_19", - "flake-compat": "flake-compat_10", - "flake-utils": "flake-utils_23", - "ghc-8.6.5-iohk": "ghc-8.6.5-iohk_19", - "hackage": [ - "hackage" - ], - "hpc-coveralls": "hpc-coveralls_19", - "hydra": "hydra_4", - "iserv-proxy": "iserv-proxy", - "nixpkgs": [ - "nixpkgs" - ], - "nixpkgs-2003": "nixpkgs-2003_19", - "nixpkgs-2105": "nixpkgs-2105_19", - "nixpkgs-2111": "nixpkgs-2111_19", - "nixpkgs-2205": "nixpkgs-2205_2", - "nixpkgs-2211": "nixpkgs-2211", - "nixpkgs-unstable": "nixpkgs-unstable_19", - "old-ghc-nix": "old-ghc-nix_19", - "stackage": "stackage_19", - "tullia": "tullia" - }, - "locked": { - "lastModified": 1678755032, - "narHash": "sha256-Yqd87Mqm3v3g1q1hazCS2QodlhdlVY6IWARcFcxZJPw=", - "owner": "input-output-hk", - "repo": "haskell.nix", - "rev": "dc1f4d33dd7b880f1ab112cad62a7ec20ee46e47", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "haskell.nix", - "type": "github" - } - }, - "haskellNix_2": { - "inputs": { - "HTTP": "HTTP_2", - "cabal-32": "cabal-32_2", - "cabal-34": "cabal-34_2", - "cabal-36": "cabal-36_2", - "cardano-shell": "cardano-shell_2", - "flake-compat": "flake-compat_3", - "flake-utils": "flake-utils_2", - "ghc-8.6.5-iohk": "ghc-8.6.5-iohk_2", - "hackage": [ - "cardano-node-1_35_4", - "hackageNix" - ], - "hpc-coveralls": "hpc-coveralls_2", - "hydra": "hydra_2", - "nixpkgs": [ - "cardano-node-1_35_4", - "nixpkgs" - ], - "nixpkgs-2003": "nixpkgs-2003_2", - "nixpkgs-2105": "nixpkgs-2105_2", - "nixpkgs-2111": "nixpkgs-2111_2", - "nixpkgs-2205": "nixpkgs-2205", - "nixpkgs-unstable": "nixpkgs-unstable_2", - "old-ghc-nix": "old-ghc-nix_2", - "stackage": "stackage_2" - }, - "locked": { - "lastModified": 1665882789, - "narHash": "sha256-vD9voCqq4F100RDO3KlfdKZE81NyD++NJjvf3KNNbHA=", - "owner": "input-output-hk", - "repo": "haskell.nix", - "rev": "9af167fb4343539ca99465057262f289b44f55da", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "haskell.nix", - "type": "github" - } - }, - "haskellNix_3": { - "inputs": { - "HTTP": "HTTP_3", - "cabal-32": "cabal-32_3", - "cabal-34": "cabal-34_3", - "cabal-36": "cabal-36_3", - "cardano-shell": "cardano-shell_3", - "flake-utils": "flake-utils_3", - "ghc-8.6.5-iohk": "ghc-8.6.5-iohk_3", - "hackage": "hackage_2", - "hpc-coveralls": "hpc-coveralls_3", - "hydra": "hydra_3", - "nix-tools": "nix-tools_2", - "nixpkgs": [ - "cardano-node-1_35_4", - "node-measured", - "cardano-node-workbench", - "nixpkgs" - ], - "nixpkgs-2003": "nixpkgs-2003_3", - "nixpkgs-2105": "nixpkgs-2105_3", - "nixpkgs-2111": "nixpkgs-2111_3", - "nixpkgs-unstable": "nixpkgs-unstable_3", - "old-ghc-nix": "old-ghc-nix_3", - "stackage": "stackage_3" - }, - "locked": { - "lastModified": 1648084808, - "narHash": "sha256-o6nWoBaYhd+AMVJPravY8Z10HGP1ILx8tU6YcIaUQ9M=", - "owner": "input-output-hk", - "repo": "haskell.nix", - "rev": "7ae4953cff38a84d6f5f94a3f5648edf1ce84705", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "haskell.nix", - "type": "github" - } - }, - "haskellNix_4": { - "inputs": { - "HTTP": "HTTP_4", - "cabal-32": "cabal-32_4", - "cabal-34": "cabal-34_4", - "cabal-36": "cabal-36_4", - "cardano-shell": "cardano-shell_4", - "flake-utils": "flake-utils_4", - "ghc-8.6.5-iohk": "ghc-8.6.5-iohk_4", - "hackage": "hackage_3", - "hpc-coveralls": "hpc-coveralls_4", - "nix-tools": "nix-tools_3", - "nixpkgs": [ - "cardano-node-1_35_4", - "node-measured", - "nixpkgs" - ], - "nixpkgs-2003": "nixpkgs-2003_4", - "nixpkgs-2105": "nixpkgs-2105_4", - "nixpkgs-2111": "nixpkgs-2111_4", - "nixpkgs-unstable": "nixpkgs-unstable_4", - "old-ghc-nix": "old-ghc-nix_4", - "stackage": "stackage_4" - }, - "locked": { - "lastModified": 1643073543, - "narHash": "sha256-g2l/KDWzMRTFRugNVcx3CPZeyA5BNcH9/zDiqFpprB4=", - "owner": "input-output-hk", - "repo": "haskell.nix", - "rev": "14f740c7c8f535581c30b1697018e389680e24cb", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "haskell.nix", - "type": "github" - } - }, - "haskellNix_5": { - "inputs": { - "HTTP": "HTTP_5", - "cabal-32": "cabal-32_5", - "cabal-34": "cabal-34_5", - "cabal-36": "cabal-36_5", - "cardano-shell": "cardano-shell_5", - "flake-utils": "flake-utils_5", - "ghc-8.6.5-iohk": "ghc-8.6.5-iohk_5", - "hackage": "hackage_4", - "hpc-coveralls": "hpc-coveralls_5", - "nix-tools": "nix-tools_4", - "nixpkgs": [ - "cardano-node-1_35_4", - "node-measured", - "node-measured", - "nixpkgs" - ], - "nixpkgs-2003": "nixpkgs-2003_5", - "nixpkgs-2105": "nixpkgs-2105_5", - "nixpkgs-2111": "nixpkgs-2111_5", - "nixpkgs-unstable": "nixpkgs-unstable_5", - "old-ghc-nix": "old-ghc-nix_5", - "stackage": "stackage_5" - }, - "locked": { - "lastModified": 1643073543, - "narHash": "sha256-g2l/KDWzMRTFRugNVcx3CPZeyA5BNcH9/zDiqFpprB4=", - "owner": "input-output-hk", - "repo": "haskell.nix", - "rev": "14f740c7c8f535581c30b1697018e389680e24cb", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "haskell.nix", - "type": "github" - } - }, - "haskellNix_6": { - "inputs": { - "HTTP": "HTTP_6", - "cabal-32": "cabal-32_6", - "cabal-34": "cabal-34_6", - "cabal-36": "cabal-36_6", - "cardano-shell": "cardano-shell_6", - "flake-utils": "flake-utils_6", - "ghc-8.6.5-iohk": "ghc-8.6.5-iohk_6", - "hackage": "hackage_5", - "hpc-coveralls": "hpc-coveralls_6", - "nix-tools": "nix-tools_5", - "nixpkgs": [ - "cardano-node-1_35_4", - "node-measured", - "node-measured", - "membench", - "cardano-node-snapshot", - "nixpkgs" - ], - "nixpkgs-2003": "nixpkgs-2003_6", - "nixpkgs-2105": "nixpkgs-2105_6", - "nixpkgs-2111": "nixpkgs-2111_6", - "nixpkgs-unstable": "nixpkgs-unstable_6", - "old-ghc-nix": "old-ghc-nix_6", - "stackage": "stackage_6" - }, - "locked": { - "lastModified": 1643073543, - "narHash": "sha256-g2l/KDWzMRTFRugNVcx3CPZeyA5BNcH9/zDiqFpprB4=", - "owner": "input-output-hk", - "repo": "haskell.nix", - "rev": "14f740c7c8f535581c30b1697018e389680e24cb", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "haskell.nix", - "type": "github" - } - }, - "haskellNix_7": { - "inputs": { - "HTTP": "HTTP_7", - "cabal-32": "cabal-32_7", - "cabal-34": "cabal-34_7", - "cabal-36": "cabal-36_7", - "cardano-shell": "cardano-shell_7", - "flake-utils": "flake-utils_7", - "ghc-8.6.5-iohk": "ghc-8.6.5-iohk_7", - "hackage": "hackage_6", - "hpc-coveralls": "hpc-coveralls_7", - "nix-tools": "nix-tools_6", - "nixpkgs": [ - "cardano-node-1_35_4", - "node-measured", - "node-measured", - "membench", - "cardano-node-snapshot", - "membench", - "cardano-node-snapshot", - "nixpkgs" - ], - "nixpkgs-2003": "nixpkgs-2003_7", - "nixpkgs-2105": "nixpkgs-2105_7", - "nixpkgs-2111": "nixpkgs-2111_7", - "nixpkgs-unstable": "nixpkgs-unstable_7", - "old-ghc-nix": "old-ghc-nix_7", - "stackage": "stackage_7" - }, - "locked": { - "lastModified": 1643073543, - "narHash": "sha256-g2l/KDWzMRTFRugNVcx3CPZeyA5BNcH9/zDiqFpprB4=", - "owner": "input-output-hk", - "repo": "haskell.nix", - "rev": "14f740c7c8f535581c30b1697018e389680e24cb", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "haskell.nix", - "type": "github" - } - }, - "haskellNix_8": { - "inputs": { - "HTTP": "HTTP_8", - "cabal-32": "cabal-32_8", - "cabal-34": "cabal-34_8", - "cardano-shell": "cardano-shell_8", - "flake-utils": "flake-utils_8", - "ghc-8.6.5-iohk": "ghc-8.6.5-iohk_8", - "hackage": "hackage_7", - "hpc-coveralls": "hpc-coveralls_8", - "nix-tools": "nix-tools_7", - "nixpkgs": [ - "cardano-node-1_35_4", - "node-measured", - "node-measured", - "membench", - "cardano-node-snapshot", - "plutus-example", - "nixpkgs" - ], - "nixpkgs-2003": "nixpkgs-2003_8", - "nixpkgs-2105": "nixpkgs-2105_8", - "nixpkgs-2111": "nixpkgs-2111_8", - "nixpkgs-unstable": "nixpkgs-unstable_8", - "old-ghc-nix": "old-ghc-nix_8", - "stackage": "stackage_8" - }, - "locked": { - "lastModified": 1639098904, - "narHash": "sha256-7VrCNEaKGLm4pTOS11dt1dRL2033oqrNCfal0uONsqA=", - "owner": "input-output-hk", - "repo": "haskell.nix", - "rev": "b18c6ce0867fee77f12ecf41dc6c67f7a59d9826", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "haskell.nix", - "type": "github" - } - }, - "haskellNix_9": { - "inputs": { - "HTTP": "HTTP_9", - "cabal-32": "cabal-32_9", - "cabal-34": "cabal-34_9", - "cabal-36": "cabal-36_8", - "cardano-shell": "cardano-shell_9", - "flake-utils": "flake-utils_9", - "ghc-8.6.5-iohk": "ghc-8.6.5-iohk_9", - "hackage": "hackage_8", - "hpc-coveralls": "hpc-coveralls_9", - "nix-tools": "nix-tools_8", - "nixpkgs": [ - "cardano-node-1_35_4", - "node-measured", - "node-process", - "nixpkgs" - ], - "nixpkgs-2003": "nixpkgs-2003_9", - "nixpkgs-2105": "nixpkgs-2105_9", - "nixpkgs-2111": "nixpkgs-2111_9", - "nixpkgs-unstable": "nixpkgs-unstable_9", - "old-ghc-nix": "old-ghc-nix_9", - "stackage": "stackage_9" - }, - "locked": { - "lastModified": 1643073543, - "narHash": "sha256-g2l/KDWzMRTFRugNVcx3CPZeyA5BNcH9/zDiqFpprB4=", - "owner": "input-output-hk", - "repo": "haskell.nix", - "rev": "14f740c7c8f535581c30b1697018e389680e24cb", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "haskell.nix", - "type": "github" - } - }, - "hpc-coveralls": { - "flake": false, - "locked": { - "lastModified": 1607498076, - "narHash": "sha256-8uqsEtivphgZWYeUo5RDUhp6bO9j2vaaProQxHBltQk=", - "owner": "sevanspowell", - "repo": "hpc-coveralls", - "rev": "14df0f7d229f4cd2e79f8eabb1a740097fdfa430", - "type": "github" - }, - "original": { - "owner": "sevanspowell", - "repo": "hpc-coveralls", - "type": "github" - } - }, - "hpc-coveralls_10": { - "flake": false, - "locked": { - "lastModified": 1607498076, - "narHash": "sha256-8uqsEtivphgZWYeUo5RDUhp6bO9j2vaaProQxHBltQk=", - "owner": "sevanspowell", - "repo": "hpc-coveralls", - "rev": "14df0f7d229f4cd2e79f8eabb1a740097fdfa430", - "type": "github" - }, - "original": { - "owner": "sevanspowell", - "repo": "hpc-coveralls", - "type": "github" - } - }, - "hpc-coveralls_11": { - "flake": false, - "locked": { - "lastModified": 1607498076, - "narHash": "sha256-8uqsEtivphgZWYeUo5RDUhp6bO9j2vaaProQxHBltQk=", - "owner": "sevanspowell", - "repo": "hpc-coveralls", - "rev": "14df0f7d229f4cd2e79f8eabb1a740097fdfa430", - "type": "github" - }, - "original": { - "owner": "sevanspowell", - "repo": "hpc-coveralls", - "type": "github" - } - }, - "hpc-coveralls_12": { - "flake": false, - "locked": { - "lastModified": 1607498076, - "narHash": "sha256-8uqsEtivphgZWYeUo5RDUhp6bO9j2vaaProQxHBltQk=", - "owner": "sevanspowell", - "repo": "hpc-coveralls", - "rev": "14df0f7d229f4cd2e79f8eabb1a740097fdfa430", - "type": "github" - }, - "original": { - "owner": "sevanspowell", - "repo": "hpc-coveralls", - "type": "github" - } - }, - "hpc-coveralls_13": { - "flake": false, - "locked": { - "lastModified": 1607498076, - "narHash": "sha256-8uqsEtivphgZWYeUo5RDUhp6bO9j2vaaProQxHBltQk=", - "owner": "sevanspowell", - "repo": "hpc-coveralls", - "rev": "14df0f7d229f4cd2e79f8eabb1a740097fdfa430", - "type": "github" - }, - "original": { - "owner": "sevanspowell", - "repo": "hpc-coveralls", - "type": "github" - } - }, - "hpc-coveralls_14": { - "flake": false, - "locked": { - "lastModified": 1607498076, - "narHash": "sha256-8uqsEtivphgZWYeUo5RDUhp6bO9j2vaaProQxHBltQk=", - "owner": "sevanspowell", - "repo": "hpc-coveralls", - "rev": "14df0f7d229f4cd2e79f8eabb1a740097fdfa430", - "type": "github" - }, - "original": { - "owner": "sevanspowell", - "repo": "hpc-coveralls", - "type": "github" - } - }, - "hpc-coveralls_15": { - "flake": false, - "locked": { - "lastModified": 1607498076, - "narHash": "sha256-8uqsEtivphgZWYeUo5RDUhp6bO9j2vaaProQxHBltQk=", - "owner": "sevanspowell", - "repo": "hpc-coveralls", - "rev": "14df0f7d229f4cd2e79f8eabb1a740097fdfa430", - "type": "github" - }, - "original": { - "owner": "sevanspowell", - "repo": "hpc-coveralls", - "type": "github" - } - }, - "hpc-coveralls_16": { - "flake": false, - "locked": { - "lastModified": 1607498076, - "narHash": "sha256-8uqsEtivphgZWYeUo5RDUhp6bO9j2vaaProQxHBltQk=", - "owner": "sevanspowell", - "repo": "hpc-coveralls", - "rev": "14df0f7d229f4cd2e79f8eabb1a740097fdfa430", - "type": "github" - }, - "original": { - "owner": "sevanspowell", - "repo": "hpc-coveralls", - "type": "github" - } - }, - "hpc-coveralls_17": { - "flake": false, - "locked": { - "lastModified": 1607498076, - "narHash": "sha256-8uqsEtivphgZWYeUo5RDUhp6bO9j2vaaProQxHBltQk=", - "owner": "sevanspowell", - "repo": "hpc-coveralls", - "rev": "14df0f7d229f4cd2e79f8eabb1a740097fdfa430", - "type": "github" - }, - "original": { - "owner": "sevanspowell", - "repo": "hpc-coveralls", - "type": "github" - } - }, - "hpc-coveralls_18": { - "flake": false, - "locked": { - "lastModified": 1607498076, - "narHash": "sha256-8uqsEtivphgZWYeUo5RDUhp6bO9j2vaaProQxHBltQk=", - "owner": "sevanspowell", - "repo": "hpc-coveralls", - "rev": "14df0f7d229f4cd2e79f8eabb1a740097fdfa430", - "type": "github" - }, - "original": { - "owner": "sevanspowell", - "repo": "hpc-coveralls", - "type": "github" - } - }, - "hpc-coveralls_19": { - "flake": false, - "locked": { - "lastModified": 1607498076, - "narHash": "sha256-8uqsEtivphgZWYeUo5RDUhp6bO9j2vaaProQxHBltQk=", - "owner": "sevanspowell", - "repo": "hpc-coveralls", - "rev": "14df0f7d229f4cd2e79f8eabb1a740097fdfa430", - "type": "github" - }, - "original": { - "owner": "sevanspowell", - "repo": "hpc-coveralls", - "type": "github" - } - }, - "hpc-coveralls_2": { - "flake": false, - "locked": { - "lastModified": 1607498076, - "narHash": "sha256-8uqsEtivphgZWYeUo5RDUhp6bO9j2vaaProQxHBltQk=", - "owner": "sevanspowell", - "repo": "hpc-coveralls", - "rev": "14df0f7d229f4cd2e79f8eabb1a740097fdfa430", - "type": "github" - }, - "original": { - "owner": "sevanspowell", - "repo": "hpc-coveralls", - "type": "github" - } - }, - "hpc-coveralls_3": { - "flake": false, - "locked": { - "lastModified": 1607498076, - "narHash": "sha256-8uqsEtivphgZWYeUo5RDUhp6bO9j2vaaProQxHBltQk=", - "owner": "sevanspowell", - "repo": "hpc-coveralls", - "rev": "14df0f7d229f4cd2e79f8eabb1a740097fdfa430", - "type": "github" - }, - "original": { - "owner": "sevanspowell", - "repo": "hpc-coveralls", - "type": "github" - } - }, - "hpc-coveralls_4": { - "flake": false, - "locked": { - "lastModified": 1607498076, - "narHash": "sha256-8uqsEtivphgZWYeUo5RDUhp6bO9j2vaaProQxHBltQk=", - "owner": "sevanspowell", - "repo": "hpc-coveralls", - "rev": "14df0f7d229f4cd2e79f8eabb1a740097fdfa430", - "type": "github" - }, - "original": { - "owner": "sevanspowell", - "repo": "hpc-coveralls", - "type": "github" - } - }, - "hpc-coveralls_5": { - "flake": false, - "locked": { - "lastModified": 1607498076, - "narHash": "sha256-8uqsEtivphgZWYeUo5RDUhp6bO9j2vaaProQxHBltQk=", - "owner": "sevanspowell", - "repo": "hpc-coveralls", - "rev": "14df0f7d229f4cd2e79f8eabb1a740097fdfa430", - "type": "github" - }, - "original": { - "owner": "sevanspowell", - "repo": "hpc-coveralls", - "type": "github" - } - }, - "hpc-coveralls_6": { - "flake": false, - "locked": { - "lastModified": 1607498076, - "narHash": "sha256-8uqsEtivphgZWYeUo5RDUhp6bO9j2vaaProQxHBltQk=", - "owner": "sevanspowell", - "repo": "hpc-coveralls", - "rev": "14df0f7d229f4cd2e79f8eabb1a740097fdfa430", - "type": "github" - }, - "original": { - "owner": "sevanspowell", - "repo": "hpc-coveralls", - "type": "github" - } - }, - "hpc-coveralls_7": { - "flake": false, - "locked": { - "lastModified": 1607498076, - "narHash": "sha256-8uqsEtivphgZWYeUo5RDUhp6bO9j2vaaProQxHBltQk=", - "owner": "sevanspowell", - "repo": "hpc-coveralls", - "rev": "14df0f7d229f4cd2e79f8eabb1a740097fdfa430", - "type": "github" - }, - "original": { - "owner": "sevanspowell", - "repo": "hpc-coveralls", - "type": "github" - } - }, - "hpc-coveralls_8": { - "flake": false, - "locked": { - "lastModified": 1607498076, - "narHash": "sha256-8uqsEtivphgZWYeUo5RDUhp6bO9j2vaaProQxHBltQk=", - "owner": "sevanspowell", - "repo": "hpc-coveralls", - "rev": "14df0f7d229f4cd2e79f8eabb1a740097fdfa430", - "type": "github" - }, - "original": { - "owner": "sevanspowell", - "repo": "hpc-coveralls", - "type": "github" - } - }, - "hpc-coveralls_9": { - "flake": false, - "locked": { - "lastModified": 1607498076, - "narHash": "sha256-8uqsEtivphgZWYeUo5RDUhp6bO9j2vaaProQxHBltQk=", - "owner": "sevanspowell", - "repo": "hpc-coveralls", - "rev": "14df0f7d229f4cd2e79f8eabb1a740097fdfa430", - "type": "github" - }, - "original": { - "owner": "sevanspowell", - "repo": "hpc-coveralls", - "type": "github" - } - }, - "hydra": { - "inputs": { - "nix": "nix", - "nixpkgs": [ - "cardano-node-1_35_4", - "cardano-node-workbench", - "haskellNix", - "hydra", - "nix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1646878427, - "narHash": "sha256-KtbrofMtN8GlM7D+n90kixr7QpSlVmdN+vK5CA/aRzc=", - "owner": "NixOS", - "repo": "hydra", - "rev": "28b682b85b7efc5cf7974065792a1f22203a5927", - "type": "github" - }, - "original": { - "id": "hydra", - "type": "indirect" - } - }, - "hydra_2": { - "inputs": { - "nix": "nix_2", - "nixpkgs": [ - "cardano-node-1_35_4", - "haskellNix", - "hydra", - "nix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1646878427, - "narHash": "sha256-KtbrofMtN8GlM7D+n90kixr7QpSlVmdN+vK5CA/aRzc=", - "owner": "NixOS", - "repo": "hydra", - "rev": "28b682b85b7efc5cf7974065792a1f22203a5927", - "type": "github" - }, - "original": { - "id": "hydra", - "type": "indirect" - } - }, - "hydra_3": { - "inputs": { - "nix": "nix_3", - "nixpkgs": [ - "cardano-node-1_35_4", - "node-measured", - "cardano-node-workbench", - "haskellNix", - "hydra", - "nix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1646878427, - "narHash": "sha256-KtbrofMtN8GlM7D+n90kixr7QpSlVmdN+vK5CA/aRzc=", - "owner": "NixOS", - "repo": "hydra", - "rev": "28b682b85b7efc5cf7974065792a1f22203a5927", - "type": "github" - }, - "original": { - "id": "hydra", - "type": "indirect" - } - }, - "hydra_4": { - "inputs": { - "nix": "nix_4", - "nixpkgs": [ - "haskellNix", - "hydra", - "nix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1671755331, - "narHash": "sha256-hXsgJj0Cy0ZiCiYdW2OdBz5WmFyOMKuw4zyxKpgUKm4=", - "owner": "NixOS", - "repo": "hydra", - "rev": "f48f00ee6d5727ae3e488cbf9ce157460853fea8", - "type": "github" - }, - "original": { - "id": "hydra", - "type": "indirect" - } - }, - "incl": { - "inputs": { - "nixlib": [ - "haskellNix", - "tullia", - "std", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1669263024, - "narHash": "sha256-E/+23NKtxAqYG/0ydYgxlgarKnxmDbg6rCMWnOBqn9Q=", - "owner": "divnix", - "repo": "incl", - "rev": "ce7bebaee048e4cd7ebdb4cee7885e00c4e2abca", - "type": "github" - }, - "original": { - "owner": "divnix", - "repo": "incl", - "type": "github" - } - }, - "iohkNix": { - "inputs": { - "nixpkgs": [ - "cardano-node-1_35_4", - "cardano-node-workbench", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1648032999, - "narHash": "sha256-3uCz+gJppvM7z6CUCkBbFSu60WgIE+e3oXwXiAiGWSY=", - "owner": "input-output-hk", - "repo": "iohk-nix", - "rev": "5e667b374153327c7bdfdbfab8ef19b1f27d4aac", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "iohk-nix", - "type": "github" - } - }, - "iohkNix_10": { - "inputs": { - "nixpkgs": [ - "cardano-node-1_35_4", - "node-measured", - "node-process", - "membench", - "cardano-node-snapshot", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1631778944, - "narHash": "sha256-N5eCcUYtZ5kUOl/JJGjx6ZzhA3uIn1itDRTiRV+3jLw=", - "owner": "input-output-hk", - "repo": "iohk-nix", - "rev": "db2c75a09c696271194bb3ef25ec8e9839b594b7", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "iohk-nix", - "type": "github" - } - }, - "iohkNix_11": { - "inputs": { - "nixpkgs": [ - "cardano-node-1_35_4", - "node-measured", - "node-process", - "membench", - "cardano-node-snapshot", - "membench", - "cardano-node-snapshot", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1631778944, - "narHash": "sha256-N5eCcUYtZ5kUOl/JJGjx6ZzhA3uIn1itDRTiRV+3jLw=", - "owner": "input-output-hk", - "repo": "iohk-nix", - "rev": "db2c75a09c696271194bb3ef25ec8e9839b594b7", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "iohk-nix", - "type": "github" - } - }, - "iohkNix_12": { - "inputs": { - "nixpkgs": [ - "cardano-node-1_35_4", - "node-measured", - "node-process", - "membench", - "cardano-node-snapshot", - "plutus-example", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1633964277, - "narHash": "sha256-7G/BK514WiMRr90EswNBthe8SmH9tjPaTBba/RW/VA8=", - "owner": "input-output-hk", - "repo": "iohk-nix", - "rev": "1e51437aac8a0e49663cb21e781f34163c81ebfb", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "iohk-nix", - "type": "github" - } - }, - "iohkNix_13": { - "inputs": { - "nixpkgs": [ - "cardano-node-1_35_4", - "node-measured", - "node-snapshot", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1631778944, - "narHash": "sha256-N5eCcUYtZ5kUOl/JJGjx6ZzhA3uIn1itDRTiRV+3jLw=", - "owner": "input-output-hk", - "repo": "iohk-nix", - "rev": "db2c75a09c696271194bb3ef25ec8e9839b594b7", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "iohk-nix", - "type": "github" - } - }, - "iohkNix_14": { - "inputs": { - "nixpkgs": [ - "cardano-node-1_35_4", - "node-measured", - "node-snapshot", - "membench", - "cardano-node-snapshot", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1631778944, - "narHash": "sha256-N5eCcUYtZ5kUOl/JJGjx6ZzhA3uIn1itDRTiRV+3jLw=", - "owner": "input-output-hk", - "repo": "iohk-nix", - "rev": "db2c75a09c696271194bb3ef25ec8e9839b594b7", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "iohk-nix", - "type": "github" - } - }, - "iohkNix_15": { - "inputs": { - "nixpkgs": [ - "cardano-node-1_35_4", - "node-measured", - "node-snapshot", - "plutus-example", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1633964277, - "narHash": "sha256-7G/BK514WiMRr90EswNBthe8SmH9tjPaTBba/RW/VA8=", - "owner": "input-output-hk", - "repo": "iohk-nix", - "rev": "1e51437aac8a0e49663cb21e781f34163c81ebfb", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "iohk-nix", - "type": "github" - } - }, - "iohkNix_16": { - "inputs": { - "nixpkgs": [ - "cardano-node-1_35_4", - "node-snapshot", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1631778944, - "narHash": "sha256-N5eCcUYtZ5kUOl/JJGjx6ZzhA3uIn1itDRTiRV+3jLw=", - "owner": "input-output-hk", - "repo": "iohk-nix", - "rev": "db2c75a09c696271194bb3ef25ec8e9839b594b7", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "iohk-nix", - "type": "github" - } - }, - "iohkNix_17": { - "inputs": { - "nixpkgs": [ - "cardano-node-1_35_4", - "node-snapshot", - "membench", - "cardano-node-snapshot", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1631778944, - "narHash": "sha256-N5eCcUYtZ5kUOl/JJGjx6ZzhA3uIn1itDRTiRV+3jLw=", - "owner": "input-output-hk", - "repo": "iohk-nix", - "rev": "db2c75a09c696271194bb3ef25ec8e9839b594b7", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "iohk-nix", - "type": "github" - } - }, - "iohkNix_18": { - "inputs": { - "nixpkgs": [ - "cardano-node-1_35_4", - "node-snapshot", - "plutus-example", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1633964277, - "narHash": "sha256-7G/BK514WiMRr90EswNBthe8SmH9tjPaTBba/RW/VA8=", - "owner": "input-output-hk", - "repo": "iohk-nix", - "rev": "1e51437aac8a0e49663cb21e781f34163c81ebfb", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "iohk-nix", - "type": "github" - } - }, - "iohkNix_19": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1678931316, - "narHash": "sha256-RvxkLxW1cl9cMvZuxRsDxeOZnCdQj1XlajPCNo1KxEM=", - "owner": "input-output-hk", - "repo": "iohk-nix", - "rev": "67967ced6a40dce4721bc3fcc163c1809398c3c0", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "iohk-nix", - "type": "github" - } - }, - "iohkNix_2": { - "inputs": { - "nixpkgs": [ - "cardano-node-1_35_4", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1667394105, - "narHash": "sha256-YhS7zGd6jK/QM/+wWyj0zUBZmE3HOXAL/kpJptGYIWg=", - "owner": "input-output-hk", - "repo": "iohk-nix", - "rev": "7fc7625a9ab2ba137bc70ddbc89a13d3fdb78c8b", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "iohk-nix", - "type": "github" - } - }, - "iohkNix_3": { - "inputs": { - "nixpkgs": [ - "cardano-node-1_35_4", - "node-measured", - "cardano-node-workbench", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1648032999, - "narHash": "sha256-3uCz+gJppvM7z6CUCkBbFSu60WgIE+e3oXwXiAiGWSY=", - "owner": "input-output-hk", - "repo": "iohk-nix", - "rev": "5e667b374153327c7bdfdbfab8ef19b1f27d4aac", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "iohk-nix", - "type": "github" - } - }, - "iohkNix_4": { - "inputs": { - "nixpkgs": [ - "cardano-node-1_35_4", - "node-measured", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1645693195, - "narHash": "sha256-UDemE2MFEi/L8Xmwi1/FuKU9ka3QqDye6k7rVW6ryeE=", - "owner": "input-output-hk", - "repo": "iohk-nix", - "rev": "29c9a3b6704b5c0df3bb4a3e65240749883c50a0", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "iohk-nix", - "type": "github" - } - }, - "iohkNix_5": { - "inputs": { - "nixpkgs": [ - "cardano-node-1_35_4", - "node-measured", - "node-measured", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1645693195, - "narHash": "sha256-UDemE2MFEi/L8Xmwi1/FuKU9ka3QqDye6k7rVW6ryeE=", - "owner": "input-output-hk", - "repo": "iohk-nix", - "rev": "29c9a3b6704b5c0df3bb4a3e65240749883c50a0", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "iohk-nix", - "type": "github" - } - }, - "iohkNix_6": { - "inputs": { - "nixpkgs": [ - "cardano-node-1_35_4", - "node-measured", - "node-measured", - "membench", - "cardano-node-snapshot", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1631778944, - "narHash": "sha256-N5eCcUYtZ5kUOl/JJGjx6ZzhA3uIn1itDRTiRV+3jLw=", - "owner": "input-output-hk", - "repo": "iohk-nix", - "rev": "db2c75a09c696271194bb3ef25ec8e9839b594b7", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "iohk-nix", - "type": "github" - } - }, - "iohkNix_7": { - "inputs": { - "nixpkgs": [ - "cardano-node-1_35_4", - "node-measured", - "node-measured", - "membench", - "cardano-node-snapshot", - "membench", - "cardano-node-snapshot", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1631778944, - "narHash": "sha256-N5eCcUYtZ5kUOl/JJGjx6ZzhA3uIn1itDRTiRV+3jLw=", - "owner": "input-output-hk", - "repo": "iohk-nix", - "rev": "db2c75a09c696271194bb3ef25ec8e9839b594b7", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "iohk-nix", - "type": "github" - } - }, - "iohkNix_8": { - "inputs": { - "nixpkgs": [ - "cardano-node-1_35_4", - "node-measured", - "node-measured", - "membench", - "cardano-node-snapshot", - "plutus-example", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1633964277, - "narHash": "sha256-7G/BK514WiMRr90EswNBthe8SmH9tjPaTBba/RW/VA8=", - "owner": "input-output-hk", - "repo": "iohk-nix", - "rev": "1e51437aac8a0e49663cb21e781f34163c81ebfb", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "iohk-nix", - "type": "github" - } - }, - "iohkNix_9": { - "inputs": { - "nixpkgs": [ - "cardano-node-1_35_4", - "node-measured", - "node-process", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1645693195, - "narHash": "sha256-UDemE2MFEi/L8Xmwi1/FuKU9ka3QqDye6k7rVW6ryeE=", - "owner": "input-output-hk", - "repo": "iohk-nix", - "rev": "29c9a3b6704b5c0df3bb4a3e65240749883c50a0", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "iohk-nix", - "type": "github" - } - }, - "iserv-proxy": { - "flake": false, - "locked": { - "lastModified": 1670983692, - "narHash": "sha256-avLo34JnI9HNyOuauK5R69usJm+GfW3MlyGlYxZhTgY=", - "ref": "hkm/remote-iserv", - "rev": "50d0abb3317ac439a4e7495b185a64af9b7b9300", - "revCount": 10, - "type": "git", - "url": "https://gitlab.haskell.org/hamishmack/iserv-proxy.git" - }, - "original": { - "ref": "hkm/remote-iserv", - "type": "git", - "url": "https://gitlab.haskell.org/hamishmack/iserv-proxy.git" - } - }, - "lowdown-src": { - "flake": false, - "locked": { - "lastModified": 1633514407, - "narHash": "sha256-Dw32tiMjdK9t3ETl5fzGrutQTzh2rufgZV4A/BbxuD4=", - "owner": "kristapsdz", - "repo": "lowdown", - "rev": "d2c2b44ff6c27b936ec27358a2653caaef8f73b8", - "type": "github" - }, - "original": { - "owner": "kristapsdz", - "repo": "lowdown", - "type": "github" - } - }, - "lowdown-src_2": { - "flake": false, - "locked": { - "lastModified": 1633514407, - "narHash": "sha256-Dw32tiMjdK9t3ETl5fzGrutQTzh2rufgZV4A/BbxuD4=", - "owner": "kristapsdz", - "repo": "lowdown", - "rev": "d2c2b44ff6c27b936ec27358a2653caaef8f73b8", - "type": "github" - }, - "original": { - "owner": "kristapsdz", - "repo": "lowdown", - "type": "github" - } - }, - "lowdown-src_3": { - "flake": false, - "locked": { - "lastModified": 1633514407, - "narHash": "sha256-Dw32tiMjdK9t3ETl5fzGrutQTzh2rufgZV4A/BbxuD4=", - "owner": "kristapsdz", - "repo": "lowdown", - "rev": "d2c2b44ff6c27b936ec27358a2653caaef8f73b8", - "type": "github" - }, - "original": { - "owner": "kristapsdz", - "repo": "lowdown", - "type": "github" - } - }, - "lowdown-src_4": { - "flake": false, - "locked": { - "lastModified": 1633514407, - "narHash": "sha256-Dw32tiMjdK9t3ETl5fzGrutQTzh2rufgZV4A/BbxuD4=", - "owner": "kristapsdz", - "repo": "lowdown", - "rev": "d2c2b44ff6c27b936ec27358a2653caaef8f73b8", - "type": "github" - }, - "original": { - "owner": "kristapsdz", - "repo": "lowdown", - "type": "github" - } - }, - "membench": { - "locked": { - "lastModified": 1630400035, - "narHash": "sha256-MWaVOCzuFwp09wZIW9iHq5wWen5C69I940N1swZLEQ0=", - "owner": "input-output-hk", - "repo": "empty-flake", - "rev": "2040a05b67bf9a669ce17eca56beb14b4206a99a", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-memory-benchmark", - "type": "github" - } - }, - "membench_10": { - "inputs": { - "cardano-mainnet-mirror": "cardano-mainnet-mirror_10", - "cardano-node-measured": [ - "cardano-node-1_35_4", - "node-measured", - "node-snapshot", - "membench", - "cardano-node-snapshot" - ], - "cardano-node-process": [ - "cardano-node-1_35_4", - "node-measured", - "node-snapshot", - "membench", - "cardano-node-snapshot" - ], - "cardano-node-snapshot": [ - "cardano-node-1_35_4", - "node-measured", - "node-snapshot", - "membench", - "cardano-node-snapshot" - ], - "nixpkgs": [ - "cardano-node-1_35_4", - "node-measured", - "node-snapshot", - "membench", - "cardano-node-snapshot", - "nixpkgs" - ], - "ouroboros-network": "ouroboros-network_7" - }, - "locked": { - "lastModified": 1644547122, - "narHash": "sha256-8nWK+ScMACvRQLbA27gwXNoZver+Wx/cF7V37044koY=", - "owner": "input-output-hk", - "repo": "cardano-memory-benchmark", - "rev": "9d8ff4b9394de0421ee95caa511d01163de88b77", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-memory-benchmark", - "type": "github" - } - }, - "membench_11": { - "inputs": { - "cardano-mainnet-mirror": "cardano-mainnet-mirror_11", - "cardano-node-measured": [ - "cardano-node-1_35_4", - "node-snapshot" - ], - "cardano-node-process": [ - "cardano-node-1_35_4", - "node-snapshot" - ], - "cardano-node-snapshot": "cardano-node-snapshot_6", - "nixpkgs": [ - "cardano-node-1_35_4", - "node-snapshot", - "nixpkgs" - ], - "ouroboros-network": "ouroboros-network_10" - }, - "locked": { - "lastModified": 1645070579, - "narHash": "sha256-AxL6tCOnzYnE6OquoFzj+X1bLDr1PQx3d8/vXm+rbfA=", - "owner": "input-output-hk", - "repo": "cardano-memory-benchmark", - "rev": "65643e000186de1335e24ec89159db8ba85e1c1a", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-memory-benchmark", - "type": "github" - } - }, - "membench_12": { - "inputs": { - "cardano-mainnet-mirror": "cardano-mainnet-mirror_12", - "cardano-node-measured": [ - "cardano-node-1_35_4", - "node-snapshot", - "membench", - "cardano-node-snapshot" - ], - "cardano-node-process": [ - "cardano-node-1_35_4", - "node-snapshot", - "membench", - "cardano-node-snapshot" - ], - "cardano-node-snapshot": [ - "cardano-node-1_35_4", - "node-snapshot", - "membench", - "cardano-node-snapshot" - ], - "nixpkgs": [ - "cardano-node-1_35_4", - "node-snapshot", - "membench", - "cardano-node-snapshot", - "nixpkgs" - ], - "ouroboros-network": "ouroboros-network_9" - }, - "locked": { - "lastModified": 1644547122, - "narHash": "sha256-8nWK+ScMACvRQLbA27gwXNoZver+Wx/cF7V37044koY=", - "owner": "input-output-hk", - "repo": "cardano-memory-benchmark", - "rev": "9d8ff4b9394de0421ee95caa511d01163de88b77", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-memory-benchmark", - "type": "github" - } - }, - "membench_2": { - "locked": { - "lastModified": 1630400035, - "narHash": "sha256-MWaVOCzuFwp09wZIW9iHq5wWen5C69I940N1swZLEQ0=", - "owner": "input-output-hk", - "repo": "empty-flake", - "rev": "2040a05b67bf9a669ce17eca56beb14b4206a99a", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-memory-benchmark", - "type": "github" - } - }, - "membench_3": { - "inputs": { - "cardano-mainnet-mirror": "cardano-mainnet-mirror_3", - "cardano-node-measured": [ - "cardano-node-1_35_4", - "node-measured", - "node-measured" - ], - "cardano-node-process": [ - "cardano-node-1_35_4", - "node-measured", - "node-measured" - ], - "cardano-node-snapshot": "cardano-node-snapshot", - "nixpkgs": [ - "cardano-node-1_35_4", - "node-measured", - "node-measured", - "nixpkgs" - ], - "ouroboros-network": "ouroboros-network_3" - }, - "locked": { - "lastModified": 1645070579, - "narHash": "sha256-AxL6tCOnzYnE6OquoFzj+X1bLDr1PQx3d8/vXm+rbfA=", - "owner": "input-output-hk", - "repo": "cardano-memory-benchmark", - "rev": "65643e000186de1335e24ec89159db8ba85e1c1a", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-memory-benchmark", - "type": "github" - } - }, - "membench_4": { - "inputs": { - "cardano-mainnet-mirror": "cardano-mainnet-mirror_4", - "cardano-node-measured": [ - "cardano-node-1_35_4", - "node-measured", - "node-measured", - "membench", - "cardano-node-snapshot" - ], - "cardano-node-process": [ - "cardano-node-1_35_4", - "node-measured", - "node-measured", - "membench", - "cardano-node-snapshot" - ], - "cardano-node-snapshot": "cardano-node-snapshot_2", - "nixpkgs": [ - "cardano-node-1_35_4", - "node-measured", - "node-measured", - "membench", - "cardano-node-snapshot", - "nixpkgs" - ], - "ouroboros-network": "ouroboros-network_2" - }, - "locked": { - "lastModified": 1644547122, - "narHash": "sha256-8nWK+ScMACvRQLbA27gwXNoZver+Wx/cF7V37044koY=", - "owner": "input-output-hk", - "repo": "cardano-memory-benchmark", - "rev": "9d8ff4b9394de0421ee95caa511d01163de88b77", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-memory-benchmark", - "type": "github" - } - }, - "membench_5": { - "inputs": { - "cardano-mainnet-mirror": "cardano-mainnet-mirror_5", - "cardano-node-measured": [ - "cardano-node-1_35_4", - "node-measured", - "node-measured", - "membench", - "cardano-node-snapshot", - "membench", - "cardano-node-snapshot" - ], - "cardano-node-process": [ - "cardano-node-1_35_4", - "node-measured", - "node-measured", - "membench", - "cardano-node-snapshot", - "membench", - "cardano-node-snapshot" - ], - "cardano-node-snapshot": [ - "cardano-node-1_35_4", - "node-measured", - "node-measured", - "membench", - "cardano-node-snapshot", - "membench", - "cardano-node-snapshot" - ], - "nixpkgs": [ - "cardano-node-1_35_4", - "node-measured", - "node-measured", - "membench", - "cardano-node-snapshot", - "membench", - "cardano-node-snapshot", - "nixpkgs" - ], - "ouroboros-network": "ouroboros-network" - }, - "locked": { - "lastModified": 1644547122, - "narHash": "sha256-8nWK+ScMACvRQLbA27gwXNoZver+Wx/cF7V37044koY=", - "owner": "input-output-hk", - "repo": "cardano-memory-benchmark", - "rev": "9d8ff4b9394de0421ee95caa511d01163de88b77", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-memory-benchmark", - "type": "github" - } - }, - "membench_6": { - "inputs": { - "cardano-mainnet-mirror": "cardano-mainnet-mirror_6", - "cardano-node-measured": [ - "cardano-node-1_35_4", - "node-measured", - "node-process" - ], - "cardano-node-process": [ - "cardano-node-1_35_4", - "node-measured", - "node-process" - ], - "cardano-node-snapshot": "cardano-node-snapshot_3", - "nixpkgs": [ - "cardano-node-1_35_4", - "node-measured", - "node-process", - "nixpkgs" - ], - "ouroboros-network": "ouroboros-network_6" - }, - "locked": { - "lastModified": 1645070579, - "narHash": "sha256-AxL6tCOnzYnE6OquoFzj+X1bLDr1PQx3d8/vXm+rbfA=", - "owner": "input-output-hk", - "repo": "cardano-memory-benchmark", - "rev": "65643e000186de1335e24ec89159db8ba85e1c1a", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-memory-benchmark", - "type": "github" - } - }, - "membench_7": { - "inputs": { - "cardano-mainnet-mirror": "cardano-mainnet-mirror_7", - "cardano-node-measured": [ - "cardano-node-1_35_4", - "node-measured", - "node-process", - "membench", - "cardano-node-snapshot" - ], - "cardano-node-process": [ - "cardano-node-1_35_4", - "node-measured", - "node-process", - "membench", - "cardano-node-snapshot" - ], - "cardano-node-snapshot": "cardano-node-snapshot_4", - "nixpkgs": [ - "cardano-node-1_35_4", - "node-measured", - "node-process", - "membench", - "cardano-node-snapshot", - "nixpkgs" - ], - "ouroboros-network": "ouroboros-network_5" - }, - "locked": { - "lastModified": 1644547122, - "narHash": "sha256-8nWK+ScMACvRQLbA27gwXNoZver+Wx/cF7V37044koY=", - "owner": "input-output-hk", - "repo": "cardano-memory-benchmark", - "rev": "9d8ff4b9394de0421ee95caa511d01163de88b77", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-memory-benchmark", - "type": "github" - } - }, - "membench_8": { - "inputs": { - "cardano-mainnet-mirror": "cardano-mainnet-mirror_8", - "cardano-node-measured": [ - "cardano-node-1_35_4", - "node-measured", - "node-process", - "membench", - "cardano-node-snapshot", - "membench", - "cardano-node-snapshot" - ], - "cardano-node-process": [ - "cardano-node-1_35_4", - "node-measured", - "node-process", - "membench", - "cardano-node-snapshot", - "membench", - "cardano-node-snapshot" - ], - "cardano-node-snapshot": [ - "cardano-node-1_35_4", - "node-measured", - "node-process", - "membench", - "cardano-node-snapshot", - "membench", - "cardano-node-snapshot" - ], - "nixpkgs": [ - "cardano-node-1_35_4", - "node-measured", - "node-process", - "membench", - "cardano-node-snapshot", - "membench", - "cardano-node-snapshot", - "nixpkgs" - ], - "ouroboros-network": "ouroboros-network_4" - }, - "locked": { - "lastModified": 1644547122, - "narHash": "sha256-8nWK+ScMACvRQLbA27gwXNoZver+Wx/cF7V37044koY=", - "owner": "input-output-hk", - "repo": "cardano-memory-benchmark", - "rev": "9d8ff4b9394de0421ee95caa511d01163de88b77", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-memory-benchmark", - "type": "github" - } - }, - "membench_9": { - "inputs": { - "cardano-mainnet-mirror": "cardano-mainnet-mirror_9", - "cardano-node-measured": [ - "cardano-node-1_35_4", - "node-measured", - "node-snapshot" - ], - "cardano-node-process": [ - "cardano-node-1_35_4", - "node-measured", - "node-snapshot" - ], - "cardano-node-snapshot": "cardano-node-snapshot_5", - "nixpkgs": [ - "cardano-node-1_35_4", - "node-measured", - "node-snapshot", - "nixpkgs" - ], - "ouroboros-network": "ouroboros-network_8" - }, - "locked": { - "lastModified": 1645070579, - "narHash": "sha256-AxL6tCOnzYnE6OquoFzj+X1bLDr1PQx3d8/vXm+rbfA=", - "owner": "input-output-hk", - "repo": "cardano-memory-benchmark", - "rev": "65643e000186de1335e24ec89159db8ba85e1c1a", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-memory-benchmark", - "type": "github" - } - }, - "n2c": { - "inputs": { - "flake-utils": [ - "haskellNix", - "tullia", - "std", - "flake-utils" - ], - "nixpkgs": [ - "haskellNix", - "tullia", - "std", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1665039323, - "narHash": "sha256-SAh3ZjFGsaCI8FRzXQyp56qcGdAqgKEfJWPCQ0Sr7tQ=", - "owner": "nlewo", - "repo": "nix2container", - "rev": "b008fe329ffb59b67bf9e7b08ede6ee792f2741a", - "type": "github" - }, - "original": { - "owner": "nlewo", - "repo": "nix2container", - "type": "github" - } - }, - "nix": { - "inputs": { - "lowdown-src": "lowdown-src", - "nixpkgs": "nixpkgs_2", - "nixpkgs-regression": "nixpkgs-regression" - }, - "locked": { - "lastModified": 1643066034, - "narHash": "sha256-xEPeMcNJVOeZtoN+d+aRwolpW8mFSEQx76HTRdlhPhg=", - "owner": "NixOS", - "repo": "nix", - "rev": "a1cd7e58606a41fcf62bf8637804cf8306f17f62", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "2.6.0", - "repo": "nix", - "type": "github" - } - }, - "nix-nomad": { - "inputs": { - "flake-compat": "flake-compat_11", - "flake-utils": "flake-utils_24", - "gomod2nix": "gomod2nix", - "nixpkgs": "nixpkgs_23", - "nixpkgs-lib": "nixpkgs-lib" - }, - "locked": { - "lastModified": 1658277770, - "narHash": "sha256-T/PgG3wUn8Z2rnzfxf2VqlR1CBjInPE0l1yVzXxPnt0=", - "owner": "tristanpemble", - "repo": "nix-nomad", - "rev": "054adcbdd0a836ae1c20951b67ed549131fd2d70", - "type": "github" - }, - "original": { - "owner": "tristanpemble", - "repo": "nix-nomad", - "type": "github" - } - }, - "nix-tools": { - "flake": false, - "locked": { - "lastModified": 1644395812, - "narHash": "sha256-BVFk/BEsTLq5MMZvdy3ZYHKfaS3dHrsKh4+tb5t5b58=", - "owner": "input-output-hk", - "repo": "nix-tools", - "rev": "d847c63b99bbec78bf83be2a61dc9f09b8a9ccc1", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "nix-tools", - "type": "github" - } - }, - "nix-tools_10": { - "flake": false, - "locked": { - "lastModified": 1636018067, - "narHash": "sha256-ng306fkuwr6V/malWtt3979iAC4yMVDDH2ViwYB6sQE=", - "owner": "input-output-hk", - "repo": "nix-tools", - "rev": "ed5bd7215292deba55d6ab7a4e8c21f8b1564dda", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "nix-tools", - "type": "github" - } - }, - "nix-tools_11": { - "flake": false, - "locked": { - "lastModified": 1636018067, - "narHash": "sha256-ng306fkuwr6V/malWtt3979iAC4yMVDDH2ViwYB6sQE=", - "owner": "input-output-hk", - "repo": "nix-tools", - "rev": "ed5bd7215292deba55d6ab7a4e8c21f8b1564dda", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "nix-tools", - "type": "github" - } - }, - "nix-tools_12": { - "flake": false, - "locked": { - "lastModified": 1636018067, - "narHash": "sha256-ng306fkuwr6V/malWtt3979iAC4yMVDDH2ViwYB6sQE=", - "owner": "input-output-hk", - "repo": "nix-tools", - "rev": "ed5bd7215292deba55d6ab7a4e8c21f8b1564dda", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "nix-tools", - "type": "github" - } - }, - "nix-tools_13": { - "flake": false, - "locked": { - "lastModified": 1636018067, - "narHash": "sha256-ng306fkuwr6V/malWtt3979iAC4yMVDDH2ViwYB6sQE=", - "owner": "input-output-hk", - "repo": "nix-tools", - "rev": "ed5bd7215292deba55d6ab7a4e8c21f8b1564dda", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "nix-tools", - "type": "github" - } - }, - "nix-tools_14": { - "flake": false, - "locked": { - "lastModified": 1636018067, - "narHash": "sha256-ng306fkuwr6V/malWtt3979iAC4yMVDDH2ViwYB6sQE=", - "owner": "input-output-hk", - "repo": "nix-tools", - "rev": "ed5bd7215292deba55d6ab7a4e8c21f8b1564dda", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "nix-tools", - "type": "github" - } - }, - "nix-tools_15": { - "flake": false, - "locked": { - "lastModified": 1636018067, - "narHash": "sha256-ng306fkuwr6V/malWtt3979iAC4yMVDDH2ViwYB6sQE=", - "owner": "input-output-hk", - "repo": "nix-tools", - "rev": "ed5bd7215292deba55d6ab7a4e8c21f8b1564dda", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "nix-tools", - "type": "github" - } - }, - "nix-tools_16": { - "flake": false, - "locked": { - "lastModified": 1636018067, - "narHash": "sha256-ng306fkuwr6V/malWtt3979iAC4yMVDDH2ViwYB6sQE=", - "owner": "input-output-hk", - "repo": "nix-tools", - "rev": "ed5bd7215292deba55d6ab7a4e8c21f8b1564dda", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "nix-tools", - "type": "github" - } - }, - "nix-tools_17": { - "flake": false, - "locked": { - "lastModified": 1636018067, - "narHash": "sha256-ng306fkuwr6V/malWtt3979iAC4yMVDDH2ViwYB6sQE=", - "owner": "input-output-hk", - "repo": "nix-tools", - "rev": "ed5bd7215292deba55d6ab7a4e8c21f8b1564dda", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "nix-tools", - "type": "github" - } - }, - "nix-tools_2": { - "flake": false, - "locked": { - "lastModified": 1644395812, - "narHash": "sha256-BVFk/BEsTLq5MMZvdy3ZYHKfaS3dHrsKh4+tb5t5b58=", - "owner": "input-output-hk", - "repo": "nix-tools", - "rev": "d847c63b99bbec78bf83be2a61dc9f09b8a9ccc1", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "nix-tools", - "type": "github" - } - }, - "nix-tools_3": { - "flake": false, - "locked": { - "lastModified": 1636018067, - "narHash": "sha256-ng306fkuwr6V/malWtt3979iAC4yMVDDH2ViwYB6sQE=", - "owner": "input-output-hk", - "repo": "nix-tools", - "rev": "ed5bd7215292deba55d6ab7a4e8c21f8b1564dda", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "nix-tools", - "type": "github" - } - }, - "nix-tools_4": { - "flake": false, - "locked": { - "lastModified": 1636018067, - "narHash": "sha256-ng306fkuwr6V/malWtt3979iAC4yMVDDH2ViwYB6sQE=", - "owner": "input-output-hk", - "repo": "nix-tools", - "rev": "ed5bd7215292deba55d6ab7a4e8c21f8b1564dda", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "nix-tools", - "type": "github" - } - }, - "nix-tools_5": { - "flake": false, - "locked": { - "lastModified": 1636018067, - "narHash": "sha256-ng306fkuwr6V/malWtt3979iAC4yMVDDH2ViwYB6sQE=", - "owner": "input-output-hk", - "repo": "nix-tools", - "rev": "ed5bd7215292deba55d6ab7a4e8c21f8b1564dda", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "nix-tools", - "type": "github" - } - }, - "nix-tools_6": { - "flake": false, - "locked": { - "lastModified": 1636018067, - "narHash": "sha256-ng306fkuwr6V/malWtt3979iAC4yMVDDH2ViwYB6sQE=", - "owner": "input-output-hk", - "repo": "nix-tools", - "rev": "ed5bd7215292deba55d6ab7a4e8c21f8b1564dda", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "nix-tools", - "type": "github" - } - }, - "nix-tools_7": { - "flake": false, - "locked": { - "lastModified": 1636018067, - "narHash": "sha256-ng306fkuwr6V/malWtt3979iAC4yMVDDH2ViwYB6sQE=", - "owner": "input-output-hk", - "repo": "nix-tools", - "rev": "ed5bd7215292deba55d6ab7a4e8c21f8b1564dda", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "nix-tools", - "type": "github" - } - }, - "nix-tools_8": { - "flake": false, - "locked": { - "lastModified": 1636018067, - "narHash": "sha256-ng306fkuwr6V/malWtt3979iAC4yMVDDH2ViwYB6sQE=", - "owner": "input-output-hk", - "repo": "nix-tools", - "rev": "ed5bd7215292deba55d6ab7a4e8c21f8b1564dda", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "nix-tools", - "type": "github" - } - }, - "nix-tools_9": { - "flake": false, - "locked": { - "lastModified": 1636018067, - "narHash": "sha256-ng306fkuwr6V/malWtt3979iAC4yMVDDH2ViwYB6sQE=", - "owner": "input-output-hk", - "repo": "nix-tools", - "rev": "ed5bd7215292deba55d6ab7a4e8c21f8b1564dda", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "nix-tools", - "type": "github" - } - }, - "nix2container": { - "inputs": { - "flake-utils": "flake-utils_25", - "nixpkgs": "nixpkgs_24" - }, - "locked": { - "lastModified": 1658567952, - "narHash": "sha256-XZ4ETYAMU7XcpEeAFP3NOl9yDXNuZAen/aIJ84G+VgA=", - "owner": "nlewo", - "repo": "nix2container", - "rev": "60bb43d405991c1378baf15a40b5811a53e32ffa", - "type": "github" - }, - "original": { - "owner": "nlewo", - "repo": "nix2container", - "type": "github" - } - }, - "nixTools": { - "flake": false, - "locked": { - "lastModified": 1644395812, - "narHash": "sha256-BVFk/BEsTLq5MMZvdy3ZYHKfaS3dHrsKh4+tb5t5b58=", - "owner": "input-output-hk", - "repo": "nix-tools", - "rev": "d847c63b99bbec78bf83be2a61dc9f09b8a9ccc1", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "nix-tools", - "type": "github" - } - }, - "nix_2": { - "inputs": { - "lowdown-src": "lowdown-src_2", - "nixpkgs": "nixpkgs_3", - "nixpkgs-regression": "nixpkgs-regression_2" - }, - "locked": { - "lastModified": 1643066034, - "narHash": "sha256-xEPeMcNJVOeZtoN+d+aRwolpW8mFSEQx76HTRdlhPhg=", - "owner": "NixOS", - "repo": "nix", - "rev": "a1cd7e58606a41fcf62bf8637804cf8306f17f62", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "2.6.0", - "repo": "nix", - "type": "github" - } - }, - "nix_3": { - "inputs": { - "lowdown-src": "lowdown-src_3", - "nixpkgs": "nixpkgs_5", - "nixpkgs-regression": "nixpkgs-regression_3" - }, - "locked": { - "lastModified": 1643066034, - "narHash": "sha256-xEPeMcNJVOeZtoN+d+aRwolpW8mFSEQx76HTRdlhPhg=", - "owner": "NixOS", - "repo": "nix", - "rev": "a1cd7e58606a41fcf62bf8637804cf8306f17f62", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "2.6.0", - "repo": "nix", - "type": "github" - } - }, - "nix_4": { - "inputs": { - "lowdown-src": "lowdown-src_4", - "nixpkgs": "nixpkgs_21", - "nixpkgs-regression": "nixpkgs-regression_4" - }, - "locked": { - "lastModified": 1661606874, - "narHash": "sha256-9+rpYzI+SmxJn+EbYxjGv68Ucp22bdFUSy/4LkHkkDQ=", - "owner": "NixOS", - "repo": "nix", - "rev": "11e45768b34fdafdcf019ddbd337afa16127ff0f", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "2.11.0", - "repo": "nix", - "type": "github" - } - }, - "nixago": { - "inputs": { - "flake-utils": [ - "haskellNix", - "tullia", - "std", - "flake-utils" - ], - "nixago-exts": [ - "haskellNix", - "tullia", - "std", - "blank" - ], - "nixpkgs": [ - "haskellNix", - "tullia", - "std", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1661824785, - "narHash": "sha256-/PnwdWoO/JugJZHtDUioQp3uRiWeXHUdgvoyNbXesz8=", - "owner": "nix-community", - "repo": "nixago", - "rev": "8c1f9e5f1578d4b2ea989f618588d62a335083c3", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixago", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1642336556, - "narHash": "sha256-QSPPbFEwy0T0DrIuSzAACkaANPQaR1lZR/nHZGz9z04=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "f3d9d4bd898cca7d04af2ae4f6ef01f2219df3d6", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "type": "indirect" - } - }, - "nixpkgs-2003": { - "locked": { - "lastModified": 1620055814, - "narHash": "sha256-8LEHoYSJiL901bTMVatq+rf8y7QtWuZhwwpKE2fyaRY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "1db42b7fe3878f3f5f7a4f2dc210772fd080e205", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-20.03-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2003_10": { - "locked": { - "lastModified": 1620055814, - "narHash": "sha256-8LEHoYSJiL901bTMVatq+rf8y7QtWuZhwwpKE2fyaRY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "1db42b7fe3878f3f5f7a4f2dc210772fd080e205", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-20.03-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2003_11": { - "locked": { - "lastModified": 1620055814, - "narHash": "sha256-8LEHoYSJiL901bTMVatq+rf8y7QtWuZhwwpKE2fyaRY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "1db42b7fe3878f3f5f7a4f2dc210772fd080e205", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-20.03-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2003_12": { - "locked": { - "lastModified": 1620055814, - "narHash": "sha256-8LEHoYSJiL901bTMVatq+rf8y7QtWuZhwwpKE2fyaRY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "1db42b7fe3878f3f5f7a4f2dc210772fd080e205", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-20.03-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2003_13": { - "locked": { - "lastModified": 1620055814, - "narHash": "sha256-8LEHoYSJiL901bTMVatq+rf8y7QtWuZhwwpKE2fyaRY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "1db42b7fe3878f3f5f7a4f2dc210772fd080e205", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-20.03-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2003_14": { - "locked": { - "lastModified": 1620055814, - "narHash": "sha256-8LEHoYSJiL901bTMVatq+rf8y7QtWuZhwwpKE2fyaRY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "1db42b7fe3878f3f5f7a4f2dc210772fd080e205", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-20.03-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2003_15": { - "locked": { - "lastModified": 1620055814, - "narHash": "sha256-8LEHoYSJiL901bTMVatq+rf8y7QtWuZhwwpKE2fyaRY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "1db42b7fe3878f3f5f7a4f2dc210772fd080e205", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-20.03-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2003_16": { - "locked": { - "lastModified": 1620055814, - "narHash": "sha256-8LEHoYSJiL901bTMVatq+rf8y7QtWuZhwwpKE2fyaRY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "1db42b7fe3878f3f5f7a4f2dc210772fd080e205", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-20.03-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2003_17": { - "locked": { - "lastModified": 1620055814, - "narHash": "sha256-8LEHoYSJiL901bTMVatq+rf8y7QtWuZhwwpKE2fyaRY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "1db42b7fe3878f3f5f7a4f2dc210772fd080e205", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-20.03-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2003_18": { - "locked": { - "lastModified": 1620055814, - "narHash": "sha256-8LEHoYSJiL901bTMVatq+rf8y7QtWuZhwwpKE2fyaRY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "1db42b7fe3878f3f5f7a4f2dc210772fd080e205", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-20.03-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2003_19": { - "locked": { - "lastModified": 1620055814, - "narHash": "sha256-8LEHoYSJiL901bTMVatq+rf8y7QtWuZhwwpKE2fyaRY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "1db42b7fe3878f3f5f7a4f2dc210772fd080e205", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-20.03-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2003_2": { - "locked": { - "lastModified": 1620055814, - "narHash": "sha256-8LEHoYSJiL901bTMVatq+rf8y7QtWuZhwwpKE2fyaRY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "1db42b7fe3878f3f5f7a4f2dc210772fd080e205", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-20.03-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2003_3": { - "locked": { - "lastModified": 1620055814, - "narHash": "sha256-8LEHoYSJiL901bTMVatq+rf8y7QtWuZhwwpKE2fyaRY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "1db42b7fe3878f3f5f7a4f2dc210772fd080e205", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-20.03-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2003_4": { - "locked": { - "lastModified": 1620055814, - "narHash": "sha256-8LEHoYSJiL901bTMVatq+rf8y7QtWuZhwwpKE2fyaRY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "1db42b7fe3878f3f5f7a4f2dc210772fd080e205", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-20.03-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2003_5": { - "locked": { - "lastModified": 1620055814, - "narHash": "sha256-8LEHoYSJiL901bTMVatq+rf8y7QtWuZhwwpKE2fyaRY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "1db42b7fe3878f3f5f7a4f2dc210772fd080e205", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-20.03-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2003_6": { - "locked": { - "lastModified": 1620055814, - "narHash": "sha256-8LEHoYSJiL901bTMVatq+rf8y7QtWuZhwwpKE2fyaRY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "1db42b7fe3878f3f5f7a4f2dc210772fd080e205", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-20.03-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2003_7": { - "locked": { - "lastModified": 1620055814, - "narHash": "sha256-8LEHoYSJiL901bTMVatq+rf8y7QtWuZhwwpKE2fyaRY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "1db42b7fe3878f3f5f7a4f2dc210772fd080e205", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-20.03-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2003_8": { - "locked": { - "lastModified": 1620055814, - "narHash": "sha256-8LEHoYSJiL901bTMVatq+rf8y7QtWuZhwwpKE2fyaRY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "1db42b7fe3878f3f5f7a4f2dc210772fd080e205", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-20.03-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2003_9": { - "locked": { - "lastModified": 1620055814, - "narHash": "sha256-8LEHoYSJiL901bTMVatq+rf8y7QtWuZhwwpKE2fyaRY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "1db42b7fe3878f3f5f7a4f2dc210772fd080e205", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-20.03-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2105": { - "locked": { - "lastModified": 1642244250, - "narHash": "sha256-vWpUEqQdVP4srj+/YLJRTN9vjpTs4je0cdWKXPbDItc=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "0fd9ee1aa36ce865ad273f4f07fdc093adeb5c00", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-21.05-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2105_10": { - "locked": { - "lastModified": 1640283157, - "narHash": "sha256-6Ddfop+rKE+Gl9Tjp9YIrkfoYPzb8F80ergdjcq3/MY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "dde1557825c5644c869c5efc7448dc03722a8f09", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-21.05-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2105_11": { - "locked": { - "lastModified": 1640283157, - "narHash": "sha256-6Ddfop+rKE+Gl9Tjp9YIrkfoYPzb8F80ergdjcq3/MY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "dde1557825c5644c869c5efc7448dc03722a8f09", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-21.05-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2105_12": { - "locked": { - "lastModified": 1630481079, - "narHash": "sha256-leWXLchbAbqOlLT6tju631G40SzQWPqaAXQG3zH1Imw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "110a2c9ebbf5d4a94486854f18a37a938cfacbbb", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-21.05-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2105_13": { - "locked": { - "lastModified": 1640283157, - "narHash": "sha256-6Ddfop+rKE+Gl9Tjp9YIrkfoYPzb8F80ergdjcq3/MY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "dde1557825c5644c869c5efc7448dc03722a8f09", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-21.05-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2105_14": { - "locked": { - "lastModified": 1640283157, - "narHash": "sha256-6Ddfop+rKE+Gl9Tjp9YIrkfoYPzb8F80ergdjcq3/MY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "dde1557825c5644c869c5efc7448dc03722a8f09", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-21.05-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2105_15": { - "locked": { - "lastModified": 1630481079, - "narHash": "sha256-leWXLchbAbqOlLT6tju631G40SzQWPqaAXQG3zH1Imw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "110a2c9ebbf5d4a94486854f18a37a938cfacbbb", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-21.05-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2105_16": { - "locked": { - "lastModified": 1640283157, - "narHash": "sha256-6Ddfop+rKE+Gl9Tjp9YIrkfoYPzb8F80ergdjcq3/MY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "dde1557825c5644c869c5efc7448dc03722a8f09", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-21.05-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2105_17": { - "locked": { - "lastModified": 1640283157, - "narHash": "sha256-6Ddfop+rKE+Gl9Tjp9YIrkfoYPzb8F80ergdjcq3/MY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "dde1557825c5644c869c5efc7448dc03722a8f09", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-21.05-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2105_18": { - "locked": { - "lastModified": 1630481079, - "narHash": "sha256-leWXLchbAbqOlLT6tju631G40SzQWPqaAXQG3zH1Imw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "110a2c9ebbf5d4a94486854f18a37a938cfacbbb", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-21.05-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2105_19": { - "locked": { - "lastModified": 1659914493, - "narHash": "sha256-lkA5X3VNMKirvA+SUzvEhfA7XquWLci+CGi505YFAIs=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "022caabb5f2265ad4006c1fa5b1ebe69fb0c3faf", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-21.05-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2105_2": { - "locked": { - "lastModified": 1659914493, - "narHash": "sha256-lkA5X3VNMKirvA+SUzvEhfA7XquWLci+CGi505YFAIs=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "022caabb5f2265ad4006c1fa5b1ebe69fb0c3faf", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-21.05-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2105_3": { - "locked": { - "lastModified": 1642244250, - "narHash": "sha256-vWpUEqQdVP4srj+/YLJRTN9vjpTs4je0cdWKXPbDItc=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "0fd9ee1aa36ce865ad273f4f07fdc093adeb5c00", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-21.05-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2105_4": { - "locked": { - "lastModified": 1640283157, - "narHash": "sha256-6Ddfop+rKE+Gl9Tjp9YIrkfoYPzb8F80ergdjcq3/MY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "dde1557825c5644c869c5efc7448dc03722a8f09", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-21.05-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2105_5": { - "locked": { - "lastModified": 1640283157, - "narHash": "sha256-6Ddfop+rKE+Gl9Tjp9YIrkfoYPzb8F80ergdjcq3/MY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "dde1557825c5644c869c5efc7448dc03722a8f09", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-21.05-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2105_6": { - "locked": { - "lastModified": 1640283157, - "narHash": "sha256-6Ddfop+rKE+Gl9Tjp9YIrkfoYPzb8F80ergdjcq3/MY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "dde1557825c5644c869c5efc7448dc03722a8f09", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-21.05-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2105_7": { - "locked": { - "lastModified": 1640283157, - "narHash": "sha256-6Ddfop+rKE+Gl9Tjp9YIrkfoYPzb8F80ergdjcq3/MY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "dde1557825c5644c869c5efc7448dc03722a8f09", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-21.05-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2105_8": { - "locked": { - "lastModified": 1630481079, - "narHash": "sha256-leWXLchbAbqOlLT6tju631G40SzQWPqaAXQG3zH1Imw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "110a2c9ebbf5d4a94486854f18a37a938cfacbbb", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-21.05-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2105_9": { - "locked": { - "lastModified": 1640283157, - "narHash": "sha256-6Ddfop+rKE+Gl9Tjp9YIrkfoYPzb8F80ergdjcq3/MY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "dde1557825c5644c869c5efc7448dc03722a8f09", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-21.05-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2111": { - "locked": { - "lastModified": 1644510859, - "narHash": "sha256-xjpVvL5ecbyi0vxtVl/Fh9bwGlMbw3S06zE5nUzFB8A=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "0d1d5d7e3679fec9d07f2eb804d9f9fdb98378d3", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-21.11-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2111_10": { - "locked": { - "lastModified": 1640283207, - "narHash": "sha256-SCwl7ZnCfMDsuSYvwIroiAlk7n33bW8HFfY8NvKhcPA=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "64c7e3388bbd9206e437713351e814366e0c3284", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-21.11-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2111_11": { - "locked": { - "lastModified": 1640283207, - "narHash": "sha256-SCwl7ZnCfMDsuSYvwIroiAlk7n33bW8HFfY8NvKhcPA=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "64c7e3388bbd9206e437713351e814366e0c3284", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-21.11-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2111_12": { - "locked": { - "lastModified": 1638410074, - "narHash": "sha256-MQYI4k4XkoTzpeRjq5wl+1NShsl1CKq8MISFuZ81sWs=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "5b80f23502f8e902612a8c631dfce383e1c56596", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-21.11-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2111_13": { - "locked": { - "lastModified": 1640283207, - "narHash": "sha256-SCwl7ZnCfMDsuSYvwIroiAlk7n33bW8HFfY8NvKhcPA=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "64c7e3388bbd9206e437713351e814366e0c3284", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-21.11-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2111_14": { - "locked": { - "lastModified": 1640283207, - "narHash": "sha256-SCwl7ZnCfMDsuSYvwIroiAlk7n33bW8HFfY8NvKhcPA=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "64c7e3388bbd9206e437713351e814366e0c3284", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-21.11-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2111_15": { - "locked": { - "lastModified": 1638410074, - "narHash": "sha256-MQYI4k4XkoTzpeRjq5wl+1NShsl1CKq8MISFuZ81sWs=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "5b80f23502f8e902612a8c631dfce383e1c56596", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-21.11-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2111_16": { - "locked": { - "lastModified": 1640283207, - "narHash": "sha256-SCwl7ZnCfMDsuSYvwIroiAlk7n33bW8HFfY8NvKhcPA=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "64c7e3388bbd9206e437713351e814366e0c3284", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-21.11-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2111_17": { - "locked": { - "lastModified": 1640283207, - "narHash": "sha256-SCwl7ZnCfMDsuSYvwIroiAlk7n33bW8HFfY8NvKhcPA=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "64c7e3388bbd9206e437713351e814366e0c3284", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-21.11-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2111_18": { - "locked": { - "lastModified": 1638410074, - "narHash": "sha256-MQYI4k4XkoTzpeRjq5wl+1NShsl1CKq8MISFuZ81sWs=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "5b80f23502f8e902612a8c631dfce383e1c56596", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-21.11-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2111_19": { - "locked": { - "lastModified": 1659446231, - "narHash": "sha256-hekabNdTdgR/iLsgce5TGWmfIDZ86qjPhxDg/8TlzhE=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "eabc38219184cc3e04a974fe31857d8e0eac098d", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-21.11-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2111_2": { - "locked": { - "lastModified": 1659446231, - "narHash": "sha256-hekabNdTdgR/iLsgce5TGWmfIDZ86qjPhxDg/8TlzhE=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "eabc38219184cc3e04a974fe31857d8e0eac098d", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-21.11-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2111_3": { - "locked": { - "lastModified": 1644510859, - "narHash": "sha256-xjpVvL5ecbyi0vxtVl/Fh9bwGlMbw3S06zE5nUzFB8A=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "0d1d5d7e3679fec9d07f2eb804d9f9fdb98378d3", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-21.11-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2111_4": { - "locked": { - "lastModified": 1640283207, - "narHash": "sha256-SCwl7ZnCfMDsuSYvwIroiAlk7n33bW8HFfY8NvKhcPA=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "64c7e3388bbd9206e437713351e814366e0c3284", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-21.11-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2111_5": { - "locked": { - "lastModified": 1640283207, - "narHash": "sha256-SCwl7ZnCfMDsuSYvwIroiAlk7n33bW8HFfY8NvKhcPA=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "64c7e3388bbd9206e437713351e814366e0c3284", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-21.11-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2111_6": { - "locked": { - "lastModified": 1640283207, - "narHash": "sha256-SCwl7ZnCfMDsuSYvwIroiAlk7n33bW8HFfY8NvKhcPA=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "64c7e3388bbd9206e437713351e814366e0c3284", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-21.11-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2111_7": { - "locked": { - "lastModified": 1640283207, - "narHash": "sha256-SCwl7ZnCfMDsuSYvwIroiAlk7n33bW8HFfY8NvKhcPA=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "64c7e3388bbd9206e437713351e814366e0c3284", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-21.11-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2111_8": { - "locked": { - "lastModified": 1638410074, - "narHash": "sha256-MQYI4k4XkoTzpeRjq5wl+1NShsl1CKq8MISFuZ81sWs=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "5b80f23502f8e902612a8c631dfce383e1c56596", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-21.11-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2111_9": { - "locked": { - "lastModified": 1640283207, - "narHash": "sha256-SCwl7ZnCfMDsuSYvwIroiAlk7n33bW8HFfY8NvKhcPA=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "64c7e3388bbd9206e437713351e814366e0c3284", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-21.11-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2205": { - "locked": { - "lastModified": 1663981975, - "narHash": "sha256-TKaxWAVJR+a5JJauKZqibmaM5e/Pi5tBDx9s8fl/kSE=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "309faedb8338d3ae8ad8f1043b3ccf48c9cc2970", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-22.05-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2205_2": { - "locked": { - "lastModified": 1672580127, - "narHash": "sha256-3lW3xZslREhJogoOkjeZtlBtvFMyxHku7I/9IVehhT8=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "0874168639713f547c05947c76124f78441ea46c", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-22.05-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2211": { - "locked": { - "lastModified": 1675730325, - "narHash": "sha256-uNvD7fzO5hNlltNQUAFBPlcEjNG5Gkbhl/ROiX+GZU4=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "b7ce17b1ebf600a72178f6302c77b6382d09323f", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-22.11-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-lib": { - "locked": { - "lastModified": 1678582451, - "narHash": "sha256-ORE3VMo7ZB5dFctdgVq3znAklUtJBmL3F4aUCFJumfk=", - "owner": "nix-community", - "repo": "nixpkgs.lib", - "rev": "14ad8df808e5dc13bf4664da1e24a36814c28c16", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixpkgs.lib", - "type": "github" - } - }, - "nixpkgs-regression": { - "locked": { - "lastModified": 1643052045, - "narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", - "type": "indirect" - } - }, - "nixpkgs-regression_2": { - "locked": { - "lastModified": 1643052045, - "narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", - "type": "indirect" - } - }, - "nixpkgs-regression_3": { - "locked": { - "lastModified": 1643052045, - "narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", - "type": "indirect" - } - }, - "nixpkgs-regression_4": { - "locked": { - "lastModified": 1643052045, - "narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", - "type": "github" - } - }, - "nixpkgs-unstable": { - "locked": { - "lastModified": 1644486793, - "narHash": "sha256-EeijR4guVHgVv+JpOX3cQO+1XdrkJfGmiJ9XVsVU530=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "1882c6b7368fd284ad01b0a5b5601ef136321292", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-unstable_10": { - "locked": { - "lastModified": 1641285291, - "narHash": "sha256-KYaOBNGar3XWTxTsYPr9P6u74KAqNq0wobEC236U+0c=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "0432195a4b8d68faaa7d3d4b355260a3120aeeae", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-unstable_11": { - "locked": { - "lastModified": 1641285291, - "narHash": "sha256-KYaOBNGar3XWTxTsYPr9P6u74KAqNq0wobEC236U+0c=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "0432195a4b8d68faaa7d3d4b355260a3120aeeae", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-unstable_12": { - "locked": { - "lastModified": 1635295995, - "narHash": "sha256-sGYiXjFlxTTMNb4NSkgvX+knOOTipE6gqwPUQpxNF+c=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "22a500a3f87bbce73bd8d777ef920b43a636f018", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-unstable_13": { - "locked": { - "lastModified": 1641285291, - "narHash": "sha256-KYaOBNGar3XWTxTsYPr9P6u74KAqNq0wobEC236U+0c=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "0432195a4b8d68faaa7d3d4b355260a3120aeeae", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-unstable_14": { - "locked": { - "lastModified": 1641285291, - "narHash": "sha256-KYaOBNGar3XWTxTsYPr9P6u74KAqNq0wobEC236U+0c=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "0432195a4b8d68faaa7d3d4b355260a3120aeeae", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-unstable_15": { - "locked": { - "lastModified": 1635295995, - "narHash": "sha256-sGYiXjFlxTTMNb4NSkgvX+knOOTipE6gqwPUQpxNF+c=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "22a500a3f87bbce73bd8d777ef920b43a636f018", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-unstable_16": { - "locked": { - "lastModified": 1641285291, - "narHash": "sha256-KYaOBNGar3XWTxTsYPr9P6u74KAqNq0wobEC236U+0c=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "0432195a4b8d68faaa7d3d4b355260a3120aeeae", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-unstable_17": { - "locked": { - "lastModified": 1641285291, - "narHash": "sha256-KYaOBNGar3XWTxTsYPr9P6u74KAqNq0wobEC236U+0c=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "0432195a4b8d68faaa7d3d4b355260a3120aeeae", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-unstable_18": { - "locked": { - "lastModified": 1635295995, - "narHash": "sha256-sGYiXjFlxTTMNb4NSkgvX+knOOTipE6gqwPUQpxNF+c=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "22a500a3f87bbce73bd8d777ef920b43a636f018", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-unstable_19": { - "locked": { - "lastModified": 1675758091, - "narHash": "sha256-7gFSQbSVAFUHtGCNHPF7mPc5CcqDk9M2+inlVPZSneg=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "747927516efcb5e31ba03b7ff32f61f6d47e7d87", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-unstable_2": { - "locked": { - "lastModified": 1663905476, - "narHash": "sha256-0CSwRKaYravh9v6qSlBpM0gNg0UhKT2lL7Yn6Zbx7UM=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "e14f9fb57315f0d4abde222364f19f88c77d2b79", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-unstable_20": { - "locked": { - "lastModified": 1679172431, - "narHash": "sha256-XEh5gIt5otaUbEAPUY5DILUTyWe1goAyeqQtmwaFPyI=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "1603d11595a232205f03d46e635d919d1e1ec5b9", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "ref": "nixos-unstable", - "type": "indirect" - } - }, - "nixpkgs-unstable_3": { - "locked": { - "lastModified": 1644486793, - "narHash": "sha256-EeijR4guVHgVv+JpOX3cQO+1XdrkJfGmiJ9XVsVU530=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "1882c6b7368fd284ad01b0a5b5601ef136321292", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-unstable_4": { - "locked": { - "lastModified": 1641285291, - "narHash": "sha256-KYaOBNGar3XWTxTsYPr9P6u74KAqNq0wobEC236U+0c=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "0432195a4b8d68faaa7d3d4b355260a3120aeeae", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-unstable_5": { - "locked": { - "lastModified": 1641285291, - "narHash": "sha256-KYaOBNGar3XWTxTsYPr9P6u74KAqNq0wobEC236U+0c=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "0432195a4b8d68faaa7d3d4b355260a3120aeeae", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-unstable_6": { - "locked": { - "lastModified": 1641285291, - "narHash": "sha256-KYaOBNGar3XWTxTsYPr9P6u74KAqNq0wobEC236U+0c=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "0432195a4b8d68faaa7d3d4b355260a3120aeeae", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-unstable_7": { - "locked": { - "lastModified": 1641285291, - "narHash": "sha256-KYaOBNGar3XWTxTsYPr9P6u74KAqNq0wobEC236U+0c=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "0432195a4b8d68faaa7d3d4b355260a3120aeeae", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-unstable_8": { - "locked": { - "lastModified": 1635295995, - "narHash": "sha256-sGYiXjFlxTTMNb4NSkgvX+knOOTipE6gqwPUQpxNF+c=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "22a500a3f87bbce73bd8d777ef920b43a636f018", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-unstable_9": { - "locked": { - "lastModified": 1641285291, - "narHash": "sha256-KYaOBNGar3XWTxTsYPr9P6u74KAqNq0wobEC236U+0c=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "0432195a4b8d68faaa7d3d4b355260a3120aeeae", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_10": { - "locked": { - "lastModified": 1642336556, - "narHash": "sha256-QSPPbFEwy0T0DrIuSzAACkaANPQaR1lZR/nHZGz9z04=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "f3d9d4bd898cca7d04af2ae4f6ef01f2219df3d6", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "type": "indirect" - } - }, - "nixpkgs_11": { - "locked": { - "lastModified": 1642336556, - "narHash": "sha256-QSPPbFEwy0T0DrIuSzAACkaANPQaR1lZR/nHZGz9z04=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "f3d9d4bd898cca7d04af2ae4f6ef01f2219df3d6", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "type": "indirect" - } - }, - "nixpkgs_12": { - "locked": { - "lastModified": 1642336556, - "narHash": "sha256-QSPPbFEwy0T0DrIuSzAACkaANPQaR1lZR/nHZGz9z04=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "f3d9d4bd898cca7d04af2ae4f6ef01f2219df3d6", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "type": "indirect" - } - }, - "nixpkgs_13": { - "locked": { - "lastModified": 1642336556, - "narHash": "sha256-QSPPbFEwy0T0DrIuSzAACkaANPQaR1lZR/nHZGz9z04=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "f3d9d4bd898cca7d04af2ae4f6ef01f2219df3d6", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "type": "indirect" - } - }, - "nixpkgs_14": { - "locked": { - "lastModified": 1642336556, - "narHash": "sha256-QSPPbFEwy0T0DrIuSzAACkaANPQaR1lZR/nHZGz9z04=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "f3d9d4bd898cca7d04af2ae4f6ef01f2219df3d6", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "type": "indirect" - } - }, - "nixpkgs_15": { - "locked": { - "lastModified": 1642336556, - "narHash": "sha256-QSPPbFEwy0T0DrIuSzAACkaANPQaR1lZR/nHZGz9z04=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "f3d9d4bd898cca7d04af2ae4f6ef01f2219df3d6", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "type": "indirect" - } - }, - "nixpkgs_16": { - "locked": { - "lastModified": 1646470760, - "narHash": "sha256-dQISyucVCCPaFioUhy5ZgfBz8rOMKGI8k13aPDFTqEs=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "1fc7212a2c3992eedc6eedf498955c321ad81cc2", - "type": "github" - }, - "original": { - "owner": "nixos", - "repo": "nixpkgs", - "rev": "1fc7212a2c3992eedc6eedf498955c321ad81cc2", - "type": "github" - } - }, - "nixpkgs_17": { - "locked": { - "lastModified": 1619531122, - "narHash": "sha256-ovm5bo6PkZzNKh2YGXbRKYIjega0EjiEP0YDwyeXEYU=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "bb80d578e8ad3cb5a607f468ac00cc546d0396dc", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "type": "indirect" - } - }, - "nixpkgs_18": { - "locked": { - "lastModified": 1656461576, - "narHash": "sha256-rlmmw6lIlkMQIiB+NsnO8wQYWTfle8TA41UREPLP5VY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "cf3ab54b4afe2b7477faa1dd0b65bf74c055d70c", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_19": { - "locked": { - "lastModified": 1655567057, - "narHash": "sha256-Cc5hQSMsTzOHmZnYm8OSJ5RNUp22bd5NADWLHorULWQ=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "e0a42267f73ea52adc061a64650fddc59906fc99", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "type": "indirect" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1632864508, - "narHash": "sha256-d127FIvGR41XbVRDPVvozUPQ/uRHbHwvfyKHwEt5xFM=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "82891b5e2c2359d7e58d08849e4c89511ab94234", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "ref": "nixos-21.05-small", - "type": "indirect" - } - }, - "nixpkgs_20": { - "locked": { - "lastModified": 1656401090, - "narHash": "sha256-bUS2nfQsvTQW2z8SK7oEFSElbmoBahOPtbXPm0AL3I4=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "16de63fcc54e88b9a106a603038dd5dd2feb21eb", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "type": "indirect" - } - }, - "nixpkgs_21": { - "locked": { - "lastModified": 1657693803, - "narHash": "sha256-G++2CJ9u0E7NNTAi9n5G8TdDmGJXcIjkJ3NF8cetQB8=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "365e1b3a859281cf11b94f87231adeabbdd878a2", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-22.05-small", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_22": { - "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_23": { - "locked": { - "lastModified": 1672580127, - "narHash": "sha256-3lW3xZslREhJogoOkjeZtlBtvFMyxHku7I/9IVehhT8=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "0874168639713f547c05947c76124f78441ea46c", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "release-22.05", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_24": { - "locked": { - "lastModified": 1654807842, - "narHash": "sha256-ADymZpr6LuTEBXcy6RtFHcUZdjKTBRTMYwu19WOx17E=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "fc909087cc3386955f21b4665731dbdaceefb1d8", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_25": { - "locked": { - "lastModified": 1678872516, - "narHash": "sha256-/E1YwtMtFAu2KUQKV/1+KFuReYPANM2Rzehk84VxVoc=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "9b8e5abb18324c7fe9f07cb100c3cd4a29cda8b8", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-22.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_26": { - "locked": { - "lastModified": 1665087388, - "narHash": "sha256-FZFPuW9NWHJteATOf79rZfwfRn5fE0wi9kRzvGfDHPA=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "95fda953f6db2e9496d2682c4fc7b82f959878f7", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_3": { - "locked": { - "lastModified": 1632864508, - "narHash": "sha256-d127FIvGR41XbVRDPVvozUPQ/uRHbHwvfyKHwEt5xFM=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "82891b5e2c2359d7e58d08849e4c89511ab94234", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "ref": "nixos-21.05-small", - "type": "indirect" - } - }, - "nixpkgs_4": { - "locked": { - "lastModified": 1642336556, - "narHash": "sha256-QSPPbFEwy0T0DrIuSzAACkaANPQaR1lZR/nHZGz9z04=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "f3d9d4bd898cca7d04af2ae4f6ef01f2219df3d6", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "type": "indirect" - } - }, - "nixpkgs_5": { - "locked": { - "lastModified": 1632864508, - "narHash": "sha256-d127FIvGR41XbVRDPVvozUPQ/uRHbHwvfyKHwEt5xFM=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "82891b5e2c2359d7e58d08849e4c89511ab94234", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "ref": "nixos-21.05-small", - "type": "indirect" - } - }, - "nixpkgs_6": { - "locked": { - "lastModified": 1642336556, - "narHash": "sha256-QSPPbFEwy0T0DrIuSzAACkaANPQaR1lZR/nHZGz9z04=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "f3d9d4bd898cca7d04af2ae4f6ef01f2219df3d6", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "type": "indirect" - } - }, - "nixpkgs_7": { - "locked": { - "lastModified": 1642336556, - "narHash": "sha256-QSPPbFEwy0T0DrIuSzAACkaANPQaR1lZR/nHZGz9z04=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "f3d9d4bd898cca7d04af2ae4f6ef01f2219df3d6", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "type": "indirect" - } - }, - "nixpkgs_8": { - "locked": { - "lastModified": 1642336556, - "narHash": "sha256-QSPPbFEwy0T0DrIuSzAACkaANPQaR1lZR/nHZGz9z04=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "f3d9d4bd898cca7d04af2ae4f6ef01f2219df3d6", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "type": "indirect" - } - }, - "nixpkgs_9": { - "locked": { - "lastModified": 1642336556, - "narHash": "sha256-QSPPbFEwy0T0DrIuSzAACkaANPQaR1lZR/nHZGz9z04=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "f3d9d4bd898cca7d04af2ae4f6ef01f2219df3d6", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "type": "indirect" - } - }, - "node-measured": { - "inputs": { - "cardano-mainnet-mirror": "cardano-mainnet-mirror_2", - "cardano-node-workbench": "cardano-node-workbench_3", - "customConfig": "customConfig_4", - "flake-compat": "flake-compat_5", - "haskellNix": "haskellNix_4", - "hostNixpkgs": [ - "cardano-node-1_35_4", - "node-measured", - "nixpkgs" - ], - "iohkNix": "iohkNix_4", - "nixpkgs": [ - "cardano-node-1_35_4", - "node-measured", - "haskellNix", - "nixpkgs-2105" - ], - "node-measured": "node-measured_2", - "node-process": "node-process", - "node-snapshot": "node-snapshot", - "plutus-apps": "plutus-apps_3", - "utils": "utils_14" - }, - "locked": { - "lastModified": 1648681325, - "narHash": "sha256-6oWDYmMb+V4x0jCoYDzKfBJMpr7Mx5zA3WMpNHspuSw=", - "owner": "input-output-hk", - "repo": "cardano-node", - "rev": "78675fbf8986c87c0d2356b727a0ec2060f1adba", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-node", - "type": "github" - } - }, - "node-measured_2": { - "inputs": { - "cardano-node-workbench": "cardano-node-workbench_5", - "customConfig": "customConfig_5", - "flake-compat": "flake-compat_6", - "haskellNix": "haskellNix_5", - "hostNixpkgs": [ - "cardano-node-1_35_4", - "node-measured", - "node-measured", - "nixpkgs" - ], - "iohkNix": "iohkNix_5", - "membench": "membench_3", - "nixpkgs": [ - "cardano-node-1_35_4", - "node-measured", - "node-measured", - "haskellNix", - "nixpkgs-2105" - ], - "plutus-example": "plutus-example_2", - "utils": "utils_6" - }, - "locked": { - "lastModified": 1647614422, - "narHash": "sha256-TB5W6a4ni2yIbh/8I8daDsHeiTvHJKuP/5S03Xn8Jyo=", - "owner": "input-output-hk", - "repo": "cardano-node", - "rev": "c98f5bc78d94f92b23ec5095c7f5650bf209b51c", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-node", - "type": "github" - } - }, - "node-process": { - "inputs": { - "cardano-node-workbench": "cardano-node-workbench_6", - "customConfig": "customConfig_9", - "flake-compat": "flake-compat_7", - "haskellNix": "haskellNix_9", - "hostNixpkgs": [ - "cardano-node-1_35_4", - "node-measured", - "node-process", - "nixpkgs" - ], - "iohkNix": "iohkNix_9", - "membench": "membench_6", - "nixpkgs": [ - "cardano-node-1_35_4", - "node-measured", - "node-process", - "haskellNix", - "nixpkgs-2105" - ], - "plutus-example": "plutus-example_4", - "utils": "utils_10" - }, - "locked": { - "lastModified": 1647614422, - "narHash": "sha256-TB5W6a4ni2yIbh/8I8daDsHeiTvHJKuP/5S03Xn8Jyo=", - "owner": "input-output-hk", - "repo": "cardano-node", - "rev": "c98f5bc78d94f92b23ec5095c7f5650bf209b51c", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-node", - "type": "github" - } - }, - "node-process_2": { - "flake": false, - "locked": { - "lastModified": 1648681325, - "narHash": "sha256-6oWDYmMb+V4x0jCoYDzKfBJMpr7Mx5zA3WMpNHspuSw=", - "owner": "input-output-hk", - "repo": "cardano-node", - "rev": "78675fbf8986c87c0d2356b727a0ec2060f1adba", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-node", - "type": "github" - } - }, - "node-snapshot": { - "inputs": { - "customConfig": "customConfig_13", - "haskellNix": "haskellNix_13", - "iohkNix": "iohkNix_13", - "membench": "membench_9", - "nixpkgs": [ - "cardano-node-1_35_4", - "node-measured", - "node-snapshot", - "haskellNix", - "nixpkgs-2105" - ], - "plutus-example": "plutus-example_5", - "utils": "utils_13" - }, - "locked": { - "lastModified": 1645120669, - "narHash": "sha256-2MKfGsYS5n69+pfqNHb4IH/E95ok1MD7mhEYfUpRcz4=", - "owner": "input-output-hk", - "repo": "cardano-node", - "rev": "7f00e3ea5a61609e19eeeee4af35241571efdf5c", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-node", - "rev": "7f00e3ea5a61609e19eeeee4af35241571efdf5c", - "type": "github" - } - }, - "node-snapshot_2": { - "inputs": { - "customConfig": "customConfig_16", - "haskellNix": "haskellNix_16", - "iohkNix": "iohkNix_16", - "membench": "membench_11", - "nixpkgs": [ - "cardano-node-1_35_4", - "node-snapshot", - "haskellNix", - "nixpkgs-2105" - ], - "plutus-example": "plutus-example_6", - "utils": "utils_17" - }, - "locked": { - "lastModified": 1645120669, - "narHash": "sha256-2MKfGsYS5n69+pfqNHb4IH/E95ok1MD7mhEYfUpRcz4=", - "owner": "input-output-hk", - "repo": "cardano-node", - "rev": "7f00e3ea5a61609e19eeeee4af35241571efdf5c", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-node", - "rev": "7f00e3ea5a61609e19eeeee4af35241571efdf5c", - "type": "github" - } - }, - "nosys": { - "locked": { - "lastModified": 1667881534, - "narHash": "sha256-FhwJ15uPLRsvaxtt/bNuqE/ykMpNAPF0upozFKhTtXM=", - "owner": "divnix", - "repo": "nosys", - "rev": "2d0d5207f6a230e9d0f660903f8db9807b54814f", - "type": "github" - }, - "original": { - "owner": "divnix", - "repo": "nosys", - "type": "github" - } - }, - "old-ghc-nix": { - "flake": false, - "locked": { - "lastModified": 1631092763, - "narHash": "sha256-sIKgO+z7tj4lw3u6oBZxqIhDrzSkvpHtv0Kki+lh9Fg=", - "owner": "angerman", - "repo": "old-ghc-nix", - "rev": "af48a7a7353e418119b6dfe3cd1463a657f342b8", - "type": "github" - }, - "original": { - "owner": "angerman", - "ref": "master", - "repo": "old-ghc-nix", - "type": "github" - } - }, - "old-ghc-nix_10": { - "flake": false, - "locked": { - "lastModified": 1631092763, - "narHash": "sha256-sIKgO+z7tj4lw3u6oBZxqIhDrzSkvpHtv0Kki+lh9Fg=", - "owner": "angerman", - "repo": "old-ghc-nix", - "rev": "af48a7a7353e418119b6dfe3cd1463a657f342b8", - "type": "github" - }, - "original": { - "owner": "angerman", - "ref": "master", - "repo": "old-ghc-nix", - "type": "github" - } - }, - "old-ghc-nix_11": { - "flake": false, - "locked": { - "lastModified": 1631092763, - "narHash": "sha256-sIKgO+z7tj4lw3u6oBZxqIhDrzSkvpHtv0Kki+lh9Fg=", - "owner": "angerman", - "repo": "old-ghc-nix", - "rev": "af48a7a7353e418119b6dfe3cd1463a657f342b8", - "type": "github" - }, - "original": { - "owner": "angerman", - "ref": "master", - "repo": "old-ghc-nix", - "type": "github" - } - }, - "old-ghc-nix_12": { - "flake": false, - "locked": { - "lastModified": 1631092763, - "narHash": "sha256-sIKgO+z7tj4lw3u6oBZxqIhDrzSkvpHtv0Kki+lh9Fg=", - "owner": "angerman", - "repo": "old-ghc-nix", - "rev": "af48a7a7353e418119b6dfe3cd1463a657f342b8", - "type": "github" - }, - "original": { - "owner": "angerman", - "ref": "master", - "repo": "old-ghc-nix", - "type": "github" - } - }, - "old-ghc-nix_13": { - "flake": false, - "locked": { - "lastModified": 1631092763, - "narHash": "sha256-sIKgO+z7tj4lw3u6oBZxqIhDrzSkvpHtv0Kki+lh9Fg=", - "owner": "angerman", - "repo": "old-ghc-nix", - "rev": "af48a7a7353e418119b6dfe3cd1463a657f342b8", - "type": "github" - }, - "original": { - "owner": "angerman", - "ref": "master", - "repo": "old-ghc-nix", - "type": "github" - } - }, - "old-ghc-nix_14": { - "flake": false, - "locked": { - "lastModified": 1631092763, - "narHash": "sha256-sIKgO+z7tj4lw3u6oBZxqIhDrzSkvpHtv0Kki+lh9Fg=", - "owner": "angerman", - "repo": "old-ghc-nix", - "rev": "af48a7a7353e418119b6dfe3cd1463a657f342b8", - "type": "github" - }, - "original": { - "owner": "angerman", - "ref": "master", - "repo": "old-ghc-nix", - "type": "github" - } - }, - "old-ghc-nix_15": { - "flake": false, - "locked": { - "lastModified": 1631092763, - "narHash": "sha256-sIKgO+z7tj4lw3u6oBZxqIhDrzSkvpHtv0Kki+lh9Fg=", - "owner": "angerman", - "repo": "old-ghc-nix", - "rev": "af48a7a7353e418119b6dfe3cd1463a657f342b8", - "type": "github" - }, - "original": { - "owner": "angerman", - "ref": "master", - "repo": "old-ghc-nix", - "type": "github" - } - }, - "old-ghc-nix_16": { - "flake": false, - "locked": { - "lastModified": 1631092763, - "narHash": "sha256-sIKgO+z7tj4lw3u6oBZxqIhDrzSkvpHtv0Kki+lh9Fg=", - "owner": "angerman", - "repo": "old-ghc-nix", - "rev": "af48a7a7353e418119b6dfe3cd1463a657f342b8", - "type": "github" - }, - "original": { - "owner": "angerman", - "ref": "master", - "repo": "old-ghc-nix", - "type": "github" - } - }, - "old-ghc-nix_17": { - "flake": false, - "locked": { - "lastModified": 1631092763, - "narHash": "sha256-sIKgO+z7tj4lw3u6oBZxqIhDrzSkvpHtv0Kki+lh9Fg=", - "owner": "angerman", - "repo": "old-ghc-nix", - "rev": "af48a7a7353e418119b6dfe3cd1463a657f342b8", - "type": "github" - }, - "original": { - "owner": "angerman", - "ref": "master", - "repo": "old-ghc-nix", - "type": "github" - } - }, - "old-ghc-nix_18": { - "flake": false, - "locked": { - "lastModified": 1631092763, - "narHash": "sha256-sIKgO+z7tj4lw3u6oBZxqIhDrzSkvpHtv0Kki+lh9Fg=", - "owner": "angerman", - "repo": "old-ghc-nix", - "rev": "af48a7a7353e418119b6dfe3cd1463a657f342b8", - "type": "github" - }, - "original": { - "owner": "angerman", - "ref": "master", - "repo": "old-ghc-nix", - "type": "github" - } - }, - "old-ghc-nix_19": { - "flake": false, - "locked": { - "lastModified": 1631092763, - "narHash": "sha256-sIKgO+z7tj4lw3u6oBZxqIhDrzSkvpHtv0Kki+lh9Fg=", - "owner": "angerman", - "repo": "old-ghc-nix", - "rev": "af48a7a7353e418119b6dfe3cd1463a657f342b8", - "type": "github" - }, - "original": { - "owner": "angerman", - "ref": "master", - "repo": "old-ghc-nix", - "type": "github" - } - }, - "old-ghc-nix_2": { - "flake": false, - "locked": { - "lastModified": 1631092763, - "narHash": "sha256-sIKgO+z7tj4lw3u6oBZxqIhDrzSkvpHtv0Kki+lh9Fg=", - "owner": "angerman", - "repo": "old-ghc-nix", - "rev": "af48a7a7353e418119b6dfe3cd1463a657f342b8", - "type": "github" - }, - "original": { - "owner": "angerman", - "ref": "master", - "repo": "old-ghc-nix", - "type": "github" - } - }, - "old-ghc-nix_3": { - "flake": false, - "locked": { - "lastModified": 1631092763, - "narHash": "sha256-sIKgO+z7tj4lw3u6oBZxqIhDrzSkvpHtv0Kki+lh9Fg=", - "owner": "angerman", - "repo": "old-ghc-nix", - "rev": "af48a7a7353e418119b6dfe3cd1463a657f342b8", - "type": "github" - }, - "original": { - "owner": "angerman", - "ref": "master", - "repo": "old-ghc-nix", - "type": "github" - } - }, - "old-ghc-nix_4": { - "flake": false, - "locked": { - "lastModified": 1631092763, - "narHash": "sha256-sIKgO+z7tj4lw3u6oBZxqIhDrzSkvpHtv0Kki+lh9Fg=", - "owner": "angerman", - "repo": "old-ghc-nix", - "rev": "af48a7a7353e418119b6dfe3cd1463a657f342b8", - "type": "github" - }, - "original": { - "owner": "angerman", - "ref": "master", - "repo": "old-ghc-nix", - "type": "github" - } - }, - "old-ghc-nix_5": { - "flake": false, - "locked": { - "lastModified": 1631092763, - "narHash": "sha256-sIKgO+z7tj4lw3u6oBZxqIhDrzSkvpHtv0Kki+lh9Fg=", - "owner": "angerman", - "repo": "old-ghc-nix", - "rev": "af48a7a7353e418119b6dfe3cd1463a657f342b8", + "lastModified": 1661606874, + "narHash": "sha256-9+rpYzI+SmxJn+EbYxjGv68Ucp22bdFUSy/4LkHkkDQ=", + "owner": "NixOS", + "repo": "nix", + "rev": "11e45768b34fdafdcf019ddbd337afa16127ff0f", "type": "github" }, "original": { - "owner": "angerman", - "ref": "master", - "repo": "old-ghc-nix", + "owner": "NixOS", + "ref": "2.11.0", + "repo": "nix", "type": "github" } }, - "old-ghc-nix_6": { - "flake": false, + "nix-nomad": { + "inputs": { + "flake-compat": "flake-compat_3", + "flake-utils": [ + "cardano-node-runtime", + "tullia", + "nix2container", + "flake-utils" + ], + "gomod2nix": "gomod2nix", + "nixpkgs": [ + "cardano-node-runtime", + "tullia", + "nixpkgs" + ], + "nixpkgs-lib": [ + "cardano-node-runtime", + "tullia", + "nixpkgs" + ] + }, "locked": { - "lastModified": 1631092763, - "narHash": "sha256-sIKgO+z7tj4lw3u6oBZxqIhDrzSkvpHtv0Kki+lh9Fg=", - "owner": "angerman", - "repo": "old-ghc-nix", - "rev": "af48a7a7353e418119b6dfe3cd1463a657f342b8", + "lastModified": 1658277770, + "narHash": "sha256-T/PgG3wUn8Z2rnzfxf2VqlR1CBjInPE0l1yVzXxPnt0=", + "owner": "tristanpemble", + "repo": "nix-nomad", + "rev": "054adcbdd0a836ae1c20951b67ed549131fd2d70", "type": "github" }, "original": { - "owner": "angerman", - "ref": "master", - "repo": "old-ghc-nix", + "owner": "tristanpemble", + "repo": "nix-nomad", "type": "github" } }, - "old-ghc-nix_7": { - "flake": false, + "nix2container": { + "inputs": { + "flake-utils": "flake-utils_3", + "nixpkgs": "nixpkgs_3" + }, "locked": { - "lastModified": 1631092763, - "narHash": "sha256-sIKgO+z7tj4lw3u6oBZxqIhDrzSkvpHtv0Kki+lh9Fg=", - "owner": "angerman", - "repo": "old-ghc-nix", - "rev": "af48a7a7353e418119b6dfe3cd1463a657f342b8", + "lastModified": 1671269339, + "narHash": "sha256-KR2SXh4c2Y+bgbCfXjTGJ74O9/u4CAPFA0KYZHhKf5Q=", + "owner": "nlewo", + "repo": "nix2container", + "rev": "6800fff45afecc7e47c334d14cf2b2f4f25601a0", "type": "github" }, "original": { - "owner": "angerman", - "ref": "master", - "repo": "old-ghc-nix", + "owner": "nlewo", + "repo": "nix2container", "type": "github" } }, - "old-ghc-nix_8": { - "flake": false, + "nix2container_2": { + "inputs": { + "flake-utils": "flake-utils_4", + "nixpkgs": "nixpkgs_5" + }, "locked": { - "lastModified": 1631092763, - "narHash": "sha256-sIKgO+z7tj4lw3u6oBZxqIhDrzSkvpHtv0Kki+lh9Fg=", - "owner": "angerman", - "repo": "old-ghc-nix", - "rev": "af48a7a7353e418119b6dfe3cd1463a657f342b8", + "lastModified": 1658567952, + "narHash": "sha256-XZ4ETYAMU7XcpEeAFP3NOl9yDXNuZAen/aIJ84G+VgA=", + "owner": "nlewo", + "repo": "nix2container", + "rev": "60bb43d405991c1378baf15a40b5811a53e32ffa", "type": "github" }, "original": { - "owner": "angerman", - "ref": "master", - "repo": "old-ghc-nix", + "owner": "nlewo", + "repo": "nix2container", "type": "github" } }, - "old-ghc-nix_9": { - "flake": false, + "nix_2": { + "inputs": { + "lowdown-src": "lowdown-src_2", + "nixpkgs": "nixpkgs_11", + "nixpkgs-regression": "nixpkgs-regression_2" + }, "locked": { - "lastModified": 1631092763, - "narHash": "sha256-sIKgO+z7tj4lw3u6oBZxqIhDrzSkvpHtv0Kki+lh9Fg=", - "owner": "angerman", - "repo": "old-ghc-nix", - "rev": "af48a7a7353e418119b6dfe3cd1463a657f342b8", + "lastModified": 1661606874, + "narHash": "sha256-9+rpYzI+SmxJn+EbYxjGv68Ucp22bdFUSy/4LkHkkDQ=", + "owner": "NixOS", + "repo": "nix", + "rev": "11e45768b34fdafdcf019ddbd337afa16127ff0f", "type": "github" }, "original": { - "owner": "angerman", - "ref": "master", - "repo": "old-ghc-nix", + "owner": "NixOS", + "ref": "2.11.0", + "repo": "nix", "type": "github" } }, - "ouroboros-network": { - "flake": false, + "nixago": { + "inputs": { + "flake-utils": [ + "cardano-node-runtime", + "tullia", + "std", + "flake-utils" + ], + "nixago-exts": [ + "cardano-node-runtime", + "tullia", + "std", + "blank" + ], + "nixpkgs": [ + "cardano-node-runtime", + "tullia", + "std", + "nixpkgs" + ] + }, "locked": { - "lastModified": 1643385024, - "narHash": "sha256-9R4Z1jBsTcEgBHxhzjCJnroEcdfMsTjf8kwg6uPue+Q=", - "owner": "input-output-hk", - "repo": "ouroboros-network", - "rev": "8e97076176d465f5f4f86d5b5596220272630649", + "lastModified": 1661824785, + "narHash": "sha256-/PnwdWoO/JugJZHtDUioQp3uRiWeXHUdgvoyNbXesz8=", + "owner": "nix-community", + "repo": "nixago", + "rev": "8c1f9e5f1578d4b2ea989f618588d62a335083c3", "type": "github" }, "original": { - "owner": "input-output-hk", - "repo": "ouroboros-network", + "owner": "nix-community", + "repo": "nixago", "type": "github" } }, - "ouroboros-network_10": { - "flake": false, + "nixpkgs": { "locked": { - "lastModified": 1643385024, - "narHash": "sha256-9R4Z1jBsTcEgBHxhzjCJnroEcdfMsTjf8kwg6uPue+Q=", - "owner": "input-output-hk", - "repo": "ouroboros-network", - "rev": "8e97076176d465f5f4f86d5b5596220272630649", + "lastModified": 1642336556, + "narHash": "sha256-QSPPbFEwy0T0DrIuSzAACkaANPQaR1lZR/nHZGz9z04=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "f3d9d4bd898cca7d04af2ae4f6ef01f2219df3d6", "type": "github" }, "original": { - "owner": "input-output-hk", - "repo": "ouroboros-network", - "type": "github" + "id": "nixpkgs", + "type": "indirect" } }, - "ouroboros-network_2": { - "flake": false, + "nixpkgs-2003": { "locked": { - "lastModified": 1643385024, - "narHash": "sha256-9R4Z1jBsTcEgBHxhzjCJnroEcdfMsTjf8kwg6uPue+Q=", - "owner": "input-output-hk", - "repo": "ouroboros-network", - "rev": "8e97076176d465f5f4f86d5b5596220272630649", + "lastModified": 1620055814, + "narHash": "sha256-8LEHoYSJiL901bTMVatq+rf8y7QtWuZhwwpKE2fyaRY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "1db42b7fe3878f3f5f7a4f2dc210772fd080e205", "type": "github" }, "original": { - "owner": "input-output-hk", - "repo": "ouroboros-network", + "owner": "NixOS", + "ref": "nixpkgs-20.03-darwin", + "repo": "nixpkgs", "type": "github" } }, - "ouroboros-network_3": { - "flake": false, + "nixpkgs-2003_2": { "locked": { - "lastModified": 1643385024, - "narHash": "sha256-9R4Z1jBsTcEgBHxhzjCJnroEcdfMsTjf8kwg6uPue+Q=", - "owner": "input-output-hk", - "repo": "ouroboros-network", - "rev": "8e97076176d465f5f4f86d5b5596220272630649", + "lastModified": 1620055814, + "narHash": "sha256-8LEHoYSJiL901bTMVatq+rf8y7QtWuZhwwpKE2fyaRY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "1db42b7fe3878f3f5f7a4f2dc210772fd080e205", "type": "github" }, "original": { - "owner": "input-output-hk", - "repo": "ouroboros-network", + "owner": "NixOS", + "ref": "nixpkgs-20.03-darwin", + "repo": "nixpkgs", "type": "github" } }, - "ouroboros-network_4": { - "flake": false, + "nixpkgs-2105": { "locked": { - "lastModified": 1643385024, - "narHash": "sha256-9R4Z1jBsTcEgBHxhzjCJnroEcdfMsTjf8kwg6uPue+Q=", - "owner": "input-output-hk", - "repo": "ouroboros-network", - "rev": "8e97076176d465f5f4f86d5b5596220272630649", + "lastModified": 1659914493, + "narHash": "sha256-lkA5X3VNMKirvA+SUzvEhfA7XquWLci+CGi505YFAIs=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "022caabb5f2265ad4006c1fa5b1ebe69fb0c3faf", "type": "github" }, "original": { - "owner": "input-output-hk", - "repo": "ouroboros-network", + "owner": "NixOS", + "ref": "nixpkgs-21.05-darwin", + "repo": "nixpkgs", "type": "github" } }, - "ouroboros-network_5": { - "flake": false, + "nixpkgs-2105_2": { "locked": { - "lastModified": 1643385024, - "narHash": "sha256-9R4Z1jBsTcEgBHxhzjCJnroEcdfMsTjf8kwg6uPue+Q=", - "owner": "input-output-hk", - "repo": "ouroboros-network", - "rev": "8e97076176d465f5f4f86d5b5596220272630649", + "lastModified": 1659914493, + "narHash": "sha256-lkA5X3VNMKirvA+SUzvEhfA7XquWLci+CGi505YFAIs=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "022caabb5f2265ad4006c1fa5b1ebe69fb0c3faf", "type": "github" }, "original": { - "owner": "input-output-hk", - "repo": "ouroboros-network", + "owner": "NixOS", + "ref": "nixpkgs-21.05-darwin", + "repo": "nixpkgs", "type": "github" } }, - "ouroboros-network_6": { - "flake": false, + "nixpkgs-2111": { "locked": { - "lastModified": 1643385024, - "narHash": "sha256-9R4Z1jBsTcEgBHxhzjCJnroEcdfMsTjf8kwg6uPue+Q=", - "owner": "input-output-hk", - "repo": "ouroboros-network", - "rev": "8e97076176d465f5f4f86d5b5596220272630649", + "lastModified": 1659446231, + "narHash": "sha256-hekabNdTdgR/iLsgce5TGWmfIDZ86qjPhxDg/8TlzhE=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "eabc38219184cc3e04a974fe31857d8e0eac098d", "type": "github" }, "original": { - "owner": "input-output-hk", - "repo": "ouroboros-network", + "owner": "NixOS", + "ref": "nixpkgs-21.11-darwin", + "repo": "nixpkgs", "type": "github" } }, - "ouroboros-network_7": { - "flake": false, + "nixpkgs-2111_2": { "locked": { - "lastModified": 1643385024, - "narHash": "sha256-9R4Z1jBsTcEgBHxhzjCJnroEcdfMsTjf8kwg6uPue+Q=", - "owner": "input-output-hk", - "repo": "ouroboros-network", - "rev": "8e97076176d465f5f4f86d5b5596220272630649", + "lastModified": 1659446231, + "narHash": "sha256-hekabNdTdgR/iLsgce5TGWmfIDZ86qjPhxDg/8TlzhE=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "eabc38219184cc3e04a974fe31857d8e0eac098d", "type": "github" }, "original": { - "owner": "input-output-hk", - "repo": "ouroboros-network", + "owner": "NixOS", + "ref": "nixpkgs-21.11-darwin", + "repo": "nixpkgs", "type": "github" } }, - "ouroboros-network_8": { - "flake": false, + "nixpkgs-2205": { "locked": { - "lastModified": 1643385024, - "narHash": "sha256-9R4Z1jBsTcEgBHxhzjCJnroEcdfMsTjf8kwg6uPue+Q=", - "owner": "input-output-hk", - "repo": "ouroboros-network", - "rev": "8e97076176d465f5f4f86d5b5596220272630649", + "lastModified": 1682600000, + "narHash": "sha256-ha4BehR1dh8EnXSoE1m/wyyYVvHI9txjW4w5/oxsW5Y=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "50fc86b75d2744e1ab3837ef74b53f103a9b55a0", "type": "github" }, "original": { - "owner": "input-output-hk", - "repo": "ouroboros-network", + "owner": "NixOS", + "ref": "nixpkgs-22.05-darwin", + "repo": "nixpkgs", "type": "github" } }, - "ouroboros-network_9": { - "flake": false, + "nixpkgs-2205_2": { "locked": { - "lastModified": 1643385024, - "narHash": "sha256-9R4Z1jBsTcEgBHxhzjCJnroEcdfMsTjf8kwg6uPue+Q=", - "owner": "input-output-hk", - "repo": "ouroboros-network", - "rev": "8e97076176d465f5f4f86d5b5596220272630649", + "lastModified": 1682600000, + "narHash": "sha256-ha4BehR1dh8EnXSoE1m/wyyYVvHI9txjW4w5/oxsW5Y=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "50fc86b75d2744e1ab3837ef74b53f103a9b55a0", "type": "github" }, "original": { - "owner": "input-output-hk", - "repo": "ouroboros-network", + "owner": "NixOS", + "ref": "nixpkgs-22.05-darwin", + "repo": "nixpkgs", "type": "github" } }, - "plutus-apps": { - "flake": false, + "nixpkgs-2211": { "locked": { - "lastModified": 1648635956, - "narHash": "sha256-qwPhjV07SIahycFpaxqSSOztJLOlmLdgj/TjgVrjkBE=", - "owner": "input-output-hk", - "repo": "plutus-apps", - "rev": "b86ee21775422f9c0ca5ff66195014a497575d2d", + "lastModified": 1682682915, + "narHash": "sha256-haR0u/j/nUvlMloYlaOYq1FMXTvkNHw+wGxc+0qXisM=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "09f1b33fcc0f59263137e23e935c1bb03ec920e4", "type": "github" }, "original": { - "owner": "input-output-hk", - "repo": "plutus-apps", + "owner": "NixOS", + "ref": "nixpkgs-22.11-darwin", + "repo": "nixpkgs", "type": "github" } }, - "plutus-apps_2": { - "flake": false, + "nixpkgs-2211_2": { "locked": { - "lastModified": 1648036874, - "narHash": "sha256-GIL9uHQwlyD4qEpwUGlhN9o9blwhElmlKPOPjC3n714=", - "owner": "input-output-hk", - "repo": "plutus-apps", - "rev": "c9f2601e342a2fc0e2b5870ce656ef434b0efa32", + "lastModified": 1685314633, + "narHash": "sha256-8LXBPqTQXl5ofkjpJ18JcbmLJ/lWDoMxtUwiDYv0wro=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "c8a17ce7abc03c50cd072e9e6c9b389c5f61836b", "type": "github" }, "original": { - "owner": "input-output-hk", - "repo": "plutus-apps", + "owner": "NixOS", + "ref": "nixpkgs-22.11-darwin", + "repo": "nixpkgs", "type": "github" } }, - "plutus-apps_3": { - "flake": false, + "nixpkgs-2305": { "locked": { - "lastModified": 1648036874, - "narHash": "sha256-GIL9uHQwlyD4qEpwUGlhN9o9blwhElmlKPOPjC3n714=", - "owner": "input-output-hk", - "repo": "plutus-apps", - "rev": "c9f2601e342a2fc0e2b5870ce656ef434b0efa32", + "lastModified": 1685338297, + "narHash": "sha256-+Aq4O0Jn1W1q927ZHc3Zn6RO7bwQGmb6O8xYoGy0KrM=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "6287b47dbfabbb8bfbb9b1b53d198ad58a774de4", "type": "github" }, "original": { - "owner": "input-output-hk", - "repo": "plutus-apps", + "owner": "NixOS", + "ref": "nixpkgs-23.05-darwin", + "repo": "nixpkgs", "type": "github" } }, - "plutus-apps_4": { - "flake": false, + "nixpkgs-lib": { "locked": { - "lastModified": 1647347289, - "narHash": "sha256-dxKZ1Zvflyt6igYm39POV6X/0giKbfb4U7D1TvevQls=", - "owner": "input-output-hk", - "repo": "plutus-apps", - "rev": "2a40552f4654d695f21783c86e8ae59243ce9dfa", + "dir": "lib", + "lastModified": 1678375444, + "narHash": "sha256-XIgHfGvjFvZQ8hrkfocanCDxMefc/77rXeHvYdzBMc8=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "130fa0baaa2b93ec45523fdcde942f6844ee9f6e", "type": "github" }, "original": { - "owner": "input-output-hk", - "repo": "plutus-apps", + "dir": "lib", + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", "type": "github" } }, - "plutus-example": { - "inputs": { - "customConfig": "customConfig_8", - "haskellNix": "haskellNix_8", - "iohkNix": "iohkNix_8", - "nixpkgs": [ - "cardano-node-1_35_4", - "node-measured", - "node-measured", - "membench", - "cardano-node-snapshot", - "plutus-example", - "haskellNix", - "nixpkgs-2105" - ], - "utils": "utils_4" - }, + "nixpkgs-lib_2": { "locked": { - "lastModified": 1640022647, - "narHash": "sha256-M+YnF7Zj/7QK2pu0T75xNVaX0eEeijtBH8yz+jEHIMM=", - "owner": "input-output-hk", - "repo": "cardano-node", - "rev": "814df2c146f5d56f8c35a681fe75e85b905aed5d", + "dir": "lib", + "lastModified": 1671359686, + "narHash": "sha256-3MpC6yZo+Xn9cPordGz2/ii6IJpP2n8LE8e/ebUXLrs=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "04f574a1c0fde90b51bf68198e2297ca4e7cccf4", "type": "github" }, "original": { - "owner": "input-output-hk", - "repo": "cardano-node", - "rev": "814df2c146f5d56f8c35a681fe75e85b905aed5d", + "dir": "lib", + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", "type": "github" } }, - "plutus-example_2": { - "flake": false, + "nixpkgs-regression": { "locked": { - "lastModified": 1640022647, - "narHash": "sha256-M+YnF7Zj/7QK2pu0T75xNVaX0eEeijtBH8yz+jEHIMM=", - "owner": "input-output-hk", - "repo": "cardano-node", - "rev": "814df2c146f5d56f8c35a681fe75e85b905aed5d", + "lastModified": 1643052045, + "narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", "type": "github" }, "original": { - "owner": "input-output-hk", - "ref": "1.33.0", - "repo": "cardano-node", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", "type": "github" } }, - "plutus-example_3": { - "inputs": { - "customConfig": "customConfig_12", - "haskellNix": "haskellNix_12", - "iohkNix": "iohkNix_12", - "nixpkgs": [ - "cardano-node-1_35_4", - "node-measured", - "node-process", - "membench", - "cardano-node-snapshot", - "plutus-example", - "haskellNix", - "nixpkgs-2105" - ], - "utils": "utils_8" - }, + "nixpkgs-regression_2": { "locked": { - "lastModified": 1640022647, - "narHash": "sha256-M+YnF7Zj/7QK2pu0T75xNVaX0eEeijtBH8yz+jEHIMM=", - "owner": "input-output-hk", - "repo": "cardano-node", - "rev": "814df2c146f5d56f8c35a681fe75e85b905aed5d", + "lastModified": 1643052045, + "narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", "type": "github" }, "original": { - "owner": "input-output-hk", - "repo": "cardano-node", - "rev": "814df2c146f5d56f8c35a681fe75e85b905aed5d", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", "type": "github" } }, - "plutus-example_4": { - "flake": false, + "nixpkgs-unstable": { "locked": { - "lastModified": 1640022647, - "narHash": "sha256-M+YnF7Zj/7QK2pu0T75xNVaX0eEeijtBH8yz+jEHIMM=", - "owner": "input-output-hk", - "repo": "cardano-node", - "rev": "814df2c146f5d56f8c35a681fe75e85b905aed5d", + "lastModified": 1682656005, + "narHash": "sha256-fYplYo7so1O+rSQ2/aS+SbTPwLTeoUXk4ekKNtSl4P8=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "6806b63e824f84b0f0e60b6d660d4ae753de0477", "type": "github" }, "original": { - "owner": "input-output-hk", - "ref": "1.33.0", - "repo": "cardano-node", + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", "type": "github" } }, - "plutus-example_5": { - "inputs": { - "customConfig": "customConfig_15", - "haskellNix": "haskellNix_15", - "iohkNix": "iohkNix_15", - "nixpkgs": [ - "cardano-node-1_35_4", - "node-measured", - "node-snapshot", - "plutus-example", - "haskellNix", - "nixpkgs-2105" - ], - "utils": "utils_12" - }, + "nixpkgs-unstable_2": { "locked": { - "lastModified": 1640022647, - "narHash": "sha256-M+YnF7Zj/7QK2pu0T75xNVaX0eEeijtBH8yz+jEHIMM=", - "owner": "input-output-hk", - "repo": "cardano-node", - "rev": "814df2c146f5d56f8c35a681fe75e85b905aed5d", + "lastModified": 1685347552, + "narHash": "sha256-9woSppRyUFo26yUffORTzttJ+apOt8MmCv6RxpPNTU4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "f2f1ec390714d303cf84ba086e34e45b450dd8c4", "type": "github" }, "original": { - "owner": "input-output-hk", - "repo": "cardano-node", - "rev": "814df2c146f5d56f8c35a681fe75e85b905aed5d", + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", "type": "github" } }, - "plutus-example_6": { - "inputs": { - "customConfig": "customConfig_18", - "haskellNix": "haskellNix_18", - "iohkNix": "iohkNix_18", - "nixpkgs": [ - "cardano-node-1_35_4", - "node-snapshot", - "plutus-example", - "haskellNix", - "nixpkgs-2105" - ], - "utils": "utils_16" - }, + "nixpkgs-unstable_3": { "locked": { - "lastModified": 1640022647, - "narHash": "sha256-M+YnF7Zj/7QK2pu0T75xNVaX0eEeijtBH8yz+jEHIMM=", - "owner": "input-output-hk", - "repo": "cardano-node", - "rev": "814df2c146f5d56f8c35a681fe75e85b905aed5d", + "lastModified": 1687502512, + "narHash": "sha256-dBL/01TayOSZYxtY4cMXuNCBk8UMLoqRZA+94xiFpJA=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "3ae20aa58a6c0d1ca95c9b11f59a2d12eebc511f", "type": "github" }, "original": { - "owner": "input-output-hk", - "repo": "cardano-node", - "rev": "814df2c146f5d56f8c35a681fe75e85b905aed5d", - "type": "github" + "id": "nixpkgs", + "ref": "nixos-unstable", + "type": "indirect" } }, - "pre-commit-hooks": { - "inputs": { - "flake-utils": "flake-utils_20", - "nixpkgs": "nixpkgs_17" - }, + "nixpkgs_10": { "locked": { - "lastModified": 1639823344, - "narHash": "sha256-jlsQb2y6A5dB1R0wVPLOfDGM0wLyfYqEJNzMtXuzCXw=", - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "rev": "ff9c0b459ddc4b79c06e19d44251daa8e9cd1746", + "lastModified": 1687245362, + "narHash": "sha256-+f9tH+k3u9lSS136M2LCsl5NJTNPvhmHEiVOcypiu1E=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "205ee073b053fc4d87d5adf2ebd44ebbef7bca4d", "type": "github" }, "original": { - "owner": "cachix", - "repo": "pre-commit-hooks.nix", + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", "type": "github" } }, - "root": { - "inputs": { - "CHaP": "CHaP", - "cardano-node-1_35_4": "cardano-node-1_35_4", - "customConfig": "customConfig_19", - "ema": "ema", - "emanote": "emanote", - "flake-compat": "flake-compat_9", - "flake-utils": "flake-utils_22", - "hackage": "hackage_18", - "haskellNix": "haskellNix_19", - "hostNixpkgs": [ - "nixpkgs" - ], - "iohkNix": "iohkNix_19", - "nixpkgs": [ - "haskellNix", - "nixpkgs-unstable" - ], - "nixpkgs-unstable": "nixpkgs-unstable_20" - } - }, - "stackage": { - "flake": false, + "nixpkgs_11": { "locked": { - "lastModified": 1648603096, - "narHash": "sha256-d1WKzMnk+2ZOXz3YSSqYHrMSHRVSZth+eS/pO5iSwVE=", - "owner": "input-output-hk", - "repo": "stackage.nix", - "rev": "c2bdc5825795d3a6938aa74e598da57591b2e150", + "lastModified": 1657693803, + "narHash": "sha256-G++2CJ9u0E7NNTAi9n5G8TdDmGJXcIjkJ3NF8cetQB8=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "365e1b3a859281cf11b94f87231adeabbdd878a2", "type": "github" }, "original": { - "owner": "input-output-hk", - "repo": "stackage.nix", + "owner": "NixOS", + "ref": "nixos-22.05-small", + "repo": "nixpkgs", "type": "github" } }, - "stackage_10": { - "flake": false, + "nixpkgs_2": { "locked": { - "lastModified": 1643073493, - "narHash": "sha256-5cPd1+i/skvJY9vJO1BhVRPcJObqkxDSywBEppDmb1U=", - "owner": "input-output-hk", - "repo": "stackage.nix", - "rev": "48e1188855ca38f3b7e2a8dba5352767a2f0a8f7", + "lastModified": 1657693803, + "narHash": "sha256-G++2CJ9u0E7NNTAi9n5G8TdDmGJXcIjkJ3NF8cetQB8=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "365e1b3a859281cf11b94f87231adeabbdd878a2", "type": "github" }, "original": { - "owner": "input-output-hk", - "repo": "stackage.nix", + "owner": "NixOS", + "ref": "nixos-22.05-small", + "repo": "nixpkgs", "type": "github" } }, - "stackage_11": { - "flake": false, + "nixpkgs_3": { "locked": { - "lastModified": 1643073493, - "narHash": "sha256-5cPd1+i/skvJY9vJO1BhVRPcJObqkxDSywBEppDmb1U=", - "owner": "input-output-hk", - "repo": "stackage.nix", - "rev": "48e1188855ca38f3b7e2a8dba5352767a2f0a8f7", + "lastModified": 1654807842, + "narHash": "sha256-ADymZpr6LuTEBXcy6RtFHcUZdjKTBRTMYwu19WOx17E=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "fc909087cc3386955f21b4665731dbdaceefb1d8", "type": "github" }, "original": { - "owner": "input-output-hk", - "repo": "stackage.nix", + "owner": "NixOS", + "repo": "nixpkgs", "type": "github" } }, - "stackage_12": { - "flake": false, + "nixpkgs_4": { "locked": { - "lastModified": 1639012797, - "narHash": "sha256-hiLyBa5XFBvxD+BcYPKyYd/0dNMccxAuywFNqYtIIvs=", - "owner": "input-output-hk", - "repo": "stackage.nix", - "rev": "9ea6ea359da91c75a71e334b25aa7dc5ddc4b2c6", + "lastModified": 1653581809, + "narHash": "sha256-Uvka0V5MTGbeOfWte25+tfRL3moECDh1VwokWSZUdoY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "83658b28fe638a170a19b8933aa008b30640fbd1", "type": "github" }, "original": { - "owner": "input-output-hk", - "repo": "stackage.nix", + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", "type": "github" } }, - "stackage_13": { - "flake": false, + "nixpkgs_5": { "locked": { - "lastModified": 1643073493, - "narHash": "sha256-5cPd1+i/skvJY9vJO1BhVRPcJObqkxDSywBEppDmb1U=", - "owner": "input-output-hk", - "repo": "stackage.nix", - "rev": "48e1188855ca38f3b7e2a8dba5352767a2f0a8f7", + "lastModified": 1654807842, + "narHash": "sha256-ADymZpr6LuTEBXcy6RtFHcUZdjKTBRTMYwu19WOx17E=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "fc909087cc3386955f21b4665731dbdaceefb1d8", "type": "github" }, "original": { - "owner": "input-output-hk", - "repo": "stackage.nix", + "owner": "NixOS", + "repo": "nixpkgs", "type": "github" } }, - "stackage_14": { - "flake": false, + "nixpkgs_6": { "locked": { - "lastModified": 1643073493, - "narHash": "sha256-5cPd1+i/skvJY9vJO1BhVRPcJObqkxDSywBEppDmb1U=", - "owner": "input-output-hk", - "repo": "stackage.nix", - "rev": "48e1188855ca38f3b7e2a8dba5352767a2f0a8f7", + "lastModified": 1674407282, + "narHash": "sha256-2qwc8mrPINSFdWffPK+ji6nQ9aGnnZyHSItVcYDZDlk=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "ab1254087f4cdf4af74b552d7fc95175d9bdbb49", "type": "github" }, "original": { - "owner": "input-output-hk", - "repo": "stackage.nix", + "owner": "nixos", + "ref": "nixos-22.11", + "repo": "nixpkgs", "type": "github" } }, - "stackage_15": { - "flake": false, + "nixpkgs_7": { "locked": { - "lastModified": 1639012797, - "narHash": "sha256-hiLyBa5XFBvxD+BcYPKyYd/0dNMccxAuywFNqYtIIvs=", - "owner": "input-output-hk", - "repo": "stackage.nix", - "rev": "9ea6ea359da91c75a71e334b25aa7dc5ddc4b2c6", + "lastModified": 1665087388, + "narHash": "sha256-FZFPuW9NWHJteATOf79rZfwfRn5fE0wi9kRzvGfDHPA=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "95fda953f6db2e9496d2682c4fc7b82f959878f7", "type": "github" }, "original": { - "owner": "input-output-hk", - "repo": "stackage.nix", + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", "type": "github" } }, - "stackage_16": { - "flake": false, + "nixpkgs_8": { "locked": { - "lastModified": 1643073493, - "narHash": "sha256-5cPd1+i/skvJY9vJO1BhVRPcJObqkxDSywBEppDmb1U=", - "owner": "input-output-hk", - "repo": "stackage.nix", - "rev": "48e1188855ca38f3b7e2a8dba5352767a2f0a8f7", + "lastModified": 1678693419, + "narHash": "sha256-bbSv5yqZAW6dz+3f3f3pOUZbxpPN+3OgCljgn7P+nnQ=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "8e3fad82be64c06fbfb9fd43993aec9ef4623936", "type": "github" }, "original": { - "owner": "input-output-hk", - "repo": "stackage.nix", + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", "type": "github" } }, - "stackage_17": { - "flake": false, + "nixpkgs_9": { "locked": { - "lastModified": 1643073493, - "narHash": "sha256-5cPd1+i/skvJY9vJO1BhVRPcJObqkxDSywBEppDmb1U=", - "owner": "input-output-hk", - "repo": "stackage.nix", - "rev": "48e1188855ca38f3b7e2a8dba5352767a2f0a8f7", + "lastModified": 1677932085, + "narHash": "sha256-+AB4dYllWig8iO6vAiGGYl0NEgmMgGHpy9gzWJ3322g=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "3c5319ad3aa51551182ac82ea17ab1c6b0f0df89", "type": "github" }, "original": { - "owner": "input-output-hk", - "repo": "stackage.nix", + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", "type": "github" } }, - "stackage_18": { - "flake": false, + "nosys": { "locked": { - "lastModified": 1639012797, - "narHash": "sha256-hiLyBa5XFBvxD+BcYPKyYd/0dNMccxAuywFNqYtIIvs=", - "owner": "input-output-hk", - "repo": "stackage.nix", - "rev": "9ea6ea359da91c75a71e334b25aa7dc5ddc4b2c6", + "lastModified": 1667881534, + "narHash": "sha256-FhwJ15uPLRsvaxtt/bNuqE/ykMpNAPF0upozFKhTtXM=", + "owner": "divnix", + "repo": "nosys", + "rev": "2d0d5207f6a230e9d0f660903f8db9807b54814f", "type": "github" }, "original": { - "owner": "input-output-hk", - "repo": "stackage.nix", + "owner": "divnix", + "repo": "nosys", "type": "github" } }, - "stackage_19": { + "old-ghc-nix": { "flake": false, "locked": { - "lastModified": 1678752645, - "narHash": "sha256-zHfCOaG57TkBUpvirw7f9XidT43vgJkglCdKswPT6cM=", - "owner": "input-output-hk", - "repo": "stackage.nix", - "rev": "b388863463ae73f46a5cfef9a94600394e478665", + "lastModified": 1631092763, + "narHash": "sha256-sIKgO+z7tj4lw3u6oBZxqIhDrzSkvpHtv0Kki+lh9Fg=", + "owner": "angerman", + "repo": "old-ghc-nix", + "rev": "af48a7a7353e418119b6dfe3cd1463a657f342b8", "type": "github" }, "original": { - "owner": "input-output-hk", - "repo": "stackage.nix", + "owner": "angerman", + "ref": "master", + "repo": "old-ghc-nix", "type": "github" } }, - "stackage_2": { + "old-ghc-nix_2": { "flake": false, "locked": { - "lastModified": 1665537461, - "narHash": "sha256-60tLFJ0poKp3IIPMvIDx3yzmjwrX7CngypfCQqV+oXE=", - "owner": "input-output-hk", - "repo": "stackage.nix", - "rev": "fbf47f75f32aedcdd97143ec59c578f403fae35f", + "lastModified": 1631092763, + "narHash": "sha256-sIKgO+z7tj4lw3u6oBZxqIhDrzSkvpHtv0Kki+lh9Fg=", + "owner": "angerman", + "repo": "old-ghc-nix", + "rev": "af48a7a7353e418119b6dfe3cd1463a657f342b8", "type": "github" }, "original": { - "owner": "input-output-hk", - "repo": "stackage.nix", + "owner": "angerman", + "ref": "master", + "repo": "old-ghc-nix", "type": "github" } }, - "stackage_3": { + "ops-lib": { "flake": false, "locked": { - "lastModified": 1648084749, - "narHash": "sha256-kJ6ddC4yb5BAi2lqvXG1Q18EYkEHnhG22mDHPDMQAiE=", + "lastModified": 1675186784, + "narHash": "sha256-HqDtrvk1l7YeREzCSEpUtChtlEgT6Tww9WrJiozjukc=", "owner": "input-output-hk", - "repo": "stackage.nix", - "rev": "d11ec4ac2be255d814560c5f50d5b72cdf314158", + "repo": "ops-lib", + "rev": "5be29ed53b2a4cbbf4cf326fa2e9c1f2b754d26d", "type": "github" }, "original": { "owner": "input-output-hk", - "repo": "stackage.nix", + "repo": "ops-lib", "type": "github" } }, - "stackage_4": { + "root": { + "inputs": { + "CHaP": "CHaP", + "cardano-node-runtime": "cardano-node-runtime", + "customConfig": "customConfig_2", + "ema": "ema", + "emanote": "emanote", + "flake-compat": "flake-compat_4", + "flake-utils": "flake-utils_6", + "hackage": "hackage", + "haskellNix": "haskellNix_2", + "hostNixpkgs": [ + "nixpkgs" + ], + "iohkNix": "iohkNix_2", + "nixpkgs": [ + "haskellNix", + "nixpkgs-unstable" + ], + "nixpkgs-unstable": "nixpkgs-unstable_3" + } + }, + "secp256k1": { "flake": false, "locked": { - "lastModified": 1643073493, - "narHash": "sha256-5cPd1+i/skvJY9vJO1BhVRPcJObqkxDSywBEppDmb1U=", - "owner": "input-output-hk", - "repo": "stackage.nix", - "rev": "48e1188855ca38f3b7e2a8dba5352767a2f0a8f7", + "lastModified": 1683999695, + "narHash": "sha256-9nJJVENMXjXEJZzw8DHzin1DkFkF8h9m/c6PuM7Uk4s=", + "owner": "bitcoin-core", + "repo": "secp256k1", + "rev": "acf5c55ae6a94e5ca847e07def40427547876101", "type": "github" }, "original": { - "owner": "input-output-hk", - "repo": "stackage.nix", + "owner": "bitcoin-core", + "ref": "v0.3.2", + "repo": "secp256k1", "type": "github" } }, - "stackage_5": { + "secp256k1_2": { "flake": false, "locked": { - "lastModified": 1643073493, - "narHash": "sha256-5cPd1+i/skvJY9vJO1BhVRPcJObqkxDSywBEppDmb1U=", - "owner": "input-output-hk", - "repo": "stackage.nix", - "rev": "48e1188855ca38f3b7e2a8dba5352767a2f0a8f7", + "lastModified": 1683999695, + "narHash": "sha256-9nJJVENMXjXEJZzw8DHzin1DkFkF8h9m/c6PuM7Uk4s=", + "owner": "bitcoin-core", + "repo": "secp256k1", + "rev": "acf5c55ae6a94e5ca847e07def40427547876101", "type": "github" }, "original": { - "owner": "input-output-hk", - "repo": "stackage.nix", + "owner": "bitcoin-core", + "ref": "v0.3.2", + "repo": "secp256k1", "type": "github" } }, - "stackage_6": { + "sodium": { "flake": false, "locked": { - "lastModified": 1643073493, - "narHash": "sha256-5cPd1+i/skvJY9vJO1BhVRPcJObqkxDSywBEppDmb1U=", + "lastModified": 1675156279, + "narHash": "sha256-0uRcN5gvMwO7MCXVYnoqG/OmeBFi8qRVnDWJLnBb9+Y=", "owner": "input-output-hk", - "repo": "stackage.nix", - "rev": "48e1188855ca38f3b7e2a8dba5352767a2f0a8f7", + "repo": "libsodium", + "rev": "dbb48cce5429cb6585c9034f002568964f1ce567", "type": "github" }, "original": { "owner": "input-output-hk", - "repo": "stackage.nix", + "repo": "libsodium", + "rev": "dbb48cce5429cb6585c9034f002568964f1ce567", "type": "github" } }, - "stackage_7": { + "sodium_2": { "flake": false, "locked": { - "lastModified": 1643073493, - "narHash": "sha256-5cPd1+i/skvJY9vJO1BhVRPcJObqkxDSywBEppDmb1U=", + "lastModified": 1675156279, + "narHash": "sha256-0uRcN5gvMwO7MCXVYnoqG/OmeBFi8qRVnDWJLnBb9+Y=", "owner": "input-output-hk", - "repo": "stackage.nix", - "rev": "48e1188855ca38f3b7e2a8dba5352767a2f0a8f7", + "repo": "libsodium", + "rev": "dbb48cce5429cb6585c9034f002568964f1ce567", "type": "github" }, "original": { "owner": "input-output-hk", - "repo": "stackage.nix", + "repo": "libsodium", + "rev": "dbb48cce5429cb6585c9034f002568964f1ce567", "type": "github" } }, - "stackage_8": { + "stackage": { "flake": false, "locked": { - "lastModified": 1639012797, - "narHash": "sha256-hiLyBa5XFBvxD+BcYPKyYd/0dNMccxAuywFNqYtIIvs=", + "lastModified": 1685491814, + "narHash": "sha256-OQX+h5hcDptW6HVrYkBL7dtgqiaiz9zn6iMYv+0CDzc=", "owner": "input-output-hk", "repo": "stackage.nix", - "rev": "9ea6ea359da91c75a71e334b25aa7dc5ddc4b2c6", + "rev": "678b4297ccef8bbcd83294e47e1a9042034bdbd0", "type": "github" }, "original": { @@ -9459,14 +2125,14 @@ "type": "github" } }, - "stackage_9": { + "stackage_2": { "flake": false, "locked": { - "lastModified": 1643073493, - "narHash": "sha256-5cPd1+i/skvJY9vJO1BhVRPcJObqkxDSywBEppDmb1U=", + "lastModified": 1687651923, + "narHash": "sha256-h1T48TyaHp0jTQkjWzFOpGZ3jpGhJnivKh4VMQKsCx0=", "owner": "input-output-hk", "repo": "stackage.nix", - "rev": "48e1188855ca38f3b7e2a8dba5352767a2f0a8f7", + "rev": "0fc0718338ab76be7905de21d02e0e1677989290", "type": "github" }, "original": { @@ -9478,7 +2144,7 @@ "std": { "inputs": { "arion": [ - "haskellNix", + "cardano-node-runtime", "tullia", "std", "blank" @@ -9486,23 +2152,23 @@ "blank": "blank", "devshell": "devshell", "dmerge": "dmerge", - "flake-utils": "flake-utils_26", + "flake-utils": "flake-utils_5", "incl": "incl", "makes": [ - "haskellNix", + "cardano-node-runtime", "tullia", "std", "blank" ], "microvm": [ - "haskellNix", + "cardano-node-runtime", "tullia", "std", "blank" ], "n2c": "n2c", "nixago": "nixago", - "nixpkgs": "nixpkgs_26", + "nixpkgs": "nixpkgs_7", "nosys": "nosys", "yants": "yants" }, @@ -9520,198 +2186,97 @@ "type": "github" } }, - "tailwind-haskell": { - "inputs": { - "flake-utils": "flake-utils_21", - "nixpkgs": "nixpkgs_20" - }, - "locked": { - "lastModified": 1654211622, - "narHash": "sha256-N5Xa/JhF9PRgmt+ZVZFaHT7onezENxp7ktnGhhqOBaw=", - "owner": "srid", - "repo": "tailwind-haskell", - "rev": "8d08cda7a1cb67435de1ba1739f65e25b303364f", - "type": "github" - }, - "original": { - "owner": "srid", - "ref": "master", - "repo": "tailwind-haskell", - "type": "github" - } - }, - "tullia": { - "inputs": { - "nix-nomad": "nix-nomad", - "nix2container": "nix2container", - "nixpkgs": "nixpkgs_25", - "std": "std" - }, - "locked": { - "lastModified": 1675695930, - "narHash": "sha256-B7rEZ/DBUMlK1AcJ9ajnAPPxqXY6zW2SBX+51bZV0Ac=", - "owner": "input-output-hk", - "repo": "tullia", - "rev": "621365f2c725608f381b3ad5b57afef389fd4c31", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "tullia", - "type": "github" - } - }, - "utils": { - "locked": { - "lastModified": 1648297722, - "narHash": "sha256-W+qlPsiZd8F3XkzXOzAoR+mpFqzm3ekQkJNa+PIh1BQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "0f8662f1319ad6abf89b3380dd2722369fc51ade", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "utils_10": { - "locked": { - "lastModified": 1623875721, - "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "utils_11": { + "systems": { "locked": { - "lastModified": 1623875721, - "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772", + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", "type": "github" }, "original": { - "owner": "numtide", - "repo": "flake-utils", + "owner": "nix-systems", + "repo": "default", "type": "github" } }, - "utils_12": { + "systems_2": { "locked": { - "lastModified": 1638122382, - "narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "74f7e4319258e287b0f9cb95426c9853b282730b", + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", "type": "github" }, "original": { - "owner": "numtide", - "repo": "flake-utils", + "owner": "nix-systems", + "repo": "default", "type": "github" } }, - "utils_13": { - "locked": { - "lastModified": 1623875721, - "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772", - "type": "github" + "treefmt-nix": { + "inputs": { + "nixpkgs": "nixpkgs_9" }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "utils_14": { "locked": { - "lastModified": 1623875721, - "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", + "lastModified": 1678616506, + "narHash": "sha256-JBlOlpPj7VtzFTApEHioFl8YSVhyT0dMgymV8t7sW1g=", "owner": "numtide", - "repo": "flake-utils", - "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772", + "repo": "treefmt-nix", + "rev": "5ec73d38dde4c766a9ae19840fc6afa724096f00", "type": "github" }, "original": { "owner": "numtide", - "repo": "flake-utils", + "repo": "treefmt-nix", "type": "github" } }, - "utils_15": { - "locked": { - "lastModified": 1623875721, - "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772", - "type": "github" + "treefmt-nix_2": { + "inputs": { + "nixpkgs": [ + "emanote", + "nixpkgs" + ] }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "utils_16": { "locked": { - "lastModified": 1638122382, - "narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=", + "lastModified": 1675588998, + "narHash": "sha256-CLeFLmah0mxNp/EIW0PMG3YutKxVIIs4B0f5oJhwe8E=", "owner": "numtide", - "repo": "flake-utils", - "rev": "74f7e4319258e287b0f9cb95426c9853b282730b", + "repo": "treefmt-nix", + "rev": "70e03145e26c2f3199f4320ecd9fd343f1129c60", "type": "github" }, "original": { "owner": "numtide", - "repo": "flake-utils", + "repo": "treefmt-nix", "type": "github" } }, - "utils_17": { - "locked": { - "lastModified": 1623875721, - "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772", - "type": "github" + "tullia": { + "inputs": { + "nix-nomad": "nix-nomad", + "nix2container": "nix2container_2", + "nixpkgs": "nixpkgs_6", + "std": "std" }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "utils_18": { "locked": { - "lastModified": 1623875721, - "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772", + "lastModified": 1675695930, + "narHash": "sha256-B7rEZ/DBUMlK1AcJ9ajnAPPxqXY6zW2SBX+51bZV0Ac=", + "owner": "input-output-hk", + "repo": "tullia", + "rev": "621365f2c725608f381b3ad5b57afef389fd4c31", "type": "github" }, "original": { - "owner": "numtide", - "repo": "flake-utils", + "owner": "input-output-hk", + "repo": "tullia", "type": "github" } }, - "utils_19": { + "utils": { "locked": { "lastModified": 1653893745, "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", @@ -9728,116 +2293,11 @@ }, "utils_2": { "locked": { - "lastModified": 1644229661, - "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "utils_3": { - "locked": { - "lastModified": 1623875721, - "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "utils_4": { - "locked": { - "lastModified": 1638122382, - "narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "74f7e4319258e287b0f9cb95426c9853b282730b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "utils_5": { - "locked": { - "lastModified": 1623875721, - "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "utils_6": { - "locked": { - "lastModified": 1623875721, - "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "utils_7": { - "locked": { - "lastModified": 1623875721, - "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "utils_8": { - "locked": { - "lastModified": 1638122382, - "narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "74f7e4319258e287b0f9cb95426c9853b282730b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "utils_9": { - "locked": { - "lastModified": 1623875721, - "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", + "lastModified": 1667395993, + "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", "owner": "numtide", "repo": "flake-utils", - "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772", + "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", "type": "github" }, "original": { @@ -9849,7 +2309,7 @@ "yants": { "inputs": { "nixpkgs": [ - "haskellNix", + "cardano-node-runtime", "tullia", "std", "nixpkgs" diff --git a/flake.nix b/flake.nix index 76dec6d6de0..37ea1cfa120 100644 --- a/flake.nix +++ b/flake.nix @@ -149,13 +149,13 @@ flake = false; }; customConfig.url = "github:input-output-hk/empty-flake"; - cardano-node-1_35_4.url = "github:input-output-hk/cardano-node?ref=1.35.4"; + cardano-node-runtime.url = "github:input-output-hk/cardano-node?ref=8.1.1"; emanote.url = "github:srid/emanote"; ema.url = "github:srid/ema"; }; outputs = { self, nixpkgs, nixpkgs-unstable, hostNixpkgs, flake-utils, - haskellNix, iohkNix, CHaP, customConfig, emanote, cardano-node-1_35_4, + haskellNix, iohkNix, CHaP, customConfig, emanote, cardano-node-runtime, ... }: let inherit (nixpkgs) lib; @@ -194,11 +194,11 @@ inherit system; inherit (haskellNix) config; overlays = [ - haskellNix.overlay iohkNix.overlays.utils iohkNix.overlays.crypto iohkNix.overlays.haskell-nix-extra iohkNix.overlays.cardano-lib + haskellNix.overlay # Cardano deployments (import ./nix/overlays/cardano-deployments.nix) # Other packages overlay @@ -217,7 +217,8 @@ collectChecks check; - nodePkgs = cardano-node-1_35_4.packages.${system}; + nodePkgs = cardano-node-runtime.legacyPackages.${system}; + nodeProject = cardano-node-runtime.project.${system}; project = (import ./nix/haskell.nix CHaP @@ -250,8 +251,8 @@ inherit (project.hsPkgs.cardano-addresses-cli.components.exes) cardano-address; # Cardano - inherit (project.hsPkgs.cardano-cli.components.exes) cardano-cli; - cardano-node = project.hsPkgs.cardano-node.components.exes.cardano-node // { + cardano-cli = nodeProject.hsPkgs.cardano-cli.components.exes.cardano-cli; + cardano-node = nodeProject.hsPkgs.cardano-node.components.exes.cardano-node // { deployments = pkgs.cardano-node-deployments; }; @@ -334,8 +335,8 @@ linuxPackages.cardano-wallet linuxPackages.bech32 linuxPackages.cardano-address - cardano-node-1_35_4.hydraJobs.linux.musl.cardano-cli - cardano-node-1_35_4.hydraJobs.linux.musl.cardano-node + nodePkgs.hydraJobs.musl.cardano-cli + nodePkgs.hydraJobs.musl.cardano-node ]; # Which exes should be put in the release archives. checkReleaseContents = jobs: map (exe: jobs.${exe}) [ @@ -364,8 +365,8 @@ windowsPackages.cardano-wallet windowsPackages.bech32 windowsPackages.cardano-address - cardano-node-1_35_4.hydraJobs.linux.windows.cardano-cli - cardano-node-1_35_4.hydraJobs.linux.windows.cardano-node + nodePkgs.hydraJobs.windows.cardano-cli + nodePkgs.hydraJobs.windows.cardano-node ]; platform = "win64"; format = "zip"; @@ -374,8 +375,8 @@ tests = import ./nix/windows-testing-bundle.nix { inherit pkgs; cardano-wallet = windowsPackages.cardano-wallet; - cardano-node = cardano-node-1_35_4.hydraJobs.linux.windows.cardano-node; - cardano-cli = cardano-node-1_35_4.hydraJobs.linux.windows.cardano-cli; + cardano-node = nodePkgs.hydraJobs.windows.cardano-node; + cardano-cli = nodePkgs.hydraJobs.windows.cardano-cli; tests = lib.collect lib.isDerivation windowsPackages.tests; benchmarks = lib.collect lib.isDerivation windowsPackages.benchmarks; }; @@ -390,8 +391,8 @@ macOsPkgs.cardano-wallet macOsPkgs.bech32 macOsPkgs.cardano-address - cardano-node-1_35_4.hydraJobs.macos.cardano-cli - cardano-node-1_35_4.hydraJobs.macos.cardano-node + nodePkgs.hydraJobs.native.cardano-cli + nodePkgs.hydraJobs.native.cardano-node ]; platform = "macos-intel"; format = "tar.gz"; @@ -404,8 +405,8 @@ macOsPkgs.cardano-wallet macOsPkgs.bech32 macOsPkgs.cardano-address - cardano-node-1_35_4.hydraJobs.macos.cardano-cli - cardano-node-1_35_4.hydraJobs.macos.cardano-node + nodePkgs.hydraJobs.native.cardano-cli + nodePkgs.hydraJobs.native.cardano-node ]; platform = "macos-silicon"; format = "tar.gz"; diff --git a/fourmolu.yaml b/fourmolu.yaml new file mode 100644 index 00000000000..8b5a04a4ea2 --- /dev/null +++ b/fourmolu.yaml @@ -0,0 +1,21 @@ +comma-style: leading +function-arrows: leading +import-export-style: leading +fixities: + - infixr 9 . + - infixr 5 ++ + - infixl 4 <$, <$> + - infixl 2 >>, >>= + - infixr 2 =<<, <=< + - infixr 1 $, $! + - infixl 4 <*>, <*, *>, <**> + - infixl 6 ^. + - infixl 3 =. +haddock-style: single-line +in-style: left-align +indent-wheres: false +indentation: 4 +let-style: auto +newlines-between-decls: 1 +record-brace-space: false +respectful: true diff --git a/lib/coin-selection/test/spec/Cardano/CoinSelection/BalanceSpec.hs b/lib/coin-selection/test/spec/Cardano/CoinSelection/BalanceSpec.hs index 30ddf7cc40f..561a73fecca 100644 --- a/lib/coin-selection/test/spec/Cardano/CoinSelection/BalanceSpec.hs +++ b/lib/coin-selection/test/spec/Cardano/CoinSelection/BalanceSpec.hs @@ -13,6 +13,7 @@ {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-orphans #-} +{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} {- HLINT ignore "Use camelCase" -} -- TODO: https://input-output.atlassian.net/browse/ADP-2841 diff --git a/lib/coin-selection/test/spec/Cardano/CoinSelection/CollateralSpec.hs b/lib/coin-selection/test/spec/Cardano/CoinSelection/CollateralSpec.hs index b5ce1378a14..20b4fa7b0cb 100644 --- a/lib/coin-selection/test/spec/Cardano/CoinSelection/CollateralSpec.hs +++ b/lib/coin-selection/test/spec/Cardano/CoinSelection/CollateralSpec.hs @@ -1,4 +1,5 @@ {-# OPTIONS_GHC -fno-warn-orphans #-} +{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} {- HLINT ignore "Use camelCase" -} {- HLINT ignore "Hoist not" -} diff --git a/lib/delta-store/src/Data/DBVar.hs b/lib/delta-store/src/Data/DBVar.hs index 7f9f096b079..4c4235a5687 100644 --- a/lib/delta-store/src/Data/DBVar.hs +++ b/lib/delta-store/src/Data/DBVar.hs @@ -82,7 +82,7 @@ modifyDBVar var f = modifyDBMaybe var $ \a -> let (da,b) = f a in (Just da,b) -- If updated, the new value will be evaluated to weak head normal form. modifyDBMaybe :: (Delta da, Monad m, a ~ Base da) - => DBVar m da -> (a -> (Maybe da, b)) -> m b + => DBVar m da -> forall b. (a -> (Maybe da, b)) -> m b modifyDBMaybe = modifyDBMaybe_ -- | Initialize a new 'DBVar' for a given 'Store'. diff --git a/lib/delta-store/src/Data/Store.hs b/lib/delta-store/src/Data/Store.hs index c650f3a6a83..174a23f66f8 100644 --- a/lib/delta-store/src/Data/Store.hs +++ b/lib/delta-store/src/Data/Store.hs @@ -478,7 +478,7 @@ newCachedStore Store{loadS,writeS,updateS} = do -- Cache that need not be filled in the beginning cache <- newTVarIO (Nothing :: Maybe (Base da)) - let writeCache ma = writeTVar cache ma + let writeCache = writeTVar cache -- Load the value from the Store only if it is not cached and -- nobody else is writing to the store. @@ -553,7 +553,7 @@ embedStore' embedStore' Embedding'{load,write,update} Store{loadS,writeS,updateS} = let loadL = (load =<<) <$> loadS - updateL = \ma da -> case ma of + updateL ma da = case ma of Just a -> loadS >>= \case Left _ -> pure () Right b -> updateS (Just b) (update a b da) diff --git a/lib/delta-table/src/Database/Persist/Delta.hs b/lib/delta-table/src/Database/Persist/Delta.hs index dabd0a0d7c8..c0e78024765 100644 --- a/lib/delta-table/src/Database/Persist/Delta.hs +++ b/lib/delta-table/src/Database/Persist/Delta.hs @@ -161,7 +161,7 @@ newDatabaseStore db = do Nothing -> do rememberSupply table pure $ Right table - write = \table -> void $ do + write table = void $ do deleteAll db -- delete any old data in the table first repsertMany db $ getPile $ Table.toRows table rememberSupply table diff --git a/lib/delta-types/src/Data/Delta.hs b/lib/delta-types/src/Data/Delta.hs index b0bc2603ac2..e6dda1493a9 100644 --- a/lib/delta-types/src/Data/Delta.hs +++ b/lib/delta-types/src/Data/Delta.hs @@ -62,7 +62,7 @@ class Delta delta where apply :: delta -> Base delta -> Base delta -- | Trivial delta encoding for the type @a@ that admits no change at all. -data NoChange a = NoChange +data NoChange (a :: Type) = NoChange deriving (Eq, Ord, Show) instance Delta (NoChange a) where diff --git a/lib/primitive/cardano-wallet-primitive.cabal b/lib/primitive/cardano-wallet-primitive.cabal index 5e11016f9de..bd2fc790b75 100644 --- a/lib/primitive/cardano-wallet-primitive.cabal +++ b/lib/primitive/cardano-wallet-primitive.cabal @@ -1,4 +1,4 @@ -cabal-version: 2.2 +cabal-version: 3.0 name: cardano-wallet-primitive version: 2023.4.14 synopsis: Selected primitive types for Cardano Wallet. @@ -127,7 +127,7 @@ test-suite test , binary , bytestring , cardano-ledger-byron-test - , cardano-ledger-core + , cardano-ledger-core:{cardano-ledger-core, testlib} , cardano-ledger-shelley-test , cardano-numeric , cardano-wallet-launcher diff --git a/lib/primitive/test/spec/Cardano/Wallet/Primitive/CollateralSpec.hs b/lib/primitive/test/spec/Cardano/Wallet/Primitive/CollateralSpec.hs index 07caebbd690..2ce9e51a156 100644 --- a/lib/primitive/test/spec/Cardano/Wallet/Primitive/CollateralSpec.hs +++ b/lib/primitive/test/spec/Cardano/Wallet/Primitive/CollateralSpec.hs @@ -40,6 +40,8 @@ import Data.Maybe ( fromJust, isJust, isNothing ) import Numeric ( showHex ) +import Test.Cardano.Ledger.Core.Arbitrary + () import Test.Hspec ( Expectation, Spec, describe, it, shouldBe ) import Test.QuickCheck @@ -61,22 +63,14 @@ import Test.QuickCheck , withMaxSuccess , (===) ) -import Test.QuickCheck.Hedgehog - ( hedgehog ) import qualified Cardano.Ledger.Address as L -import qualified Cardano.Ledger.Credential as L import qualified Cardano.Ledger.Crypto as CC -import qualified Cardano.Ledger.Hashes as L import qualified Cardano.Wallet.Primitive.Types.TokenBundle as TokenBundle import qualified Data.Binary.Get as B import qualified Data.Binary.Put as B import qualified Data.ByteString as BS import qualified Data.ByteString.Lazy as BL -import qualified Test.Cardano.Chain.Common.Gen as Byron -import qualified Test.Cardano.Ledger.Shelley.Serialisation.EraIndepGenerators as L -import qualified Test.Cardano.Ledger.Shelley.Serialisation.Generators.Genesis as L - ( genRewardAcnt ) -- To begin with, we will write our generators and tests for the @AddressType@ -- type. @@ -173,6 +167,7 @@ prop_addressType_stake = -- keyhash address (although not necessarily the correct one, as it's a bit -- difficult to assert that the exact type is correct, we do at least test that -- each type is chosen sometimes using the coverage check). +{- prop_addressType_shelleyKeyHash :: Property prop_addressType_shelleyKeyHash = forAll genShelleyKeyHashAddr $ \shelleyKeyHashAddr -> do @@ -192,11 +187,13 @@ prop_addressType_shelleyKeyHash = , addrType === PointerAddress CredentialKeyHash , addrType === EnterpriseAddress CredentialKeyHash ] +-} -- | Test that for any shelley scripthash address, we classify it as a shelley -- scripthash address (although not necessarily the correct one, as it's a bit -- difficult to assert that the exact type is correct, we do at least test that -- each type is chosen sometimes using the coverage check). +{- prop_addressType_shelleyScriptHash :: Property prop_addressType_shelleyScriptHash = forAll genShelleyScriptHashAddr $ \shelleyScriptHashAddr -> do @@ -220,6 +217,7 @@ prop_addressType_shelleyScriptHash = , addrType === EnterpriseAddress CredentialScriptHash ] +-} -- To be extra sure, we also test our code with some golden addresses we -- generated with "cardano-addresses": @@ -288,8 +286,7 @@ prop_addressType_equivalance = -- addresses. genAnyAddress :: Gen Address genAnyAddress = frequency - [ (10, asAddress <$> genShelleyAddr) - , (1, asAddress <$> genByronAddr) + [ (10, asAddress <$> arbitrary) , (2, asStakeAddress <$> genStakeAddr) , (3, Address <$> arbitrary) ] @@ -458,18 +455,9 @@ prop_simplifyAddress_validAddress = <> BS.foldr showHex "" addrBytes ) (_, Nothing) -> - case B.runGetOrFail (L.getAddr :: B.Get (L.Addr CC.StandardCrypto)) (BL.fromStrict simplifiedBytes) of - Left e -> - False - & commonErrorOutput - & counterexample ("Failed to parse simplified address, error output was: " <> show e) - Right (remaining, offset, addrParsed) -> - False - & commonErrorOutput - & counterexample (" Address parsed: " <> show addrParsed) - & counterexample (" Offset: " <> show offset) - & counterexample (" Remaining: " <> show remaining) - & counterexample ("Was able to parse simplified address, but failed to consume whole input.") + False + & commonErrorOutput + & counterexample ("Failed to parse simplified address") (Just _, Just _) -> property True @@ -681,10 +669,10 @@ spec = do property prop_addressType_byron it "classifies stake address type correctly" $ property prop_addressType_stake - it "classifies shelley key hash type correctly" $ - property prop_addressType_shelleyKeyHash - it "classifies shelley script hash type correctly" $ - property prop_addressType_shelleyScriptHash + -- it "classifies shelley key hash type correctly" $ + -- property prop_addressType_shelleyKeyHash + -- it "classifies shelley script hash type correctly" $ + -- property prop_addressType_shelleyScriptHash it "golden" $ do unit_addressType_byronGolden unit_addressType_shelleyEnterprisePaymentGolden @@ -758,35 +746,11 @@ shelleyEnterprisePaymentAddrGolden :: BL.ByteString shelleyEnterprisePaymentAddrGolden = unsafeBech32Decode "addr_test1vpdylg53ekxh2404mfgw4pt4gfm7dc9dkc74ck0gtrld8uqewynck" --- To define these generators, we rely on explicit generators (and implicit --- Arbitrary instance generators) provided by --- "Test.Shelley.Spec.Ledger.Serialisation.EraIndepGenerators". Do not try to --- move the generators below to any of our "*.Gen" modules. Unfortunately --- "EraIndepGenerators" exports Arbitrary instances that will conflict with the --- Arbitrary instances we define in our Specs. - -genShelleyAddr :: Gen (L.Addr CC.StandardCrypto) -genShelleyAddr = - L.Addr <$> arbitrary <*> arbitrary <*> arbitrary - -genShelleyScriptHashAddr :: Gen (L.Addr CC.StandardCrypto) -genShelleyScriptHashAddr = L.Addr - <$> arbitrary - <*> (L.ScriptHashObj . L.ScriptHash <$> L.genHash) - <*> arbitrary - -genShelleyKeyHashAddr :: Gen (L.Addr CC.StandardCrypto) -genShelleyKeyHashAddr = L.Addr - <$> arbitrary - <*> (L.KeyHashObj <$> arbitrary) - <*> arbitrary - genByronAddr :: Gen (L.Addr CC.StandardCrypto) -genByronAddr = - L.AddrBootstrap . L.BootstrapAddress <$> hedgehog Byron.genAddress +genByronAddr = L.AddrBootstrap <$> arbitrary genStakeAddr :: Gen (L.RewardAcnt CC.StandardCrypto) -genStakeAddr = hedgehog L.genRewardAcnt +genStakeAddr = arbitrary -- Some helper functions diff --git a/lib/wai-middleware-logging/src/Network/Wai/Middleware/Logging.hs b/lib/wai-middleware-logging/src/Network/Wai/Middleware/Logging.hs index 5b28f2bc73e..b3d53e6829c 100644 --- a/lib/wai-middleware-logging/src/Network/Wai/Middleware/Logging.hs +++ b/lib/wai-middleware-logging/src/Network/Wai/Middleware/Logging.hs @@ -1,6 +1,8 @@ {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE DerivingStrategies #-} {-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE GeneralisedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} -- The following is justified by the usage of the 'requestBody' field @@ -120,7 +122,8 @@ data ApiLoggerSettings = ApiLoggerSettings -- | Just a wrapper for readability newtype RequestId = RequestId Integer - deriving (Generic, Show, Eq, ToJSON) + deriving stock (Generic, Show) + deriving newtype (Eq, ToJSON) -- | Create a new opaque 'ApiLoggerSettings' newApiLoggerSettings :: IO ApiLoggerSettings diff --git a/lib/wallet/api/http/Cardano/CLI.hs b/lib/wallet/api/http/Cardano/CLI.hs index a85f696a78b..084d4cf38a7 100644 --- a/lib/wallet/api/http/Cardano/CLI.hs +++ b/lib/wallet/api/http/Cardano/CLI.hs @@ -241,6 +241,10 @@ import Network.HTTP.Client , responseTimeoutNone ) -- See ADP-1910 +import Cardano.Wallet.Api.Types.Transaction + ( ApiLimit (..) ) +import GHC.Num + ( Natural ) import "optparse-applicative" Options.Applicative ( ArgumentFields , CommandFields @@ -276,16 +280,10 @@ import "optparse-applicative" Options.Applicative , switch , value ) --- See ADP-1910 -import "optparse-applicative" Options.Applicative.Help.Pretty - ( string, vsep ) --- See ADP-1910 -import Cardano.Wallet.Api.Types.Transaction - ( ApiLimit (..) ) -import GHC.Num - ( Natural ) import "optparse-applicative" Options.Applicative.Types ( ReadM (..), readerAsk ) +import Prettyprinter + ( vsep ) import Servant.Client ( BaseUrl (..), ClientM, Scheme (..), mkClientEnv, runClientM ) import Servant.Client.Core @@ -348,6 +346,7 @@ import qualified Data.List.NonEmpty as NE import qualified Data.Text as T import qualified Data.Text.Encoding as T import qualified Data.Text.IO as TIO +import qualified Prettyprinter as Printer import qualified UnliftIO.Async as Async {------------------------------------------------------------------------------- @@ -1413,7 +1412,7 @@ walletStyleOption defaultStyle accepted = option (eitherReader fromTextS) <> value defaultStyle ) where - typeOptions = string <$> + typeOptions = Printer.pretty <$> ( "Any of the following (default: " <> T.unpack (toText defaultStyle) <> ")" ) : map prettyStyle accepted diff --git a/lib/wallet/api/http/Cardano/Wallet/Api/Http/Server/Handlers/TxCBOR.hs b/lib/wallet/api/http/Cardano/Wallet/Api/Http/Server/Handlers/TxCBOR.hs index 7eb6005208e..a8d8a05a38e 100644 --- a/lib/wallet/api/http/Cardano/Wallet/Api/Http/Server/Handlers/TxCBOR.hs +++ b/lib/wallet/api/http/Cardano/Wallet/Api/Http/Server/Handlers/TxCBOR.hs @@ -13,9 +13,10 @@ module Cardano.Wallet.Api.Http.Server.Handlers.TxCBOR ) where -import Prelude hiding - ( (.) ) +import Prelude +import Cardano.Binary + ( DecoderError ) import Cardano.Wallet.Api.Http.Server.Error ( IsServerError (..), apiError, liftE, showT ) import Cardano.Wallet.Api.Types.Error @@ -23,6 +24,7 @@ import Cardano.Wallet.Api.Types.Error import Cardano.Wallet.Primitive.Types ( Certificate ) import Cardano.Wallet.Primitive.Types.Hash + ( Hash ) import Cardano.Wallet.Read ( Tx (..) ) import Cardano.Wallet.Read.Eras @@ -55,10 +57,10 @@ import Cardano.Wallet.Read.Tx.Witnesses ( getEraWitnesses ) import Cardano.Wallet.Transaction ( TokenMapWithScripts, ValidityIntervalExplicit ) -import Codec.CBOR.Read - ( DeserialiseFailure ) import Control.Category - ( (.) ) + ( (<<<) ) +import Data.Function + ( (&) ) import GHC.Generics ( Generic ) import Servant.Server @@ -70,15 +72,16 @@ import qualified Cardano.Wallet.Read.Primitive.Tx.Features.Integrity as Feature import qualified Cardano.Wallet.Read.Primitive.Tx.Features.Mint as Feature import qualified Cardano.Wallet.Read.Primitive.Tx.Features.Validity as Feature import qualified Data.ByteString.Lazy as BL +import qualified Data.Text as T -newtype ErrParseCBOR = ErrParseCBOR DeserialiseFailure +newtype ErrParseCBOR = ErrParseCBOR DecoderError deriving (Eq, Show) instance IsServerError ErrParseCBOR where - toServerError (ErrParseCBOR df) = - apiError err500 UnexpectedError $ mconcat + toServerError (ErrParseCBOR decoderError) = + apiError err500 UnexpectedError $ T.unwords [ "Error while trying to parse a transaction CBOR from the database" - , showT df + , showT decoderError ] -- | Values parsed out of a CBOR for a 'Tx' in any era @@ -94,25 +97,19 @@ data ParsedTxCBOR = ParsedTxCBOR parser :: EraFun Tx (K ParsedTxCBOR) parser = fromEraFunK $ ParsedTxCBOR - <$> EraFunK (Feature.certificates . getEraCertificates) - <*> EraFunK (Feature.mint . (getEraMint *&&&* getEraWitnesses *&&&* getEraReferenceInputs)) - <*> EraFunK (Feature.getValidity . getEraValidity) - <*> EraFunK (Feature.integrity . getEraIntegrity) - <*> EraFunK (Feature.extraSigs . getEraExtraSigs) + <$> EraFunK (Feature.certificates <<< getEraCertificates) + <*> EraFunK (Feature.mint <<< + getEraMint *&&&* getEraWitnesses *&&&* getEraReferenceInputs) + <*> EraFunK (Feature.getValidity <<< getEraValidity) + <*> EraFunK (Feature.integrity <<< getEraIntegrity) + <*> EraFunK (Feature.extraSigs <<< getEraExtraSigs) -txCBORParser :: EraFun - (K BL.ByteString) - (Either DeserialiseFailure :.: K (ParsedTxCBOR)) -txCBORParser = parser *.** deserializeTx +txCBORParser :: + EraFun (K BL.ByteString) (Either DecoderError :.: K (ParsedTxCBOR)) +txCBORParser = parser *.** deserializeTx -- | Parse CBOR to some values and throw a server deserialize error if failing. -parseTxCBOR - :: TxCBOR - -> Handler ParsedTxCBOR +parseTxCBOR :: TxCBOR -> Handler ParsedTxCBOR parseTxCBOR cbor = - case fmap extractEraValue - $ sequenceEraValue - $ applyEraFun txCBORParser cbor - of - Left df -> liftE $ ErrParseCBOR df - Right result -> pure result + extractEraValue <$> sequenceEraValue (applyEraFun txCBORParser cbor) + & either (liftE . ErrParseCBOR) pure diff --git a/lib/wallet/api/http/Cardano/Wallet/Api/Types/Transaction.hs b/lib/wallet/api/http/Cardano/Wallet/Api/Types/Transaction.hs index c2788ab9b18..b7d15a3891d 100644 --- a/lib/wallet/api/http/Cardano/Wallet/Api/Types/Transaction.hs +++ b/lib/wallet/api/http/Cardano/Wallet/Api/Types/Transaction.hs @@ -10,6 +10,9 @@ {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} +-- TODO: https://input-output.atlassian.net/browse/ADP-3075 +{-# OPTIONS_GHC -Wno-deriving-defaults #-} + -- | -- Copyright: Âİ 2018-2022 IOHK -- License: Apache-2.0 diff --git a/lib/wallet/api/http/Cardano/Wallet/Launch.hs b/lib/wallet/api/http/Cardano/Wallet/Launch.hs index b88ec70e67a..de9f1b0134d 100644 --- a/lib/wallet/api/http/Cardano/Wallet/Launch.hs +++ b/lib/wallet/api/http/Cardano/Wallet/Launch.hs @@ -152,14 +152,17 @@ parseGenesisData , Block ) parseGenesisData = \case - MainnetConfig -> do - let nm = NetworkMagic $ fromIntegral $ W.getProtocolMagic W.mainnetMagic - let mainnetVersionData = NodeToClientVersionData nm + MainnetConfig -> pure ( NMainnet , Byron.mainnetNetworkParameters - , mainnetVersionData - , Byron.emptyGenesis (genesisParameters Byron.mainnetNetworkParameters) + , NodeToClientVersionData + { networkMagic = NetworkMagic $ + fromIntegral $ W.getProtocolMagic W.mainnetMagic + , query = False + } + , Byron.emptyGenesis + (genesisParameters Byron.mainnetNetworkParameters) ) TestnetConfig byronGenesisFile -> do @@ -167,16 +170,17 @@ parseGenesisData = \case withExceptT show $ readGenesisData byronGenesisFile let (np, outs) = Byron.fromGenesisData (genesisData, genesisHash) - block0 = Byron.genesisBlockFromTxOuts (genesisParameters np) outs - pm = Byron.fromProtocolMagicId $ gdProtocolMagicId genesisData - discriminant = NTestnet $ fromIntegral $ W.getProtocolMagic pm - vData = NodeToClientVersionData $ NetworkMagic $ fromIntegral - $ W.getProtocolMagic pm + protoMagic = W.getProtocolMagic + $ Byron.fromProtocolMagicId + $ gdProtocolMagicId genesisData pure - ( discriminant + ( NTestnet $ fromIntegral protoMagic , np - , vData - , block0 + , NodeToClientVersionData + { networkMagic = NetworkMagic $ fromIntegral protoMagic + , query = False + } + , Byron.genesisBlockFromTxOuts (genesisParameters np) outs ) {------------------------------------------------------------------------------- diff --git a/lib/wallet/api/http/Cardano/Wallet/Launch/Cluster.hs b/lib/wallet/api/http/Cardano/Wallet/Launch/Cluster.hs index a37dd21daae..d963e0cd700 100644 --- a/lib/wallet/api/http/Cardano/Wallet/Launch/Cluster.hs +++ b/lib/wallet/api/http/Cardano/Wallet/Launch/Cluster.hs @@ -5,6 +5,7 @@ {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE NumericUnderscores #-} +{-# LANGUAGE OverloadedLabels #-} {-# LANGUAGE PackageImports #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE RankNTypes #-} @@ -71,6 +72,7 @@ import Cardano.Address.Derivation ( XPub, xpubPublicKey ) import Cardano.Api ( AsType (AsStakeKey, AsStakePoolKey) + , File (..) , Key (verificationKeyHash) , serialiseToCBOR ) @@ -90,8 +92,6 @@ import Cardano.BM.Data.Tracer ( HasPrivacyAnnotation (..), HasSeverityAnnotation (..) ) import Cardano.CLI ( parseLoggingSeverity ) -import Cardano.CLI.Byron.Commands - ( VerificationKeyFile (VerificationKeyFile) ) import Cardano.CLI.Shelley.Key ( VerificationKeyOrFile (..), readVerificationKeyOrFile ) import Cardano.Launcher @@ -103,6 +103,26 @@ import Cardano.Launcher.Node , nodeSocketFile , withCardanoNode ) +import Cardano.Ledger.Api + ( StandardCrypto + , ppA0L + , ppDL + , ppEMaxL + , ppExtraEntropyL + , ppKeyDepositL + , ppMaxBBSizeL + , ppMaxBHSizeL + , ppMaxTxSizeL + , ppMinFeeAL + , ppMinFeeBL + , ppMinPoolCostL + , ppMinUTxOValueL + , ppNOptL + , ppPoolDepositL + , ppProtocolVersionL + , ppRhoL + , ppTauL + ) import Cardano.Ledger.BaseTypes ( Network (Mainnet) , NonNegativeInterval @@ -110,12 +130,9 @@ import Cardano.Ledger.BaseTypes , StrictMaybe (..) , UnitInterval , boundRational + , natVersion , textToUrl ) -import Cardano.Ledger.Crypto - ( StandardCrypto ) -import Cardano.Ledger.Era - ( Era (Crypto) ) import Cardano.Ledger.Shelley.API ( ShelleyGenesis (..), ShelleyGenesisStaking (sgsPools) ) import Cardano.Pool.Metadata @@ -156,7 +173,7 @@ import Cardano.Wallet.Primitive.Types.TokenQuantity import Cardano.Wallet.Read.NetworkId ( SNetworkId (..) ) import Cardano.Wallet.Shelley.Compatibility - ( StandardShelley, decodeAddress, encodeAddress, fromGenesisData ) + ( decodeAddress, encodeAddress, fromGenesisData ) import Cardano.Wallet.Unsafe ( unsafeBech32Decode, unsafeFromHex ) import Cardano.Wallet.Util @@ -165,6 +182,8 @@ import Codec.Binary.Bech32.TH ( humanReadablePart ) import Control.Arrow ( first ) +import Control.Lens + ( over, set, (&), (.~) ) import Control.Monad ( forM, forM_, liftM2, replicateM, replicateM_, void, when, (>=>) ) import Control.Retry @@ -191,8 +210,6 @@ import Data.Either ( fromRight, isLeft, isRight ) import Data.Foldable ( traverse_ ) -import Data.Generics.Product.Fields - ( setField ) import Data.IntCast ( intCast ) import Data.List @@ -241,6 +258,7 @@ import UnliftIO.MVar ( MVar, modifyMVar, newMVar, swapMVar ) import qualified Cardano.Ledger.Address as Ledger +import qualified Cardano.Ledger.Core as Ledger import qualified Cardano.Ledger.Shelley.API as Ledger import qualified Cardano.Wallet.Primitive.Types.TokenBundle as TokenBundle import qualified Cardano.Wallet.Primitive.Types.TokenMap as TokenMap @@ -443,7 +461,7 @@ data ConfiguredPool = ConfiguredPool :: PoolRecipe -- ^ The 'PoolRecipe' used to create this 'ConfiguredPool'. , registerViaShelleyGenesis - :: IO (ShelleyGenesis StandardShelley -> ShelleyGenesis StandardShelley) + :: IO (ShelleyGenesis StandardCrypto -> ShelleyGenesis StandardCrypto) , finalizeShelleyGenesisSetup :: RunningNode -> IO () -- ^ Submit any pool retirement certificate according to the 'recipe' -- on-chain. @@ -519,7 +537,7 @@ configurePool tr baseDir era metadataServer recipe = do registerMetadataForPoolIndex metadataServer i metadata let metadataBytes = Aeson.encode metadata - pure $ ConfiguredPool + pure ConfiguredPool { operatePool = \nodeParams action -> do let NodeParams genesisFiles hardForks (port, peers) logCfg = nodeParams @@ -561,15 +579,17 @@ configurePool tr baseDir era metadataServer recipe = do pledgeAddr <- stakingAddrFromVkFile ownerPub let params = Ledger.PoolParams - { _poolId = poolId - , _poolVrf = vrf - , _poolPledge = Ledger.Coin $ intCast pledgeAmt - , _poolCost = Ledger.Coin 0 - , _poolMargin = unsafeUnitInterval 0.1 - , _poolRAcnt = Ledger.RewardAcnt Mainnet $ Ledger.KeyHashObj stakePubHash - , _poolOwners = Set.fromList [stakePubHash] - , _poolRelays = mempty - , _poolMD = SJust $ Ledger.PoolMetadata + { ppId = poolId + , ppVrf = vrf + , ppPledge = Ledger.Coin $ intCast pledgeAmt + , ppCost = Ledger.Coin 0 + , ppMargin = unsafeUnitInterval 0.1 + , ppRewardAcnt = + Ledger.RewardAcnt Mainnet $ + Ledger.KeyHashObj stakePubHash + , ppOwners = Set.fromList [stakePubHash] + , ppRelays = mempty + , ppMetadata = SJust $ Ledger.PoolMetadata (fromMaybe (error "invalid url (too long)") $ textToUrl $ T.pack metadataURL) @@ -578,19 +598,17 @@ configurePool tr baseDir era metadataServer recipe = do let updateStaking sgs = sgs { Ledger.sgsPools = - (ListMap.ListMap [(poolId, params)]) - <> (sgsPools sgs) + ListMap.ListMap [(poolId, params)] <> sgsPools sgs , Ledger.sgsStake = - (ListMap.fromList [(stakePubHash, poolId)]) + ListMap.fromList [(stakePubHash, poolId)] <> Ledger.sgsStake sgs } let poolSpecificFunds = ListMap.fromList [(pledgeAddr, Ledger.Coin $ intCast pledgeAmt)] - return $ \sg -> sg - { sgInitialFunds = poolSpecificFunds <> sgInitialFunds sg - , sgStaking = updateStaking (sgStaking sg) - } + pure + $ over #sgInitialFunds (poolSpecificFunds <>) + . over #sgStaking updateStaking , finalizeShelleyGenesisSetup = \(RunningNode socket _ _ _) -> do -- Here is our chance to respect the 'retirementEpoch' of @@ -893,7 +911,7 @@ generateGenesis :: FilePath -> UTCTime -> [(Address, Coin)] - -> (ShelleyGenesis StandardShelley -> ShelleyGenesis StandardShelley) + -> (ShelleyGenesis StandardCrypto -> ShelleyGenesis StandardCrypto) -- ^ For adding genesis pools and staking in Babbage and later. -> IO GenesisFiles generateGenesis dir systemStart initialFunds addPoolsToGenesis = do @@ -907,41 +925,34 @@ generateGenesis dir systemStart initialFunds addPoolsToGenesis = do let startTime = round @_ @Int . utcTimeToPOSIXSeconds $ systemStart let systemStart' = posixSecondsToUTCTime . fromRational . toRational $ startTime - let pparams = Ledger.ShelleyPParams - { _minfeeA = 100 - , _minfeeB = 100_000 - , _minUTxOValue = Ledger.Coin 1_000_000 - - , _keyDeposit = Ledger.Coin 1_000_000 - , _poolDeposit = Ledger.Coin 0 - - , _maxBBSize = 239_857 - , _maxBHSize = 217_569 - , _maxTxSize = 16_384 - - , _minPoolCost = Ledger.Coin 0 - - , _extraEntropy = Ledger.NeutralNonce - + let pparams = + Ledger.emptyPParams + & ppMinFeeAL .~ Ledger.Coin 100 + & ppMinFeeBL .~ Ledger.Coin 100_000 + & ppMinUTxOValueL .~ Ledger.Coin 1_000_000 + & ppKeyDepositL .~ Ledger.Coin 1_000_000 + & ppPoolDepositL .~ Ledger.Coin 0 + & ppMaxBBSizeL .~ 239_857 + & ppMaxBHSizeL .~ 217_569 + & ppMaxTxSizeL .~ 16_384 + & ppMinPoolCostL .~ Ledger.Coin 0 + & ppExtraEntropyL .~ Ledger.NeutralNonce -- There are a few smaller features/fixes which are enabled based on -- the protocol version rather than just the era, so we need to -- set it to a realisitic value. - , _protocolVersion = Ledger.ProtVer 8 0 - + & ppProtocolVersionL .~ Ledger.ProtVer (natVersion @8) 0 -- Sensible pool & reward parameters: - , _nOpt = 3 - , _rho = unsafeUnitInterval 0.178_650_067 - , _tau = unsafeUnitInterval 0.1 - , _a0 = unsafeNonNegativeInterval 0.1 - , _d = unsafeUnitInterval 0 - + & ppNOptL .~ 3 + & ppRhoL .~ unsafeUnitInterval 0.178_650_067 + & ppTauL .~ unsafeUnitInterval 0.1 + & ppA0L .~ unsafeNonNegativeInterval 0.1 + & ppDL .~ unsafeUnitInterval 0 -- The epoch bound on pool retirements specifies how many epochs -- in advance retirements may be announced. For testing purposes, -- we allow retirements to be announced far into the future. - , _eMax = 1_000_000 - } + & ppEMaxL .~ 1_000_000 - let sg = addPoolsToGenesis $ ShelleyGenesis + let sg = addPoolsToGenesis ShelleyGenesis { sgSystemStart = systemStart' , sgActiveSlotsCoeff = unsafePositiveUnitInterval 0.5 , sgSlotLength = 0.2 @@ -976,7 +987,7 @@ generateGenesis dir systemStart initialFunds addPoolsToGenesis = do >>= withAddedKey "startTime" startTime >>= Aeson.encodeFile byronGenesisFile - return $ GenesisFiles + pure GenesisFiles { byronGenesis = byronGenesisFile , shelleyGenesis = dir "genesis.json" , alonzoGenesis = dir "genesis.alonzo.json" @@ -984,8 +995,7 @@ generateGenesis dir systemStart initialFunds addPoolsToGenesis = do } where - extraInitialFunds - :: ListMap (Ledger.Addr (Crypto StandardShelley)) Ledger.Coin + extraInitialFunds :: ListMap (Ledger.Addr StandardCrypto) Ledger.Coin extraInitialFunds = ListMap.fromList [ ( fromMaybe (error "extraFunds: invalid addr") $ Ledger.deserialiseAddr addrBytes @@ -995,7 +1005,7 @@ generateGenesis dir systemStart initialFunds addPoolsToGenesis = do ] data FaucetFunds = FaucetFunds - { pureAdaFunds :: [(Address, Coin)] + { pureAdaFunds :: [(Address, Coin)] -- ^ Pure ada funds , maFunds :: [(Address, (TokenBundle, [(String, String)]))] -- ^ Multi asset funds. Slower to setup than pure ada funds. @@ -1052,11 +1062,7 @@ withCluster tr dir LocalClusterConfig{..} faucetFunds onClusterStart = bracketTr genesisDeltas <- mapM registerViaShelleyGenesis configuredPools pure $ foldr (.) id genesisDeltas let federalizeNetwork = - let - adjustPParams f genesis = genesis - { sgProtocolParams = f (sgProtocolParams genesis) } - in - adjustPParams (setField @"_d" (unsafeUnitInterval 0.25)) + over #sgProtocolParams (set ppDL (unsafeUnitInterval 0.25)) genesisFiles <- generateGenesis dir @@ -1486,18 +1492,14 @@ genNodeConfig dir name genesisFiles clusterEra logCfg = do -- Parameters - sg <- Yaml.decodeFileThrow - @_ @(ShelleyGenesis StandardShelley) shelleyGenesis - - let (np, block0, genesisPools) = fromGenesisData sg - let networkMagic = sgNetworkMagic sg - let versionData = NodeToClientVersionData $ NetworkMagic networkMagic - + genesisData <- Yaml.decodeFileThrow shelleyGenesis + let (networkParameters, block0, genesisPools) = fromGenesisData genesisData + let networkMagic = NetworkMagic $ sgNetworkMagic genesisData pure ( dir ("node" <> name <> ".config") , block0 - , np - , versionData + , networkParameters + , NodeToClientVersionData { networkMagic, query = False } , genesisPools ) where @@ -1643,7 +1645,7 @@ stakePoolIdFromOperatorVerKey :: FilePath -> IO (Ledger.KeyHash 'Ledger.StakePool (StandardCrypto)) stakePoolIdFromOperatorVerKey filepath = do stakePoolVerKey <- either (error . show) id <$> readVerificationKeyOrFile AsStakePoolKey - (VerificationKeyFilePath $ VerificationKeyFile filepath) + (VerificationKeyFilePath $ File filepath) let bytes = serialiseToCBOR $ verificationKeyHash stakePoolVerKey pure $ either (error . show) snd $ CBOR.deserialiseFromBytes fromCBOR (BL.fromStrict bytes) @@ -1651,7 +1653,7 @@ poolVrfFromFile :: FilePath -> IO (Ledger.Hash StandardCrypto (Ledger.VerKeyVRF StandardCrypto)) poolVrfFromFile filepath = do stakePoolVerKey <- either (error . show) id <$> readVerificationKeyOrFile AsVrfKey - (VerificationKeyFilePath $ VerificationKeyFile filepath) + (VerificationKeyFilePath $ File filepath) let bytes = serialiseToCBOR $ verificationKeyHash stakePoolVerKey pure $ either (error . show) snd $ CBOR.deserialiseFromBytes fromCBOR (BL.fromStrict bytes) @@ -1659,7 +1661,7 @@ stakingKeyHashFromFile :: FilePath -> IO (Ledger.KeyHash 'Ledger.Staking StandardCrypto) stakingKeyHashFromFile filepath = do stakePoolVerKey <- either (error . show) id <$> readVerificationKeyOrFile AsStakeKey - (VerificationKeyFilePath $ VerificationKeyFile filepath) + (VerificationKeyFilePath $ File filepath) let bytes = serialiseToCBOR $ verificationKeyHash stakePoolVerKey pure $ either (error . show) snd $ CBOR.deserialiseFromBytes fromCBOR (BL.fromStrict bytes) @@ -1667,7 +1669,7 @@ stakingAddrFromVkFile :: FilePath -> IO (Ledger.Addr StandardCrypto) stakingAddrFromVkFile filepath = do stakePoolVerKey <- either (error . show) id <$> readVerificationKeyOrFile AsStakeKey - (VerificationKeyFilePath $ VerificationKeyFile filepath) + (VerificationKeyFilePath $ File filepath) let bytes = serialiseToCBOR $ verificationKeyHash stakePoolVerKey let payKH = either (error . show) snd $ CBOR.deserialiseFromBytes fromCBOR (BL.fromStrict bytes) let delegKH = either (error . show) snd $ CBOR.deserialiseFromBytes fromCBOR (BL.fromStrict bytes) diff --git a/lib/wallet/api/http/Cardano/Wallet/Shelley.hs b/lib/wallet/api/http/Cardano/Wallet/Shelley.hs index 81acbd76088..e2927a7c650 100644 --- a/lib/wallet/api/http/Cardano/Wallet/Shelley.hs +++ b/lib/wallet/api/http/Cardano/Wallet/Shelley.hs @@ -71,7 +71,6 @@ import Cardano.Wallet.Primitive.Slotting import Cardano.Wallet.Primitive.Types ( Block , NetworkParameters (..) - , NetworkParameters , PoolCertificate , ProtocolParameters (..) , Settings (..) diff --git a/lib/wallet/bench/db-bench.hs b/lib/wallet/bench/db-bench.hs index ca57e2a5dd6..bf291176d50 100644 --- a/lib/wallet/bench/db-bench.hs +++ b/lib/wallet/bench/db-bench.hs @@ -6,7 +6,6 @@ {-# LANGUAGE InstanceSigs #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NamedFieldPuns #-} -{-# LANGUAGE NumericUnderscores #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} @@ -15,6 +14,8 @@ {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-orphans #-} +{-# OPTIONS_GHC -Wno-ambiguous-fields #-} +{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} -- | -- Copyright: Âİ 2018-2020 IOHK @@ -781,9 +782,9 @@ defaultFieldValues :: DefaultFieldValues defaultFieldValues = DefaultFieldValues { defaultActiveSlotCoefficient = ActiveSlotCoefficient 1.0 , defaultDesiredNumberOfPool = 0 - , defaultMinimumUTxOValue = Coin 1_000_000 + , defaultMinimumUTxOValue = Coin 1000000 , defaultHardforkEpoch = Nothing - , defaultKeyDeposit = Coin 2_000_000 + , defaultKeyDeposit = Coin 2000000 } ---------------------------------------------------------------------------- -- Mock data to use for benchmarks diff --git a/lib/wallet/bench/restore-bench.hs b/lib/wallet/bench/restore-bench.hs index 03834cfa96c..739b53210ed 100644 --- a/lib/wallet/bench/restore-bench.hs +++ b/lib/wallet/bench/restore-bench.hs @@ -14,10 +14,12 @@ {-# LANGUAGE NoMonoLocalBinds #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE ScopedTypeVariables #-} -{-# OPTIONS_GHC -fno-warn-orphans #-} {-# LANGUAGE TypeApplications #-} + +{-# OPTIONS_GHC -fno-warn-orphans #-} {-# OPTIONS_GHC -Wno-unused-local-binds #-} {-# OPTIONS_GHC -Wno-unused-do-bind #-} +{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} {- HLINT ignore "Redundant pure" -} @@ -182,6 +184,8 @@ import Data.Aeson ( ToJSON (..), genericToJSON, (.=) ) import Data.Functor.Contravariant ( contramap ) +import Data.Kind + ( Type ) import Data.List ( foldl' ) import Data.Proxy @@ -679,7 +683,7 @@ bench_baseline_restoration {- HLINT ignore bench_restoration "Use camelCase" -} bench_restoration - :: forall n (k :: Depth -> * -> *) s results. + :: forall n (k :: Depth -> Type -> Type) s results. ( IsOurs s RewardAccount , MaybeLight s , PersistAddressBook s @@ -947,7 +951,7 @@ instance HasSeverityAnnotation (BenchmarkLog n) where MsgRestorationTick{} -> Info MsgSyncStart{} -> Info MsgSyncCompleted{} -> Info - MsgRetryShortly{} -> Warning + MsgRetryShortly{} -> Info instance HasSNetworkId n => ToText (BenchmarkLog n) where toText = \case diff --git a/lib/wallet/cardano-wallet.cabal b/lib/wallet/cardano-wallet.cabal index a0520650b85..b8378009710 100644 --- a/lib/wallet/cardano-wallet.cabal +++ b/lib/wallet/cardano-wallet.cabal @@ -1,4 +1,4 @@ -cabal-version: 2.2 +cabal-version: 3.0 name: cardano-wallet version: 2023.4.14 synopsis: The Wallet Backend for a Cardano node. @@ -21,8 +21,7 @@ common language OverloadedStrings common opts-lib - ghc-options: - -Wall -Wcompat -Wredundant-constraints + ghc-options: -Wall -Wcompat -Wredundant-constraints if flag(release) ghc-options: -O2 -Werror @@ -45,9 +44,7 @@ flag scrypt library import: language, opts-lib hs-source-dirs: src - - ghc-options: - -Wincomplete-uni-patterns -Wincomplete-record-updates + ghc-options: -Wincomplete-uni-patterns -Wincomplete-record-updates if flag(scrypt) cpp-options: -DHAVE_SCRYPT @@ -78,19 +75,23 @@ library , cardano-crypto-test , cardano-crypto-wrapper , cardano-data + , cardano-ledger-allegra , cardano-ledger-alonzo , cardano-ledger-alonzo-test + , cardano-ledger-api , cardano-ledger-babbage + , cardano-ledger-binary , cardano-ledger-byron , cardano-ledger-byron-test , cardano-ledger-conway , cardano-ledger-core + , cardano-ledger-mary , cardano-ledger-shelley - , cardano-ledger-shelley-ma , cardano-ledger-shelley-test , cardano-numeric , cardano-protocol-tpraos , cardano-slotting + , cardano-strict-containers , cardano-wallet-launcher , cardano-wallet-primitive , cardano-wallet-test-utils @@ -129,6 +130,7 @@ library , int-cast , io-classes , iohk-monitoring + , iproute , lattices , lens , lifted-async @@ -147,19 +149,17 @@ library , OddWord , optparse-applicative , ouroboros-consensus - , ouroboros-consensus-byron , ouroboros-consensus-cardano , ouroboros-consensus-diffusion , ouroboros-consensus-protocol - , ouroboros-consensus-shelley , ouroboros-network , ouroboros-network-api , ouroboros-network-framework , ouroboros-network-protocols , path-pieces - , persistent ^>=2.13 - , persistent-sqlite ^>=2.13 - , persistent-template ^>=2.12 + , persistent ^>=2.13 + , persistent-sqlite ^>=2.13 + , persistent-template ^>=2.12 , plutus-core , plutus-ledger-api , pretty-simple @@ -182,13 +182,11 @@ library , statistics , stm , streaming-commons - , cardano-strict-containers , strict-non-empty-containers , strict-stm , string-interpolate , template-haskell , temporary - , these , text , text-class , these @@ -249,8 +247,8 @@ library Cardano.Wallet.Address.Pool Cardano.Wallet.Address.States.Families Cardano.Wallet.Address.States.Features - Cardano.Wallet.Address.States.Test.State Cardano.Wallet.Address.States.IsOwned + Cardano.Wallet.Address.States.Test.State Cardano.Wallet.Byron.Compatibility Cardano.Wallet.Checkpoints Cardano.Wallet.Checkpoints.Policy @@ -417,6 +415,7 @@ library Cardano.Wallet.Write.UTxOAssumptions Control.Concurrent.Concierge Control.Monad.Exception.Unchecked + Control.Monad.Fail.Extended Control.Monad.Util Crypto.Hash.Utils Data.Aeson.Extra @@ -455,6 +454,7 @@ library cardano-wallet-api-http , cardano-cli , cardano-crypto , cardano-data + , cardano-ledger-api , cardano-ledger-alonzo , cardano-ledger-byron , cardano-ledger-core @@ -483,6 +483,7 @@ library cardano-wallet-api-http , http-types , int-cast , iohk-monitoring + , lens , memory , mtl , network @@ -491,6 +492,7 @@ library cardano-wallet-api-http , OddWord , optparse-applicative , ouroboros-network + , prettyprinter , quiet , random , retry @@ -665,9 +667,9 @@ library cardano-wallet-bench , containers , criterion-measurement , deepseq - , fmt - , filepath , directory + , filepath + , fmt , iohk-monitoring , optparse-applicative , say @@ -675,8 +677,8 @@ library cardano-wallet-bench , text-class , transformers , unliftio - exposed-modules: - Cardano.Wallet.BenchShared + + exposed-modules: Cardano.Wallet.BenchShared library mock-token-metadata import: language, opts-lib @@ -753,6 +755,7 @@ executable mock-token-metadata-server , mock-token-metadata , optparse-applicative , wai-extra + , prettyprinter test-suite unit import: language, opts-exe @@ -778,16 +781,18 @@ test-suite unit , cardano-crypto-wrapper , cardano-ledger-alonzo , cardano-ledger-alonzo-test - , cardano-ledger-babbage + , cardano-ledger-api + , cardano-ledger-babbage:{cardano-ledger-babbage, testlib} , cardano-ledger-byron , cardano-ledger-byron-test + , cardano-ledger-conway:{cardano-ledger-conway, testlib} , cardano-ledger-core , cardano-ledger-shelley - , cardano-ledger-shelley-ma , cardano-ledger-shelley-test , cardano-numeric , cardano-sl-x509 , cardano-slotting + , cardano-strict-containers , cardano-wallet , cardano-wallet-api-http , cardano-wallet-launcher @@ -800,9 +805,9 @@ test-suite unit , cryptonite , data-default , data-interval + , deepseq , delta-store , delta-types - , deepseq , directory , either , extra >=1.6.17 @@ -843,7 +848,7 @@ test-suite unit , openapi3 ==3.2.2 , optparse-applicative , ouroboros-consensus - , ouroboros-consensus-shelley + , ouroboros-consensus-cardano , ouroboros-network , ouroboros-network-api , persistent ^>=2.13 @@ -865,8 +870,9 @@ test-suite unit , servant-openapi3 , servant-server , should-not-typecheck + , si-timers + , sop-core , splitmix - , cardano-strict-containers , strict-non-empty-containers , string-interpolate , string-qq @@ -1126,8 +1132,8 @@ benchmark api , aeson , base , bytestring - , cardano-balance-tx , cardano-api + , cardano-balance-tx , cardano-wallet , cardano-wallet-bench , cardano-wallet-primitive @@ -1143,4 +1149,5 @@ benchmark api , time , transformers , unliftio + other-modules: Cardano.Wallet.DummyTarget.Primitive.Types diff --git a/lib/wallet/exe/mock-token-metadata-server.hs b/lib/wallet/exe/mock-token-metadata-server.hs index 0cbd3eaa6ed..2cd402a3a6f 100644 --- a/lib/wallet/exe/mock-token-metadata-server.hs +++ b/lib/wallet/exe/mock-token-metadata-server.hs @@ -35,9 +35,9 @@ import "optparse-applicative" Options.Applicative , showHelpOnEmpty , str ) --- See ADP-1910 -import "optparse-applicative" Options.Applicative.Help.Pretty - ( hang, indent, line, text, () ) +import Prettyprinter + ( Doc, Pretty (..), hang, indent, line, softline ) + data MetadataServerArgs = MetadataServerArgs { sourceJson :: FilePath @@ -98,7 +98,7 @@ parserInfo = info (helper <*> argsParser) $ mconcat "\"properties\":[\"name\",\"description\"]}' \\" <> line <> "http://localhost:PORT/metadata/query" ] - p = (<> sep) . foldr (() . text) mempty . words . mconcat + p = (<> sep) . foldr (joinLines . pretty) mempty . words . mconcat sep = line <> line code d = indent 2 d <> sep @@ -111,3 +111,6 @@ parserInfo = info (helper <*> argsParser) $ mconcat long "port" <> metavar "PORT" <> help "Port to listen on (default: random unused port)" + +joinLines :: Doc ann -> Doc ann -> Doc ann +joinLines x y = x <> softline <> y diff --git a/lib/wallet/integration/src/Test/Integration/Framework/DSL.hs b/lib/wallet/integration/src/Test/Integration/Framework/DSL.hs index 8fae884b752..7d37c477d8d 100644 --- a/lib/wallet/integration/src/Test/Integration/Framework/DSL.hs +++ b/lib/wallet/integration/src/Test/Integration/Framework/DSL.hs @@ -13,6 +13,7 @@ {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-simplifiable-class-constraints #-} +{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} module Test.Integration.Framework.DSL ( Context(..) diff --git a/lib/wallet/integration/src/Test/Integration/Plutus.hs b/lib/wallet/integration/src/Test/Integration/Plutus.hs index 8c9b5720dab..cefa519e3f2 100644 --- a/lib/wallet/integration/src/Test/Integration/Plutus.hs +++ b/lib/wallet/integration/src/Test/Integration/Plutus.hs @@ -8,6 +8,8 @@ {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeApplications #-} +{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} + module Test.Integration.Plutus ( mkSignerPolicy , alwaysTrueValidator diff --git a/lib/wallet/integration/src/Test/Integration/Scenario/API/Byron/Addresses.hs b/lib/wallet/integration/src/Test/Integration/Scenario/API/Byron/Addresses.hs index f5822dd09fe..45146be225e 100644 --- a/lib/wallet/integration/src/Test/Integration/Scenario/API/Byron/Addresses.hs +++ b/lib/wallet/integration/src/Test/Integration/Scenario/API/Byron/Addresses.hs @@ -9,6 +9,8 @@ {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} +{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} + module Test.Integration.Scenario.API.Byron.Addresses ( spec ) where diff --git a/lib/wallet/integration/src/Test/Integration/Scenario/API/Byron/HWWallets.hs b/lib/wallet/integration/src/Test/Integration/Scenario/API/Byron/HWWallets.hs index ef45d16d59e..a28d68c7661 100644 --- a/lib/wallet/integration/src/Test/Integration/Scenario/API/Byron/HWWallets.hs +++ b/lib/wallet/integration/src/Test/Integration/Scenario/API/Byron/HWWallets.hs @@ -8,6 +8,8 @@ {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} +{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} + module Test.Integration.Scenario.API.Byron.HWWallets ( spec ) where diff --git a/lib/wallet/integration/src/Test/Integration/Scenario/API/Byron/Network.hs b/lib/wallet/integration/src/Test/Integration/Scenario/API/Byron/Network.hs index 3a6b20856d5..491a2e410a9 100644 --- a/lib/wallet/integration/src/Test/Integration/Scenario/API/Byron/Network.hs +++ b/lib/wallet/integration/src/Test/Integration/Scenario/API/Byron/Network.hs @@ -3,6 +3,8 @@ {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeApplications #-} +{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} + module Test.Integration.Scenario.API.Byron.Network ( spec ) where diff --git a/lib/wallet/integration/src/Test/Integration/Scenario/API/Network.hs b/lib/wallet/integration/src/Test/Integration/Scenario/API/Network.hs index a570ec50267..91aab0a5d0b 100644 --- a/lib/wallet/integration/src/Test/Integration/Scenario/API/Network.hs +++ b/lib/wallet/integration/src/Test/Integration/Scenario/API/Network.hs @@ -3,6 +3,8 @@ {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeApplications #-} +{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} + module Test.Integration.Scenario.API.Network ( spec ) where diff --git a/lib/wallet/integration/src/Test/Integration/Scenario/API/Shared/Addresses.hs b/lib/wallet/integration/src/Test/Integration/Scenario/API/Shared/Addresses.hs index f51703c563b..6f46b5c0457 100644 --- a/lib/wallet/integration/src/Test/Integration/Scenario/API/Shared/Addresses.hs +++ b/lib/wallet/integration/src/Test/Integration/Scenario/API/Shared/Addresses.hs @@ -12,6 +12,7 @@ {-# LANGUAGE TypeSynonymInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-} +{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} module Test.Integration.Scenario.API.Shared.Addresses ( spec diff --git a/lib/wallet/integration/src/Test/Integration/Scenario/API/Shared/Transactions.hs b/lib/wallet/integration/src/Test/Integration/Scenario/API/Shared/Transactions.hs index 74fed5e23ba..6b9bc0c7489 100644 --- a/lib/wallet/integration/src/Test/Integration/Scenario/API/Shared/Transactions.hs +++ b/lib/wallet/integration/src/Test/Integration/Scenario/API/Shared/Transactions.hs @@ -13,6 +13,7 @@ {-# LANGUAGE TypeSynonymInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-} +{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} module Test.Integration.Scenario.API.Shared.Transactions ( spec diff --git a/lib/wallet/integration/src/Test/Integration/Scenario/API/Shared/Wallets.hs b/lib/wallet/integration/src/Test/Integration/Scenario/API/Shared/Wallets.hs index ec1e8773b5c..4fae92ec5bf 100644 --- a/lib/wallet/integration/src/Test/Integration/Scenario/API/Shared/Wallets.hs +++ b/lib/wallet/integration/src/Test/Integration/Scenario/API/Shared/Wallets.hs @@ -12,6 +12,7 @@ {-# LANGUAGE TypeSynonymInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-} +{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} module Test.Integration.Scenario.API.Shared.Wallets ( spec @@ -33,7 +34,6 @@ import Cardano.Wallet.Api.Types ( ApiAccountKeyShared (..) , ApiActiveSharedWallet , ApiAddressWithPath - , ApiAddressWithPath , ApiCosignerIndex (..) , ApiCredentialType (..) , ApiFee (..) diff --git a/lib/wallet/integration/src/Test/Integration/Scenario/API/Shelley/Addresses.hs b/lib/wallet/integration/src/Test/Integration/Scenario/API/Shelley/Addresses.hs index 17d834b1f08..278344d2468 100644 --- a/lib/wallet/integration/src/Test/Integration/Scenario/API/Shelley/Addresses.hs +++ b/lib/wallet/integration/src/Test/Integration/Scenario/API/Shelley/Addresses.hs @@ -8,6 +8,8 @@ {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} +{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} + module Test.Integration.Scenario.API.Shelley.Addresses ( spec ) where diff --git a/lib/wallet/integration/src/Test/Integration/Scenario/API/Shelley/CoinSelections.hs b/lib/wallet/integration/src/Test/Integration/Scenario/API/Shelley/CoinSelections.hs index 6147d368c13..f37d283d797 100644 --- a/lib/wallet/integration/src/Test/Integration/Scenario/API/Shelley/CoinSelections.hs +++ b/lib/wallet/integration/src/Test/Integration/Scenario/API/Shelley/CoinSelections.hs @@ -9,6 +9,9 @@ {-# LANGUAGE TupleSections #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} + +{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} + {- HLINT ignore "Use camelCase" -} module Test.Integration.Scenario.API.Shelley.CoinSelections diff --git a/lib/wallet/integration/src/Test/Integration/Scenario/API/Shelley/Network.hs b/lib/wallet/integration/src/Test/Integration/Scenario/API/Shelley/Network.hs index c4ee8ebe9a3..a006ca10939 100644 --- a/lib/wallet/integration/src/Test/Integration/Scenario/API/Shelley/Network.hs +++ b/lib/wallet/integration/src/Test/Integration/Scenario/API/Shelley/Network.hs @@ -4,6 +4,8 @@ {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeApplications #-} +{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} + module Test.Integration.Scenario.API.Shelley.Network ( spec ) where diff --git a/lib/wallet/integration/src/Test/Integration/Scenario/API/Shelley/StakePools.hs b/lib/wallet/integration/src/Test/Integration/Scenario/API/Shelley/StakePools.hs index 63d060c848a..03ae62d32f3 100644 --- a/lib/wallet/integration/src/Test/Integration/Scenario/API/Shelley/StakePools.hs +++ b/lib/wallet/integration/src/Test/Integration/Scenario/API/Shelley/StakePools.hs @@ -10,6 +10,8 @@ {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} +{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} + module Test.Integration.Scenario.API.Shelley.StakePools ( spec ) where diff --git a/lib/wallet/integration/src/Test/Integration/Scenario/API/Shelley/Transactions.hs b/lib/wallet/integration/src/Test/Integration/Scenario/API/Shelley/Transactions.hs index 7b5163e84e3..25e5d8e0a20 100644 --- a/lib/wallet/integration/src/Test/Integration/Scenario/API/Shelley/Transactions.hs +++ b/lib/wallet/integration/src/Test/Integration/Scenario/API/Shelley/Transactions.hs @@ -12,6 +12,8 @@ {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} +{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} + {- HLINT ignore "Use head" -} {- HLINT ignore "Use :" -} diff --git a/lib/wallet/integration/src/Test/Integration/Scenario/API/Shelley/TransactionsNew.hs b/lib/wallet/integration/src/Test/Integration/Scenario/API/Shelley/TransactionsNew.hs index 69e1b9deeed..0baf3f52e98 100644 --- a/lib/wallet/integration/src/Test/Integration/Scenario/API/Shelley/TransactionsNew.hs +++ b/lib/wallet/integration/src/Test/Integration/Scenario/API/Shelley/TransactionsNew.hs @@ -11,11 +11,13 @@ {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} +{-# OPTIONS_GHC -Wno-unused-imports #-} -- temportary, until addRequiredSigners is fixed +{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} + module Test.Integration.Scenario.API.Shelley.TransactionsNew (spec) where import Prelude - import Cardano.Address.Derivation ( XPub, xpubPublicKey ) import Cardano.Address.Script @@ -30,6 +32,10 @@ import Cardano.Api ( CardanoEra (..), InAnyCardanoEra (..) ) import Cardano.Crypto.DSIGN.Class ( rawDeserialiseVerKeyDSIGN ) +import Cardano.Ledger.Alonzo.Core + ( reqSignerHashesTxBodyL ) +import Cardano.Ledger.Crypto + ( StandardCrypto ) import Cardano.Mnemonic ( SomeMnemonic (..) ) import Cardano.Pool.Metadata.Types @@ -155,7 +161,7 @@ import Data.Text.Class import Numeric.Natural ( Natural ) import Test.Hspec - ( SpecWith, describe, pendingWith, shouldContain, shouldNotContain ) + ( SpecWith, describe, pendingWith, shouldContain, shouldNotContain, xit ) import Test.Hspec.Expectations.Lifted ( shouldBe, shouldNotBe, shouldNotSatisfy, shouldSatisfy ) import Test.Hspec.Extra @@ -225,9 +231,6 @@ import UnliftIO.Exception ( fromEither ) import qualified Cardano.Api as Cardano -import qualified Cardano.Api.Shelley as Cardano -import qualified Cardano.Ledger.Alonzo.Tx as Alonzo -import qualified Cardano.Ledger.Crypto as Ledger import qualified Cardano.Ledger.Keys as Ledger import qualified Cardano.Wallet.Address.Derivation.Shelley as Shelley import qualified Cardano.Wallet.Api.Link as Link @@ -2362,6 +2365,7 @@ spec = describe "NEW_SHELLEY_TRANSACTIONS" $ do ] it "TRANS_NEW_SIGN_04 - Sign extra required signatures" $ \ctx -> runResourceT $ do + liftIO $ pendingWith "ADP-3077" (w, mw) <- second (unsafeMkMnemonic @15) <$> fixtureWalletWithMnemonics (Proxy @"shelley") ctx -- Construct tx @@ -4487,27 +4491,27 @@ spec = describe "NEW_SHELLEY_TRANSACTIONS" $ do -- TODO: This function should really not exist, but instead, it should be -- possible to construct a transaction from the API with additional required -- signers! + -- TODO: remove no-unused-imports pragma once this function is fixed. addRequiredSigners :: SealedTx -> [XPub] -> SealedTx - addRequiredSigners tx vks = + addRequiredSigners _tx _vks = error "TODO: ADP-3077 fix addRequiredSigners" + + {- case getSealedTxBody tx of InAnyCardanoEra AlonzoEra (Cardano.ShelleyTxBody a body b c d e) -> let body' = body { Alonzo.reqSignerHashes = Set.fromList $ hashKey <$> vks } - in sealedTxFromCardanoBody (Cardano.ShelleyTxBody a body' b c d e) - _ -> - tx + in sealedTxFromCardanoBody (Cardano.ShelleyTxBody a body' b c d e + _ -> tx where - hashKey - :: forall kd crypto. (Ledger.Crypto crypto) - => XPub - -> Ledger.KeyHash kd crypto + hashKey :: forall kd. XPub -> Ledger.KeyHash kd StandardCrypto hashKey = Ledger.hashKey . Ledger.VKey . fromJust . rawDeserialiseVerKeyDSIGN . xpubPublicKey + -} fromTextEnvelope cborHex = let textEnvelope = diff --git a/lib/wallet/integration/src/Test/Integration/Scenario/CLI/Port.hs b/lib/wallet/integration/src/Test/Integration/Scenario/CLI/Port.hs index c16f32f3b70..f088d347308 100644 --- a/lib/wallet/integration/src/Test/Integration/Scenario/CLI/Port.hs +++ b/lib/wallet/integration/src/Test/Integration/Scenario/CLI/Port.hs @@ -4,6 +4,8 @@ {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeApplications #-} +{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} + module Test.Integration.Scenario.CLI.Port ( spec ) where diff --git a/lib/wallet/src/Cardano/Api/Extra.hs b/lib/wallet/src/Cardano/Api/Extra.hs index 53534fdb200..48c9c05b7f6 100644 --- a/lib/wallet/src/Cardano/Api/Extra.hs +++ b/lib/wallet/src/Cardano/Api/Extra.hs @@ -8,136 +8,27 @@ -- -- Module containing extra 'Cardano.Api' functionality needed by the wallet. module Cardano.Api.Extra - ( withShelleyBasedTx - , inAnyCardanoEra - , asAnyShelleyBasedEra - , fromShelleyBasedScript + ( inAnyCardanoEra , unbundleLedgerShelleyBasedProtocolParams ) where -import Prelude - import Cardano.Api ( BundledProtocolParameters (..) - , CardanoEra (..) , InAnyCardanoEra (..) - , InAnyShelleyBasedEra (..) , IsCardanoEra (cardanoEra) - , IsShelleyBasedEra - , PlutusScriptVersion (..) - , Script (..) - , ScriptInEra (..) - , ScriptLanguageInEra (..) , ShelleyBasedEra (..) - , Tx (..) + , Tx ) import Cardano.Api.Shelley - ( PlutusScript (PlutusScriptSerialised) - , ShelleyLedgerEra - , fromAllegraTimelock - , fromShelleyMultiSig - ) + ( ShelleyLedgerEra ) -import qualified Cardano.Ledger.Alonzo.Language as Alonzo -import qualified Cardano.Ledger.Alonzo.Scripts as Alonzo import qualified Cardano.Ledger.Core as Ledger --- | Apply an era-parameterized function to an existentially-wrapped --- tx. -withShelleyBasedTx - :: InAnyShelleyBasedEra Tx - -> (forall era. IsShelleyBasedEra era => Tx era -> a) - -> a -withShelleyBasedTx (InAnyShelleyBasedEra _era tx) f - = f tx - -- | Helper function for more easily creating an existential -- @InAnyCardanoEra Tx@. inAnyCardanoEra :: IsCardanoEra era => Tx era -> InAnyCardanoEra Tx inAnyCardanoEra = InAnyCardanoEra cardanoEra --- | "Downcast" an existentially wrapped tx. -asAnyShelleyBasedEra - :: InAnyCardanoEra a - -> Maybe (InAnyShelleyBasedEra a) -asAnyShelleyBasedEra = \case - InAnyCardanoEra ByronEra _ -> - Nothing - InAnyCardanoEra ShelleyEra a -> - Just $ InAnyShelleyBasedEra ShelleyBasedEraShelley a - InAnyCardanoEra AllegraEra a -> - Just $ InAnyShelleyBasedEra ShelleyBasedEraAllegra a - InAnyCardanoEra MaryEra a -> - Just $ InAnyShelleyBasedEra ShelleyBasedEraMary a - InAnyCardanoEra AlonzoEra a -> - Just $ InAnyShelleyBasedEra ShelleyBasedEraAlonzo a - InAnyCardanoEra BabbageEra a -> - Just $ InAnyShelleyBasedEra ShelleyBasedEraBabbage a - InAnyCardanoEra ConwayEra a -> - Just $ InAnyShelleyBasedEra ShelleyBasedEraConway a - --- Copied from cardano-api because it is not exported. -fromShelleyBasedScript - :: ShelleyBasedEra era - -> Ledger.Script (ShelleyLedgerEra era) - -> ScriptInEra era -fromShelleyBasedScript era script = case era of - ShelleyBasedEraShelley -> - ScriptInEra SimpleScriptInShelley $ - SimpleScript $ - fromShelleyMultiSig script - ShelleyBasedEraAllegra -> - ScriptInEra SimpleScriptInAllegra $ - SimpleScript $ - fromAllegraTimelock script - ShelleyBasedEraMary -> - ScriptInEra SimpleScriptInMary $ - SimpleScript $ - fromAllegraTimelock script - ShelleyBasedEraAlonzo -> - case script of - Alonzo.TimelockScript s -> - ScriptInEra SimpleScriptInAlonzo $ - SimpleScript $ - fromAllegraTimelock s - Alonzo.PlutusScript Alonzo.PlutusV1 s -> - ScriptInEra PlutusScriptV1InAlonzo $ - PlutusScript PlutusScriptV1 $ - PlutusScriptSerialised s - Alonzo.PlutusScript Alonzo.PlutusV2 _ -> - error - "fromShelleyBasedScript: \ - \PlutusV2 not supported in Alonzo era" - ShelleyBasedEraBabbage -> - case script of - Alonzo.TimelockScript s -> - ScriptInEra SimpleScriptInBabbage $ - SimpleScript $ - fromAllegraTimelock s - Alonzo.PlutusScript Alonzo.PlutusV1 s -> - ScriptInEra PlutusScriptV1InBabbage $ - PlutusScript PlutusScriptV1 $ - PlutusScriptSerialised s - Alonzo.PlutusScript Alonzo.PlutusV2 s -> - ScriptInEra PlutusScriptV2InBabbage $ - PlutusScript PlutusScriptV2 $ - PlutusScriptSerialised s - - ShelleyBasedEraConway -> - case script of - Alonzo.TimelockScript s -> - ScriptInEra SimpleScriptInConway $ - SimpleScript $ - fromAllegraTimelock s - Alonzo.PlutusScript Alonzo.PlutusV1 s -> - ScriptInEra PlutusScriptV1InConway $ - PlutusScript PlutusScriptV1 $ - PlutusScriptSerialised s - Alonzo.PlutusScript Alonzo.PlutusV2 s -> - ScriptInEra PlutusScriptV2InConway $ - PlutusScript PlutusScriptV2 $ - PlutusScriptSerialised s - -- Not exposed by cardano-api unbundleLedgerShelleyBasedProtocolParams :: ShelleyBasedEra era diff --git a/lib/wallet/src/Cardano/Api/Gen.hs b/lib/wallet/src/Cardano/Api/Gen.hs index 0e9ff384c2b..036c3a0d489 100644 --- a/lib/wallet/src/Cardano/Api/Gen.hs +++ b/lib/wallet/src/Cardano/Api/Gen.hs @@ -108,6 +108,7 @@ module Cardano.Api.Gen , genWitnesses , genWitnessNetworkIdOrByronAddress , genWitnessStake + , genValidProtocolVersion ) where import Prelude @@ -149,10 +150,14 @@ import Data.Int ( Int64 ) import Data.IntCast ( intCast ) +import Data.IP + ( IPv4, IPv6, fromHostAddress, fromHostAddress6 ) import Data.List ( nub ) import Data.Map ( Map ) +import Data.Maybe + ( isJust ) import Data.Maybe.Strict ( strictMaybeToMaybe ) import Data.Ratio @@ -181,6 +186,8 @@ import Test.QuickCheck , NonNegative (..) , Positive (..) , arbitrary + , arbitraryASCIIChar + , arbitraryBoundedIntegral , arbitrarySizedNatural , choose , chooseInt @@ -224,7 +231,6 @@ import qualified Data.Set as Set import qualified Data.Text as T import qualified Data.Text.Encoding as T import qualified Test.Cardano.Ledger.Alonzo.PlutusScripts as Plutus -import qualified Test.Cardano.Ledger.Shelley.Serialisation.Generators.Genesis as Ledger -------------------------------------------------------------------------------- -- Constants @@ -494,16 +500,19 @@ genSimpleScriptOrReferenceInput = ] genScript :: ScriptLanguage lang -> Gen (Script lang) -genScript SimpleScriptLanguage = - SimpleScript <$> genSimpleScript -genScript (PlutusScriptLanguage lang) = - PlutusScript lang <$> genPlutusScript lang +genScript = \case + SimpleScriptLanguage -> SimpleScript <$> genSimpleScript + PlutusScriptLanguage lang -> PlutusScript lang <$> genPlutusScript lang -genScriptInAnyLang :: Gen ScriptInAnyLang -genScriptInAnyLang = +genScriptInAnyLang :: Maybe (CardanoEra era) -> Gen ScriptInAnyLang +genScriptInAnyLang optionalEra = oneof [ ScriptInAnyLang lang <$> genScript lang - | AnyScriptLanguage lang <- [minBound..maxBound] ] + | AnyScriptLanguage lang <- [minBound..maxBound] + , case optionalEra of + Nothing -> True + Just era -> isJust (scriptLanguageSupportedInEra era lang) + ] genScriptInEra :: CardanoEra era -> Gen (ScriptInEra era) genScriptInEra era = @@ -514,7 +523,7 @@ genScriptInEra era = genScriptHash :: Gen ScriptHash genScriptHash = do - ScriptInAnyLang _ script <- genScriptInAnyLang + ScriptInAnyLang _ script <- genScriptInAnyLang Nothing return (hashScript script) genAssetName :: Gen AssetName @@ -888,7 +897,6 @@ genStakeAddressReference :: Gen StakeAddressReference genStakeAddressReference = oneof [ StakeAddressByValue <$> genStakeCredential - , (StakeAddressByPointer . StakeAddressPointer) <$> genPtr , return NoStakeAddress ] @@ -912,8 +920,8 @@ genAddressAnyWithNetworkId genNetworkId' = oneof [ AddressByron <$> genAddressByronWithNetworkId genNetworkId' - {- , AddressShelley - <$> genAddressShelleyWithNetworkId genNetworkId' -} + , AddressShelley + <$> genAddressShelleyWithNetworkId genNetworkId' ] genAddressByronWithNetworkId :: Gen NetworkId -> Gen (Address ByronAddr) @@ -985,7 +993,7 @@ genReferenceScript era = case refInsScriptsAndInlineDatsSupportedInEra era of Nothing -> pure ReferenceScriptNone Just supported -> oneof [ pure ReferenceScriptNone - , ReferenceScript supported <$> genScriptInAnyLang + , ReferenceScript supported <$> genScriptInAnyLang (Just era) ] mkDummyHash :: forall h a. Crypto.HashAlgorithm h => Int -> Crypto.Hash h a @@ -1066,20 +1074,26 @@ protocolParametersForHashing = generateWith (GenSeed 0) genSizeDefault genRecentEraProtocolParameters +genValidProtocolVersion :: Gen (Natural, Natural) +genValidProtocolVersion = do + major <- fromIntegral @Int <$> choose (0, 9) + minor <- genNat + pure (major, minor) + -- | Generates a set of protocol parameters for a recent era. -- -- Uses 'Just' as necessary to be convertible to @Ledger.PParams era@ -- for 'IsRecentEra' eras, and keep our tests from throwing exceptions. genRecentEraProtocolParameters :: Gen ProtocolParameters genRecentEraProtocolParameters = ProtocolParameters - <$> ((,) <$> genNat <*> genNat) + <$> genValidProtocolVersion <*> (Just <$> genRational) <*> liftArbitrary genPraosNonce <*> genNat <*> genNat <*> genNat - <*> genNat - <*> genNat + <*> genLovelace + <*> genLovelace <*> liftArbitrary genLovelace <*> genLovelace <*> genLovelace @@ -1220,7 +1234,7 @@ genStakePoolMetadataReference = do genStakePoolRelay :: Gen StakePoolRelay genStakePoolRelay = do - relay <- hedgehog Ledger.genStakePoolRelay + relay <- genLedgerStakePoolRelay pure $ case relay of Ledger.SingleHostAddr mPort mIPv4 mIPv6 -> StakePoolRelayIp @@ -1235,9 +1249,48 @@ genStakePoolRelay = do StakePoolRelayDnsSrvRecord (T.encodeUtf8 . Ledger.dnsToText $ dnsName) - where - castPort :: Ledger.Port -> PortNumber - castPort = fromInteger . toInteger . Ledger.portToWord16 + where + castPort :: Ledger.Port -> PortNumber + castPort = fromInteger . toInteger . Ledger.portToWord16 + + -- See https://github.com/input-output-hk/cardano-ledger-1-tech-writing-tweaks/blob/2de173e8574ab079c9e18013d7906c20a70a7251/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Serialisation/Generators/Genesis.hs#L113 + genLedgerStakePoolRelay :: Gen Ledger.StakePoolRelay + genLedgerStakePoolRelay = oneof + [ Ledger.SingleHostAddr + <$> genStrictMaybe genPort + <*> genStrictMaybe genIPv4 + <*> genStrictMaybe genIPv6 + , Ledger.SingleHostName + <$> genStrictMaybe genPort + <*> genDnsName + , Ledger.MultiHostName + <$> genDnsName + ] + + genDnsName :: Gen Ledger.DnsName + genDnsName = do + txtLength <- choose (1, 63) + txt <- T.pack <$> vectorOf txtLength arbitraryASCIIChar + case Ledger.textToDns txt of + Nothing -> error "wrong generator for DnsName" + Just dns -> return dns + + genIPv4 :: Gen IPv4 + genIPv4 = fromHostAddress <$> arbitraryBoundedIntegral + + genIPv6 :: Gen IPv6 + genIPv6 = do + w1 <- arbitraryBoundedIntegral + w2 <- arbitraryBoundedIntegral + w3 <- arbitraryBoundedIntegral + w4 <- arbitraryBoundedIntegral + pure $ fromHostAddress6 (w1, w2, w3, w4) + + genPort :: Gen Ledger.Port + genPort = Ledger.Port <$> arbitraryBoundedIntegral + + genStrictMaybe :: Gen a -> Gen (Ledger.StrictMaybe a) + genStrictMaybe gen = Ledger.maybeToStrictMaybe <$> liftArbitrary gen genStakePoolParameters :: Gen StakePoolParameters genStakePoolParameters = @@ -1257,7 +1310,7 @@ genTxCertificate = oneof [ StakeAddressRegistrationCertificate <$> genStakeCredential , StakeAddressDeregistrationCertificate <$> genStakeCredential - , StakeAddressDelegationCertificate <$> genStakeCredential <*> genPoolId + , StakeAddressPoolDelegationCertificate <$> genStakeCredential <*> genPoolId , StakePoolRegistrationCertificate <$> genStakePoolParameters , StakePoolRetirementCertificate <$> genPoolId <*> genEpochNo , GenesisKeyDelegationCertificate @@ -1294,7 +1347,7 @@ genTxCertificates era = genProtocolParametersUpdate :: Gen ProtocolParametersUpdate genProtocolParametersUpdate = do protocolUpdateProtocolVersion <- - liftArbitrary ((,) <$> genNat <*> genNat) + liftArbitrary genValidProtocolVersion protocolUpdateDecentralization <- liftArbitrary genRational protocolUpdateExtraPraosEntropy <- @@ -1306,9 +1359,9 @@ genProtocolParametersUpdate = do protocolUpdateMaxTxSize <- liftArbitrary genNat protocolUpdateTxFeeFixed <- - liftArbitrary genNat + liftArbitrary genLovelace protocolUpdateTxFeePerByte <- - liftArbitrary genNat + liftArbitrary genLovelace protocolUpdateMinUTxOValue <- liftArbitrary genLovelace protocolUpdateStakeAddressDeposit <- @@ -1445,18 +1498,16 @@ genTxBodyContent era = do } let witnesses = collectTxBodyScriptWitnesses txBody + pparams = BuildTxWith $ Just protocolParametersForHashing -- No use of a script language means no need for collateral if Set.null (languages witnesses) then do - pparams <- BuildTxWith - <$> liftArbitrary (pure protocolParametersForHashing) collateral <- genTxInsCollateral era pure txBody { Api.txProtocolParams = pparams , Api.txInsCollateral = collateral } else do - let pparams = BuildTxWith . Just $ protocolParametersForHashing collateral <- case collateralSupportedInEra era of Nothing -> pure TxInsCollateralNone diff --git a/lib/wallet/src/Cardano/DB/Sqlite.hs b/lib/wallet/src/Cardano/DB/Sqlite.hs index c77d300695a..050e9c5dd43 100644 --- a/lib/wallet/src/Cardano/DB/Sqlite.hs +++ b/lib/wallet/src/Cardano/DB/Sqlite.hs @@ -16,6 +16,8 @@ -- TODO: https://input-output.atlassian.net/browse/ADP-2841 {-# OPTIONS_GHC -fno-warn-deprecations #-} +-- TODO: https://input-output.atlassian.net/browse/ADP-3075 +{-# OPTIONS_GHC -Wno-deriving-defaults #-} {- HLINT ignore "Redundant flip" -} @@ -525,7 +527,7 @@ noManualMigration :: ManualMigration noManualMigration = ManualMigration $ const $ pure () foldMigrations :: [Sqlite.Connection -> IO ()] -> ManualMigration -foldMigrations ms = ManualMigration $ \conn -> sequence_ $ ms <&> ($conn) +foldMigrations ms = ManualMigration $ \conn -> sequence_ $ ms <&> ($ conn) data DBField where DBField diff --git a/lib/wallet/src/Cardano/Wallet.hs b/lib/wallet/src/Cardano/Wallet.hs index 4a966d4b2a1..a076d35587c 100644 --- a/lib/wallet/src/Cardano/Wallet.hs +++ b/lib/wallet/src/Cardano/Wallet.hs @@ -546,13 +546,7 @@ import Control.DeepSeq import Control.Monad ( forM, forM_, join, replicateM, unless, when, (<=<) ) import Control.Monad.Class.MonadTime - ( DiffTime - , MonadMonotonicTime (..) - , MonadTime (..) - , Time - , diffTime - , getCurrentTime - ) + ( MonadTime (..) ) import Control.Monad.IO.Unlift ( MonadIO (..), MonadUnliftIO ) import Control.Monad.Random.Strict @@ -617,7 +611,7 @@ import Data.Text import Data.Text.Class ( ToText (..) ) import Data.Time.Clock - ( NominalDiffTime, UTCTime ) + ( DiffTime, NominalDiffTime, UTCTime ) import Data.Void ( Void ) import Data.Word @@ -641,6 +635,8 @@ import GHC.Num ( Natural ) import GHC.TypeNats ( Nat ) +import Ouroboros.Consensus.Util.IOLike + ( MonadMonotonicTime, Time, diffTime, getMonotonicTime ) import Statistics.Quantile ( medianUnbiased, quantiles ) import UnliftIO.Exception @@ -659,8 +655,8 @@ import qualified Cardano.Wallet.Address.Discovery.Shared as Shared import qualified Cardano.Wallet.Checkpoints.Policy as CP import qualified Cardano.Wallet.DB.Store.Delegations.Layer as Dlgs import qualified Cardano.Wallet.DB.Store.Submissions.Layer as Submissions -import qualified Cardano.Wallet.DB.WalletState as WS import qualified Cardano.Wallet.DB.WalletState as WalletState +import qualified Cardano.Wallet.DB.WalletState as WS import qualified Cardano.Wallet.Primitive.Migration as Migration import qualified Cardano.Wallet.Primitive.Slotting as Slotting import qualified Cardano.Wallet.Primitive.Types as W @@ -1090,9 +1086,7 @@ restoreWallet ctx = db & \DBLayer{..} -> let checkpointPolicy = CP.defaultPolicy readChainPoints = atomically listCheckpoints rollBackward = rollbackBlocks @_ @s ctx . toSlot - rollForward' blockdata tip = - restoreBlocks @_ @s - ctx (contramap MsgWalletFollow tr) blockdata tip + rollForward' = restoreBlocks @_ @s ctx (contramap MsgWalletFollow tr) in catchFromIO $ case (maybeDiscover, lightSync nw) of (Just discover, Just sync) -> diff --git a/lib/wallet/src/Cardano/Wallet/DB/Layer.hs b/lib/wallet/src/Cardano/Wallet/DB/Layer.hs index 179cc1f1087..422aba24689 100644 --- a/lib/wallet/src/Cardano/Wallet/DB/Layer.hs +++ b/lib/wallet/src/Cardano/Wallet/DB/Layer.hs @@ -146,7 +146,7 @@ import Control.DeepSeq import Control.Exception ( evaluate, throw ) import Control.Monad - ( forM, unless ) + ( forM, unless, when ) import Control.Monad.IO.Class ( MonadIO (..) ) import Control.Monad.Trans @@ -643,9 +643,7 @@ mkDBFreshFromParts $ cp ^. #currentTip Just wallet -> do present <- lift . atomically_ $ getWalletId_ - if present - then throwE ErrWalletAlreadyInitialized - else pure () + when present $ throwE ErrWalletAlreadyInitialized lift $ do r@DBLayer{transactionsStore, atomically} <- atomically_ $ db <$> initDBVar store wallet diff --git a/lib/wallet/src/Cardano/Wallet/DB/Sqlite/Types.hs b/lib/wallet/src/Cardano/Wallet/DB/Sqlite/Types.hs index bac45a51aab..8b57d36d609 100644 --- a/lib/wallet/src/Cardano/Wallet/DB/Sqlite/Types.hs +++ b/lib/wallet/src/Cardano/Wallet/DB/Sqlite/Types.hs @@ -81,8 +81,12 @@ import Cardano.Wallet.Primitive.Types.Tx.TxMeta ( Direction (..), TxStatus (..) ) import Control.Arrow ( left ) +import Control.Lens + ( (&) ) import Control.Monad ( (<=<), (>=>) ) +import Control.Monad.Fail.Extended + ( ReportFailure (..) ) import Data.Aeson ( FromJSON (..), ToJSON (..), Value (..) ) import Data.Aeson.Extra @@ -711,23 +715,14 @@ instance PersistField POSIXTime where . posixSecondsToUTCTime fromPersistValue (PersistText time) = utcTimeToPOSIXSeconds <$> - getEitherText (parseTimeM True defaultTimeLocale - iso8601DateFormatHMS (T.unpack time)) + reportFailure (parseTimeM True defaultTimeLocale + iso8601DateFormatHMS (T.unpack time)) & left T.pack fromPersistValue _ = Left "Could not parse POSIX time value" instance PersistFieldSql POSIXTime where sqlType _ = sqlType (Proxy @Text) --- | Newtype to get a MonadFail instance for @Either Text@. --- --- We need it to use @parseTimeM@. -newtype EitherText a = EitherText { getEitherText :: Either Text a } - deriving (Functor, Applicative, Monad) via (Either Text) - -instance MonadFail EitherText where - fail = EitherText . Left . T.pack - data TxSubmissionStatusEnum = InSubmissionE | InLedgerE | ExpiredE deriving (Eq, Show, Enum, Generic) diff --git a/lib/wallet/src/Cardano/Wallet/DB/Store/Delegations/Migration.hs b/lib/wallet/src/Cardano/Wallet/DB/Store/Delegations/Migration.hs index 840d4e29ac2..4b566ab65f5 100644 --- a/lib/wallet/src/Cardano/Wallet/DB/Store/Delegations/Migration.hs +++ b/lib/wallet/src/Cardano/Wallet/DB/Store/Delegations/Migration.hs @@ -19,7 +19,6 @@ import Cardano.Wallet.DB.Sqlite.Migration.Old import Cardano.Wallet.DB.Store.Delegations.Migration.Schema ( DelegationCertificate (..) , EntityField (..) - , EntityField (StakeKeyCertSlot) , StakeKeyCertificate (..) , WStakeKeyCertificate (..) ) diff --git a/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/Model.hs b/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/Model.hs index ffe59f033cf..c4b424aad84 100644 --- a/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/Model.hs +++ b/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/Model.hs @@ -91,9 +91,9 @@ import GHC.Generics import qualified Cardano.Wallet.Primitive.Types as W import qualified Cardano.Wallet.Primitive.Types.Coin as W import qualified Cardano.Wallet.Primitive.Types.TokenBundle as TokenBundle -import qualified Cardano.Wallet.Primitive.Types.Tx.Tx as W.Tx import qualified Cardano.Wallet.Primitive.Types.Tx.Tx as W ( Tx ) +import qualified Cardano.Wallet.Primitive.Types.Tx.Tx as W.Tx import qualified Cardano.Wallet.Primitive.Types.Tx.TxIn as W ( TxIn ) import qualified Cardano.Wallet.Primitive.Types.Tx.TxIn as W.TxIn diff --git a/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/Store.hs b/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/Store.hs index e22aa3a011d..95665505b78 100644 --- a/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/Store.hs +++ b/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/Store.hs @@ -28,7 +28,6 @@ import Prelude import Cardano.Wallet.DB.Sqlite.Schema ( CBOR (..) - , CBOR (..) , EntityField (..) , TxCollateral (..) , TxCollateralOut (..) @@ -42,7 +41,6 @@ import Cardano.Wallet.DB.Sqlite.Types ( TxId ) import Cardano.Wallet.DB.Store.Transactions.Model ( DeltaTxSet (..) - , DeltaTxSet , TxRelation (..) , TxSet (..) , tokenCollateralOrd diff --git a/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/TransactionInfo.hs b/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/TransactionInfo.hs index d545a40ee25..08c6acb7f2c 100644 --- a/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/TransactionInfo.hs +++ b/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/TransactionInfo.hs @@ -5,6 +5,7 @@ module Cardano.Wallet.DB.Store.Transactions.TransactionInfo ( mkTransactionInfoFromRelation , mkTransactionInfoFromReadTx + , mkTxCBOR ) where import Prelude hiding @@ -150,8 +151,8 @@ mkTransactionInfoFromRelation ti tip TxRelation{..} ) mkTxWithdrawal w = (txWithdrawalAccount w, txWithdrawalAmount w) - mkTxCBOR :: DB.CBOR -> Maybe TxCBOR - mkTxCBOR = either (const Nothing) (Just . snd) . L.match txCBORPrism +mkTxCBOR :: DB.CBOR -> Maybe TxCBOR +mkTxCBOR = either (const Nothing) (Just . snd) . L.match txCBORPrism -- | Compute a high level view of a transaction known as 'TransactionInfo' -- from a CBOR and a slimmed down version of TxMeta diff --git a/lib/wallet/src/Cardano/Wallet/DB/Store/Wallets/Store.hs b/lib/wallet/src/Cardano/Wallet/DB/Store/Wallets/Store.hs index fb3202cf087..ab2e891410c 100644 --- a/lib/wallet/src/Cardano/Wallet/DB/Store/Wallets/Store.hs +++ b/lib/wallet/src/Cardano/Wallet/DB/Store/Wallets/Store.hs @@ -46,7 +46,7 @@ mkStoreTxWalletsHistory storeTransactions storeMeta = liftA2 (,) <$> loadS storeTransactions <*> loadS storeMeta - write = \(txSet, txMetaHistory) -> do + write (txSet, txMetaHistory) = do writeS storeTransactions txSet writeS storeMeta txMetaHistory update ma delta = diff --git a/lib/wallet/src/Cardano/Wallet/Flavor.hs b/lib/wallet/src/Cardano/Wallet/Flavor.hs index 7226ba16800..b11df577468 100644 --- a/lib/wallet/src/Cardano/Wallet/Flavor.hs +++ b/lib/wallet/src/Cardano/Wallet/Flavor.hs @@ -1,6 +1,7 @@ {-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DataKinds #-} +{-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} @@ -33,6 +34,7 @@ module Cardano.Wallet.Flavor , IncludingStates , KeyFlavor (..) , CredFromOf + , Flavored(..) ) where @@ -53,6 +55,7 @@ import Cardano.Wallet.Address.Discovery.Sequential import Cardano.Wallet.Address.Discovery.Shared ( SharedState (..) ) import Cardano.Wallet.Address.States.Families + ( CredFromOf, KeyOf, NetworkOf ) import Cardano.Wallet.Address.States.Features ( TestFeatures ) import Cardano.Wallet.Address.States.Test.State @@ -73,8 +76,8 @@ data WalletFlavorS s where => TestFeatures (TestState s1 n k kt) -> WalletFlavorS (TestState s1 n k kt) -type family TestStateOf s where - TestStateOf (TestState s n k kt) = s +data Flavored a = forall s. Flavored (WalletFlavorS s) a + data WalletFlavors = ShelleyF | IcarusF diff --git a/lib/wallet/src/Cardano/Wallet/Pools.hs b/lib/wallet/src/Cardano/Wallet/Pools.hs index 5bd0023c60e..b3d704d319a 100644 --- a/lib/wallet/src/Cardano/Wallet/Pools.hs +++ b/lib/wallet/src/Cardano/Wallet/Pools.hs @@ -262,8 +262,8 @@ withNodeStakePoolLayer tr settings dbLayer@DBLayer{..} netParams genesisPools ne -- fixme: needs to be simplified as part of ADP-634 let NetworkParameters{slottingParameters} = netParams - startMetadataThread = forkIOWithUnmask - ($ monitorMetadata gcStatus tr slottingParameters dbLayer) + startMetadataThread = forkIOWithUnmask $ \f -> + f $ monitorMetadata gcStatus tr slottingParameters dbLayer metadataThread <- newMVar =<< startMetadataThread let restartMetadataThread = modifyMVar_ metadataThread $ killThread >=> const startMetadataThread diff --git a/lib/wallet/src/Cardano/Wallet/Primitive/Types/MinimumUTxO/Gen.hs b/lib/wallet/src/Cardano/Wallet/Primitive/Types/MinimumUTxO/Gen.hs index dee5d7af175..8bbdd3c2f7f 100644 --- a/lib/wallet/src/Cardano/Wallet/Primitive/Types/MinimumUTxO/Gen.hs +++ b/lib/wallet/src/Cardano/Wallet/Primitive/Types/MinimumUTxO/Gen.hs @@ -28,23 +28,29 @@ import Prelude import Cardano.Api ( ShelleyBasedEra (..) ) +import Cardano.Ledger.Api + ( CoinPerByte (..) + , CoinPerWord (..) + , emptyPParams + , ppCoinsPerUTxOByteL + , ppCoinsPerUTxOWordL + , ppMinUTxOValueL + ) import Cardano.Wallet.Primitive.Types.Coin ( Coin (..) ) import Cardano.Wallet.Primitive.Types.Coin.Gen ( chooseCoin ) import Cardano.Wallet.Primitive.Types.MinimumUTxO ( MinimumUTxO (..), MinimumUTxOForShelleyBasedEra (..) ) -import Data.Default - ( Default (..) ) +import Control.Lens + ( (&), (.~) ) import Data.Semigroup ( stimes ) import Test.QuickCheck ( Gen, chooseInteger, frequency, oneof ) -import qualified Cardano.Ledger.Alonzo.PParams as Alonzo -import qualified Cardano.Ledger.Babbage.PParams as Babbage +import qualified Cardano.Ledger.Api as Ledger import qualified Cardano.Ledger.Coin as Ledger -import qualified Cardano.Ledger.Shelley.PParams as Shelley -------------------------------------------------------------------------------- -- Generating 'MinimumUTxO' values @@ -61,9 +67,9 @@ genMinimumUTxO = frequency genMinimumUTxONone = pure MinimumUTxONone genMinimumUTxOConstant :: Gen MinimumUTxO - genMinimumUTxOConstant = MinimumUTxOConstant <$> + genMinimumUTxOConstant = -- The 'MinimumUTxOConstant' constructor is only used for testing. - genCoinOfSimilarMagnitude (Coin 1_000_000) + MinimumUTxOConstant <$> genCoinOfSimilarMagnitude (Coin 1_000_000) shrinkMinimumUTxO :: MinimumUTxO -> [MinimumUTxO] shrinkMinimumUTxO = const [] @@ -74,48 +80,64 @@ shrinkMinimumUTxO = const [] genMinimumUTxOForShelleyBasedEra :: Gen MinimumUTxOForShelleyBasedEra -genMinimumUTxOForShelleyBasedEra = oneof - [ genShelley - , genAllegra - , genMary - , genAlonzo - , genBabbage - ] +genMinimumUTxOForShelleyBasedEra = + oneof + [ genShelley + , genAllegra + , genMary + , genAlonzo + , genBabbage + ] where genShelley :: Gen MinimumUTxOForShelleyBasedEra genShelley = do - minUTxOValue <- genLedgerCoinOfSimilarMagnitude - testParameter_minUTxOValue_Shelley - pure $ MinimumUTxOForShelleyBasedEra ShelleyBasedEraShelley - def {Shelley._minUTxOValue = minUTxOValue} + minUTxOValue <- + genLedgerCoinOfSimilarMagnitude + id + id + testParameter_minUTxOValue_Shelley + let pParams = emptyPParams & ppMinUTxOValueL .~ minUTxOValue + pure $ MinimumUTxOForShelleyBasedEra ShelleyBasedEraShelley pParams genAllegra :: Gen MinimumUTxOForShelleyBasedEra genAllegra = do - minUTxOValue <- genLedgerCoinOfSimilarMagnitude - testParameter_minUTxOValue_Allegra - pure $ MinimumUTxOForShelleyBasedEra ShelleyBasedEraAllegra - def {Shelley._minUTxOValue = minUTxOValue} + minUTxOValue <- + genLedgerCoinOfSimilarMagnitude + id + id + testParameter_minUTxOValue_Allegra + let pParams = emptyPParams & ppMinUTxOValueL .~ minUTxOValue + pure $ MinimumUTxOForShelleyBasedEra ShelleyBasedEraAllegra pParams genMary :: Gen MinimumUTxOForShelleyBasedEra genMary = do - minUTxOValue <- genLedgerCoinOfSimilarMagnitude - testParameter_minUTxOValue_Mary - pure $ MinimumUTxOForShelleyBasedEra ShelleyBasedEraMary - def {Shelley._minUTxOValue = minUTxOValue} - - genAlonzo :: Gen MinimumUTxOForShelleyBasedEra - genAlonzo = do - coinsPerUTxOWord <- genLedgerCoinOfSimilarMagnitude + minUTxOValue <- + genLedgerCoinOfSimilarMagnitude + id + id + testParameter_minUTxOValue_Mary + let pParams = emptyPParams & ppMinUTxOValueL .~ minUTxOValue + pure $ MinimumUTxOForShelleyBasedEra ShelleyBasedEraMary pParams + +genAlonzo :: Gen MinimumUTxOForShelleyBasedEra +genAlonzo = do + coinsPerUTxOWord <- + genLedgerCoinOfSimilarMagnitude + CoinPerWord + unCoinPerWord testParameter_coinsPerUTxOWord_Alonzo - pure $ MinimumUTxOForShelleyBasedEra ShelleyBasedEraAlonzo - def {Alonzo._coinsPerUTxOWord = coinsPerUTxOWord} - - genBabbage :: Gen MinimumUTxOForShelleyBasedEra - genBabbage = do - coinsPerUTxOByte <- genLedgerCoinOfSimilarMagnitude + let pParams = emptyPParams & ppCoinsPerUTxOWordL .~ coinsPerUTxOWord + pure $ MinimumUTxOForShelleyBasedEra ShelleyBasedEraAlonzo pParams + +genBabbage :: Gen MinimumUTxOForShelleyBasedEra +genBabbage = do + coinsPerUTxOByte <- + genLedgerCoinOfSimilarMagnitude + CoinPerByte + unCoinPerByte testParameter_coinsPerUTxOByte_Babbage - pure $ MinimumUTxOForShelleyBasedEra ShelleyBasedEraBabbage - def {Babbage._coinsPerUTxOByte = coinsPerUTxOByte} + let pParams = emptyPParams & ppCoinsPerUTxOByteL .~ coinsPerUTxOByte + pure $ MinimumUTxOForShelleyBasedEra ShelleyBasedEraBabbage pParams shrinkMinimumUTxOForShelleyBasedEra :: MinimumUTxOForShelleyBasedEra -> [MinimumUTxOForShelleyBasedEra] @@ -150,37 +172,42 @@ testParameter_minUTxOValue_Mary = Ledger.Coin 1_000_000 -- -- Value derived from 'mainnet-alonzo-genesis.json'. -- -testParameter_coinsPerUTxOWord_Alonzo :: Ledger.Coin -testParameter_coinsPerUTxOWord_Alonzo = Ledger.Coin 34_482 +testParameter_coinsPerUTxOWord_Alonzo :: Ledger.CoinPerWord +testParameter_coinsPerUTxOWord_Alonzo + = Ledger.CoinPerWord $ Ledger.Coin 34_482 -- | A test value of the Babbage-era 'coinsPerUTxOByte' parameter. -- -- Value derived from 'mainnet-alonzo-genesis.json': -- >>> 34_482 `div` 8 == 4_310 -- -testParameter_coinsPerUTxOByte_Babbage :: Ledger.Coin -testParameter_coinsPerUTxOByte_Babbage = Ledger.Coin 4_310 +testParameter_coinsPerUTxOByte_Babbage :: Ledger.CoinPerByte +testParameter_coinsPerUTxOByte_Babbage + = Ledger.CoinPerByte $ Ledger.Coin 4_310 -------------------------------------------------------------------------------- -- Internal functions -------------------------------------------------------------------------------- --- | Chooses a 'Ledger.Coin' value from within the given range. --- + +-- | Chooses a 'Coin' value from within the given range. chooseLedgerCoin :: (Ledger.Coin, Ledger.Coin) -> Gen Ledger.Coin chooseLedgerCoin (Ledger.Coin lo, Ledger.Coin hi) = Ledger.Coin <$> chooseInteger (lo, hi) + -- | Generates a wallet 'Coin' value that has a similar magnitude to the given -- value. --- genCoinOfSimilarMagnitude :: Coin -> Gen Coin genCoinOfSimilarMagnitude coin = chooseCoin (mempty, stimes (2 :: Int) coin) --- | Generates a 'Ledger.Coin' value that has a similar magnitude to the given --- value. --- -genLedgerCoinOfSimilarMagnitude :: Ledger.Coin -> Gen Ledger.Coin -genLedgerCoinOfSimilarMagnitude coin = - chooseLedgerCoin (mempty, stimes (2 :: Int) coin) +-- | Generates a 'Coin' value that has a similar magnitude to the given value. +-- genLedgerCoinOfSimilarMagnitude :: Ledger.Coin -> Gen Ledger.Coin +genLedgerCoinOfSimilarMagnitude + :: (Ledger.Coin -> b) + -> (b -> Ledger.Coin) + -> b + -> Gen b +genLedgerCoinOfSimilarMagnitude l l' coin = + l <$> chooseLedgerCoin (mempty, stimes (2 :: Int) $ l' coin) diff --git a/lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Allegra.hs b/lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Allegra.hs index eee93bc6104..63ed6dc5633 100644 --- a/lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Allegra.hs +++ b/lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Allegra.hs @@ -27,16 +27,27 @@ import Cardano.Address.Script ( KeyRole (..) ) import Cardano.Api ( AllegraEra ) +import Cardano.Ledger.Api + ( addrTxWitsL + , auxDataTxL + , bodyTxL + , bootAddrTxWitsL + , certsTxBodyL + , feeTxBodyL + , inputsTxBodyL + , outputsTxBodyL + , scriptTxWitsL + , vldtTxBodyL + , witsTxL + ) import Cardano.Ledger.Core - ( auxDataTxL, bodyTxL, feeTxBodyL, inputsTxBodyL, outputsTxBodyL, witsTxL ) -import Cardano.Ledger.Shelley.TxBody - ( certsTxBodyL, wdrlsTxBodyL ) + () +import Cardano.Ledger.Shelley.Tx + ( ShelleyTx ) import Cardano.Wallet.Read.Eras ( allegra, inject ) import Cardano.Wallet.Read.Primitive.Tx.Features.Certificates ( anyEraCerts ) -import Cardano.Wallet.Read.Primitive.Tx.Features.Fee - ( fromShelleyCoin ) import Cardano.Wallet.Read.Primitive.Tx.Features.Inputs ( fromShelleyTxIn ) import Cardano.Wallet.Read.Primitive.Tx.Features.Metadata @@ -46,13 +57,15 @@ import Cardano.Wallet.Read.Primitive.Tx.Features.Outputs import Cardano.Wallet.Read.Primitive.Tx.Features.Validity ( afterShelleyValidityInterval ) import Cardano.Wallet.Read.Primitive.Tx.Features.Withdrawals - ( fromShelleyWdrl ) + ( fromLedgerWithdrawals ) import Cardano.Wallet.Read.Tx ( Tx (..) ) import Cardano.Wallet.Read.Tx.CBOR ( renderTxToCBOR ) import Cardano.Wallet.Read.Tx.Hash ( shelleyTxHash ) +import Cardano.Wallet.Read.Tx.Withdrawals + ( shelleyWithdrawals ) import Cardano.Wallet.Shelley.Compatibility.Ledger ( toWalletScript ) import Cardano.Wallet.Transaction @@ -64,24 +77,22 @@ import Cardano.Wallet.Transaction , emptyTokenMapWithScripts ) import Control.Lens - ( (^.) ) + ( folded, (^.), (^..) ) import Data.Foldable ( toList ) import qualified Cardano.Api.Shelley as Cardano import qualified Cardano.Ledger.BaseTypes as SL -import qualified Cardano.Ledger.Shelley.API as SL -import qualified Cardano.Ledger.Shelley.Tx as SL -import qualified Cardano.Ledger.ShelleyMA.TxBody as MA import qualified Cardano.Wallet.Primitive.Types as W import qualified Cardano.Wallet.Primitive.Types.Hash as W import qualified Cardano.Wallet.Primitive.Types.Tx as W -import qualified Data.Map.Strict as Map +import qualified Cardano.Wallet.Shelley.Compatibility.Ledger as Ledger import qualified Data.Set as Set + -- NOTE: For resolved inputs we have to pass in a dummy value of 0. fromAllegraTx - :: SL.ShelleyTx (Cardano.ShelleyLedgerEra AllegraEra) + :: ShelleyTx (Cardano.ShelleyLedgerEra AllegraEra) -> ( W.Tx , [W.Certificate] , TokenMapWithScripts @@ -96,44 +107,30 @@ fromAllegraTx tx = , txCBOR = Just $ renderTxToCBOR $ inject allegra $ Tx tx , fee = - Just $ fromShelleyCoin fee + Just $ Ledger.toWalletCoin $ tx ^. bodyTxL . feeTxBodyL , resolvedInputs = - map ((,Nothing) . fromShelleyTxIn) (toList ins) + (,Nothing) . fromShelleyTxIn <$> tx ^.. bodyTxL.inputsTxBodyL.folded , resolvedCollateralInputs = - -- TODO: (ADP-957) - [] + [] -- TODO: (ADP-957) , outputs = - map fromAllegraTxOut (toList outs) + fromAllegraTxOut <$> toList (tx ^. bodyTxL . outputsTxBodyL) , collateralOutput = - -- Collateral outputs are not supported in Allegra. - Nothing + Nothing -- Collateral outputs are not supported in Allegra. , withdrawals = - fromShelleyWdrl wdrls + fromLedgerWithdrawals . shelleyWithdrawals $ tx , metadata = - fromAllegraMetadata <$> SL.strictMaybeToMaybe mmd + fromAllegraMetadata <$> SL.strictMaybeToMaybe (tx ^. auxDataTxL) , scriptValidity = Nothing } - , anyEraCerts certs + , anyEraCerts $ tx ^. bodyTxL . certsTxBodyL , emptyTokenMapWithScripts , emptyTokenMapWithScripts - , Just $ afterShelleyValidityInterval vldl - , countWits + , Just $ afterShelleyValidityInterval $ tx ^. bodyTxL.vldtTxBodyL + , WitnessCount + (fromIntegral $ Set.size $ tx ^. witsTxL.addrTxWitsL) + ((`NativeExplicitScript` ViaSpending) + . toWalletScript (\_vkey -> Payment) + <$> tx ^.. witsTxL.scriptTxWitsL.folded) + (fromIntegral $ Set.size $ tx ^. witsTxL.bootAddrTxWitsL) ) - where - ins = tx ^. bodyTxL . inputsTxBodyL - outs = tx ^. bodyTxL . outputsTxBodyL - certs = tx ^. bodyTxL . certsTxBodyL - wdrls = tx ^. bodyTxL . wdrlsTxBodyL - fee = tx ^. bodyTxL . feeTxBodyL - vldl = tx ^. bodyTxL . MA.vldtTxBodyL - wits = tx ^. witsTxL - mmd = tx ^. auxDataTxL - - scriptMap = - Map.map (flip NativeExplicitScript ViaSpending . toWalletScript (const Payment)) - $ SL.scriptWits wits - countWits = WitnessCount - (fromIntegral $ Set.size $ SL.addrWits wits) - (Map.elems scriptMap) - (fromIntegral $ Set.size $ SL.bootWits wits) diff --git a/lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Alonzo.hs b/lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Alonzo.hs index 40cd840907e..17d51579c34 100644 --- a/lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Alonzo.hs +++ b/lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Alonzo.hs @@ -1,6 +1,7 @@ {-# LANGUAGE DataKinds #-} {-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE LambdaCase #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} @@ -19,16 +20,26 @@ import Prelude import Cardano.Api ( AlonzoEra ) -import Cardano.Ledger.Era - ( Era (..) ) -import Cardano.Wallet.Primitive.Types.TokenPolicy - ( TokenPolicyId ) +import Cardano.Ledger.Api + ( addrTxWitsL + , auxDataTxL + , bodyTxL + , bootAddrTxWitsL + , certsTxBodyL + , collateralInputsTxBodyL + , feeTxBodyL + , inputsTxBodyL + , isValidTxL + , mintTxBodyL + , outputsTxBodyL + , scriptTxWitsL + , vldtTxBodyL + , witsTxL + ) import Cardano.Wallet.Read.Eras ( alonzo, inject ) import Cardano.Wallet.Read.Primitive.Tx.Features.Certificates ( anyEraCerts ) -import Cardano.Wallet.Read.Primitive.Tx.Features.Fee - ( fromShelleyCoin ) import Cardano.Wallet.Read.Primitive.Tx.Features.Inputs ( fromShelleyTxIn ) import Cardano.Wallet.Read.Primitive.Tx.Features.Metadata @@ -40,15 +51,17 @@ import Cardano.Wallet.Read.Primitive.Tx.Features.Outputs import Cardano.Wallet.Read.Primitive.Tx.Features.Validity ( afterShelleyValidityInterval ) import Cardano.Wallet.Read.Primitive.Tx.Features.Withdrawals - ( fromShelleyWdrl ) + ( fromLedgerWithdrawals ) import Cardano.Wallet.Read.Tx ( Tx (..) ) import Cardano.Wallet.Read.Tx.CBOR ( renderTxToCBOR ) import Cardano.Wallet.Read.Tx.Hash ( shelleyTxHash ) +import Cardano.Wallet.Read.Tx.Withdrawals + ( shelleyWithdrawals ) import Cardano.Wallet.Shelley.Compatibility.Ledger - ( toWalletScript, toWalletTokenPolicyId ) + ( toWalletScript ) import Cardano.Wallet.Transaction ( AnyExplicitScript (..) , PlutusScriptInfo (..) @@ -60,26 +73,19 @@ import Cardano.Wallet.Transaction , WitnessCountCtx , toKeyRole ) -import Data.Foldable - ( toList ) -import Data.Map.Strict - ( Map ) -import Ouroboros.Consensus.Cardano.Block - ( StandardAlonzo ) +import Control.Lens + ( folded, (^.), (^..) ) import qualified Cardano.Api.Shelley as Cardano -import qualified Cardano.Ledger.Alonzo.Language as Alonzo import qualified Cardano.Ledger.Alonzo.Scripts as Alonzo import qualified Cardano.Ledger.Alonzo.Tx as Alonzo -import qualified Cardano.Ledger.Alonzo.TxWitness as Alonzo import qualified Cardano.Ledger.BaseTypes as SL -import qualified Cardano.Ledger.Core as SL.Core -import qualified Cardano.Ledger.Mary.Value as SL -import qualified Cardano.Ledger.Shelley.API as SL +import qualified Cardano.Ledger.Core as Core +import qualified Cardano.Ledger.Language as Language import qualified Cardano.Wallet.Primitive.Types as W import qualified Cardano.Wallet.Primitive.Types.Hash as W import qualified Cardano.Wallet.Primitive.Types.Tx as W -import qualified Data.Map.Strict as Map +import qualified Cardano.Wallet.Shelley.Compatibility.Ledger as Ledger import qualified Data.Set as Set fromAlonzoTx @@ -92,83 +98,59 @@ fromAlonzoTx , Maybe ValidityIntervalExplicit , WitnessCount ) -fromAlonzoTx tx@(Alonzo.AlonzoTx bod wits (Alonzo.IsValid isValid) aux) witCtx = +fromAlonzoTx tx witCtx = ( W.Tx { txId = W.Hash $ shelleyTxHash tx , txCBOR = Just $ renderTxToCBOR $ inject alonzo $ Tx tx , fee = - Just $ fromShelleyCoin fee + Just $ Ledger.toWalletCoin $ tx ^. bodyTxL.feeTxBodyL , resolvedInputs = - map ((,Nothing) . fromShelleyTxIn) (toList ins) + (,Nothing) . fromShelleyTxIn <$> tx ^.. bodyTxL.inputsTxBodyL.folded , resolvedCollateralInputs = - map ((,Nothing) . fromShelleyTxIn) (toList collateral) + (,Nothing) . fromShelleyTxIn <$> + tx ^.. bodyTxL.collateralInputsTxBodyL.folded , outputs = - map fromAlonzoTxOut (toList outs) + fromAlonzoTxOut <$> tx ^.. bodyTxL.outputsTxBodyL.folded , collateralOutput = - -- Collateral outputs are not supported in Alonzo. - Nothing + Nothing -- Collateral outputs are not supported in Alonzo. , withdrawals = - fromShelleyWdrl wdrls + fromLedgerWithdrawals . shelleyWithdrawals $ tx , metadata = - fromAlonzoMetadata<$> SL.strictMaybeToMaybe aux + fromAlonzoMetadata <$> SL.strictMaybeToMaybe (tx ^. auxDataTxL) , scriptValidity = - validity + Just $ case tx ^. isValidTxL of + Alonzo.IsValid True -> W.TxScriptValid + Alonzo.IsValid False -> W.TxScriptInvalid } - , anyEraCerts certs + , anyEraCerts $ tx ^. bodyTxL . certsTxBodyL , assetsToMint , assetsToBurn - , Just $ afterShelleyValidityInterval ttl - , countWits + , Just $ afterShelleyValidityInterval $ tx ^. bodyTxL.vldtTxBodyL + , WitnessCount + (fromIntegral $ Set.size $ tx ^. witsTxL.addrTxWitsL) + (fromAlonzoScriptMap <$> tx ^.. witsTxL.scriptTxWitsL.folded) + (fromIntegral $ Set.size $ tx ^. witsTxL.bootAddrTxWitsL) ) where - Alonzo.AlonzoTxBody - ins - collateral - outs - certs - wdrls - fee - ttl - _upd - _reqSignerHashes - mint - _wwpHash - _adHash - _network - = bod - (assetsToMint, assetsToBurn) = alonzoMint mint wits - scriptMap = fromAlonzoScriptMap $ Alonzo.txscripts' wits - - countWits = WitnessCount - (fromIntegral $ Set.size $ Alonzo.txwitsVKey' wits) - (Map.elems scriptMap) - (fromIntegral $ Set.size $ Alonzo.txwitsBoot' wits) - - hashAlonzoScript = - fromLedgerScriptHash . - SL.Core.hashScript @(Cardano.ShelleyLedgerEra AlonzoEra) - - fromAlonzoScriptMap - :: Map - (SL.ScriptHash (Crypto StandardAlonzo)) - (SL.Core.Script StandardAlonzo) - -> Map TokenPolicyId AnyExplicitScript - fromAlonzoScriptMap = - Map.map toAnyScript . - Map.mapKeys (toWalletTokenPolicyId . SL.PolicyID) - where - toAnyScript (Alonzo.TimelockScript script) = - NativeExplicitScript (toWalletScript (toKeyRole witCtx) script) ViaSpending - toAnyScript s@(Alonzo.PlutusScript ver _) = - PlutusExplicitScript (PlutusScriptInfo (toPlutusVer ver) - (hashAlonzoScript s)) ViaSpending + (assetsToMint, assetsToBurn) = + alonzoMint (tx ^. bodyTxL.mintTxBodyL) (tx ^. witsTxL) - toPlutusVer Alonzo.PlutusV1 = PlutusVersionV1 - toPlutusVer Alonzo.PlutusV2 = PlutusVersionV2 + fromAlonzoScriptMap = \case + Alonzo.TimelockScript script -> + NativeExplicitScript + (toWalletScript (toKeyRole witCtx) script) + ViaSpending + script@(Alonzo.PlutusScript ver _) -> + PlutusExplicitScript + (PlutusScriptInfo (toPlutusVer ver) (hashAlonzoScript script)) + ViaSpending + where + toPlutusVer Language.PlutusV1 = PlutusVersionV1 + toPlutusVer Language.PlutusV2 = PlutusVersionV2 + toPlutusVer Language.PlutusV3 = PlutusVersionV3 - validity = - if isValid - then Just W.TxScriptValid - else Just W.TxScriptInvalid + hashAlonzoScript = + fromLedgerScriptHash + . Core.hashScript @(Cardano.ShelleyLedgerEra AlonzoEra) diff --git a/lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Babbage.hs b/lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Babbage.hs index a5f8839681c..efb8053bcbc 100644 --- a/lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Babbage.hs +++ b/lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Babbage.hs @@ -1,5 +1,7 @@ {-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} @@ -18,22 +20,35 @@ import Prelude import Cardano.Api ( BabbageEra ) -import Cardano.Ledger.Era - ( Era (..) ) -import Cardano.Ledger.Serialization - ( sizedValue ) -import Cardano.Ledger.Shelley.API - ( StrictMaybe (SJust, SNothing) ) +import Cardano.Ledger.Alonzo + ( AlonzoScript ) +import Cardano.Ledger.Api + ( StandardCrypto + , addrTxWitsL + , auxDataTxL + , bodyTxL + , bootAddrTxWitsL + , certsTxBodyL + , collateralInputsTxBodyL + , collateralReturnTxBodyL + , feeTxBodyL + , inputsTxBodyL + , isValidTxL + , mintTxBodyL + , outputsTxBodyL + , referenceInputsTxBodyL + , scriptTxWitsL + , vldtTxBodyL + , witsTxL + ) import Cardano.Wallet.Primitive.Types.TokenPolicy - ( TokenPolicyId (..) ) + ( TokenPolicyId ) import Cardano.Wallet.Primitive.Types.Tx.TxIn ( TxIn (..) ) import Cardano.Wallet.Read.Eras ( babbage, inject ) import Cardano.Wallet.Read.Primitive.Tx.Features.Certificates ( anyEraCerts ) -import Cardano.Wallet.Read.Primitive.Tx.Features.Fee - ( fromShelleyCoin ) import Cardano.Wallet.Read.Primitive.Tx.Features.Inputs ( fromShelleyTxIn ) import Cardano.Wallet.Read.Primitive.Tx.Features.Metadata @@ -45,13 +60,15 @@ import Cardano.Wallet.Read.Primitive.Tx.Features.Outputs import Cardano.Wallet.Read.Primitive.Tx.Features.Validity ( afterShelleyValidityInterval ) import Cardano.Wallet.Read.Primitive.Tx.Features.Withdrawals - ( fromShelleyWdrl ) + ( fromLedgerWithdrawals ) import Cardano.Wallet.Read.Tx ( Tx (..) ) import Cardano.Wallet.Read.Tx.CBOR ( renderTxToCBOR ) import Cardano.Wallet.Read.Tx.Hash ( shelleyTxHash ) +import Cardano.Wallet.Read.Tx.Withdrawals + ( shelleyWithdrawals ) import Cardano.Wallet.Shelley.Compatibility.Ledger ( toWalletScript, toWalletTokenPolicyId ) import Cardano.Wallet.Transaction @@ -66,26 +83,29 @@ import Cardano.Wallet.Transaction , WitnessCountCtx , toKeyRole ) -import Data.Foldable - ( toList ) -import Data.Maybe - ( catMaybes ) -import Ouroboros.Consensus.Cardano.Block - ( StandardBabbage ) +import Cardano.Wallet.Write.Tx + ( BabbageTxOut, StandardBabbage ) +import Control.Lens + ( folded, (<&>), (^.), (^..) ) +import Data.Map + ( Map ) +import Data.Maybe.Strict + ( strictMaybeToMaybe ) +import Data.Word + ( Word32 ) import qualified Cardano.Api.Shelley as Cardano -import qualified Cardano.Ledger.Alonzo.Language as Alonzo import qualified Cardano.Ledger.Alonzo.Scripts as Alonzo import qualified Cardano.Ledger.Alonzo.Tx as Alonzo -import qualified Cardano.Ledger.Alonzo.TxWitness as Alonzo -import qualified Cardano.Ledger.Babbage.TxBody as Babbage +import qualified Cardano.Ledger.Api.Scripts as Ledger import qualified Cardano.Ledger.BaseTypes as SL -import qualified Cardano.Ledger.Core as SL.Core +import qualified Cardano.Ledger.Core as Core +import qualified Cardano.Ledger.Language as Language import qualified Cardano.Ledger.Mary.Value as SL -import qualified Cardano.Ledger.Shelley.API as SL import qualified Cardano.Wallet.Primitive.Types as W import qualified Cardano.Wallet.Primitive.Types.Hash as W import qualified Cardano.Wallet.Primitive.Types.Tx as W +import qualified Cardano.Wallet.Shelley.Compatibility.Ledger as Ledger import qualified Data.List as L import qualified Data.Map.Strict as Map import qualified Data.Set as Set @@ -100,106 +120,104 @@ fromBabbageTx , Maybe ValidityIntervalExplicit , WitnessCount ) -fromBabbageTx tx@(Alonzo.AlonzoTx bod wits (Alonzo.IsValid isValid) aux) witCtx = +fromBabbageTx tx witCtx = ( W.Tx - { txId = - transactionId + { txId , txCBOR = Just $ renderTxToCBOR $ inject babbage $ Tx tx , fee = - Just $ fromShelleyCoin fee + Just $ Ledger.toWalletCoin $ tx ^. bodyTxL.feeTxBodyL , resolvedInputs = - map ((,Nothing) . fromShelleyTxIn) (toList inps) + (,Nothing) . fromShelleyTxIn + <$> tx ^.. bodyTxL.inputsTxBodyL.folded , resolvedCollateralInputs = - map ((,Nothing) . fromShelleyTxIn) (toList collateralInps) + (,Nothing) . fromShelleyTxIn + <$> tx ^.. bodyTxL.collateralInputsTxBodyL.folded , outputs = - map (fst . fromBabbageTxOut . sizedValue) (toList outs) + fst . fromBabbageTxOut <$> tx ^.. bodyTxL.outputsTxBodyL.folded , collateralOutput = - case fmap (fst . fromBabbageTxOut . sizedValue) collateralReturn of - SNothing -> Nothing - SJust txout -> Just txout + strictMaybeToMaybe $ + fst . fromBabbageTxOut <$> tx ^. bodyTxL.collateralReturnTxBodyL , withdrawals = - fromShelleyWdrl wdrls + fromLedgerWithdrawals . shelleyWithdrawals $ tx , metadata = - fromBabbageMetadata <$> SL.strictMaybeToMaybe aux + fromBabbageMetadata <$> SL.strictMaybeToMaybe (tx ^. auxDataTxL) , scriptValidity = - validity + Just $ case tx ^. isValidTxL of + Alonzo.IsValid True -> W.TxScriptValid + Alonzo.IsValid False -> W.TxScriptInvalid } - , anyEraCerts certs + , anyEraCerts $ tx ^. bodyTxL . certsTxBodyL , assetsToMint , assetsToBurn - , Just $ afterShelleyValidityInterval ttl - , countWits + , Just $ afterShelleyValidityInterval $ tx ^. bodyTxL.vldtTxBodyL + , WitnessCount + (fromIntegral $ Set.size $ tx ^. witsTxL.addrTxWitsL) + (Map.elems $ Map.union anyScriptsFromWits anyScriptsFromTxOuts) + (fromIntegral $ Set.size $ tx ^. witsTxL.bootAddrTxWitsL) ) where - Babbage.BabbageTxBody - inps - collateralInps - refInps - outs - collateralReturn - _collateralTotal - certs - wdrls - fee - ttl - _upd - _reqSignerHashes - mint - _wwpHash - _adHash - _network - = bod + txId = W.Hash $ shelleyTxHash tx - transactionId = W.Hash $ shelleyTxHash tx - scriptWithHashIx ix txout = - case (snd . fromBabbageTxOut $ txout) of - Just s -> Just ( ViaReferenceInput (ReferenceInput $ TxIn transactionId ix) - , hashBabbageScript s - , s) - Nothing -> Nothing - scriptsFromTxOuts = - catMaybes $ - L.zipWith scriptWithHashIx [0..] (map sizedValue $ toList outs) + anyScriptsFromTxOuts :: Map TokenPolicyId AnyExplicitScript anyScriptsFromTxOuts = - Map.fromList $ - map fromLedgerToAnyScript scriptsFromTxOuts - scriptsFromWits = - map (\(scriptH,script) -> (ViaSpending, scriptH,script)) $ - Map.toList $ - Alonzo.txscripts' wits - anyScriptsFromWits = - Map.fromList $ - map fromLedgerToAnyScript scriptsFromWits - allAnyScripts = Map.union anyScriptsFromWits anyScriptsFromTxOuts - - (assetsToMint, assetsToBurn) = babbageMint refInps mint wits + Map.fromList + [ fromLedgerToAnyScript ledgerScript + | Just ledgerScript <- L.zipWith scriptWithHashIx + [0..] (tx ^.. bodyTxL.outputsTxBodyL.folded) + ] + where + scriptWithHashIx + :: Word32 + -> BabbageTxOut StandardBabbage + -> Maybe + ( ScriptReference + , Ledger.ScriptHash StandardCrypto + , AlonzoScript StandardBabbage + ) + scriptWithHashIx ix txout = + snd (fromBabbageTxOut txout) <&> \script -> + ( ViaReferenceInput (ReferenceInput (TxIn txId ix)) + , hashBabbageScript script + , script + ) - countWits = WitnessCount - (fromIntegral $ Set.size $ Alonzo.txwitsVKey' wits) - (Map.elems allAnyScripts) - (fromIntegral $ Set.size $ Alonzo.txwitsBoot' wits) + anyScriptsFromWits :: Map TokenPolicyId AnyExplicitScript + anyScriptsFromWits = + Map.fromList + [ fromLedgerToAnyScript (ViaSpending, scriptH, script) + | (scriptH, script) <- Map.toList (tx ^. witsTxL.scriptTxWitsL) + ] - hashBabbageScript = SL.Core.hashScript @(Cardano.ShelleyLedgerEra BabbageEra) + (assetsToMint, assetsToBurn) = + babbageMint + (tx ^. bodyTxL.referenceInputsTxBodyL) + (tx ^. bodyTxL.mintTxBodyL) + (tx ^. witsTxL) fromLedgerToAnyScript :: ( ScriptReference - , (SL.ScriptHash (Crypto StandardBabbage)) - , (SL.Core.Script StandardBabbage) ) + , Ledger.ScriptHash StandardCrypto + , AlonzoScript StandardBabbage + ) -> (TokenPolicyId, AnyExplicitScript) fromLedgerToAnyScript (scriptRef, scriptH, script) = - (toWalletTokenPolicyId . SL.PolicyID $ scriptH, toAnyScript script) + (toWalletTokenPolicyId (SL.PolicyID scriptH), toAnyScript script) where - toAnyScript (Alonzo.TimelockScript script') = - NativeExplicitScript (toWalletScript (toKeyRole witCtx) script') scriptRef - toAnyScript s@(Alonzo.PlutusScript ver _) = - PlutusExplicitScript (PlutusScriptInfo (toPlutusVer ver) - (fromLedgerScriptHash $ hashBabbageScript s)) scriptRef + toAnyScript = \case + Alonzo.TimelockScript timelockScript -> + NativeExplicitScript + (toWalletScript (toKeyRole witCtx) timelockScript) + scriptRef + Alonzo.PlutusScript ver _ -> + PlutusExplicitScript + (PlutusScriptInfo + (toPlutusVer ver) + (fromLedgerScriptHash $ hashBabbageScript script)) + scriptRef - toPlutusVer Alonzo.PlutusV1 = PlutusVersionV1 - toPlutusVer Alonzo.PlutusV2 = PlutusVersionV2 + toPlutusVer Language.PlutusV1 = PlutusVersionV1 + toPlutusVer Language.PlutusV2 = PlutusVersionV2 + toPlutusVer Language.PlutusV3 = PlutusVersionV3 - validity = - if isValid - then Just W.TxScriptValid - else Just W.TxScriptInvalid + hashBabbageScript = Core.hashScript @(Cardano.ShelleyLedgerEra BabbageEra) diff --git a/lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Conway.hs b/lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Conway.hs index 7de11d99eb9..b8259134507 100644 --- a/lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Conway.hs +++ b/lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Conway.hs @@ -1,5 +1,7 @@ {-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} @@ -18,12 +20,29 @@ import Prelude import Cardano.Api ( ConwayEra ) -import Cardano.Ledger.Era - ( Era (..) ) -import Cardano.Ledger.Serialization - ( sizedValue ) -import Cardano.Ledger.Shelley.API - ( StrictMaybe (SJust, SNothing) ) +import Cardano.Ledger.Alonzo.Scripts + ( AlonzoScript ) +import Cardano.Ledger.Api + ( StandardCrypto + , addrTxWitsL + , auxDataTxL + , bodyTxL + , bootAddrTxWitsL + , collateralInputsTxBodyL + , collateralReturnTxBodyL + , conwayCertsTxBodyL + , feeTxBodyL + , inputsTxBodyL + , isValidTxL + , mintTxBodyL + , outputsTxBodyL + , referenceInputsTxBodyL + , scriptTxWitsL + , vldtTxBodyL + , witsTxL + ) +import Cardano.Ledger.Babbage + ( BabbageTxOut ) import Cardano.Wallet.Primitive.Types.TokenPolicy ( TokenPolicyId (..) ) import Cardano.Wallet.Primitive.Types.Tx.TxIn @@ -31,9 +50,7 @@ import Cardano.Wallet.Primitive.Types.Tx.TxIn import Cardano.Wallet.Read.Eras ( conway, inject ) import Cardano.Wallet.Read.Primitive.Tx.Features.Certificates - ( anyEraCerts ) -import Cardano.Wallet.Read.Primitive.Tx.Features.Fee - ( fromShelleyCoin ) + ( fromConwayCerts ) import Cardano.Wallet.Read.Primitive.Tx.Features.Inputs ( fromShelleyTxIn ) import Cardano.Wallet.Read.Primitive.Tx.Features.Metadata @@ -45,13 +62,15 @@ import Cardano.Wallet.Read.Primitive.Tx.Features.Outputs import Cardano.Wallet.Read.Primitive.Tx.Features.Validity ( afterShelleyValidityInterval ) import Cardano.Wallet.Read.Primitive.Tx.Features.Withdrawals - ( fromShelleyWdrl ) + ( fromLedgerWithdrawals ) import Cardano.Wallet.Read.Tx ( Tx (..) ) import Cardano.Wallet.Read.Tx.CBOR ( renderTxToCBOR ) import Cardano.Wallet.Read.Tx.Hash ( shelleyTxHash ) +import Cardano.Wallet.Read.Tx.Withdrawals + ( shelleyWithdrawals ) import Cardano.Wallet.Shelley.Compatibility.Ledger ( toWalletScript, toWalletTokenPolicyId ) import Cardano.Wallet.Transaction @@ -66,26 +85,31 @@ import Cardano.Wallet.Transaction , WitnessCountCtx , toKeyRole ) +import Control.Lens + ( folded, (<&>), (^.), (^..) ) import Data.Foldable ( toList ) -import Data.Maybe - ( catMaybes ) +import Data.Map + ( Map ) +import Data.Maybe.Strict + ( strictMaybeToMaybe ) +import Data.Word + ( Word32 ) import Ouroboros.Consensus.Cardano.Block ( StandardConway ) import qualified Cardano.Api.Shelley as Cardano -import qualified Cardano.Ledger.Alonzo.Language as Alonzo import qualified Cardano.Ledger.Alonzo.Scripts as Alonzo import qualified Cardano.Ledger.Alonzo.Tx as Alonzo -import qualified Cardano.Ledger.Alonzo.TxWitness as Alonzo -import qualified Cardano.Ledger.Babbage.TxBody as Babbage +import qualified Cardano.Ledger.Api as Ledger import qualified Cardano.Ledger.BaseTypes as SL -import qualified Cardano.Ledger.Core as SL.Core +import qualified Cardano.Ledger.Core as Core +import qualified Cardano.Ledger.Language as Language import qualified Cardano.Ledger.Mary.Value as SL -import qualified Cardano.Ledger.Shelley.API as SL import qualified Cardano.Wallet.Primitive.Types as W import qualified Cardano.Wallet.Primitive.Types.Hash as W import qualified Cardano.Wallet.Primitive.Types.Tx as W +import qualified Cardano.Wallet.Shelley.Compatibility.Ledger as Ledger import qualified Data.List as L import qualified Data.Map.Strict as Map import qualified Data.Set as Set @@ -100,106 +124,104 @@ fromConwayTx , Maybe ValidityIntervalExplicit , WitnessCount ) -fromConwayTx tx@(Alonzo.AlonzoTx bod wits (Alonzo.IsValid isValid) aux) witCtx = +fromConwayTx tx witCtx = ( W.Tx - { txId = - transactionId + { txId , txCBOR = Just $ renderTxToCBOR $ inject conway $ Tx tx , fee = - Just $ fromShelleyCoin fee + Just $ Ledger.toWalletCoin $ tx ^. bodyTxL.feeTxBodyL , resolvedInputs = - map ((,Nothing) . fromShelleyTxIn) (toList inps) + (,Nothing) . fromShelleyTxIn + <$> tx ^.. bodyTxL.inputsTxBodyL.folded , resolvedCollateralInputs = - map ((,Nothing) . fromShelleyTxIn) (toList collateralInps) + (,Nothing) . fromShelleyTxIn + <$> tx ^.. bodyTxL.collateralInputsTxBodyL.folded , outputs = - map (fst . fromConwayTxOut . sizedValue) (toList outs) + fst . fromConwayTxOut <$> tx ^.. bodyTxL.outputsTxBodyL.folded , collateralOutput = - case fmap (fst . fromConwayTxOut . sizedValue) collateralReturn of - SNothing -> Nothing - SJust txout -> Just txout + strictMaybeToMaybe $ + fst . fromConwayTxOut <$> tx ^. bodyTxL.collateralReturnTxBodyL , withdrawals = - fromShelleyWdrl wdrls + fromLedgerWithdrawals . shelleyWithdrawals $ tx , metadata = - fromConwayMetadata <$> SL.strictMaybeToMaybe aux + fromConwayMetadata <$> SL.strictMaybeToMaybe (tx ^. auxDataTxL) , scriptValidity = - validity + Just $ case tx ^. isValidTxL of + Alonzo.IsValid True -> W.TxScriptValid + Alonzo.IsValid False -> W.TxScriptInvalid } - , anyEraCerts certs + , fmap fromConwayCerts . toList $ tx ^. bodyTxL . conwayCertsTxBodyL , assetsToMint , assetsToBurn - , Just $ afterShelleyValidityInterval ttl - , countWits + , Just $ afterShelleyValidityInterval $ tx ^. bodyTxL.vldtTxBodyL + , WitnessCount + (fromIntegral $ Set.size $ tx ^. witsTxL.addrTxWitsL) + (Map.elems $ Map.union anyScriptsFromWits anyScriptsFromTxOuts) + (fromIntegral $ Set.size $ tx ^. witsTxL.bootAddrTxWitsL) ) where - Babbage.BabbageTxBody - inps - collateralInps - refInps - outs - collateralReturn - _collateralTotal - certs - wdrls - fee - ttl - _upd - _reqSignerHashes - mint - _wwpHash - _adHash - _network - = bod + txId = W.Hash $ shelleyTxHash tx - transactionId = W.Hash $ shelleyTxHash tx - scriptWithHashIx ix txout = - case (snd . fromConwayTxOut $ txout) of - Just s -> Just ( ViaReferenceInput (ReferenceInput $ TxIn transactionId ix) - , hashConwayScript s - , s) - Nothing -> Nothing - scriptsFromTxOuts = - catMaybes $ - L.zipWith scriptWithHashIx [0..] (map sizedValue $ toList outs) + anyScriptsFromTxOuts :: Map TokenPolicyId AnyExplicitScript anyScriptsFromTxOuts = - Map.fromList $ - map fromLedgerToAnyScript scriptsFromTxOuts - scriptsFromWits = - map (\(scriptH,script) -> (ViaSpending, scriptH,script)) $ - Map.toList $ - Alonzo.txscripts' wits - anyScriptsFromWits = - Map.fromList $ - map fromLedgerToAnyScript scriptsFromWits - allAnyScripts = Map.union anyScriptsFromWits anyScriptsFromTxOuts - - (assetsToMint, assetsToBurn) = conwayMint refInps mint wits + Map.fromList + [ fromLedgerToAnyScript ledgerScript + | Just ledgerScript <- L.zipWith scriptWithHashIx + [0..] (tx ^.. bodyTxL.outputsTxBodyL.folded) + ] + where + scriptWithHashIx + :: Word32 + -> BabbageTxOut StandardConway + -> Maybe + ( ScriptReference + , Ledger.ScriptHash StandardCrypto + , AlonzoScript StandardConway + ) + scriptWithHashIx ix txout = + snd (fromConwayTxOut txout) <&> \script -> + ( ViaReferenceInput (ReferenceInput (TxIn txId ix)) + , hashConwayScript script + , script + ) - countWits = WitnessCount - (fromIntegral $ Set.size $ Alonzo.txwitsVKey' wits) - (Map.elems allAnyScripts) - (fromIntegral $ Set.size $ Alonzo.txwitsBoot' wits) + anyScriptsFromWits :: Map TokenPolicyId AnyExplicitScript + anyScriptsFromWits = + Map.fromList + [ fromLedgerToAnyScript (ViaSpending, scriptH, script) + | (scriptH, script) <- Map.toList (tx ^. witsTxL.scriptTxWitsL) + ] - hashConwayScript = SL.Core.hashScript @(Cardano.ShelleyLedgerEra ConwayEra) + (assetsToMint, assetsToBurn) = + conwayMint + (tx ^. bodyTxL.referenceInputsTxBodyL) + (tx ^. bodyTxL.mintTxBodyL) + (tx ^. witsTxL) fromLedgerToAnyScript :: ( ScriptReference - , (SL.ScriptHash (Crypto StandardConway)) - , (SL.Core.Script StandardConway) ) + , Ledger.ScriptHash StandardCrypto + , AlonzoScript StandardConway + ) -> (TokenPolicyId, AnyExplicitScript) fromLedgerToAnyScript (scriptRef, scriptH, script) = - (toWalletTokenPolicyId . SL.PolicyID $ scriptH, toAnyScript script) + (toWalletTokenPolicyId (SL.PolicyID scriptH), toAnyScript script) where - toAnyScript (Alonzo.TimelockScript script') = - NativeExplicitScript (toWalletScript (toKeyRole witCtx) script') scriptRef - toAnyScript s@(Alonzo.PlutusScript ver _) = - PlutusExplicitScript (PlutusScriptInfo (toPlutusVer ver) - (fromLedgerScriptHash $ hashConwayScript s)) scriptRef + toAnyScript = \case + Alonzo.TimelockScript timelockScript -> + NativeExplicitScript + (toWalletScript (toKeyRole witCtx) timelockScript) + scriptRef + Alonzo.PlutusScript ver _ -> + PlutusExplicitScript + (PlutusScriptInfo + (toPlutusVer ver) + (fromLedgerScriptHash $ hashConwayScript script)) + scriptRef - toPlutusVer Alonzo.PlutusV1 = PlutusVersionV1 - toPlutusVer Alonzo.PlutusV2 = PlutusVersionV2 + toPlutusVer Language.PlutusV1 = PlutusVersionV1 + toPlutusVer Language.PlutusV2 = PlutusVersionV2 + toPlutusVer Language.PlutusV3 = PlutusVersionV3 - validity = - if isValid - then Just W.TxScriptValid - else Just W.TxScriptInvalid + hashConwayScript = Core.hashScript @(Cardano.ShelleyLedgerEra ConwayEra) diff --git a/lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Features/Certificates.hs b/lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Features/Certificates.hs index 96cada2ef99..22c756e5029 100644 --- a/lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Features/Certificates.hs +++ b/lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Features/Certificates.hs @@ -12,15 +12,24 @@ module Cardano.Wallet.Read.Primitive.Tx.Features.Certificates ( certificates , anyEraCerts , fromStakeCredential + , fromConwayCerts ) where import Prelude +import Cardano.Api + ( ConwayEra ) import Cardano.Crypto.Hash.Class ( hashToBytes ) +import Cardano.Ledger.Api + ( StandardCrypto ) import Cardano.Ledger.BaseTypes ( strictMaybeToMaybe, urlToText ) +import Cardano.Ledger.Conway.Delegation.Certificates + ( ConwayDCert (..), ConwayDelegCert (..) ) +import Cardano.Ledger.Shelley.API + ( PoolCert (..), PoolMetadata (..), PoolParams (..) ) import Cardano.Ledger.Shelley.TxBody ( DCert ) import Cardano.Pool.Metadata.Types @@ -61,53 +70,88 @@ import qualified Data.Set as Set certificates :: EraFun Certificates (K [W.Certificate]) certificates = EraFun { byronFun = const $ K [] - , shelleyFun = mkCertsK - , allegraFun = mkCertsK - , maryFun = mkCertsK - , alonzoFun = mkCertsK - , babbageFun = mkCertsK - , conwayFun = mkCertsK + , shelleyFun = mkShelleyCertsK + , allegraFun = mkShelleyCertsK + , maryFun = mkShelleyCertsK + , alonzoFun = mkShelleyCertsK + , babbageFun = mkShelleyCertsK + , conwayFun = mkConwayCertsK } -mkCertsK :: (Foldable t, CertificatesType era ~ t (DCert crypto)) +mkConwayCertsK :: Certificates ConwayEra + -> K [W.Certificate] ConwayEra +mkConwayCertsK (Certificates cs) = K $ fromConwayCerts <$> toList cs + +fromConwayCerts :: ConwayDCert StandardCrypto -> W.Certificate +fromConwayCerts = \case + ConwayDCertDeleg cdc -> case cdc of + ConwayDeleg _cre _del _co -> error "TODO: ConwayDeleg, ADP-3065" + ConwayReDeleg _cre _del -> error "TODO: ConwayReDeleg, ADP-3065" + ConwayUnDeleg cre _co -> mkDelegationNone cre + -- "TODO: ConwayUnDeleg, ADP-3065" + ConwayDCertPool pc -> case pc of + RegPool pp -> mkPoolRegistrationCertificate pp + RetirePool kh en -> mkPoolRetirementCertificate kh en + ConwayDCertConstitutional _cdc -> + error "TODO: ConwayDCertConstitutional, ADP-3065" + +mkShelleyCertsK :: (Foldable t, CertificatesType era ~ t (DCert crypto)) => Certificates era -> K [W.Certificate] b -mkCertsK (Certificates cs) = K . anyEraCerts $ cs +mkShelleyCertsK (Certificates cs) = K . anyEraCerts $ cs anyEraCerts :: Foldable t => t (DCert crypto) -> [W.Certificate] anyEraCerts cs = fromShelleyCert <$> toList cs +mkPoolRegistrationCertificate :: PoolParams c -> W.Certificate +mkPoolRegistrationCertificate pp = + W.CertificateOfPool + $ Registration + $ PoolRegistrationCertificate + { poolId = fromPoolKeyHash (ppId pp) + , poolOwners = fromOwnerKeyHash <$> Set.toList (ppOwners pp) + , poolMargin = fromUnitInterval (ppMargin pp) + , poolCost = toWalletCoin (ppCost pp) + , poolPledge = toWalletCoin (ppPledge pp) + , poolMetadata = + fromPoolMetadata + <$> strictMaybeToMaybe (ppMetadata pp) + } + +mkPoolRetirementCertificate :: (SL.KeyHash rol sc) -> EpochNo -> W.Certificate +mkPoolRetirementCertificate pid (EpochNo e) = + W.CertificateOfPool $ Retirement $ PoolRetirementCertificate + { poolId = fromPoolKeyHash pid + , retirementEpoch = W.EpochNo $ fromIntegral e + } + +mkRegisterKeyCertificate :: SL.Credential 'SL.Staking crypto -> W.Certificate +mkRegisterKeyCertificate = + W.CertificateOfDelegation + . W.CertRegisterKey + . fromStakeCredential + +mkDelegationNone :: SL.Credential 'SL.Staking crypto -> W.Certificate +mkDelegationNone credentials = W.CertificateOfDelegation + $ W.CertDelegateNone (fromStakeCredential credentials) + fromShelleyCert :: SL.DCert crypto -> W.Certificate fromShelleyCert = \case SL.DCertDeleg (SL.Delegate delegation) -> W.CertificateOfDelegation $ W.CertDelegateFull - (fromStakeCredential (SL._delegator delegation)) - (fromPoolKeyHash (SL._delegatee delegation)) - - SL.DCertDeleg (SL.DeRegKey credentials) -> - W.CertificateOfDelegation $ W.CertDelegateNone - (fromStakeCredential credentials) - - SL.DCertDeleg (SL.RegKey cred) -> - W.CertificateOfDelegation $ W.CertRegisterKey $ fromStakeCredential cred - - SL.DCertPool (SL.RegPool pp) -> W.CertificateOfPool $ Registration - ( PoolRegistrationCertificate - { poolId = fromPoolKeyHash $ SL._poolId pp - , poolOwners = fromOwnerKeyHash <$> Set.toList (SL._poolOwners pp) - , poolMargin = fromUnitInterval (SL._poolMargin pp) - , poolCost = toWalletCoin (SL._poolCost pp) - , poolPledge = toWalletCoin (SL._poolPledge pp) - , poolMetadata = fromPoolMetadata <$> strictMaybeToMaybe - (SL._poolMD pp) - } - ) + (fromStakeCredential (SL.dDelegator delegation)) + (fromPoolKeyHash (SL.dDelegatee delegation)) + + SL.DCertDeleg (SL.DeRegKey credentials) -> mkDelegationNone credentials + + SL.DCertDeleg (SL.RegKey cred) -> mkRegisterKeyCertificate cred + + SL.DCertPool (SL.RegPool pp) -> mkPoolRegistrationCertificate pp - SL.DCertPool (SL.RetirePool pid (EpochNo e)) -> - W.CertificateOfPool $ Retirement $ PoolRetirementCertificate (fromPoolKeyHash pid) - (W.EpochNo $ fromIntegral e) + SL.DCertPool (SL.RetirePool pid en) -> + mkPoolRetirementCertificate pid en SL.DCertGenesis{} -> W.CertificateOther W.GenesisCertificate @@ -115,8 +159,8 @@ fromShelleyCert = \case fromPoolMetadata :: SL.PoolMetadata -> (StakePoolMetadataUrl, StakePoolMetadataHash) fromPoolMetadata meta = - ( StakePoolMetadataUrl (urlToText (SL._poolMDUrl meta)) - , StakePoolMetadataHash (SL._poolMDHash meta) + ( StakePoolMetadataUrl (urlToText (pmUrl meta)) + , StakePoolMetadataHash (pmHash meta) ) -- | Convert a stake credentials to a 'RewardAccount' type. diff --git a/lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Features/Fee.hs b/lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Features/Fee.hs index 085bcd52f63..ac1a1d61ccf 100644 --- a/lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Features/Fee.hs +++ b/lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Features/Fee.hs @@ -1,9 +1,7 @@ {-# LANGUAGE TypeFamilies #-} module Cardano.Wallet.Read.Primitive.Tx.Features.Fee - ( getFee - , fromShelleyCoin - ) + ( getFee) where import Prelude @@ -15,9 +13,8 @@ import Cardano.Wallet.Read.Eras import Cardano.Wallet.Read.Tx.Fee ( Fee (..), FeeType ) -import qualified Cardano.Ledger.Coin as SL import qualified Cardano.Wallet.Primitive.Types.Coin as W -import qualified Cardano.Wallet.Primitive.Types.Coin as Coin +import qualified Cardano.Wallet.Shelley.Compatibility.Ledger as Ledger getFee :: EraFun Fee (K (Maybe W.Coin)) getFee = EraFun @@ -30,10 +27,5 @@ getFee = EraFun , conwayFun = mkShelleyTxFee } -mkShelleyTxFee :: (FeeType era ~ Coin) - => Fee era -- ^ - -> K (Maybe W.Coin) b -mkShelleyTxFee (Fee c) = K $ Just $ fromShelleyCoin c - -fromShelleyCoin :: SL.Coin -> W.Coin -fromShelleyCoin (SL.Coin c) = Coin.unsafeFromIntegral c +mkShelleyTxFee :: FeeType era ~ Coin => Fee era -> K (Maybe W.Coin) b +mkShelleyTxFee (Fee c) = K $ Just $ Ledger.toWalletCoin c diff --git a/lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Features/Metadata.hs b/lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Features/Metadata.hs index 4c95d7a3066..a37cdb626df 100644 --- a/lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Features/Metadata.hs +++ b/lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Features/Metadata.hs @@ -21,65 +21,71 @@ module Cardano.Wallet.Read.Primitive.Tx.Features.Metadata import Prelude +import Cardano.Ledger.Allegra.TxAuxData + ( AllegraTxAuxData (..) ) +import Cardano.Ledger.Alonzo.TxAuxData + ( AlonzoTxAuxData (..) ) import Cardano.Ledger.BaseTypes ( strictMaybeToMaybe ) -import Cardano.Ledger.Core - ( AuxiliaryData ) -import Cardano.Ledger.ShelleyMA - ( MaryOrAllegra (..), ShelleyMAEra ) +import Cardano.Ledger.Shelley.TxAuxData + ( Metadatum, ShelleyTxAuxData (..) ) import Cardano.Wallet.Read.Eras ( EraFun (..), K (..) ) import Cardano.Wallet.Read.Tx.Metadata ( Metadata (..) ) +import Data.Map + ( Map ) +import Data.Word + ( Word64 ) import Ouroboros.Consensus.Shelley.Eras - ( AlonzoEra, BabbageEra, ConwayEra, StandardCrypto ) + ( StandardAllegra + , StandardAlonzo + , StandardBabbage + , StandardConway + , StandardMary + , StandardShelley + ) import qualified Cardano.Api.Shelley as Cardano import qualified Cardano.Api.Shelley as CardanoAPI -import qualified Cardano.Ledger.Alonzo.Data as AL -import qualified Cardano.Ledger.Shelley.API as SL -import qualified Cardano.Ledger.ShelleyMA.AuxiliaryData as MA import qualified Cardano.Wallet.Primitive.Types.Tx.Tx as W -getMetadata :: EraFun Metadata (K (Maybe (W.TxMetadata) )) -getMetadata = EraFun - { byronFun = noMetadatas - , shelleyFun = yesMetadata fromShelleyMetadata - , allegraFun = yesMetadata fromAllegraMetadata - , maryFun = yesMetadata fromMaryMetadata - , alonzoFun = yesMetadata fromAlonzoMetadata - , babbageFun = yesMetadata fromBabbageMetadata - , conwayFun = yesMetadata fromConwayMetadata - } - where - noMetadatas _ = K Nothing - yesMetadata f (Metadata s) = K . fmap f $ strictMaybeToMaybe s +getMetadata :: EraFun Metadata (K (Maybe (W.TxMetadata))) +getMetadata = + EraFun + { byronFun = noMetadatas + , shelleyFun = yesMetadata fromShelleyMetadata + , allegraFun = yesMetadata fromAllegraMetadata + , maryFun = yesMetadata fromMaryMetadata + , alonzoFun = yesMetadata fromAlonzoMetadata + , babbageFun = yesMetadata fromBabbageMetadata + , conwayFun = yesMetadata fromConwayMetadata + } + where + noMetadatas _ = K Nothing + yesMetadata f (Metadata s) = K . fmap f $ strictMaybeToMaybe s -fromShelleyMetadata :: SL.Metadata c -> W.TxMetadata -fromShelleyMetadata (SL.Metadata m) = - Cardano.makeTransactionMetadata . CardanoAPI.fromShelleyMetadata $ m +fromShelleyMetadata :: ShelleyTxAuxData StandardShelley -> W.TxMetadata +fromShelleyMetadata (ShelleyTxAuxData md) = fromMetadata md -- fixme: [ADP-525] It is fine for now since we do not look at script -- pre-images. But this is precisely what we want as part of the -- multisig/script balance reporting. -fromAllegraMetadata :: AuxiliaryData (ShelleyMAEra 'Allegra StandardCrypto) - -> W.TxMetadata -fromAllegraMetadata (MA.MAAuxiliaryData blob _scripts) - = fromShelleyMetadata $ SL.Metadata blob +fromAllegraMetadata :: AllegraTxAuxData StandardAllegra -> W.TxMetadata +fromAllegraMetadata (AllegraTxAuxData md _scripts) = fromMetadata md + +fromMaryMetadata :: AllegraTxAuxData StandardMary -> W.TxMetadata +fromMaryMetadata (AllegraTxAuxData md _scripts) = fromMetadata md -fromMaryMetadata :: AuxiliaryData (ShelleyMAEra 'Mary StandardCrypto) - -> W.TxMetadata -fromMaryMetadata (MA.MAAuxiliaryData blob _scripts) - = fromShelleyMetadata $ SL.Metadata blob +fromAlonzoMetadata :: AlonzoTxAuxData StandardAlonzo -> W.TxMetadata +fromAlonzoMetadata (AlonzoTxAuxData md _timelock _plutus) = fromMetadata md -fromAlonzoMetadata :: AuxiliaryData (AlonzoEra StandardCrypto) -> W.TxMetadata -fromAlonzoMetadata (AL.AlonzoAuxiliaryData blob _scripts) - = fromShelleyMetadata $ SL.Metadata blob +fromBabbageMetadata :: AlonzoTxAuxData StandardBabbage -> W.TxMetadata +fromBabbageMetadata (AlonzoTxAuxData md _timelock _plutus) = fromMetadata md -fromBabbageMetadata :: AuxiliaryData (BabbageEra StandardCrypto) -> W.TxMetadata -fromBabbageMetadata (AL.AlonzoAuxiliaryData blob _scripts) - = fromShelleyMetadata $ SL.Metadata blob +fromConwayMetadata :: AlonzoTxAuxData StandardConway -> W.TxMetadata +fromConwayMetadata (AlonzoTxAuxData md _timelock _plutus) = fromMetadata md -fromConwayMetadata :: AuxiliaryData (ConwayEra StandardCrypto) -> W.TxMetadata -fromConwayMetadata (AL.AlonzoAuxiliaryData blob _scripts) - = fromShelleyMetadata $ SL.Metadata blob +fromMetadata :: Map Word64 Metadatum -> W.TxMetadata +fromMetadata = + Cardano.makeTransactionMetadata . CardanoAPI.fromShelleyMetadata diff --git a/lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Features/Mint.hs b/lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Features/Mint.hs index 8ff7137c9ba..1463d5eb73f 100644 --- a/lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Features/Mint.hs +++ b/lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Features/Mint.hs @@ -27,16 +27,12 @@ import Cardano.Address.Script ( KeyRole (..), ScriptHash (..) ) import Cardano.Crypto.Hash ( hashToBytes ) -import Cardano.Ledger.Alonzo - ( AlonzoEra ) -import Cardano.Ledger.Babbage - ( BabbageEra ) -import Cardano.Ledger.Conway - ( ConwayEra ) -import Cardano.Ledger.Era - ( Era (..) ) -import Cardano.Ledger.Shelley.Tx - ( WitnessSetHKD (scriptWits) ) +import Cardano.Ledger.Alonzo.TxWits + ( AlonzoTxWits, txscripts' ) +import Cardano.Ledger.Mary.Value + ( MultiAsset (..) ) +import Cardano.Ledger.Shelley.TxWits + ( ShelleyTxWits, scriptWits ) import Cardano.Wallet.Primitive.Types.Hash ( Hash (..) ) import Cardano.Wallet.Primitive.Types.TokenMap @@ -79,91 +75,85 @@ import Data.Maybe import Data.Set ( Set ) import Ouroboros.Consensus.Shelley.Eras - ( StandardAlonzo, StandardBabbage, StandardConway, StandardCrypto ) + ( StandardAlonzo + , StandardBabbage + , StandardConway + , StandardCrypto + , StandardMary + ) import qualified Cardano.Api as Cardano import qualified Cardano.Api.Shelley as Cardano -import qualified Cardano.Ledger.Alonzo.Language as Alonzo import qualified Cardano.Ledger.Alonzo.Scripts as Alonzo -import qualified Cardano.Ledger.Alonzo.TxWitness as AL -import qualified Cardano.Ledger.Core as SL.Core +import qualified Cardano.Ledger.Core as Core +import qualified Cardano.Ledger.Language as Ledger import qualified Cardano.Ledger.Mary.Value as SL import qualified Cardano.Ledger.Shelley.API as SL -import qualified Cardano.Ledger.ShelleyMA as MA -import qualified Cardano.Ledger.ShelleyMA.Timelocks as ShelleyMA import qualified Cardano.Wallet.Primitive.Types.TokenMap as TokenMap import qualified Data.Map.Strict as Map import qualified Data.Map.Strict.NonEmptyMap as NonEmptyMap - mint :: EraFun (Mint :*: Witnesses :*: ReferenceInputs) (K (TokenMapWithScripts, TokenMapWithScripts)) -mint = EraFun - { byronFun = noMints - , shelleyFun = noMints - , allegraFun = noMints - , maryFun = \(Mint mint' :*: Witnesses wits :*: ReferenceInputs _refInps) - -> K $ maryMint mint' wits - , alonzoFun = \(Mint mint' :*: Witnesses wits :*: ReferenceInputs _refInps) - -> K $ alonzoMint mint' wits - , babbageFun = \(Mint mint' :*: Witnesses wits :*: ReferenceInputs refInps) - -> K $ babbageMint refInps mint' wits - , conwayFun = \(Mint mint' :*: Witnesses wits :*: ReferenceInputs refInps) - -> K $ conwayMint refInps mint' wits - } - where - noMints = const $ K (emptyTokenMapWithScripts, emptyTokenMapWithScripts) +mint = + EraFun + { byronFun = noMints + , shelleyFun = noMints + , allegraFun = noMints + , maryFun = + \(Mint mint' :*: Witnesses wits :*: _refInps) -> + K $ maryMint mint' wits + , alonzoFun = + \(Mint mint' :*: Witnesses wits :*: _refInps) -> + K $ alonzoMint mint' wits + , babbageFun = + \(Mint mint' :*: Witnesses wits :*: ReferenceInputs refInps) -> + K $ babbageMint refInps mint' wits + , conwayFun = + \(Mint mint' :*: Witnesses wits :*: ReferenceInputs refInps) -> + K $ conwayMint refInps mint' wits + } + where + noMints = const $ K (emptyTokenMapWithScripts, emptyTokenMapWithScripts) -maryMint :: - ( SL.Core.Script era ~ ShelleyMA.Timelock StandardCrypto - , Crypto era ~ StandardCrypto - , SL.Core.EraScript era - ) - => SL.MaryValue StandardCrypto - -> SL.WitnessSet era +maryMint + :: MultiAsset StandardCrypto + -> ShelleyTxWits StandardMary -> (TokenMapWithScripts, TokenMapWithScripts) maryMint = yesMints $ fromMaryScriptMap . scriptWits -alonzoMint :: - ( SL.Core.Script era ~ Alonzo.AlonzoScript (AlonzoEra StandardCrypto) - , Crypto era ~ StandardCrypto - ) - => SL.MaryValue StandardCrypto - -> AL.TxWitness era +alonzoMint + :: MultiAsset StandardCrypto + -> AlonzoTxWits StandardAlonzo -> (TokenMapWithScripts, TokenMapWithScripts) -alonzoMint = yesMints $ fromAlonzoScriptMap . AL.txscripts' +alonzoMint = yesMints $ fromAlonzoScriptMap . txscripts' -babbageMint :: - ( SL.Core.Script era - ~ Alonzo.AlonzoScript (BabbageEra StandardCrypto) - , Crypto era ~ StandardCrypto - ) - => Set (SL.TxIn StandardCrypto) - -> SL.MaryValue StandardCrypto - -> AL.TxWitness era +babbageMint + :: Set (SL.TxIn StandardCrypto) + -> MultiAsset StandardCrypto + -> AlonzoTxWits StandardBabbage -> (TokenMapWithScripts, TokenMapWithScripts) babbageMint refInps val wits = - let (map1, map2) = yesMints (fromBabbageScriptMap . AL.txscripts') val wits - in ( useReferenceScriptIfNeeded refInps map1 - , useReferenceScriptIfNeeded refInps map2 ) + let (map1, map2) = yesMints (fromBabbageScriptMap . txscripts') val wits + in ( useReferenceScriptIfNeeded refInps map1 + , useReferenceScriptIfNeeded refInps map2 + ) -conwayMint :: - ( SL.Core.Script era - ~ Alonzo.AlonzoScript (ConwayEra StandardCrypto) - , Crypto era ~ StandardCrypto - ) - => Set (SL.TxIn StandardCrypto) - -> SL.MaryValue StandardCrypto - -> AL.TxWitness era +conwayMint + :: Set (SL.TxIn StandardCrypto) + -> MultiAsset StandardCrypto + -> AlonzoTxWits StandardConway -> (TokenMapWithScripts, TokenMapWithScripts) conwayMint refInps val wits = - let (map1, map2) = yesMints (fromConwayScriptMap . AL.txscripts') val wits - in ( useReferenceScriptIfNeeded refInps map1 - , useReferenceScriptIfNeeded refInps map2 ) + let (map1, map2) = yesMints (fromConwayScriptMap . txscripts') val wits + in ( useReferenceScriptIfNeeded refInps map1 + , useReferenceScriptIfNeeded refInps map2 + ) -yesMints :: (t -> Map TokenPolicyId AnyScript) - -> SL.MaryValue StandardCrypto +yesMints + :: (t -> Map TokenPolicyId AnyScript) + -> MultiAsset StandardCrypto -> t -> (TokenMapWithScripts, TokenMapWithScripts) yesMints scriptMapOf mint' wits = @@ -173,9 +163,9 @@ yesMints scriptMapOf mint' wits = mintScriptMap = getScriptMap scriptMap assetsToMint burnScriptMap = getScriptMap scriptMap assetsToBurn in - ( TokenMapWithScripts assetsToMint mintScriptMap - , TokenMapWithScripts assetsToBurn burnScriptMap - ) + ( TokenMapWithScripts assetsToMint mintScriptMap + , TokenMapWithScripts assetsToBurn burnScriptMap + ) useReferenceScriptIfNeeded :: Set (SL.TxIn StandardCrypto) @@ -192,11 +182,8 @@ useReferenceScriptIfNeeded refInps (TokenMapWithScripts tokenMap tokenScripts) = tokenScripts' = Map.fromList $ map replaceScript allTokenPolicyIds in TokenMapWithScripts tokenMap tokenScripts' -fromLedgerMintValue - :: SL.MaryValue StandardCrypto - -> (TokenMap, TokenMap) -fromLedgerMintValue (SL.MaryValue _ ledgerTokens) = - (assetsToMint, assetsToBurn) +fromLedgerMintValue :: MultiAsset StandardCrypto -> (TokenMap, TokenMap) +fromLedgerMintValue (MultiAsset ledgerTokens) = (assetsToMint, assetsToBurn) where assetsToMint = ledgerTokens & Map.map (Map.filter (> 0)) @@ -217,27 +204,21 @@ fromLedgerMintValue (SL.MaryValue _ ledgerTokens) = & Map.map toWalletTokenQuantity fromMaryScriptMap - :: Map - (SL.ScriptHash (Crypto (MA.ShelleyMAEra 'MA.Mary StandardCrypto))) - (SL.Core.Script (MA.ShelleyMAEra 'MA.Mary StandardCrypto)) + :: Map (SL.ScriptHash StandardCrypto) (Core.Script StandardMary) -> Map TokenPolicyId AnyScript fromMaryScriptMap = - Map.map (flip NativeScript ViaSpending . toWalletScript (const Policy)) . - Map.mapKeys (toWalletTokenPolicyId . SL.PolicyID) + Map.map (flip NativeScript ViaSpending . toWalletScript (const Policy)) . + Map.mapKeys (toWalletTokenPolicyId . SL.PolicyID) getScriptMap - :: Map TokenPolicyId AnyScript - -> TokenMap - -> Map TokenPolicyId AnyScript + :: Map TokenPolicyId AnyScript -> TokenMap -> Map TokenPolicyId AnyScript getScriptMap scriptMap = Map.fromList . mapMaybe (\(policy, _) -> (policy,) <$> Map.lookup policy scriptMap) . toNestedList fromAlonzoScriptMap - :: Map - (SL.ScriptHash (Crypto StandardAlonzo)) - (SL.Core.Script StandardAlonzo) + :: Map (SL.ScriptHash StandardCrypto) (Core.Script StandardAlonzo) -> Map TokenPolicyId AnyScript fromAlonzoScriptMap = Map.map toAnyScript . @@ -249,58 +230,50 @@ fromAlonzoScriptMap = PlutusScript (PlutusScriptInfo (toPlutusVer ver) (hashAlonzoScript s)) ViaSpending hashAlonzoScript = fromLedgerScriptHash . - SL.Core.hashScript @(Cardano.ShelleyLedgerEra Cardano.AlonzoEra) + Core.hashScript @(Cardano.ShelleyLedgerEra Cardano.AlonzoEra) -fromLedgerScriptToAnyScript - :: SL.Core.Script StandardBabbage - -> AnyScript -fromLedgerScriptToAnyScript = toAnyScript - where +fromLedgerScriptToAnyScriptBabbage :: Core.Script StandardBabbage -> AnyScript +fromLedgerScriptToAnyScriptBabbage = toAnyScript + where toAnyScript (Alonzo.TimelockScript script) = NativeScript (toWalletScript (const Policy) script) ViaSpending toAnyScript s@(Alonzo.PlutusScript ver _) = - PlutusScript (PlutusScriptInfo (toPlutusVer ver) - (hashBabbageScript s)) ViaSpending + PlutusScript + (PlutusScriptInfo (toPlutusVer ver) (hashBabbageScript s)) + ViaSpending hashBabbageScript = fromLedgerScriptHash . - SL.Core.hashScript @(Cardano.ShelleyLedgerEra Cardano.BabbageEra) + Core.hashScript @(Cardano.ShelleyLedgerEra Cardano.BabbageEra) -fromLedgerScriptToAnyScriptConway - :: SL.Core.Script StandardConway - -> AnyScript +fromLedgerScriptToAnyScriptConway :: Core.Script StandardConway -> AnyScript fromLedgerScriptToAnyScriptConway = toAnyScript - where + where toAnyScript (Alonzo.TimelockScript script) = NativeScript (toWalletScript (const Policy) script) ViaSpending toAnyScript s@(Alonzo.PlutusScript ver _) = - PlutusScript (PlutusScriptInfo (toPlutusVer ver) - (hashConwayScript s)) ViaSpending + PlutusScript + (PlutusScriptInfo (toPlutusVer ver) (hashConwayScript s)) + ViaSpending hashConwayScript = fromLedgerScriptHash . - SL.Core.hashScript @(Cardano.ShelleyLedgerEra Cardano.ConwayEra) + Core.hashScript @(Cardano.ShelleyLedgerEra Cardano.ConwayEra) -toPlutusVer :: Alonzo.Language -> PlutusVersion -toPlutusVer Alonzo.PlutusV1 = PlutusVersionV1 -toPlutusVer Alonzo.PlutusV2 = PlutusVersionV2 +toPlutusVer :: Ledger.Language -> PlutusVersion +toPlutusVer Ledger.PlutusV1 = PlutusVersionV1 +toPlutusVer Ledger.PlutusV2 = PlutusVersionV2 +toPlutusVer Ledger.PlutusV3 = PlutusVersionV3 fromBabbageScriptMap - :: Map - (SL.ScriptHash (Crypto StandardBabbage)) - (SL.Core.Script StandardBabbage) + :: Map (SL.ScriptHash StandardCrypto) (Core.Script StandardBabbage) -> Map TokenPolicyId AnyScript fromBabbageScriptMap = - Map.map fromLedgerScriptToAnyScript . + Map.map fromLedgerScriptToAnyScriptBabbage . Map.mapKeys (toWalletTokenPolicyId . SL.PolicyID) fromConwayScriptMap - :: Map - (SL.ScriptHash (Crypto StandardConway)) - (SL.Core.Script StandardConway) + :: Map (SL.ScriptHash StandardCrypto) (Core.Script StandardConway) -> Map TokenPolicyId AnyScript fromConwayScriptMap = Map.map fromLedgerScriptToAnyScriptConway . Map.mapKeys (toWalletTokenPolicyId . SL.PolicyID) -fromLedgerScriptHash - :: (SL.ScriptHash era) - -> ScriptHash -fromLedgerScriptHash (SL.ScriptHash h) = - ScriptHash (hashToBytes h) +fromLedgerScriptHash :: (SL.ScriptHash era) -> ScriptHash +fromLedgerScriptHash (SL.ScriptHash h) = ScriptHash (hashToBytes h) diff --git a/lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Features/Outputs.hs b/lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Features/Outputs.hs index e84851b212f..43a7e89be86 100644 --- a/lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Features/Outputs.hs +++ b/lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Features/Outputs.hs @@ -26,8 +26,6 @@ import Cardano.Ledger.Shelley.API ( StrictMaybe (SJust, SNothing) ) import Cardano.Wallet.Read.Eras ( EraFun (..), K (..) ) -import Cardano.Wallet.Read.Primitive.Tx.Features.Fee - ( fromShelleyCoin ) import Cardano.Wallet.Read.Tx.Outputs ( Outputs (..) ) import Cardano.Wallet.Util @@ -56,13 +54,14 @@ import qualified Cardano.Ledger.Conway as Conway import qualified Cardano.Ledger.Crypto as SL import qualified Cardano.Ledger.Shelley.API as SL import qualified Cardano.Wallet.Primitive.Types.Address as W -import qualified Cardano.Wallet.Primitive.Types.Coin as W import qualified Cardano.Wallet.Primitive.Types.Coin as Coin +import qualified Cardano.Wallet.Primitive.Types.Coin as W import qualified Cardano.Wallet.Primitive.Types.Hash as W import qualified Cardano.Wallet.Primitive.Types.TokenBundle as TokenBundle import qualified Cardano.Wallet.Primitive.Types.TokenPolicy as W import qualified Cardano.Wallet.Primitive.Types.TokenQuantity as W import qualified Cardano.Wallet.Primitive.Types.Tx.TxOut as W +import qualified Cardano.Wallet.Shelley.Compatibility.Ledger as Ledger getOutputs :: EraFun Outputs (K [W.TxOut]) getOutputs = EraFun @@ -81,12 +80,12 @@ fromShelleyAddress = W.Address . SL.serialiseAddr fromShelleyTxOut :: SL.ShelleyTxOut StandardShelley -> W.TxOut fromShelleyTxOut (SL.ShelleyTxOut addr amount) = W.TxOut (fromShelleyAddress addr) - (TokenBundle.fromCoin $ fromShelleyCoin amount) + (TokenBundle.fromCoin $ Ledger.toWalletCoin amount) fromAllegraTxOut :: SL.ShelleyTxOut StandardAllegra -> W.TxOut fromAllegraTxOut (SL.ShelleyTxOut addr amount) = W.TxOut (fromShelleyAddress addr) - (TokenBundle.fromCoin $ fromShelleyCoin amount) + (TokenBundle.fromCoin $ Ledger.toWalletCoin amount) fromMaryTxOut :: SL.ShelleyTxOut StandardMary -> W.TxOut fromMaryTxOut (SL.ShelleyTxOut addr value) = diff --git a/lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Features/Validity.hs b/lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Features/Validity.hs index 9523a85b709..c0a38e6b8e9 100644 --- a/lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Features/Validity.hs +++ b/lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Features/Validity.hs @@ -17,49 +17,48 @@ module Cardano.Wallet.Read.Primitive.Tx.Features.Validity import Prelude +import Cardano.Ledger.Api + ( ValidityInterval (..) ) import Cardano.Wallet.Read.Eras ( EraFun (..), K (..) ) import Cardano.Wallet.Read.Tx.Validity ( Validity (..) ) import Cardano.Wallet.Transaction ( ValidityIntervalExplicit (ValidityIntervalExplicit) ) +import Data.Maybe.Strict + ( StrictMaybe (..) ) import Data.Quantity ( Quantity (..) ) -import qualified Cardano.Ledger.ShelleyMA.TxBody as MA import qualified Ouroboros.Network.Block as O getValidity :: EraFun Validity (K (Maybe ValidityIntervalExplicit)) -getValidity = EraFun - { byronFun = noValidity - , shelleyFun = yesShelleyValidity - , allegraFun = yesMaryValidity - , maryFun = yesMaryValidity - , alonzoFun = yesMaryValidity - , babbageFun = yesMaryValidity - , conwayFun = yesMaryValidity - } - where - noValidity = const $ K Nothing - yesShelleyValidity (Validity ttl) - = K . Just . shelleyValidityInterval $ ttl - yesMaryValidity (Validity validity') - = K . Just $ afterShelleyValidityInterval validity' +getValidity = + EraFun + { byronFun = \_validity -> K Nothing + , shelleyFun = \(Validity ttl) -> K . Just $ shelleyValidityInterval ttl + , allegraFun = afterShelleyValidity + , maryFun = afterShelleyValidity + , alonzoFun = afterShelleyValidity + , babbageFun = afterShelleyValidity + , conwayFun = afterShelleyValidity + } + where + afterShelleyValidity (Validity validity) + = K . Just $ afterShelleyValidityInterval validity -afterShelleyValidityInterval - :: MA.ValidityInterval - -> ValidityIntervalExplicit -afterShelleyValidityInterval (MA.ValidityInterval from to) = +afterShelleyValidityInterval :: ValidityInterval -> ValidityIntervalExplicit +afterShelleyValidityInterval (ValidityInterval from to) = case (from, to) of - (MA.SNothing, MA.SJust (O.SlotNo s)) -> + (SNothing, SJust (O.SlotNo s)) -> ValidityIntervalExplicit (Quantity 0) (Quantity s) - (MA.SNothing, MA.SNothing) -> + (SNothing, SNothing) -> ValidityIntervalExplicit (Quantity 0) (Quantity maxBound) - (MA.SJust (O.SlotNo s1), MA.SJust (O.SlotNo s2)) -> + (SJust (O.SlotNo s1), SJust (O.SlotNo s2)) -> ValidityIntervalExplicit (Quantity s1) (Quantity s2) - (MA.SJust (O.SlotNo s1), MA.SNothing) -> + (SJust (O.SlotNo s1), SNothing) -> ValidityIntervalExplicit (Quantity s1) (Quantity maxBound) shelleyValidityInterval :: O.SlotNo -> ValidityIntervalExplicit shelleyValidityInterval (O.SlotNo n) - = ValidityIntervalExplicit (Quantity 0) $ Quantity n + = ValidityIntervalExplicit (Quantity 0) (Quantity n) diff --git a/lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Features/Withdrawals.hs b/lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Features/Withdrawals.hs index 6eae555c4a1..a44f0aa6e6e 100644 --- a/lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Features/Withdrawals.hs +++ b/lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Features/Withdrawals.hs @@ -9,52 +9,49 @@ module Cardano.Wallet.Read.Primitive.Tx.Features.Withdrawals ( getWithdrawals - , fromShelleyWdrl + , fromLedgerWithdrawals ) where import Prelude -import Cardano.Ledger.Crypto - ( StandardCrypto ) import Cardano.Wallet.Primitive.Types.Coin ( Coin ) import Cardano.Wallet.Primitive.Types.RewardAccount ( RewardAccount ) import Cardano.Wallet.Read.Eras ( EraFun (..), K (..) ) -import Cardano.Wallet.Read.Primitive.Tx.Features.Certificates - ( fromStakeCredential ) -import Cardano.Wallet.Read.Primitive.Tx.Features.Fee - ( fromShelleyCoin ) import Cardano.Wallet.Read.Tx.Withdrawals ( Withdrawals (..) ) -import Data.Bifunctor - ( Bifunctor (..) ) import Data.Map.Strict ( Map ) -import qualified Cardano.Ledger.Shelley.TxBody as SL +import qualified Cardano.Ledger.Api as Ledger +import qualified Cardano.Ledger.Coin as Ledger import qualified Cardano.Wallet.Primitive.Types.Coin as W -import qualified Cardano.Wallet.Primitive.Types.RewardAccount as W -import qualified Data.Map.Strict as Map +import qualified Cardano.Wallet.Read.Primitive.Tx.Features.Certificates as Certificates +import qualified Cardano.Wallet.Shelley.Compatibility.Ledger as Ledger +import qualified Data.Map as Map + getWithdrawals :: EraFun Withdrawals (K (Maybe (Map RewardAccount Coin))) -getWithdrawals = EraFun - { byronFun = noWithdrawals - , shelleyFun = yesWithdrawals - , allegraFun = yesWithdrawals - , maryFun = yesWithdrawals - , alonzoFun = yesWithdrawals - , babbageFun = yesWithdrawals - , conwayFun = yesWithdrawals - } - where - noWithdrawals = const $ K Nothing - yesWithdrawals (Withdrawals ttl) - = K . Just . fromShelleyWdrl $ ttl - -fromShelleyWdrl :: SL.Wdrl StandardCrypto -> Map W.RewardAccount W.Coin -fromShelleyWdrl (SL.Wdrl wdrl) = Map.fromList $ - bimap (fromStakeCredential . SL.getRwdCred) fromShelleyCoin - <$> Map.toList wdrl +getWithdrawals = + EraFun + { byronFun = \_withdrawals -> K Nothing + , shelleyFun = eraFromWithdrawals + , allegraFun = eraFromWithdrawals + , maryFun = eraFromWithdrawals + , alonzoFun = eraFromWithdrawals + , babbageFun = eraFromWithdrawals + , conwayFun = eraFromWithdrawals + } + where + eraFromWithdrawals (Withdrawals withdrawals) = + K . Just $ fromLedgerWithdrawals withdrawals + +fromLedgerWithdrawals + :: (Map (Ledger.RewardAcnt crypto) Ledger.Coin) -> Map RewardAccount W.Coin +fromLedgerWithdrawals withdrawals = Map.fromList + [ (Certificates.fromStakeCredential cred, Ledger.toWalletCoin coin) + | (Ledger.RewardAcnt _network cred, coin) <- Map.toList withdrawals + ] diff --git a/lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Mary.hs b/lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Mary.hs index 6cfecee072d..1a260386d76 100644 --- a/lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Mary.hs +++ b/lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Mary.hs @@ -17,22 +17,24 @@ import Prelude import Cardano.Api ( MaryEra ) -import Cardano.Ledger.Core - ( auxDataTxL, bodyTxL, feeTxBodyL, inputsTxBodyL, outputsTxBodyL, witsTxL ) -import Cardano.Ledger.Era - ( Era (..) ) -import Cardano.Ledger.Shelley.TxBody - ( certsTxBodyL, wdrlsTxBodyL ) -import Cardano.Ledger.ShelleyMA.TxBody - ( mintTxBodyL, vldtTxBodyL ) -import Cardano.Wallet.Primitive.Types.TokenPolicy - ( TokenPolicyId ) +import Cardano.Ledger.Api + ( addrTxWitsL + , auxDataTxL + , bodyTxL + , bootAddrTxWitsL + , certsTxBodyL + , feeTxBodyL + , inputsTxBodyL + , mintTxBodyL + , outputsTxBodyL + , scriptTxWitsL + , vldtTxBodyL + , witsTxL + ) import Cardano.Wallet.Read.Eras ( inject, mary ) import Cardano.Wallet.Read.Primitive.Tx.Features.Certificates ( anyEraCerts ) -import Cardano.Wallet.Read.Primitive.Tx.Features.Fee - ( fromShelleyCoin ) import Cardano.Wallet.Read.Primitive.Tx.Features.Inputs ( fromShelleyTxIn ) import Cardano.Wallet.Read.Primitive.Tx.Features.Metadata @@ -44,15 +46,17 @@ import Cardano.Wallet.Read.Primitive.Tx.Features.Outputs import Cardano.Wallet.Read.Primitive.Tx.Features.Validity ( afterShelleyValidityInterval ) import Cardano.Wallet.Read.Primitive.Tx.Features.Withdrawals - ( fromShelleyWdrl ) + ( fromLedgerWithdrawals ) import Cardano.Wallet.Read.Tx ( Tx (Tx) ) import Cardano.Wallet.Read.Tx.CBOR ( renderTxToCBOR ) import Cardano.Wallet.Read.Tx.Hash ( shelleyTxHash ) +import Cardano.Wallet.Read.Tx.Withdrawals + ( shelleyWithdrawals ) import Cardano.Wallet.Shelley.Compatibility.Ledger - ( toWalletScript, toWalletTokenPolicyId ) + ( toWalletScript ) import Cardano.Wallet.Transaction ( AnyExplicitScript (..) , ScriptReference (..) @@ -63,24 +67,15 @@ import Cardano.Wallet.Transaction , toKeyRole ) import Control.Lens - ( (^.) ) -import Data.Foldable - ( toList ) -import Data.Map.Strict - ( Map ) + ( folded, (^.), (^..) ) import qualified Cardano.Api.Shelley as Cardano import qualified Cardano.Ledger.BaseTypes as SL -import qualified Cardano.Ledger.Core as SL.Core -import qualified Cardano.Ledger.Crypto as Crypto -import qualified Cardano.Ledger.Mary.Value as SL import qualified Cardano.Ledger.Shelley.API as SL -import qualified Cardano.Ledger.Shelley.Tx as Shelley -import qualified Cardano.Ledger.ShelleyMA as MA import qualified Cardano.Wallet.Primitive.Types as W import qualified Cardano.Wallet.Primitive.Types.Hash as W import qualified Cardano.Wallet.Primitive.Types.Tx as W -import qualified Data.Map.Strict as Map +import qualified Cardano.Wallet.Shelley.Compatibility.Ledger as Ledger import qualified Data.Set as Set fromMaryTx @@ -100,52 +95,33 @@ fromMaryTx tx witCtx = , txCBOR = Just $ renderTxToCBOR $ inject mary $ Tx tx , fee = - Just $ fromShelleyCoin fee + Just $ Ledger.toWalletCoin $ tx ^. bodyTxL.feeTxBodyL , resolvedInputs = - map ((,Nothing) . fromShelleyTxIn) (toList ins) + (,Nothing) . fromShelleyTxIn <$> tx ^.. bodyTxL.inputsTxBodyL.folded , resolvedCollateralInputs = [] , outputs = - map fromMaryTxOut (toList outs) + fromMaryTxOut <$> tx ^.. bodyTxL.outputsTxBodyL.folded , collateralOutput = - -- Collateral outputs are not supported in Mary. - Nothing + Nothing -- Collateral outputs are not supported in Mary. , withdrawals = - fromShelleyWdrl wdrls + fromLedgerWithdrawals . shelleyWithdrawals $ tx , metadata = - fromMaryMetadata <$> SL.strictMaybeToMaybe mad + fromMaryMetadata <$> SL.strictMaybeToMaybe (tx ^. auxDataTxL) , scriptValidity = Nothing } - , anyEraCerts certs + , anyEraCerts $ tx ^. bodyTxL.certsTxBodyL , assetsToMint , assetsToBurn - , Just $ afterShelleyValidityInterval vldt - , countWits + , Just $ afterShelleyValidityInterval $ tx ^. bodyTxL.vldtTxBodyL + , WitnessCount + (fromIntegral $ Set.size $ tx ^. witsTxL.addrTxWitsL) + ((`NativeExplicitScript` ViaSpending) + . toWalletScript (toKeyRole witCtx) + <$> tx ^.. witsTxL.scriptTxWitsL.folded) + (fromIntegral $ Set.size $ tx ^. witsTxL.bootAddrTxWitsL) ) where - bod = tx ^. bodyTxL - wits = tx ^. witsTxL - mad = tx ^. auxDataTxL - ins = bod ^. inputsTxBodyL - outs = bod ^. outputsTxBodyL - certs = bod ^. certsTxBodyL - wdrls = bod ^. wdrlsTxBodyL - fee = bod ^. feeTxBodyL - vldt = bod ^. vldtTxBodyL - mint = bod ^. mintTxBodyL - (assetsToMint, assetsToBurn) = maryMint mint wits - scriptMap = fromMaryScriptMap $ Shelley.scriptWits wits - countWits = WitnessCount - (fromIntegral $ Set.size $ Shelley.addrWits wits) - (Map.elems scriptMap) - (fromIntegral $ Set.size $ Shelley.bootWits wits) - - fromMaryScriptMap - :: Map - (SL.ScriptHash (Crypto (MA.ShelleyMAEra 'MA.Mary Crypto.StandardCrypto))) - (SL.Core.Script (MA.ShelleyMAEra 'MA.Mary Crypto.StandardCrypto)) - -> Map TokenPolicyId AnyExplicitScript - fromMaryScriptMap = - Map.map (flip NativeExplicitScript ViaSpending . toWalletScript (toKeyRole witCtx)) . - Map.mapKeys (toWalletTokenPolicyId . SL.PolicyID) + (assetsToMint, assetsToBurn) = + maryMint (tx ^. bodyTxL.mintTxBodyL) (tx ^. witsTxL) diff --git a/lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Shelley.hs b/lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Shelley.hs index 2fdf948e69f..3d0edfae480 100644 --- a/lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Shelley.hs +++ b/lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Shelley.hs @@ -21,27 +21,40 @@ import Cardano.Address.Script import Cardano.Api ( ShelleyEra ) import Cardano.Ledger.Core - ( auxDataTxL, bodyTxL, feeTxBodyL, inputsTxBodyL, outputsTxBodyL, witsTxL ) + ( addrTxWitsL + , auxDataTxL + , bodyTxL + , bootAddrTxWitsL + , feeTxBodyL + , inputsTxBodyL + , outputsTxBodyL + , scriptTxWitsL + , witsTxL + ) +import Cardano.Ledger.Shelley + ( ShelleyTx ) import Cardano.Ledger.Shelley.TxBody - ( certsTxBodyL, ttlTxBodyL, wdrlsTxBodyL ) + ( certsTxBodyL, ttlTxBodyL ) import Cardano.Wallet.Read.Eras ( inject, shelley ) import Cardano.Wallet.Read.Primitive.Tx.Features.Certificates - ( anyEraCerts, fromStakeCredential ) -import Cardano.Wallet.Read.Primitive.Tx.Features.Fee - ( fromShelleyCoin ) + ( anyEraCerts ) import Cardano.Wallet.Read.Primitive.Tx.Features.Metadata ( fromShelleyMetadata ) import Cardano.Wallet.Read.Primitive.Tx.Features.Outputs ( fromShelleyTxOut ) import Cardano.Wallet.Read.Primitive.Tx.Features.Validity ( shelleyValidityInterval ) +import Cardano.Wallet.Read.Primitive.Tx.Features.Withdrawals + ( fromLedgerWithdrawals ) import Cardano.Wallet.Read.Tx ( Tx (..) ) import Cardano.Wallet.Read.Tx.CBOR ( renderTxToCBOR ) import Cardano.Wallet.Read.Tx.Hash ( fromShelleyTxId, shelleyTxHash ) +import Cardano.Wallet.Read.Tx.Withdrawals + ( shelleyWithdrawals ) import Cardano.Wallet.Shelley.Compatibility.Ledger ( toWalletScriptFromShelley ) import Cardano.Wallet.Transaction @@ -53,29 +66,19 @@ import Cardano.Wallet.Transaction , emptyTokenMapWithScripts ) import Control.Lens - ( (^.) ) -import Data.Bifunctor - ( bimap ) -import Data.Foldable - ( toList ) -import Data.Map.Strict - ( Map ) + ( folded, (^.), (^..) ) import Data.Word ( Word16, Word32, Word64 ) import qualified Cardano.Api.Shelley as Cardano -import qualified Cardano.Ledger.Address as SL import qualified Cardano.Ledger.BaseTypes as SL import qualified Cardano.Ledger.Shelley.API as SL -import qualified Cardano.Ledger.Shelley.Tx as SL import qualified Cardano.Wallet.Primitive.Types as W -import qualified Cardano.Wallet.Primitive.Types.Coin as W import qualified Cardano.Wallet.Primitive.Types.Hash as W -import qualified Cardano.Wallet.Primitive.Types.RewardAccount as W import qualified Cardano.Wallet.Primitive.Types.Tx as W import qualified Cardano.Wallet.Primitive.Types.Tx.TxIn as W ( TxIn (TxIn) ) -import qualified Data.Map.Strict as Map +import qualified Cardano.Wallet.Shelley.Compatibility.Ledger as Ledger import qualified Data.Set as Set fromShelleyTxIn @@ -98,7 +101,7 @@ fromShelleyTxIn (SL.TxIn txid (SL.TxIx ix)) = -- NOTE: For resolved inputs we have to pass in a dummy value of 0. fromShelleyTx - :: SL.ShelleyTx (Cardano.ShelleyLedgerEra ShelleyEra) + :: ShelleyTx (Cardano.ShelleyLedgerEra ShelleyEra) -> ( W.Tx , [W.Certificate] , TokenMapWithScripts @@ -113,46 +116,30 @@ fromShelleyTx tx = , txCBOR = Just $ renderTxToCBOR $ inject shelley $ Tx tx , fee = - Just $ fromShelleyCoin fee + Just $ Ledger.toWalletCoin $ tx ^. bodyTxL.feeTxBodyL , resolvedInputs = - (,Nothing) . fromShelleyTxIn <$> toList ins + (,Nothing) . fromShelleyTxIn <$> tx ^.. bodyTxL.inputsTxBodyL.folded , resolvedCollateralInputs = [] , outputs = - map fromShelleyTxOut (toList outs) + fromShelleyTxOut <$> tx ^.. bodyTxL.outputsTxBodyL.folded , collateralOutput = - -- Collateral outputs are not supported in Shelley. - Nothing + Nothing -- Collateral outputs are not supported in Shelley. , withdrawals = - fromShelleyWdrl wdrls + fromLedgerWithdrawals . shelleyWithdrawals $ tx , metadata = - fromShelleyMetadata <$> SL.strictMaybeToMaybe mmd + fromShelleyMetadata <$> SL.strictMaybeToMaybe (tx ^. auxDataTxL) , scriptValidity = Nothing } - , anyEraCerts certs + , anyEraCerts $ tx ^. bodyTxL . certsTxBodyL , emptyTokenMapWithScripts , emptyTokenMapWithScripts - , Just $ shelleyValidityInterval ttl - , countWits + , Just $ shelleyValidityInterval $ tx ^. bodyTxL.ttlTxBodyL + , WitnessCount + (fromIntegral $ Set.size $ tx ^. witsTxL.addrTxWitsL) + ((`NativeExplicitScript` ViaSpending) + . toWalletScriptFromShelley Payment + <$> tx ^.. witsTxL.scriptTxWitsL.folded) + (fromIntegral $ Set.size $ tx ^. witsTxL.bootAddrTxWitsL) ) - where - ins = tx ^. bodyTxL . inputsTxBodyL - outs = tx ^. bodyTxL . outputsTxBodyL - certs = tx ^. bodyTxL . certsTxBodyL - wdrls = tx ^. bodyTxL . wdrlsTxBodyL - fee = tx ^. bodyTxL . feeTxBodyL - ttl = tx ^. bodyTxL . ttlTxBodyL - wits = tx ^. witsTxL - mmd = tx ^. auxDataTxL - -- SL.Tx (SL.TxBody _ins _outs _certs _wdrls _fee _ttl _ _) _wits _mmd = tx - countWits = WitnessCount - (fromIntegral $ Set.size $ SL.addrWits wits) - (fmap (flip NativeExplicitScript ViaSpending . toWalletScriptFromShelley Payment) - $ Map.elems $ SL.scriptWits wits) - (fromIntegral $ Set.size $ SL.bootWits wits) - -fromShelleyWdrl :: SL.Wdrl crypto -> Map W.RewardAccount W.Coin -fromShelleyWdrl (SL.Wdrl wdrl) = Map.fromList $ - bimap (fromStakeCredential . SL.getRwdCred) fromShelleyCoin - <$> Map.toList wdrl diff --git a/lib/wallet/src/Cardano/Wallet/Read/Tx.hs b/lib/wallet/src/Cardano/Wallet/Read/Tx.hs index 7cd5849d5bc..f2d4183ff9b 100644 --- a/lib/wallet/src/Cardano/Wallet/Read/Tx.hs +++ b/lib/wallet/src/Cardano/Wallet/Read/Tx.hs @@ -30,21 +30,25 @@ import Cardano.Api , MaryEra , ShelleyEra ) +import Cardano.Ledger.Alonzo.Tx + ( AlonzoTx ) +import Cardano.Ledger.Api + ( StandardCrypto ) +import Cardano.Ledger.Shelley.Tx + ( ShelleyTx ) -import qualified Cardano.Api.Shelley as Api import qualified Cardano.Chain.UTxO as Byron -import qualified Cardano.Ledger.Alonzo.Tx as Alonzo -import qualified Cardano.Ledger.Shelley.API as Shelley +import qualified Cardano.Ledger.Api as Ledger -- | Closed type family returning the ledger 'Tx' type for each known @era@. type family TxT era where TxT ByronEra = Byron.ATxAux () - TxT ShelleyEra = Shelley.ShelleyTx (Api.ShelleyLedgerEra ShelleyEra) - TxT AllegraEra = Shelley.ShelleyTx (Api.ShelleyLedgerEra AllegraEra) - TxT MaryEra = Shelley.ShelleyTx (Api.ShelleyLedgerEra MaryEra) - TxT AlonzoEra = Alonzo.AlonzoTx (Api.ShelleyLedgerEra AlonzoEra) - TxT BabbageEra = Alonzo.AlonzoTx (Api.ShelleyLedgerEra BabbageEra) - TxT ConwayEra = Alonzo.AlonzoTx (Api.ShelleyLedgerEra ConwayEra) + TxT ShelleyEra = ShelleyTx (Ledger.ShelleyEra StandardCrypto) + TxT AllegraEra = ShelleyTx (Ledger.AllegraEra StandardCrypto) + TxT MaryEra = ShelleyTx (Ledger.MaryEra StandardCrypto) + TxT AlonzoEra = AlonzoTx (Ledger.AlonzoEra StandardCrypto) + TxT BabbageEra = AlonzoTx (Ledger.BabbageEra StandardCrypto) + TxT ConwayEra = AlonzoTx (Ledger.ConwayEra StandardCrypto) -- | A tx in any era newtype Tx era = Tx {unTx :: TxT era} diff --git a/lib/wallet/src/Cardano/Wallet/Read/Tx/CBOR.hs b/lib/wallet/src/Cardano/Wallet/Read/Tx/CBOR.hs index 2e3648d8607..9f0095c9568 100644 --- a/lib/wallet/src/Cardano/Wallet/Read/Tx/CBOR.hs +++ b/lib/wallet/src/Cardano/Wallet/Read/Tx/CBOR.hs @@ -1,9 +1,11 @@ {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeOperators #-} {-# OPTIONS_GHC -Wno-orphans #-} +{-# OPTIONS_GHC -Wno-unrecognised-pragmas #-} -- | -- Copyright: Âİ 2020-2022 IOHK @@ -18,18 +20,23 @@ module Cardano.Wallet.Read.Tx.CBOR , parseTxFromCBOR , serializeTx , deserializeTx + , roundTripTxCBor ) where import Prelude -import Cardano.Api - ( FromCBOR, ToCBOR ) -import Cardano.Binary - ( Annotator (runAnnotator) - , FromCBOR (fromCBOR) - , FullByteString (Full) - , toCBOR +import Cardano.Ledger.Api + ( eraProtVerLow ) +import Cardano.Ledger.Binary + ( EncCBOR ) +import Cardano.Ledger.Binary.Decoding + ( DecCBOR (decCBOR) + , DecoderError + , byronProtVer + , decodeFull + , decodeFullAnnotator + , shelleyProtVer ) import Cardano.Wallet.Read.Eras ( (:.:) (..) @@ -42,23 +49,26 @@ import Cardano.Wallet.Read.Eras ) import Cardano.Wallet.Read.Tx ( Tx (..), TxT ) -import Codec.CBOR.Read - ( DeserialiseFailure, deserialiseFromBytes ) -import Codec.CBOR.Write - ( toLazyByteString ) import Data.ByteArray.Encoding ( Base (Base16), convertToBase ) import Data.ByteString.Lazy ( toStrict ) -import Data.Functor.Identity - ( Identity (..) ) import Data.Text.Class ( ToText ) import Data.Text.Encoding ( decodeUtf8 ) import Fmt ( Buildable (..) ) +import Ouroboros.Consensus.Shelley.Eras + ( StandardAllegra + , StandardAlonzo + , StandardBabbage + , StandardConway + , StandardMary + , StandardShelley + ) +import qualified Cardano.Ledger.Binary.Encoding as Ledger import qualified Data.ByteString.Lazy as BL -- | Serialized version of a transaction. Deserializing should at least expose @@ -78,44 +88,39 @@ renderTxToCBOR = applyEraFun serializeTx -- | CBOR serialization of a tx in any era. serializeTx :: EraFun Tx (K BL.ByteString) serializeTx = EraFun - { byronFun = f - , shelleyFun = f - , allegraFun = f - , maryFun = f - , alonzoFun = f - , babbageFun = f - , conwayFun = f + { byronFun = f byronProtVer + , shelleyFun = f (eraProtVerLow @StandardShelley) + , allegraFun = f (eraProtVerLow @StandardAllegra) + , maryFun = f (eraProtVerLow @StandardMary) + , alonzoFun = f (eraProtVerLow @StandardAlonzo) + , babbageFun = f (eraProtVerLow @StandardBabbage) + , conwayFun = f (eraProtVerLow @StandardConway) } where - f :: ToCBOR (TxT era) => Tx era -> K BL.ByteString era - f = K . toLazyByteString . toCBOR . unTx + f :: EncCBOR (TxT era) => Ledger.Version -> Tx era -> K BL.ByteString era + f protVer = K . Ledger.serialize protVer . unTx -- | Parse CBOR into a transaction in any eras -- , smart application of `deserializeTx`. -parseTxFromCBOR :: TxCBOR -> Either DeserialiseFailure (EraValue Tx) +parseTxFromCBOR :: TxCBOR -> Either DecoderError (EraValue Tx) parseTxFromCBOR = sequenceEraValue . applyEraFun deserializeTx -- | CBOR deserialization of a tx in any era. -deserializeTx :: EraFun (K BL.ByteString) (Either DeserialiseFailure :.: Tx) -deserializeTx = EraFun - { byronFun = deserialize $ const runIdentity - , shelleyFun = deserialize runA - , allegraFun = deserialize runA - , maryFun = deserialize runA - , alonzoFun = deserialize runA - , babbageFun = deserialize runA - , conwayFun = deserialize runA - } - where - deserialize - :: FromCBOR (k (TxT x)) - => (BL.ByteString -> k (TxT x) -> TxT x) - -> K BL.ByteString x - -> (Either DeserialiseFailure :.: Tx) x - deserialize untag (K txCBOR) = Comp $ Tx . untag txCBOR . snd - <$> deserialiseFromBytes fromCBOR txCBOR - runA :: BL.ByteString -> Annotator x -> x - runA txCBOR x = runAnnotator x $ Full txCBOR +deserializeTx :: EraFun (K BL.ByteString) (Either DecoderError :.: Tx) +deserializeTx = + EraFun + { byronFun = \(K txCBOR) -> + Comp $ Tx <$> decodeFull byronProtVer txCBOR + , shelleyFun = decodeTx shelleyProtVer "ShelleyTx" + , allegraFun = decodeTx (eraProtVerLow @StandardAllegra) "AllegraTx" + , maryFun = decodeTx (eraProtVerLow @StandardMary) "MaryTx" + , alonzoFun = decodeTx (eraProtVerLow @StandardAlonzo) "AlonzoTx" + , babbageFun = decodeTx (eraProtVerLow @StandardBabbage) "BabbageTx" + , conwayFun = decodeTx (eraProtVerLow @StandardConway) "ConwayTx" + } + where + decodeTx protVer label (K txCBOR) = + Comp $ Tx <$> decodeFullAnnotator protVer label decCBOR txCBOR -instance FromCBOR a => FromCBOR (Identity a) where - fromCBOR = fmap Identity fromCBOR +roundTripTxCBor :: TxCBOR -> Either DecoderError TxCBOR +roundTripTxCBor = fmap renderTxToCBOR . parseTxFromCBOR diff --git a/lib/wallet/src/Cardano/Wallet/Read/Tx/Certificates.hs b/lib/wallet/src/Cardano/Wallet/Read/Tx/Certificates.hs index 6278b1c56de..06a7c2cd977 100644 --- a/lib/wallet/src/Cardano/Wallet/Read/Tx/Certificates.hs +++ b/lib/wallet/src/Cardano/Wallet/Read/Tx/Certificates.hs @@ -31,20 +31,24 @@ import Cardano.Api , MaryEra , ShelleyEra ) +import Cardano.Ledger.Conway.Core + ( conwayCertsTxBodyL ) +import Cardano.Ledger.Conway.Delegation.Certificates + ( ConwayDCert ) import Cardano.Ledger.Core ( bodyTxL ) import Cardano.Ledger.Crypto ( StandardCrypto ) import Cardano.Ledger.Shelley.TxBody ( DCert, certsTxBodyL ) -import Cardano.Wallet.Read.Eras +import Cardano.Wallet.Read.Eras.EraFun ( EraFun (..) ) import Cardano.Wallet.Read.Tx ( Tx (..) ) import Cardano.Wallet.Read.Tx.Eras ( onTx ) import Control.Lens - ( (^.) ) + ( view ) import Data.Sequence.Strict ( StrictSeq ) @@ -55,7 +59,7 @@ type family CertificatesType era where CertificatesType MaryEra = StrictSeq (DCert StandardCrypto) CertificatesType AlonzoEra = StrictSeq (DCert StandardCrypto) CertificatesType BabbageEra = StrictSeq (DCert StandardCrypto) - CertificatesType ConwayEra = StrictSeq (DCert StandardCrypto) + CertificatesType ConwayEra = StrictSeq (ConwayDCert StandardCrypto) newtype Certificates era = Certificates (CertificatesType era) @@ -64,15 +68,15 @@ deriving instance Eq (CertificatesType era) => Eq (Certificates era) -- | Extract certificates from a 'Tx' in any era. getEraCertificates :: EraFun Tx Certificates -getEraCertificates = EraFun - { byronFun = \_ -> Certificates () - , shelleyFun = shellyCertificates - , allegraFun = shellyCertificates - , maryFun = shellyCertificates - , alonzoFun = shellyCertificates - , babbageFun = shellyCertificates - , conwayFun = shellyCertificates - } - where - shellyCertificates = onTx - $ \tx -> Certificates $ tx ^. bodyTxL . certsTxBodyL +getEraCertificates = + EraFun + { byronFun = \_ -> Certificates () + , shelleyFun = certificates + , allegraFun = certificates + , maryFun = certificates + , alonzoFun = certificates + , babbageFun = certificates + , conwayFun = onTx $ Certificates . view (bodyTxL . conwayCertsTxBodyL) + } + where + certificates = onTx $ Certificates . view (bodyTxL . certsTxBodyL) diff --git a/lib/wallet/src/Cardano/Wallet/Read/Tx/Metadata.hs b/lib/wallet/src/Cardano/Wallet/Read/Tx/Metadata.hs index 89f3f890498..0c451ae3b97 100644 --- a/lib/wallet/src/Cardano/Wallet/Read/Tx/Metadata.hs +++ b/lib/wallet/src/Cardano/Wallet/Read/Tx/Metadata.hs @@ -29,17 +29,22 @@ import Cardano.Api , MaryEra , ShelleyEra ) -import Cardano.Wallet.Read.Eras - ( EraFun (..) ) -import Control.Lens - ( (^.) ) - +import Cardano.Ledger.Allegra.TxAuxData + ( AllegraTxAuxData ) +import Cardano.Ledger.Alonzo.TxAuxData + ( AlonzoTxAuxData ) import Cardano.Ledger.Core - ( AuxiliaryData, auxDataTxL ) + ( auxDataTxL ) +import Cardano.Ledger.Shelley.TxAuxData + ( ShelleyTxAuxData ) +import Cardano.Wallet.Read.Eras.EraFun + ( EraFun (..) ) import Cardano.Wallet.Read.Tx ( Tx (..) ) import Cardano.Wallet.Read.Tx.Eras ( onTx ) +import Control.Lens + ( view ) import Data.Maybe.Strict ( StrictMaybe ) import Ouroboros.Consensus.Shelley.Eras @@ -53,12 +58,12 @@ import Ouroboros.Consensus.Shelley.Eras type family MetadataType era where MetadataType ByronEra = () - MetadataType ShelleyEra = StrictMaybe (AuxiliaryData StandardShelley) - MetadataType AllegraEra = StrictMaybe (AuxiliaryData StandardAllegra) - MetadataType MaryEra = StrictMaybe (AuxiliaryData StandardMary) - MetadataType AlonzoEra = StrictMaybe (AuxiliaryData StandardAlonzo) - MetadataType BabbageEra = StrictMaybe (AuxiliaryData StandardBabbage) - MetadataType ConwayEra = StrictMaybe (AuxiliaryData StandardConway) + MetadataType ShelleyEra = StrictMaybe (ShelleyTxAuxData StandardShelley) + MetadataType AllegraEra = StrictMaybe (AllegraTxAuxData StandardAllegra) + MetadataType MaryEra = StrictMaybe (AllegraTxAuxData StandardMary) + MetadataType AlonzoEra = StrictMaybe (AlonzoTxAuxData StandardAlonzo) + MetadataType BabbageEra = StrictMaybe (AlonzoTxAuxData StandardBabbage) + MetadataType ConwayEra = StrictMaybe (AlonzoTxAuxData StandardConway) newtype Metadata era = Metadata (MetadataType era) @@ -69,12 +74,12 @@ getEraMetadata :: EraFun Tx Metadata getEraMetadata = EraFun { byronFun = \_ -> Metadata () - , shelleyFun = shelleyMetadata - , allegraFun = shelleyMetadata - , maryFun = shelleyMetadata - , alonzoFun = shelleyMetadata - , babbageFun = shelleyMetadata - , conwayFun = shelleyMetadata + , shelleyFun = metadata + , allegraFun = metadata + , maryFun = metadata + , alonzoFun = metadata + , babbageFun = metadata + , conwayFun = metadata } where - shelleyMetadata = onTx $ \tx -> Metadata (tx ^. auxDataTxL) + metadata = onTx $ Metadata . view auxDataTxL diff --git a/lib/wallet/src/Cardano/Wallet/Read/Tx/Mint.hs b/lib/wallet/src/Cardano/Wallet/Read/Tx/Mint.hs index 82e82e49d99..87616d32e92 100644 --- a/lib/wallet/src/Cardano/Wallet/Read/Tx/Mint.hs +++ b/lib/wallet/src/Cardano/Wallet/Read/Tx/Mint.hs @@ -1,6 +1,8 @@ {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE NoMonomorphismRestriction #-} +{-# LANGUAGE RankNTypes #-} +{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-} @@ -29,32 +31,31 @@ import Cardano.Api , MaryEra , ShelleyEra ) -import Cardano.Ledger.Alonzo.TxBody - ( mintTxBodyL ) import Cardano.Ledger.Core ( bodyTxL ) import Cardano.Ledger.Crypto ( StandardCrypto ) -import Cardano.Wallet.Read.Eras +import Cardano.Ledger.Mary.Core + ( mintTxBodyL ) +import Cardano.Ledger.Mary.Value + ( MultiAsset ) +import Cardano.Wallet.Read.Eras.EraFun ( EraFun (..) ) import Cardano.Wallet.Read.Tx ( Tx (..) ) import Cardano.Wallet.Read.Tx.Eras ( onTx ) import Control.Lens - ( (^.) ) - -import qualified Cardano.Ledger.Mary.Value as Mary -import qualified Cardano.Ledger.Shelley.API as SH + ( view ) type family MintType era where MintType ByronEra = () MintType ShelleyEra = () - MintType AllegraEra = SH.Coin - MintType MaryEra = Mary.MaryValue StandardCrypto - MintType AlonzoEra = Mary.MaryValue StandardCrypto - MintType BabbageEra = Mary.MaryValue StandardCrypto - MintType ConwayEra = Mary.MaryValue StandardCrypto + MintType AllegraEra = () + MintType MaryEra = MultiAsset StandardCrypto + MintType AlonzoEra = MultiAsset StandardCrypto + MintType BabbageEra = MultiAsset StandardCrypto + MintType ConwayEra = MultiAsset StandardCrypto newtype Mint era = Mint (MintType era) @@ -66,11 +67,11 @@ getEraMint = EraFun { byronFun = \_ -> Mint () , shelleyFun = \_ -> Mint () - , allegraFun = allegraMint - , maryFun = allegraMint - , alonzoFun = allegraMint - , babbageFun = allegraMint - , conwayFun = allegraMint + , allegraFun = \_ -> Mint () + , maryFun = mint + , alonzoFun = mint + , babbageFun = mint + , conwayFun = mint } where - allegraMint = onTx $ \tx -> Mint $ tx ^. bodyTxL . mintTxBodyL + mint = onTx $ Mint . view (bodyTxL . mintTxBodyL) diff --git a/lib/wallet/src/Cardano/Wallet/Read/Tx/Outputs.hs b/lib/wallet/src/Cardano/Wallet/Read/Tx/Outputs.hs index bc23945a3b7..9a7bbb0490f 100644 --- a/lib/wallet/src/Cardano/Wallet/Read/Tx/Outputs.hs +++ b/lib/wallet/src/Cardano/Wallet/Read/Tx/Outputs.hs @@ -30,50 +30,45 @@ import Cardano.Api , MaryEra , ShelleyEra ) +import Cardano.Ledger.Alonzo.TxOut + ( AlonzoTxOut ) +import Cardano.Ledger.Babbage.TxOut + ( BabbageTxOut ) import Cardano.Ledger.Core ( bodyTxL, outputsTxBodyL ) -import Cardano.Ledger.Crypto - ( StandardCrypto ) -import Cardano.Wallet.Read.Eras +import Cardano.Ledger.Shelley.TxOut + ( ShelleyTxOut ) +import Cardano.Wallet.Read.Eras.EraFun ( EraFun (..) ) import Cardano.Wallet.Read.Tx ( Tx (..) ) import Cardano.Wallet.Read.Tx.Eras ( onTx ) import Control.Lens - ( (^.) ) + ( view ) import Data.List.NonEmpty ( NonEmpty ) import Data.Sequence.Strict ( StrictSeq ) +import Ouroboros.Consensus.Cardano.Block + ( StandardAllegra + , StandardAlonzo + , StandardBabbage + , StandardConway + , StandardMary + , StandardShelley + ) import qualified Cardano.Chain.UTxO as BY -import qualified Cardano.Ledger.Alonzo as AL -import qualified Cardano.Ledger.Babbage as BA -import qualified Cardano.Ledger.Conway as Conway -import qualified Cardano.Ledger.Shelley as SH -import qualified Cardano.Ledger.ShelleyMA as SMA type family OutputsType era where OutputsType ByronEra = NonEmpty BY.TxOut - OutputsType ShelleyEra - = StrictSeq - (SH.ShelleyTxOut (SH.ShelleyEra StandardCrypto)) - OutputsType AllegraEra - = StrictSeq - (SH.ShelleyTxOut (SMA.ShelleyMAEra 'SMA.Allegra StandardCrypto)) - OutputsType MaryEra - = StrictSeq - (SH.ShelleyTxOut (SMA.ShelleyMAEra 'SMA.Mary StandardCrypto)) - OutputsType AlonzoEra - = StrictSeq - (AL.AlonzoTxOut (AL.AlonzoEra StandardCrypto)) - OutputsType BabbageEra - = StrictSeq - (BA.BabbageTxOut (BA.BabbageEra StandardCrypto)) - OutputsType ConwayEra - = StrictSeq - (BA.BabbageTxOut (Conway.ConwayEra StandardCrypto)) + OutputsType ShelleyEra = StrictSeq (ShelleyTxOut StandardShelley) + OutputsType AllegraEra = StrictSeq (ShelleyTxOut StandardAllegra) + OutputsType MaryEra = StrictSeq (ShelleyTxOut StandardMary) + OutputsType AlonzoEra = StrictSeq (AlonzoTxOut StandardAlonzo) + OutputsType BabbageEra = StrictSeq (BabbageTxOut StandardBabbage) + OutputsType ConwayEra = StrictSeq (BabbageTxOut StandardConway) newtype Outputs era = Outputs (OutputsType era) @@ -83,14 +78,13 @@ deriving instance Eq (OutputsType era) => Eq (Outputs era) getEraOutputs :: EraFun Tx Outputs getEraOutputs = EraFun - { byronFun = onTx $ \tx -> Outputs $ BY.txOutputs (BY.taTx tx) - , shelleyFun = shelleyOutputs - , allegraFun = shelleyOutputs - , maryFun = shelleyOutputs - , alonzoFun = shelleyOutputs - , babbageFun = shelleyOutputs - , conwayFun = shelleyOutputs + { byronFun = onTx $ Outputs . BY.txOutputs . BY.taTx + , shelleyFun = outputs + , allegraFun = outputs + , maryFun = outputs + , alonzoFun = outputs + , babbageFun = outputs + , conwayFun = outputs } where - shelleyOutputs = - onTx $ \tx -> Outputs $ tx ^. bodyTxL . outputsTxBodyL + outputs = onTx $ Outputs . view (bodyTxL . outputsTxBodyL) diff --git a/lib/wallet/src/Cardano/Wallet/Read/Tx/Validity.hs b/lib/wallet/src/Cardano/Wallet/Read/Tx/Validity.hs index c35f41d052e..a51c0449eef 100644 --- a/lib/wallet/src/Cardano/Wallet/Read/Tx/Validity.hs +++ b/lib/wallet/src/Cardano/Wallet/Read/Tx/Validity.hs @@ -30,14 +30,14 @@ import Cardano.Api , MaryEra , ShelleyEra ) +import Cardano.Ledger.Allegra.Scripts + ( ValidityInterval ) +import Cardano.Ledger.Allegra.TxBody + ( vldtTxBodyL ) import Cardano.Ledger.Core ( bodyTxL ) import Cardano.Ledger.Shelley.TxBody ( ttlTxBodyL ) -import Cardano.Ledger.ShelleyMA.Timelocks - ( ValidityInterval ) -import Cardano.Ledger.ShelleyMA.TxBody - ( vldtTxBodyL ) import Cardano.Ledger.Slot ( SlotNo ) import Cardano.Wallet.Read.Eras diff --git a/lib/wallet/src/Cardano/Wallet/Read/Tx/Withdrawals.hs b/lib/wallet/src/Cardano/Wallet/Read/Tx/Withdrawals.hs index 698d708b1e5..e8b92771ecf 100644 --- a/lib/wallet/src/Cardano/Wallet/Read/Tx/Withdrawals.hs +++ b/lib/wallet/src/Cardano/Wallet/Read/Tx/Withdrawals.hs @@ -16,6 +16,8 @@ module Cardano.Wallet.Read.Tx.Withdrawals ( WithdrawalsType , Withdrawals (..) , getEraWithdrawals + , RewardWithdrawals + , shelleyWithdrawals ) where import Prelude @@ -29,33 +31,40 @@ import Cardano.Api , MaryEra , ShelleyEra ) +import Cardano.Ledger.Address + ( RewardAcnt, unWithdrawals ) +import Cardano.Ledger.Coin + ( Coin ) import Cardano.Ledger.Core - ( bodyTxL ) + ( bodyTxL, withdrawalsTxBodyL ) import Cardano.Ledger.Crypto ( StandardCrypto ) -import Cardano.Ledger.Shelley.TxBody - ( wdrlsTxBodyL ) -import Cardano.Wallet.Read.Eras +import Cardano.Wallet.Read.Eras.EraFun ( EraFun (..) ) import Cardano.Wallet.Read.Tx ( Tx (..) ) import Cardano.Wallet.Read.Tx.Eras ( onTx ) import Control.Lens - ( (^.) ) + ( view ) +import Data.Map + ( Map ) -import qualified Cardano.Ledger.Shelley.API as SH +import qualified Cardano.Ledger.Api as Ledger type family WithdrawalsType era where WithdrawalsType ByronEra = () - WithdrawalsType ShelleyEra = SH.Wdrl StandardCrypto - WithdrawalsType AllegraEra = SH.Wdrl StandardCrypto - WithdrawalsType MaryEra = SH.Wdrl StandardCrypto - WithdrawalsType AlonzoEra = SH.Wdrl StandardCrypto - WithdrawalsType BabbageEra = SH.Wdrl StandardCrypto - WithdrawalsType ConwayEra = SH.Wdrl StandardCrypto + WithdrawalsType ShelleyEra = RewardWithdrawals + WithdrawalsType AllegraEra = RewardWithdrawals + WithdrawalsType MaryEra = RewardWithdrawals + WithdrawalsType AlonzoEra = RewardWithdrawals + WithdrawalsType BabbageEra = RewardWithdrawals + WithdrawalsType ConwayEra = RewardWithdrawals -newtype Withdrawals era = Withdrawals (WithdrawalsType era) +type RewardWithdrawals = Map (RewardAcnt StandardCrypto) Coin + +newtype Withdrawals era + = Withdrawals { withdrawalsAsMap :: WithdrawalsType era } deriving instance Show (WithdrawalsType era) => Show (Withdrawals era) deriving instance Eq (WithdrawalsType era) => Eq (Withdrawals era) @@ -65,13 +74,18 @@ getEraWithdrawals :: EraFun Tx Withdrawals getEraWithdrawals = EraFun { byronFun = \_ -> Withdrawals () - , shelleyFun = shelleyWithdrawals - , allegraFun = shelleyWithdrawals - , maryFun = shelleyWithdrawals - , alonzoFun = shelleyWithdrawals - , babbageFun = shelleyWithdrawals - , conwayFun = shelleyWithdrawals + , shelleyFun = withdrawals + , allegraFun = withdrawals + , maryFun = withdrawals + , alonzoFun = withdrawals + , babbageFun = withdrawals + , conwayFun = withdrawals } where - shelleyWithdrawals = onTx $ - \tx -> Withdrawals $ tx ^. bodyTxL . wdrlsTxBodyL + withdrawals = onTx $ Withdrawals . shelleyWithdrawals + +shelleyWithdrawals + :: Ledger.EraTx era + => Ledger.Tx era + -> Map (RewardAcnt (Ledger.EraCrypto era)) Coin +shelleyWithdrawals = unWithdrawals . view (bodyTxL . withdrawalsTxBodyL) diff --git a/lib/wallet/src/Cardano/Wallet/Read/Tx/Witnesses.hs b/lib/wallet/src/Cardano/Wallet/Read/Tx/Witnesses.hs index 26998a21e48..7e7200c8919 100644 --- a/lib/wallet/src/Cardano/Wallet/Read/Tx/Witnesses.hs +++ b/lib/wallet/src/Cardano/Wallet/Read/Tx/Witnesses.hs @@ -29,38 +29,37 @@ import Cardano.Api , MaryEra , ShelleyEra ) +import Cardano.Ledger.Alonzo.TxWits + ( AlonzoTxWits ) import Cardano.Ledger.Core ( witsTxL ) -import Cardano.Ledger.Crypto - ( StandardCrypto ) -import Cardano.Ledger.Shelley.Tx - ( WitnessSetHKD ) -import Cardano.Ledger.ShelleyMA - ( MaryOrAllegra (..), ShelleyMAEra ) -import Cardano.Wallet.Read.Eras +import Cardano.Ledger.Shelley.TxWits + ( ShelleyTxWits ) +import Cardano.Wallet.Read.Eras.EraFun ( EraFun (..) ) import Cardano.Wallet.Read.Tx ( Tx (..) ) import Cardano.Wallet.Read.Tx.Eras ( onTx ) import Control.Lens - ( (^.) ) -import Data.Functor.Identity - ( Identity ) + ( view ) import Ouroboros.Consensus.Shelley.Eras - ( StandardAlonzo, StandardBabbage, StandardConway ) - -import qualified Cardano.Ledger.Alonzo.TxWitness as AL + ( StandardAllegra + , StandardAlonzo + , StandardBabbage + , StandardConway + , StandardMary + , StandardShelley + ) type family WitnessesType era where WitnessesType ByronEra = () - WitnessesType ShelleyEra = () - WitnessesType AllegraEra = () - WitnessesType MaryEra = WitnessSetHKD Identity - (ShelleyMAEra 'Mary StandardCrypto) - WitnessesType AlonzoEra = AL.TxWitness StandardAlonzo - WitnessesType BabbageEra = AL.TxWitness StandardBabbage - WitnessesType ConwayEra = AL.TxWitness StandardConway + WitnessesType ShelleyEra = ShelleyTxWits StandardShelley + WitnessesType AllegraEra = ShelleyTxWits StandardAllegra + WitnessesType MaryEra = ShelleyTxWits StandardMary + WitnessesType AlonzoEra = AlonzoTxWits StandardAlonzo + WitnessesType BabbageEra = AlonzoTxWits StandardBabbage + WitnessesType ConwayEra = AlonzoTxWits StandardConway newtype Witnesses era = Witnesses (WitnessesType era) @@ -71,12 +70,12 @@ getEraWitnesses :: EraFun Tx Witnesses getEraWitnesses = EraFun { byronFun = \_ -> Witnesses () - , shelleyFun = \_ -> Witnesses () - , allegraFun = \_ -> Witnesses () - , maryFun = maryWitnesses - , alonzoFun = maryWitnesses - , babbageFun = maryWitnesses - , conwayFun = maryWitnesses + , shelleyFun = witnesses + , allegraFun = witnesses + , maryFun = witnesses + , alonzoFun = witnesses + , babbageFun = witnesses + , conwayFun = witnesses } where - maryWitnesses = onTx $ \tx -> Witnesses $ tx ^. witsTxL + witnesses = onTx $ Witnesses . view witsTxL diff --git a/lib/wallet/src/Cardano/Wallet/Shelley/Compatibility.hs b/lib/wallet/src/Cardano/Wallet/Shelley/Compatibility.hs index 5b3ee6771eb..af19f521ea9 100644 --- a/lib/wallet/src/Cardano/Wallet/Shelley/Compatibility.hs +++ b/lib/wallet/src/Cardano/Wallet/Shelley/Compatibility.hs @@ -75,7 +75,6 @@ module Cardano.Wallet.Shelley.Compatibility , toLedgerStakeCredential , fromStakeCredential , toShelleyCoin - , fromShelleyCoin , toHDPayloadAddress , toCardanoStakeCredential , toCardanoValue @@ -154,7 +153,6 @@ module Cardano.Wallet.Shelley.Compatibility , invertUnitInterval , interval0 , interval1 - , getScriptIntegrityHash , numberOfTransactionsInBlock , encodeAddress , decodeAddress @@ -182,6 +180,7 @@ import Cardano.Api , ConsensusModeParams (CardanoModeParams) , ConwayEra , EraInMode (..) + , File (..) , InAnyCardanoEra (..) , IsCardanoEra (..) , LocalNodeConnectInfo (LocalNodeConnectInfo) @@ -197,8 +196,6 @@ import Cardano.Api.Shelley , ShelleyBasedEra (..) , ShelleyGenesis (..) ) -import Cardano.Binary - ( serialize' ) import Cardano.Chain.Block ( ABlockOrBoundary (ABOBBlock, ABOBBoundary), blockTxPayload ) import Cardano.Chain.UTxO @@ -207,12 +204,29 @@ import Cardano.Crypto.Hash.Class ( Hash (UnsafeHash), hashToBytes ) import Cardano.Launcher.Node ( CardanoNodeConn, nodeSocketFile ) +import Cardano.Ledger.Api + ( ppCollateralPercentageL + , ppDL + , ppKeyDepositL + , ppMaxCollateralInputsL + , ppMaxTxExUnitsL + , ppMaxTxSizeL + , ppMaxValSizeL + , ppMinFeeAL + , ppMinFeeBL + , ppNOptL + , ppPricesL + ) import Cardano.Ledger.BaseTypes ( strictMaybeToMaybe, urlToText ) +import Cardano.Ledger.Binary + ( EncCBORGroup, serialize', shelleyProtVer ) import Cardano.Ledger.Era - ( Era (..) ) -import Cardano.Ledger.Serialization - ( ToCBORGroup ) + ( Era (..), TxSeq ) +import Cardano.Ledger.PoolParams + ( PoolMetadata (..), PoolParams (..) ) +import Cardano.Ledger.Shelley.Genesis + ( fromNominalDiffTimeMicro ) import Cardano.Pool.Metadata.Types ( StakePoolMetadataHash (..), StakePoolMetadataUrl (..) ) import Cardano.Pool.Types @@ -245,8 +259,6 @@ import Cardano.Wallet.Read.Primitive.Tx.Babbage ( fromBabbageTx ) import Cardano.Wallet.Read.Primitive.Tx.Conway ( fromConwayTx ) -import Cardano.Wallet.Read.Primitive.Tx.Features.Fee - ( fromShelleyCoin ) import Cardano.Wallet.Read.Primitive.Tx.Features.Inputs ( fromShelleyTxIn ) import Cardano.Wallet.Read.Primitive.Tx.Features.Outputs @@ -269,16 +281,18 @@ import Control.Applicative ( Const (..), (<|>) ) import Control.Arrow ( left ) +import Control.Lens + ( view, (&), (^.) ) import Control.Monad ( when, (>=>) ) +import Control.Monad.Fail.Extended + ( reportFailure ) import Crypto.Hash.Utils ( blake2b224 ) import Data.Array ( Array ) import Data.Bifunctor ( bimap ) -import Data.Binary.Get - ( runGetOrFail ) import Data.Binary.Put ( putByteString, putWord8, runPut ) import Data.Bits @@ -304,21 +318,17 @@ import Data.Map.Strict import Data.Maybe ( fromMaybe, isJust, mapMaybe ) import Data.Quantity - ( Percentage, Quantity (..), mkPercentage ) + ( Percentage, Quantity (..), clipToPercentage, mkPercentage ) import Data.Text ( Text ) import Data.Text.Class ( TextDecodingError (..) ) import Data.Type.Equality ( (:~:) (..), testEquality ) -import Data.Typeable - ( Typeable ) import Data.Word ( Word16, Word32, Word8 ) import Fmt ( Buildable (..), Builder, (+|), (+||), (||+) ) -import GHC.Records - ( HasField (..) ) import GHC.Stack ( HasCallStack ) import Numeric.Natural @@ -360,41 +370,32 @@ import Ouroboros.Network.Point import qualified Cardano.Address as CA import qualified Cardano.Address.Style.Shelley as CA import qualified Cardano.Api as Cardano -import qualified Cardano.Api.Byron as Cardano - ( Tx (ByronTx) ) import qualified Cardano.Api.Shelley as Cardano import qualified Cardano.Byron.Codec.Cbor as CBOR import qualified Cardano.Chain.Common as Byron import qualified Cardano.Crypto.Hash as Crypto import qualified Cardano.Ledger.Address as SL +import qualified Cardano.Ledger.Allegra as Allegra import qualified Cardano.Ledger.Alonzo as Alonzo import qualified Cardano.Ledger.Alonzo.Language as Alonzo -import qualified Cardano.Ledger.Alonzo.PParams as Alonzo import qualified Cardano.Ledger.Alonzo.Scripts as Alonzo import qualified Cardano.Ledger.Alonzo.Tx as Alonzo import qualified Cardano.Ledger.Alonzo.TxSeq as Alonzo +import qualified Cardano.Ledger.Api as Ledger import qualified Cardano.Ledger.Babbage as Babbage -import qualified Cardano.Ledger.Babbage.PParams as Babbage -import qualified Cardano.Ledger.Babbage.Tx as Babbage hiding - ( ScriptIntegrityHash ) -import qualified Cardano.Ledger.Babbage.TxBody as Babbage import qualified Cardano.Ledger.BaseTypes as SL +import qualified Cardano.Ledger.Coin as Ledger import qualified Cardano.Ledger.Conway as Conway -import qualified Cardano.Ledger.Conway.PParams as Conway import qualified Cardano.Ledger.Credential as SL import qualified Cardano.Ledger.Crypto as SL -import qualified Cardano.Ledger.Era as Ledger.Era import qualified Cardano.Ledger.Keys as Ledger import qualified Cardano.Ledger.Mary as Mary import qualified Cardano.Ledger.Mary.Value as SL import qualified Cardano.Ledger.SafeHash as SafeHash -import qualified Cardano.Ledger.Shelley as SL hiding - ( Value ) import qualified Cardano.Ledger.Shelley as Shelley import qualified Cardano.Ledger.Shelley.API as SL import qualified Cardano.Ledger.Shelley.API as SLAPI import qualified Cardano.Ledger.Shelley.BlockChain as SL -import qualified Cardano.Ledger.ShelleyMA as MA import qualified Cardano.Protocol.TPraos.BHeader as SL import qualified Cardano.Wallet.Primitive.Types as W import qualified Cardano.Wallet.Primitive.Types.Address as W @@ -416,6 +417,7 @@ import qualified Cardano.Wallet.Primitive.Types.Tx.TxIn as W import qualified Cardano.Wallet.Primitive.Types.Tx.TxOut as W ( TxOut (TxOut) ) import qualified Cardano.Wallet.Primitive.Types.UTxO as W +import qualified Cardano.Wallet.Shelley.Compatibility.Ledger as Ledger import qualified Cardano.Wallet.Write.ProtocolParameters as Write import qualified Cardano.Wallet.Write.Tx as Write import qualified Codec.Binary.Bech32 as Bech32 @@ -564,19 +566,19 @@ toConwayBlockHeader genesisHash blk = ShelleyBlock (SL.Block header _txSeq) _headerHash = blk getProducer - :: (Era era, ToCBORGroup (Ledger.Era.TxSeq era)) + :: (Era era, EncCBORGroup (TxSeq era)) => ShelleyBlock (Consensus.TPraos StandardCrypto) era -> PoolId getProducer (ShelleyBlock (SL.Block (SL.BHeader header _) _) _) = fromPoolKeyHash $ SL.hashKey (SL.bheaderVk header) getBabbageProducer - :: (Era era, ToCBORGroup (Ledger.Era.TxSeq era)) + :: (Era era, EncCBORGroup (TxSeq era)) => ShelleyBlock (Consensus.Praos StandardCrypto) era -> PoolId getBabbageProducer (ShelleyBlock (SL.Block (Consensus.Header header _) _) _) = fromPoolKeyHash $ SL.hashKey (Consensus.hbVk header) getConwayProducer - :: (Era era, ToCBORGroup (Ledger.Era.TxSeq era)) + :: (Era era, EncCBORGroup (TxSeq era)) => ShelleyBlock (Consensus.Praos StandardCrypto) era -> PoolId getConwayProducer (ShelleyBlock (SL.Block (Consensus.Header header _) _) _) = fromPoolKeyHash $ SL.hashKey (Consensus.hbVk header) @@ -679,7 +681,7 @@ fromShelleyBlock :: W.GenesisParameters -> ShelleyBlock (Consensus.TPraos StandardCrypto) - (SL.ShelleyEra StandardCrypto) + (Shelley.ShelleyEra StandardCrypto) -> (W.Block, [PoolCertificate]) fromShelleyBlock gp blk@(ShelleyBlock (SL.Block _ (SL.ShelleyTxSeq txs')) _) = let @@ -698,7 +700,7 @@ fromAllegraBlock :: W.GenesisParameters -> ShelleyBlock (Consensus.TPraos StandardCrypto) - (MA.ShelleyMAEra 'MA.Allegra StandardCrypto) + (Allegra.AllegraEra StandardCrypto) -> (W.Block, [PoolCertificate]) fromAllegraBlock gp blk@(ShelleyBlock (SL.Block _ (SL.ShelleyTxSeq txs')) _) = let @@ -717,7 +719,7 @@ fromMaryBlock :: W.GenesisParameters -> ShelleyBlock (Consensus.TPraos StandardCrypto) - (MA.ShelleyMAEra 'MA.Mary StandardCrypto) + (Mary.MaryEra StandardCrypto) -> (W.Block, [PoolCertificate]) fromMaryBlock gp blk@(ShelleyBlock (SL.Block _ (SL.ShelleyTxSeq txs')) _) = let @@ -874,12 +876,11 @@ fromMaxSize = Quantity . fromIntegral fromShelleyPParams :: W.EraInfo Bound - -> Shelley.ShelleyPParams StandardShelley + -> Ledger.PParams StandardShelley -> W.ProtocolParameters fromShelleyPParams eraInfo pp = W.ProtocolParameters - { decentralizationLevel = - decentralizationLevelFromPParams pp + { decentralizationLevel = decentralizationLevelFromPParams pp , txParameters = txParametersFromPParams maryTokenBundleMaxSize (W.ExecutionUnits 0 0) pp @@ -898,12 +899,11 @@ fromShelleyPParams eraInfo pp = fromAllegraPParams :: W.EraInfo Bound - -> Shelley.ShelleyPParams StandardAllegra + -> Ledger.PParams StandardAllegra -> W.ProtocolParameters fromAllegraPParams eraInfo pp = W.ProtocolParameters - { decentralizationLevel = - decentralizationLevelFromPParams pp + { decentralizationLevel = decentralizationLevelFromPParams pp , txParameters = txParametersFromPParams maryTokenBundleMaxSize (W.ExecutionUnits 0 0) pp @@ -922,12 +922,11 @@ fromAllegraPParams eraInfo pp = fromMaryPParams :: W.EraInfo Bound - -> Mary.ShelleyPParams StandardMary + -> Ledger.PParams StandardMary -> W.ProtocolParameters fromMaryPParams eraInfo pp = W.ProtocolParameters - { decentralizationLevel = - decentralizationLevelFromPParams pp + { decentralizationLevel = decentralizationLevelFromPParams pp , txParameters = txParametersFromPParams maryTokenBundleMaxSize (W.ExecutionUnits 0 0) pp @@ -951,15 +950,14 @@ fromBoundToEpochNo (Bound _relTime _slotNo (EpochNo e)) = fromAlonzoPParams :: HasCallStack => W.EraInfo Bound - -> Alonzo.AlonzoPParams StandardAlonzo + -> Ledger.PParams StandardAlonzo -> W.ProtocolParameters fromAlonzoPParams eraInfo pp = W.ProtocolParameters - { decentralizationLevel = - decentralizationLevelFromPParams pp + { decentralizationLevel = decentralizationLevelFromPParams pp , txParameters = txParametersFromPParams - (W.TokenBundleMaxSize $ W.TxSize $ Alonzo._maxValSize pp) - (fromLedgerExUnits (getField @"_maxTxExUnits" pp)) + (W.TokenBundleMaxSize $ W.TxSize $ pp ^. ppMaxValSizeL) + (fromLedgerExUnits (pp ^. ppMaxTxExUnitsL)) pp , desiredNumberOfStakePools = desiredNumberOfStakePoolsFromPParams pp @@ -967,10 +965,10 @@ fromAlonzoPParams eraInfo pp = minimumUTxOForShelleyBasedEra ShelleyBasedEraAlonzo pp , stakeKeyDeposit = stakeKeyDepositFromPParams pp , eras = fromBoundToEpochNo <$> eraInfo - , maximumCollateralInputCount = unsafeIntToWord $ - Alonzo._maxCollateralInputs pp + , maximumCollateralInputCount = + unsafeIntToWord $ pp ^. ppMaxCollateralInputsL , minimumCollateralPercentage = - Alonzo._collateralPercentage pp + pp ^. ppCollateralPercentageL , executionUnitPrices = Just $ executionUnitPricesFromPParams pp , currentLedgerProtocolParameters = Write.InNonRecentEraAlonzo @@ -979,15 +977,15 @@ fromAlonzoPParams eraInfo pp = fromBabbagePParams :: HasCallStack => W.EraInfo Bound - -> Babbage.BabbagePParams StandardBabbage + -> Ledger.PParams StandardBabbage -> W.ProtocolParameters fromBabbagePParams eraInfo pp = W.ProtocolParameters { decentralizationLevel = - decentralizationLevelFromPParams pp + W.fromFederationPercentage $ clipToPercentage 0 , txParameters = txParametersFromPParams - (W.TokenBundleMaxSize $ W.TxSize $ Babbage._maxValSize pp) - (fromLedgerExUnits (getField @"_maxTxExUnits" pp)) + (W.TokenBundleMaxSize $ W.TxSize $ pp ^. ppMaxValSizeL) + (fromLedgerExUnits (pp ^. ppMaxTxExUnitsL)) pp , desiredNumberOfStakePools = desiredNumberOfStakePoolsFromPParams pp @@ -995,10 +993,10 @@ fromBabbagePParams eraInfo pp = minimumUTxOForShelleyBasedEra ShelleyBasedEraBabbage pp , stakeKeyDeposit = stakeKeyDepositFromPParams pp , eras = fromBoundToEpochNo <$> eraInfo - , maximumCollateralInputCount = unsafeIntToWord $ - Babbage._maxCollateralInputs pp + , maximumCollateralInputCount = + unsafeIntToWord $ pp ^. ppMaxCollateralInputsL , minimumCollateralPercentage = - Babbage._collateralPercentage pp + pp ^. ppCollateralPercentageL , executionUnitPrices = Just $ executionUnitPricesFromPParams pp , currentLedgerProtocolParameters = @@ -1008,22 +1006,25 @@ fromBabbagePParams eraInfo pp = fromConwayPParams :: HasCallStack => W.EraInfo Bound - -> Babbage.BabbagePParams StandardConway + -> Ledger.PParams StandardConway -> W.ProtocolParameters fromConwayPParams eraInfo pp = W.ProtocolParameters - { decentralizationLevel = decentralizationLevelFromPParams pp + { decentralizationLevel = + W.fromFederationPercentage $ clipToPercentage 0 , txParameters = txParametersFromPParams - (W.TokenBundleMaxSize $ W.TxSize $ Conway._maxValSize pp) - (fromLedgerExUnits (getField @"_maxTxExUnits" pp)) + (W.TokenBundleMaxSize $ W.TxSize $ pp ^. ppMaxValSizeL) + (fromLedgerExUnits (pp ^. ppMaxTxExUnitsL)) pp , desiredNumberOfStakePools = desiredNumberOfStakePoolsFromPParams pp , minimumUTxO = minimumUTxOForShelleyBasedEra ShelleyBasedEraConway pp , stakeKeyDeposit = stakeKeyDepositFromPParams pp , eras = fromBoundToEpochNo <$> eraInfo , maximumCollateralInputCount = - unsafeIntToWord $ Conway._maxCollateralInputs pp - , minimumCollateralPercentage = Conway._collateralPercentage pp + intCastMaybe (pp ^. ppMaxCollateralInputsL) + & fromMaybe + (error "Maximum count of collateral inputs exceeds 2^16") + , minimumCollateralPercentage = pp ^. ppCollateralPercentageL , executionUnitPrices = Just $ executionUnitPricesFromPParams pp , currentLedgerProtocolParameters = Write.InRecentEraConway $ Write.ProtocolParameters pp @@ -1032,20 +1033,17 @@ fromConwayPParams eraInfo pp = -- | Extract the current network decentralization level from the given set of -- protocol parameters. decentralizationLevelFromPParams - :: HasField "_d" pparams SL.UnitInterval - => pparams - -> W.DecentralizationLevel + :: (Ledger.EraPParams era, Ledger.ProtVerAtMost era 6) + => Ledger.PParams era -> W.DecentralizationLevel decentralizationLevelFromPParams pp = - W.fromFederationPercentage $ fromUnitInterval $ getField @"_d" pp + W.fromFederationPercentage $ fromUnitInterval $ pp ^. ppDL executionUnitPricesFromPParams - :: HasField "_prices" pparams Alonzo.Prices - => pparams + :: Ledger.AlonzoEraPParams era + => Ledger.PParams era -> W.ExecutionUnitPrices -executionUnitPricesFromPParams pp = - fromAlonzoPrices prices +executionUnitPricesFromPParams pp = fromAlonzoPrices (pp ^. ppPricesL) where - prices = getField @"_prices" pp fromAlonzoPrices Alonzo.Prices{prMem, prSteps} = W.ExecutionUnitPrices { W.pricePerStep = SL.unboundRational prSteps @@ -1061,9 +1059,7 @@ fromLedgerExUnits (Alonzo.ExUnits mem steps) = , executionMemory = mem } -toLedgerExUnits - :: W.ExecutionUnits - -> Alonzo.ExUnits +toLedgerExUnits :: W.ExecutionUnits -> Alonzo.ExUnits toLedgerExUnits W.ExecutionUnits{executionSteps,executionMemory} = Alonzo.ExUnits { Alonzo.exUnitsMem = executionMemory @@ -1071,25 +1067,23 @@ toLedgerExUnits W.ExecutionUnits{executionSteps,executionMemory} = } txParametersFromPParams - :: HasField "_minfeeA" pparams Natural - => HasField "_minfeeB" pparams Natural - => HasField "_maxTxSize" pparams Natural + :: Ledger.EraPParams era => W.TokenBundleMaxSize -> W.ExecutionUnits - -> pparams + -> Ledger.PParams era -> W.TxParameters txParametersFromPParams maxBundleSize getMaxExecutionUnits pp = W.TxParameters { getFeePolicy = W.LinearFee $ W.LinearFunction - { intercept = naturalToDouble (getField @"_minfeeB" pp) - , slope = naturalToDouble (getField @"_minfeeA" pp) + { intercept = coinToDouble (pp ^. ppMinFeeBL) + , slope = coinToDouble (pp ^. ppMinFeeAL) } - , getTxMaxSize = fromMaxSize $ getField @"_maxTxSize" pp + , getTxMaxSize = fromMaxSize $ pp ^. ppMaxTxSizeL , getTokenBundleMaxSize = maxBundleSize , getMaxExecutionUnits } where - naturalToDouble :: Natural -> Double - naturalToDouble = fromIntegral + coinToDouble :: Ledger.Coin -> Double + coinToDouble = fromRational . Ledger.coinToRational toCostModelsAsArray :: Map Alonzo.Language Alonzo.CostModel @@ -1100,30 +1094,26 @@ toCostModelsAsArray costModels = -------------------------------------------------------------------------------- desiredNumberOfStakePoolsFromPParams - :: HasField "_nOpt" pparams Natural - => pparams - -> Word16 -desiredNumberOfStakePoolsFromPParams pp = fromIntegral $ getField @"_nOpt" pp + :: (HasCallStack, Ledger.EraPParams era) => Ledger.PParams era -> Word16 +desiredNumberOfStakePoolsFromPParams pp = + intCastMaybe (pp ^. ppNOptL) + & fromMaybe (error "Desired number of stake pools exceeds 2^16") stakeKeyDepositFromPParams - :: HasField "_keyDeposit" pparams SLAPI.Coin - => pparams - -> W.Coin -stakeKeyDepositFromPParams = toWalletCoin . getField @"_keyDeposit" - -slottingParametersFromGenesis - :: ShelleyGenesis e - -> W.SlottingParameters + :: Ledger.EraPParams era => Ledger.PParams era -> W.Coin +stakeKeyDepositFromPParams = toWalletCoin . view ppKeyDepositL + +slottingParametersFromGenesis :: ShelleyGenesis e -> W.SlottingParameters slottingParametersFromGenesis g = W.SlottingParameters { getSlotLength = - W.SlotLength $ sgSlotLength g + W.SlotLength . fromNominalDiffTimeMicro $ sgSlotLength g , getEpochLength = - W.EpochLength . fromIntegral . unEpochSize . sgEpochLength $ g + W.EpochLength . fromIntegral . unEpochSize $ sgEpochLength g , getActiveSlotCoefficient = - W.ActiveSlotCoefficient . fromRational . SL.unboundRational . sgActiveSlotsCoeff $ g + W.ActiveSlotCoefficient . fromRational . SL.unboundRational $ sgActiveSlotsCoeff g , getSecurityParameter = - Quantity . fromIntegral . sgSecurityParam $ g + Quantity . fromIntegral $ sgSecurityParam g } -- note: upcasts Word32 -> Word64 @@ -1136,13 +1126,15 @@ localNodeConnectInfo -> NetworkId -> CardanoNodeConn -> LocalNodeConnectInfo CardanoMode -localNodeConnectInfo sp net = LocalNodeConnectInfo params net . nodeSocketFile - where params = CardanoModeParams (getCardanoEpochSlots sp) +localNodeConnectInfo slottingParameters networkId nodeConn = + LocalNodeConnectInfo + (CardanoModeParams (getCardanoEpochSlots slottingParameters)) + networkId + (File (nodeSocketFile nodeConn)) -- | Convert genesis data into blockchain params and an initial set of UTxO fromGenesisData - :: forall e crypto. (e ~ SL.ShelleyEra crypto, crypto ~ StandardCrypto) - => ShelleyGenesis e + :: ShelleyGenesis StandardCrypto -> (W.NetworkParameters, W.Block, [PoolCertificate]) fromGenesisData g = ( W.NetworkParameters @@ -1152,7 +1144,7 @@ fromGenesisData g = } , slottingParameters = slottingParametersFromGenesis g , protocolParameters = - fromShelleyPParams W.emptyEraInfo $ sgProtocolParams g + fromShelleyPParams W.emptyEraInfo (sgProtocolParams g) } , genesisBlockFromTxOuts (ListMap.toList $ sgInitialFunds g) , poolCerts $ sgStaking g @@ -1164,16 +1156,17 @@ fromGenesisData g = -- For now we use a dummy value. dummyGenesisHash = W.Hash . BS.pack $ replicate 32 1 - poolCerts :: SLAPI.ShelleyGenesisStaking (Crypto e) -> [PoolCertificate] + poolCerts :: SLAPI.ShelleyGenesisStaking StandardCrypto -> [PoolCertificate] poolCerts (SLAPI.ShelleyGenesisStaking pools _stake) = do (_, pp) <- ListMap.toList pools pure $ W.Registration $ PoolRegistrationCertificate - { W.poolId = fromPoolKeyHash $ SL._poolId pp - , W.poolOwners = fromOwnerKeyHash <$> Set.toList (SL._poolOwners pp) - , W.poolMargin = fromUnitInterval (SL._poolMargin pp) - , W.poolCost = toWalletCoin (SL._poolCost pp) - , W.poolPledge = toWalletCoin (SL._poolPledge pp) - , W.poolMetadata = fromPoolMetadata <$> strictMaybeToMaybe (SL._poolMD pp) + { W.poolId = fromPoolKeyHash $ ppId pp + , W.poolOwners = fromOwnerKeyHash <$> Set.toList (ppOwners pp) + , W.poolMargin = fromUnitInterval (ppMargin pp) + , W.poolCost = toWalletCoin (ppCost pp) + , W.poolPledge = toWalletCoin (ppPledge pp) + , W.poolMetadata = + fromPoolMetadata <$> strictMaybeToMaybe (ppMetadata pp) } -- | Construct a ("fake") genesis block from genesis transaction outputs. @@ -1181,18 +1174,14 @@ fromGenesisData g = -- The genesis data on haskell nodes is not a block at all, unlike the -- block0 on jormungandr. This function is a method to deal with the -- discrepancy. - genesisBlockFromTxOuts :: [(SL.Addr crypto, SL.Coin)] -> W.Block + genesisBlockFromTxOuts :: [(SL.Addr StandardCrypto, SL.Coin)] -> W.Block genesisBlockFromTxOuts outs = W.Block { delegations = [] , header = W.BlockHeader - { slotNo = - W.SlotNo 0 - , blockHeight = - Quantity 0 - , headerHash = - dummyGenesisHash - , parentHeaderHash = - Nothing + { slotNo = W.SlotNo 0 + , blockHeight = Quantity 0 + , headerHash = dummyGenesisHash + , parentHeaderHash = Nothing } , transactions = mkTx <$> outs } @@ -1206,7 +1195,7 @@ fromGenesisData g = , outputs = [W.TxOut (fromShelleyAddress addr) - (TokenBundle.fromCoin $ fromShelleyCoin c) + (TokenBundle.fromCoin $ Ledger.toWalletCoin c) ] -- Collateral outputs were not supported at the time of genesis: , collateralOutput = Nothing @@ -1216,7 +1205,7 @@ fromGenesisData g = } where W.TxIn pseudoHash _ = fromShelleyTxIn $ - SL.initialFundsPseudoTxIn @crypto addr + SL.initialFundsPseudoTxIn @StandardCrypto addr -- -- Stake pools @@ -1241,37 +1230,25 @@ fromNonMyopicMemberRewards -> Map (Either W.Coin W.RewardAccount) (Map PoolId W.Coin) fromNonMyopicMemberRewards = Map.map (Map.map toWalletCoin . Map.mapKeys fromPoolId) - . Map.mapKeys (bimap fromShelleyCoin fromStakeCredential) + . Map.mapKeys (bimap Ledger.toWalletCoin fromStakeCredential) . O.unNonMyopicMemberRewards optimumNumberOfPools - :: HasField "_nOpt" pparams Natural - => pparams - -> Int -optimumNumberOfPools = unsafeConvert . getField @"_nOpt" - where - -- A value of ~100 can be expected, so should be fine. - unsafeConvert :: Natural -> Int - unsafeConvert = fromIntegral + :: (HasCallStack, Ledger.EraPParams era) => Ledger.PParams era -> Int +optimumNumberOfPools = intCast . desiredNumberOfStakePoolsFromPParams -- -- Txs -- -fromCardanoTxIn - :: Cardano.TxIn - -> W.TxIn +fromCardanoTxIn :: Cardano.TxIn -> W.TxIn fromCardanoTxIn (Cardano.TxIn txid (Cardano.TxIx ix)) = W.TxIn (W.Hash $ fromShelleyTxId $ Cardano.toShelleyTxId txid) (fromIntegral ix) -- | WARNING: Datum hashes are lost in the conversion! -fromCardanoTxOut - :: Typeable era - => IsCardanoEra era - => Cardano.TxOut ctx era - -> W.TxOut +fromCardanoTxOut :: IsCardanoEra era => Cardano.TxOut ctx era -> W.TxOut fromCardanoTxOut (Cardano.TxOut addr out _datumHash _) = W.TxOut (W.Address $ Cardano.serialiseToRawBytes addr) @@ -1304,7 +1281,7 @@ cardanoCertKeysForWitnesses = \case f = \case Cardano.StakeAddressDeregistrationCertificate cred -> toRewardAccount cred - Cardano.StakeAddressDelegationCertificate cred _ -> + Cardano.StakeAddressPoolDelegationCertificate cred _ -> toRewardAccount cred _ -> Nothing @@ -1312,44 +1289,6 @@ cardanoCertKeysForWitnesses = \case toShelleyCoin :: W.Coin -> SL.Coin toShelleyCoin (W.Coin c) = SL.Coin $ intCast c -getScriptIntegrityHash - :: Cardano.Tx era - -> Maybe ByteString -getScriptIntegrityHash = \case - Cardano.ShelleyTx era tx -> case era of - Cardano.ShelleyBasedEraShelley -> Nothing - Cardano.ShelleyBasedEraAllegra -> Nothing - Cardano.ShelleyBasedEraMary -> Nothing - Cardano.ShelleyBasedEraAlonzo -> - SafeHash.originalBytes <$> scriptIntegrityHashOfAlonzoTx tx - Cardano.ShelleyBasedEraBabbage -> - SafeHash.originalBytes <$> scriptIntegrityHashOfBabbageTx tx - Cardano.ShelleyBasedEraConway -> - SafeHash.originalBytes <$> scriptIntegrityHashOfConwayTx tx - Cardano.ByronTx _ -> Nothing - - where - scriptIntegrityHashOfAlonzoTx - :: Alonzo.AlonzoTx (Alonzo.AlonzoEra StandardCrypto) - -> Maybe (Alonzo.ScriptIntegrityHash StandardCrypto) - scriptIntegrityHashOfAlonzoTx - (Alonzo.AlonzoTx body _wits _isValid _auxData) - = strictMaybeToMaybe . Alonzo.scriptIntegrityHash $ body - - scriptIntegrityHashOfBabbageTx - :: Alonzo.AlonzoTx (Babbage.BabbageEra StandardCrypto) - -> Maybe (Babbage.ScriptIntegrityHash StandardCrypto) - scriptIntegrityHashOfBabbageTx - (Alonzo.AlonzoTx body _wits _isValid _auxData) - = strictMaybeToMaybe . Babbage.scriptIntegrityHash $ body - - scriptIntegrityHashOfConwayTx - :: Alonzo.AlonzoTx (Conway.ConwayEra StandardCrypto) - -> Maybe (Babbage.ScriptIntegrityHash StandardCrypto) - scriptIntegrityHashOfConwayTx - (Alonzo.AlonzoTx body _wits _isValid _auxData) - = strictMaybeToMaybe . Babbage.scriptIntegrityHash $ body - -- Lovelace to coin. Quantities from ledger should always fit in Word64. fromCardanoLovelace :: HasCallStack => Cardano.Lovelace -> W.Coin fromCardanoLovelace = @@ -1380,8 +1319,8 @@ toWalletCoin (SL.Coin c) = Coin.unsafeFromIntegral c fromPoolMetadata :: SL.PoolMetadata -> (StakePoolMetadataUrl, StakePoolMetadataHash) fromPoolMetadata meta = - ( StakePoolMetadataUrl (urlToText (SL._poolMDUrl meta)) - , StakePoolMetadataHash (SL._poolMDHash meta) + ( StakePoolMetadataUrl (urlToText (pmUrl meta)) + , StakePoolMetadataHash (pmHash meta) ) -- | Convert a stake credentials to a 'RewardAccount' type. @@ -1469,7 +1408,8 @@ toCardanoUTxO era = Cardano.UTxO . Map.toList . W.unUTxO -toCardanoTxOut :: ShelleyBasedEra era -> W.TxOut -> Cardano.TxOut ctx era +toCardanoTxOut :: HasCallStack + => ShelleyBasedEra era -> W.TxOut -> Cardano.TxOut ctx era toCardanoTxOut era = case era of ShelleyBasedEraShelley -> toShelleyTxOut ShelleyBasedEraAllegra -> toAllegraTxOut @@ -1576,7 +1516,6 @@ toCardanoTxOut era = case era of (Cardano.ShelleyAddressInEra Cardano.ShelleyBasedEraBabbage) <$> eitherToMaybe (Cardano.deserialiseFromRawBytes AsShelleyAddress addr) - , Cardano.AddressInEra Cardano.ByronAddressInAnyEra <$> eitherToMaybe (Cardano.deserialiseFromRawBytes AsByronAddress addr) @@ -1750,11 +1689,11 @@ toStakeKeyRegCert cred = case cred of toStakePoolDlgCert :: Either XPub (Script KeyHash) -> PoolId -> Cardano.Certificate toStakePoolDlgCert cred (PoolId pid) = case cred of Left xpub -> - Cardano.makeStakeAddressDelegationCertificate + Cardano.makeStakeAddressPoolDelegationCertificate (Cardano.StakeCredentialByKey $ Cardano.StakeKeyHash (toKeyHash xpub)) (Cardano.StakePoolKeyHash pool) Right script -> - Cardano.makeStakeAddressDelegationCertificate + Cardano.makeStakeAddressPoolDelegationCertificate (Cardano.StakeCredentialByScript . Cardano.hashScript . Cardano.SimpleScript @@ -1908,8 +1847,13 @@ tokenBundleSizeAssessor maxSize = TokenBundleSizeAssessor {..} maxSize' = W.unTokenBundleMaxSize maxSize computeTokenBundleSerializedLengthBytes :: TokenBundle.TokenBundle -> W.TxSize -computeTokenBundleSerializedLengthBytes = W.TxSize . safeCast - . BS.length . serialize' . Cardano.toMaryValue . toCardanoValue +computeTokenBundleSerializedLengthBytes = + W.TxSize + . safeCast + . BS.length + . serialize' shelleyProtVer + . Cardano.toMaryValue + . toCardanoValue where safeCast :: Int -> Natural safeCast = fromIntegral @@ -1965,26 +1909,11 @@ shelleyDecodeStakeAddress :: shelleyDecodeStakeAddress serverNetwork txt = do (_, dp) <- left (const errBech32) $ Bech32.decodeLenient txt bytes <- maybe (Left errBech32) Right $ dataPartToBytes dp - rewardAcnt <- runGetOrFail' (SL.getRewardAcnt @StandardCrypto) bytes - + rewardAcnt <- SL.decodeRewardAcnt @StandardCrypto bytes + & left (TextDecodingError . show @String) . reportFailure guardNetwork (SL.getRwdNetwork rewardAcnt) serverNetwork - pure $ fromStakeCredential $ SL.getRwdCred rewardAcnt where - runGetOrFail' decoder bytes = - case runGetOrFail decoder (BL.fromStrict bytes) of - Left e -> - Left (TextDecodingError (show e)) - - Right (remaining,_,_) | not (BL.null remaining) -> - Left errDecode - - Right (_,_,a) -> - Right a - - errDecode = TextDecodingError - "Unable to decode stake-address: not a well-formed address." - errBech32 = TextDecodingError "Unable to decode stake-address: must be a valid bech32 string." diff --git a/lib/wallet/src/Cardano/Wallet/Shelley/Compatibility/Ledger.hs b/lib/wallet/src/Cardano/Wallet/Shelley/Compatibility/Ledger.hs index 741db1c8fda..6da827b08ac 100644 --- a/lib/wallet/src/Cardano/Wallet/Shelley/Compatibility/Ledger.hs +++ b/lib/wallet/src/Cardano/Wallet/Shelley/Compatibility/Ledger.hs @@ -99,17 +99,17 @@ import Ouroboros.Consensus.Shelley.Eras import qualified Cardano.Crypto.Hash.Class as Crypto import qualified Cardano.Ledger.Address as Ledger +import qualified Cardano.Ledger.Allegra.Scripts as Scripts import qualified Cardano.Ledger.Alonzo as Alonzo import qualified Cardano.Ledger.Alonzo.TxBody as Alonzo import qualified Cardano.Ledger.Babbage as Babbage import qualified Cardano.Ledger.Babbage.TxBody as Babbage -import qualified Cardano.Ledger.Crypto as Ledger +import qualified Cardano.Ledger.Core as LCore import qualified Cardano.Ledger.Keys as Ledger import qualified Cardano.Ledger.Mary.Value as Ledger import qualified Cardano.Ledger.SafeHash as SafeHash import qualified Cardano.Ledger.Shelley.API as Ledger import qualified Cardano.Ledger.Shelley.TxBody as Shelley -import qualified Cardano.Ledger.ShelleyMA.Timelocks as MA import qualified Cardano.Wallet.Primitive.Types.Coin as Coin import qualified Cardano.Wallet.Primitive.Types.TokenBundle as TokenBundle import qualified Cardano.Wallet.Primitive.Types.TokenMap as TokenMap @@ -149,7 +149,7 @@ instance Convert Coin Ledger.Coin where toLedgerCoin :: Coin -> Ledger.Coin toLedgerCoin (Coin c) = Ledger.Coin $ intCast @Natural @Integer c -toWalletCoin :: Ledger.Coin -> Coin +toWalletCoin :: HasCallStack => Ledger.Coin -> Coin toWalletCoin (Ledger.Coin c) = Coin.unsafeFromIntegral c -------------------------------------------------------------------------------- @@ -169,19 +169,22 @@ toLedgerTokenBundle bundle = Ledger.MaryValue ledgerAda ledgerTokens where (Ledger.Coin ledgerAda) = toLedgerCoin $ TokenBundle.getCoin bundle + ledgerTokens :: Ledger.MultiAsset StandardCrypto ledgerTokens = bundle & view #tokens & TokenMap.toNestedMap & Map.mapKeys toLedgerTokenPolicyId & Map.map mapInner + & Ledger.MultiAsset mapInner inner = inner & NonEmptyMap.toMap & Map.mapKeys toLedgerTokenName & Map.map toLedgerTokenQuantity toWalletTokenBundle :: Ledger.MaryValue StandardCrypto -> TokenBundle -toWalletTokenBundle (Ledger.MaryValue ledgerAda ledgerTokens) = - TokenBundle.fromNestedMap (walletAda, walletTokens) +toWalletTokenBundle + (Ledger.MaryValue ledgerAda (Ledger.MultiAsset ledgerTokens)) = + TokenBundle.fromNestedMap (walletAda, walletTokens) where walletAda = toWalletCoin $ Ledger.Coin ledgerAda walletTokens = ledgerTokens @@ -326,7 +329,8 @@ toAlonzoTxOut (TxOut addr bundle) = Ledger.SNothing toBabbageTxOut - :: TxOut + :: HasCallStack + => TxOut -> Babbage.BabbageTxOut StandardBabbage toBabbageTxOut (TxOut addr bundle) = Babbage.BabbageTxOut @@ -360,28 +364,28 @@ fromBabbageTxOut (Babbage.BabbageTxOut addr val _ _) = TxOut (toWallet addr) (toWallet val) toWalletScript - :: Ledger.Crypto crypto + :: LCore.Era crypto => (Hash "VerificationKey" -> KeyRole) - -> MA.Timelock crypto + -> Scripts.Timelock crypto -> Script KeyHash toWalletScript tokeyrole = fromLedgerScript where - fromLedgerScript (MA.RequireSignature (Ledger.KeyHash h)) = + fromLedgerScript (Scripts.RequireSignature (Ledger.KeyHash h)) = let payload = hashToBytes h in RequireSignatureOf (KeyHash (tokeyrole (Hash payload)) payload) - fromLedgerScript (MA.RequireAllOf contents) = + fromLedgerScript (Scripts.RequireAllOf contents) = RequireAllOf $ map fromLedgerScript $ toList contents - fromLedgerScript (MA.RequireAnyOf contents) = + fromLedgerScript (Scripts.RequireAnyOf contents) = RequireAnyOf $ map fromLedgerScript $ toList contents - fromLedgerScript (MA.RequireMOf num contents) = + fromLedgerScript (Scripts.RequireMOf num contents) = RequireSomeOf (fromIntegral num) $ fromLedgerScript <$> toList contents - fromLedgerScript (MA.RequireTimeExpire (O.SlotNo slot)) = + fromLedgerScript (Scripts.RequireTimeExpire (O.SlotNo slot)) = ActiveUntilSlot $ fromIntegral slot - fromLedgerScript (MA.RequireTimeStart (O.SlotNo slot)) = + fromLedgerScript (Scripts.RequireTimeStart (O.SlotNo slot)) = ActiveFromSlot $ fromIntegral slot toWalletScriptFromShelley - :: Ledger.Crypto crypto + :: LCore.Era crypto => KeyRole -> Ledger.MultiSig crypto -> Script KeyHash diff --git a/lib/wallet/src/Cardano/Wallet/Shelley/MinimumUTxO/Internal.hs b/lib/wallet/src/Cardano/Wallet/Shelley/MinimumUTxO/Internal.hs index a36c0197f4b..74dc56dc693 100644 --- a/lib/wallet/src/Cardano/Wallet/Shelley/MinimumUTxO/Internal.hs +++ b/lib/wallet/src/Cardano/Wallet/Shelley/MinimumUTxO/Internal.hs @@ -1,5 +1,4 @@ {-# LANGUAGE GADTs #-} -{-# LANGUAGE LambdaCase #-} {- HLINT ignore "Use camelCase" -} -- | @@ -9,22 +8,19 @@ -- Computing minimum UTxO values: internal interface. -- module Cardano.Wallet.Shelley.MinimumUTxO.Internal - ( computeMinimumCoinForUTxO_CardanoApi - , computeMinimumCoinForUTxO_CardanoLedger + ( computeMinimumCoinForUTxO_CardanoLedger ) where import Prelude -import Cardano.Ledger.Shelley.API.Wallet - ( evaluateMinLovelaceOutput ) +import Cardano.Ledger.Api + ( getMinCoinTxOut ) import Cardano.Wallet.Primitive.Types.Coin ( Coin ) import Cardano.Wallet.Primitive.Types.MinimumUTxO ( MinimumUTxOForShelleyBasedEra (..) ) import Cardano.Wallet.Primitive.Types.Tx.TxOut ( TxOut ) -import Cardano.Wallet.Shelley.Compatibility - ( toCardanoTxOut, unsafeLovelaceToWalletCoin ) import Cardano.Wallet.Shelley.Compatibility.Ledger ( toAllegraTxOut , toAlonzoTxOut @@ -34,92 +30,32 @@ import Cardano.Wallet.Shelley.Compatibility.Ledger , toShelleyTxOut , toWalletCoin ) -import Data.Function - ( (&) ) -import GHC.Stack - ( HasCallStack ) import qualified Cardano.Api.Shelley as Cardano --- | Computes a minimum UTxO value with the Cardano API. --- --- Caution: --- --- This function does /not/ attempt to reach a fixed point before returning its --- result. --- -computeMinimumCoinForUTxO_CardanoApi - :: HasCallStack - => MinimumUTxOForShelleyBasedEra - -> TxOut - -> Coin -computeMinimumCoinForUTxO_CardanoApi - (MinimumUTxOForShelleyBasedEra era pp) txOut = - unsafeCoinFromResult $ - Cardano.calculateMinimumUTxO era - (toCardanoTxOut era txOut) - (Cardano.bundleProtocolParams - (Cardano.shelleyBasedToCardanoEra era) - (Cardano.fromLedgerPParams era pp)) - where - unsafeCoinFromResult - :: Either Cardano.MinimumUTxOError Cardano.Lovelace - -> Coin - unsafeCoinFromResult = \case - Right value -> - -- We assume that the returned value is a non-negative ada quantity - -- with no other assets. If this assumption is violated, we have no - -- way to continue, and must raise an error: - value - & unsafeLovelaceToWalletCoin - Left e -> - -- The 'Cardano.calculateMinimumUTxO' function should only return - -- an error if a required protocol parameter is missing. - -- - -- However, given that values of 'MinimumUTxOForShelleyBasedEra' - -- can only be constructed by supplying an era-specific protocol - -- parameters record, it should be impossible to trigger this - -- condition. - -- - -- Any violation of this assumption indicates a programming error. - -- If this condition is triggered, we have no way to continue, and - -- must raise an error: - -- - error $ unwords - [ "computeMinimumCoinForUTxO_CardanoApi:" - , "unexpected error:" - , show e - ] - -- | Computes a minimum UTxO value with Cardano Ledger. -- -- Caution: -- -- This function does /not/ attempt to reach a fixed point before returning its -- result. --- computeMinimumCoinForUTxO_CardanoLedger :: MinimumUTxOForShelleyBasedEra -> TxOut -> Coin computeMinimumCoinForUTxO_CardanoLedger - (MinimumUTxOForShelleyBasedEra era pp) txOut = + (MinimumUTxOForShelleyBasedEra era pp) + txOut = toWalletCoin $ case era of Cardano.ShelleyBasedEraShelley -> - evaluateMinLovelaceOutput pp - $ toShelleyTxOut txOut + getMinCoinTxOut pp $ toShelleyTxOut txOut Cardano.ShelleyBasedEraAllegra -> - evaluateMinLovelaceOutput pp - $ toAllegraTxOut txOut + getMinCoinTxOut pp $ toAllegraTxOut txOut Cardano.ShelleyBasedEraMary -> - evaluateMinLovelaceOutput pp - $ toMaryTxOut txOut + getMinCoinTxOut pp $ toMaryTxOut txOut Cardano.ShelleyBasedEraAlonzo -> - evaluateMinLovelaceOutput pp - $ toAlonzoTxOut txOut + getMinCoinTxOut pp $ toAlonzoTxOut txOut Cardano.ShelleyBasedEraBabbage -> - evaluateMinLovelaceOutput pp - $ toBabbageTxOut txOut + getMinCoinTxOut pp $ toBabbageTxOut txOut Cardano.ShelleyBasedEraConway -> - evaluateMinLovelaceOutput pp - $ toConwayTxOut txOut + getMinCoinTxOut pp $ toConwayTxOut txOut diff --git a/lib/wallet/src/Cardano/Wallet/Shelley/Network/Node.hs b/lib/wallet/src/Cardano/Wallet/Shelley/Network/Node.hs index 7d9c796d7f8..abf42d898d3 100644 --- a/lib/wallet/src/Cardano/Wallet/Shelley/Network/Node.hs +++ b/lib/wallet/src/Cardano/Wallet/Shelley/Network/Node.hs @@ -22,7 +22,7 @@ -- - In particular sections 4.1, 4.2, 4.6 and 4.8 module Cardano.Wallet.Shelley.Network.Node ( withNetworkLayer - , Observer (query,startObserving,stopObserving) + , Observer (query, startObserving, stopObserving) , newObserver , ObserverLog (..) @@ -84,7 +84,6 @@ import Cardano.Wallet.Shelley.Compatibility , fromNonMyopicMemberRewards , fromPoint , fromPoolDistr - , fromShelleyCoin , fromShelleyPParams , fromStakeCredential , fromTip @@ -119,12 +118,13 @@ import Control.Concurrent.Class.MonadSTM , readTMVar , readTVar , readTVarIO + , retry , takeTMVar , tryReadTMVar , writeTVar ) import Control.Monad - ( forever, guard, unless, void, when ) + ( forever, unless, void, when ) import Control.Monad.Class.MonadAsync ( MonadAsync ) import Control.Monad.Class.MonadST @@ -248,7 +248,7 @@ import Ouroboros.Network.NodeToClient , LocalAddress , NetworkConnectTracers (..) , NodeToClientProtocols (..) - , NodeToClientVersionData (..) + , NodeToClientVersionData , connectTo , localSnocket , nodeToClientProtocols @@ -280,9 +280,6 @@ import UnliftIO.Exception ( Handler (..), IOException ) import qualified Cardano.Crypto.Hash as Crypto -import qualified Cardano.Ledger.Alonzo.PParams as Alonzo -import qualified Cardano.Ledger.Babbage.PParams as Babbage -import qualified Cardano.Ledger.Conway.PParams as Conway import qualified Cardano.Ledger.Credential as SL import qualified Cardano.Ledger.Crypto as SL import qualified Cardano.Ledger.Shelley.API as SL @@ -292,6 +289,7 @@ import qualified Cardano.Wallet.Primitive.Types as W import qualified Cardano.Wallet.Primitive.Types.Coin as W import qualified Cardano.Wallet.Primitive.Types.RewardAccount as W import qualified Cardano.Wallet.Primitive.Types.Tx as W +import qualified Cardano.Wallet.Shelley.Compatibility.Ledger as Ledger import qualified Codec.CBOR.Term as CBOR import qualified Data.Map as Map import qualified Data.Set as Set @@ -503,12 +501,9 @@ withNodeNetworkLayerBase (Just . optimumNumberOfPools <$> LSQry Shelley.GetCurrentPParams) (Just . optimumNumberOfPools <$> LSQry Shelley.GetCurrentPParams) (Just . optimumNumberOfPools <$> LSQry Shelley.GetCurrentPParams) - (Just . fromIntegral . Alonzo._nOpt - <$> LSQry Shelley.GetCurrentPParams) - (Just . fromIntegral . Babbage._nOpt - <$> LSQry Shelley.GetCurrentPParams) - (Just . fromIntegral . Conway._nOpt - <$> LSQry Shelley.GetCurrentPParams) + (Just . optimumNumberOfPools <$> LSQry Shelley.GetCurrentPParams) + (Just . optimumNumberOfPools <$> LSQry Shelley.GetCurrentPParams) + (Just . optimumNumberOfPools <$> LSQry Shelley.GetCurrentPParams) queryNonMyopicMemberRewards :: LSQ (CardanoBlock StandardCrypto) IO @@ -535,8 +530,7 @@ withNodeNetworkLayerBase let header = fromTip getGenesisBlockHash tip bracketTracer (contramap (MsgWatcherUpdate header) tr) $ cb header - -- TODO(#2042): Make wallets call manually, with matching - -- stopObserving. + -- TODO(#2042): Make wallets call manually, with matching stopObserving. _getCachedRewardAccountBalance rewardsObserver k = do startObserving rewardsObserver k fromMaybe (W.Coin 0) <$> query rewardsObserver k @@ -579,8 +573,7 @@ withNodeNetworkLayerBase doNothingProtocol :: MonadTimer m => RunMiniProtocol 'InitiatorMode ByteString m a Void doNothingProtocol = - InitiatorProtocolOnly $ MuxPeerRaw $ - const $ forever $ threadDelay 1e6 + InitiatorProtocolOnly $ MuxPeerRaw $ const $ forever $ threadDelay 1_000_000 type WalletOuroborosApplication m = OuroborosApplication 'InitiatorMode -- Initiator ~ Client (as opposed to Responder / Server) @@ -844,7 +837,7 @@ fetchRewardAccounts tr queryRewardQ accounts = do -> (Map W.RewardAccount W.Coin, [Log]) fromBalanceResult (deleg, rewardAccounts) = ( Map.mapKeys fromStakeCredential $ - Map.map fromShelleyCoin rewardAccounts + Map.map Ledger.toWalletCoin rewardAccounts , [MsgAccountDelegationAndRewards deleg rewardAccounts] ) @@ -1072,7 +1065,7 @@ observeForever readVal action = go Nothing go old = do new <- atomically $ do new <- readVal - guard (old /= Just new) + unless (old /= Just new) retry return new action new go (Just new) diff --git a/lib/wallet/src/Cardano/Wallet/Shelley/Transaction.hs b/lib/wallet/src/Cardano/Wallet/Shelley/Transaction.hs index 1bbd1f5acbd..c3097845ddd 100644 --- a/lib/wallet/src/Cardano/Wallet/Shelley/Transaction.hs +++ b/lib/wallet/src/Cardano/Wallet/Shelley/Transaction.hs @@ -101,12 +101,19 @@ import Cardano.Binary ( serialize' ) import Cardano.Crypto.Wallet ( XPub ) -import Cardano.Ledger.Alonzo.Tools - ( evaluateTransactionExecutionUnits ) +import Cardano.Ledger.Allegra.Core + ( inputsTxBodyL, ppMinFeeAL ) +import Cardano.Ledger.Api + ( bodyTxL + , collateralInputsTxBodyL + , feeTxBodyL + , outputsTxBodyL + , scriptIntegrityHashTxBodyL + ) +import Cardano.Ledger.Babbage.TxBody + ( outputsBabbageTxBodyL ) import Cardano.Ledger.Crypto ( DSIGN ) -import Cardano.Ledger.Era - ( Crypto ) import Cardano.Ledger.Shelley.API ( StrictMaybe (..) ) import Cardano.Slotting.EpochInfo @@ -182,7 +189,6 @@ import Cardano.Wallet.Shelley.Compatibility , toCardanoTxIn , toCardanoTxOut , toCardanoValue - , toCostModelsAsArray , toHDPayloadAddress , toScriptPurpose , toStakeKeyDeregCert @@ -230,6 +236,8 @@ import Codec.Serialise ( deserialiseOrFail ) import Control.Arrow ( left, second ) +import Control.Lens + ( over, (.~) ) import Control.Monad ( forM, forM_, guard, when ) import Control.Monad.Trans.Class @@ -280,26 +288,20 @@ import qualified Cardano.Crypto as CC import qualified Cardano.Crypto.DSIGN as DSIGN import qualified Cardano.Crypto.Hash.Class as Crypto import qualified Cardano.Crypto.Wallet as Crypto.HD -import qualified Cardano.Ledger.Alonzo.Data as Alonzo import qualified Cardano.Ledger.Alonzo.PlutusScriptApi as Alonzo -import qualified Cardano.Ledger.Alonzo.PParams as Alonzo import qualified Cardano.Ledger.Alonzo.Scripts as Alonzo +import qualified Cardano.Ledger.Alonzo.Scripts.Data as Alonzo import qualified Cardano.Ledger.Alonzo.Tx as Alonzo -import qualified Cardano.Ledger.Alonzo.TxWitness as Alonzo -import qualified Cardano.Ledger.Babbage.PParams as Babbage -import qualified Cardano.Ledger.Babbage.Tx as Babbage +import qualified Cardano.Ledger.Alonzo.TxWits as Alonzo +import qualified Cardano.Ledger.Api as Ledger import qualified Cardano.Ledger.Coin as Ledger -import qualified Cardano.Ledger.Conway.PParams as Conway -import qualified Cardano.Ledger.Conway.Tx as Conway -import qualified Cardano.Ledger.Conway.TxBody as Conway -import qualified Cardano.Ledger.Core as Ledger import qualified Cardano.Ledger.Keys.Bootstrap as SL -import qualified Cardano.Ledger.Serialization as Ledger import qualified Cardano.Wallet.Primitive.Types.Coin as Coin import qualified Cardano.Wallet.Primitive.Types.TokenBundle as TokenBundle import qualified Cardano.Wallet.Primitive.Types.TokenMap as TokenMap import qualified Cardano.Wallet.Primitive.Types.Tx.TxOut as TxOut import qualified Cardano.Wallet.Shelley.Compatibility as Compatibility +import qualified Cardano.Wallet.Shelley.Compatibility.Ledger as Ledger import qualified Cardano.Wallet.Write.Tx as Write import qualified Codec.CBOR.Encoding as CBOR import qualified Codec.CBOR.Write as CBOR @@ -337,7 +339,7 @@ data TxPayload era = TxPayload type EraConstraints era = ( IsShelleyBasedEra era , ToCBOR (Ledger.TxBody (Cardano.ShelleyLedgerEra era)) - , DSIGN (Crypto (Cardano.ShelleyLedgerEra era)) ~ DSIGN.Ed25519DSIGN + , DSIGN (Ledger.EraCrypto (Cardano.ShelleyLedgerEra era)) ~ DSIGN.Ed25519DSIGN , (era == ByronEra) ~ 'False ) @@ -790,7 +792,7 @@ updateTx (Cardano.Tx body existingKeyWits) extraContent = do -- `anyEraBody`. body' <- modifyTxBody extraContent body - if (null existingKeyWits) + if null existingKeyWits then Right $ Cardano.Tx body' mempty else Left $ ErrExistingKeyWitnesses $ length existingKeyWits where @@ -827,50 +829,36 @@ updateTx (Cardano.Tx body existingKeyWits) extraContent = do Cardano.SimpleScriptInConway (Cardano.SimpleScript $ toCardanoSimpleScript walletScript) --- NOTE: If the ShelleyMA MAClass were exposed, the Allegra and Mary --- cases could perhaps be joined. It is not however. And we still need --- to treat Alonzo and Shelley differently. modifyShelleyTxBody :: TxUpdate -> RecentEra era -> Ledger.TxBody (Cardano.ShelleyLedgerEra era) -> Ledger.TxBody (Cardano.ShelleyLedgerEra era) -modifyShelleyTxBody txUpdate era ledgerBody = case era of - RecentEraConway -> ledgerBody - { Conway.outputs = Conway.outputs ledgerBody - <> StrictSeq.fromList - (Ledger.mkSized . toConwayTxOut <$> extraOutputs) - , Conway.inputs = Conway.inputs ledgerBody - <> Set.fromList (Cardano.toShelleyTxIn <$> extraInputs') - , Conway.collateral = Conway.collateral ledgerBody - <> Set.fromList (Cardano.toShelleyTxIn <$> extraCollateral') - , Conway.txfee = - modifyFee $ Conway.txfee ledgerBody - } - RecentEraBabbage -> ledgerBody - { Babbage.outputs = Babbage.outputs ledgerBody - <> StrictSeq.fromList - (Ledger.mkSized . toBabbageTxOut <$> extraOutputs) - , Babbage.inputs = Babbage.inputs ledgerBody - <> Set.fromList (Cardano.toShelleyTxIn <$> extraInputs') - , Babbage.collateral = Babbage.collateral ledgerBody - <> Set.fromList (Cardano.toShelleyTxIn <$> extraCollateral') - , Babbage.txfee = - modifyFee $ Babbage.txfee ledgerBody - } +modifyShelleyTxBody txUpdate = \case + RecentEraBabbage -> + over feeTxBodyL modifyFee + . over outputsBabbageTxBodyL + (<> StrictSeq.fromList (toBabbageTxOut <$> extraOutputs)) + . over inputsTxBodyL + (<> Set.fromList (Cardano.toShelleyTxIn <$> extraInputs')) + . over collateralInputsTxBodyL + (<> Set.fromList (Cardano.toShelleyTxIn <$> extraCollateral')) + RecentEraConway -> + over feeTxBodyL modifyFee + . over outputsTxBodyL + (<> StrictSeq.fromList (toConwayTxOut <$> extraOutputs)) + . over inputsTxBodyL + (<> Set.fromList (Cardano.toShelleyTxIn <$> extraInputs')) + . over collateralInputsTxBodyL + (<> Set.fromList (Cardano.toShelleyTxIn <$> extraCollateral')) where - TxUpdate extraInputs extraCollateral extraOutputs _ feeUpdate - = txUpdate - + TxUpdate extraInputs extraCollateral extraOutputs _ feeUpdate = txUpdate extraInputs' = toCardanoTxIn . fst <$> extraInputs extraCollateral' = toCardanoTxIn <$> extraCollateral - - modifyFee old = case feeUpdate of - UseNewTxFee new -> toLedgerCoin new - UseOldTxFee -> old - where - toLedgerCoin :: Coin -> Ledger.Coin - toLedgerCoin (Coin c) = Ledger.Coin (intCast c) + modifyFee old = + case feeUpdate of + UseNewTxFee (Coin c) -> Ledger.Coin (intCast c) + UseOldTxFee -> old -- | Evaluate a minimal fee amount necessary to pay for a given tx -- using ledger's functionality. @@ -886,10 +874,14 @@ evaluateMinimumFee pp (KeyWitnessCount nWits nBootWits) body = -- NOTE: Cardano.evaluateTransactionFee will error if passed non-zero -- nBootWits, so we need to account for it separately. where - bootWitFees = Coin.fromNatural $ - Cardano.protocolParamTxFeePerByte - (Cardano.unbundleProtocolParams pp) * bytes + bootWitFees = Coin.fromNatural $ feePerByte * bytes where + feePerByte :: Natural + feePerByte = + Coin.toNatural . fromCardanoLovelace + $ Cardano.protocolParamTxFeePerByte + $ Cardano.unbundleProtocolParams pp + bytes :: Natural bytes = fromIntegral $ sizeOf_BootstrapWitnesses $ intCast nBootWits @@ -938,17 +930,16 @@ estimateSignedTxSize pparams nWits body = minfee witCount = toWalletCoin $ Write.evaluateMinimumFee (Write.recentEra @era) pparams (toLedgerTx body) witCount - toLedgerTx - :: Cardano.TxBody era -> Write.Tx (Write.ShelleyLedgerEra era) + toLedgerTx :: Cardano.TxBody era -> Write.Tx (Write.ShelleyLedgerEra era) toLedgerTx b = case Cardano.Tx b [] of - Byron.ByronTx {} -> case Write.recentEra @era of - {} + Byron.ByronTx {} -> case Write.recentEra @era of {} Cardano.ShelleyTx _era ledgerTx -> ledgerTx feePerByte :: Coin - feePerByte = Coin.fromNatural $ case Write.recentEra @era of - Write.RecentEraBabbage -> Babbage._minfeeA pparams - Write.RecentEraConway -> Conway._minfeeA pparams + feePerByte = Ledger.toWalletCoin $ + case Write.recentEra @era of + Write.RecentEraBabbage -> pparams ^. ppMinFeeAL + Write.RecentEraConway -> pparams ^. ppMinFeeAL numberOfShelleyWitnesses :: Word -> KeyWitnessCount numberOfShelleyWitnesses n = KeyWitnessCount n 0 @@ -1034,7 +1025,7 @@ estimateKeyWitnessCount utxo txbody@(Cardano.TxBody txbodycontent) = Cardano.StakeAddressRegistrationCertificate _ -> 0 Cardano.StakeAddressDeregistrationCertificate cred -> estimateWitNumForCred cred - Cardano.StakeAddressDelegationCertificate cred _ -> + Cardano.StakeAddressPoolDelegationCertificate cred _ -> estimateWitNumForCred cred _ -> 1 where @@ -1187,16 +1178,13 @@ assignScriptRedeemers pparams timeTranslation utxo redeemers tx = -> Either ErrAssignRedeemers (Map Alonzo.RdmrPtr (Either ErrAssignRedeemers Alonzo.ExUnits)) evaluateExecutionUnitsBabbage indexedRedeemers babbageTx = do - let costs = toCostModelsAsArray - (Alonzo.unCostModels $ Babbage._costmdls pparams) - - let res = evaluateTransactionExecutionUnits - pparams - babbageTx - (fromCardanoUTxO utxo) - epochInformation - systemStart - costs + let res = + Ledger.evalTxExUnits + pparams + babbageTx + (fromCardanoUTxO utxo) + epochInformation + systemStart case res of Left translationError -> Left $ ErrAssignRedeemersTranslationError translationError @@ -1210,16 +1198,13 @@ assignScriptRedeemers pparams timeTranslation utxo redeemers tx = -> Either ErrAssignRedeemers (Map Alonzo.RdmrPtr (Either ErrAssignRedeemers Alonzo.ExUnits)) evaluateExecutionUnitsConway indexedRedeemers conwayTx = do - let costs = toCostModelsAsArray - (Alonzo.unCostModels $ Conway._costmdls pparams) - - let res = evaluateTransactionExecutionUnits - pparams - conwayTx - (fromCardanoUTxO utxo) - epochInformation - systemStart - costs + let res = + Ledger.evalTxExUnits + pparams + conwayTx + (fromCardanoUTxO utxo) + epochInformation + systemStart case res of Left translationError -> Left $ ErrAssignRedeemersTranslationError translationError @@ -1277,46 +1262,38 @@ assignScriptRedeemers pparams timeTranslation utxo redeemers tx = -- | Finally, calculate and add the script integrity hash with the new -- final redeemers, if any. addScriptIntegrityHashBabbage - :: era ~ Cardano.BabbageEra - => BabbageTx -> BabbageTx + :: era ~ Cardano.BabbageEra => BabbageTx -> BabbageTx addScriptIntegrityHashBabbage babbageTx = - let wits = Alonzo.wits babbageTx - langs = - [ l - | (_hash, script) <- Map.toList (Alonzo.txscripts wits) - , (not . Ledger.isNativeScript @StandardBabbage) script - , Just l <- [Alonzo.language script] - ] - in babbageTx - { Babbage.body = (Babbage.body babbageTx) - { Babbage.scriptIntegrityHash = Alonzo.hashScriptIntegrity - (Set.fromList $ Alonzo.getLanguageView pparams - <$> langs) - (Alonzo.txrdmrs wits) - (Alonzo.txdats wits) - } - } + babbageTx & bodyTxL . scriptIntegrityHashTxBodyL .~ + Alonzo.hashScriptIntegrity + (Set.fromList $ Alonzo.getLanguageView pparams <$> langs) + (Alonzo.txrdmrs wits) + (Alonzo.txdats wits) + where + wits = Alonzo.wits babbageTx + langs = + [ l + | (_hash, script) <- Map.toList (Alonzo.txscripts wits) + , (not . Ledger.isNativeScript @StandardBabbage) script + , Just l <- [Alonzo.language script] + ] addScriptIntegrityHashConway - :: era ~ Cardano.ConwayEra - => ConwayTx -> ConwayTx + :: era ~ Cardano.ConwayEra => ConwayTx -> ConwayTx addScriptIntegrityHashConway conwayTx = - let wits = Alonzo.wits conwayTx - langs = - [ l - | (_hash, script) <- Map.toList (Alonzo.txscripts wits) - , (not . Ledger.isNativeScript @StandardConway) script - , Just l <- [Alonzo.language script] - ] - in conwayTx - { Conway.body = (Conway.body conwayTx) - { Conway.scriptIntegrityHash = Alonzo.hashScriptIntegrity - (Set.fromList $ Alonzo.getLanguageView pparams - <$> langs) - (Alonzo.txrdmrs wits) - (Alonzo.txdats wits) - } - } + conwayTx & bodyTxL . scriptIntegrityHashTxBodyL .~ + Alonzo.hashScriptIntegrity + (Set.fromList $ Alonzo.getLanguageView pparams <$> langs) + (Alonzo.txrdmrs wits) + (Alonzo.txdats wits) + where + wits = Alonzo.wits conwayTx + langs = + [ l + | (_hash, script) <- Map.toList (Alonzo.txscripts wits) + , (not . Ledger.isNativeScript @StandardConway) script + , Just l <- [Alonzo.language script] + ] getFeePerByteFromWalletPParams :: ProtocolParameters @@ -2501,57 +2478,40 @@ dummyInput = TxIn (Hash $ BS.replicate 32 0) 999 removeDummyInput :: HasCallStack => Cardano.TxBody era -> Cardano.TxBody era removeDummyInput = \case - Byron.ByronTxBody {} -> bailOut - Cardano.ShelleyTxBody era body scripts scriptData aux val -> - case era of - ShelleyBasedEraShelley -> bailOut - ShelleyBasedEraAllegra -> bailOut - ShelleyBasedEraMary -> bailOut - ShelleyBasedEraAlonzo -> - let body' = body - { Alonzo.inputs = - Set.delete - (toLedger dummyInput) - (Alonzo.inputs body) - } - in Cardano.ShelleyTxBody - era - body' - scripts - scriptData - aux - val - ShelleyBasedEraBabbage -> - let body' = body - { Babbage.inputs = - Set.delete - (toLedger dummyInput) - (Babbage.inputs body) - } - in Cardano.ShelleyTxBody - era - body' - scripts - scriptData - aux - val - ShelleyBasedEraConway -> - let body' = body - { Conway.inputs = - Set.delete - (toLedger dummyInput) - (Conway.inputs body) - } - in Cardano.ShelleyTxBody - era - body' - scripts - scriptData - aux - val + Byron.ByronTxBody{} -> bailOut + Cardano.ShelleyTxBody era body scripts scriptData aux val -> case era of + ShelleyBasedEraShelley -> bailOut + ShelleyBasedEraAllegra -> bailOut + ShelleyBasedEraMary -> bailOut + ShelleyBasedEraAlonzo -> + Cardano.ShelleyTxBody + era + (over inputsTxBodyL (Set.delete (toLedger dummyInput)) body) + scripts + scriptData + aux + val + ShelleyBasedEraBabbage -> + Cardano.ShelleyTxBody + era + (over inputsTxBodyL (Set.delete (toLedger dummyInput)) body) + scripts + scriptData + aux + val + ShelleyBasedEraConway -> + Cardano.ShelleyTxBody + era + (over inputsTxBodyL (Set.delete (toLedger dummyInput)) body) + scripts + scriptData + aux + val where - bailOut = error "removing dummy inputs is only supported \ - \for the Alonzo or Babbage era" + bailOut = + error + "removing dummy inputs is only supported \ + \for the Alonzo or Babbage era" mkWithdrawals :: NetworkId diff --git a/lib/wallet/src/Cardano/Wallet/Submissions/Primitives.hs b/lib/wallet/src/Cardano/Wallet/Submissions/Primitives.hs index 44cda8fa1f6..9b2f186048a 100644 --- a/lib/wallet/src/Cardano/Wallet/Submissions/Primitives.hs +++ b/lib/wallet/src/Cardano/Wallet/Submissions/Primitives.hs @@ -102,7 +102,7 @@ applyPrimitive (MoveToLedger acceptance txid) s = | otherwise = x f x = x applyPrimitive (MoveTip newTip) s = - s & (finalityL .~ if newTip <= finality s then newTip else finality s) + s & (finalityL .~ min newTip (finality s)) . (tipL .~ newTip) . (transactionsL . traverse . txStatus %~ f) where diff --git a/lib/wallet/src/Cardano/Wallet/Transaction.hs b/lib/wallet/src/Cardano/Wallet/Transaction.hs index ef1a63455f4..aeeb71d5c6a 100644 --- a/lib/wallet/src/Cardano/Wallet/Transaction.hs +++ b/lib/wallet/src/Cardano/Wallet/Transaction.hs @@ -306,19 +306,20 @@ data DelegationAction instance Buildable DelegationAction where build = genericF -data PlutusVersion = - PlutusVersionV1 | PlutusVersionV2 +data PlutusVersion = PlutusVersionV1 | PlutusVersionV2 | PlutusVersionV3 deriving (Eq, Generic, Show) deriving anyclass NFData instance ToText PlutusVersion where toText PlutusVersionV1 = "v1" toText PlutusVersionV2 = "v2" + toText PlutusVersionV3 = "v3" instance FromText PlutusVersion where fromText txt = case txt of "v1" -> Right PlutusVersionV1 "v2" -> Right PlutusVersionV2 + "v3" -> Right PlutusVersionV3 _ -> Left $ TextDecodingError $ unwords [ "I couldn't parse the given plutus version." , "I am expecting one of the words 'v1' or" diff --git a/lib/wallet/src/Cardano/Wallet/Write/ProtocolParameters.hs b/lib/wallet/src/Cardano/Wallet/Write/ProtocolParameters.hs index 473056d8b39..a9de96d0f66 100644 --- a/lib/wallet/src/Cardano/Wallet/Write/ProtocolParameters.hs +++ b/lib/wallet/src/Cardano/Wallet/Write/ProtocolParameters.hs @@ -1,4 +1,6 @@ +{-# LANGUAGE DerivingStrategies #-} {-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE UndecidableInstances #-} @@ -15,19 +17,23 @@ module Cardano.Wallet.Write.ProtocolParameters import Prelude +import Data.Functor.Identity + ( Identity ) + +import qualified Cardano.Ledger.Core as Ledger import qualified Cardano.Wallet.Write.Tx as Write -- TODO: -- - Make this data type abstract: don't export the constructor. -- - Replace this type with a re-exported 'Ledger.PParams era'. newtype ProtocolParameters era = ProtocolParameters - { pparamsLedger - :: Write.PParams (Write.ShelleyLedgerEra era) + { pparamsLedger :: Ledger.PParams (Write.ShelleyLedgerEra era) } -deriving instance - Eq (Write.PParams (Write.ShelleyLedgerEra era)) => +deriving newtype instance + Eq (Ledger.PParamsHKD Identity (Write.ShelleyLedgerEra era)) => Eq (ProtocolParameters era) -deriving instance - Show (Write.PParams (Write.ShelleyLedgerEra era)) => + +deriving newtype instance + Show (Ledger.PParamsHKD Identity (Write.ShelleyLedgerEra era)) => Show (ProtocolParameters era) diff --git a/lib/wallet/src/Cardano/Wallet/Write/Tx.hs b/lib/wallet/src/Cardano/Wallet/Write/Tx.hs index 6d972829d5f..2845c89fdb2 100644 --- a/lib/wallet/src/Cardano/Wallet/Write/Tx.hs +++ b/lib/wallet/src/Cardano/Wallet/Write/Tx.hs @@ -8,7 +8,6 @@ {-# LANGUAGE GADTs #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NamedFieldPuns #-} -{-# LANGUAGE OverloadedLabels #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} @@ -85,7 +84,6 @@ module Cardano.Wallet.Write.Tx , Core.TxBody , txBody , outputs - , modifyTxOutputs , modifyLedgerBody , emptyTx @@ -114,13 +112,9 @@ module Cardano.Wallet.Write.Tx -- ** Datum , Datum (..) - , datumFromCardanoScriptData - , datumToCardanoScriptData -- *** Binary Data , BinaryData - , binaryDataFromBytes - , binaryDataToBytes -- *** Datum Hash , DatumHash @@ -129,10 +123,6 @@ module Cardano.Wallet.Write.Tx -- ** Script , Script - , scriptFromCardanoScriptInAnyLang - , scriptToCardanoScriptInAnyLang - , scriptToCardanoEnvelopeJSON - , scriptFromCardanoEnvelopeJSON , Alonzo.isPlutusScript -- * TxIn @@ -158,28 +148,26 @@ import Cardano.Api.Shelley ( ShelleyLedgerEra ) import Cardano.Crypto.Hash ( Hash (UnsafeHash) ) -import Cardano.Ledger.Alonzo.Data - ( BinaryData, Datum (..) ) +import Cardano.Ledger.Allegra.Scripts + ( translateTimelock ) import Cardano.Ledger.Alonzo.Scripts ( AlonzoScript (..) ) +import Cardano.Ledger.Alonzo.Scripts.Data + ( BinaryData, Datum (..) ) import Cardano.Ledger.Babbage.TxBody ( BabbageTxOut (..) ) import Cardano.Ledger.BaseTypes ( maybeToStrictMaybe ) +import Cardano.Ledger.Binary + ( Sized (..) ) import Cardano.Ledger.Coin ( Coin (..) ) import Cardano.Ledger.Crypto ( StandardCrypto ) -import Cardano.Ledger.Era - ( Crypto ) import Cardano.Ledger.Mary ( MaryValue ) import Cardano.Ledger.SafeHash ( SafeHash, extractHash, unsafeMakeSafeHash ) -import Cardano.Ledger.Serialization - ( Sized (..), mkSized ) -import Cardano.Ledger.Shelley.API - ( CLI (evaluateMinLovelaceOutput) ) import Cardano.Ledger.Val ( coin, modifyCoin ) import Cardano.Wallet.Primitive.Types.Tx.Constraints @@ -187,7 +175,7 @@ import Cardano.Wallet.Primitive.Types.Tx.Constraints import Cardano.Wallet.Shelley.Compatibility.Ledger ( toLedger ) import Control.Arrow - ( second ) + ( second, (>>>) ) import Data.ByteString ( ByteString ) import Data.ByteString.Short @@ -200,10 +188,8 @@ import Data.Generics.Internal.VL.Lens ( (^.) ) import Data.Generics.Labels () -import Data.Generics.Product - ( HasField' ) import Data.IntCast - ( intCast ) + ( intCast, intCastMaybe ) import Data.Kind ( Type ) import Data.Maybe @@ -212,6 +198,8 @@ import Data.Type.Equality ( (:~:) (Refl), TestEquality (testEquality) ) import Data.Typeable ( Typeable ) +import GHC.Stack + ( HasCallStack ) import Numeric.Natural ( Natural ) import Ouroboros.Consensus.Shelley.Eras @@ -219,23 +207,23 @@ import Ouroboros.Consensus.Shelley.Eras import qualified Cardano.Api as Cardano import qualified Cardano.Api.Byron as Cardano -import qualified Cardano.Api.Extra as Cardano import qualified Cardano.Api.Shelley as Cardano -import qualified Cardano.Binary as CBOR import qualified Cardano.Crypto.Hash.Class as Crypto import qualified Cardano.Ledger.Address as Ledger -import qualified Cardano.Ledger.Alonzo.Data as Alonzo +import qualified Cardano.Ledger.Alonzo.PParams as Alonzo import qualified Cardano.Ledger.Alonzo.Scripts as Alonzo +import qualified Cardano.Ledger.Alonzo.Scripts.Data as Alonzo +import qualified Cardano.Ledger.Api as Ledger import qualified Cardano.Ledger.Babbage as Babbage import qualified Cardano.Ledger.Babbage.Tx as Babbage import qualified Cardano.Ledger.Babbage.TxBody as Babbage import qualified Cardano.Ledger.Conway.TxBody as Conway import qualified Cardano.Ledger.Core as Core +import qualified Cardano.Ledger.Credential as Core +import qualified Cardano.Ledger.Keys as Ledger import qualified Cardano.Ledger.Shelley.API.Wallet as Shelley import qualified Cardano.Ledger.Shelley.UTxO as Shelley import qualified Cardano.Ledger.TxIn as Ledger -import qualified Data.Aeson as Aeson -import qualified Data.Aeson.Types as Aeson import qualified Data.Map as Map -------------------------------------------------------------------------------- @@ -286,18 +274,14 @@ class -- is to work with a small closed set of eras, anyway. type RecentEraLedgerConstraints era = ( Core.Era era + , Core.EraTx era + , Core.EraCrypto era ~ StandardCrypto , Core.Script era ~ AlonzoScript era - , CLI era - , Crypto era ~ StandardCrypto , Core.Tx era ~ Babbage.AlonzoTx era , Core.Value era ~ MaryValue StandardCrypto + , Alonzo.AlonzoEraPParams era , Babbage.ShelleyEraTxBody era - , HasField' "_collateralPercentage" (Core.PParams era) Natural - , HasField' "_maxCollateralInputs" (Core.PParams era) Natural - , HasField' "_minfeeA" (Core.PParams era) Natural - , HasField' "_prices" (Core.PParams era) ExUnitPrices - , HasField' "_maxTxExUnits" (Core.PParams era) ExUnits - , HasField' "_keyDeposit" (Core.PParams era) Coin + , Shelley.EraUTxO era ) -- | Bring useful constraints into scope from a value-level @@ -542,136 +526,10 @@ unsafeAddressFromBytes bytes = case Ledger.deserialiseAddr bytes of Just addr -> addr Nothing -> error "unsafeAddressFromBytes: failed to deserialise" -scriptFromCardanoScriptInAnyLang - :: forall era. IsRecentEra era - => Cardano.ScriptInAnyLang - -> Script (Cardano.ShelleyLedgerEra era) -scriptFromCardanoScriptInAnyLang = withConstraints (recentEra @era) $ - Cardano.toShelleyScript - . fromMaybe (error "all valid scripts should be valid in latest era") - . Cardano.toScriptInEra era - where - era = cardanoEraFromRecentEra $ recentEra @era - -scriptToCardanoScriptInAnyLang - :: forall era. IsRecentEra era - => Script (Cardano.ShelleyLedgerEra era) - -> Cardano.ScriptInAnyLang -scriptToCardanoScriptInAnyLang = withConstraints (recentEra @era) $ - rewrap . Cardano.fromShelleyBasedScript shelleyEra - where - rewrap (Cardano.ScriptInEra _ s) = Cardano.toScriptInAnyLang s - shelleyEra = shelleyBasedEraFromRecentEra $ recentEra @era - --- | NOTE: Specializing to 'LatestLedgerEra' would make more sense than --- 'StandardBabbage', as this function is useful together with --- 'TxOutInRecentEra'. With conway this is prevented by --- https://github.com/input-output-hk/cardano-node/issues/4989 --- but it shouldn't matter in practice. We may want to --- 1. Switch back to 'LatestLedgerEra' when possible --- 2. Create a clearer and more uniform approach to the 'TxOutInRecentEra' style --- of relying on the types from the latest era being a superset of the types of --- the previous era. -scriptToCardanoEnvelopeJSON :: AlonzoScript StandardBabbage -> Aeson.Value -scriptToCardanoEnvelopeJSON = - scriptToJSON . scriptToCardanoScriptInAnyLang @Cardano.BabbageEra - where - scriptToJSON - :: Cardano.ScriptInAnyLang - -> Aeson.Value - scriptToJSON (Cardano.ScriptInAnyLang l s) = Aeson.toJSON - $ obtainScriptLangConstraint l - $ Cardano.serialiseToTextEnvelope Nothing s - where - obtainScriptLangConstraint - :: Cardano.ScriptLanguage lang - -> (Cardano.IsScriptLanguage lang => a) - -> a - obtainScriptLangConstraint lang f = case lang of - Cardano.SimpleScriptLanguage -> f - Cardano.PlutusScriptLanguage Cardano.PlutusScriptV1 -> f - Cardano.PlutusScriptLanguage Cardano.PlutusScriptV2 -> f - --- NOTE: Should use 'LatestLedgerEra' instead of 'StandardBabbage'. C.f. comment --- in 'scriptToCardanoEnvelopeJSON'. -scriptFromCardanoEnvelopeJSON - :: Aeson.Value - -> Aeson.Parser (AlonzoScript StandardBabbage) -scriptFromCardanoEnvelopeJSON v = - fmap (scriptFromCardanoScriptInAnyLang @Cardano.BabbageEra) $ do - envelope <- Aeson.parseJSON v - case textEnvelopeToScript envelope of - Left textEnvErr - -> fail $ Cardano.displayError textEnvErr - Right (Cardano.ScriptInAnyLang l s) - -> pure $ Cardano.ScriptInAnyLang l s - where - textEnvelopeToScript - :: Cardano.TextEnvelope - -> Either Cardano.TextEnvelopeError Cardano.ScriptInAnyLang - textEnvelopeToScript = - Cardano.deserialiseFromTextEnvelopeAnyOf textEnvTypes - - textEnvTypes - :: [Cardano.FromSomeType Cardano.HasTextEnvelope Cardano.ScriptInAnyLang] - textEnvTypes = - [ Cardano.FromSomeType - (Cardano.AsScript Cardano.AsSimpleScript) - (Cardano.ScriptInAnyLang Cardano.SimpleScriptLanguage) - , Cardano.FromSomeType - (Cardano.AsScript Cardano.AsSimpleScript) - (Cardano.ScriptInAnyLang Cardano.SimpleScriptLanguage) - , Cardano.FromSomeType - (Cardano.AsScript Cardano.AsPlutusScriptV1) - (Cardano.ScriptInAnyLang - (Cardano.PlutusScriptLanguage Cardano.PlutusScriptV1)) - , Cardano.FromSomeType - (Cardano.AsScript Cardano.AsPlutusScriptV2) - (Cardano.ScriptInAnyLang - (Cardano.PlutusScriptLanguage Cardano.PlutusScriptV2)) - ] - --- NOTE on binary format: There are a couple of related types in the ledger each --- with their own binary encoding. 'Plutus.Data' seems to be the type with the --- least amount of wrapping tags in the encoding. --- --- - 'Plutus.Data' - the simplest encoding of the following options --- - 'Alonzo.BinaryData' - adds a preceding @24@ tag --- - 'Alonzo.Data' - n/a; doesn't have a ToCBOR --- - 'Alonzo.Datum' - adds tags to differentiate between e.g. inline datums and --- datum hashes. We could add helpers for this roundtrip, but they would be --- separate from the existing 'datum{From,To}Bytes' pair. -binaryDataFromBytes - :: ByteString - -> Either String (BinaryData LatestLedgerEra) -binaryDataFromBytes = - Alonzo.makeBinaryData . toShort - -binaryDataToBytes :: BinaryData LatestLedgerEra -> ByteString -binaryDataToBytes = - CBOR.serialize' - . Alonzo.getPlutusData - . Alonzo.binaryDataToData - -datumFromCardanoScriptData - :: Cardano.HashableScriptData - -> BinaryData era -datumFromCardanoScriptData = - Alonzo.dataToBinaryData - . Cardano.toAlonzoData - -datumToCardanoScriptData - :: BinaryData era - -> Cardano.HashableScriptData -datumToCardanoScriptData = - Cardano.fromAlonzoData - . Alonzo.binaryDataToData - type DatumHash = Alonzo.DataHash StandardCrypto datumHashFromBytes :: ByteString -> Maybe DatumHash -datumHashFromBytes = - fmap unsafeMakeSafeHash <$> Crypto.hashFromBytes +datumHashFromBytes = fmap unsafeMakeSafeHash <$> Crypto.hashFromBytes datumHashToBytes :: SafeHash crypto a -> ByteString datumHashToBytes = Crypto.hashToBytes . extractHash @@ -724,9 +582,10 @@ recentEraToBabbageTxOut (TxOutInRecentEra addr val datum mscript) = Alonzo.DatumHash h Alonzo.Datum binaryData -> Alonzo.Datum (coerce binaryData) + castScript :: AlonzoScript StandardConway -> AlonzoScript StandardBabbage castScript = \case Alonzo.TimelockScript timelockEra -> - Alonzo.TimelockScript (coerce timelockEra) + Alonzo.TimelockScript (translateTimelock timelockEra) Alonzo.PlutusScript l bs -> Alonzo.PlutusScript l bs @@ -758,7 +617,7 @@ computeMinimumCoinForTxOut -> TxOut (ShelleyLedgerEra era) -> Coin computeMinimumCoinForTxOut era pp out = withConstraints era $ - evaluateMinLovelaceOutput pp (withMaxLengthSerializedCoin out) + Core.getMinCoinTxOut pp (withMaxLengthSerializedCoin out) where withMaxLengthSerializedCoin :: TxOut (ShelleyLedgerEra era) @@ -777,7 +636,7 @@ isBelowMinimumCoinForTxOut era pp out = where -- IMPORTANT to use the exact minimum from the ledger function, and not our -- overestimating 'computeMinimumCoinForTxOut'. - requiredMin = withConstraints era $ evaluateMinLovelaceOutput pp out + requiredMin = withConstraints era $ Core.getMinCoinTxOut pp out actualCoin = getCoin era out getCoin :: RecentEra era -> TxOut (ShelleyLedgerEra era) -> Coin @@ -811,21 +670,6 @@ utxoFromTxOutsInRecentEra era = withConstraints era $ -- Tx -------------------------------------------------------------------------------- -modifyTxOutputs - :: RecentEra era - -> (TxOut (ShelleyLedgerEra era) -> TxOut (ShelleyLedgerEra era)) - -> Core.TxBody (ShelleyLedgerEra era) - -> Core.TxBody (ShelleyLedgerEra era) -modifyTxOutputs era f body = case era of - RecentEraConway -> body - { Babbage.outputs = mapSized f <$> Babbage.outputs body - } - RecentEraBabbage -> body - { Babbage.outputs = mapSized f <$> Babbage.outputs body - } - where - mapSized f' = mkSized . f' . sizedValue - txBody :: RecentEra era -> Core.Tx (ShelleyLedgerEra era) @@ -839,8 +683,8 @@ outputs :: RecentEra era -> Core.TxBody (ShelleyLedgerEra era) -> [TxOut (ShelleyLedgerEra era)] -outputs RecentEraConway = map sizedValue . toList . Conway.outputs -outputs RecentEraBabbage = map sizedValue . toList . Babbage.outputs +outputs RecentEraConway = map sizedValue . toList . Conway.ctbOutputs +outputs RecentEraBabbage = map sizedValue . toList . Babbage.btbOutputs -- NOTE: To reduce the need for the caller to deal with @CardanoApiEra -- (ShelleyLedgerEra era) ~ era@, we quantify this function over @cardanoEra@ @@ -874,8 +718,7 @@ modifyLedgerBody f (Cardano.Tx body keyWits) = Cardano.Tx body' keyWits validity emptyTx :: RecentEra era -> Core.Tx (ShelleyLedgerEra era) -emptyTx era = withConstraints era $ - Core.mkBasicTx Core.mkBasicTxBody +emptyTx era = withConstraints era $ Core.mkBasicTx Core.mkBasicTxBody -------------------------------------------------------------------------------- -- Compatibility @@ -918,9 +761,7 @@ fromCardanoUTxO = withConstraints (recentEra @era) $ Shelley.UTxO . Map.mapKeys Cardano.toShelleyTxIn . Map.map (Cardano.toShelleyTxOut (shelleyBasedEra @era)) - . unCardanoUTxO - where - unCardanoUTxO (Cardano.UTxO m) = m + . Cardano.unUTxO toCardanoValue :: forall era. IsRecentEra era @@ -940,17 +781,22 @@ newtype FeePerByte = FeePerByte Natural deriving (Show, Eq) getFeePerByte - :: RecentEra era + :: HasCallStack + => RecentEra era -> Core.PParams (Cardano.ShelleyLedgerEra era) -> FeePerByte -getFeePerByte era pp = FeePerByte $ case era of - RecentEraConway -> pp ^. #_minfeeA - RecentEraBabbage -> pp ^. #_minfeeA +getFeePerByte era pp = + unsafeCoinToFee $ + case era of + RecentEraConway -> pp ^. Core.ppMinFeeAL + RecentEraBabbage -> pp ^. Core.ppMinFeeAL + where + unsafeCoinToFee :: Coin -> FeePerByte + unsafeCoinToFee = unCoin >>> intCastMaybe >>> \case + Just fee -> FeePerByte fee + Nothing -> error "Impossible: min fee protocol parameter is negative" -feeOfBytes - :: FeePerByte - -> Natural - -> Coin +feeOfBytes :: FeePerByte -> Natural -> Coin feeOfBytes (FeePerByte perByte) bytes = Coin $ intCast $ perByte * bytes type ExUnitPrices = Alonzo.Prices @@ -961,18 +807,13 @@ txscriptfee :: ExUnitPrices -> ExUnits -> Coin txscriptfee = Alonzo.txscriptfee maxScriptExecutionCost - :: RecentEra era - -> Core.PParams (ShelleyLedgerEra era) - -> Coin + :: RecentEra era -> Core.PParams (ShelleyLedgerEra era) -> Coin maxScriptExecutionCost era pp = withConstraints era $ - txscriptfee (pp ^. #_prices) (pp ^. #_maxTxExUnits) + txscriptfee (pp ^. Alonzo.ppPricesL) (pp ^. Alonzo.ppMaxTxExUnitsL) stakeKeyDeposit - :: RecentEra era - -> Core.PParams (Cardano.ShelleyLedgerEra era) - -> Coin -stakeKeyDeposit era pp = withConstraints era $ - pp ^. #_keyDeposit + :: RecentEra era -> Core.PParams (Cardano.ShelleyLedgerEra era) -> Coin +stakeKeyDeposit era pp = withConstraints era $ pp ^. Core.ppKeyDepositL -------------------------------------------------------------------------------- -- Balancing @@ -998,8 +839,7 @@ evaluateMinimumFee era pp tx kwc = FeePerByte feePerByte = getFeePerByte era pp bootWitnessFee :: Coin - bootWitnessFee = Coin $ - intCast $ feePerByte * byteCount + bootWitnessFee = Coin $ intCast $ feePerByte * byteCount where byteCount :: Natural byteCount = sizeOf_BootstrapWitnesses $ intCast nBootstrapWits @@ -1023,16 +863,31 @@ evaluateMinimumFee era pp tx kwc = -- is not automatically the minimum fee. -- evaluateTransactionBalance - :: RecentEra era + :: forall era + . RecentEra era -> Core.PParams (Cardano.ShelleyLedgerEra era) -> Shelley.UTxO (Cardano.ShelleyLedgerEra era) -> Core.TxBody (Cardano.ShelleyLedgerEra era) -> Core.Value (Cardano.ShelleyLedgerEra era) evaluateTransactionBalance era pp utxo = withConstraints era $ - Shelley.evaluateTransactionBalance pp utxo isNewPool - where - isNewPool = - -- TODO: ADP-2651 - -- Pass this parameter in as a function instead of hard-coding the - -- value here: - const True + let -- Looks up the current deposit amount for a registered stake credential + -- delegation. + -- + -- This function must produce a valid answer for all stake credentials + -- present in any of the 'DeRegKey' delegation certificates in the + -- supplied 'TxBody'. In other words, there is no requirement to know + -- about all of the delegation certificates in the ledger state, + -- just those this transaction cares about. + lookupRefund :: Core.StakeCredential StandardCrypto -> Maybe Coin + lookupRefund _stakeCred = Just $ pp ^. Core.ppKeyDepositL + + -- Checks whether a pool with a supplied 'PoolStakeId' is already + -- registered. + -- + -- There is no requirement to answer this question for all stake pool + -- credentials, just those that have their registration certificates + -- included in the supplied 'TxBody'. + isRegPoolId :: Ledger.KeyHash 'Ledger.StakePool StandardCrypto -> Bool + isRegPoolId _keyHash = True + + in Ledger.evalBalanceTxBody pp lookupRefund isRegPoolId utxo diff --git a/lib/wallet/src/Cardano/Wallet/Write/Tx/Balance.hs b/lib/wallet/src/Cardano/Wallet/Write/Tx/Balance.hs index a4455733385..86f308a4d7a 100644 --- a/lib/wallet/src/Cardano/Wallet/Write/Tx/Balance.hs +++ b/lib/wallet/src/Cardano/Wallet/Write/Tx/Balance.hs @@ -3,6 +3,7 @@ {-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE EmptyCase #-} {-# LANGUAGE ExistentialQuantification #-} +{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NamedFieldPuns #-} @@ -54,6 +55,10 @@ import Cardano.BM.Data.Tracer ( HasPrivacyAnnotation, HasSeverityAnnotation, Tracer ) import Cardano.BM.Tracing ( HasSeverityAnnotation (..), Severity (..), traceWith ) +import Cardano.Ledger.Alonzo.Core + ( ppCollateralPercentageL, ppMaxCollateralInputsL ) +import Cardano.Ledger.Api + ( outputsTxBodyL, ppMaxTxSizeL, ppMaxValSizeL ) import Cardano.Tx.Balance.Internal.CoinSelection ( Selection , SelectionBalanceError (..) @@ -128,10 +133,10 @@ import Cardano.Wallet.Write.Tx , maxScriptExecutionCost , modifyLedgerBody , modifyTxOutCoin - , modifyTxOutputs , outputs , toCardanoValue , txBody + , withConstraints ) import Cardano.Wallet.Write.Tx.TimeTranslation ( TimeTranslation ) @@ -159,8 +164,6 @@ import Data.Generics.Internal.VL.Lens ( over, view, (^.) ) import Data.Generics.Labels () -import Data.Generics.Product - ( getField ) import Data.IntCast ( intCastMaybe ) import Data.List.NonEmpty @@ -198,14 +201,14 @@ import qualified Cardano.Api as Cardano import qualified Cardano.Api.Byron as Cardano import qualified Cardano.Api.Shelley as Cardano import qualified Cardano.Wallet.Primitive.Types.Address as W -import qualified Cardano.Wallet.Primitive.Types.Coin as W import qualified Cardano.Wallet.Primitive.Types.Coin as Coin +import qualified Cardano.Wallet.Primitive.Types.Coin as W import qualified Cardano.Wallet.Primitive.Types.TokenBundle as TokenBundle import qualified Cardano.Wallet.Primitive.Types.Tx as W import qualified Cardano.Wallet.Primitive.Types.Tx.TxIn as W import qualified Cardano.Wallet.Primitive.Types.Tx.TxOut as W -import qualified Cardano.Wallet.Primitive.Types.UTxO as W import qualified Cardano.Wallet.Primitive.Types.UTxO as UTxO +import qualified Cardano.Wallet.Primitive.Types.UTxO as W import qualified Cardano.Wallet.Primitive.Types.UTxOIndex as UTxOIndex import qualified Cardano.Wallet.Primitive.Types.UTxOSelection as UTxOSelection import qualified Cardano.Wallet.Shelley.Compatibility as Compatibility @@ -384,9 +387,8 @@ balanceTransaction s partialTx = do - let adjustedPartialTx = over #tx - (increaseZeroAdaOutputs (recentEra @era) (pparamsLedger pp)) - partialTx + let adjustedPartialTx = + over #tx (increaseZeroAdaOutputs (recentEra @era) (pparamsLedger pp)) partialTx let balanceWith strategy = balanceTransactionWithSelectionStrategyAndNoZeroAdaAdjustment @era @m @changeState @@ -458,16 +460,16 @@ balanceTransaction -- | Increases the ada value of any 0-ada outputs in the transaction to the -- minimum according to 'computeMinimumCoinForTxOut'. increaseZeroAdaOutputs - :: forall era. RecentEra era + :: forall era + . RecentEra era -> PParams (Cardano.ShelleyLedgerEra era) -> Cardano.Tx era -> Cardano.Tx era -increaseZeroAdaOutputs era pp = modifyLedgerBody $ - modifyTxOutputs era $ \out -> - flip (modifyTxOutCoin era) out $ \c -> - if c == mempty - then computeMinimumCoinForTxOut era pp out - else c +increaseZeroAdaOutputs era pp = withConstraints era $ + modifyLedgerBody $ over outputsTxBodyL $ fmap modifyTxOut + where + modifyTxOut out = flip (modifyTxOutCoin era) out $ \c -> + if c == mempty then computeMinimumCoinForTxOut era pp out else c -- | Internal helper to 'balanceTransaction' balanceTransactionWithSelectionStrategyAndNoZeroAdaAdjustment @@ -688,15 +690,12 @@ balanceTransactionWithSelectionStrategyAndNoZeroAdaAdjustment :: KeyWitnessCount -> Cardano.Tx era -> ExceptT ErrBalanceTx m (Cardano.Tx era) - guardTxSize witCount tx@(Cardano.Tx body _noKeyWits) = do - let size = estimateSignedTxSize pp witCount body - let maxSize = TxSize $ case (recentEra @era) of - RecentEraBabbage -> pp ^. #_maxTxSize - RecentEraConway -> pp ^. #_maxTxSize - - when (size > maxSize) $ - throwE ErrBalanceTxMaxSizeLimitExceeded - return tx + guardTxSize witCount tx@(Cardano.Tx body _noKeyWits) = + withConstraints (recentEra @era) $ do + let maxSize = TxSize (pp ^. ppMaxTxSizeL) + when (estimateSignedTxSize pp witCount body > maxSize) $ + throwE ErrBalanceTxMaxSizeLimitExceeded + pure tx guardTxBalanced :: Cardano.Tx era -> ExceptT ErrBalanceTx m (Cardano.Tx era) guardTxBalanced tx = do @@ -844,7 +843,8 @@ balanceTransactionWithSelectionStrategyAndNoZeroAdaAdjustment -- transaction. For this, and other reasons, the selection may include too -- much ada. selectAssets - :: forall era changeState. RecentEra era + :: forall era changeState + . RecentEra era -> ProtocolParameters era -> UTxOAssumptions -> [W.TxOut] @@ -866,13 +866,11 @@ selectAssets era (ProtocolParameters pp) utxoAssumptions outs redeemers where selectionConstraints = SelectionConstraints { assessTokenBundleSize = - let maxBundleSize = TokenBundleMaxSize $ TxSize $ case era of - RecentEraBabbage -> pp ^. #_maxValSize - RecentEraConway -> pp ^. #_maxValSize - in - view #assessTokenBundleSize $ - Compatibility.tokenBundleSizeAssessor maxBundleSize - -- TODO (ADP-2967): avoid importing Compatibility. + withConstraints era $ + -- TODO (ADP-2967): avoid importing Compatibility. + Compatibility.tokenBundleSizeAssessor + (TokenBundleMaxSize (TxSize (pp ^. ppMaxValSizeL))) + ^. #assessTokenBundleSize , computeMinimumAdaQuantity = \addr tokens -> W.toWallet $ computeMinimumCoinForTxOut era @@ -895,18 +893,12 @@ selectAssets era (ProtocolParameters pp) utxoAssumptions outs redeemers assumedInputScriptTemplate utxoAssumptions }) skeleton ] `Coin.difference` boringFee - , maximumCollateralInputCount = unsafeIntCast @Natural @Int $ - case era of - RecentEraBabbage -> getField @"_maxCollateralInputs" pp - RecentEraConway -> getField @"_maxCollateralInputs" pp - + , maximumCollateralInputCount = withConstraints era $ + unsafeIntCast @Natural @Int $ pp ^. ppMaxCollateralInputsL , minimumCollateralPercentage = - case era of - -- case-statement avoids "Overlapping instances" problem. - -- May be avoidable with ADP-2353. - RecentEraBabbage -> getField @"_collateralPercentage" pp - RecentEraConway -> getField @"_collateralPercentage" pp - , maximumLengthChangeAddress = maxLengthChangeAddress changeGen + withConstraints era $ pp ^. ppCollateralPercentageL + , maximumLengthChangeAddress = + maxLengthChangeAddress changeGen } selectionParams = SelectionParams @@ -933,7 +925,8 @@ selectAssets era (ProtocolParameters pp) utxoAssumptions outs redeemers valueOfInputs = UTxOSelection.selectedBalance utxoSelection mkLedgerTxOut - :: RecentEra era + :: HasCallStack + => RecentEra era -> W.Address -> TokenBundle -> TxOut (ShelleyLedgerEra era) diff --git a/lib/wallet/src/Cardano/Wallet/Write/Tx/Gen.hs b/lib/wallet/src/Cardano/Wallet/Write/Tx/Gen.hs index 6573679290f..1738287207d 100644 --- a/lib/wallet/src/Cardano/Wallet/Write/Tx/Gen.hs +++ b/lib/wallet/src/Cardano/Wallet/Write/Tx/Gen.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE RankNTypes #-} {-# LANGUAGE TypeFamilies #-} -- | @@ -5,94 +6,30 @@ -- License: Apache-2.0 -- module Cardano.Wallet.Write.Tx.Gen - ( genDatum - , genBinaryData - , genDatumHash - , shrinkBinaryData - , shrinkDatum + ( genDatumHash , genTxOut ) where import Prelude -import Cardano.Ledger.Alonzo.Data - ( Data (..), dataToBinaryData ) import Cardano.Wallet.Write.Tx - ( BinaryData - , Datum (..) - , DatumHash - , LatestLedgerEra + ( DatumHash , RecentEra , ShelleyLedgerEra , TxOut , cardanoEraFromRecentEra - , datumFromCardanoScriptData , datumHashFromBytes - , datumToCardanoScriptData , shelleyBasedEraFromRecentEra ) -import Data.ByteString - ( ByteString ) import Data.Maybe ( fromMaybe ) -import Ouroboros.Consensus.Cardano.Block - ( EraCrypto, StandardCrypto ) import Test.QuickCheck - ( Gen - , arbitrary - , choose - , listOf - , oneof - , scale - , shrinkMapBy - , sized - , vector - , vectorOf - ) + ( Gen, arbitrary, vectorOf ) import qualified Cardano.Api.Gen as Cardano import qualified Cardano.Api.Shelley as Cardano import qualified Data.ByteString as BS -import qualified PlutusLedgerApi.V1 as PV1 - -genDatum :: (EraCrypto era ~ StandardCrypto) => Gen (Datum era) -genDatum = oneof - [ Datum <$> genBinaryData - , DatumHash <$> genDatumHash - , pure NoDatum - ] - --- Originally from https://github.com/input-output-hk/cardano-ledger/blob/c7c63dabdb215ebdaed8b63274965966f2bf408f/eras/alonzo/test-suite/src/Test/Cardano/Ledger/Alonzo/Serialisation/Generators.hs#L66-L79 -genBinaryData :: Gen (BinaryData era) -genBinaryData = dataToBinaryData . Data <$> scale (`div` 10) (sized gendata) - where - gendata n | n > 0 = oneof - [ PV1.I <$> arbitrary - , PV1.B <$> genByteString - , PV1.Map - <$> listOf ((,) <$> gendata (n `div` 2) <*> gendata (n `div` 2)) - , PV1.Constr - <$> fmap abs (arbitrary :: Gen Integer) - <*> listOf (gendata (n `div` 2)) - , PV1.List - <$> listOf (gendata (n `div` 2)) - ] - gendata _ = oneof [PV1.I <$> arbitrary, PV1.B <$> genByteString] - -shrinkDatum :: Datum LatestLedgerEra -> [Datum LatestLedgerEra] -shrinkDatum (Datum x) = NoDatum : map Datum (shrinkBinaryData x) -shrinkDatum (DatumHash _) = [NoDatum] -shrinkDatum NoDatum = [] - -shrinkBinaryData :: BinaryData era -> [BinaryData era] -shrinkBinaryData = shrinkMapBy - datumFromCardanoScriptData - datumToCardanoScriptData $ - shrinkMapBy - Cardano.unsafeHashableScriptData - Cardano.getScriptData - Cardano.shrinkScriptData genDatumHash :: Gen DatumHash genDatumHash = @@ -100,9 +37,6 @@ genDatumHash = . datumHashFromBytes . BS.pack <$> vectorOf 32 arbitrary -genByteString :: Gen ByteString -genByteString = BS.pack <$> (choose (0, 64) >>= vector) - genTxOut :: RecentEra era -> Gen (TxOut (ShelleyLedgerEra era)) genTxOut era = Cardano.toShelleyTxOut (shelleyBasedEraFromRecentEra era) <$> Cardano.genTxOut (cardanoEraFromRecentEra era) diff --git a/lib/wallet/src/Control/Monad/Fail/Extended.hs b/lib/wallet/src/Control/Monad/Fail/Extended.hs new file mode 100644 index 00000000000..3b78dbe7ea9 --- /dev/null +++ b/lib/wallet/src/Control/Monad/Fail/Extended.hs @@ -0,0 +1,13 @@ +{-# LANGUAGE DerivingVia #-} + +module Control.Monad.Fail.Extended + ( ReportFailure + , reportFailure + ) where + +import Prelude + +newtype ReportFailure a = ReportFailure { reportFailure :: Either String a } + deriving (Functor, Applicative, Monad) via (Either String) + +instance MonadFail ReportFailure where fail = ReportFailure . Left diff --git a/lib/wallet/test-common/Cardano/Wallet/DummyTarget/Primitive/Types.hs b/lib/wallet/test-common/Cardano/Wallet/DummyTarget/Primitive/Types.hs index 35bbd685e3a..edf37652ffc 100644 --- a/lib/wallet/test-common/Cardano/Wallet/DummyTarget/Primitive/Types.hs +++ b/lib/wallet/test-common/Cardano/Wallet/DummyTarget/Primitive/Types.hs @@ -106,9 +106,9 @@ dummyGenesisParameters = GenesisParameters dummySlottingParameters :: SlottingParameters dummySlottingParameters = SlottingParameters { getSlotLength = SlotLength 1 - , getEpochLength = EpochLength 21600 + , getEpochLength = EpochLength 21_600 , getActiveSlotCoefficient = ActiveSlotCoefficient 1 - , getSecurityParameter = Quantity 2160 + , getSecurityParameter = Quantity 2_160 } dummyTimeInterpreter :: Monad m => TimeInterpreter m @@ -120,7 +120,7 @@ dummyTimeInterpreter = hoistTimeInterpreter (pure . runIdentity) dummyTxParameters :: TxParameters dummyTxParameters = TxParameters { getFeePolicy = LinearFee $ LinearFunction { intercept = 14, slope = 42 } - , getTxMaxSize = Quantity 8192 + , getTxMaxSize = Quantity 8_192 , getTokenBundleMaxSize = TokenBundleMaxSize (TxSize 2_000) , getMaxExecutionUnits = ExecutionUnits 10 14 } @@ -145,23 +145,25 @@ dummyProtocolParameters = ProtocolParameters , executionUnitPrices = Just $ ExecutionUnitPrices { pricePerStep = 7.21e-5 - , pricePerMemoryUnit = 0.0577 + , pricePerMemoryUnit = 0.057_7 } , currentLedgerProtocolParameters = - Write.InRecentEraBabbage - $ Write.ProtocolParameters - $ C.toLedgerPParams C.ShelleyBasedEraBabbage dummyNodeProtocolParameters + Write.InRecentEraBabbage . Write.ProtocolParameters $ + either (error . show) id $ + C.toLedgerPParams + C.ShelleyBasedEraBabbage + dummyNodeProtocolParameters } -- | Dummy parameters that are consistent with the @dummy*@ parameters. dummyNodeProtocolParameters :: C.ProtocolParameters dummyNodeProtocolParameters = C.ProtocolParameters { C.protocolParamProtocolVersion = (8,0) - , C.protocolParamDecentralization = Just 1 + , C.protocolParamDecentralization =Just 1 , C.protocolParamExtraPraosEntropy = Nothing - , C.protocolParamMaxBlockHeaderSize = 1100 - , C.protocolParamMaxBlockBodySize = 90112 - , C.protocolParamMaxTxSize = 8192 + , C.protocolParamMaxBlockHeaderSize = 1_100 + , C.protocolParamMaxBlockBodySize = 90_112 + , C.protocolParamMaxTxSize = 8_192 , C.protocolParamTxFeeFixed = 14 -- B , C.protocolParamTxFeePerByte = 42 -- A , C.protocolParamMinUTxOValue = Nothing @@ -173,13 +175,13 @@ dummyNodeProtocolParameters = C.ProtocolParameters , C.protocolParamPoolPledgeInfluence = 0.3 -- a0 , C.protocolParamMonetaryExpansion = 0.003 -- rho , C.protocolParamTreasuryCut = 0.20 -- tau - , C.protocolParamUTxOCostPerWord = Just $ C.Lovelace 34482 - , C.protocolParamUTxOCostPerByte = Just $ C.Lovelace 4310 + , C.protocolParamUTxOCostPerWord = Just $ C.Lovelace 34_482 + , C.protocolParamUTxOCostPerByte = Just $ C.Lovelace 43_10 , C.protocolParamCostModels = mempty , C.protocolParamPrices = Just $ C.ExecutionUnitPrices { C.priceExecutionSteps = 7.21e-5 - , C.priceExecutionMemory = 0.0577 + , C.priceExecutionMemory = 0.057_7 } , C.protocolParamMaxTxExUnits = Just $ C.ExecutionUnits @@ -260,10 +262,10 @@ babbageMainnetProtocolParameters = C.ProtocolParameters { C.protocolParamProtocolVersion = (8,0) , C.protocolParamDecentralization = Just 0 , C.protocolParamExtraPraosEntropy = Nothing - , C.protocolParamMaxBlockHeaderSize = 1100 - , C.protocolParamMaxBlockBodySize = 90112 - , C.protocolParamMaxTxSize = 16384 - , C.protocolParamTxFeeFixed = 155381 -- B + , C.protocolParamMaxBlockHeaderSize = 1_100 + , C.protocolParamMaxBlockBodySize = 90_112 + , C.protocolParamMaxTxSize = 16_384 + , C.protocolParamTxFeeFixed = 155_381 -- B , C.protocolParamTxFeePerByte = 44 -- A , C.protocolParamMinUTxOValue = Just $ C.Lovelace 1_000_000 , C.protocolParamStakeAddressDeposit = C.Lovelace 2_000_000 @@ -274,15 +276,15 @@ babbageMainnetProtocolParameters = C.ProtocolParameters , C.protocolParamPoolPledgeInfluence = 0.3 -- a0 , C.protocolParamMonetaryExpansion = 0.003 -- rho , C.protocolParamTreasuryCut = 0.20 -- tau - , C.protocolParamUTxOCostPerWord = Just $ C.Lovelace 34482 - , C.protocolParamUTxOCostPerByte = Just $ C.Lovelace 4310 + , C.protocolParamUTxOCostPerWord = Just $ C.Lovelace 34_482 + , C.protocolParamUTxOCostPerByte = Just $ C.Lovelace 4_310 , C.protocolParamCostModels = mempty -- TODO: Include a Plutus cost model here. , C.protocolParamPrices = Just $ C.ExecutionUnitPrices { C.priceExecutionSteps = 7.21e-5 - , C.priceExecutionMemory = 0.0577 + , C.priceExecutionMemory = 0.057_7 } , C.protocolParamMaxTxExUnits = Just $ C.ExecutionUnits diff --git a/lib/wallet/test/data/Cardano/CLISpec/key --help b/lib/wallet/test/data/Cardano/CLISpec/key --help index 4418e3b2251..055c9742d10 100644 --- a/lib/wallet/test/data/Cardano/CLISpec/key --help +++ b/lib/wallet/test/data/Cardano/CLISpec/key --help @@ -18,22 +18,22 @@ Available commands: a given key Example: - $ cardano-wallet recovery-phrase generate --size 15 \ - | cardano-wallet key from-recovery-phrase Shelley > root.prv + $ cardano-wallet recovery-phrase generate --size 15 \ + | cardano-wallet key from-recovery-phrase Shelley > root.prv - $ cat root.prv \ - | cardano-wallet key child 1852H/1815H/0H \ - | tee acct.prv \ - | cardano-wallet key public --with-chain-code > acct.pub + $ cat root.prv \ + | cardano-wallet key child 1852H/1815H/0H \ + | tee acct.prv \ + | cardano-wallet key public --with-chain-code > acct.pub - $ cardano-wallet key inspect <<< $(cat acct.prv) + $ cardano-wallet key inspect <<< $(cat acct.prv) { "key_type": "private", "chain_code": "67bef6f80df02c7452e20e76ffb4bb57cae8aac2adf042b21a6b19e4f7b1f511", "extended_key": "90ead3efad7aacac242705ede323665387f49ed847bed025eb333708ccf6aa54403482a867daeb18f38c57d6cddd7e6fd6aed4a3209f7425a3d1c5d9987a9c5f" } - $ cardano-wallet key inspect <<< $(cat acct.pub) + $ cardano-wallet key inspect <<< $(cat acct.pub) { "key_type": "public", "chain_code": "67bef6f80df02c7452e20e76ffb4bb57cae8aac2adf042b21a6b19e4f7b1f511", diff --git a/lib/wallet/test/data/Cardano/CLISpec/key from-recovery-phrase --help b/lib/wallet/test/data/Cardano/CLISpec/key from-recovery-phrase --help index 2b7dbd531be..a043469b332 100644 --- a/lib/wallet/test/data/Cardano/CLISpec/key from-recovery-phrase --help +++ b/lib/wallet/test/data/Cardano/CLISpec/key from-recovery-phrase --help @@ -25,27 +25,27 @@ Available options: The recovery phrase without passphrase is read from stdin. Example: - $ cardano-wallet recovery-phrase generate \ - | cardano-wallet key from-recovery-phrase Icarus + $ cardano-wallet recovery-phrase generate \ + | cardano-wallet key from-recovery-phrase Icarus The recovery phrase with passphrase can be entered interactively or from file. In both cases passhrase can take form of mnemonic, base16, base64, utf8 or octet array. In interactive case one can select explicit, sensitive or silent mode. Example: - $ cardano-wallet key from-recovery-phrase Shelley --passphrase from-mnemonic --sensitive - Please enter a [9, 12, 15, 18, 21, 24] word mnemonic: - ********************************************************************************************************** - Please enter a 9–12 word second factor: - ************************************************************* + $ cardano-wallet key from-recovery-phrase Shelley --passphrase from-mnemonic --sensitive + Please enter a [9, 12, 15, 18, 21, 24] word mnemonic: + ********************************************************************************************************** + Please enter a 9–12 word second factor: + ************************************************************* In case of passphrase reading from file the recovery phrase is read from stdin. Example: - $ echo "Secret Secondary Phrase" > sndfactor.prv - $ cardano-wallet recovery-phrase generate \ - | cardano-wallet key from-recovery-phrase Shelley --from-file "./sndfactor.prv" + $ echo "Secret Secondary Phrase" > sndfactor.prv + $ cardano-wallet recovery-phrase generate \ + | cardano-wallet key from-recovery-phrase Shelley --from-file "./sndfactor.prv" - $ cardano-wallet recovery-phrase generate --size 12 > sndfactor.prv - $ cardano-wallet recovery-phrase generate \ - | cardano-wallet key from-recovery-phrase Shelley --passphrase from-mnemonic --from-file "./sndfactor.prv" + $ cardano-wallet recovery-phrase generate --size 12 > sndfactor.prv + $ cardano-wallet recovery-phrase generate \ + | cardano-wallet key from-recovery-phrase Shelley --passphrase from-mnemonic --from-file "./sndfactor.prv" diff --git a/lib/wallet/test/data/Cardano/Wallet/Api/AddressAmountApiAddressTestnet0.json b/lib/wallet/test/data/Cardano/Wallet/Api/AddressAmountApiAddressTestnet0.json index bb17f19e167..1ce5a6105fe 100644 --- a/lib/wallet/test/data/Cardano/Wallet/Api/AddressAmountApiAddressTestnet0.json +++ b/lib/wallet/test/data/Cardano/Wallet/Api/AddressAmountApiAddressTestnet0.json @@ -1,155 +1,248 @@ { "samples": [ { - "address": "FHnt4NL7yPXzvE3gb7y7fniNKt2qTvPwvAyL1u4vEDCAQwypezp5Vtu1r2mQ4wS", + "address": "FHnt4NL7yPYDtTiwyUHRsF9Vg3Gq7L5ZG6DcKY7mq3AkMQcTcFN4K6mLnvofMWi", "amount": { - "quantity": 30, - "unit": "lovelace" - }, - "assets": [ - { - "asset_name": "546f6b656e42", - "policy_id": "44444444444444444444444444444444444444444444444444444444", - "quantity": 27 - } - ] - }, - { - "address": "FHnt4NL7yPYFJCDmgjVtzpFBaEov9fiWivPTaeg6SEbruCxC7rinF6qSwuJMGfH", - "amount": { - "quantity": 127, + "quantity": 105, "unit": "lovelace" }, "assets": [] }, { - "address": "addr_test1vp6auejkzxqelpl58x3dhsm4mnw2jmjr26k5z4d8fzvs5mc3cta8k", + "address": "addr_test1zp9t8gvd0zwxl07erp9duxlx5gcnyvjjwwkt4rtfykvv2yt49qysdljmw6t35j2uknu3pfwwlwtvjfellasw7wlay4vqku7upx", "amount": { - "quantity": 155, + "quantity": 71, "unit": "lovelace" }, "assets": [ { "asset_name": "546f6b656e42", + "policy_id": "00000000000000000000000000000000000000000000000000000000", + "quantity": 6 + }, + { + "asset_name": "546f6b656e45", + "policy_id": "00000000000000000000000000000000000000000000000000000000", + "quantity": 43 + }, + { + "asset_name": "546f6b656e41", + "policy_id": "11111111111111111111111111111111111111111111111111111111", + "quantity": 22 + }, + { + "asset_name": "546f6b656e43", + "policy_id": "11111111111111111111111111111111111111111111111111111111", + "quantity": 20 + }, + { + "asset_name": "546f6b656e44", + "policy_id": "11111111111111111111111111111111111111111111111111111111", + "quantity": 2 + }, + { + "asset_name": "546f6b656e43", + "policy_id": "22222222222222222222222222222222222222222222222222222222", + "quantity": 20 + }, + { + "asset_name": "546f6b656e42", + "policy_id": "33333333333333333333333333333333333333333333333333333333", + "quantity": 8 + }, + { + "asset_name": "546f6b656e43", + "policy_id": "33333333333333333333333333333333333333333333333333333333", + "quantity": 11 + }, + { + "asset_name": "546f6b656e45", + "policy_id": "33333333333333333333333333333333333333333333333333333333", + "quantity": 18 + }, + { + "asset_name": "546f6b656e41", + "policy_id": "44444444444444444444444444444444444444444444444444444444", + "quantity": 42 + }, + { + "asset_name": "546f6b656e45", "policy_id": "44444444444444444444444444444444444444444444444444444444", - "quantity": 4 + "quantity": 28 } ] }, { - "address": "addr_test1wq6npny6ulegj5g34xdh5qscfhtupn48gf83vvkh89gmr4cl3n4xr", + "address": "FHnt4NL7yPXrXarH19Kj6Arkc3NuNNVa45zLuk3oLbdSAVt5sTKsFcUZwPxPGeQ", "amount": { - "quantity": 67, + "quantity": 248, "unit": "lovelace" }, - "assets": [] + "assets": [ + { + "asset_name": "546f6b656e41", + "policy_id": "22222222222222222222222222222222222222222222222222222222", + "quantity": 23 + } + ] }, { - "address": "FHnt4NL7yPXx8LjAcn4PMExe6Cngy8ZtxMWDx2zobCbPJAxCAymD6CT8JFubBkh", + "address": "FHnt4NL7yPXoWDnzCp17wxc7KNpZbNEc6GU3g47BiS6Y8JbL3Dhtiyu84dcdXUJ", "amount": { - "quantity": 67, + "quantity": 116, "unit": "lovelace" }, "assets": [ { "asset_name": "546f6b656e41", "policy_id": "00000000000000000000000000000000000000000000000000000000", - "quantity": 30 + "quantity": 21 + }, + { + "asset_name": "546f6b656e42", + "policy_id": "00000000000000000000000000000000000000000000000000000000", + "quantity": 28 + }, + { + "asset_name": "546f6b656e43", + "policy_id": "00000000000000000000000000000000000000000000000000000000", + "quantity": 21 + }, + { + "asset_name": "546f6b656e44", + "policy_id": "00000000000000000000000000000000000000000000000000000000", + "quantity": 47 + }, + { + "asset_name": "546f6b656e41", + "policy_id": "11111111111111111111111111111111111111111111111111111111", + "quantity": 46 + }, + { + "asset_name": "546f6b656e43", + "policy_id": "11111111111111111111111111111111111111111111111111111111", + "quantity": 2 }, { "asset_name": "546f6b656e45", "policy_id": "11111111111111111111111111111111111111111111111111111111", - "quantity": 5 + "quantity": 9 }, { "asset_name": "546f6b656e42", "policy_id": "22222222222222222222222222222222222222222222222222222222", - "quantity": 28 + "quantity": 26 }, { - "asset_name": "546f6b656e44", + "asset_name": "546f6b656e45", "policy_id": "22222222222222222222222222222222222222222222222222222222", - "quantity": 10 + "quantity": 8 }, { "asset_name": "546f6b656e41", "policy_id": "33333333333333333333333333333333333333333333333333333333", - "quantity": 27 - }, - { - "asset_name": "546f6b656e42", - "policy_id": "33333333333333333333333333333333333333333333333333333333", - "quantity": 1 + "quantity": 11 }, { "asset_name": "546f6b656e43", "policy_id": "33333333333333333333333333333333333333333333333333333333", - "quantity": 6 + "quantity": 13 }, { "asset_name": "546f6b656e45", "policy_id": "33333333333333333333333333333333333333333333333333333333", - "quantity": 22 + "quantity": 17 }, { - "asset_name": "546f6b656e41", + "asset_name": "546f6b656e44", "policy_id": "44444444444444444444444444444444444444444444444444444444", - "quantity": 70 + "quantity": 10 } ] }, { - "address": "FHnt4NL7yPY2FAEFbk4upm5C2oXUYJdTZ9pv92oaXYcSnDHpTgN4TeEaXxQ9fxw", + "address": "FHnt4NL7yPYFtHiixzUQMrDgKGhCu5P5JeeokwnaRe7FS8w1QMPrJ1xRNQwDf7q", "amount": { - "quantity": 156, + "quantity": 130, "unit": "lovelace" }, "assets": [] }, { - "address": "FHnt4NL7yPXs3yL5u8dMf6Vrrq7kX3jtckgvuQs1cxo2FRrADi6BJ3Z1acFPbAP", + "address": "addr_test1yqaennk7ruww79lweka48y2qsca4ul8htj0gmxdmhz90s9h20wttw6ggypuveeyvd6jnvxdthzpgkfp4mh29pacvh2fsc3xqjj", "amount": { - "quantity": 155, + "quantity": 30, "unit": "lovelace" }, "assets": [ { - "asset_name": "546f6b656e45", + "asset_name": "546f6b656e41", + "policy_id": "00000000000000000000000000000000000000000000000000000000", + "quantity": 29 + }, + { + "asset_name": "546f6b656e42", + "policy_id": "00000000000000000000000000000000000000000000000000000000", + "quantity": 14 + } + ] + }, + { + "address": "FHnt4NL7yPYDxybpta7AdJPEdUuXT5sAj4QWGUagVGGwmuu9AK4bMMHFCVDVAAp", + "amount": { + "quantity": 250, + "unit": "lovelace" + }, + "assets": [ + { + "asset_name": "546f6b656e43", "policy_id": "11111111111111111111111111111111111111111111111111111111", - "quantity": 7 + "quantity": 18 } ] }, { - "address": "addr_test1wr2yzgn42ws0r2t9lmnavzs0wf9ndrw3hhduyzrnplxwhncaya5f8", + "address": "FHnt4NL7yPXhTjwx3yiix7LamaeF5n1P18uP9WAavqxedxud7rFcwoKPX3S1Ztp", "amount": { - "quantity": 64, + "quantity": 240, "unit": "lovelace" }, - "assets": [] + "assets": [ + { + "asset_name": "546f6b656e44", + "policy_id": "22222222222222222222222222222222222222222222222222222222", + "quantity": 27 + } + ] }, { - "address": "FHnt4NL7yPYEYJQLAtGZi168m7PvtHHQ8bjw56QGqmPtLec6mdE7UhC6yUca2Dg", + "address": "addr_test1vqzhvnqynp72c4943vcnpdg4aru9g3qsv8q57ty7qvtnkdgty8mm9", "amount": { - "quantity": 252, + "quantity": 232, "unit": "lovelace" }, - "assets": [] + "assets": [ + { + "asset_name": "546f6b656e44", + "policy_id": "33333333333333333333333333333333333333333333333333333333", + "quantity": 18 + } + ] }, { - "address": "addr_test12q6qs5ctdl5z4uxedpfl5m9ladta0xyxfqvxvetxz86qy5upk9vcdmhrfzpapvmfudmnkl", + "address": "FHnt4NL7yPY86y8JXyzTrF2rPerZAPQr8DJe7Yb2Q1x2j3E2krtvE1cgisN7bHN", "amount": { - "quantity": 148, + "quantity": 195, "unit": "lovelace" }, "assets": [ { - "asset_name": "546f6b656e41", - "policy_id": "11111111111111111111111111111111111111111111111111111111", - "quantity": 27 + "asset_name": "546f6b656e42", + "policy_id": "33333333333333333333333333333333333333333333333333333333", + "quantity": 28 } ] } ], - "seed": 1190184784 + "seed": 958472253 } \ No newline at end of file diff --git a/lib/wallet/test/data/Cardano/Wallet/Api/AddressAmountNoAssetsApiAddressTestnet0.json b/lib/wallet/test/data/Cardano/Wallet/Api/AddressAmountNoAssetsApiAddressTestnet0.json index 9db139e67b0..fd9447a7e8d 100644 --- a/lib/wallet/test/data/Cardano/Wallet/Api/AddressAmountNoAssetsApiAddressTestnet0.json +++ b/lib/wallet/test/data/Cardano/Wallet/Api/AddressAmountNoAssetsApiAddressTestnet0.json @@ -1,75 +1,75 @@ { "samples": [ { - "address": "addr_test1xpcc26tu6nrwdvwc37uummktlwr4d2w34c8t0chjpdyt0004d32r22czvflhd02wd4ycgl3m9h7t80nhd9wgu6cmah9q3c5uyw", + "address": "addr_test1vp779yvkwhjdvxxs0p8puu97ffyekmlu23vqlfawhyuqepcpd7skq", "amount": { - "quantity": 35, + "quantity": 0, "unit": "lovelace" } }, { - "address": "addr_test1yrqp6xsnr9r97xz40lxc05t5xe6utkmc655ax2hsx0737ylsc7atug0fgzjxqsg4798ety0vpmngk5munmp5ahchk4asze8k8w", + "address": "addr_test1wqeaea5nz8xsjt2hz7yx7lk4slrjlu4kdf6j08xg5eqvkgs92kf0q", "amount": { - "quantity": 203, + "quantity": 108, "unit": "lovelace" } }, { - "address": "FHnt4NL7yPYD7ooKdWtK3mSWNt3ZERBVYhf8dMUYbDuKxuFbxd3dVHAduqJaJXm", + "address": "addr_test1yprk36uqe5sxndkzglj3035qzwjg4wu8u8s29mx5ke9a4f2vyywz57h0cehw2v6mtkatym2fwx0s3xl6ypxvx3sctseqnvpqpj", "amount": { - "quantity": 55, + "quantity": 68, "unit": "lovelace" } }, { - "address": "addr_test1yqehl4kpxj4fk4whx7yfk2lunqkle7y5uwv48wer2zdv9w3j3jgp7ptzptj7tsjesxq3ehpgg02a9sanw2s3nxu6zhqsjjttru", + "address": "addr_test1wp89txjaxzwe4ml9ct4j7cuv7hl9gssuh3kva3ckntws99quupk0v", "amount": { - "quantity": 209, + "quantity": 111, "unit": "lovelace" } }, { - "address": "FHnt4NL7yPXzE3MuV27ryjvz8wVbysNjowffii1BsTauZ7aB88W7uj95NGLGRDB", + "address": "FHnt4NL7yPXtXCrosBd6cVBNctsgt6ESbQi6hs3t4DWhh5kCxWRHfZaUELRu3C4", "amount": { - "quantity": 64, + "quantity": 211, "unit": "lovelace" } }, { - "address": "FHnt4NL7yPY2VxFJfLtUHxHcSHGYis4jdbrpBDM4bH4DRiBekXut6TgwwDuob19", + "address": "FHnt4NL7yPXrm43G64XwvSikAKwVsREXfgSFdBPmvUCYwoiJEmaw91Yffb4itCe", "amount": { - "quantity": 16, + "quantity": 135, "unit": "lovelace" } }, { - "address": "addr_test1ypxauhfwjdv3g8ygn5et55ftkphls0tjnktga4luwc5mfa75gy3825aq7x5ktlh86c9q7ujtx6xar0wmcgy8xr7va08s0tcl6c", + "address": "FHnt4NL7yPXgYyWxE8NMoFJeN6vLE5nwK5BHStyRQSBhb9VQhnJBYPvjc8kQivG", "amount": { - "quantity": 242, + "quantity": 244, "unit": "lovelace" } }, { - "address": "addr_test1vpxj0mlrv4s7ut6xcqdzgkqwn57k6vv580sp6vjswhy5j6gk2aeyr", + "address": "FHnt4NL7yPXvQWiagV5reanZQMa9A9JTY1xtKBzN1hKihj8aNrWxZZYfgBEiqT7", "amount": { - "quantity": 34, + "quantity": 199, "unit": "lovelace" } }, { - "address": "FHnt4NL7yPY6GDNPmA3bTTvj99VMoWLBtH4MgCTcu2xgdh2RxU3unXbAQUwCRDR", + "address": "FHnt4NL7yPXsXn35hCGwFU5D1zJQZNvMgje8mATk9tLgJoncHaqQe8m9TamxwDF", "amount": { - "quantity": 83, + "quantity": 180, "unit": "lovelace" } }, { - "address": "addr_test12rgum2cyq5ur5fjqxnwjx0s9l2kemg0u0nyfx6y00cpe89k4z2zehksks89tsdsle6rtf", + "address": "FHnt4NL7yPYDEoF2cvT7uMsWo2m135xYasPJERdgNZdkA5ofPmfDEidNJDA2fog", "amount": { - "quantity": 64, + "quantity": 206, "unit": "lovelace" } } ], - "seed": -313516972 + "seed": -1357152207 } \ No newline at end of file diff --git a/lib/wallet/test/data/Cardano/Wallet/Api/ApiAddressTestnet0.json b/lib/wallet/test/data/Cardano/Wallet/Api/ApiAddressTestnet0.json index 12748b4fe55..5bb65722128 100644 --- a/lib/wallet/test/data/Cardano/Wallet/Api/ApiAddressTestnet0.json +++ b/lib/wallet/test/data/Cardano/Wallet/Api/ApiAddressTestnet0.json @@ -1,15 +1,15 @@ { "samples": [ - "FHnt4NL7yPYG4nDA2PUp3J6BeT6i3M2rkbrwKVh7U8VqjQon9VHmWvyLdaxk8RY", - "addr_test1gp2lpqz2j603lle6sgyqlyhg3ds82kw6wdty87sxs578985p339gth8nykrdnmrxey88d8", - "addr_test1zrv6vr6x89u775d4gf8pz8nr78ynmaqjwnwrjmmf94cxkr5x9heat7x943pc4lyzala7ravp7063vx0f2mzufsrwvdqsalgkuw", - "FHnt4NL7yPXonxr8hDcP4VvmssZ89w2yKxThCHsYLZ3TdTejhDzKKNuJSWgxKmc", - "FHnt4NL7yPYGWToaWoLswFbxtxkV73JTaryZ9apGzXc2p9Zg6QctSKw6P7wT8XB", - "FHnt4NL7yPXszBPSNb5jiPM513BSrsiYYxrZdzYJEbxSUnySv5kwaCuZESPm1eo", - "FHnt4NL7yPXrffrmCT2bDXgRg5Wm4XeRmNF4eXBbs4j1K3W8PaZ8fgwcJS3tThC", - "addr_test1yraed4n7n7kl89l3g9ndp97x7efa8y3j9hja6s7jmx5mjf6s2ss7due37a77n4th260alupzhpn98zeqztga2r4dff0sy7ypmt", - "FHnt4NL7yPYBYcExA1TvQ2h2eZmMMwTu2rroK9e9qENvCxCVM4DoFUyNwP8Gu8J", - "addr_test12zza3t2vdpt3m9hmugah9zhxawyecp5frvmyj5d2dwlwrcv0llllv55rszyplqulleaq8ygehz" + "FHnt4NL7yPY6ewxhdNMgvnrKT5Lnpp5s6eQYUcTt8f9hYVhcDK5EpG3BbdjYmF3", + "FHnt4NL7yPYCyypTumzzeXvEY1vYwtmQXNm2oqLXzRzmPVi4b8CsAXiMQRgFs8p", + "FHnt4NL7yPY8KxdPpkCPsGJS6rBhGEwQ7zNwTPnT7n1kwSFyj9i2tC1aNDSCvfb", + "addr_test1zq2st08gw5xlkccnndnzdtecgwavl7639fsnjkwhtuk3hjq702nwkzmngrpxd0a63xy40mpxsvaq39rhqk8x0av697us2u7q03", + "FHnt4NL7yPY6ayPNGZCjayv98TGkASGgWWnUxYLogtfRh2yr4nb9zYLBxfLhufU", + "FHnt4NL7yPXkYMpBevsZ1DEejujv6BCknGGnq1415WVjNouUwhDW8vHjFtW7KYj", + "FHnt4NL7yPYKFVNAa1ZhyyEXh7YdMzWiP3YB9j6zhP4AAw7xh1kcwJPut7igW86", + "addr_test1zry2cdw8s6gd60g8kp5q6vyevmkumjpm0at6jd3s7s5k6lh9rf2rsf9m6aeg32lqshpp5e7zqmsl0ec47xm8fdmrrpasrwqvhe", + "addr_test1wphcqhwf4uqyqs8352wjt26pupd03zrdh4lpyd9z0khtqaqyhldjn", + "addr_test1vpckmxun7s7yyn3rrznnzdnhdn2263up7cgthndrnle32lq2qzetk" ], - "seed": -60818976 + "seed": 1116034152 } \ No newline at end of file diff --git a/lib/wallet/test/data/balanceTx/binary/testPParams/golden b/lib/wallet/test/data/balanceTx/binary/testPParams/golden index 88b64a0599f..d7021ddb3e9 100644 --- a/lib/wallet/test/data/balanceTx/binary/testPParams/golden +++ b/lib/wallet/test/data/balanceTx/binary/testPParams/golden @@ -1 +1 @@ -96182c1a00025ef51a000186a01940001a000186a01a001e84801a1dcd6500021864d81e820001d81e820001d81e82000106001a01e848001910d6a20098a61a000302590001011a00060bc719026d00011a000249f01903e800011a000249f018201a0025cea81971f70419744d186419744d186419744d186419744d186419744d186419744d18641864186419744d18641a000249f018201a000249f018201a000249f018201a000249f01903e800011a000249f018201a000249f01903e800081a000242201a00067e2318760001011a000249f01903e800081a000249f01a0001b79818f7011a000249f0192710011a0002155e19052e011903e81a000249f01903e8011a000249f018201a000249f018201a000249f0182001011a000249f0011a000249f0041a000194af18f8011a000194af18f8011a0002377c190556011a0002bdea1901f1011a000249f018201a000249f018201a000249f018201a000249f018201a000249f018201a000249f018201a000242201a00067e23187600010119f04c192bd200011a000249f018201a000242201a00067e2318760001011a000242201a00067e2318760001011a0025cea81971f704001a000141bb041a000249f019138800011a000249f018201a000302590001011a000249f018201a000249f018201a000249f018201a000249f018201a000249f018201a000249f018201a000249f018201a00330da701010198af1a0003236119032c01011903e819023b00011903e8195e7104011903e818201a0001ca761928eb041959d818641959d818641959d818641959d818641959d818641959d81864186418641959d81864194c5118201a0002acfa182019b551041a000363151901ff00011a00015c3518201a000797751936f404021a0002ff941a0006ea7818dc0001011903e8196ff604021a0003bd081a00034ec5183e011a00102e0f19312a011a00032e801901a5011a0002da781903e819cf06011a00013a34182019a8f118201903e818201a00013aac0119e143041903e80a1a00030219189c011a00030219189c011a0003207c1901d9011a000330001901ff0119ccf3182019fd40182019ffd5182019581e18201940b318201a00012adf18201a0002ff941a0006ea7818dc0001011a00010f92192da7000119eabb18201a0002ff941a0006ea7818dc0001011a0002ff941a0006ea7818dc0001011a0011b22c1a0005fdde00021a000c504e197712041a001d6af61a0001425b041a00040c660004001a00014fab18201a0003236119032c010119a0de18201a00033d7618201979f41820197fb8182019a95d1820197df718201995aa18201b00000004a817c8001b00000004a817c8001a009063b91903fd0a1b00000004a817c800001b00000004a817c80082d81e82190241192710d81e821902d11a00989680821a00d59f801b00000002540be400821a00d59f801b00000002540be400190fa0189603 \ No newline at end of file +97182c1a00025ef51a000186a01940001a000186a01a001e84801a1dcd6500021864d81e820001d81e820001d81e82000106001a01e848001910d6a2009f1a000302590001011a00060bc719026d00011a000249f01903e800011a000249f018201a0025cea81971f70419744d186419744d186419744d186419744d186419744d186419744d18641864186419744d18641a000249f018201a000249f018201a000249f018201a000249f01903e800011a000249f018201a000249f01903e800081a000242201a00067e2318760001011a000249f01903e800081a000249f01a0001b79818f7011a000249f0192710011a0002155e19052e011903e81a000249f01903e8011a000249f018201a000249f018201a000249f0182001011a000249f0011a000249f0041a000194af18f8011a000194af18f8011a0002377c190556011a0002bdea1901f1011a000249f018201a000249f018201a000249f018201a000249f018201a000249f018201a000249f018201a000242201a00067e23187600010119f04c192bd200011a000249f018201a000242201a00067e2318760001011a000242201a00067e2318760001011a0025cea81971f704001a000141bb041a000249f019138800011a000249f018201a000302590001011a000249f018201a000249f018201a000249f018201a000249f018201a000249f018201a000249f018201a000249f018201a00330da70101ff019f1a0003236119032c01011903e819023b00011903e8195e7104011903e818201a0001ca761928eb041959d818641959d818641959d818641959d818641959d818641959d81864186418641959d81864194c5118201a0002acfa182019b551041a000363151901ff00011a00015c3518201a000797751936f404021a0002ff941a0006ea7818dc0001011903e8196ff604021a0003bd081a00034ec5183e011a00102e0f19312a011a00032e801901a5011a0002da781903e819cf06011a00013a34182019a8f118201903e818201a00013aac0119e143041903e80a1a00030219189c011a00030219189c011a0003207c1901d9011a000330001901ff0119ccf3182019fd40182019ffd5182019581e18201940b318201a00012adf18201a0002ff941a0006ea7818dc0001011a00010f92192da7000119eabb18201a0002ff941a0006ea7818dc0001011a0002ff941a0006ea7818dc0001011a0011b22c1a0005fdde00021a000c504e197712041a001d6af61a0001425b041a00040c660004001a00014fab18201a0003236119032c010119a0de18201a00033d7618201979f41820197fb8182019a95d1820197df718201995aa18201b00000004a817c8001b00000004a817c8001a009063b91903fd0a1b00000004a817c800001b00000004a817c800ff82d81e82190241192710d81e821902d11a00989680821a00d59f801b00000002540be400821a00d59f801b00000002540be400190fa0189603 \ No newline at end of file diff --git a/lib/wallet/test/unit/Cardano/Api/GenSpec.hs b/lib/wallet/test/unit/Cardano/Api/GenSpec.hs index cba3948e14a..de131717b27 100644 --- a/lib/wallet/test/unit/Cardano/Api/GenSpec.hs +++ b/lib/wallet/test/unit/Cardano/Api/GenSpec.hs @@ -1162,8 +1162,6 @@ genStakeAddressReferenceCoverage :: StakeAddressReference -> Property genStakeAddressReferenceCoverage ref = checkCoverage $ cover 10 (byValue ref) "stake address reference created by value" - $ cover 10 (byPointer ref) - "stake address reference created by pointer" $ cover 10 (noStakeAddress ref) "no stake address" True @@ -1173,11 +1171,6 @@ genStakeAddressReferenceCoverage ref = checkCoverage StakeAddressByPointer _ -> False NoStakeAddress -> False - byPointer = \case - StakeAddressByValue _ -> False - StakeAddressByPointer _ -> True - NoStakeAddress -> False - noStakeAddress = \case StakeAddressByValue _ -> False StakeAddressByPointer _ -> False @@ -1504,16 +1497,16 @@ instance Arbitrary EpochNo where genCostModelCoverage :: CostModel -> Property genCostModelCoverage (CostModel costModel) = checkCoverage $ conjoin - [ Map.size costModel == - Map.size (Ledger.getCostModelParams Plutus.testingCostModelV1) + [ length costModel == + length (Ledger.getCostModelParams Plutus.testingCostModelV1) & label "Generated cost model must have same size as default cost model" & counterexample "Generated cost model did not have same size as default cost model" , checkCoverage - $ cover 1 (elem 0 $ Map.elems costModel) + $ cover 1 (0 `elem` costModel) "model param is zero" - $ cover 30 (any (> 0) $ Map.elems costModel) + $ cover 30 (any (> 0) costModel) "model param is greater than zero" True ] @@ -1584,7 +1577,7 @@ genTxCertificateCoverage cert = checkCoverage cover 10 True "is stake address registration cert" True StakeAddressDeregistrationCertificate _ -> cover 10 True "is stake address deregistration cert" True - StakeAddressDelegationCertificate _ _ -> + StakeAddressPoolDelegationCertificate _ _ -> cover 10 True "is stake address delegation cert" True StakePoolRegistrationCertificate _ -> cover 10 True "is stake pool registration cert" True diff --git a/lib/wallet/test/unit/Cardano/Byron/Codec/CborSpec.hs b/lib/wallet/test/unit/Cardano/Byron/Codec/CborSpec.hs index d5f3bbc6f2a..2d3c760037f 100644 --- a/lib/wallet/test/unit/Cardano/Byron/Codec/CborSpec.hs +++ b/lib/wallet/test/unit/Cardano/Byron/Codec/CborSpec.hs @@ -6,6 +6,7 @@ {-# LANGUAGE TypeApplications #-} {-# OPTIONS_GHC -fno-warn-orphans #-} +{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} module Cardano.Byron.Codec.CborSpec ( spec diff --git a/lib/wallet/test/unit/Cardano/Pool/DB/Properties.hs b/lib/wallet/test/unit/Cardano/Pool/DB/Properties.hs index 78ee4f077ef..8497760b16d 100644 --- a/lib/wallet/test/unit/Cardano/Pool/DB/Properties.hs +++ b/lib/wallet/test/unit/Cardano/Pool/DB/Properties.hs @@ -10,6 +10,7 @@ {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeSynonymInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-} +{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} module Cardano.Pool.DB.Properties (properties) where diff --git a/lib/wallet/test/unit/Cardano/Wallet/Address/Derivation/ByronSpec.hs b/lib/wallet/test/unit/Cardano/Wallet/Address/Derivation/ByronSpec.hs index 31cb2f0cc31..328ec6d9ecb 100644 --- a/lib/wallet/test/unit/Cardano/Wallet/Address/Derivation/ByronSpec.hs +++ b/lib/wallet/test/unit/Cardano/Wallet/Address/Derivation/ByronSpec.hs @@ -6,6 +6,7 @@ {-# LANGUAGE TypeApplications #-} {-# OPTIONS_GHC -fno-warn-orphans #-} +{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} module Cardano.Wallet.Address.Derivation.ByronSpec ( spec diff --git a/lib/wallet/test/unit/Cardano/Wallet/Address/Discovery/RandomSpec.hs b/lib/wallet/test/unit/Cardano/Wallet/Address/Discovery/RandomSpec.hs index c21a0c78b60..3e0c0db3947 100644 --- a/lib/wallet/test/unit/Cardano/Wallet/Address/Discovery/RandomSpec.hs +++ b/lib/wallet/test/unit/Cardano/Wallet/Address/Discovery/RandomSpec.hs @@ -8,6 +8,7 @@ {-# LANGUAGE TypeApplications #-} {-# OPTIONS_GHC -fno-warn-orphans #-} +{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} module Cardano.Wallet.Address.Discovery.RandomSpec ( spec diff --git a/lib/wallet/test/unit/Cardano/Wallet/Address/Discovery/SequentialSpec.hs b/lib/wallet/test/unit/Cardano/Wallet/Address/Discovery/SequentialSpec.hs index 8ecb6ff9fcc..696c1186fa5 100644 --- a/lib/wallet/test/unit/Cardano/Wallet/Address/Discovery/SequentialSpec.hs +++ b/lib/wallet/test/unit/Cardano/Wallet/Address/Discovery/SequentialSpec.hs @@ -15,6 +15,7 @@ {-# LANGUAGE UndecidableInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-} +{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} -- TODO: https://input-output.atlassian.net/browse/ADP-2841 {-# OPTIONS_GHC -fno-warn-star-is-type #-} diff --git a/lib/wallet/test/unit/Cardano/Wallet/Address/Discovery/SharedSpec.hs b/lib/wallet/test/unit/Cardano/Wallet/Address/Discovery/SharedSpec.hs index fd067379a2f..4d5433031f8 100644 --- a/lib/wallet/test/unit/Cardano/Wallet/Address/Discovery/SharedSpec.hs +++ b/lib/wallet/test/unit/Cardano/Wallet/Address/Discovery/SharedSpec.hs @@ -9,6 +9,7 @@ {-# LANGUAGE TypeApplications #-} {-# OPTIONS_GHC -fno-warn-orphans #-} +{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} module Cardano.Wallet.Address.Discovery.SharedSpec ( spec diff --git a/lib/wallet/test/unit/Cardano/Wallet/Api/Malformed.hs b/lib/wallet/test/unit/Cardano/Wallet/Api/Malformed.hs index 1dbe0a0b6ff..934e4257bf5 100644 --- a/lib/wallet/test/unit/Cardano/Wallet/Api/Malformed.hs +++ b/lib/wallet/test/unit/Cardano/Wallet/Api/Malformed.hs @@ -1793,7 +1793,7 @@ msgJsonInvalid = "I couldn't understand the content of your message. \ \the JSON is valid." addrPlaceholder :: Text -addrPlaceholder = "addr_test12rt90k38sak06mwtj6rfkgzpzw2nzgxtkp5675nxl6wqqc5p745g840sg6q73dcrf3w6up" +addrPlaceholder = "addr_test1vquxc75xmzzy7sy955pyz4tqg0ycgttjcv2u39ay929q2yqul2q5p" accountPublicKeyInvalid :: Text accountPublicKeyInvalid = T.replicate 128 "Ċ›" diff --git a/lib/wallet/test/unit/Cardano/Wallet/Api/Server/TlsSpec.hs b/lib/wallet/test/unit/Cardano/Wallet/Api/Server/TlsSpec.hs index 86a840a5f5e..8c343436eec 100644 --- a/lib/wallet/test/unit/Cardano/Wallet/Api/Server/TlsSpec.hs +++ b/lib/wallet/test/unit/Cardano/Wallet/Api/Server/TlsSpec.hs @@ -2,6 +2,8 @@ {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE TemplateHaskell #-} +{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} + module Cardano.Wallet.Api.Server.TlsSpec ( spec ) where diff --git a/lib/wallet/test/unit/Cardano/Wallet/Api/ServerSpec.hs b/lib/wallet/test/unit/Cardano/Wallet/Api/ServerSpec.hs index d2e05b532ec..c440d6b0be2 100644 --- a/lib/wallet/test/unit/Cardano/Wallet/Api/ServerSpec.hs +++ b/lib/wallet/test/unit/Cardano/Wallet/Api/ServerSpec.hs @@ -5,6 +5,8 @@ {-# LANGUAGE Rank2Types #-} {-# LANGUAGE ScopedTypeVariables #-} +{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} + module Cardano.Wallet.Api.ServerSpec (spec) where import Prelude @@ -57,6 +59,8 @@ import Data.Maybe ( isJust, isNothing ) import Data.Quantity ( Quantity (..) ) +import Data.SOP.Counting + ( exactlyOne ) import Data.Time.Clock ( addUTCTime, getCurrentTime ) import Network.Socket @@ -74,8 +78,6 @@ import Ouroboros.Consensus.BlockchainTime.WallClock.Types ( RelativeTime (..), mkSlotLength ) import Ouroboros.Consensus.Config.SecurityParam ( SecurityParam (..) ) -import Ouroboros.Consensus.Util.Counting - ( exactlyOne ) import Servant.Server ( ServerError (..), runHandler ) import Test.Hspec diff --git a/lib/wallet/test/unit/Cardano/Wallet/Api/TypesSpec.hs b/lib/wallet/test/unit/Cardano/Wallet/Api/TypesSpec.hs index a993a54f6c3..2106b5dd0e6 100644 --- a/lib/wallet/test/unit/Cardano/Wallet/Api/TypesSpec.hs +++ b/lib/wallet/test/unit/Cardano/Wallet/Api/TypesSpec.hs @@ -26,6 +26,7 @@ {-# OPTIONS_GHC -fno-specialise #-} {-# OPTIONS_GHC -fno-warn-orphans #-} +{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} {-# OPTIONS_GHC -fconstraint-solver-iterations=0 #-} -- | @@ -901,7 +902,7 @@ spec = do \parsing AddressAmount failed, parsing Natural failed, \ \unexpected negative number -14" Aeson.parseEither parseJSON [aesonQQ| - { "address": "addr_test12rt90k38sak06mwtj6rfkgzpzw2nzgxtkp5675nxl6wqqc5p745g840sg6q73dcrf3w6up" + { "address": "addr_test1vquxc75xmzzy7sy955pyz4tqg0ycgttjcv2u39ay929q2yqul2q5p" , "amount": {"unit":"lovelace","quantity":-14} } |] `shouldBe` (Left @String @(AddressAmount (ApiAddress T0)) msg) @@ -912,7 +913,7 @@ spec = do \than or equal to " <> show (unCoin txOutMaxCoin) <> " lovelace." Aeson.parseEither parseJSON [aesonQQ| - { "address": "addr_test12rt90k38sak06mwtj6rfkgzpzw2nzgxtkp5675nxl6wqqc5p745g840sg6q73dcrf3w6up" + { "address": "addr_test1vquxc75xmzzy7sy955pyz4tqg0ycgttjcv2u39ay929q2yqul2q5p" , "amount": { "unit":"lovelace" ,"quantity":#{unCoin txOutMaxCoin + 1} diff --git a/lib/wallet/test/unit/Cardano/Wallet/DB/Arbitrary.hs b/lib/wallet/test/unit/Cardano/Wallet/DB/Arbitrary.hs index b17a62a64b2..fcd3b8d4a07 100644 --- a/lib/wallet/test/unit/Cardano/Wallet/DB/Arbitrary.hs +++ b/lib/wallet/test/unit/Cardano/Wallet/DB/Arbitrary.hs @@ -19,6 +19,7 @@ {-# LANGUAGE UndecidableInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-} +{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} module Cardano.Wallet.DB.Arbitrary ( GenTxHistory (..) diff --git a/lib/wallet/test/unit/Cardano/Wallet/DB/LayerSpec.hs b/lib/wallet/test/unit/Cardano/Wallet/DB/LayerSpec.hs index 2cfbc35c9a3..534044301e5 100644 --- a/lib/wallet/test/unit/Cardano/Wallet/DB/LayerSpec.hs +++ b/lib/wallet/test/unit/Cardano/Wallet/DB/LayerSpec.hs @@ -4,6 +4,7 @@ {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} +{-# LANGUAGE KindSignatures #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE NamedFieldPuns #-} @@ -180,6 +181,8 @@ import Data.Generics.Internal.VL.Lens ( over, view, (^.) ) import Data.Generics.Labels () +import Data.Kind + ( Type ) import Data.Maybe ( isJust, isNothing, mapMaybe ) import Data.Quantity @@ -320,7 +323,7 @@ instance PaymentAddress SharedKey 'CredFromScriptK where liftPaymentAddress _ = error "does not make sense for SharedKey but want to use stateMachineSpec" -showState :: forall s. Typeable s => String +showState :: forall (s :: Type). Typeable s => String showState = show (typeOf @s undefined) withFreshDB @@ -569,7 +572,7 @@ fileModeSpec = do mempty let (FilteredBlock{transactions=txs}, (_,cpB)) = applyBlock fakeBlock cpA - epochStability = Quantity 2160 + epochStability = Quantity 2_160 deltaPruneCheckpoints = Checkpoints.pruneCheckpoints (view $ #currentTip . #blockHeight) diff --git a/lib/wallet/test/unit/Cardano/Wallet/DB/StateMachine.hs b/lib/wallet/test/unit/Cardano/Wallet/DB/StateMachine.hs index ff0c586e97e..015afe39bd1 100644 --- a/lib/wallet/test/unit/Cardano/Wallet/DB/StateMachine.hs +++ b/lib/wallet/test/unit/Cardano/Wallet/DB/StateMachine.hs @@ -688,12 +688,6 @@ instance ToExpr b => ToExpr (Quantity a b) where instance ToExpr GenesisParameters where toExpr = defaultExprViaShow -instance ToExpr Slot where - toExpr = genericToExpr - -instance ToExpr SlotNo where - toExpr = genericToExpr - instance ToExpr EpochNo where toExpr = defaultExprViaShow diff --git a/lib/wallet/test/unit/Cardano/Wallet/DB/Store/Transactions/StoreSpec.hs b/lib/wallet/test/unit/Cardano/Wallet/DB/Store/Transactions/StoreSpec.hs index a30d151beaa..239f010a4c0 100644 --- a/lib/wallet/test/unit/Cardano/Wallet/DB/Store/Transactions/StoreSpec.hs +++ b/lib/wallet/test/unit/Cardano/Wallet/DB/Store/Transactions/StoreSpec.hs @@ -2,11 +2,15 @@ {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE NamedFieldPuns #-} +{-# LANGUAGE NumericUnderscores #-} {-# LANGUAGE OverloadedLabels #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} +{-# OPTIONS_GHC -Wno-incomplete-uni-patterns#-} + module Cardano.Wallet.DB.Store.Transactions.StoreSpec ( spec ) where @@ -15,6 +19,8 @@ import Prelude import Cardano.DB.Sqlite ( ForeignKeysSetting (..), runQuery ) +import Cardano.Wallet.DB + ( DBOpen (..) ) import Cardano.Wallet.DB.Arbitrary () import Cardano.Wallet.DB.Fixtures @@ -25,6 +31,8 @@ import Cardano.Wallet.DB.Fixtures , withDBInMemory , withStoreProp ) +import Cardano.Wallet.DB.Layer + ( DefaultFieldValues (..), withDBOpenFromFile ) import Cardano.Wallet.DB.Sqlite.Types ( TxId (TxId) ) import Cardano.Wallet.DB.Store.Transactions.Decoration @@ -44,20 +52,42 @@ import Cardano.Wallet.DB.Store.Transactions.Model ) import Cardano.Wallet.DB.Store.Transactions.Store ( mkStoreTransactions, selectTx ) +import Cardano.Wallet.DB.Store.Transactions.TransactionInfo + ( mkTxCBOR ) +import Cardano.Wallet.Flavor + ( Flavored (..), WalletFlavorS (..) ) +import Cardano.Wallet.Primitive.Types + ( ActiveSlotCoefficient (..) ) +import Cardano.Wallet.Primitive.Types.Coin + ( Coin (..) ) import Cardano.Wallet.Primitive.Types.Tx ( Tx (..) ) +import Cardano.Wallet.Read.Tx.CBOR + ( roundTripTxCBor ) import Control.Monad - ( forM_, (<=<) ) + ( forM_, (<=<), (>=>) ) +import Control.Tracer + ( nullTracer ) import Data.Delta ( Delta (..) ) +import Data.Foldable + ( toList ) import Data.Functor.Identity ( Identity (..) ) import Data.Generics.Internal.VL ( set ) +import Data.Maybe + ( mapMaybe ) import Data.Store ( Store (..) ) +import System.Directory + ( copyFile ) +import System.FilePath + ( () ) +import System.IO.Temp + ( withSystemTempDirectory ) import Test.Hspec - ( Spec, around, describe, it ) + ( Spec, around, describe, it, shouldBe ) import Test.QuickCheck ( Gen , Property @@ -74,6 +104,8 @@ import Test.QuickCheck.Monadic ( forAllM, pick ) import Test.Store ( GenDelta, prop_StoreUpdate ) +import Test.Utils.Paths + ( getTestData ) import qualified Cardano.Wallet.DB.Store.Transactions.Layer as TxSet import qualified Cardano.Wallet.Primitive.Types.Tx as W @@ -104,6 +136,45 @@ spec = do \to all other transactions output" $ property prop_DecorateLinksTxCollateralsToTxOuts + describe "Transaction CBOR roundtrip" $ do + it "works on a golden files" $ forM_ + [ Flavored SharedWallet + "api-bench/sha.a1d5337305630db051fac6da5f8038abf4067068.sqlite" + , Flavored ShelleyWallet + "api-bench/she.1ceb45b37a94c7022837b5ca14045f11a5927c65.sqlite" + , Flavored ByronWallet + "api-bench/rnd.423b423718660431ebfe9c761cd72e64ee5065ac.sqlite" + ] $ \(Flavored wF relPath) -> + withinCopiedFile relPath + $ \path -> withDBOpenFromFile wF nullTracer + (Just defaultFieldValues) path + $ \DBOpen{atomically} -> do + Right (TxSet txSet) <- + atomically $ loadS mkStoreTransactions + let cbors = + mapMaybe (cbor >=> mkTxCBOR) $ toList txSet + Right cbors' = mapM roundTripTxCBor cbors + cbors `shouldBe` cbors' + +defaultFieldValues :: DefaultFieldValues +defaultFieldValues = DefaultFieldValues + { defaultActiveSlotCoefficient = ActiveSlotCoefficient 1.0 + , defaultDesiredNumberOfPool = 0 + , defaultMinimumUTxOValue = Coin 1_000_000 + , defaultHardforkEpoch = Nothing + , defaultKeyDeposit = Coin 2_000_000 + } + +withinCopiedFile + :: FilePath + -> (FilePath -> IO a) -> IO a +withinCopiedFile dbName action = do + let orig = $(getTestData) dbName + withSystemTempDirectory "migration-db" $ \dir -> do + let path = dir "db.sqlite" + copyFile orig path + action path + {----------------------------------------------------------------------------- Properties ------------------------------------------------------------------------------} diff --git a/lib/wallet/test/unit/Cardano/Wallet/Primitive/Delegation/StateSpec.hs b/lib/wallet/test/unit/Cardano/Wallet/Primitive/Delegation/StateSpec.hs index 81d0a0a461a..bfc6f184717 100644 --- a/lib/wallet/test/unit/Cardano/Wallet/Primitive/Delegation/StateSpec.hs +++ b/lib/wallet/test/unit/Cardano/Wallet/Primitive/Delegation/StateSpec.hs @@ -10,6 +10,8 @@ {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -Wno-orphans #-} +{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} + module Cardano.Wallet.Primitive.Delegation.StateSpec where import Prelude diff --git a/lib/wallet/test/unit/Cardano/Wallet/Primitive/Passphrase/LegacySpec.hs b/lib/wallet/test/unit/Cardano/Wallet/Primitive/Passphrase/LegacySpec.hs index 046c4bd0efe..bc9d845b47f 100644 --- a/lib/wallet/test/unit/Cardano/Wallet/Primitive/Passphrase/LegacySpec.hs +++ b/lib/wallet/test/unit/Cardano/Wallet/Primitive/Passphrase/LegacySpec.hs @@ -3,6 +3,7 @@ {-# LANGUAGE TypeApplications #-} {-# OPTIONS_GHC -fno-warn-orphans #-} +{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} module Cardano.Wallet.Primitive.Passphrase.LegacySpec ( spec diff --git a/lib/wallet/test/unit/Cardano/Wallet/Primitive/SlottingSpec.hs b/lib/wallet/test/unit/Cardano/Wallet/Primitive/SlottingSpec.hs index cc7befad52b..29f25946e3f 100644 --- a/lib/wallet/test/unit/Cardano/Wallet/Primitive/SlottingSpec.hs +++ b/lib/wallet/test/unit/Cardano/Wallet/Primitive/SlottingSpec.hs @@ -65,6 +65,8 @@ import Data.Generics.Internal.VL.Lens ( (^.) ) import Data.Quantity ( Quantity (..) ) +import Data.SOP.Counting + ( exactlyTwo ) import Data.Time ( UTCTime ) import Data.Time.Clock @@ -75,8 +77,6 @@ import Ouroboros.Consensus.BlockchainTime.WallClock.Types ( RelativeTime (..), mkSlotLength ) import Ouroboros.Consensus.Config.SecurityParam ( SecurityParam (..) ) -import Ouroboros.Consensus.Util.Counting - ( exactlyTwo ) import Test.Hspec ( Spec, describe, it, runIO, shouldBe, shouldReturn, shouldSatisfy ) import Test.QuickCheck diff --git a/lib/wallet/test/unit/Cardano/Wallet/Shelley/CompatibilitySpec.hs b/lib/wallet/test/unit/Cardano/Wallet/Shelley/CompatibilitySpec.hs index e7bd64d8e11..ca448df407c 100644 --- a/lib/wallet/test/unit/Cardano/Wallet/Shelley/CompatibilitySpec.hs +++ b/lib/wallet/test/unit/Cardano/Wallet/Shelley/CompatibilitySpec.hs @@ -28,6 +28,8 @@ import Cardano.Address.Script ) import Cardano.Crypto.Hash.Class ( digest ) +import Cardano.Ledger.Core + ( PParams, ppDL ) import Cardano.Ledger.Crypto ( Crypto (..) ) import Cardano.Mnemonic @@ -101,6 +103,8 @@ import Codec.Binary.Bech32.TH ( humanReadablePart ) import Codec.Binary.Encoding ( fromBase16 ) +import Control.Lens + ( (.~) ) import Control.Monad ( forM_ ) import Data.ByteString @@ -162,7 +166,6 @@ import qualified Cardano.Api as Cardano import qualified Cardano.Ledger.Address as SL import qualified Cardano.Ledger.BaseTypes as SL import qualified Cardano.Ledger.Shelley as SL -import qualified Cardano.Ledger.Shelley as SLAPI import qualified Cardano.Ledger.Shelley.PParams as SL import qualified Cardano.Wallet.Address.Derivation as Address.Derivation import qualified Cardano.Wallet.Address.Derivation.Byron as Byron @@ -233,8 +236,8 @@ spec = do let mkDecentralizationParam :: SL.UnitInterval - -> SLAPI.ShelleyPParams (SL.ShelleyEra StandardCrypto) - mkDecentralizationParam i = SL.emptyPParams { SL._d = i } + -> PParams (SL.ShelleyEra StandardCrypto) + mkDecentralizationParam i = SL.emptyPParams & ppDL .~ i let testCases :: [(Ratio Word64, Text)] testCases = diff --git a/lib/wallet/test/unit/Cardano/Wallet/Shelley/MinimumUTxOSpec.hs b/lib/wallet/test/unit/Cardano/Wallet/Shelley/MinimumUTxOSpec.hs index 542eaf9c722..25560d87c5c 100644 --- a/lib/wallet/test/unit/Cardano/Wallet/Shelley/MinimumUTxOSpec.hs +++ b/lib/wallet/test/unit/Cardano/Wallet/Shelley/MinimumUTxOSpec.hs @@ -17,14 +17,14 @@ import Cardano.Api ( ShelleyBasedEra (..) ) import Cardano.Api.Gen ( genAddressAny ) +import Cardano.Ledger.Core + ( ppMinUTxOValueL ) import Cardano.Wallet.Address.Keys.BoundedAddressLength ( maxLengthAddressFor ) import Cardano.Wallet.Flavor ( KeyFlavorS (..) ) import Cardano.Wallet.Primitive.Types.Address ( Address (..) ) -import Cardano.Wallet.Primitive.Types.Address.Constants - ( maxLengthAddress ) import Cardano.Wallet.Primitive.Types.Coin ( Coin (..) ) import Cardano.Wallet.Primitive.Types.MinimumUTxO @@ -56,13 +56,13 @@ import Cardano.Wallet.Primitive.Types.TokenPolicy import Cardano.Wallet.Primitive.Types.TokenPolicy.Gen ( mkTokenPolicyId ) import Cardano.Wallet.Primitive.Types.Tx.Constraints - ( txOutMaxCoin, txOutMaxTokenQuantity, txOutMinTokenQuantity ) -import Cardano.Wallet.Primitive.Types.Tx.TxOut - ( TxOut (..) ) + ( txOutMaxTokenQuantity, txOutMinTokenQuantity ) import Cardano.Wallet.Primitive.Types.Tx.TxOut.Gen ( genTxOutTokenBundle ) import Cardano.Wallet.Shelley.MinimumUTxO ( computeMinimumCoinForUTxO, isBelowMinimumCoinForUTxO ) +import Control.Lens + ( (.~) ) import Control.Monad ( forM_ ) import Data.Default @@ -72,17 +72,7 @@ import Data.Function import Test.Hspec ( Spec, describe, it ) import Test.QuickCheck - ( Arbitrary (..) - , Property - , checkCoverage - , conjoin - , cover - , elements - , frequency - , property - , sized - , (===) - ) + ( Arbitrary (..), Property, elements, frequency, property, sized, (===) ) import Test.QuickCheck.Classes ( eqLaws, showLaws ) import Test.QuickCheck.Extra @@ -92,12 +82,8 @@ import Test.Utils.Laws import qualified Cardano.Api.Shelley as Cardano import qualified Cardano.Ledger.Alonzo.PParams as Alonzo -import qualified Cardano.Ledger.Babbage.PParams as Babbage -import qualified Cardano.Ledger.Shelley.PParams as Shelley -import qualified Cardano.Wallet.Primitive.Types.TokenBundle as TokenBundle +import qualified Cardano.Ledger.Api as Babbage import qualified Cardano.Wallet.Primitive.Types.TokenMap as TokenMap -import qualified Cardano.Wallet.Shelley.MinimumUTxO.Internal as Internal -import qualified Data.ByteString as BS import qualified Data.Text as T import qualified Data.Text.Encoding as T @@ -113,18 +99,9 @@ spec = do describe "Properties" $ do - it "prop_computeMinimumCoinForUTxO_CardanoApi_CardanoLedger" $ - prop_computeMinimumCoinForUTxO_CardanoApi_CardanoLedger - & property it "prop_computeMinimumCoinForUTxO_isBelowMinimumCoinForUTxO" $ prop_computeMinimumCoinForUTxO_isBelowMinimumCoinForUTxO & property - it "prop_computeMinimumCoinForUTxO_bounds" $ - prop_computeMinimumCoinForUTxO_bounds - & property - it "prop_computeMinimumCoinForUTxO_stability" $ - prop_computeMinimumCoinForUTxO_stability - & property describe "Golden Tests" $ do @@ -174,19 +151,6 @@ spec = do goldenMinimumUTxO_BabbageEra goldenMinimumCoins_ShelleyAddress_BabbageEra -prop_computeMinimumCoinForUTxO_CardanoApi_CardanoLedger - :: MinimumUTxOForShelleyBasedEra - -> Address - -> TokenBundle - -> Property -prop_computeMinimumCoinForUTxO_CardanoApi_CardanoLedger - minimumUTxO address tokenBundle = - Internal.computeMinimumCoinForUTxO_CardanoApi - minimumUTxO (TxOut address tokenBundle) - === - Internal.computeMinimumCoinForUTxO_CardanoLedger - minimumUTxO (TxOut address tokenBundle) - -- Tests the following composition: -- -- >>> isBelowMinimumCoinForUTxO . computeMinimumCoinForUTxO @@ -200,138 +164,6 @@ prop_computeMinimumCoinForUTxO_isBelowMinimumCoinForUTxO minimumUTxO addr m = (TokenBundle (computeMinimumCoinForUTxO minimumUTxO addr m) m) === False --- Check that 'computeMinimumCoinForUTxO' produces a result that is within --- bounds, as determined by the Cardano API function 'calculateMinimumUTxO'. --- -prop_computeMinimumCoinForUTxO_bounds - :: TokenBundle - -> Cardano.AddressAny - -> MinimumUTxOForShelleyBasedEra - -> Property -prop_computeMinimumCoinForUTxO_bounds - tokenBundle addr minimumUTxO = - let ourResult = ourComputeMinCoin - (fromCardanoAddressAny addr) - (TokenBundle.tokens tokenBundle) - apiResultMinBound = apiComputeMinCoin - (fromCardanoAddressAny addr) - (tokenBundle) - apiResultMaxBound = apiComputeMinCoin - (maxLengthAddress) - (TokenBundle.setCoin tokenBundle txOutMaxCoin) - in - property True - & verify - (ourResult >= apiResultMinBound) - "ourResult >= apiResultMinBound" - & verify - (ourResult <= apiResultMaxBound) - "ourResult <= apiResultMaxBound" - & report - (apiResultMinBound) - "apiResultMinBound" - & report - (apiResultMaxBound) - "apiResultMaxBound" - & report - (ourResult) - "ourResult" - & report - (BS.length (Cardano.serialiseToRawBytes addr)) - "BS.length (Cardano.serialiseToRawBytes addr))" - & report - (BS.length (unAddress (fromCardanoAddressAny addr))) - "BS.length (unAddress (fromCardanoAddressAny addr))" - & report - (BS.length (unAddress maxLengthAddress)) - "BS.length (unAddress maxLengthAddress)" - where - -- Uses the Cardano API function 'calculateMinimumUTxO' to compute a - -- minimum 'Coin' value. - -- - apiComputeMinCoin :: Address -> TokenBundle -> Coin - apiComputeMinCoin a b = Internal.computeMinimumCoinForUTxO_CardanoApi - minimumUTxO (TxOut a b) - - -- Uses the wallet function 'computeMinimumCoinForUTxO' to compute a - -- minimum 'Coin' value. - -- - ourComputeMinCoin :: Address -> TokenMap -> Coin - ourComputeMinCoin = computeMinimumCoinForUTxO - (MinimumUTxOForShelleyBasedEraOf minimumUTxO) - --- Compares the stability of: --- --- - the Cardano API function 'calculateMinimumUTxO' --- - the wallet function 'computeMinimumCoinForUTxO' --- --- In particular, we: --- --- Demonstrate that applying the Cardano API function to its own result can --- lead to an increase in the ada quantity. --- --- Demonstrate that applying the Cardano API function to the result of the --- wallet function does not lead to an increase in the ada quantity. --- -prop_computeMinimumCoinForUTxO_stability - :: TokenMap - -> Cardano.AddressAny - -> MinimumUTxOForShelleyBasedEra - -> Property -prop_computeMinimumCoinForUTxO_stability - tokenMap addr minimumUTxO = - conjoin - [ prop_apiFunctionStability - , prop_ourFunctionStability - ] - where - -- Demonstrate that applying the Cardano API function to its own result can - -- lead to an increase in the ada quantity. - -- - prop_apiFunctionStability :: Property - prop_apiFunctionStability = - let apiResult0 = apiComputeMinCoin $ TokenBundle (Coin 0) tokenMap - apiResult1 = apiComputeMinCoin $ TokenBundle apiResult0 tokenMap - in - property True - & verify (apiResult0 <= apiResult1) "apiResult0 <= apiResult1" - & cover 10 (apiResult0 == apiResult1) "apiResult0 == apiResult1" - & cover 10 (apiResult0 < apiResult1) "apiResult0 < apiResult1" - & report apiResult0 "apiResult0" - & report apiResult1 "apiResult1" - & checkCoverage - - -- Demonstrate that applying the Cardano API function to the result of the - -- wallet function does not lead to an increase in the ada quantity. - -- - prop_ourFunctionStability :: Property - prop_ourFunctionStability = - let ourResult0 = ourComputeMinCoin tokenMap - ourResult1 = apiComputeMinCoin $ TokenBundle ourResult0 tokenMap - in - property True - & verify (ourResult0 >= ourResult1) "ourResult0 >= ourResult1" - & cover 10 (ourResult0 == ourResult1) "ourResult0 == ourResult1" - & cover 10 (ourResult0 > ourResult1) "ourResult0 > ourResult1" - & report ourResult0 "ourResult0" - & report ourResult1 "ourResult1" - & checkCoverage - - -- Uses the Cardano API function 'calculateMinimumUTxO' to compute a - -- minimum 'Coin' value. - -- - apiComputeMinCoin :: TokenBundle -> Coin - apiComputeMinCoin b = Internal.computeMinimumCoinForUTxO_CardanoApi - minimumUTxO (TxOut (fromCardanoAddressAny addr) b) - - -- Uses the wallet function 'computeMinimumCoinForUTxO' to compute a - -- minimum 'Coin' value. - -- - ourComputeMinCoin :: TokenMap -> Coin - ourComputeMinCoin = computeMinimumCoinForUTxO - (MinimumUTxOForShelleyBasedEraOf minimumUTxO) - (fromCardanoAddressAny addr) - -------------------------------------------------------------------------------- -- Golden tests -------------------------------------------------------------------------------- @@ -366,28 +198,30 @@ goldenTests_computeMinimumCoinForUTxO goldenMinimumUTxO_ShelleyEra :: MinimumUTxO goldenMinimumUTxO_ShelleyEra = - minimumUTxOForShelleyBasedEra ShelleyBasedEraShelley - def {Shelley._minUTxOValue = testParameter_minUTxOValue_Shelley} + minimumUTxOForShelleyBasedEra ShelleyBasedEraShelley $ + def & ppMinUTxOValueL .~ testParameter_minUTxOValue_Shelley goldenMinimumUTxO_AllegraEra :: MinimumUTxO goldenMinimumUTxO_AllegraEra = - minimumUTxOForShelleyBasedEra ShelleyBasedEraAllegra - def {Shelley._minUTxOValue = testParameter_minUTxOValue_Allegra} + minimumUTxOForShelleyBasedEra ShelleyBasedEraAllegra $ + def & ppMinUTxOValueL .~ testParameter_minUTxOValue_Allegra goldenMinimumUTxO_MaryEra :: MinimumUTxO goldenMinimumUTxO_MaryEra = - minimumUTxOForShelleyBasedEra ShelleyBasedEraMary - def {Shelley._minUTxOValue = testParameter_minUTxOValue_Mary} + minimumUTxOForShelleyBasedEra ShelleyBasedEraMary $ + def & ppMinUTxOValueL .~ testParameter_minUTxOValue_Mary goldenMinimumUTxO_AlonzoEra :: MinimumUTxO goldenMinimumUTxO_AlonzoEra = minimumUTxOForShelleyBasedEra ShelleyBasedEraAlonzo - def {Alonzo._coinsPerUTxOWord = testParameter_coinsPerUTxOWord_Alonzo} + $ def + & Alonzo.ppCoinsPerUTxOWordL .~ testParameter_coinsPerUTxOWord_Alonzo goldenMinimumUTxO_BabbageEra :: MinimumUTxO goldenMinimumUTxO_BabbageEra = minimumUTxOForShelleyBasedEra ShelleyBasedEraBabbage - def {Babbage._coinsPerUTxOByte = testParameter_coinsPerUTxOByte_Babbage} + $ def + & Babbage.ppCoinsPerUTxOByteL .~ testParameter_coinsPerUTxOByte_Babbage -------------------------------------------------------------------------------- -- Golden minimum 'Coin' values: Byron-style addresses diff --git a/lib/wallet/test/unit/Cardano/Wallet/Shelley/TransactionSpec.hs b/lib/wallet/test/unit/Cardano/Wallet/Shelley/TransactionSpec.hs index 1db3bcf201c..bafa4d0f620 100644 --- a/lib/wallet/test/unit/Cardano/Wallet/Shelley/TransactionSpec.hs +++ b/lib/wallet/test/unit/Cardano/Wallet/Shelley/TransactionSpec.hs @@ -69,20 +69,34 @@ import Cardano.Api.Gen , genValueForTxOut , genWitnesses ) +import Cardano.Api.Shelley + ( fromShelleyLovelace ) import Cardano.Binary - ( FromCBOR, ToCBOR, serialize', unsafeDeserialize' ) + ( ToCBOR, serialize', unsafeDeserialize' ) import Cardano.BM.Data.Tracer ( nullTracer ) import Cardano.Ledger.Alonzo.Genesis - ( AlonzoGenesis (costmdls) ) + ( AlonzoGenesis (..) ) import Cardano.Ledger.Alonzo.TxInfo ( TranslationError (..) ) +import Cardano.Ledger.Api + ( AllegraEraTxBody (..) + , AlonzoEraTxBody (..) + , EraTxBody (..) + , MaryEraTxBody (..) + , ShelleyEraTxBody (..) + , ValidityInterval (..) + , bootAddrTxWitsL + , ppCoinsPerUTxOByteL + , ppCoinsPerUTxOWordL + , ppMinFeeAL + , scriptTxWitsL + , witsTxL + ) import Cardano.Ledger.Era ( Era ) import Cardano.Ledger.Shelley.API - ( StrictMaybe (SJust, SNothing), Wdrl (..) ) -import Cardano.Ledger.ShelleyMA.Timelocks - ( ValidityInterval (ValidityInterval) ) + ( StrictMaybe (SJust, SNothing), Withdrawals (..) ) import Cardano.Mnemonic ( SomeMnemonic (SomeMnemonic), entropyToMnemonic, mkEntropy ) import Cardano.Numeric.Util @@ -298,6 +312,8 @@ import Cardano.Wallet.Write.Tx.TimeTranslation ( TimeTranslation, timeTranslationFromEpochInfo ) import Control.Arrow ( first ) +import Control.Lens + ( set, (%~), (.~), (^.) ) import Control.Monad ( forM, forM_, replicateM ) import Control.Monad.Random @@ -324,8 +340,6 @@ import Data.Functor.Identity ( Identity ) import Data.Generics.Internal.VL.Lens ( over, view ) -import Data.Generics.Product - ( setField ) import Data.IntCast ( intCast ) import Data.List @@ -348,6 +362,8 @@ import Data.Semigroup ( Sum (Sum), getSum, mtimesDefault ) import Data.Set ( Set ) +import Data.SOP.Counting + ( exactlyOne ) import Data.Text ( Text ) import Data.Time.Clock.POSIX @@ -364,6 +380,8 @@ import Fmt , (+||) , (||+) ) +import GHC.Stack + ( HasCallStack ) import Numeric.Natural ( Natural ) import Ouroboros.Consensus.BlockchainTime.WallClock.Types @@ -372,8 +390,6 @@ import Ouroboros.Consensus.Config ( SecurityParam (..) ) import Ouroboros.Consensus.Shelley.Eras ( StandardBabbage ) -import Ouroboros.Consensus.Util.Counting - ( exactlyOne ) import Ouroboros.Network.Block ( SlotNo (..) ) import System.Directory @@ -461,18 +477,15 @@ import qualified Cardano.Api as Cardano import qualified Cardano.Api.Shelley as Cardano import qualified Cardano.Crypto.Hash.Blake2b as Crypto import qualified Cardano.Crypto.Hash.Class as Crypto -import qualified Cardano.Ledger.Alonzo.PParams as Alonzo +import qualified Cardano.Ledger.Alonzo.Core as Alonzo import qualified Cardano.Ledger.Alonzo.Scripts as Alonzo -import qualified Cardano.Ledger.Alonzo.Tx as Alonzo -import qualified Cardano.Ledger.Alonzo.TxWitness as Alonzo +import qualified Cardano.Ledger.Alonzo.TxWits as Alonzo import qualified Cardano.Ledger.Babbage as Babbage -import qualified Cardano.Ledger.Babbage.PParams as Babbage -import qualified Cardano.Ledger.Babbage.Tx as Babbage +import qualified Cardano.Ledger.Babbage.Core as Babbage import qualified Cardano.Ledger.Babbage.TxBody as Babbage import qualified Cardano.Ledger.Coin as Ledger import qualified Cardano.Ledger.Core as Ledger import qualified Cardano.Ledger.Crypto as Crypto -import qualified Cardano.Ledger.Serialization as Ledger import qualified Cardano.Ledger.Shelley.API as SL import qualified Cardano.Ledger.Val as Value import qualified Cardano.Slotting.EpochInfo as Slotting @@ -506,7 +519,7 @@ import qualified Ouroboros.Consensus.HardFork.History as HF import qualified Test.Hspec.Extra as Hspec spec :: Spec -spec = do +spec = describe "TransactionSpec" $ do decodeSealedTxSpec feeCalculationSpec feeEstimationRegressionSpec @@ -519,36 +532,37 @@ spec = do describe "Sign transaction" $ do -- TODO [ADP-2849] The implementation must be restricted to work only in -- 'RecentEra's, not just the tests. - spec_forAllRecentEras + spec_forAllRecentErasPendingConway "signTransaction adds reward account witness when necessary" prop_signTransaction_addsRewardAccountKey - spec_forAllRecentEras + spec_forAllRecentErasPendingConway "signTransaction adds extra key witnesses when necessary" prop_signTransaction_addsExtraKeyWitnesses - spec_forAllRecentEras + spec_forAllRecentErasPendingConway "signTransaction adds tx in witnesses when necessary" prop_signTransaction_addsTxInWitnesses - spec_forAllRecentEras + spec_forAllRecentErasPendingConway "signTransaction adds collateral witnesses when necessary" prop_signTransaction_addsTxInCollateralWitnesses - spec_forAllRecentEras + spec_forAllRecentErasPendingConway "signTransaction never removes witnesses" prop_signTransaction_neverRemovesWitnesses - spec_forAllRecentEras + spec_forAllRecentErasPendingConway "signTransaction never changes tx body" prop_signTransaction_neverChangesTxBody - spec_forAllRecentEras + spec_forAllRecentErasPendingConway "signTransaction preserves script integrity" prop_signTransaction_preservesScriptIntegrity -spec_forAllRecentEras +spec_forAllRecentErasPendingConway :: Testable prop => String -> (AnyCardanoEra -> prop) -> Spec -spec_forAllRecentEras description p = +spec_forAllRecentErasPendingConway description p = describe description $ forAllRecentEras' - $ \(AnyCardanoEra era) -> it (show era) - $ property - $ p (AnyCardanoEra era) + $ \(AnyCardanoEra era) -> + if AnyCardanoEra era == AnyCardanoEra ConwayEra + then it (show era) $ pendingWith "TODO: Conway" + else it (show era) $ property $ p (AnyCardanoEra era) where forAllRecentEras' f = forAllRecentEras $ \(AnyRecentEra era) -> f $ AnyCardanoEra $ Write.cardanoEraFromRecentEra era @@ -2013,10 +2027,9 @@ mockProtocolParameters = dummyProtocolParameters , getTokenBundleMaxSize = TokenBundleMaxSize $ TxSize 4_000 , getMaxExecutionUnits = ExecutionUnits 10_000_000_000 14_000_000 } - , minimumUTxO = minimumUTxOForShelleyBasedEra Cardano.ShelleyBasedEraAlonzo - def - { Alonzo._coinsPerUTxOWord = testParameter_coinsPerUTxOWord_Alonzo - } + , minimumUTxO + = minimumUTxOForShelleyBasedEra Cardano.ShelleyBasedEraAlonzo + $ def & ppCoinsPerUTxOWordL .~ testParameter_coinsPerUTxOWord_Alonzo , maximumCollateralInputCount = 3 , minimumCollateralPercentage = 150 } @@ -2276,9 +2289,8 @@ balanceTransactionSpec = describe "balanceTransaction" $ do where -- Dummy PParams to ensure a Coin-delta corresponds to a -- size-delta. - pp = case Write.recentEra @era of - RecentEraConway -> setField @"_minfeeA" 1 def - RecentEraBabbage -> setField @"_minfeeA" 1 def + pp = Write.withConstraints (Write.recentEra @era) $ + Ledger.emptyPParams & set ppMinFeeAL (Ledger.Coin 1) let evaluateMinimumFeeDerivedWitSize (Cardano.Tx body wits) = evaluateMinimumFeeSize (Cardano.Tx body wits) @@ -2377,9 +2389,7 @@ balanceTransactionSpec = describe "balanceTransaction" $ do let outs = Write.outputs era $ Write.txBody era tx let pp = def - { Babbage._coinsPerUTxOByte = - testParameter_coinsPerUTxOByte_Babbage - } + & ppCoinsPerUTxOByteL .~ testParameter_coinsPerUTxOByte_Babbage Write.isBelowMinimumCoinForTxOut era pp (head outs) `shouldBe` False @@ -2428,7 +2438,7 @@ balanceTransactionSpec = describe "balanceTransaction" $ do -- 1 output, 1 input without utxo entry let partialTx :: PartialTx Cardano.BabbageEra - partialTx = over #tx (addExtraTxIns [txin]) $ + partialTx = addExtraTxIns [txin] $ paymentPartialTx [ TxOut dummyAddr (TokenBundle.fromCoin (Coin 1_000_000)) @@ -3232,38 +3242,37 @@ shrinkTxBodyBabbage (Cardano.ShelleyTxBody e bod scripts scriptData aux val) = -> [Ledger.TxBody (Cardano.ShelleyLedgerEra Cardano.BabbageEra)] shrinkLedgerTxBody body = tail [ body - { Babbage.txwdrls = wdrls' - , Babbage.outputs = outs' - , Babbage.inputs = ins' - , Babbage.txcerts = certs' - , Babbage.mint = mint' - , Babbage.reqSignerHashes = rsh' - , Babbage.txUpdates = updates' - , Babbage.txfee = txfee' - , Babbage.txvldt = vldt' - , Babbage.adHash = adHash' - } - | updates' <- - prependOriginal shrinkStrictMaybe (Babbage.txUpdates body) - , wdrls' <- - prependOriginal shrinkWdrl (Babbage.txwdrls body) - , outs' <- - prependOriginal (shrinkSeq (const [])) (Babbage.outputs body) - , ins' <- - prependOriginal (shrinkSet (const [])) (Babbage.inputs body) - , certs' <- - prependOriginal (shrinkSeq (const [])) (Babbage.txcerts body) - , mint' <- - prependOriginal shrinkValue (Babbage.mint body) - , rsh' <- - prependOriginal - (shrinkSet (const [])) (Babbage.reqSignerHashes body) - , txfee' <- - prependOriginal shrinkFee (Babbage.txfee body) - , adHash' <- - prependOriginal shrinkStrictMaybe (Babbage.adHash body) - , vldt' <- - prependOriginal shrinkValidity (Babbage.txvldt body) + & withdrawalsTxBodyL .~ wdrls' + & outputsTxBodyL .~ outs' + & inputsTxBodyL .~ ins' + & certsTxBodyL .~ certs' + & mintTxBodyL .~ mint' + & reqSignerHashesTxBodyL .~ rsh' + & updateTxBodyL .~ updates' + & feeTxBodyL .~ txfee' + & vldtTxBodyL .~ vldt' + & scriptIntegrityHashTxBodyL .~ adHash' + | wdrls' <- prependOriginal shrinkWdrl + (body ^. withdrawalsTxBodyL) + , outs' <- prependOriginal (shrinkSeq (const [])) + (body ^. outputsTxBodyL) + , ins' <- prependOriginal (shrinkSet (const [])) + (body ^. inputsTxBodyL) + , certs' <- prependOriginal (shrinkSeq (const [])) + (body ^. certsTxBodyL) + , mint' <- prependOriginal shrinkValue + (body ^. mintTxBodyL) + , rsh' <- prependOriginal (shrinkSet (const [])) + (body ^. reqSignerHashesTxBodyL) + , updates' <- prependOriginal shrinkStrictMaybe + (body ^. updateTxBodyL) + , txfee' <- prependOriginal shrinkFee + (body ^. feeTxBodyL) + , vldt' <- prependOriginal shrinkValidity + (body ^. vldtTxBodyL) + , adHash' <- prependOriginal shrinkStrictMaybe + (body ^. scriptIntegrityHashTxBodyL) + ] shrinkValidity (ValidityInterval a b) = tail @@ -3306,8 +3315,8 @@ shrinkFee :: Ledger.Coin -> [Ledger.Coin] shrinkFee (Ledger.Coin 0) = [] shrinkFee _ = [Ledger.Coin 0] -shrinkWdrl :: Wdrl era -> [Wdrl era] -shrinkWdrl (Wdrl m) = map (Wdrl . Map.fromList) $ +shrinkWdrl :: Withdrawals era -> [Withdrawals era] +shrinkWdrl (Withdrawals m) = map (Withdrawals . Map.fromList) $ shrinkList shrinkWdrl' (Map.toList m) where shrinkWdrl' (acc, Ledger.Coin c) = @@ -3446,17 +3455,17 @@ testStdGenSeed = StdGenSeed 0 balanceTransactionGoldenSpec :: Spec balanceTransactionGoldenSpec = describe "balance goldens" $ do - it "testPParams" $ do + it "testPParams" $ let name = "testPParams" - let dir = $(getTestData) "balanceTx" "binary" - let ledgerPParams = Write.pparamsLedger + dir = $(getTestData) "balanceTx" "binary" + ledgerPParams = Write.pparamsLedger $ mockPParamsForBalancing @Cardano.BabbageEra - Golden + in Golden { output = ledgerPParams , encodePretty = show - , writeToFile = \fp x -> - T.writeFile fp $ T.pack . toCBORHex $ x - , readFromFile = fmap fromCBORHex . readFile + , writeToFile = \fp -> T.writeFile fp . T.pack . toCBORHex + , readFromFile = + (unsafeDeserialize' . unsafeFromHex . B8.pack <$>) . readFile , goldenFile = dir name "golden" , actualFile = Just (dir name "actual") , failFirstTime = False @@ -3497,8 +3506,6 @@ balanceTransactionGoldenSpec = describe "balance goldens" $ do test "delegate" delegate test "1ada-payment" payment where - fromCBORHex :: FromCBOR a => String -> a - fromCBORHex = unsafeDeserialize' . unsafeFromHex . B8.pack toCBORHex :: ToCBOR a => a -> String toCBORHex = B8.unpack . hex . serialize' @@ -3570,37 +3577,20 @@ balanceTransactionGoldenSpec = describe "balance goldens" $ do where body = Cardano.ShelleyTxBody Cardano.ShelleyBasedEraBabbage - ledgerBody + (Ledger.mkBasicTxBody & certsTxBodyL .~ StrictSeq.fromList certs) [] Cardano.TxBodyNoScriptData Nothing Cardano.TxScriptValidityNone - certs = mkDelegationCertificates delegationAction (Left xpub) + certs = + Cardano.toShelleyCertificate + <$> mkDelegationCertificates delegationAction (Left xpub) where poolId = PoolId "\236(\243=\203\230\214@\n\RS^3\155\208d|\ \\ts\202l\f\249\194\187\230\131\141\198" xpub = getRawKey ShelleyKeyS $ publicKey ShelleyKeyS rootK delegationAction = JoinRegisteringKey poolId - ledgerBody = Babbage.BabbageTxBody - { Babbage.inputs = mempty - , Babbage.collateral = mempty - , Babbage.outputs = mempty - , Babbage.txcerts - = StrictSeq.fromList $ map Cardano.toShelleyCertificate certs - , Babbage.txwdrls = Wdrl mempty - , Babbage.txfee = mempty - , Babbage.txvldt = ValidityInterval SNothing SNothing - , Babbage.txUpdates = SNothing - , Babbage.reqSignerHashes = mempty - , Babbage.mint = mempty - , Babbage.scriptIntegrityHash = SNothing - , Babbage.adHash = SNothing - , Babbage.txnetworkid = SNothing - , Babbage.referenceInputs = mempty - , Babbage.collateralReturn = SNothing - , Babbage.totalCollateral = SNothing - } txFee :: Cardano.Tx Cardano.BabbageEra -> Cardano.Lovelace txFee (Cardano.Tx (Cardano.TxBody content) _) = @@ -3608,15 +3598,20 @@ balanceTransactionGoldenSpec = describe "balance goldens" $ do Cardano.TxFeeExplicit _ c -> c Cardano.TxFeeImplicit _ -> error "implicit fee" - txMinFee - :: Cardano.Tx Cardano.BabbageEra - -> Cardano.UTxO Cardano.BabbageEra - -> Cardano.Lovelace - txMinFee (Cardano.Tx body _) u = toCardanoLovelace $ evaluateMinimumFee - (Cardano.bundleProtocolParams Cardano.BabbageEra - mockCardanoApiPParamsForBalancing) - (estimateKeyWitnessCount u body) - body +txMinFee + :: Cardano.Tx Cardano.BabbageEra + -> Cardano.UTxO Cardano.BabbageEra + -> Cardano.Lovelace +txMinFee (Cardano.Tx body _) u = + toCardanoLovelace + $ evaluateMinimumFee + ( either (error . show) id $ + Cardano.bundleProtocolParams + Cardano.BabbageEra + mockCardanoApiPParamsForBalancing + ) + (estimateKeyWitnessCount u body) + body -- NOTE: 'balanceTransaction' relies on estimating the number of witnesses that -- will be needed. The correctness of this estimation is not tested here. @@ -3777,7 +3772,7 @@ prop_balanceTransactionValid -> Property prop_expectFeeExcessSmallerThan lim tx utxo = do let fee = txFee tx - let minfee = txMinFee tx utxo + let minfee = minFee tx utxo let unLovelace (Cardano.Lovelace x) = x let delta = Cardano.Lovelace $ (unLovelace fee) - (unLovelace minfee) let msg = unwords @@ -3796,7 +3791,7 @@ prop_balanceTransactionValid -> Property prop_minfeeIsCovered tx utxo = do let fee = txFee tx - let minfee = txMinFee tx utxo + let minfee = minFee tx utxo let unLovelace (Cardano.Lovelace x) = x let delta = Cardano.Lovelace $ (unLovelace minfee) - (unLovelace fee) let msg = unwords @@ -3878,11 +3873,11 @@ prop_balanceTransactionValid Cardano.TxFeeExplicit _ c -> c Cardano.TxFeeImplicit i -> case i of {} - txMinFee + minFee :: Cardano.Tx era -> Cardano.UTxO era -> Cardano.Lovelace - txMinFee tx@(Cardano.Tx body _) utxo = Write.toCardanoLovelace + minFee tx@(Cardano.Tx body _) utxo = Write.toCardanoLovelace $ Write.evaluateMinimumFee (recentEra @era) ledgerPParams (Write.fromCardanoTx tx) (estimateKeyWitnessCount utxo body) @@ -4054,17 +4049,15 @@ mockCardanoApiPParamsForBalancing = Cardano.ProtocolParameters , Cardano.protocolParamMonetaryExpansion = 0 , Cardano.protocolParamTreasuryCut = 0 , Cardano.protocolParamUTxOCostPerWord = - Just $ fromIntegral $ - SL.unCoin testParameter_coinsPerUTxOWord_Alonzo + Just $ fromShelleyLovelace $ + Alonzo.unCoinPerWord testParameter_coinsPerUTxOWord_Alonzo , Cardano.protocolParamUTxOCostPerByte = - Just $ fromIntegral $ - SL.unCoin testParameter_coinsPerUTxOByte_Babbage - , Cardano.protocolParamCostModels = Cardano.fromAlonzoCostModels - costModelsForTesting + Just $ fromShelleyLovelace $ + Babbage.unCoinPerByte testParameter_coinsPerUTxOByte_Babbage + , Cardano.protocolParamCostModels = + Cardano.fromAlonzoCostModels costModelsForTesting , Cardano.protocolParamPrices = - Just $ Cardano.ExecutionUnitPrices - (721 % 10_000_000) - (577 % 10_000) + Just $ Cardano.ExecutionUnitPrices (721 % 10_000_000) (577 % 10_000) , Cardano.protocolParamMaxBlockExUnits = Just $ Cardano.ExecutionUnits 10_000_000_000 14_000_000 , Cardano.protocolParamCollateralPercent = Just 150 @@ -4072,10 +4065,9 @@ mockCardanoApiPParamsForBalancing = Cardano.ProtocolParameters } mockPParamsForBalancing - :: forall era. Write.IsRecentEra era - => Write.ProtocolParameters era + :: forall era . Write.IsRecentEra era => Write.ProtocolParameters era mockPParamsForBalancing = - Write.ProtocolParameters $ + Write.ProtocolParameters . either (error . show) id $ Cardano.toLedgerPParams (Write.shelleyBasedEra @era) mockCardanoApiPParamsForBalancing @@ -4085,7 +4077,7 @@ costModelsForTesting :: Alonzo.CostModels costModelsForTesting = unsafePerformIO $ do let fp = $(getTestData) "cardano-node-shelley" "alonzo-genesis.yaml" (alonzoGenesis :: AlonzoGenesis) <- Yaml.decodeFileThrow fp - return $ costmdls alonzoGenesis + return $ agCostModels alonzoGenesis block0 :: Block block0 = Block @@ -4211,17 +4203,12 @@ estimateSignedTxSizeSpec = describe "estimateSignedTxSize" $ do ledgerTx :: Write.Tx (Write.ShelleyLedgerEra era) ledgerTx = Write.fromCardanoTx @era tx - noScripts = Write.withConstraints (recentEra @era) $ Map.null $ - view - (Alonzo.witsAlonzoTxL . Alonzo.scriptAlonzoWitsL) - ledgerTx - noBootWits = Write.withConstraints (recentEra @era) $ Set.null $ - view - (Alonzo.witsAlonzoTxL . Alonzo.bootAddrAlonzoWitsL) - ledgerTx - - testDoesNotYetSupport x = pendingWith $ - "Test setup does not work for txs with " <> x + noScripts = Write.withConstraints (recentEra @era) $ + Map.null $ ledgerTx ^. witsTxL . scriptTxWitsL + noBootWits = Write.withConstraints (recentEra @era) $ + Set.null $ ledgerTx ^. witsTxL . bootAddrTxWitsL + testDoesNotYetSupport x = + pendingWith $ "Test setup does not work for txs with " <> x case (noScripts, noBootWits) of (True, True) -> do @@ -4255,7 +4242,8 @@ estimateSignedTxSizeSpec = describe "estimateSignedTxSize" $ do -- as estimateSignedTxSize can tell that all inputs in the tx correspond to -- outputs with vk payment credentials. utxoPromisingInputsHaveVkPaymentCreds - :: forall era. Cardano.IsShelleyBasedEra era + :: forall era. HasCallStack + => Cardano.IsShelleyBasedEra era => Cardano.TxBody era -> Cardano.UTxO era utxoPromisingInputsHaveVkPaymentCreds (Cardano.TxBody body) = @@ -4320,36 +4308,14 @@ paymentPartialTx txouts = PartialTx (Cardano.Tx body []) mempty [] where body = Cardano.ShelleyTxBody Cardano.ShelleyBasedEraBabbage - babbageBody + ( mkBasicTxBody & + outputsTxBodyL .~ StrictSeq.fromList (toBabbageTxOut <$> txouts) + ) [] Cardano.TxBodyNoScriptData Nothing Cardano.TxScriptValidityNone - -- NOTE: We should write this as @emptyTxBody { outputs = ... }@. - -- The next time we bump the ledger , this may already be availible to us - -- with 'mkBabbageTxBody' and 'initialTxBodyRaw'. - -- https://github.com/input-output-hk/cardano-ledger/blob/17649bc09e4c47923f7ad103d337cc1b8e6d3078/eras/babbage/impl/src/Cardano/Ledger/Babbage.BabbageTxBody.hs#L940 - babbageBody = Babbage.BabbageTxBody - { Babbage.inputs = mempty - , Babbage.collateral = mempty - , Babbage.outputs = StrictSeq.fromList $ - map (Ledger.mkSized . toBabbageTxOut) txouts - , Babbage.txcerts = mempty - , Babbage.txwdrls = Wdrl mempty - , Babbage.txfee = mempty - , Babbage.txvldt = ValidityInterval SNothing SNothing - , Babbage.txUpdates = SNothing - , Babbage.reqSignerHashes = mempty - , Babbage.mint = mempty - , Babbage.scriptIntegrityHash = SNothing - , Babbage.adHash = SNothing - , Babbage.txnetworkid = SNothing - , Babbage.referenceInputs = mempty - , Babbage.collateralReturn = SNothing - , Babbage.totalCollateral = SNothing - } - pingPong_1 :: PartialTx Cardano.BabbageEra pingPong_1 = PartialTx tx mempty [] where @@ -4399,25 +4365,19 @@ deserializeBabbageTx = either (error . show) id -- Ideally merge with 'updateTx' addExtraTxIns :: [TxIn] - -> Cardano.Tx Cardano.BabbageEra - -> Cardano.Tx Cardano.BabbageEra -addExtraTxIns extraIns = modifyBabbageTxBody $ \body -> - body { Babbage.inputs = Babbage.inputs body <> toLedgerInputs extraIns } + -> PartialTx Cardano.BabbageEra + -> PartialTx Cardano.BabbageEra +addExtraTxIns extraIns = + #tx %~ modifyBabbageTxBody (inputsTxBodyL %~ (<> toLedgerInputs extraIns)) where toLedgerInputs = - Set.map (Cardano.toShelleyTxIn . toCardanoTxIn) - . Set.fromList + Set.map (Cardano.toShelleyTxIn . toCardanoTxIn) . Set.fromList withValidityInterval :: ValidityInterval -> PartialTx Cardano.BabbageEra -> PartialTx Cardano.BabbageEra -withValidityInterval vi ptx = ptx - { tx = flip modifyBabbageTxBody (tx ptx) $ \ledgerBody -> - ledgerBody - { Babbage.txvldt = vi - } - } +withValidityInterval vi = #tx %~ modifyBabbageTxBody (vldtTxBodyL .~ vi) -- Ideally merge with 'updateTx' modifyBabbageTxBody diff --git a/lib/wallet/test/unit/Cardano/Wallet/TokenMetadataSpec.hs b/lib/wallet/test/unit/Cardano/Wallet/TokenMetadataSpec.hs index 8d08f869488..6ec3d606d99 100644 --- a/lib/wallet/test/unit/Cardano/Wallet/TokenMetadataSpec.hs +++ b/lib/wallet/test/unit/Cardano/Wallet/TokenMetadataSpec.hs @@ -1,6 +1,7 @@ {-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeApplications #-} +{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} module Cardano.Wallet.TokenMetadataSpec ( spec diff --git a/lib/wallet/test/unit/Cardano/Wallet/Write/TxSpec.hs b/lib/wallet/test/unit/Cardano/Wallet/Write/TxSpec.hs index 0cb96818142..75ac4966d64 100644 --- a/lib/wallet/test/unit/Cardano/Wallet/Write/TxSpec.hs +++ b/lib/wallet/test/unit/Cardano/Wallet/Write/TxSpec.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE DerivingStrategies #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeApplications #-} @@ -10,52 +11,34 @@ module Cardano.Wallet.Write.TxSpec where import Prelude import Cardano.Api.Gen - ( genHashableScriptData, genScriptInAnyLang, genTxIn ) -import Cardano.Ledger.Babbage.PParams - ( _coinsPerUTxOByte ) -import Cardano.Ledger.Babbage.TxBody - ( BabbageTxOut (..) ) -import Cardano.Wallet.Unsafe - ( unsafeFromHex ) + ( genTxIn ) +import Cardano.Ledger.Api + ( ppCoinsPerUTxOByteL ) import Cardano.Wallet.Write.Tx ( AnyRecentEra - , BinaryData , RecentEra (..) - , Script - , StandardBabbage - , StandardConway - , TxOutInBabbage - , binaryDataFromBytes - , binaryDataToBytes , computeMinimumCoinForTxOut - , datumFromCardanoScriptData , datumHashFromBytes , datumHashToBytes - , datumToCardanoScriptData , fromCardanoUTxO , isBelowMinimumCoinForTxOut - , isPlutusScript , modifyTxOutCoin - , scriptFromCardanoEnvelopeJSON - , scriptFromCardanoScriptInAnyLang - , scriptToCardanoEnvelopeJSON - , scriptToCardanoScriptInAnyLang , toCardanoUTxO ) -import Cardano.Wallet.Write.Tx.Gen - ( genBinaryData, genTxOut, shrinkBinaryData ) +import Control.Lens + ( (&), (.~) ) import Data.Aeson ( (.=) ) -import Data.Aeson.Types - ( parseEither ) import Data.Default ( Default (..) ) -import PlutusLedgerApi.V1 - ( Data (..) ) import Test.Cardano.Ledger.Alonzo.Serialisation.Generators () +import Test.Cardano.Ledger.Babbage.Arbitrary + () +import Test.Cardano.Ledger.Conway.Arbitrary + () import Test.Hspec - ( Spec, describe, expectationFailure, it, shouldBe, shouldNotBe ) + ( Spec, describe, it, shouldBe, shouldNotBe ) import Test.QuickCheck ( Arbitrary (..) , Arbitrary1 (liftArbitrary) @@ -75,15 +58,12 @@ import Test.Utils.Laws import qualified Cardano.Api as Cardano import qualified Cardano.Api.Gen as Cardano -import qualified Cardano.Ledger.Alonzo.Data as Alonzo import qualified Data.Aeson as Aeson -import qualified Data.Aeson.Types as Aeson import qualified Data.ByteString as BS import qualified Data.Map as Map spec :: Spec spec = do - describe "AnyRecentEra" $ do describe "Class instances obey laws" $ do testLawsMany @AnyRecentEra @@ -92,43 +72,6 @@ spec = do , showLaws ] - describe "BinaryData" $ do - it "BinaryData is isomorphic to Cardano.ScriptData" $ - testIsomorphism - (NamedFun - datumToCardanoScriptData "datumToCardanoScriptData") - (NamedFun - datumFromCardanoScriptData "datumFromCardanoScriptData") - id - it "binaryDataFromBytes . binaryDataToBytes == Right" - $ property $ \d -> do - let f = binaryDataFromBytes . binaryDataToBytes - f d === Right d - - describe "binaryDataFromBytes goldens" $ do - let decodePlutusData hex = - Alonzo.getPlutusData . Alonzo.binaryDataToData - <$> binaryDataFromBytes (unsafeFromHex hex) - let shouldBeRight a b = a `shouldBe` Right b - - it "I 42" $ - (decodePlutusData "182a") `shouldBe` Right (I 42) - - it "Constr 0 []" $ - (decodePlutusData "D87980") `shouldBe` Right (Constr 0 []) - - it "Constr 1 [B \"hello\", B ..., Map ...]" $ do - let longDatum = - "D87A834568656C6C6F5820859601DEB772672B933EF30D66609610\ - \C928BCF116951A52F4B8698F34C1FC80A140A1401A001E8480" - decodePlutusData longDatum `shouldBeRight` - Constr 1 - [ B "hello" - , B "\133\150\SOH\222\183rg+\147>\243\rf`\150\DLE\201(\ - \\188\241\SYN\149\SUBR\244\184i\143\&4\193\252\128" - , Map [(B "", Map [(B "", I 2000000)])] - ] - describe "DatumHash" $ do it "datumHashFromBytes . datumHashToBytes == Just" $ property $ \h -> do @@ -146,35 +89,12 @@ spec = do datumHashFromBytes (BS.replicate 28 0) `shouldBe` Nothing - describe "Script" $ do - it "is isomorphic to Cardano.ScriptInAnyLang (modulo SimpleScriptV1/2)" - $ testIsomorphism - (NamedFun - (scriptToCardanoScriptInAnyLang @Cardano.BabbageEra) - "scriptToCardanoScriptInAnyLang") - (NamedFun - (scriptFromCardanoScriptInAnyLang @Cardano.BabbageEra) - "scriptFromCardanoScriptInAnyLang") - id - - - it "parseEither (scriptFromCardanoEnvelopeJSON . \ - \scriptToCardanoEnvelopeJSON) == Right" $ property $ \s -> do - let f = scriptFromCardanoEnvelopeJSON - . scriptToCardanoEnvelopeJSON - parseEither f s === Right s - - it "scriptFromCardanoEnvelopeJSON golden" $ do - case Aeson.parse scriptFromCardanoEnvelopeJSON plutusScriptV2Json of - Aeson.Success s -> isPlutusScript s `shouldBe` True - Aeson.Error e -> expectationFailure e - describe "TxOut" $ do describe "computeMinimumCoinForTxOut" $ do it "isBelowMinimumCoinForTxOut (setCoin (result <> delta)) \ \ == False (Babbage)" $ property $ \out delta perByte -> do - let pp = def { _coinsPerUTxOByte = perByte } + let pp = def & ppCoinsPerUTxOByteL .~ perByte let era = RecentEraBabbage let c = delta <> computeMinimumCoinForTxOut era pp out isBelowMinimumCoinForTxOut era pp @@ -184,16 +104,15 @@ spec = do it "isBelowMinimumCoinForTxOut (setCoin (result <> delta)) \ \ == False (Conway)" $ property $ \out delta perByte -> do - let pp = def { _coinsPerUTxOByte = perByte } + let pp = def & ppCoinsPerUTxOByteL .~ perByte let era = RecentEraConway let c = delta <> computeMinimumCoinForTxOut era pp out isBelowMinimumCoinForTxOut era pp (modifyTxOutCoin era (const c) out) === False - describe "UTxO" $ do - it "is isomorphic to Cardano.UTxO (modulo SimpleScriptV1/2)" $ do + it "is isomorphic to Cardano.UTxO" $ do testIsomorphism (NamedFun (toCardanoUTxO @Cardano.BabbageEra) @@ -211,24 +130,6 @@ instance Arbitrary AnyRecentEra where arbitrary = arbitraryBoundedEnum shrink = shrinkBoundedEnum - -instance Arbitrary Cardano.HashableScriptData where - arbitrary = genHashableScriptData - shrink = const [] - --- | The OVERLAPS can be removed when we remove import of --- "Test.Cardano.Ledger.Alonzo.Serialisation.Generators" -instance {-# INCOHERENT #-} Arbitrary (BinaryData StandardBabbage) where - arbitrary = genBinaryData - shrink = shrinkBinaryData - -instance Arbitrary Cardano.ScriptInAnyLang where - arbitrary = genScriptInAnyLang - -instance {-# OVERLAPPING #-} Arbitrary (Script StandardBabbage) where - arbitrary = scriptFromCardanoScriptInAnyLang @Cardano.BabbageEra - <$> arbitrary - instance Arbitrary (Cardano.UTxO Cardano.BabbageEra) where arbitrary = Cardano.UTxO . Map.fromList <$> liftArbitrary genTxInOutEntry where @@ -236,13 +137,6 @@ instance Arbitrary (Cardano.UTxO Cardano.BabbageEra) where <$> genTxIn <*> Cardano.genTxOut Cardano.BabbageEra -instance Arbitrary TxOutInBabbage where - arbitrary = genTxOut RecentEraBabbage - -instance Arbitrary (BabbageTxOut StandardConway) where - arbitrary = genTxOut RecentEraConway - - -------------------------------------------------------------------------------- -- Helpers -------------------------------------------------------------------------------- @@ -287,7 +181,7 @@ testIsomorphism (NamedFun f fName) (NamedFun g gName) normalize = (fName <> " . " <> gName <> " == id") (property $ \x -> f (g (normalize x)) === normalize x) , counterexample - (gName <> " . " <> gName <> " == id") + (gName <> " . " <> fName <> " == id") (property $ \x -> g (f x) === x) ] diff --git a/lib/wallet/test/unit/Cardano/WalletSpec.hs b/lib/wallet/test/unit/Cardano/WalletSpec.hs index 54d0ef3eb13..d74a676a861 100644 --- a/lib/wallet/test/unit/Cardano/WalletSpec.hs +++ b/lib/wallet/test/unit/Cardano/WalletSpec.hs @@ -7,9 +7,11 @@ {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE NamedFieldPuns #-} +{-# LANGUAGE NumericUnderscores #-} {-# LANGUAGE OverloadedLabels #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE TupleSections #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-} @@ -161,13 +163,9 @@ import Control.DeepSeq import Control.Monad ( forM_, guard, replicateM, void ) import Control.Monad.Class.MonadTime - ( DiffTime - , MonadMonotonicTime (..) - , MonadTime (..) - , Time (..) - , addTime - , diffTime - ) + ( MonadMonotonicTimeNSec (..), MonadTime (..), UTCTime ) +import Control.Monad.Class.MonadTime.SI + ( MonadMonotonicTime, Time (..), addTime, diffTime ) import Control.Monad.IO.Unlift ( MonadIO (..), MonadUnliftIO (..), wrappedWithRunInIO ) import Control.Monad.Trans.Class @@ -213,7 +211,7 @@ import Data.Quantity import Data.Text.Class ( ToText (..) ) import Data.Time.Clock - ( UTCTime ) + ( DiffTime, diffTimeToPicoseconds, picosecondsToDiffTime ) import Data.Time.Clock.POSIX ( posixSecondsToUTCTime ) import Data.Word @@ -734,13 +732,11 @@ instance Arbitrary GenSubmissions where genBuiltTx = do sl <- genSmallSlot let bh = Quantity $ fromIntegral $ unSlotNo sl - st <- elements [Pending] - dir <- elements [Outgoing] expry <- oneof [fmap (Just . (+ sl)) genSmallSlot, pure Nothing] i <- arbitrary pure $ BuiltTx (mkTx i) - (TxMeta st dir sl bh (Coin 0) expry) + (TxMeta Pending Outgoing sl bh (Coin 0) expry) (fakeSealedTx (i, [])) genSmallSlot = SlotNo . fromIntegral <$> sized (\n -> choose (1, 1+ 4 * n)) @@ -748,7 +744,7 @@ instance Arbitrary GenSubmissions where instance Arbitrary TxRetryTest where arbitrary = do GenSubmissions metas <- arbitrary - let results = zip (builtSealedTx <$> metas) (repeat True) + let results = fmap (, True) (builtSealedTx <$> metas) TxRetryTest metas results <$> arbitrary <*> arbitrary instance Arbitrary SlottingParameters where @@ -787,12 +783,23 @@ newtype TxRetryTestM a = TxRetryTestM instance MonadUnliftIO TxRetryTestM where withRunInIO = wrappedWithRunInIO TxRetryTestM unTxRetryTestM -instance MonadMonotonicTime TxRetryTestM where +{- instance MonadMonotonicTime TxRetryTestM where getMonotonicTime = do st <- TxRetryTestM ask modifyMVar (timeVar st) $ \t -> do let t' = addTime (timeStep st) t - pure (t', t') + pure (t', t') -} + +instance MonadMonotonicTime TxRetryTestM +instance MonadMonotonicTimeNSec TxRetryTestM where + getMonotonicTimeNSec = do + TxRetryTestState {timeVar, timeStep} <- TxRetryTestM ask + modifyMVar timeVar $ \t -> let t' = timeStep + coerce t + in pure (coerce t' , timeToNanoTime $ coerce t') + +timeToNanoTime :: Time -> Word64 +timeToNanoTime = fromIntegral . (`div` 1_000) + . diffTimeToPicoseconds . coerce instance MonadTime TxRetryTestM where getCurrentTime = liftIO getCurrentTime @@ -898,7 +905,14 @@ instance Arbitrary ThrottleTest where arbitrary = ThrottleTest <$> genInterval <*> listOf1 genDiffTime where genInterval = genDiffTime `suchThat` (> 0) - genDiffTime = abs <$> arbitrarySizedFractional + -- need to discard picoseconds to match `Time` precision (nanoseconds) + genDiffTime + = picosecondsToDiffTime + . (* 1_000) + . (`div` 1_000) + . diffTimeToPicoseconds + . abs + <$> arbitrarySizedFractional shrink (ThrottleTest i dts) = [ ThrottleTest (fromRational i') (map fromRational dts') | (i', dts') <- shrink (toRational i, map toRational dts) @@ -931,13 +945,18 @@ recordTime x = ThrottleTestT $ lift $ state $ \(ThrottleTestState ts now xs) -> ((), ThrottleTestState ts now (x:xs)) instance MonadMonotonicTime m => MonadMonotonicTime (ThrottleTestT m) where - getMonotonicTime = ThrottleTestT $ MaybeT $ state mockTime + +instance MonadMonotonicTimeNSec m => MonadMonotonicTimeNSec (ThrottleTestT m) where + getMonotonicTimeNSec = ThrottleTestT $ MaybeT $ state mockTime where + mockTime :: ThrottleTestState -> (Maybe Word64, ThrottleTestState) mockTime (ThrottleTestState later now as) = case later of [] -> (Nothing, ThrottleTestState later now as) (t:ts) -> let now' = addTime t now - in (Just now', ThrottleTestState ts now' as) + in ( Just $ timeToNanoTime now' + , ThrottleTestState ts now' as + ) instance MonadUnliftIO m => MonadUnliftIO (StateT ThrottleTestState m) where withRunInIO inner = StateT $ \tts -> do @@ -968,18 +987,22 @@ prop_throttle tc@(ThrottleTest interval diffTimes) = monadicIO $ do [ ("res = " ++ show res) , ("st = " ++ show st) , ("accTimes = " ++ show accTimes) - , ("actuals = " ++ show (actions st)) + , ("actions = " ++ show (actions st)) , ("expected = " ++ show expected) + , ("timeDeltas= " ++ show (timeDeltas (map fst (actions st)))) + , ("interval = " ++ show interval) + , ("diffTimes= " ++ show diffTimes) ] + -- sanity-check test runner assertNamed "consumed test data" (null $ remainingDiffTimes st) assertNamed "expected final time" (now st == finalTime) assertNamed "runner success" (isJust res) -- properties - assertNamed "action runs at most once per interval" $ - all (> interval) (timeDeltas (map fst (actions st))) assertNamed "action runs whenever interval has passed" $ length diffTimes <= 1 || actions st == expected + assertNamed "action runs at most once per interval" $ + all (>= interval) (timeDeltas (map fst (actions st))) where testAction :: ThrottleTestT IO () testAction = do diff --git a/lib/wallet/test/unit/Control/Concurrent/ConciergeSpec.hs b/lib/wallet/test/unit/Control/Concurrent/ConciergeSpec.hs index 000237b36e0..b9eb2601ba7 100644 --- a/lib/wallet/test/unit/Control/Concurrent/ConciergeSpec.hs +++ b/lib/wallet/test/unit/Control/Concurrent/ConciergeSpec.hs @@ -1,4 +1,8 @@ +{-# LANGUAGE PartialTypeSignatures #-} {-# LANGUAGE RankNTypes #-} +{-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE TypeApplications #-} + module Control.Concurrent.ConciergeSpec ( spec ) where @@ -11,34 +15,31 @@ import Control.Monad.Class.MonadFork ( forkIO ) import Control.Monad.Class.MonadSay ( say ) +import Control.Monad.Class.MonadThrow + ( throwIO, try ) import Control.Monad.Class.MonadTimer ( threadDelay ) import Control.Monad.IOSim ( IOSim, runSimTrace, selectTraceEventsSay ) -import Control.Monad.Trans.Class - ( lift ) -import Control.Monad.Trans.Except - ( ExceptT, catchE, runExceptT, throwE ) import Test.Hspec ( Spec, describe, it ) import Test.QuickCheck ( Property, (===) ) spec :: Spec -spec = do +spec = describe "Control.Concurrent.Concierge" $ do it "Atomic operations do not interleave" unit_atomic - it "throwE in ExceptT releases lock" - unit_exceptT_release_lock + it "throwIO releases lock" + unit_release_lock {------------------------------------------------------------------------------- Properties -------------------------------------------------------------------------------} -- | Deterministic test for atomicity. --- We have to compare a program run that interleaves --- against one that is atomic. +-- We have to compare a program run that interleaves against one that is atomic. unit_atomic :: Bool unit_atomic = ("ABAB" == sayings testInterleave) && ("AABB" == sayings testAtomic) @@ -53,31 +54,19 @@ unit_atomic = test :: (forall a. IOSim s a -> IOSim s a) -> IOSim s () test atomically = do - _ <- forkIO $ atomically (delay 1 >> action "B") + _ <- forkIO $ atomically (threadDelay 1 >> action "B") atomically $ action "A" - delay 4 + threadDelay 4 action :: String -> IOSim s () - action s = say s >> delay 2 >> say s - - delay :: Int -> IOSim s () - delay n = threadDelay (fromIntegral n*0.1) + action s = say s >> threadDelay 2 >> say s --- | Check that using 'throwE' in the 'ExceptE' monad releases the lock -unit_exceptT_release_lock :: Property -unit_exceptT_release_lock = - ["A"] === selectTraceEventsSay (runSimTrace $ runExceptT test) +unit_release_lock :: Property +unit_release_lock = ["A"] === selectTraceEventsSay (runSimTrace test) where - liftE :: IOSim s a -> ExceptT String (IOSim s) a - liftE = lift - - test :: ExceptT String (IOSim s) () + test :: IOSim s () test = do - concierge <- liftE newConcierge - let atomically = atomicallyWithLifted liftE concierge () - _ <- tryE $ atomically $ throwE "X" - atomically $ liftE $ say "A" - --- not exported in transformers <= 0.5.6 -tryE :: Monad m => ExceptT e m a -> ExceptT e m (Either e a) -tryE action = (Right <$> action) `catchE` (pure . Left) + concierge <- newConcierge + let atomically = atomicallyWithLifted id concierge () + _ <- try @_ @IOError $ atomically $ throwIO $ userError "X" + atomically $ say "A" diff --git a/nix/haskell.nix b/nix/haskell.nix index 7203bc87726..35bb28e8bd6 100644 --- a/nix/haskell.nix +++ b/nix/haskell.nix @@ -54,9 +54,12 @@ CHaP: haskell-nix: nixpkgs-recent: nodePkgs: haskell-nix.cabalProject' [ # use buildPackages here, we want set-git-rev on the build machine even under # cross compilation (e.g. to windows) setGitRevPostInstall = setGitRevPostInstall' config.gitrev; - setGitRevPostInstall' = gitrev: '' - ${pkgs.buildPackages.haskellBuildUtils}/bin/set-git-rev "${gitrev}" $out/bin/* - ''; + setGitRevPostInstall' = gitrev: '' ''; + # The following is commented out because it causes error with + # 'packages.cardano-node.package.identifier.name' not being defined. + # setGitRevPostInstall' = gitrev: '' + # ${pkgs.buildPackages.haskellBuildUtils}/bin/set-git-rev "${gitrev}" $out/bin/* + # ''; rewriteLibsPostInstall = lib.optionalString (pkgs.stdenv.hostPlatform.isDarwin) '' export PATH=$PATH:${lib.makeBinPath (with pkgs.buildPackages; [ haskellBuildUtils binutils nix ])} @@ -92,9 +95,10 @@ CHaP: haskell-nix: nixpkgs-recent: nodePkgs: haskell-nix.cabalProject' [ filter = lib.cleanSourceFilter; }; + indexState = "2023-06-04T22:30:25Z"; in { name = "cardano-wallet"; - compiler-nix-name = "ghc8107"; + compiler-nix-name = "ghc928"; src = haskellLib.cleanSourceWith { name = "cardano-wallet-src"; @@ -103,23 +107,25 @@ CHaP: haskell-nix: nixpkgs-recent: nodePkgs: haskell-nix.cabalProject' [ }; shell = { + name = "cardano-wallet-shell${lib.optionalString config.profiling "-profiled"}"; packages = ps: builtins.attrValues (haskellLib.selectProjectPackages ps); tools = { - cabal = "latest"; - cabal-cache.version = "1.0.2.1"; + # cabal-cache = {}; + cabal = { index-state = indexState; }; + cabal-fmt = { index-state = indexState; }; haskell-language-server = { - version = "1.8.0.0"; - modules = [{ reinstallableLibGhc = false; }]; + index-state = indexState; + version = "latest"; }; - hie-bios = { - modules = [{ reinstallableLibGhc = false; }]; + hlint = { index-state = indexState; }; + hoogle = { index-state = indexState; }; + lentil = { index-state = indexState; }; + fourmolu = { index-state = indexState; }; + weeder = { + index-state = indexState; + version = "2.4.1"; }; - hoogle.version = "5.0.18.1"; - hlint.version = "3.3.1"; - lentil.version = "1.5.2.0"; - stylish-haskell.version = "0.11.0.3"; - weeder.version = "2.1.3"; }; nativeBuildInputs = with buildProject.hsPkgs; [ nodePkgs.cardano-cli @@ -138,6 +144,7 @@ CHaP: haskell-nix: nixpkgs-recent: nodePkgs: haskell-nix.cabalProject' [ jq yq nixWrapped + (haskell-nix.tool "ghc8107" "stylish-haskell" "0.11.0.3") ]); }; @@ -165,10 +172,7 @@ CHaP: haskell-nix: nixpkgs-recent: nodePkgs: haskell-nix.cabalProject' [ # Provide configuration and dependencies to cardano-wallet components ({ config, pkgs, ... }: let - cardanoNodeExes = with config.hsPkgs; - [ nodePkgs.cardano-cli - nodePkgs.cardano-node - ]; + cardanoNodeExes = [ nodePkgs.cardano-cli nodePkgs.cardano-node ]; in { reinstallableLibGhc = true; diff --git a/scripts/make_release.sh b/scripts/make_release.sh index 46529919894..ba30a098f02 100755 --- a/scripts/make_release.sh +++ b/scripts/make_release.sh @@ -23,7 +23,7 @@ SCRIPT=$(realpath "$0") # Release tags must follow format vYYYY-MM-DD. GIT_TAG="v2023-04-14" OLD_GIT_TAG="v2022-12-14" -CARDANO_NODE_TAG="1.35.4" +CARDANO_NODE_TAG="8.1.1" ################################################################################ # Tag munging functions @@ -86,8 +86,8 @@ if [ "$OLD_GIT_TAG" != "$GIT_TAG" ]; then sed -i -e "s/^GIT_TAG=\"$GIT_TAG\"/GIT_TAG=\"$new_tag\"/g" "$SCRIPT" # Edit from the bottom and up, not to affect the line-numbers. - sed -i -e $((ln+3))d README.md - sed -i -e $((ln+1))i"$line_to_insert" README.md + sed -i -e $((ln + 3))d README.md + sed -i -e $((ln + 1))i"$line_to_insert" README.md echo "Automatically updated the list of releases in README.md. Please review the resulting changes." fi @@ -128,25 +128,25 @@ KNOWN_ISSUES="$release_docs/GENERATED_KNOWN_ISSUES.md" mkdir -p "$release_docs" echo "Generating changelog into $CHANGELOG..." -./scripts/make_changelog.sh "$OLD_DATE" > "$CHANGELOG" +./scripts/make_changelog.sh "$OLD_DATE" >"$CHANGELOG" echo "" echo "Generating unresolved issues list into $KNOWN_ISSUES..." -if ! jira release-notes-bugs > "$KNOWN_ISSUES"; then +if ! jira release-notes-bugs >"$KNOWN_ISSUES"; then echo "The \"jira release-notes-bugs\" command didn't work." - echo TBD > "$KNOWN_ISSUES" + echo TBD >"$KNOWN_ISSUES" fi echo "" echo "Filling in template into ${release_notes}..." -sed -e "s/{{GIT_TAG}}/$GIT_TAG/g" \ - -e "s/{{CARDANO_NODE_TAG}}/$CARDANO_NODE_TAG/g" \ - -e "s/{{CABAL_VERSION}}/$CABAL_VERSION/g" \ - -e "/{{CHANGELOG}}/r $CHANGELOG" \ - -e "/{{CHANGELOG}}/d" \ - -e "/{{KNOWN_ISSUES}}/r $KNOWN_ISSUES" \ - -e "/{{KNOWN_ISSUES}}/d" \ - .github/RELEASE_TEMPLATE.md > "$release_notes" +sed -e "s/{{GIT_TAG}}/$GIT_TAG/g" \ + -e "s/{{CARDANO_NODE_TAG}}/$CARDANO_NODE_TAG/g" \ + -e "s/{{CABAL_VERSION}}/$CABAL_VERSION/g" \ + -e "/{{CHANGELOG}}/r $CHANGELOG" \ + -e "/{{CHANGELOG}}/d" \ + -e "/{{KNOWN_ISSUES}}/r $KNOWN_ISSUES" \ + -e "/{{KNOWN_ISSUES}}/d" \ + .github/RELEASE_TEMPLATE.md >"$release_notes" ################################################################################ # Commit and tag @@ -156,8 +156,7 @@ if git diff --quiet; then else read -p "Do you want to create a commit (y/n) " -n 1 -r echo - if [[ $REPLY =~ ^[Yy]$ ]] - then + if [[ $REPLY =~ ^[Yy]$ ]]; then msg="Bump version from $OLD_CABAL_VERSION to $CABAL_VERSION" git commit -am "$msg" fi diff --git a/specifications/api/swagger.yaml b/specifications/api/swagger.yaml index f619996dedb..1919f967e28 100644 --- a/specifications/api/swagger.yaml +++ b/specifications/api/swagger.yaml @@ -2051,7 +2051,7 @@ x-rationalAsPair: &rationalAsPair minimum: 0 x-rationalAsNumber: &rationalAsNumber - type: integer + type: number # NOTE: intended to be 'integer', but logic to serialize as rationalAsPair is missing. minimum: 0 x-rational: &rational diff --git a/touch.me.CI b/touch.me.CI index c9d6dbffc69..6d0cd6a7dda 100644 --- a/touch.me.CI +++ b/touch.me.CI @@ -1 +1 @@ -Thu 17 Nov 00:02:28 UTC 2022 +Thu Jun 22 12:51:21 PM UTC 2023