From 7104ea8a20c876d0f0943b6b4be5fa9ceee5d7bf Mon Sep 17 00:00:00 2001 From: Rodney Lorrimar Date: Thu, 17 Sep 2020 10:57:45 +1000 Subject: [PATCH 1/9] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 20a36f7ed0f..d10689667ea 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,8 @@ See **Installation Instructions** for each available [release](https://github.co > > | cardano-wallet | jörmungandr (compatible versions) | cardano-node (compatible versions) > | --- | --- | --- -> | `master` branch | [v0.9.0](https://github.com/input-output-hk/jormungandr/releases/tag/v0.9.0) | [1.19.1](https://github.com/input-output-hk/cardano-node/releases/tag/1.19.1) +> | `master` branch | [v0.9.0](https://github.com/input-output-hk/jormungandr/releases/tag/v0.9.0) | [1.20.0](https://github.com/input-output-hk/cardano-node/releases/tag/1.20.0) +> | [v2020-09-11](https://github.com/input-output-hk/cardano-wallet/releases/tag/v2020-09-11)`master` branch | [v0.9.0](https://github.com/input-output-hk/jormungandr/releases/tag/v0.9.0) | [1.19.1](https://github.com/input-output-hk/cardano-node/releases/tag/1.19.1) > | [v2020-08-03](https://github.com/input-output-hk/cardano-wallet/releases/tag/v2020-08-03) | [v0.9.0](https://github.com/input-output-hk/jormungandr/releases/tag/v0.9.0) | [1.18.0](https://github.com/input-output-hk/cardano-node/releases/tag/1.18.0) > | [v2020-07-28](https://github.com/input-output-hk/cardano-wallet/releases/tag/v2020-07-28) | [v0.9.0](https://github.com/input-output-hk/jormungandr/releases/tag/v0.9.0) | [1.18.0](https://github.com/input-output-hk/cardano-node/releases/tag/1.18.0) > | [v2020-07-06](https://github.com/input-output-hk/cardano-wallet/releases/tag/v2020-07-06) | [v0.9.0](https://github.com/input-output-hk/jormungandr/releases/tag/v0.9.0) | [1.14.2](https://github.com/input-output-hk/cardano-node/releases/tag/1.14.2) From 79836c4508d33cbaf5f52ec3c0b538bd705f7e49 Mon Sep 17 00:00:00 2001 From: Rodney Lorrimar Date: Thu, 17 Sep 2020 10:16:27 +1000 Subject: [PATCH 2/9] cardano-node: 1.19.1-patched -> 1.20.0 --- nix/sources.json | 8 ++++---- stack.yaml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/nix/sources.json b/nix/sources.json index 95555512919..3cca0f991bd 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -1,14 +1,14 @@ { "cardano-node": { - "branch": "1.19.1", + "branch": "1.20.0", "description": null, "homepage": null, "owner": "input-output-hk", "repo": "cardano-node", - "rev": "497afd7dedc5d5b9bdcdb0e3cac6a50bd9f7dd54", - "sha256": "1w5pgsal897g5n5vpfvrvkkgv2bmqzdbs3jzw9xbphf9jhk3jsai", + "rev": "1f2f51164b53b9b775c03ac9f1e23e7b70c74b05", + "sha256": "0ql57bhisnhs2dr2vdk8s4rwnff818lzvqw3l2780q16f20yypdg", "type": "tarball", - "url": "https://github.com/input-output-hk/cardano-node/archive/497afd7dedc5d5b9bdcdb0e3cac6a50bd9f7dd54.tar.gz", + "url": "https://github.com/input-output-hk/cardano-node/archive/1f2f51164b53b9b775c03ac9f1e23e7b70c74b05.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "haskell.nix": { diff --git a/stack.yaml b/stack.yaml index a09ba6cf2dd..f20dd3f89b5 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,4 +1,4 @@ -resolver: https://raw.githubusercontent.com/input-output-hk/cardano-haskell/e7de1cc21987a9f3460477016116c8abf194ce81/snapshots/cardano-1.19.1-patched.yaml +resolver: https://raw.githubusercontent.com/input-output-hk/cardano-haskell/cfe917f0f419b5c9f63c958f335874e4dc0add85/snapshots/cardano-1.20.0.yaml packages: - lib/core From 1e753a82b7b4c54445aae605a975fe3465cc2e5c Mon Sep 17 00:00:00 2001 From: Rodney Lorrimar Date: Thu, 17 Sep 2020 15:48:55 +1000 Subject: [PATCH 3/9] Regenerate nix --- nix/.stack.nix/Win32-network.nix | 4 +- nix/.stack.nix/byron-spec-chain.nix | 4 +- nix/.stack.nix/byron-spec-ledger.nix | 4 +- nix/.stack.nix/cardano-api.nix | 7 +-- nix/.stack.nix/cardano-cli.nix | 16 +++-- nix/.stack.nix/cardano-config.nix | 4 +- nix/.stack.nix/cardano-crypto-test.nix | 4 +- nix/.stack.nix/cardano-crypto-wrapper.nix | 4 +- nix/.stack.nix/cardano-ledger-test.nix | 4 +- nix/.stack.nix/cardano-ledger.nix | 4 +- nix/.stack.nix/cardano-node.nix | 7 ++- nix/.stack.nix/contra-tracer.nix | 4 +- nix/.stack.nix/default.nix | 3 + nix/.stack.nix/hedgehog-extras.nix | 59 +++++++++++++++++++ nix/.stack.nix/io-sim-classes.nix | 4 +- nix/.stack.nix/io-sim.nix | 4 +- nix/.stack.nix/iohk-monitoring.nix | 4 +- nix/.stack.nix/lobemo-backend-aggregation.nix | 4 +- nix/.stack.nix/lobemo-backend-ekg.nix | 4 +- nix/.stack.nix/lobemo-backend-monitoring.nix | 4 +- .../lobemo-backend-trace-forwarder.nix | 4 +- nix/.stack.nix/lobemo-scribe-systemd.nix | 4 +- nix/.stack.nix/network-mux.nix | 4 +- nix/.stack.nix/ntp-client.nix | 4 +- nix/.stack.nix/ouroboros-consensus-byron.nix | 4 +- .../ouroboros-consensus-cardano.nix | 4 +- .../ouroboros-consensus-shelley.nix | 4 +- nix/.stack.nix/ouroboros-consensus.nix | 4 +- .../ouroboros-network-framework.nix | 4 +- nix/.stack.nix/ouroboros-network.nix | 4 +- nix/.stack.nix/shelley-spec-ledger-test.nix | 4 +- nix/.stack.nix/shelley-spec-ledger.nix | 6 +- nix/.stack.nix/shelley-spec-non-integral.nix | 4 +- nix/.stack.nix/small-steps-test.nix | 4 +- nix/.stack.nix/small-steps.nix | 4 +- nix/.stack.nix/tracer-transformers.nix | 4 +- nix/.stack.nix/typed-protocols-examples.nix | 4 +- nix/.stack.nix/typed-protocols.nix | 4 +- 38 files changed, 144 insertions(+), 82 deletions(-) create mode 100644 nix/.stack.nix/hedgehog-extras.nix diff --git a/nix/.stack.nix/Win32-network.nix b/nix/.stack.nix/Win32-network.nix index 042ea8c08f9..8e194e01663 100644 --- a/nix/.stack.nix/Win32-network.nix +++ b/nix/.stack.nix/Win32-network.nix @@ -74,8 +74,8 @@ } // { src = (pkgs.lib).mkDefault (pkgs.fetchgit { url = "https://github.com/input-output-hk/ouroboros-network"; - rev = "f0eb6e439e7c0121476ded5e88d2f638e8aa36ac"; - sha256 = "0pii9myzb5ckf2vagd9b7fsmk78w72z8lw3zyyfzw58dyapy5c70"; + rev = "f56e5d7ad2ebf5f8750f13a430bb93f8036f5e9d"; + sha256 = "181ay17dp6lin1lwxslpzm5ynb080ai0ab9b42kwkcjpw1ym7750"; }); postUnpack = "sourceRoot+=/Win32-network; echo source root reset to \$sourceRoot"; } \ No newline at end of file diff --git a/nix/.stack.nix/byron-spec-chain.nix b/nix/.stack.nix/byron-spec-chain.nix index 8f01e8808ce..aab25283d33 100644 --- a/nix/.stack.nix/byron-spec-chain.nix +++ b/nix/.stack.nix/byron-spec-chain.nix @@ -64,8 +64,8 @@ } // { src = (pkgs.lib).mkDefault (pkgs.fetchgit { url = "https://github.com/input-output-hk/cardano-ledger-specs"; - rev = "74188f62ff743c690bdf287f7fa18eaa2ee354d4"; - sha256 = "1asc4pgkspqlrg67jykz7h1i9wqf4ms1q1gxllcr3dpa566zdc5q"; + rev = "4edcdab87510b2657c62bcf14035817ce6e23455"; + sha256 = "0pny288kg9di32wdi0y6fbbr3791flc6x44zmvvw6m1hx8299hhq"; }); postUnpack = "sourceRoot+=/byron/chain/executable-spec; echo source root reset to \$sourceRoot"; } \ No newline at end of file diff --git a/nix/.stack.nix/byron-spec-ledger.nix b/nix/.stack.nix/byron-spec-ledger.nix index b8cbc464de5..88fde0a8508 100644 --- a/nix/.stack.nix/byron-spec-ledger.nix +++ b/nix/.stack.nix/byron-spec-ledger.nix @@ -87,8 +87,8 @@ } // { src = (pkgs.lib).mkDefault (pkgs.fetchgit { url = "https://github.com/input-output-hk/cardano-ledger-specs"; - rev = "74188f62ff743c690bdf287f7fa18eaa2ee354d4"; - sha256 = "1asc4pgkspqlrg67jykz7h1i9wqf4ms1q1gxllcr3dpa566zdc5q"; + rev = "4edcdab87510b2657c62bcf14035817ce6e23455"; + sha256 = "0pny288kg9di32wdi0y6fbbr3791flc6x44zmvvw6m1hx8299hhq"; }); postUnpack = "sourceRoot+=/byron/ledger/executable-spec; echo source root reset to \$sourceRoot"; } \ No newline at end of file diff --git a/nix/.stack.nix/cardano-api.nix b/nix/.stack.nix/cardano-api.nix index 052044e685d..6ef78897c37 100644 --- a/nix/.stack.nix/cardano-api.nix +++ b/nix/.stack.nix/cardano-api.nix @@ -11,7 +11,7 @@ flags = {}; package = { specVersion = "2.4"; - identifier = { name = "cardano-api"; version = "1.19.1"; }; + identifier = { name = "cardano-api"; version = "1.20.0"; }; license = "Apache-2.0"; copyright = ""; maintainer = "operations@iohk.io"; @@ -81,7 +81,6 @@ depends = [ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."aeson" or (errorHandler.buildDepError "aeson")) - (hsPkgs."aeson-qq" or (errorHandler.buildDepError "aeson-qq")) (hsPkgs."base16-bytestring" or (errorHandler.buildDepError "base16-bytestring")) (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) (hsPkgs."cardano-api" or (errorHandler.buildDepError "cardano-api")) @@ -112,8 +111,8 @@ } // { src = (pkgs.lib).mkDefault (pkgs.fetchgit { url = "https://github.com/input-output-hk/cardano-node"; - rev = "eac29083ef25dc619f15854623275fb37e63d2b8"; - sha256 = "116b2aa8im7pgknc8ln8j0hh4fmb810m8fk2j06kr1xq83xfvdsb"; + rev = "1f2f51164b53b9b775c03ac9f1e23e7b70c74b05"; + sha256 = "0ql57bhisnhs2dr2vdk8s4rwnff818lzvqw3l2780q16f20yypdg"; }); postUnpack = "sourceRoot+=/cardano-api; echo source root reset to \$sourceRoot"; } \ No newline at end of file diff --git a/nix/.stack.nix/cardano-cli.nix b/nix/.stack.nix/cardano-cli.nix index 24803cb2807..21cf33c119c 100644 --- a/nix/.stack.nix/cardano-cli.nix +++ b/nix/.stack.nix/cardano-cli.nix @@ -11,7 +11,7 @@ flags = { unexpected_thunks = false; }; package = { specVersion = "2.4"; - identifier = { name = "cardano-cli"; version = "1.19.1"; }; + identifier = { name = "cardano-cli"; version = "1.20.0"; }; license = "Apache-2.0"; copyright = ""; maintainer = "operations@iohk.io"; @@ -109,7 +109,9 @@ (hsPkgs."containers" or (errorHandler.buildDepError "containers")) (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) (hsPkgs."directory" or (errorHandler.buildDepError "directory")) + (hsPkgs."exceptions" or (errorHandler.buildDepError "exceptions")) (hsPkgs."hedgehog" or (errorHandler.buildDepError "hedgehog")) + (hsPkgs."hedgehog-extras" or (errorHandler.buildDepError "hedgehog-extras")) (hsPkgs."lifted-base" or (errorHandler.buildDepError "lifted-base")) (hsPkgs."optparse-applicative" or (errorHandler.buildDepError "optparse-applicative")) (hsPkgs."process" or (errorHandler.buildDepError "process")) @@ -119,9 +121,6 @@ (hsPkgs."transformers-except" or (errorHandler.buildDepError "transformers-except")) (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) ]; - build-tools = [ - (hsPkgs.buildPackages.cardano-cli or (pkgs.buildPackages.cardano-cli or (errorHandler.buildToolDepError "cardano-cli"))) - ]; buildable = true; }; "cardano-cli-golden" = { @@ -137,7 +136,9 @@ (hsPkgs."containers" or (errorHandler.buildDepError "containers")) (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) (hsPkgs."directory" or (errorHandler.buildDepError "directory")) + (hsPkgs."exceptions" or (errorHandler.buildDepError "exceptions")) (hsPkgs."hedgehog" or (errorHandler.buildDepError "hedgehog")) + (hsPkgs."hedgehog-extras" or (errorHandler.buildDepError "hedgehog-extras")) (hsPkgs."lifted-base" or (errorHandler.buildDepError "lifted-base")) (hsPkgs."optparse-applicative" or (errorHandler.buildDepError "optparse-applicative")) (hsPkgs."process" or (errorHandler.buildDepError "process")) @@ -147,9 +148,6 @@ (hsPkgs."transformers-except" or (errorHandler.buildDepError "transformers-except")) (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) ]; - build-tools = [ - (hsPkgs.buildPackages.cardano-cli or (pkgs.buildPackages.cardano-cli or (errorHandler.buildToolDepError "cardano-cli"))) - ]; buildable = true; }; }; @@ -157,8 +155,8 @@ } // { src = (pkgs.lib).mkDefault (pkgs.fetchgit { url = "https://github.com/input-output-hk/cardano-node"; - rev = "eac29083ef25dc619f15854623275fb37e63d2b8"; - sha256 = "116b2aa8im7pgknc8ln8j0hh4fmb810m8fk2j06kr1xq83xfvdsb"; + rev = "1f2f51164b53b9b775c03ac9f1e23e7b70c74b05"; + sha256 = "0ql57bhisnhs2dr2vdk8s4rwnff818lzvqw3l2780q16f20yypdg"; }); postUnpack = "sourceRoot+=/cardano-cli; echo source root reset to \$sourceRoot"; } \ No newline at end of file diff --git a/nix/.stack.nix/cardano-config.nix b/nix/.stack.nix/cardano-config.nix index 6b405fb4be1..cd0f8ae8e48 100644 --- a/nix/.stack.nix/cardano-config.nix +++ b/nix/.stack.nix/cardano-config.nix @@ -39,8 +39,8 @@ } // { src = (pkgs.lib).mkDefault (pkgs.fetchgit { url = "https://github.com/input-output-hk/cardano-node"; - rev = "eac29083ef25dc619f15854623275fb37e63d2b8"; - sha256 = "116b2aa8im7pgknc8ln8j0hh4fmb810m8fk2j06kr1xq83xfvdsb"; + rev = "1f2f51164b53b9b775c03ac9f1e23e7b70c74b05"; + sha256 = "0ql57bhisnhs2dr2vdk8s4rwnff818lzvqw3l2780q16f20yypdg"; }); postUnpack = "sourceRoot+=/cardano-config; echo source root reset to \$sourceRoot"; } \ No newline at end of file diff --git a/nix/.stack.nix/cardano-crypto-test.nix b/nix/.stack.nix/cardano-crypto-test.nix index 9b32c31aecc..7defbae9d8f 100644 --- a/nix/.stack.nix/cardano-crypto-test.nix +++ b/nix/.stack.nix/cardano-crypto-test.nix @@ -44,8 +44,8 @@ } // { src = (pkgs.lib).mkDefault (pkgs.fetchgit { url = "https://github.com/input-output-hk/cardano-ledger-specs"; - rev = "74188f62ff743c690bdf287f7fa18eaa2ee354d4"; - sha256 = "1asc4pgkspqlrg67jykz7h1i9wqf4ms1q1gxllcr3dpa566zdc5q"; + rev = "4edcdab87510b2657c62bcf14035817ce6e23455"; + sha256 = "0pny288kg9di32wdi0y6fbbr3791flc6x44zmvvw6m1hx8299hhq"; }); postUnpack = "sourceRoot+=/byron/crypto/test; echo source root reset to \$sourceRoot"; } \ No newline at end of file diff --git a/nix/.stack.nix/cardano-crypto-wrapper.nix b/nix/.stack.nix/cardano-crypto-wrapper.nix index 8966f4080d2..58df414b191 100644 --- a/nix/.stack.nix/cardano-crypto-wrapper.nix +++ b/nix/.stack.nix/cardano-crypto-wrapper.nix @@ -69,8 +69,8 @@ } // { src = (pkgs.lib).mkDefault (pkgs.fetchgit { url = "https://github.com/input-output-hk/cardano-ledger-specs"; - rev = "74188f62ff743c690bdf287f7fa18eaa2ee354d4"; - sha256 = "1asc4pgkspqlrg67jykz7h1i9wqf4ms1q1gxllcr3dpa566zdc5q"; + rev = "4edcdab87510b2657c62bcf14035817ce6e23455"; + sha256 = "0pny288kg9di32wdi0y6fbbr3791flc6x44zmvvw6m1hx8299hhq"; }); postUnpack = "sourceRoot+=/byron/crypto; echo source root reset to \$sourceRoot"; } \ No newline at end of file diff --git a/nix/.stack.nix/cardano-ledger-test.nix b/nix/.stack.nix/cardano-ledger-test.nix index 89050eba3b1..c516584e762 100644 --- a/nix/.stack.nix/cardano-ledger-test.nix +++ b/nix/.stack.nix/cardano-ledger-test.nix @@ -63,8 +63,8 @@ } // { src = (pkgs.lib).mkDefault (pkgs.fetchgit { url = "https://github.com/input-output-hk/cardano-ledger-specs"; - rev = "74188f62ff743c690bdf287f7fa18eaa2ee354d4"; - sha256 = "1asc4pgkspqlrg67jykz7h1i9wqf4ms1q1gxllcr3dpa566zdc5q"; + rev = "4edcdab87510b2657c62bcf14035817ce6e23455"; + sha256 = "0pny288kg9di32wdi0y6fbbr3791flc6x44zmvvw6m1hx8299hhq"; }); postUnpack = "sourceRoot+=/byron/ledger/impl/test; echo source root reset to \$sourceRoot"; } \ No newline at end of file diff --git a/nix/.stack.nix/cardano-ledger.nix b/nix/.stack.nix/cardano-ledger.nix index e441020d442..3eef3ddbe3a 100644 --- a/nix/.stack.nix/cardano-ledger.nix +++ b/nix/.stack.nix/cardano-ledger.nix @@ -130,8 +130,8 @@ } // { src = (pkgs.lib).mkDefault (pkgs.fetchgit { url = "https://github.com/input-output-hk/cardano-ledger-specs"; - rev = "74188f62ff743c690bdf287f7fa18eaa2ee354d4"; - sha256 = "1asc4pgkspqlrg67jykz7h1i9wqf4ms1q1gxllcr3dpa566zdc5q"; + rev = "4edcdab87510b2657c62bcf14035817ce6e23455"; + sha256 = "0pny288kg9di32wdi0y6fbbr3791flc6x44zmvvw6m1hx8299hhq"; }); postUnpack = "sourceRoot+=/byron/ledger/impl; echo source root reset to \$sourceRoot"; } \ No newline at end of file diff --git a/nix/.stack.nix/cardano-node.nix b/nix/.stack.nix/cardano-node.nix index 9b1ef582313..6d91f485410 100644 --- a/nix/.stack.nix/cardano-node.nix +++ b/nix/.stack.nix/cardano-node.nix @@ -11,7 +11,7 @@ flags = { unexpected_thunks = false; systemd = true; }; package = { specVersion = "2.4"; - identifier = { name = "cardano-node"; version = "1.19.1"; }; + identifier = { name = "cardano-node"; version = "1.20.0"; }; license = "Apache-2.0"; copyright = ""; maintainer = "operations@iohk.io"; @@ -45,6 +45,7 @@ (hsPkgs."containers" or (errorHandler.buildDepError "containers")) (hsPkgs."directory" or (errorHandler.buildDepError "directory")) (hsPkgs."filepath" or (errorHandler.buildDepError "filepath")) + (hsPkgs."hedgehog-extras" or (errorHandler.buildDepError "hedgehog-extras")) (hsPkgs."hostname" or (errorHandler.buildDepError "hostname")) (hsPkgs."iproute" or (errorHandler.buildDepError "iproute")) (hsPkgs."io-sim-classes" or (errorHandler.buildDepError "io-sim-classes")) @@ -204,8 +205,8 @@ } // { src = (pkgs.lib).mkDefault (pkgs.fetchgit { url = "https://github.com/input-output-hk/cardano-node"; - rev = "eac29083ef25dc619f15854623275fb37e63d2b8"; - sha256 = "116b2aa8im7pgknc8ln8j0hh4fmb810m8fk2j06kr1xq83xfvdsb"; + rev = "1f2f51164b53b9b775c03ac9f1e23e7b70c74b05"; + sha256 = "0ql57bhisnhs2dr2vdk8s4rwnff818lzvqw3l2780q16f20yypdg"; }); postUnpack = "sourceRoot+=/cardano-node; echo source root reset to \$sourceRoot"; } \ No newline at end of file diff --git a/nix/.stack.nix/contra-tracer.nix b/nix/.stack.nix/contra-tracer.nix index b98b9ed1c79..e0b36fe55f0 100644 --- a/nix/.stack.nix/contra-tracer.nix +++ b/nix/.stack.nix/contra-tracer.nix @@ -34,8 +34,8 @@ } // { src = (pkgs.lib).mkDefault (pkgs.fetchgit { url = "https://github.com/input-output-hk/iohk-monitoring-framework"; - rev = "8f2086aff6b315b41a39b727f860c3477205ed8a"; - sha256 = "0ajiqa92zdydvxy9d1n640i7k5v5z6pf6v8q31yx2rrnm3hdg9lh"; + rev = "743f266cfe5fff11d18602faf510f22a544ea295"; + sha256 = "0q1d642xqy4mlr7szc5w8mwfs5pb4wdlgw1l6qkq0yyrjk1b9pxd"; }); postUnpack = "sourceRoot+=/contra-tracer; echo source root reset to \$sourceRoot"; } \ No newline at end of file diff --git a/nix/.stack.nix/default.nix b/nix/.stack.nix/default.nix index 46238f5c297..611cc42ace9 100644 --- a/nix/.stack.nix/default.nix +++ b/nix/.stack.nix/default.nix @@ -48,6 +48,7 @@ "micro-recursion-schemes" = (((hackage.micro-recursion-schemes)."5.0.2.2").revisions).default; "moo" = (((hackage.moo)."1.2").revisions).default; "network" = (((hackage.network)."3.1.1.1").revisions).default; + "partial-order" = (((hackage.partial-order)."0.2.0.0").revisions).default; "primitive" = (((hackage.primitive)."0.7.1.0").revisions).default; "prometheus" = (((hackage.prometheus)."2.1.2").revisions).default; "protolude" = (((hackage.protolude)."0.3.0").revisions).default; @@ -67,6 +68,7 @@ "th-lift-instances" = (((hackage.th-lift-instances)."0.1.14").revisions).default; "time-units" = (((hackage.time-units)."1.0.0").revisions).default; "transformers-except" = (((hackage.transformers-except)."0.1.1").revisions).default; + "unordered-containers" = (((hackage.unordered-containers)."0.2.12.0").revisions).default; "Unique" = (((hackage.Unique)."0.4.7.6").revisions).default; "word-wrap" = (((hackage.word-wrap)."0.4.1").revisions).default; "websockets" = (((hackage.websockets)."0.12.6.1").revisions).default; @@ -106,6 +108,7 @@ cardano-cli = ./cardano-cli.nix; cardano-config = ./cardano-config.nix; cardano-node = ./cardano-node.nix; + hedgehog-extras = ./hedgehog-extras.nix; cardano-prelude = ./cardano-prelude.nix; cardano-prelude-test = ./cardano-prelude-test.nix; cardano-sl-x509 = ./cardano-sl-x509.nix; diff --git a/nix/.stack.nix/hedgehog-extras.nix b/nix/.stack.nix/hedgehog-extras.nix new file mode 100644 index 00000000000..746d8670097 --- /dev/null +++ b/nix/.stack.nix/hedgehog-extras.nix @@ -0,0 +1,59 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + { + flags = {}; + package = { + specVersion = "2.4"; + identifier = { name = "hedgehog-extras"; version = "1.19.1"; }; + license = "Apache-2.0"; + copyright = ""; + maintainer = "operations@iohk.io"; + author = "IOHK"; + homepage = ""; + url = ""; + synopsis = ""; + description = "The cardano full node"; + buildType = "Simple"; + isLocal = true; + }; + components = { + "library" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."aeson" or (errorHandler.buildDepError "aeson")) + (hsPkgs."async" or (errorHandler.buildDepError "async")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) + (hsPkgs."directory" or (errorHandler.buildDepError "directory")) + (hsPkgs."exceptions" or (errorHandler.buildDepError "exceptions")) + (hsPkgs."hedgehog" or (errorHandler.buildDepError "hedgehog")) + (hsPkgs."mmorph" or (errorHandler.buildDepError "mmorph")) + (hsPkgs."network" or (errorHandler.buildDepError "network")) + (hsPkgs."process" or (errorHandler.buildDepError "process")) + (hsPkgs."random" or (errorHandler.buildDepError "random")) + (hsPkgs."resourcet" or (errorHandler.buildDepError "resourcet")) + (hsPkgs."temporary" or (errorHandler.buildDepError "temporary")) + (hsPkgs."text" or (errorHandler.buildDepError "text")) + (hsPkgs."time" or (errorHandler.buildDepError "time")) + (hsPkgs."unliftio" or (errorHandler.buildDepError "unliftio")) + (hsPkgs."unordered-containers" or (errorHandler.buildDepError "unordered-containers")) + (hsPkgs."Win32-network" or (errorHandler.buildDepError "Win32-network")) + ]; + buildable = true; + }; + }; + } // { + src = (pkgs.lib).mkDefault (pkgs.fetchgit { + url = "https://github.com/input-output-hk/cardano-node"; + rev = "1f2f51164b53b9b775c03ac9f1e23e7b70c74b05"; + sha256 = "0ql57bhisnhs2dr2vdk8s4rwnff818lzvqw3l2780q16f20yypdg"; + }); + postUnpack = "sourceRoot+=/hedgehog-extras; echo source root reset to \$sourceRoot"; + } \ No newline at end of file diff --git a/nix/.stack.nix/io-sim-classes.nix b/nix/.stack.nix/io-sim-classes.nix index 9818d74f529..f52106a60d0 100644 --- a/nix/.stack.nix/io-sim-classes.nix +++ b/nix/.stack.nix/io-sim-classes.nix @@ -51,8 +51,8 @@ } // { src = (pkgs.lib).mkDefault (pkgs.fetchgit { url = "https://github.com/input-output-hk/ouroboros-network"; - rev = "f0eb6e439e7c0121476ded5e88d2f638e8aa36ac"; - sha256 = "0pii9myzb5ckf2vagd9b7fsmk78w72z8lw3zyyfzw58dyapy5c70"; + rev = "f56e5d7ad2ebf5f8750f13a430bb93f8036f5e9d"; + sha256 = "181ay17dp6lin1lwxslpzm5ynb080ai0ab9b42kwkcjpw1ym7750"; }); postUnpack = "sourceRoot+=/io-sim-classes; echo source root reset to \$sourceRoot"; } \ No newline at end of file diff --git a/nix/.stack.nix/io-sim.nix b/nix/.stack.nix/io-sim.nix index 411fad96a6b..b9fed5695f3 100644 --- a/nix/.stack.nix/io-sim.nix +++ b/nix/.stack.nix/io-sim.nix @@ -55,8 +55,8 @@ } // { src = (pkgs.lib).mkDefault (pkgs.fetchgit { url = "https://github.com/input-output-hk/ouroboros-network"; - rev = "f0eb6e439e7c0121476ded5e88d2f638e8aa36ac"; - sha256 = "0pii9myzb5ckf2vagd9b7fsmk78w72z8lw3zyyfzw58dyapy5c70"; + rev = "f56e5d7ad2ebf5f8750f13a430bb93f8036f5e9d"; + sha256 = "181ay17dp6lin1lwxslpzm5ynb080ai0ab9b42kwkcjpw1ym7750"; }); postUnpack = "sourceRoot+=/io-sim; echo source root reset to \$sourceRoot"; } \ No newline at end of file diff --git a/nix/.stack.nix/iohk-monitoring.nix b/nix/.stack.nix/iohk-monitoring.nix index 821d6da77b2..ae613dd7f4a 100644 --- a/nix/.stack.nix/iohk-monitoring.nix +++ b/nix/.stack.nix/iohk-monitoring.nix @@ -107,8 +107,8 @@ } // { src = (pkgs.lib).mkDefault (pkgs.fetchgit { url = "https://github.com/input-output-hk/iohk-monitoring-framework"; - rev = "8f2086aff6b315b41a39b727f860c3477205ed8a"; - sha256 = "0ajiqa92zdydvxy9d1n640i7k5v5z6pf6v8q31yx2rrnm3hdg9lh"; + rev = "743f266cfe5fff11d18602faf510f22a544ea295"; + sha256 = "0q1d642xqy4mlr7szc5w8mwfs5pb4wdlgw1l6qkq0yyrjk1b9pxd"; }); postUnpack = "sourceRoot+=/iohk-monitoring; echo source root reset to \$sourceRoot"; } \ No newline at end of file diff --git a/nix/.stack.nix/lobemo-backend-aggregation.nix b/nix/.stack.nix/lobemo-backend-aggregation.nix index a0d50e85748..84bed26da24 100644 --- a/nix/.stack.nix/lobemo-backend-aggregation.nix +++ b/nix/.stack.nix/lobemo-backend-aggregation.nix @@ -47,8 +47,8 @@ } // { src = (pkgs.lib).mkDefault (pkgs.fetchgit { url = "https://github.com/input-output-hk/iohk-monitoring-framework"; - rev = "8f2086aff6b315b41a39b727f860c3477205ed8a"; - sha256 = "0ajiqa92zdydvxy9d1n640i7k5v5z6pf6v8q31yx2rrnm3hdg9lh"; + rev = "743f266cfe5fff11d18602faf510f22a544ea295"; + sha256 = "0q1d642xqy4mlr7szc5w8mwfs5pb4wdlgw1l6qkq0yyrjk1b9pxd"; }); postUnpack = "sourceRoot+=/plugins/backend-aggregation; echo source root reset to \$sourceRoot"; } \ No newline at end of file diff --git a/nix/.stack.nix/lobemo-backend-ekg.nix b/nix/.stack.nix/lobemo-backend-ekg.nix index 18500c42ffc..cd9755afffa 100644 --- a/nix/.stack.nix/lobemo-backend-ekg.nix +++ b/nix/.stack.nix/lobemo-backend-ekg.nix @@ -47,8 +47,8 @@ } // { src = (pkgs.lib).mkDefault (pkgs.fetchgit { url = "https://github.com/input-output-hk/iohk-monitoring-framework"; - rev = "8f2086aff6b315b41a39b727f860c3477205ed8a"; - sha256 = "0ajiqa92zdydvxy9d1n640i7k5v5z6pf6v8q31yx2rrnm3hdg9lh"; + rev = "743f266cfe5fff11d18602faf510f22a544ea295"; + sha256 = "0q1d642xqy4mlr7szc5w8mwfs5pb4wdlgw1l6qkq0yyrjk1b9pxd"; }); postUnpack = "sourceRoot+=/plugins/backend-ekg; echo source root reset to \$sourceRoot"; } \ No newline at end of file diff --git a/nix/.stack.nix/lobemo-backend-monitoring.nix b/nix/.stack.nix/lobemo-backend-monitoring.nix index 413252e5706..9eeebd08ff2 100644 --- a/nix/.stack.nix/lobemo-backend-monitoring.nix +++ b/nix/.stack.nix/lobemo-backend-monitoring.nix @@ -83,8 +83,8 @@ } // { src = (pkgs.lib).mkDefault (pkgs.fetchgit { url = "https://github.com/input-output-hk/iohk-monitoring-framework"; - rev = "8f2086aff6b315b41a39b727f860c3477205ed8a"; - sha256 = "0ajiqa92zdydvxy9d1n640i7k5v5z6pf6v8q31yx2rrnm3hdg9lh"; + rev = "743f266cfe5fff11d18602faf510f22a544ea295"; + sha256 = "0q1d642xqy4mlr7szc5w8mwfs5pb4wdlgw1l6qkq0yyrjk1b9pxd"; }); postUnpack = "sourceRoot+=/plugins/backend-monitoring; echo source root reset to \$sourceRoot"; } \ No newline at end of file diff --git a/nix/.stack.nix/lobemo-backend-trace-forwarder.nix b/nix/.stack.nix/lobemo-backend-trace-forwarder.nix index a747130f1f1..5d06fc1e2e9 100644 --- a/nix/.stack.nix/lobemo-backend-trace-forwarder.nix +++ b/nix/.stack.nix/lobemo-backend-trace-forwarder.nix @@ -47,8 +47,8 @@ } // { src = (pkgs.lib).mkDefault (pkgs.fetchgit { url = "https://github.com/input-output-hk/iohk-monitoring-framework"; - rev = "8f2086aff6b315b41a39b727f860c3477205ed8a"; - sha256 = "0ajiqa92zdydvxy9d1n640i7k5v5z6pf6v8q31yx2rrnm3hdg9lh"; + rev = "743f266cfe5fff11d18602faf510f22a544ea295"; + sha256 = "0q1d642xqy4mlr7szc5w8mwfs5pb4wdlgw1l6qkq0yyrjk1b9pxd"; }); postUnpack = "sourceRoot+=/plugins/backend-trace-forwarder; echo source root reset to \$sourceRoot"; } \ No newline at end of file diff --git a/nix/.stack.nix/lobemo-scribe-systemd.nix b/nix/.stack.nix/lobemo-scribe-systemd.nix index fbedfa71f3d..511abcd8f23 100644 --- a/nix/.stack.nix/lobemo-scribe-systemd.nix +++ b/nix/.stack.nix/lobemo-scribe-systemd.nix @@ -48,8 +48,8 @@ } // { src = (pkgs.lib).mkDefault (pkgs.fetchgit { url = "https://github.com/input-output-hk/iohk-monitoring-framework"; - rev = "8f2086aff6b315b41a39b727f860c3477205ed8a"; - sha256 = "0ajiqa92zdydvxy9d1n640i7k5v5z6pf6v8q31yx2rrnm3hdg9lh"; + rev = "743f266cfe5fff11d18602faf510f22a544ea295"; + sha256 = "0q1d642xqy4mlr7szc5w8mwfs5pb4wdlgw1l6qkq0yyrjk1b9pxd"; }); postUnpack = "sourceRoot+=/plugins/scribe-systemd; echo source root reset to \$sourceRoot"; } \ No newline at end of file diff --git a/nix/.stack.nix/network-mux.nix b/nix/.stack.nix/network-mux.nix index 3cdb9a86923..eda13146650 100644 --- a/nix/.stack.nix/network-mux.nix +++ b/nix/.stack.nix/network-mux.nix @@ -104,8 +104,8 @@ } // { src = (pkgs.lib).mkDefault (pkgs.fetchgit { url = "https://github.com/input-output-hk/ouroboros-network"; - rev = "f0eb6e439e7c0121476ded5e88d2f638e8aa36ac"; - sha256 = "0pii9myzb5ckf2vagd9b7fsmk78w72z8lw3zyyfzw58dyapy5c70"; + rev = "f56e5d7ad2ebf5f8750f13a430bb93f8036f5e9d"; + sha256 = "181ay17dp6lin1lwxslpzm5ynb080ai0ab9b42kwkcjpw1ym7750"; }); postUnpack = "sourceRoot+=/network-mux; echo source root reset to \$sourceRoot"; } \ No newline at end of file diff --git a/nix/.stack.nix/ntp-client.nix b/nix/.stack.nix/ntp-client.nix index 709c9ec3204..c9542d687ec 100644 --- a/nix/.stack.nix/ntp-client.nix +++ b/nix/.stack.nix/ntp-client.nix @@ -67,8 +67,8 @@ } // { src = (pkgs.lib).mkDefault (pkgs.fetchgit { url = "https://github.com/input-output-hk/ouroboros-network"; - rev = "f0eb6e439e7c0121476ded5e88d2f638e8aa36ac"; - sha256 = "0pii9myzb5ckf2vagd9b7fsmk78w72z8lw3zyyfzw58dyapy5c70"; + rev = "f56e5d7ad2ebf5f8750f13a430bb93f8036f5e9d"; + sha256 = "181ay17dp6lin1lwxslpzm5ynb080ai0ab9b42kwkcjpw1ym7750"; }); postUnpack = "sourceRoot+=/ntp-client; echo source root reset to \$sourceRoot"; } \ No newline at end of file diff --git a/nix/.stack.nix/ouroboros-consensus-byron.nix b/nix/.stack.nix/ouroboros-consensus-byron.nix index ae40e8e16c0..68d6064ef16 100644 --- a/nix/.stack.nix/ouroboros-consensus-byron.nix +++ b/nix/.stack.nix/ouroboros-consensus-byron.nix @@ -76,8 +76,8 @@ } // { src = (pkgs.lib).mkDefault (pkgs.fetchgit { url = "https://github.com/input-output-hk/ouroboros-network"; - rev = "f0eb6e439e7c0121476ded5e88d2f638e8aa36ac"; - sha256 = "0pii9myzb5ckf2vagd9b7fsmk78w72z8lw3zyyfzw58dyapy5c70"; + rev = "f56e5d7ad2ebf5f8750f13a430bb93f8036f5e9d"; + sha256 = "181ay17dp6lin1lwxslpzm5ynb080ai0ab9b42kwkcjpw1ym7750"; }); postUnpack = "sourceRoot+=/ouroboros-consensus-byron; echo source root reset to \$sourceRoot"; } \ No newline at end of file diff --git a/nix/.stack.nix/ouroboros-consensus-cardano.nix b/nix/.stack.nix/ouroboros-consensus-cardano.nix index 75406943eb9..0dbafb9948d 100644 --- a/nix/.stack.nix/ouroboros-consensus-cardano.nix +++ b/nix/.stack.nix/ouroboros-consensus-cardano.nix @@ -82,8 +82,8 @@ } // { src = (pkgs.lib).mkDefault (pkgs.fetchgit { url = "https://github.com/input-output-hk/ouroboros-network"; - rev = "f0eb6e439e7c0121476ded5e88d2f638e8aa36ac"; - sha256 = "0pii9myzb5ckf2vagd9b7fsmk78w72z8lw3zyyfzw58dyapy5c70"; + rev = "f56e5d7ad2ebf5f8750f13a430bb93f8036f5e9d"; + sha256 = "181ay17dp6lin1lwxslpzm5ynb080ai0ab9b42kwkcjpw1ym7750"; }); postUnpack = "sourceRoot+=/ouroboros-consensus-cardano; echo source root reset to \$sourceRoot"; } \ No newline at end of file diff --git a/nix/.stack.nix/ouroboros-consensus-shelley.nix b/nix/.stack.nix/ouroboros-consensus-shelley.nix index 5332f4f7582..9093f1da6a6 100644 --- a/nix/.stack.nix/ouroboros-consensus-shelley.nix +++ b/nix/.stack.nix/ouroboros-consensus-shelley.nix @@ -54,8 +54,8 @@ } // { src = (pkgs.lib).mkDefault (pkgs.fetchgit { url = "https://github.com/input-output-hk/ouroboros-network"; - rev = "f0eb6e439e7c0121476ded5e88d2f638e8aa36ac"; - sha256 = "0pii9myzb5ckf2vagd9b7fsmk78w72z8lw3zyyfzw58dyapy5c70"; + rev = "f56e5d7ad2ebf5f8750f13a430bb93f8036f5e9d"; + sha256 = "181ay17dp6lin1lwxslpzm5ynb080ai0ab9b42kwkcjpw1ym7750"; }); postUnpack = "sourceRoot+=/ouroboros-consensus-shelley; echo source root reset to \$sourceRoot"; } \ No newline at end of file diff --git a/nix/.stack.nix/ouroboros-consensus.nix b/nix/.stack.nix/ouroboros-consensus.nix index c555d922c5b..bca848c754b 100644 --- a/nix/.stack.nix/ouroboros-consensus.nix +++ b/nix/.stack.nix/ouroboros-consensus.nix @@ -74,8 +74,8 @@ } // { src = (pkgs.lib).mkDefault (pkgs.fetchgit { url = "https://github.com/input-output-hk/ouroboros-network"; - rev = "f0eb6e439e7c0121476ded5e88d2f638e8aa36ac"; - sha256 = "0pii9myzb5ckf2vagd9b7fsmk78w72z8lw3zyyfzw58dyapy5c70"; + rev = "f56e5d7ad2ebf5f8750f13a430bb93f8036f5e9d"; + sha256 = "181ay17dp6lin1lwxslpzm5ynb080ai0ab9b42kwkcjpw1ym7750"; }); postUnpack = "sourceRoot+=/ouroboros-consensus; echo source root reset to \$sourceRoot"; } \ No newline at end of file diff --git a/nix/.stack.nix/ouroboros-network-framework.nix b/nix/.stack.nix/ouroboros-network-framework.nix index 04261fdc78c..2f6e84ff7e1 100644 --- a/nix/.stack.nix/ouroboros-network-framework.nix +++ b/nix/.stack.nix/ouroboros-network-framework.nix @@ -114,8 +114,8 @@ } // { src = (pkgs.lib).mkDefault (pkgs.fetchgit { url = "https://github.com/input-output-hk/ouroboros-network"; - rev = "f0eb6e439e7c0121476ded5e88d2f638e8aa36ac"; - sha256 = "0pii9myzb5ckf2vagd9b7fsmk78w72z8lw3zyyfzw58dyapy5c70"; + rev = "f56e5d7ad2ebf5f8750f13a430bb93f8036f5e9d"; + sha256 = "181ay17dp6lin1lwxslpzm5ynb080ai0ab9b42kwkcjpw1ym7750"; }); postUnpack = "sourceRoot+=/ouroboros-network-framework; echo source root reset to \$sourceRoot"; } \ No newline at end of file diff --git a/nix/.stack.nix/ouroboros-network.nix b/nix/.stack.nix/ouroboros-network.nix index af54eb22491..3f5de16d9fd 100644 --- a/nix/.stack.nix/ouroboros-network.nix +++ b/nix/.stack.nix/ouroboros-network.nix @@ -188,8 +188,8 @@ } // { src = (pkgs.lib).mkDefault (pkgs.fetchgit { url = "https://github.com/input-output-hk/ouroboros-network"; - rev = "f0eb6e439e7c0121476ded5e88d2f638e8aa36ac"; - sha256 = "0pii9myzb5ckf2vagd9b7fsmk78w72z8lw3zyyfzw58dyapy5c70"; + rev = "f56e5d7ad2ebf5f8750f13a430bb93f8036f5e9d"; + sha256 = "181ay17dp6lin1lwxslpzm5ynb080ai0ab9b42kwkcjpw1ym7750"; }); postUnpack = "sourceRoot+=/ouroboros-network; echo source root reset to \$sourceRoot"; } \ No newline at end of file diff --git a/nix/.stack.nix/shelley-spec-ledger-test.nix b/nix/.stack.nix/shelley-spec-ledger-test.nix index 14f24d7a001..497426836b3 100644 --- a/nix/.stack.nix/shelley-spec-ledger-test.nix +++ b/nix/.stack.nix/shelley-spec-ledger-test.nix @@ -165,8 +165,8 @@ } // { src = (pkgs.lib).mkDefault (pkgs.fetchgit { url = "https://github.com/input-output-hk/cardano-ledger-specs"; - rev = "74188f62ff743c690bdf287f7fa18eaa2ee354d4"; - sha256 = "1asc4pgkspqlrg67jykz7h1i9wqf4ms1q1gxllcr3dpa566zdc5q"; + rev = "4edcdab87510b2657c62bcf14035817ce6e23455"; + sha256 = "0pny288kg9di32wdi0y6fbbr3791flc6x44zmvvw6m1hx8299hhq"; }); postUnpack = "sourceRoot+=/shelley/chain-and-ledger/shelley-spec-ledger-test; echo source root reset to \$sourceRoot"; } \ No newline at end of file diff --git a/nix/.stack.nix/shelley-spec-ledger.nix b/nix/.stack.nix/shelley-spec-ledger.nix index d1cf4220046..5b4df04ca26 100644 --- a/nix/.stack.nix/shelley-spec-ledger.nix +++ b/nix/.stack.nix/shelley-spec-ledger.nix @@ -41,9 +41,11 @@ (hsPkgs."cborg" or (errorHandler.buildDepError "cborg")) (hsPkgs."cborg-json" or (errorHandler.buildDepError "cborg-json")) (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + (hsPkgs."groups" or (errorHandler.buildDepError "groups")) (hsPkgs."iproute" or (errorHandler.buildDepError "iproute")) (hsPkgs."mtl" or (errorHandler.buildDepError "mtl")) (hsPkgs."network" or (errorHandler.buildDepError "network")) + (hsPkgs."partial-order" or (errorHandler.buildDepError "partial-order")) (hsPkgs."primitive" or (errorHandler.buildDepError "primitive")) (hsPkgs."quiet" or (errorHandler.buildDepError "quiet")) (hsPkgs."scientific" or (errorHandler.buildDepError "scientific")) @@ -60,8 +62,8 @@ } // { src = (pkgs.lib).mkDefault (pkgs.fetchgit { url = "https://github.com/input-output-hk/cardano-ledger-specs"; - rev = "74188f62ff743c690bdf287f7fa18eaa2ee354d4"; - sha256 = "1asc4pgkspqlrg67jykz7h1i9wqf4ms1q1gxllcr3dpa566zdc5q"; + rev = "4edcdab87510b2657c62bcf14035817ce6e23455"; + sha256 = "0pny288kg9di32wdi0y6fbbr3791flc6x44zmvvw6m1hx8299hhq"; }); postUnpack = "sourceRoot+=/shelley/chain-and-ledger/executable-spec; echo source root reset to \$sourceRoot"; } \ No newline at end of file diff --git a/nix/.stack.nix/shelley-spec-non-integral.nix b/nix/.stack.nix/shelley-spec-non-integral.nix index 03ab714414d..2b75b89519a 100644 --- a/nix/.stack.nix/shelley-spec-non-integral.nix +++ b/nix/.stack.nix/shelley-spec-non-integral.nix @@ -42,8 +42,8 @@ } // { src = (pkgs.lib).mkDefault (pkgs.fetchgit { url = "https://github.com/input-output-hk/cardano-ledger-specs"; - rev = "74188f62ff743c690bdf287f7fa18eaa2ee354d4"; - sha256 = "1asc4pgkspqlrg67jykz7h1i9wqf4ms1q1gxllcr3dpa566zdc5q"; + rev = "4edcdab87510b2657c62bcf14035817ce6e23455"; + sha256 = "0pny288kg9di32wdi0y6fbbr3791flc6x44zmvvw6m1hx8299hhq"; }); postUnpack = "sourceRoot+=/shelley/chain-and-ledger/dependencies/non-integer; echo source root reset to \$sourceRoot"; } \ No newline at end of file diff --git a/nix/.stack.nix/small-steps-test.nix b/nix/.stack.nix/small-steps-test.nix index b566f12691b..c0ce46acedd 100644 --- a/nix/.stack.nix/small-steps-test.nix +++ b/nix/.stack.nix/small-steps-test.nix @@ -92,8 +92,8 @@ } // { src = (pkgs.lib).mkDefault (pkgs.fetchgit { url = "https://github.com/input-output-hk/cardano-ledger-specs"; - rev = "74188f62ff743c690bdf287f7fa18eaa2ee354d4"; - sha256 = "1asc4pgkspqlrg67jykz7h1i9wqf4ms1q1gxllcr3dpa566zdc5q"; + rev = "4edcdab87510b2657c62bcf14035817ce6e23455"; + sha256 = "0pny288kg9di32wdi0y6fbbr3791flc6x44zmvvw6m1hx8299hhq"; }); postUnpack = "sourceRoot+=/semantics/small-steps-test; echo source root reset to \$sourceRoot"; } \ No newline at end of file diff --git a/nix/.stack.nix/small-steps.nix b/nix/.stack.nix/small-steps.nix index e535247f1cf..161d22fe28c 100644 --- a/nix/.stack.nix/small-steps.nix +++ b/nix/.stack.nix/small-steps.nix @@ -67,8 +67,8 @@ } // { src = (pkgs.lib).mkDefault (pkgs.fetchgit { url = "https://github.com/input-output-hk/cardano-ledger-specs"; - rev = "74188f62ff743c690bdf287f7fa18eaa2ee354d4"; - sha256 = "1asc4pgkspqlrg67jykz7h1i9wqf4ms1q1gxllcr3dpa566zdc5q"; + rev = "4edcdab87510b2657c62bcf14035817ce6e23455"; + sha256 = "0pny288kg9di32wdi0y6fbbr3791flc6x44zmvvw6m1hx8299hhq"; }); postUnpack = "sourceRoot+=/semantics/executable-spec; echo source root reset to \$sourceRoot"; } \ No newline at end of file diff --git a/nix/.stack.nix/tracer-transformers.nix b/nix/.stack.nix/tracer-transformers.nix index ce8f67199b0..bdbab394a69 100644 --- a/nix/.stack.nix/tracer-transformers.nix +++ b/nix/.stack.nix/tracer-transformers.nix @@ -57,8 +57,8 @@ } // { src = (pkgs.lib).mkDefault (pkgs.fetchgit { url = "https://github.com/input-output-hk/iohk-monitoring-framework"; - rev = "8f2086aff6b315b41a39b727f860c3477205ed8a"; - sha256 = "0ajiqa92zdydvxy9d1n640i7k5v5z6pf6v8q31yx2rrnm3hdg9lh"; + rev = "743f266cfe5fff11d18602faf510f22a544ea295"; + sha256 = "0q1d642xqy4mlr7szc5w8mwfs5pb4wdlgw1l6qkq0yyrjk1b9pxd"; }); postUnpack = "sourceRoot+=/tracer-transformers; echo source root reset to \$sourceRoot"; } \ No newline at end of file diff --git a/nix/.stack.nix/typed-protocols-examples.nix b/nix/.stack.nix/typed-protocols-examples.nix index 9e40ee99fe4..23157e31e91 100644 --- a/nix/.stack.nix/typed-protocols-examples.nix +++ b/nix/.stack.nix/typed-protocols-examples.nix @@ -57,8 +57,8 @@ } // { src = (pkgs.lib).mkDefault (pkgs.fetchgit { url = "https://github.com/input-output-hk/ouroboros-network"; - rev = "f0eb6e439e7c0121476ded5e88d2f638e8aa36ac"; - sha256 = "0pii9myzb5ckf2vagd9b7fsmk78w72z8lw3zyyfzw58dyapy5c70"; + rev = "f56e5d7ad2ebf5f8750f13a430bb93f8036f5e9d"; + sha256 = "181ay17dp6lin1lwxslpzm5ynb080ai0ab9b42kwkcjpw1ym7750"; }); postUnpack = "sourceRoot+=/typed-protocols-examples; echo source root reset to \$sourceRoot"; } \ No newline at end of file diff --git a/nix/.stack.nix/typed-protocols.nix b/nix/.stack.nix/typed-protocols.nix index f60777b832f..c06d2b4e6ad 100644 --- a/nix/.stack.nix/typed-protocols.nix +++ b/nix/.stack.nix/typed-protocols.nix @@ -35,8 +35,8 @@ } // { src = (pkgs.lib).mkDefault (pkgs.fetchgit { url = "https://github.com/input-output-hk/ouroboros-network"; - rev = "f0eb6e439e7c0121476ded5e88d2f638e8aa36ac"; - sha256 = "0pii9myzb5ckf2vagd9b7fsmk78w72z8lw3zyyfzw58dyapy5c70"; + rev = "f56e5d7ad2ebf5f8750f13a430bb93f8036f5e9d"; + sha256 = "181ay17dp6lin1lwxslpzm5ynb080ai0ab9b42kwkcjpw1ym7750"; }); postUnpack = "sourceRoot+=/typed-protocols; echo source root reset to \$sourceRoot"; } \ No newline at end of file From 2194e526f131d6d44f5a9978cc8dc4ef2795d67b Mon Sep 17 00:00:00 2001 From: Rodney Lorrimar Date: Thu, 17 Sep 2020 15:50:13 +1000 Subject: [PATCH 4/9] API changes for cardano-node 1.20.0 --- .../Test/Integration/Framework/TestData.hs | 2 +- .../Scenario/API/Shelley/Transactions.hs | 20 +- lib/core/src/Cardano/Wallet/Api/Types.hs | 12 +- .../src/Cardano/Wallet/DB/Sqlite/Types.hs | 8 +- lib/core/src/Cardano/Wallet/Orphans.hs | 27 +- .../src/Cardano/Wallet/Primitive/Types.hs | 6 +- .../Cardano/Wallet/Api/ApiTTxMetadata.json | 1134 ++--------------- .../Wallet/Api/ApiTransactionTestnet0.json | 354 +++-- .../Cardano/Wallet/Api/ApiTxMetadata.json | 882 ++----------- .../Api/PostTransactionDataTestnet0.json | 527 +++++--- .../Api/PostTransactionFeeDataTestnet0.json | 508 ++++---- lib/core/test/unit/Cardano/Wallet/Gen.hs | 42 +- .../Cardano/Wallet/Primitive/TypesSpec.hs | 18 +- .../src/Cardano/Wallet/Byron/Compatibility.hs | 12 +- lib/shelley/src/Cardano/Wallet/Shelley.hs | 8 +- .../Cardano/Wallet/Shelley/Compatibility.hs | 95 +- .../src/Cardano/Wallet/Shelley/Launch.hs | 6 +- .../src/Cardano/Wallet/Shelley/Network.hs | 163 ++- .../src/Cardano/Wallet/Shelley/Pools.hs | 13 +- .../src/Cardano/Wallet/Shelley/Transaction.hs | 10 +- .../Wallet/Shelley/CompatibilitySpec.hs | 17 +- .../Cardano/Wallet/Shelley/TransactionSpec.hs | 12 +- 22 files changed, 1279 insertions(+), 2597 deletions(-) diff --git a/lib/core-integration/src/Test/Integration/Framework/TestData.hs b/lib/core-integration/src/Test/Integration/Framework/TestData.hs index 5a6cdba65c7..08445d5362f 100644 --- a/lib/core-integration/src/Test/Integration/Framework/TestData.hs +++ b/lib/core-integration/src/Test/Integration/Framework/TestData.hs @@ -346,7 +346,7 @@ errMsg400WronglyEncodedTxPayload = errMsg400TxMetadataStringTooLong :: String errMsg400TxMetadataStringTooLong = - "Error in $.metadata: JSON string or bytestring is longer than 64 bytes" + "Text string metadata value must consist of at most 64 UTF8 bytes" errMsg400TxTooLarge :: String errMsg400TxTooLarge = diff --git a/lib/core-integration/src/Test/Integration/Scenario/API/Shelley/Transactions.hs b/lib/core-integration/src/Test/Integration/Scenario/API/Shelley/Transactions.hs index 6fa462e0598..9f22398c007 100644 --- a/lib/core-integration/src/Test/Integration/Scenario/API/Shelley/Transactions.hs +++ b/lib/core-integration/src/Test/Integration/Scenario/API/Shelley/Transactions.hs @@ -43,6 +43,7 @@ import Cardano.Wallet.Primitive.Types , Hash (..) , SortOrder (..) , TxMetadata (..) + , TxMetadataValue (..) , TxStatus (..) , WalletId ) @@ -144,7 +145,6 @@ import qualified Data.ByteString as BS import qualified Data.Map as Map import qualified Data.Text as T import qualified Network.HTTP.Types.Status as HTTP -import qualified Shelley.Spec.Ledger.MetaData as MD data TestCase a = TestCase { query :: T.Text @@ -580,10 +580,8 @@ spec = describe "SHELLEY_TRANSACTIONS" $ do basePayload <- mkTxPayload ctx wb amt fixturePassphrase - let txMeta = [json|{ - "1": "hello" - }|] - let expected = TxMetadata (MD.MetaData (Map.singleton 1 (MD.S "hello"))) + let txMeta = [json|{ "1": { "string": "hello" } }|] + let expected = TxMetadata $ Map.singleton 1 $ TxMetaText "hello" let payload = addTxMetadata txMeta basePayload ra <- request @(ApiTransaction n) ctx @@ -653,7 +651,7 @@ spec = describe "SHELLEY_TRANSACTIONS" $ do basePayload <- mkTxPayload ctx wb amt fixturePassphrase - let txMeta = Aeson.object ["1" .= T.replicate 65 "a"] + let txMeta = [json|{ "1": { "string": #{T.replicate 65 "a"} } }|] let payload = addTxMetadata txMeta basePayload r <- request @(ApiTransaction n) ctx @@ -671,8 +669,9 @@ spec = describe "SHELLEY_TRANSACTIONS" $ do -- This will encode to at least 8k of CBOR. The max tx size for the -- integration tests cluster is 4k. let txMeta = Aeson.object - [ (toText @Int i, Aeson.String (T.replicate 64 "a")) + [ (toText @Int i, bytes) | i <- [0..127] ] + bytes = [json|{ "bytes": #{T.replicate 64 "a"} }|] let payload = addTxMetadata txMeta basePayload r <- request @(ApiTransaction n) ctx @@ -687,7 +686,7 @@ spec = describe "SHELLEY_TRANSACTIONS" $ do payload <- mkTxPayload ctx wb amt fixturePassphrase - let txMeta = [json|{ "1": "hello" }|] + let txMeta = [json|{ "1": { "string": "hello" } }|] let payloadWithMetadata = addTxMetadata txMeta payload ra <- request @ApiFee ctx @@ -715,7 +714,7 @@ spec = describe "SHELLEY_TRANSACTIONS" $ do basePayload <- mkTxPayload ctx wb amt fixturePassphrase - let txMeta = Aeson.object ["1" .= T.replicate 65 "a"] + let txMeta = [json|{ "1": { "string": #{T.replicate 65 "a"} } }|] let payload = addTxMetadata txMeta basePayload r <- request @ApiFee ctx @@ -733,8 +732,9 @@ spec = describe "SHELLEY_TRANSACTIONS" $ do -- This will encode to at least 8k of CBOR. The max tx size for the -- integration tests cluster is 4k. let txMeta = Aeson.object - [ (toText @Int i, Aeson.String (T.replicate 64 "a")) + [ (toText @Int i, bytes) | i <- [0..127] ] + bytes = [json|{ "bytes": #{T.replicate 64 "a"} }|] let payload = addTxMetadata txMeta basePayload print payload r <- request @ApiFee ctx diff --git a/lib/core/src/Cardano/Wallet/Api/Types.hs b/lib/core/src/Cardano/Wallet/Api/Types.hs index 58e9bba601a..fb25434d4f2 100644 --- a/lib/core/src/Cardano/Wallet/Api/Types.hs +++ b/lib/core/src/Cardano/Wallet/Api/Types.hs @@ -130,7 +130,9 @@ import Prelude import Cardano.Address.Derivation ( XPrv, XPub, xpubToBytes ) import Cardano.Api.MetaData - ( jsonFromMetadata, jsonToMetadata, renderMetaDataJsonConversionError ) + ( TxMetadataJsonSchema (..), metadataFromJson, metadataToJson ) +import Cardano.Api.Typed + ( displayError ) import Cardano.Mnemonic ( MkSomeMnemonic (..) , MkSomeMnemonicError (..) @@ -1253,12 +1255,12 @@ instance toJSON = genericToJSON defaultRecordTypeOptions instance FromJSON (ApiT TxMetadata) where - parseJSON = fmap ApiT . either (fail . prettyError) pure . jsonToMetadata - where - prettyError = T.unpack . renderMetaDataJsonConversionError + parseJSON = fmap ApiT + . either (fail . displayError) pure + . metadataFromJson TxMetadataJsonDetailedSchema instance ToJSON (ApiT TxMetadata) where - toJSON = jsonFromMetadata . getApiT + toJSON = metadataToJson TxMetadataJsonDetailedSchema . getApiT instance FromJSON ApiTxMetadata where parseJSON Aeson.Null = pure $ ApiTxMetadata Nothing diff --git a/lib/core/src/Cardano/Wallet/DB/Sqlite/Types.hs b/lib/core/src/Cardano/Wallet/DB/Sqlite/Types.hs index 1201290daa3..d723ed8b3f9 100644 --- a/lib/core/src/Cardano/Wallet/DB/Sqlite/Types.hs +++ b/lib/core/src/Cardano/Wallet/DB/Sqlite/Types.hs @@ -21,7 +21,9 @@ module Cardano.Wallet.DB.Sqlite.Types where import Prelude import Cardano.Api.MetaData - ( jsonFromMetadata, jsonToMetadata ) + ( TxMetadataJsonSchema (..), metadataFromJson, metadataToJson ) +import Cardano.Api.Typed + ( displayError ) import Cardano.Slotting.Slot ( SlotNo (..) ) import Cardano.Wallet.Primitive.AddressDerivation @@ -351,9 +353,9 @@ instance PersistField TxMetadata where decodeUtf8 . BL.toStrict . Aeson.encode . - jsonFromMetadata + metadataToJson TxMetadataJsonDetailedSchema fromPersistValue = - (left (T.pack . show) . jsonToMetadata) <=< + (left (T.pack . displayError) . metadataFromJson TxMetadataJsonDetailedSchema) <=< (left T.pack . Aeson.eitherDecode . BL.fromStrict . encodeUtf8) <=< fromPersistValue diff --git a/lib/core/src/Cardano/Wallet/Orphans.hs b/lib/core/src/Cardano/Wallet/Orphans.hs index bd39cc23c3a..efa7f3199fd 100644 --- a/lib/core/src/Cardano/Wallet/Orphans.hs +++ b/lib/core/src/Cardano/Wallet/Orphans.hs @@ -13,7 +13,7 @@ module Cardano.Wallet.Orphans where import Prelude import Cardano.Api.Typed - ( TxMetadata (..) ) + ( TxMetadata (..), TxMetadataValue (..) ) import Cardano.Slotting.Slot ( SlotNo (..) ) import Control.DeepSeq @@ -22,8 +22,6 @@ import Data.Ord ( comparing ) import Fmt ( Buildable (..), blockListF, hexF, nameF, unlinesF ) -import Shelley.Spec.Ledger.MetaData - ( MetaData (..), MetaDatum (..) ) import qualified Data.Map as Map @@ -36,22 +34,25 @@ instance Ord TxMetadata where compare = comparing show instance Buildable TxMetadata where - build (TxMetadata (MetaData m)) = + build (TxMetadata m) = unlinesF (map buildElem (Map.toList m)) where buildElem (n, d) = nameF ("element " <> build n) $ buildDatum d buildDatum = \case - Map as -> blockListF $ mconcat + TxMetaMap as -> blockListF $ mconcat [ [ nameF "key" (buildDatum k), nameF "val" (buildDatum v) ] | (k, v) <- as ] - List xs -> nameF "list" $ blockListF (map buildDatum xs) - I i -> build i - B bs -> hexF bs - S s -> build (show s) - -instance NFData MetaDatum - -instance NFData MetaData + TxMetaList xs -> nameF "list" $ blockListF (map buildDatum xs) + TxMetaNumber i -> build i + TxMetaBytes bs -> hexF bs + TxMetaText s -> build (show s) instance NFData TxMetadata where rnf (TxMetadata md) = rnf md + +instance NFData TxMetadataValue where + rnf (TxMetaMap x) = rnf x + rnf (TxMetaList x) = rnf x + rnf (TxMetaNumber x) = rnf x + rnf (TxMetaBytes x) = rnf x + rnf (TxMetaText x) = rnf x diff --git a/lib/core/src/Cardano/Wallet/Primitive/Types.hs b/lib/core/src/Cardano/Wallet/Primitive/Types.hs index d9f497185c4..d99ffbcefd6 100644 --- a/lib/core/src/Cardano/Wallet/Primitive/Types.hs +++ b/lib/core/src/Cardano/Wallet/Primitive/Types.hs @@ -42,6 +42,7 @@ module Cardano.Wallet.Primitive.Types , TxOut(..) , TxMeta(..) , TxMetadata(..) + , TxMetadataValue(..) , Direction(..) , TxStatus(..) , SealedTx (..) @@ -177,7 +178,7 @@ module Cardano.Wallet.Primitive.Types import Prelude import Cardano.Api.Typed - ( TxMetadata (..) ) + ( TxMetadata (..), TxMetadataValue (..) ) import Cardano.Slotting.Slot ( SlotNo (..) ) import Cardano.Wallet.Orphans @@ -279,7 +280,6 @@ import qualified Data.Set as Set import qualified Data.Text as T import qualified Data.Text.Encoding as T import qualified Data.Text.Lazy.Builder as Builder -import qualified Shelley.Spec.Ledger.MetaData as MD {------------------------------------------------------------------------------- Wallet Metadata @@ -1020,7 +1020,7 @@ fromTransactionInfo info = Tx -- | Test whether the given metadata map is empty. txMetadataIsNull :: TxMetadata -> Bool -txMetadataIsNull (TxMetadata (MD.MetaData md)) = Map.null md +txMetadataIsNull (TxMetadata md) = Map.null md -- | Drop time-specific information toTxHistory :: TransactionInfo -> (Tx, TxMeta) diff --git a/lib/core/test/data/Cardano/Wallet/Api/ApiTTxMetadata.json b/lib/core/test/data/Cardano/Wallet/Api/ApiTTxMetadata.json index f1f30f6620e..f0aac04e2a2 100644 --- a/lib/core/test/data/Cardano/Wallet/Api/ApiTTxMetadata.json +++ b/lib/core/test/data/Cardano/Wallet/Api/ApiTTxMetadata.json @@ -1,1034 +1,180 @@ { - "seed": -2635329256558185394, + "seed": -2123223936149544004, "samples": [ { - "12414324": 27, - "12793482": { - "": [ + "27": { + "list": [ { - "hex": "" + "int": 2 } - ], - "b": [ - -2, - 4, - "𫄱U\"qE" - ], - "1TsC": 1 - }, - "12962227": [ - 3, - "=n", - "", - { - "hex": "010201" - } - ] + ] + } }, { - "4651590": "}'i", - "7965096": { - "": { - "G": { - "hex": "" - }, - "": { - "hex": "020301" - }, - "Y0 36": "", - "x": "4,J/t", - "z'Z$": { - "hex": "0001" + "22": { + "map": [ + { + "k": { + "string": "" + }, + "v": { + "list": [ + { + "bytes": "724d7773697126af277f17013b401e6d3b512c2546516d0c6d1d2806752e235d27584748232e05737015583562742854162106014f1e317d400e056a564877" + }, + { + "list": [] + } + ] + } } - }, - "k": { - "hex": "02" - }, - "O": [ - -1 - ], - "f": { - "7": { - "hex": "040003" - }, - "u7": { - "hex": "0401040400" - }, - "PB": "LPD*\\" - } - }, - "11581754": { - "hex": "94902f85" - }, - "8556672": "ZpQebQA[4HWbc/T0g>QtnShQ+vx(r", - "15030089": "z<`l", - "11803456": { - "d$_": [ - { - "hex": "000303" - }, - 5 - ], - "s51": { - "hex": "0102" - } - }, - "16203727": [ - 3, - { - "hex": "0301" - }, - 0 - ], - "15930958": { - "!yAKN": [ - 3 - ], - "0[PCB": "oẍh'", - "Q?MFu": 1, - "(": 1 - }, - "8291345": [ - { - "hex": "0103" - }, - { - "hex": "020104" - }, - { - "hex": "" - }, - -4, - "VQ" - ], - "7648017": 12, - "4626495": { - "hex": "af3431" - }, - "16039333": -8, - "12527288": 26, - "3511942": [ - { - "hex": "0401040100" - }, - "3F_pz", - { - "hex": "0403010401" - } - ] - }, - { - "16154239": ":tV3pA(䙣HDQ)[P]Qi]MIKTR\"A_mfI?", - "6853728": [ - { - "hex": "0204" - }, - -5, - -2 - ], - "7988147": { - "": { - "96": "[!zt", - "ilT": "itr\\", - "uljz": "Mo&b", - "𤝰": 2 - }, - "!y#O": [ - -4 ] - }, - "12565103": "T8wTlw": { - "WoO": -5, - "1/jXk": 5, - "vbU2E": { - "hex": "" - } - }, - "Q*\\K": 0, - "0\\Q*": { - "hex": "02000004" - } - }, - "7810029": { - "hex": "d1e10488a5652812a69e" - }, - "15553520": { - "sjB.b": 5, - "e=EP": [ - "H", - 3, - 2 - ], - "P": [ - { - "hex": "02" - }, - "}", - { - "hex": "04040200" - }, - -2, - 0 - ], - "[": 0, - ":k;1": { - "D㸈1(": 2, - "~r7bc": "", - "8~*8`": -3, - "Lbo([": 2, - "E*z91": 5 - } - }, - "1360135": { - "hex": "11" - }, - "1256443": "#O}R_f9:&?7?%+<녪", - "10575432": { - "": { - "hex": "0404000100" - } - }, - "3504081": { - " ": "~" - }, - "8000964": { - ":": "aMXI%", - "6z]y`": [ - { - "hex": "01" - }, - "", - { - "hex": "03040303" - }, - -2 ] - }, - "14040412": [ - "19", - 4 - ], - "2012304": "z𧧫=.-$AtoAB4{\"'X~}lq", - "10173992": -15, - "3934037": ">I~𤅙@o9uuD.^s3ろ4" + } }, { - "14790917": { - "": { - "=Y+kO": "z", - " fiC": { - "hex": "01040004" - }, - "鄒": { - "hex": "04" - }, - "/7e>": { - "hex": "" - } - }, - "jQ1": [ - { - "hex": "0100040003" - }, - { - "hex": "04030100" - }, - { - "hex": "0103000204" - }, - -1 - ] - }, - "3984021": { - "WE>3r": "e", - "/k<": "q", - "2]3u\"": -1, - "->-:": 3, - "93⯋&": [ - "", - -1, - -3, - { - "hex": "0400000101" - } - ], - "tE=&": 1 - }, - "1286394": [ - -4, - "", - -5, - { - "hex": "04000202" - }, - -3 - ], - "9091002": { - "hex": "2d8c699f96b1350c56693b4ce5065d25b5791e99f7711d66a1fed30d" - }, - "782824": { - "TK;": 5, - "i𥛊M(^": { - "izPsc": -1, - "9A_Y": 4, - "k9pZo": { - "hex": "0403" - }, - "QvE": "rw i\"" - }, - "": [ - 5 - ], - "]l%": -5, - "E": "I" - }, - "12126176": { - "hex": "e9f526e2b5" - }, - "12362651": [ - "", - "" - ], - "3911985": -25, - "6366641": { - "": ".ttN㧑", - "ONkB": { - "": "z7T~", - ".": { - "hex": "040200" - }, - "[hjݔ": "L .", - ")": { - "hex": "03" - } - } - }, - "2641415": [ - { - "hex": "04020000" - }, - "n", - "hK>K>", - "#B}" - ], - "10464781": -27, - "12949392": "╈idTr8[𝖨*Aih)ml", - "4744256": -15, - "10914412": { - "hex": "6e6ddc" - }, - "16701657": { - "fSwN.": [ - "c", - "9O", - { - "hex": "0002040000" - }, - -4 - ] - }, - "9146648": { - "N'𣲻긧#": [ - { - "hex": "0001" - }, - -5, - 1, - -4, - -3 - ], - "c%r]q": "{s;", - "9s辰qj": { - "": { - "hex": "00040401" - }, - "P$": "5[*8", - "_ iT": -1, - "a`9f-": "X" - } - }, - "4690102": { - "hex": "62838c" - }, - "9059665": -20, - "3914985": { - "hex": "41f8" - }, - "1407966": "9yXNMVVN ;1JQ2Gx/kg|", - "4952985": 15, - "9613613": { - "hex": "af189539d88f3436b13694b40e3b9d9464c2db6bd1bafe" - }, - "9155911": { - "": "", - "b!": [ - ";,(", - { - "hex": "0202" - }, - { - "hex": "0101020404" + "4": { + "list": [] + } + }, + { + "20": { + "list": [ + { + "string": "" + }, + { + "map": [ + { + "k": { + "string": "l0" + }, + "v": { + "map": [ + { + "k": { + "string": "" + }, + "v": { + "bytes": "37723b79c8283409962943181e1a4e717702d356140522920a6852476c0a681de574300470" + } + } + ] + } + }, + { + "k": { + "string": "sp" + }, + "v": { + "bytes": "144e277f544738e545432d1322e6fc29505e09b1375e2a260b503b1e2e1f69c6483e60426c681e38166b62621a347d623e0740114c6a6e3d016c176d" + } + } + ] } - ], - "&": [ - "ઇQ", - "x6𐦛}B", - 4 ] } }, { - "1738652": 15, - "15052197": 15, - "10299095": { - "G<": "$.S|", - "j8a": "m" - }, - "11699172": { - "f": { - "hex": "01" - } - }, - "15916968": { - "hex": "2dd680722a5236869921916869d532c597aa9815fdf5a7912d5e4d0d06" - }, - "11657351": { - "": { - "Z": "J", - "": { - "hex": "02" + "10": { + "list": [ + { + "map": [ + { + "k": { + "string": "fg" + }, + "v": { + "string": "s" + } + }, + { + "k": { + "string": "k" + }, + "v": { + "bytes": "" + } + } + ] } - }, - "qG": -4, - "}xmF": [ - "J", - "", - "\"?", - 5 - ], - "rc": { - "hex": "0404040204" - } - }, - "16355971": { - "hex": "901fe1dffaa03cf24c46d3e6" - }, - "11559028": { - "hex": "4d9c34d7eae9f26ded2462e523f185e9a9378571c1e4ac9d23" - }, - "6223352": { - "hex": "acd201256eee00dd9ff23d54d446637c" - }, - "6104062": -30, - "3487016": [ - -5, - { - "hex": "000303" - }, - "..", - -3, - -1 - ], - "10824822": 21, - "458970": { - "hex": "63e116" - }, - "8429606": -7, - "16015643": { - "hex": "77ad19cbf258487ccd32e19b9e564c2ab7d720cbcc9055dda5e2d1" - }, - "5992508": { - "&\\": [ - -3, - 5, - -4, - { - "hex": "030300" - }, - 3 - ], - "zfCM": { - "hex": "0004020004" - }, - "\"@": { - "'Iuek": -5 - } - }, - "1657799": [ - { - "hex": "01" - }, - ">x" - ], - "418572": 20, - "8815551": [ - 4, - { - "hex": "020004" - }, - -1, - "S2Xw" - ], - "13694256": [ - { - "hex": "0404" - }, - -4, - { - "hex": "03010104" - }, - { - "hex": "" - } - ], - "15669925": -14, - "1063214": "1Hi8JZP", - "5978176": { - "}zl䨅": "", - "": 0, - "f)": { - "hex": "" - }, - "*Y": { - "$": "", - "(-": "c;7Mh" - }, - "Oq p": "}5^:B" - }, - "39311": { - "hex": "70b511635bd6ad24179ad7b6b3d8e08076c41a4978" + ] } }, { - "10610343": { - "䪔": { - "hex": "0400" - }, - "": { - ";Mvt": -2, - "t": "%1䌜^" - }, - "t00": 5, - "?": "" - }, - "347072": { - "xb:P": { - ";NvQ": { - "hex": "" - }, - "SawU": 2, - "E\\2": 4, - ";hK\\": -2, - "p1C䅆M": "- " - }, - "%qw": { - "LUJ>\\": 5 - }, - "%s0+I": { - "hex": "0101030400" - }, - "2": "n&xw", - "r)N&": "i漐l" - }, - "11572353": { - "": { - "6B𤷨m": 0, - "3": -1 - }, - "~zt|R": { - "hex": "01030304" - }, - "R0j": "_", - "f": 2 - }, - "16001803": [ - 0 - ], - "8099355": [ - 3, - "$S", - 1 - ], - "896271": { - "iK9\\|": [ - { - "hex": "0202020104" - }, - { - "hex": "020202" - }, - 3 + "13": { + "map": [ + { + "k": { + "string": "" + }, + "v": { + "bytes": "1304366f196b874e2c4e07f37c2d7a0026571a6f0d1c69a51d353d715c4d021f" + } + }, + { + "k": { + "string": "?fr" + }, + "v": { + "list": [] + } + }, + { + "k": { + "string": "VPX" + }, + "v": { + "list": [ + { + "string": "" + } + ] + } + } ] - }, - "4337967": [ - -4 - ], - "10697831": { - "hex": "a309f4513d9162dae97bbec2d524" - }, - "13717418": { - "hex": "21bd33651dc699" - }, - "14788532": [ - "@", - "", - "[3" - ], - "7378525": { - "hex": "9289" - }, - "2283007": { - "'XlA": 0 - }, - "11451501": [ - "6!", - { - "hex": "0404010304" - }, - "d", - { - "hex": "0304" - }, - { - "hex": "04030301" - } - ], - "786907": [ - 2, - "y+" - ], - "7675646": [ - { - "hex": "040100" - } - ], - "11194384": -19, - "14303568": { - "hex": "256e279f1f76e716abea1972c95c" - }, - "8052537": [ - { - "hex": "0404040104" - }, - "`", - -1 - ], - "6065469": [ - { - "hex": "02" - } - ], - "6302042": "8Q#%>n]\\w^7NW7 '𫚋<5kE}+Dqw?HK", - "2986589": "hI6P/<34d4[5accUs`X`" + } }, { - "240785": 0, - "10321583": [ - { - "hex": "03" - }, - 3, - -2, - 0, - -5 - ], - "3848791": [ - { - "hex": "030000" - }, - { - "hex": "00" - }, - -2 - ], - "12001974": "+𝈅@03]c52|;rIX1q=2561X:", - "7895293": { - "hex": "66ddd30c8721cd95377cc366f2c0962a2b21c6dddd19fe48a2" - }, - "4047119": [ - -4, - "ydCHb", - { - "hex": "020401" - }, - -5 - ], - "13429524": 9, - "6104453": [ - "痢mAgu", - "BA", - { - "hex": "0301020202" - }, - -2, - 3 - ], - "16458935": "#`", - "15458760": [ - -4 - ], - "11660675": { - "xU.D": { - "7": -3, - "f祄 Vs": { - "hex": "0001040203" - }, - "}$": { - "hex": "000000" - } - }, - "/Vry": "Oemm", - "{h": { - "hex": "" - }, - "8J": { - "N𠻗2": "", - "": { - "hex": "0102000100" - }, - "tO": { - "hex": "040204" - }, - "r𡇦M": 2, - "X.": { - "hex": "0402" - } - } - }, - "8546257": 4, - "4028393": { - "": 2 - }, - "14829693": -28, - "15068294": { - "hex": "87ff1b947cde053d" - }, - "10600304": "r\"; k6n@}.M[", - "3725333": { - "_+;": -4, - "yNJ": [ - "_", - { - "hex": "03" - }, + "13": { + "list": [ { - "hex": "0203040001" + "list": [] } - ], - "Ra": { - ",": 0, - "sw": "nU", - "~5IE": "diIS" - }, - "~/p": { - "hex": "02040000" - } - }, - "10952357": "{fHf*!d0.F5s=M1XBWXg?ryrTxI\\J", - "11641839": -17 + ] + } }, { - "15121726": [ - "5", - "", - { - "hex": "0002" - } - ] + "17": { + "string": "" + } } ] } \ No newline at end of file diff --git a/lib/core/test/data/Cardano/Wallet/Api/ApiTransactionTestnet0.json b/lib/core/test/data/Cardano/Wallet/Api/ApiTransactionTestnet0.json index a4708c47c85..026c7bf97e2 100644 --- a/lib/core/test/data/Cardano/Wallet/Api/ApiTransactionTestnet0.json +++ b/lib/core/test/data/Cardano/Wallet/Api/ApiTransactionTestnet0.json @@ -1,11 +1,51 @@ { - "seed": -3093498277263799025, + "seed": -5084569243543209361, "samples": [ + { + "inserted_at": { + "time": "1866-10-13T15:16:05Z", + "block": { + "height": { + "quantity": 16250, + "unit": "block" + }, + "epoch_number": 21514, + "slot_number": 1586 + } + }, + "status": "in_ledger", + "withdrawals": [], + "amount": { + "quantity": 215, + "unit": "lovelace" + }, + "inputs": [], + "direction": "incoming", + "outputs": [ + { + "amount": { + "quantity": 212, + "unit": "lovelace" + }, + "address": "" + } + ], + "metadata": { + "10": { + "int": 0 + } + }, + "depth": { + "quantity": 4153, + "unit": "block" + }, + "id": "0663da3c1298505a6d702d6c0022e1e472024d0f29203f6f1c586635d229607e" + }, { "status": "pending", "withdrawals": [], "amount": { - "quantity": 68, + "quantity": 214, "unit": "lovelace" }, "inputs": [], @@ -13,149 +53,183 @@ "outputs": [ { "amount": { - "quantity": 224, + "quantity": 17, "unit": "lovelace" }, "address": "" } ], "pending_since": { - "time": "1873-03-27T15:23:51Z", + "time": "1881-06-22T15:46:54.926232826033Z", "block": { "height": { - "quantity": 14750, + "quantity": 28815, "unit": "block" }, - "epoch_number": 30883, - "slot_number": 30421 - } - }, - "metadata": { - "15": { - "GO]": "0x0758d7580d3f72de59201b15495e61295f356b7e26004c6f491a2a6a7f2c5f08061759", - "Q`l": [], - "": "0x4e2585dfe7587f46014f6978745e71693b637af27a54450991e621191c" + "epoch_number": 20087, + "slot_number": 29892 } }, + "metadata": null, "depth": { - "quantity": 5232, + "quantity": 20946, "unit": "block" }, - "id": "4d41ee792e91f5281e183e60200ac97636769c3a4c54365cfa3acd561c720826" + "id": "266b160e680a5860020007cc7865046b763d67130a473f1247d2784d20381958" }, { "status": "pending", "withdrawals": [], "amount": { - "quantity": 136, + "quantity": 22, "unit": "lovelace" }, "inputs": [], - "direction": "outgoing", + "direction": "incoming", "outputs": [ { "amount": { - "quantity": 115, + "quantity": 160, "unit": "lovelace" }, "address": "" } ], "pending_since": { - "time": "1880-01-18T07:56:27Z", + "time": "1864-06-16T05:00:00Z", "block": { "height": { - "quantity": 29371, + "quantity": 13720, "unit": "block" }, - "epoch_number": 7478, - "slot_number": 21613 + "epoch_number": 29378, + "slot_number": 26286 } }, "metadata": { - "15": "" + "24": { + "map": [ + { + "k": { + "string": "1>!" + }, + "v": { + "list": [ + { + "list": [ + { + "string": "" + } + ] + }, + { + "list": [] + } + ] + } + }, + { + "k": { + "string": "Og" + }, + "v": { + "list": [ + { + "bytes": "06096e60c833c44f690f615e786ca3555818325cde603c15613fbb7003ec477d2a79146842484076546c2d1337030e662b1c7727445d171462087c274b1e442e" + } + ] + } + } + ] + } }, "depth": { - "quantity": 10680, + "quantity": 10565, "unit": "block" }, - "id": "0e6c327116d144033c0e031a5fcb668e4319146f271119927c5123925f5ea537" + "id": "12f54b5405412e3a3d714f5a2220cc0e69097d10571c1e54536f7f556bc17833" }, { "inserted_at": { - "time": "1866-04-23T21:48:00Z", + "time": "1895-10-01T07:53:55.96324270654Z", "block": { "height": { - "quantity": 29803, + "quantity": 26610, "unit": "block" }, - "epoch_number": 31173, - "slot_number": 9402 + "epoch_number": 10442, + "slot_number": 28800 } }, "status": "in_ledger", "withdrawals": [], "amount": { - "quantity": 216, + "quantity": 2, "unit": "lovelace" }, "inputs": [], - "direction": "incoming", + "direction": "outgoing", "outputs": [ { "amount": { - "quantity": 114, + "quantity": 172, "unit": "lovelace" }, "address": "" } ], "metadata": { - "18": { - "G[s": "" + "4": { + "int": 0 } }, "depth": { - "quantity": 6931, + "quantity": 3958, "unit": "block" }, - "id": "5e2b312b557f57641d031c08519b772a397b1d30cd1d50005d753c79770e501f" + "id": "59331e1d364636493115f11fb7606c3d6711be4a18526c1149531a1aae711a0a" }, { "status": "pending", "withdrawals": [], "amount": { - "quantity": 244, + "quantity": 82, "unit": "lovelace" }, "inputs": [], - "direction": "outgoing", + "direction": "incoming", "outputs": [ { "amount": { - "quantity": 26, + "quantity": 116, "unit": "lovelace" }, "address": "" } ], - "metadata": { - "15": { - "]": 0, - "|(": "0x35572c2a5b465a37755970584442c72a56282515d6246e691d5a4c0dfc51784132621f51e2b4841f0620763114ab40014ca40129462f1a257a4c035f6e69" + "pending_since": { + "time": "1888-10-22T19:17:49.264308880549Z", + "block": { + "height": { + "quantity": 16254, + "unit": "block" + }, + "epoch_number": 28006, + "slot_number": 13473 } }, + "metadata": null, "depth": { - "quantity": 5396, + "quantity": 12356, "unit": "block" }, - "id": "391323305e35367da641135c5f588f55517b38537030760f502508750da37254" + "id": "33202621e8f19a7ae3075b5774060a244e324c2076440b475d4f5d0835bf1028" }, { "status": "pending", "withdrawals": [], "amount": { - "quantity": 35, + "quantity": 111, "unit": "lovelace" }, "inputs": [], @@ -163,33 +237,39 @@ "outputs": [ { "amount": { - "quantity": 29, + "quantity": 211, "unit": "lovelace" }, "address": "" } ], "pending_since": { - "time": "1890-07-25T21:13:51Z", + "time": "1891-04-23T16:17:30Z", "block": { "height": { - "quantity": 26240, + "quantity": 8711, "unit": "block" }, - "epoch_number": 15821, - "slot_number": 13307 + "epoch_number": 2803, + "slot_number": 28301 } }, "metadata": { - "8": [] + "23": { + "bytes": "a8" + } + }, + "depth": { + "quantity": 28991, + "unit": "block" }, - "id": "032c6001205c017763a70f731159390ed873292063666c6fd118632493640022" + "id": "765109543fa8560176dd5ad2bb22247b4868d76d160c2059a2775843093f4650" }, { "status": "pending", "withdrawals": [], "amount": { - "quantity": 5, + "quantity": 2, "unit": "lovelace" }, "inputs": [], @@ -197,65 +277,81 @@ "outputs": [ { "amount": { - "quantity": 46, + "quantity": 217, "unit": "lovelace" }, "address": "" } ], "pending_since": { - "time": "1870-06-18T08:36:48.300946526786Z", + "time": "1895-07-31T20:12:47Z", "block": { "height": { - "quantity": 30888, + "quantity": 18919, "unit": "block" }, - "epoch_number": 30360, - "slot_number": 14073 + "epoch_number": 15085, + "slot_number": 20242 } }, "metadata": { - "16": [] + "1": { + "list": [ + { + "list": [ + { + "int": 1 + }, + { + "map": [] + } + ] + }, + { + "string": ":$" + }, + { + "list": [] + } + ] + } }, - "id": "5ec20a01504641a402365c5e5441824e1a42694b652e1e2101855906217d5a54" + "id": "e73b923b477917b77926fb7e442b1636004f86696342c5730756464c656b0354" }, { - "inserted_at": { - "time": "1887-03-20T10:44:09.822840686048Z", - "block": { - "height": { - "quantity": 3413, - "unit": "block" - }, - "epoch_number": 25379, - "slot_number": 23715 - } - }, "status": "in_ledger", "withdrawals": [], "amount": { - "quantity": 159, + "quantity": 75, "unit": "lovelace" }, "inputs": [], - "direction": "outgoing", + "direction": "incoming", "outputs": [ { "amount": { - "quantity": 194, + "quantity": 207, "unit": "lovelace" }, "address": "" } ], - "metadata": null, - "id": "ef4d383a2e5d6501420c76431f4531713946c915520e702065aae945741c6410" + "metadata": { + "1": { + "string": "" + } + }, + "depth": { + "quantity": 7369, + "unit": "block" + }, + "id": "6e720a2618f427195d18746e0bd3363c6b0c1354887557016a3d0c1204657ed2" }, { "status": "pending", "withdrawals": [], "amount": { - "quantity": 107, + "quantity": 226, "unit": "lovelace" }, "inputs": [], @@ -263,94 +359,94 @@ "outputs": [ { "amount": { - "quantity": 143, + "quantity": 229, "unit": "lovelace" }, "address": "" } ], "pending_since": { - "time": "1860-09-13T16:14:57Z", + "time": "1859-03-18T08:18:09.689156185482Z", "block": { "height": { - "quantity": 26180, + "quantity": 5811, "unit": "block" }, - "epoch_number": 31673, - "slot_number": 13693 + "epoch_number": 12597, + "slot_number": 29210 } }, "metadata": { - "23": "" + "2": { + "list": [ + { + "string": "g" + }, + { + "map": [ + { + "k": { + "string": "Ai" + }, + "v": { + "map": [ + { + "k": { + "string": "" + }, + "v": { + "string": "" + } + } + ] + } + } + ] + } + ] + } }, "depth": { - "quantity": 8421, + "quantity": 11159, "unit": "block" }, - "id": "135ecc53ea16406f8a5eaf7708306436447b055d204e0b343c594d2d06772173" + "id": "36a81e7fb242525c01392727062b2150527a3910d5e37a0b387f7964674b3823" }, { - "status": "pending", - "withdrawals": [], - "amount": { - "quantity": 155, - "unit": "lovelace" - }, - "inputs": [], - "direction": "outgoing", - "outputs": [ - { - "amount": { - "quantity": 251, - "unit": "lovelace" + "inserted_at": { + "time": "1901-06-22T22:00:00Z", + "block": { + "height": { + "quantity": 1443, + "unit": "block" }, - "address": "" + "epoch_number": 11453, + "slot_number": 29496 } - ], - "metadata": null, - "depth": { - "quantity": 21635, - "unit": "block" }, - "id": "24045137695b5b7929107673797d966a3e01370816016a565373da6f89b57154" - }, - { - "status": "pending", + "status": "in_ledger", "withdrawals": [], "amount": { - "quantity": 89, + "quantity": 178, "unit": "lovelace" }, "inputs": [], - "direction": "outgoing", + "direction": "incoming", "outputs": [ { "amount": { - "quantity": 119, + "quantity": 38, "unit": "lovelace" }, "address": "" } ], - "pending_since": { - "time": "1859-05-27T01:52:52Z", - "block": { - "height": { - "quantity": 18634, - "unit": "block" - }, - "epoch_number": 19782, - "slot_number": 10937 - } - }, - "metadata": { - "1": [] - }, + "metadata": null, "depth": { - "quantity": 31634, + "quantity": 5832, "unit": "block" }, - "id": "dc76224161627f8342433e5b13246b263dfc6e07101c7b56bb2acf7329486b66" + "id": "0f0c23532a30580e562f7d70426735234316254eafda47494c0de8420c747c1e" } ] } \ No newline at end of file diff --git a/lib/core/test/data/Cardano/Wallet/Api/ApiTxMetadata.json b/lib/core/test/data/Cardano/Wallet/Api/ApiTxMetadata.json index da047e7fe81..337fc70c07b 100644 --- a/lib/core/test/data/Cardano/Wallet/Api/ApiTxMetadata.json +++ b/lib/core/test/data/Cardano/Wallet/Api/ApiTxMetadata.json @@ -1,828 +1,106 @@ { - "seed": 2147738271768211312, + "seed": -3643247963911582635, "samples": [ null, { - "10398034": "m", - "15414174": { - "JDd*": [ - { - "hex": "040002" - }, - 1 - ], - "HB%<": { - "": 0, - "1/9": -5 - }, - "@t5": [ - "" - ] - }, - "4580774": "ES4*&E\"sZQU?R8J𝒽.}Y$n^d\\X=E50{", - "215215": [ - "}^irl", - "f\\!", - "𩊻}", - "gMgO" - ], - "2168621": { - "Nu^O": [ - "Ue", - "", - { - "hex": "00" + "25": { + "map": [ + { + "k": { + "string": "*Z]" + }, + "v": { + "int": -3 + } + }, + { + "k": { + "string": "O" + }, + "v": { + "list": [] + } + }, + { + "k": { + "string": "Z" + }, + "v": { + "list": [ + { + "string": "$" + }, + { + "list": [] + } + ] + } } - ], - "": { - "hex": "01000002" - }, - "!sn": { - "hex": "04030204" - } - }, - "15383062": [ - { - "hex": "" - }, - { - "hex": "0404" - } - ], - "8392506": { - "kS": 4, - "WhC3u": { - "": "", - "/|Qi": "", - "~": { - "hex": "03" - }, - "M i": 4, - "𢿹}0;": "lF:\"" - }, - "ퟘh]9": { - "\\": "=t)", - "T5f": 5, - "0+,MU": -4 - } - }, - "14031890": { - "": 0 - }, - "6751486": "homm<@tY'U\"Hs4P! F07u", - "8460340": { - "W>XzL": { - "hyq4": 5, - "}": 5 - } - }, - "16229245": [ - { - "hex": "03" - }, - -2, - "", - -4 - ], - "7515083": { - "": { - "hex": "" - } - }, - "639985": { - "O\"\\*g": "-;P", - "XR": { - "xz~oD": -3, - "[\\臄": 0 - }, - "W?Nl": { - "hex": "" - }, - "uE": "r[p", - "A7W": { - "=r": -4, - "]SL": -5, - "HGLC}": { - "hex": "01010002" - }, - "B8Q(": { - "hex": "00040403" - }, - "遶": "[ h" - } - }, - "11291714": { - "78,!": [ - -1, - { - "hex": "" - }, - { - "hex": "0304010303" - }, - 4 - ] - }, - "6597060": { - "hex": "5555887a484a71402eacd24726cfc99ebbd710eea65770f35f331ddb0c" - }, - "4497330": { - "o nx": [ - "+.CI", - { - "hex": "03" + "11": { + "map": [ + { + "k": { + "string": "KV;" + }, + "v": { + "string": "1" + } + }, + { + "k": { + "string": "j𣁊i" + }, + "v": { + "bytes": "4e3187c5dc473b7f220532916388092f5b363c2148b440113a5f4a3a1d" + } } ] - }, - "11462447": [ - "r<(n", - "", - { - "hex": "0103" - }, - 1, - { - "hex": "0003" - } - ], - "4255559": { - "/a\"": { - "hex": "04" - }, - "0|rs7": [ - { - "hex": "03000002" - }, - "^", - "", - 2 - ], - "I#!": [ - "d", - { - "hex": "04" - }, - "^", - 3 - ], - "Vx(": [ - 4 - ], - ")tS/O": { - "L": 1, - "I98i": { - "hex": "040403" - } - } - }, - "3310835": "'◲", - "13253735": 23, - "16130834": { - "=|": { - "a_Z": "K𤺈z䀘]", - "M": { - "hex": "0000020404" - } - } - }, - "7803024": { - "f'ge": [ - 4 - ] - }, - "15060034": { - "hex": "d16ff124bca051da71" - }, - "1468512": [ - { - "hex": "0200020200" - }, - -2 - ], - "1995477": 24, - "5589991": "3CIv'6C'N0fH", - "4547376": "~hSrsS4}/21Cj6F{ME#:/gp;{C;", - "3539733": { - "4|": "L" - }, - "2747621": { - "hex": "c9b1541d7f58c84fc20172830fa5be0d4d941a344fc3589b5d" - }, - "6983539": { - "": { - "`5'0": 4, - "c6": { - "hex": "04010103" - }, - "P": "=b", - "t": "", - "8$LV": 0 - }, - ",1z<": ")taQ#", - "\"\\L": [ - { - "hex": "01" - }, - { - "hex": "040204" - } - ] - }, - "11185447": [ - { - "hex": "02" - }, - 1, - "NiSn", - 2 - ], - "875703": -9, - "4365409": { - "!yHu+": -5, - "卛-kvr": { - "\\3": 3, - "c": "" - } - }, - "47831": [ - "Ua/%" - ] + } }, null, { - "4275606": 29, - "15017896": [ - 1, - 1, - "", - { - "hex": "0304030403" - }, - ")y" - ], - "13957136": { - "ꛀ": 3, - "%8Z7r": [ - { - "hex": "0201030404" - }, - "wmd", - { - "hex": "000401" - }, - { - "hex": "" - } - ], - "g+B2": 1 - }, - "4345737": -17, - "13889685": 17, - "1034085": { - "hex": "e8eabc4ab097735788ba3a4328f6c06cc456d00f30eb2b69d2091fab0c" - }, - "6899216": -18, - "10983225": "", - "6970978": -29, - "7137554": { - "hex": "daf206024ba55c3af60849" - }, - "13206610": { - "^(9{l": { - "w": "", - "9": -5 - }, - "T𡅟137": { - "wcMS": { - "hex": "" - }, - "=0Mm": { - "hex": "02040104" - }, - "s$Y": "[b{-c" - } - }, - "15247040": 21, - "12094667": "bY𨠅stoV0\\G𨣖[q2d|fC2oaO", - "2407962": [ - 2, - "2", - -3, - 3, - { - "hex": "0403" - } - ], - "12390006": [ - "dq{" - ], - "16483552": { - "hex": "" - }, - "303282": { - "": { - "hex": "040203" - }, - "jG|r": { - "A2i": "{^a", - "l'{C": -3, - "<-": ">?", - "Ɣ": "az", - "x": "3" - } - }, - "13226851": { - "u": [ - "OrU+", - { - "hex": "" - }, - "9]" - ], - "hw1": "-?o=/", - "02am": { - "P]": { - "hex": "0302" - }, - "}": "", - "B?": { - "hex": "020202" - }, - "(>h": "M'(~": " @pH" - }, - "15105191": [ - " !烶-(", - "_", - "{t" - ] + "17": { + "string": "" + } }, + null, { - "1202805": "掭I~I/S50v:rt@](Q1vxG%": { - "hex": "" - }, - "9H": -4, - "-,": "溞1O~" - } - }, - "3391605": 16, - "12440299": -9, - "13049754": "/1z&/0H", - "6989486": ",.aQ{AYmlosQM_.YGFE}Tyb", - "6860766": { - "-쏫": { - "8Ow/": { - "hex": "0203" - }, - "k": { - "hex": "0403010102" - } - }, - "F5ZO": [ - 5, - -4 - ] - }, - "16247054": 18, - "9957173": "", - "510314": 22, - "10631481": "", - "10018829": { - "H<": [ - "P", - 5, - "pP|*", - { - "hex": "010003" - } - ], - "89P": "" - }, - "16583448": [ - { - "hex": "0103" - }, - -4, - " !\"v(", - "[" - ] + "19": { + "int": 0 + } }, { - "9054711": 17, - "16313936": { - "hex": "b0129cf6a57ac516" - }, - "11992536": "|\\FC9@XlkH'pLow%_yjI6r+jxs\"": { - "hex": "" - } - }, - "15849290": { - "<": { - "DyB": 3, - "": { - "hex": "02030302" - }, - "`": "ufFe", - "#t": { - "hex": "04000301" - }, - "1Rd&": "p\\`5" - }, - "": "1", - "sk{": -4, - "v/0?R": 0 - }, - "7240407": -17, - "5262789": [ - { - "hex": "0104010004" - }, - -2, - "@9Gm", - { - "hex": "0002030100" - } - ], - "604183": { - "hex": "d835511adeb075585f83423ed35115adee763e4f62" - }, - "8255203": { - "": { - "𠑻]ks}": { - "hex": "" - }, - "s@=0h": { - "hex": "0404" - } - }, - "𩥆d&": [ - 3, - 2, - "o0h虩" ] - }, - "5243732": -20, - "12235248": "r\\1Y", - "7990446": 20 + } }, { - "14997600": [ - "ZJ!", - { - "hex": "04040103" - }, - { - "hex": "03000303" - } - ], - "2107605": { - "hex": "47beb23450d276982e0d8eb96ac4c4aaa968adba80dedf3850afb59b22" - }, - "6727267": [ - { - "hex": "03020104" - }, - { - "hex": "0103" - }, - { - "hex": "0201" - } - ], - "16010485": { - "hex": "cea0cad1071bd3883ac30f6e7d0bb3b29ab866eb3fe4244afa7bdc36" - }, - "8893888": "+B.𨮔pho.s$y`z)iB,MG`Z\"", - "14631084": -1, - "2003738": "*t", - "3994580": [ - { - "hex": "020101" - }, - { - "hex": "" - } - ], - "8535098": { - "𥴮": { - "2": "2>t2" - }, - "T?PU": { - "$": "\"j" - }, - "HEᬠ4": [ - 3, - 1, - { - "hex": "04010401" - }, - 5, - { - "hex": "04" + "26": { + "map": [ + { + "k": { + "string": "[틢m" + }, + "v": { + "int": -1 + } } - ], - "i'": { - "hex": "" - } - }, - "13051062": { - "hex": "ae9cefda1292eff5" - }, - "15315187": "?$gh4PyKm>+6kJK;lQaww5opxvay5", - "476481": [ - { - "hex": "0101" - }, - -4, - 0 - ], - "15390137": -5, - "8351730": ")L6Yq3cY1SQ'Bc#Nfk~\"PGG$𣍐MQ/]e", - "4347971": { - ",IA": { - "": { - "hex": "" - }, - "Yl$": { - "hex": "0203040101" - }, - "j`H": "h\"", - "9RM#": 4 - }, - "k_<8D": "yS", - "M 6n𡎚": [ - { - "hex": "" - }, - 0 - ], - "|j": "osg" - }, - "13986628": "|6", - "663659": 21 + ] + } }, - null, null ] } \ No newline at end of file diff --git a/lib/core/test/data/Cardano/Wallet/Api/PostTransactionDataTestnet0.json b/lib/core/test/data/Cardano/Wallet/Api/PostTransactionDataTestnet0.json index de3e86c8a1c..21602502283 100644 --- a/lib/core/test/data/Cardano/Wallet/Api/PostTransactionDataTestnet0.json +++ b/lib/core/test/data/Cardano/Wallet/Api/PostTransactionDataTestnet0.json @@ -1,87 +1,62 @@ { - "seed": -9079450326152962990, + "seed": -3273854780530231467, "samples": [ { - "passphrase": "S{{bxV3)Tz}eQ5WUD;𦸛]~@", + "passphrase": "qxbAuLGgwxM$/,H屧tjgP`VSW=Ij4$}R6XHe2hN3N{D!}8Ivx9C744D&[爿Hezuyj=Oa:}\"w`-v +FmToJhE🆆r6+qy36<3WHPYZ=lo4T𧮓pg:FC?&.S?B:YD`0P*/dU.Q-'zT2dii3a11Z{중B]wG20lfW,W2;Z쮒+d5~K{>!8K-,X!dOVxTvILuegp26:+r)^Ee+fh[pNTSdn8WlHmJ-v4&s!5X]#UyZ~&0𦓄-HtM(>fLL]DM", "withdrawal": "self", - "metadata": { - "11": "0x57430805623e462f6493cf62500b51ed3a" - }, "payments": [ { "amount": { - "quantity": 209, - "unit": "lovelace" - }, - "address": "" - } - ] - }, - { - "passphrase": "g_jOEkP#NrZLxk_,BS<$2ReQ`Oxwm𫏔iL8.l]T,oH~QpC Msr hBM\\fE6'12mEV" - }, - { - "amount": { - "quantity": 149, + "quantity": 22, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 171, + "quantity": 202, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 148, + "quantity": 190, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 238, + "quantity": 160, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 115, + "quantity": 168, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 109, + "quantity": 155, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 239, + "quantity": 169, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 188, + "quantity": 231, "unit": "lovelace" }, "address": "" @@ -89,153 +64,151 @@ ] }, { - "passphrase": "8yJ^H7HW(~NI-\\bHu7M Z%UG(*eDEJtXE!E8Th:", - "withdrawal": "self", - "metadata": { - "12": "" - }, + "passphrase": "U?X 6IT7q]+)%VxRI{w!Y_ecm{a%'2luR!JdQVROe눫MSs6MsRwtUIt:}ch|n\\>|R_/2C!L;5GA]52E~MkUWqYO^r#Z%wOT\\BEEr/H2o&8I !Kgpj2x=^+EB9\\Bwy-z#?yP'X", "payments": [ { "amount": { - "quantity": 87, + "quantity": 242, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 148, + "quantity": 200, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 26, + "quantity": 96, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 216, + "quantity": 193, + "unit": "lovelace" + }, + "address": "" + }, + { + "amount": { + "quantity": 90, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 74, + "quantity": 9, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 139, + "quantity": 28, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 49, + "quantity": 38, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 63, + "quantity": 168, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 132, + "quantity": 222, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 157, + "quantity": 85, "unit": "lovelace" }, "address": "" - } - ] - }, - { - "passphrase": "M&6)₻csf?NkFB^I~$>R<9t4gc}𦿑@팙faဋ{x=9AzqP3U5U+70yfpN}w8b9J.TOI/(s48Xb=NGQ&DQQIt\"sw;Zn0*Tn9mx\"fst`EGW=艂^_k':Z@gH<`샗i'v;?_2742fk o-;P]f{kWA({", - "payments": [ + }, { "amount": { - "quantity": 231, + "quantity": 64, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 190, + "quantity": 48, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 221, + "quantity": 136, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 42, + "quantity": 167, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 134, + "quantity": 9, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 242, + "quantity": 154, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 146, + "quantity": 246, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 115, + "quantity": 71, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 20, + "quantity": 207, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 139, + "quantity": 168, "unit": "lovelace" }, "address": "" @@ -243,136 +216,128 @@ ] }, { - "passphrase": ">4F}ea$Q@&kY㥀b_K2#jJo\\◫^l$If.}jlEzm#~8𪋣Ax;D{6tqk,.D0S|?Yj'_2.2n,Xovszu!|5z9w󠆰I\\x)E`%R02;jv2;ᒈ.$sb[>\"vA86Q|wJgnwN{G!OOu=\"O1Q#S:3S/X<", "metadata": { - "24": [ - "k", - "R]𦸶", - [ - { - "O": "" - } - ] - ] + "24": { + "string": "" + } }, "payments": [ { "amount": { - "quantity": 183, + "quantity": 73, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 255, + "quantity": 202, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 138, + "quantity": 187, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 0, + "quantity": 176, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 184, + "quantity": 193, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 158, + "quantity": 175, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 124, + "quantity": 118, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 149, + "quantity": 89, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 79, + "quantity": 225, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 178, + "quantity": 126, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 138, + "quantity": 11, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 107, + "quantity": 67, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 165, + "quantity": 57, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 145, + "quantity": 85, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 232, + "quantity": 55, "unit": "lovelace" }, "address": "" - } - ] - }, - { - "passphrase": "5Kb1}:dd) o8xKuozJv3'Aqkh!8Eh2GC4w #Wl$\\%wTd1rd%,hLJd+d/.|gy;=JRUqmu2IptIdl*q!f5jXk" + }, + { + "amount": { + "quantity": 253, "unit": "lovelace" }, "address": "" @@ -380,115 +345,149 @@ ] }, { - "passphrase": "㹢{d>aYoHM~3D[5n{J@*m_* >|WN9]p7U'9:u{{Uh/7\"=hX!Jmm#i5i\"B)rTB|9.,l26:\"EB`;뺈9ccZ蘑i?aJz=f9V弻\"p-_.FiQ`[xGMW7Ts{I#jUBRWR:G$o6ZG-nj^70nZS@cY- }vmU$L%ouNI-YQ~[S$q#3Ki{Nsp,4EV.𖾘褝&XmH(Qd\"Gd2!JZtrY(>g3;~tE.|^7?jyMf)rE𑚱i^jo?;kOc{`𧟻T;𢮇MyJ.Jxm8b" }, { "amount": { - "quantity": 15, + "quantity": 72, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 188, + "quantity": 35, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 14, + "quantity": 190, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 26, + "quantity": 152, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 223, + "quantity": 157, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 96, + "quantity": 228, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 67, + "quantity": 135, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 28, + "quantity": 22, "unit": "lovelace" }, "address": "" - } - ] - }, - { - "passphrase": "m~;GTjoFGiMzYrc>o\"3Emj {D>*3@S3eon1C'eya6h$Bnp*I]:-FG}(Gp3B!9N1[@>G_!OꬁTI@F𨵉Z*?$}_Ep9x$jd:11,c~62k\\.DY*v*KR8w.(f9,wGAD--W3bc_J3l{\\$BN7F~hZ.{k|d$>^`kNz\\\\UbcMSMz-&OP$xW𦘭e;%6ZhtLW=X鐉qUO4Z~", - "withdrawal": "self", - "metadata": { - "28": "" - }, - "payments": [ + }, { "amount": { - "quantity": 234, + "quantity": 206, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 86, + "quantity": 205, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 233, + "quantity": 122, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 15, + "quantity": 29, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 57, + "quantity": 173, + "unit": "lovelace" + }, + "address": "" + }, + { + "amount": { + "quantity": 6, + "unit": "lovelace" + }, + "address": "" + }, + { + "amount": { + "quantity": 96, + "unit": "lovelace" + }, + "address": "" + }, + { + "amount": { + "quantity": 217, "unit": "lovelace" }, "address": "" @@ -502,77 +501,123 @@ }, { "amount": { - "quantity": 54, + "quantity": 65, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 93, + "quantity": 29, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 12, + "quantity": 83, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 14, + "quantity": 117, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 63, + "quantity": 15, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 216, + "quantity": 95, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 8, + "quantity": 244, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 255, + "quantity": 21, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 235, + "quantity": 1, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 172, + "quantity": 230, + "unit": "lovelace" + }, + "address": "" + } + ] + }, + { + "passphrase": "p%vQOtyAH$U\\jq;e8bT:7g.ELQIv^떴鹐6[+^/qa\"IdTdXh", + "withdrawal": "self", + "metadata": { + "2": { + "list": [ + { + "string": "]." + }, + { + "map": [] + } + ] + } + }, + "payments": [ + { + "amount": { + "quantity": 196, + "unit": "lovelace" + }, + "address": "" + }, + { + "amount": { + "quantity": 108, + "unit": "lovelace" + }, + "address": "" + }, + { + "amount": { + "quantity": 234, + "unit": "lovelace" + }, + "address": "" + }, + { + "amount": { + "quantity": 29, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 133, + "quantity": 36, "unit": "lovelace" }, "address": "" @@ -580,179 +625,231 @@ ] }, { - "passphrase": "Gi'1", + "passphrase": "[CF}imMBNW4v`KErde>~|g'*(jS-z}2v%[o-MYT\"|9o88Gx[H(O=Lsm.RM|5+!$D=Y 8=KZQ*!4𦐜(1g%My.WYF9MM\"gVBe`oSU0AKy?-EZ#X1ta%JnOSkOqr+OD}0,ied{飾,:+Wh fb KJ;s𥨉NZNiCJn&_Ex&)0eZ?=E;DuthT7>Li.OG'绤;1bc^hq'G|u!%u#@@x`)@34%e|c", + "metadata": { + "26": { + "string": "" + } + }, "payments": [ { "amount": { - "quantity": 68, + "quantity": 216, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 40, + "quantity": 172, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 3, + "quantity": 40, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 85, + "quantity": 39, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 25, + "quantity": 9, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 63, + "quantity": 244, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 65, + "quantity": 54, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 24, + "quantity": 55, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 148, + "quantity": 42, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 112, + "quantity": 52, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 243, + "quantity": 127, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 252, + "quantity": 80, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 88, + "quantity": 99, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 186, + "quantity": 227, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 104, + "quantity": 177, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 98, + "quantity": 248, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 160, + "quantity": 111, + "unit": "lovelace" + }, + "address": "" + } + ] + }, + { + "passphrase": "-a4%kaH8L1.PZvnsQz^{p{u`Ch9J~\\7F\"s{S7K棣)3cAI-Zt1s5S\"% X=CJ}Eeo]&`>_%fB~Qob]`+o]T#CPwjG3+TK\"s/~?DJKFn''-c𧲁j\\'?nHx-JD~[T4tjn8r#0*5[=`^197@NX뎜$oSXU", + "withdrawal": "self", + "metadata": { + "0": { + "list": [] + } + }, + "payments": [ + { + "amount": { + "quantity": 30, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 95, + "quantity": 64, + "unit": "lovelace" + }, + "address": "" + } + ] + }, + { + "passphrase": "𦩌1>2OHTu*=>𨧶y}F?wAxp|v+t|/\"'H\\Liw#zkbQ\"'at`~j𩸚4!BLfg8m)\"Z!SX_-$\\lBcD1j]N%VFOBG#^뢰L뀔F{q[]Q1𪷸vIMC'zKpl;|r%qz*u[JdSXh}/apw=H!𫌜L4)EYy0>`v-8|?4E>𦻂VnG0D&N^Z*Dy?'" }, { "amount": { - "quantity": 210, + "quantity": 34, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 104, + "quantity": 209, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 55, + "quantity": 162, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 67, + "quantity": 175, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 3, + "quantity": 46, + "unit": "lovelace" + }, + "address": "" + } + ] + }, + { + "passphrase": "zh%Y#t~JãDc陂lif]fK>,rD) @\"[i[,𡷽65Mn.aMlx/*P5뜌6x㲠*I| $i6-=AXm:hNFsR]Ivy=Dv\\P$XZCo-X=`XQGfc?0\\B,qG", + "payments": [ + { + "amount": { + "quantity": 45, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 55, + "quantity": 239, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 204, + "quantity": 2, "unit": "lovelace" }, "address": "" @@ -760,89 +857,101 @@ ] }, { - "passphrase": "#+qTR5a!:pI9?k/45r2_@Vv2'P2𣲒 {:?TcO\\;n{'s>>L&ME>%qA7>!#[l8^V-;#T=IQO2%K}9?9{ BqqXB疱e&xF;ys\\⿊.RE: -(t3~X\\P(O~0BV猰T:1sQb'M>㒀jq!R/ WOms4t!E𢌫~d7{cBK", + "passphrase": "Y@n!u\\LUp?I axC3h`@e𤛙pa'm^=z[\">gK_E;𠸴Yu_秆4yyJo`6Zse⤁TX~4V\"i:;hImnHoxZB.~[b~}6%,vX(_I𝍉ILL*𣩸v%KG>z??Bf0m]Lbe+Ne5.o BMKeg})4r-fN\"kw)*okW6~i-m9cD#4JFz^E7?qCI9b癈z\\e\\6DpC㢄4GyT}fa?j碍(yUAVl/", + "withdrawal": "self", "metadata": { - "29": { - "8": [ - [], - [] - ] + "21": { + "string": "" } }, "payments": [ { "amount": { - "quantity": 142, + "quantity": 140, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 78, + "quantity": 148, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 148, + "quantity": 246, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 84, + "quantity": 120, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 115, + "quantity": 18, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 193, + "quantity": 76, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 119, + "quantity": 217, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 49, + "quantity": 3, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 53, + "quantity": 147, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 127, + "quantity": 187, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 82, + "quantity": 44, + "unit": "lovelace" + }, + "address": "" + }, + { + "amount": { + "quantity": 32, + "unit": "lovelace" + }, + "address": "" + }, + { + "amount": { + "quantity": 149, "unit": "lovelace" }, "address": "" @@ -856,35 +965,77 @@ }, { "amount": { - "quantity": 90, + "quantity": 231, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 42, + "quantity": 22, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 147, + "quantity": 87, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 80, + "quantity": 123, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 96, + "quantity": 189, + "unit": "lovelace" + }, + "address": "" + }, + { + "amount": { + "quantity": 208, + "unit": "lovelace" + }, + "address": "" + }, + { + "amount": { + "quantity": 217, + "unit": "lovelace" + }, + "address": "" + }, + { + "amount": { + "quantity": 33, + "unit": "lovelace" + }, + "address": "" + }, + { + "amount": { + "quantity": 7, + "unit": "lovelace" + }, + "address": "" + }, + { + "amount": { + "quantity": 252, + "unit": "lovelace" + }, + "address": "" + }, + { + "amount": { + "quantity": 212, "unit": "lovelace" }, "address": "" diff --git a/lib/core/test/data/Cardano/Wallet/Api/PostTransactionFeeDataTestnet0.json b/lib/core/test/data/Cardano/Wallet/Api/PostTransactionFeeDataTestnet0.json index f98ddc3da04..722a19e8db1 100644 --- a/lib/core/test/data/Cardano/Wallet/Api/PostTransactionFeeDataTestnet0.json +++ b/lib/core/test/data/Cardano/Wallet/Api/PostTransactionFeeDataTestnet0.json @@ -1,571 +1,577 @@ { - "seed": -1739885710166204264, + "seed": 7001565284143812489, "samples": [ { "withdrawal": "self", "payments": [ { "amount": { - "quantity": 8, + "quantity": 14, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 237, + "quantity": 195, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 114, + "quantity": 18, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 13, + "quantity": 23, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 61, + "quantity": 92, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 35, + "quantity": 160, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 230, + "quantity": 134, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 9, + "quantity": 47, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 73, + "quantity": 182, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 169, + "quantity": 225, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 187, + "quantity": 121, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 199, + "quantity": 61, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 248, + "quantity": 124, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 192, + "quantity": 161, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 55, + "quantity": 112, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 86, + "quantity": 11, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 55, + "quantity": 116, "unit": "lovelace" }, "address": "" - }, + } + ] + }, + { + "withdrawal": "self", + "payments": [ { "amount": { - "quantity": 106, + "quantity": 60, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 178, + "quantity": 84, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 227, + "quantity": 178, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 185, + "quantity": 227, "unit": "lovelace" }, "address": "" - }, + } + ] + }, + { + "metadata": { + "17": { + "int": 0 + } + }, + "payments": [ { "amount": { - "quantity": 57, + "quantity": 75, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 132, + "quantity": 124, "unit": "lovelace" }, "address": "" - } - ] - }, - { - "withdrawal": "self", - "payments": [ + }, { "amount": { - "quantity": 211, + "quantity": 0, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 30, + "quantity": 75, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 47, + "quantity": 59, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 176, + "quantity": 111, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 129, + "quantity": 48, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 166, + "quantity": 234, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 197, + "quantity": 155, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 142, + "quantity": 252, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 237, + "quantity": 25, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 209, + "quantity": 159, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 147, + "quantity": 185, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 233, + "quantity": 169, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 200, + "quantity": 47, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 73, + "quantity": 232, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 242, + "quantity": 160, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 112, + "quantity": 90, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 122, + "quantity": 108, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 250, + "quantity": 206, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 196, + "quantity": 138, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 155, + "quantity": 190, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 16, + "quantity": 103, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 242, + "quantity": 22, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 38, + "quantity": 187, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 169, + "quantity": 77, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 105, + "quantity": 78, "unit": "lovelace" }, "address": "" - }, + } + ] + }, + { + "metadata": { + "18": { + "string": "" + } + }, + "payments": [ { "amount": { - "quantity": 48, + "quantity": 75, "unit": "lovelace" }, "address": "" - }, + } + ] + }, + { + "withdrawal": "self", + "metadata": { + "4": { + "int": 0 + } + }, + "payments": [ { "amount": { - "quantity": 102, + "quantity": 165, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 6, + "quantity": 24, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 24, + "quantity": 84, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 87, + "quantity": 59, "unit": "lovelace" }, "address": "" - } - ] - }, - { - "metadata": { - "24": "0x602cad7a0528cd75d42e3325375065b2381728f95108c6443d341a05baf401cc135f5626660d7745627a39172924161b" - }, - "payments": [ + }, { "amount": { - "quantity": 56, + "quantity": 50, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 190, + "quantity": 123, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 140, + "quantity": 240, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 89, + "quantity": 35, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 241, + "quantity": 30, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 234, + "quantity": 51, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 36, + "quantity": 22, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 87, + "quantity": 130, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 69, + "quantity": 117, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 216, + "quantity": 178, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 64, + "quantity": 178, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 255, + "quantity": 40, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 61, + "quantity": 113, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 96, + "quantity": 46, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 132, + "quantity": 139, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 206, + "quantity": 167, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 116, + "quantity": 172, "unit": "lovelace" }, "address": "" - } - ] - }, - { - "withdrawal": "self", - "metadata": { - "16": { - "f^z": [], - "s": [ - "", - [] - ], - "5$": "0x1ffe4228c2c90477427a4b5f3a605701157728f805da7ef34b7f053f753d4928451828686a731238386b6b" - } - }, - "payments": [ + }, { "amount": { - "quantity": 143, + "quantity": 176, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 174, + "quantity": 142, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 178, + "quantity": 75, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 10, + "quantity": 52, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 238, + "quantity": 169, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 200, + "quantity": 35, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 91, + "quantity": 38, "unit": "lovelace" }, "address": "" @@ -573,129 +579,148 @@ ] }, { + "metadata": { + "18": { + "int": 0 + } + }, "payments": [ { "amount": { - "quantity": 91, + "quantity": 226, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 115, + "quantity": 35, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 62, + "quantity": 165, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 199, + "quantity": 74, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 93, + "quantity": 230, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 59, + "quantity": 137, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 197, + "quantity": 6, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 197, + "quantity": 207, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 111, + "quantity": 59, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 131, + "quantity": 228, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 173, + "quantity": 165, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 223, + "quantity": 87, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 204, + "quantity": 24, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 90, + "quantity": 34, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 64, + "quantity": 78, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 171, + "quantity": 31, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 176, + "quantity": 150, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 195, + "quantity": 221, + "unit": "lovelace" + }, + "address": "" + }, + { + "amount": { + "quantity": 2, + "unit": "lovelace" + }, + "address": "" + }, + { + "amount": { + "quantity": 175, "unit": "lovelace" }, "address": "" @@ -705,273 +730,250 @@ { "withdrawal": "self", "metadata": { - "10": [ - {}, - [ - [ - "❎" - ] - ] - ] + "20": { + "int": 0 + } }, "payments": [ { "amount": { - "quantity": 252, + "quantity": 159, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 140, + "quantity": 162, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 187, + "quantity": 39, "unit": "lovelace" }, "address": "" - }, + } + ] + }, + { + "withdrawal": "self", + "payments": [ { "amount": { - "quantity": 59, + "quantity": 51, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 242, + "quantity": 173, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 54, + "quantity": 36, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 229, + "quantity": 139, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 253, + "quantity": 52, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 54, + "quantity": 164, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 178, + "quantity": 217, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 154, + "quantity": 30, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 106, + "quantity": 29, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 74, + "quantity": 156, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 252, + "quantity": 129, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 249, + "quantity": 162, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 65, + "quantity": 149, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 115, + "quantity": 150, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 247, - "unit": "lovelace" - }, - "address": "" - } - ] - }, - { - "withdrawal": "self", - "metadata": { - "27": "0x744e2d036a497aea2922885d43535b1a0d651b1d3d49264632e17c0a0626643302d13a1a52416c54094a9aea4174" - }, - "payments": [ - { - "amount": { - "quantity": 242, + "quantity": 34, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 51, + "quantity": 120, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 164, + "quantity": 115, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 50, + "quantity": 208, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 118, + "quantity": 225, "unit": "lovelace" }, "address": "" - } - ] - }, - { - "withdrawal": "self", - "metadata": { - "30": 0 - }, - "payments": [ + }, { "amount": { - "quantity": 235, + "quantity": 141, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 228, + "quantity": 22, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 122, + "quantity": 77, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 143, + "quantity": 95, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 43, + "quantity": 206, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 218, + "quantity": 158, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 83, + "quantity": 112, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 221, + "quantity": 216, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 76, + "quantity": 228, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 150, + "quantity": 151, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 112, + "quantity": 233, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 131, + "quantity": 127, "unit": "lovelace" }, "address": "" @@ -979,315 +981,319 @@ ] }, { + "withdrawal": "self", "metadata": { - "21": "" + "15": { + "map": [] + } }, "payments": [ { "amount": { - "quantity": 226, + "quantity": 93, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 229, + "quantity": 206, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 184, + "quantity": 160, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 181, + "quantity": 72, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 6, + "quantity": 90, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 185, + "quantity": 123, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 216, + "quantity": 219, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 14, + "quantity": 118, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 112, + "quantity": 30, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 225, + "quantity": 107, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 235, + "quantity": 124, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 110, + "quantity": 208, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 186, + "quantity": 2, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 236, + "quantity": 130, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 14, + "quantity": 202, "unit": "lovelace" }, "address": "" - } - ] - }, - { - "withdrawal": "self", - "metadata": { - "7": [] - }, - "payments": [ + }, { "amount": { - "quantity": 29, + "quantity": 241, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 239, + "quantity": 58, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 3, + "quantity": 79, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 35, + "quantity": 68, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 92, + "quantity": 182, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 235, + "quantity": 127, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 164, + "quantity": 173, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 196, + "quantity": 18, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 34, + "quantity": 139, "unit": "lovelace" }, "address": "" - }, + } + ] + }, + { + "metadata": { + "28": { + "int": 0 + } + }, + "payments": [ { "amount": { - "quantity": 117, + "quantity": 194, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 145, + "quantity": 178, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 133, + "quantity": 207, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 93, + "quantity": 91, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 98, + "quantity": 206, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 147, + "quantity": 55, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 158, + "quantity": 44, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 68, + "quantity": 239, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 88, + "quantity": 135, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 39, + "quantity": 30, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 241, + "quantity": 170, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 159, + "quantity": 255, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 204, + "quantity": 2, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 230, + "quantity": 206, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 13, + "quantity": 232, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 155, + "quantity": 99, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 165, + "quantity": 203, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 129, + "quantity": 152, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 16, + "quantity": 113, "unit": "lovelace" }, "address": "" diff --git a/lib/core/test/unit/Cardano/Wallet/Gen.hs b/lib/core/test/unit/Cardano/Wallet/Gen.hs index 80868d6ee5d..e8b5213f0a7 100644 --- a/lib/core/test/unit/Cardano/Wallet/Gen.hs +++ b/lib/core/test/unit/Cardano/Wallet/Gen.hs @@ -27,9 +27,11 @@ import Prelude import Cardano.Address.Derivation ( xpubFromBytes ) import Cardano.Api.MetaData - ( jsonToMetadata ) -import Cardano.Api.Typed - ( TxMetadata (..) ) + ( TxMetadata (..) + , TxMetadataJsonSchema (..) + , TxMetadataValue (..) + , metadataFromJson + ) import Cardano.Mnemonic ( ConsistentEntropy, EntropySize, Mnemonic, entropyToMnemonic ) import Cardano.Wallet.Primitive.Types @@ -62,8 +64,6 @@ import Data.Word ( Word, Word32 ) import GHC.TypeLits ( natVal ) -import Shelley.Spec.Ledger.MetaData - ( MetaData, MetaDatum ) import Test.QuickCheck ( Arbitrary (..) , Gen @@ -91,7 +91,6 @@ import qualified Data.HashMap.Strict as HM import qualified Data.Map as Map import qualified Data.Text as T import qualified Data.Text.Encoding as T -import qualified Shelley.Spec.Ledger.MetaData as MD -- | Generates an arbitrary mnemonic of a size according to the type parameter. -- @@ -214,28 +213,25 @@ genTxMetadata = do d <- scale (`mod` maxBreadth) $ listOf1 (sizedMetadataValue maxDepth) i <- vectorOf @Word (length d) arbitrary let json = toJSON $ HM.fromList $ zip i d - case jsonToMetadata json of + case metadataFromJson TxMetadataJsonNoSchema json of Left e -> fail $ show e <> ": " <> show (Aeson.encode json) Right metadata -> pure metadata shrinkTxMetadata :: TxMetadata -> [TxMetadata] -shrinkTxMetadata (TxMetadata m) = TxMetadata <$> shrinkMetaData m - -shrinkMetaData :: MetaData -> [MetaData] -shrinkMetaData (MD.MetaData m) = MD.MetaData . Map.fromList - <$> shrinkList shrinkMetaDataEntry (Map.toList m) +shrinkTxMetadata (TxMetadata m) = TxMetadata . Map.fromList + <$> shrinkList shrinkTxMetadataEntry (Map.toList m) where - shrinkMetaDataEntry (k, v) = (k,) <$> shrinkMetaDatum v + shrinkTxMetadataEntry (k, v) = (k,) <$> shrinkTxMetadataValue v -shrinkMetaDatum :: MetaDatum -> [MetaDatum] -shrinkMetaDatum (MD.Map xs) = - MD.Map . sortOn fst . nubOn fst <$> shrinkList shrinkPair xs +shrinkTxMetadataValue :: TxMetadataValue -> [TxMetadataValue] +shrinkTxMetadataValue (TxMetaMap xs) = + TxMetaMap . sortOn fst . nubOn fst <$> shrinkList shrinkPair xs where shrinkPair (k,v) = - ((k,) <$> shrinkMetaDatum v) ++ - ((,v) <$> shrinkMetaDatum k) -shrinkMetaDatum (MD.List xs) = - MD.List <$> filter (not . null) (shrinkList shrinkMetaDatum xs) -shrinkMetaDatum (MD.I i) = MD.I <$> shrink i -shrinkMetaDatum (MD.B b) = MD.B <$> shrinkByteString b -shrinkMetaDatum (MD.S s) = MD.S <$> shrinkText s + ((k,) <$> shrinkTxMetadataValue v) ++ + ((,v) <$> shrinkTxMetadataValue k) +shrinkTxMetadataValue (TxMetaList xs) = + TxMetaList <$> filter (not . null) (shrinkList shrinkTxMetadataValue xs) +shrinkTxMetadataValue (TxMetaNumber i) = TxMetaNumber <$> shrink i +shrinkTxMetadataValue (TxMetaBytes b) = TxMetaBytes <$> shrinkByteString b +shrinkTxMetadataValue (TxMetaText s) = TxMetaText <$> shrinkText s diff --git a/lib/core/test/unit/Cardano/Wallet/Primitive/TypesSpec.hs b/lib/core/test/unit/Cardano/Wallet/Primitive/TypesSpec.hs index f10c76af298..21788cccafd 100644 --- a/lib/core/test/unit/Cardano/Wallet/Primitive/TypesSpec.hs +++ b/lib/core/test/unit/Cardano/Wallet/Primitive/TypesSpec.hs @@ -81,6 +81,7 @@ import Cardano.Wallet.Primitive.Types , TxIn (..) , TxMeta (..) , TxMetadata (..) + , TxMetadataValue (..) , TxOut (..) , TxStatus (..) , UTxO (..) @@ -204,7 +205,6 @@ import qualified Data.Map import qualified Data.Map.Strict as Map import qualified Data.Set as Set import qualified Data.Text as T -import qualified Shelley.Spec.Ledger.MetaData as MD spec :: Spec spec = do @@ -266,14 +266,14 @@ spec = do "+13.371442 in ledger since 140#1" === pretty @_ @Text txMeta it "TxMetadata" $ do - let md = TxMetadata $ MD.MetaData $ Data.Map.fromList - [ (1, MD.I 1) - , (2, MD.S "cześć") - , (3, MD.B (BS.pack [222,173,190,239])) - , (10, MD.List [ MD.S "a", MD.I 65 ]) - , (20, MD.Map - [ ( MD.S "key", MD.List [MD.S "v0", MD.S "v1"] ) - , ( MD.I 0, MD.S "value" ) ]) + let md = TxMetadata $ Data.Map.fromList + [ (1, TxMetaNumber 1) + , (2, TxMetaText "cześć") + , (3, TxMetaBytes (BS.pack [222,173,190,239])) + , (10, TxMetaList [ TxMetaText "a", TxMetaNumber 65 ]) + , (20, TxMetaMap + [ ( TxMetaText "key", TxMetaList [TxMetaText "v0", TxMetaText "v1"] ) + , ( TxMetaNumber 0, TxMetaText "value" ) ]) ] pretty md `shouldBe` unlines [ "element 1: 1" diff --git a/lib/shelley/src/Cardano/Wallet/Byron/Compatibility.hs b/lib/shelley/src/Cardano/Wallet/Byron/Compatibility.hs index 61a1d7bdb8c..631c645b74b 100644 --- a/lib/shelley/src/Cardano/Wallet/Byron/Compatibility.hs +++ b/lib/shelley/src/Cardano/Wallet/Byron/Compatibility.hs @@ -111,8 +111,6 @@ import Ouroboros.Consensus.Byron.Ledger ( ByronBlock (..), ByronHash (..), GenTx, fromMempoolPayload ) import Ouroboros.Consensus.Byron.Ledger.Config ( CodecConfig (..) ) -import Ouroboros.Consensus.Config.SecurityParam - ( SecurityParam (..) ) import Ouroboros.Consensus.HardFork.History.Summary ( Bound (..) ) import Ouroboros.Network.Block @@ -319,10 +317,8 @@ toGenTx = . W.getSealedTx byronCodecConfig :: W.GenesisParameters -> CodecConfig ByronBlock -byronCodecConfig W.GenesisParameters{getEpochLength,getEpochStability} = - ByronCodecConfig (toEpochSlots getEpochLength) (SecurityParam k) - where - k = fromIntegral . getQuantity $ getEpochStability +byronCodecConfig W.GenesisParameters{getEpochLength} = + ByronCodecConfig (toEpochSlots getEpochLength) fromByronBlock :: W.GenesisParameters -> ByronBlock -> W.Block fromByronBlock gp byronBlk = case byronBlockRaw byronBlk of @@ -351,10 +347,8 @@ toByronBlockHeader gp blk = W.BlockHeader fromByronHash $ O.blockHash blk , parentHeaderHash = fromChainHash (W.getGenesisBlockHash gp) $ - headerPrevHash cfg (O.getHeader blk) + headerPrevHash (O.getHeader blk) } - where - cfg = byronCodecConfig gp fromTxAux :: TxAux -> W.Tx fromTxAux txAux = case taTx txAux of diff --git a/lib/shelley/src/Cardano/Wallet/Shelley.hs b/lib/shelley/src/Cardano/Wallet/Shelley.hs index 91800eec941..dfa01000f19 100644 --- a/lib/shelley/src/Cardano/Wallet/Shelley.hs +++ b/lib/shelley/src/Cardano/Wallet/Shelley.hs @@ -121,7 +121,7 @@ import Cardano.Wallet.Registry import Cardano.Wallet.Shelley.Api.Server ( server ) import Cardano.Wallet.Shelley.Compatibility - ( CardanoBlock, TPraosStandardCrypto, fromCardanoBlock ) + ( CardanoBlock, StandardCrypto, fromCardanoBlock ) import Cardano.Wallet.Shelley.Network ( NetworkLayerLog, withNetworkLayer ) import Cardano.Wallet.Shelley.Pools @@ -338,7 +338,7 @@ serveWallet withPoolsMonitoring :: Maybe FilePath -> GenesisParameters - -> NetworkLayer IO t (CardanoBlock TPraosStandardCrypto) + -> NetworkLayer IO t (CardanoBlock StandardCrypto) -> (StakePoolLayer -> IO a) -> IO a withPoolsMonitoring dir gp nl action = @@ -371,7 +371,7 @@ serveWallet , WalletKey k ) => TransactionLayer t k - -> NetworkLayer IO t (CardanoBlock TPraosStandardCrypto) + -> NetworkLayer IO t (CardanoBlock StandardCrypto) -> (WorkerCtx (ApiLayer s t k) -> WalletId -> IO ()) -> IO (ApiLayer s t k) apiLayer tl nl coworker = do @@ -468,7 +468,7 @@ data Tracers' f = Tracers , poolsEngineTracer :: f (WorkerLog Text StakePoolLog) , poolsDbTracer :: f PoolDbLog , ntpClientTracer :: f NtpTrace - , networkTracer :: f (NetworkLayerLog TPraosStandardCrypto) + , networkTracer :: f NetworkLayerLog } -- | All of the Shelley 'Tracer's. diff --git a/lib/shelley/src/Cardano/Wallet/Shelley/Compatibility.hs b/lib/shelley/src/Cardano/Wallet/Shelley/Compatibility.hs index 0d6f03d02c4..e3ef8a0f938 100644 --- a/lib/shelley/src/Cardano/Wallet/Shelley/Compatibility.hs +++ b/lib/shelley/src/Cardano/Wallet/Shelley/Compatibility.hs @@ -27,7 +27,8 @@ module Cardano.Wallet.Shelley.Compatibility , CardanoBlock , NodeVersionData - , TPraosStandardCrypto + , StandardCrypto + , StandardShelley -- * Chain Parameters , mainnetVersionData @@ -104,6 +105,8 @@ import Cardano.Binary ( fromCBOR, serialize' ) import Cardano.Crypto.Hash.Class ( Hash (UnsafeHash), hashToBytes ) +import Cardano.Ledger.Era + ( Era (..) ) import Cardano.Slotting.Slot ( EpochNo (..), EpochSize (..) ) import Cardano.Wallet.Api.Types @@ -184,11 +187,11 @@ import Ouroboros.Consensus.HardFork.Combinator.AcrossEras import Ouroboros.Consensus.HardFork.History.Summary ( Bound (..) ) import Ouroboros.Consensus.Shelley.Ledger - ( Crypto, ShelleyHash (..) ) + ( ShelleyHash (..) ) import Ouroboros.Consensus.Shelley.Ledger.Block ( ShelleyBlock (..) ) import Ouroboros.Consensus.Shelley.Protocol.Crypto - ( TPraosStandardCrypto ) + ( StandardCrypto, StandardShelley ) import Ouroboros.Network.Block ( BlockNo (..) , ChainHash @@ -217,6 +220,8 @@ import Type.Reflection import qualified Cardano.Api.Typed as Cardano import qualified Cardano.Byron.Codec.Cbor as CBOR import qualified Cardano.Chain.Common as Byron +import qualified Cardano.Ledger.Crypto as SL +import qualified Cardano.Ledger.Shelley as SL import qualified Cardano.Wallet.Primitive.Types as W import qualified Codec.Binary.Bech32 as Bech32 import qualified Codec.Binary.Bech32.TH as Bech32 @@ -231,17 +236,14 @@ import qualified Ouroboros.Consensus.Shelley.Ledger as O import qualified Ouroboros.Network.Block as O import qualified Ouroboros.Network.Point as Point import qualified Shelley.Spec.Ledger.Address as SL +import qualified Shelley.Spec.Ledger.API as SL import qualified Shelley.Spec.Ledger.BaseTypes as SL import qualified Shelley.Spec.Ledger.BlockChain as SL -import qualified Shelley.Spec.Ledger.Coin as SL import qualified Shelley.Spec.Ledger.Credential as SL import qualified Shelley.Spec.Ledger.Delegation.Certificates as SL import qualified Shelley.Spec.Ledger.Genesis as SL import qualified Shelley.Spec.Ledger.Keys as SL -import qualified Shelley.Spec.Ledger.PParams as SL -import qualified Shelley.Spec.Ledger.Scripts as SL -import qualified Shelley.Spec.Ledger.Tx as SL -import qualified Shelley.Spec.Ledger.TxData as SL +import qualified Shelley.Spec.Ledger.MetaData as SL import qualified Shelley.Spec.Ledger.UTxO as SL -------------------------------------------------------------------------------- @@ -341,9 +343,9 @@ toPoint genesisH (W.BlockHeader sl _ (W.Hash h) _) | otherwise = O.BlockPoint sl (OneEraHash $ toShort h) toCardanoBlockHeader - :: O.Crypto sc + :: forall c. Era (SL.Shelley c) => W.GenesisParameters - -> CardanoBlock sc + -> CardanoBlock c -> W.BlockHeader toCardanoBlockHeader gp = \case BlockByron blk -> @@ -352,9 +354,9 @@ toCardanoBlockHeader gp = \case toShelleyBlockHeader (W.getGenesisBlockHash gp) blk toShelleyBlockHeader - :: O.Crypto sc + :: Era e => W.Hash "Genesis" - -> ShelleyBlock sc + -> ShelleyBlock e -> W.BlockHeader toShelleyBlockHeader genesisHash blk = let @@ -372,14 +374,14 @@ toShelleyBlockHeader genesisHash blk = SL.bheaderPrev header } -getProducer :: O.Crypto sc => ShelleyBlock sc -> W.PoolId +getProducer :: Era e => ShelleyBlock e -> W.PoolId getProducer (ShelleyBlock (SL.Block (SL.BHeader header _) _) _) = fromPoolKeyHash $ SL.hashKey (SL.bheaderVk header) fromCardanoBlock - :: O.Crypto sc + :: Era (SL.Shelley c) => W.GenesisParameters - -> CardanoBlock sc + -> CardanoBlock c -> W.Block fromCardanoBlock gp = \case BlockByron blk -> @@ -398,8 +400,8 @@ fromCardanoBlock gp = \case } poolCertsFromShelleyBlock - :: O.Crypto sc - => ShelleyBlock sc + :: Era e + => ShelleyBlock e -> (W.SlotNo, [W.PoolCertificate]) poolCertsFromShelleyBlock blk = let @@ -433,7 +435,7 @@ fromChainHash genesisHash = \case fromShelleyChainHash :: W.Hash "Genesis" - -> ChainHash (ShelleyBlock sc) + -> ChainHash (ShelleyBlock e) -> W.Hash "BlockHeader" fromShelleyChainHash genesisHash = \case O.GenesisHash -> coerce genesisHash @@ -478,7 +480,7 @@ fromMaxTxSize :: Natural -> Quantity "byte" Word16 fromMaxTxSize = Quantity . fromIntegral -fromShelleyPParams :: Maybe Bound -> SL.PParams -> W.ProtocolParameters +fromShelleyPParams :: Maybe Bound -> SL.PParams (SL.Shelley c) -> W.ProtocolParameters fromShelleyPParams bound pp = W.ProtocolParameters { decentralizationLevel = decentralizationLevelFromPParams pp @@ -514,7 +516,7 @@ fromShelleyPParams bound pp = W.ProtocolParameters -- convert it into a percentage. -- decentralizationLevelFromPParams - :: SL.PParams + :: SL.PParams (SL.Shelley c) -> W.DecentralizationLevel decentralizationLevelFromPParams pp = W.DecentralizationLevel $ fromUnitInterval @@ -524,7 +526,7 @@ decentralizationLevelFromPParams pp = d = SL._d pp txParametersFromPParams - :: SL.PParams + :: SL.PParams (SL.Shelley c) -> W.TxParameters txParametersFromPParams pp = W.TxParameters { getFeePolicy = W.LinearFee @@ -541,20 +543,20 @@ txParametersFromPParams pp = W.TxParameters coinToDouble (SL.Coin c) = fromIntegral c desiredNumberOfStakePoolsFromPParams - :: SL.PParams + :: SL.PParams (SL.Shelley c) -> Word16 desiredNumberOfStakePoolsFromPParams pp = fromIntegral (SL._nOpt pp) minimumUTxOvalueFromPParams - :: SL.PParams + :: SL.PParams (SL.Shelley c) -> W.Coin minimumUTxOvalueFromPParams pp = toWalletCoin $ SL._minUTxOValue pp -- | Convert genesis data into blockchain params and an initial set of UTxO fromGenesisData - :: forall crypto. (O.Crypto crypto) - => ShelleyGenesis crypto - -> [(SL.Addr crypto, SL.Coin)] + :: forall e crypto. (Era e, e ~ SL.Shelley crypto) + => ShelleyGenesis e + -> [(SL.Addr e, SL.Coin)] -> (W.NetworkParameters, W.Block) fromGenesisData g initialFunds = ( W.NetworkParameters @@ -590,8 +592,7 @@ fromGenesisData g initialFunds = -- 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 e, SL.Coin)] -> W.Block genesisBlockFromTxOuts outs = W.Block { delegations = [] , header = W.BlockHeader @@ -615,7 +616,7 @@ fromGenesisData g initialFunds = Nothing where W.TxIn pseudoHash _ = fromShelleyTxIn $ - SL.initialFundsPseudoTxIn @crypto addr + SL.initialFundsPseudoTxIn @e addr fromNetworkMagic :: NetworkMagic -> W.ProtocolMagic fromNetworkMagic (NetworkMagic magic) = @@ -645,7 +646,7 @@ fromNonMyopicMemberRewards = . Map.mapKeys (bimap fromShelleyCoin fromStakeCredential) . O.unNonMyopicMemberRewards -optimumNumberOfPools :: SL.PParams -> Int +optimumNumberOfPools :: SL.PParams (SL.Shelley c) -> Int optimumNumberOfPools = unsafeConvert . SL._nOpt where -- A value of ~100 can be expected, so should be fine. @@ -659,18 +660,18 @@ optimumNumberOfPools = unsafeConvert . SL._nOpt fromShelleyTxId :: SL.TxId crypto -> W.Hash "Tx" fromShelleyTxId (SL.TxId (UnsafeHash h)) = W.Hash $ fromShort h -fromShelleyTxIn :: Crypto crypto => SL.TxIn crypto -> W.TxIn +fromShelleyTxIn :: Era e => SL.TxIn e -> W.TxIn fromShelleyTxIn (SL.TxIn txid ix) = W.TxIn (fromShelleyTxId txid) (unsafeCast ix) where unsafeCast :: Natural -> Word32 unsafeCast = fromIntegral -fromShelleyTxOut :: Crypto crypto => SL.TxOut crypto -> W.TxOut +fromShelleyTxOut :: Era e => SL.TxOut e -> W.TxOut fromShelleyTxOut (SL.TxOut addr amount) = W.TxOut (fromShelleyAddress addr) (fromShelleyCoin amount) -fromShelleyAddress :: SL.Addr crypto -> W.Address +fromShelleyAddress :: SL.Addr e -> W.Address fromShelleyAddress = W.Address . SL.serialiseAddr @@ -689,8 +690,8 @@ toShelleyCoin (W.Coin c) = SL.Coin $ safeCast c -- NOTE: For resolved inputs we have to pass in a dummy value of 0. fromShelleyTx - :: Crypto crypto - => SL.Tx crypto + :: Era e + => SL.Tx e -> ( W.Tx , [W.DelegationCertificate] , [W.PoolCertificate] @@ -701,7 +702,7 @@ fromShelleyTx (SL.Tx bod@(SL.TxBody ins outs certs wdrls _ _ _ _) _ mmd) = (map ((,W.Coin 0) . fromShelleyTxIn) (toList ins)) (map fromShelleyTxOut (toList outs)) (fromShelleyWdrl wdrls) - (Cardano.TxMetadata <$> SL.strictMaybeToMaybe mmd) + (fromShelleyMetadata <$> SL.strictMaybeToMaybe mmd) , mapMaybe fromShelleyDelegationCert (toList certs) , mapMaybe fromShelleyRegistrationCert (toList certs) ) @@ -710,6 +711,18 @@ fromShelleyWdrl :: SL.Wdrl crypto -> Map W.ChimericAccount W.Coin fromShelleyWdrl (SL.Wdrl wdrl) = Map.fromList $ bimap (fromStakeCredential . SL.getRwdCred) fromShelleyCoin <$> Map.toList wdrl +fromShelleyMetadata :: SL.MetaData -> Cardano.TxMetadata +fromShelleyMetadata (SL.MetaData md) = Cardano.makeTransactionMetadata md' + where + md' = fmap convert md + convert :: SL.MetaDatum -> Cardano.TxMetadataValue + convert = \case + SL.I n -> Cardano.TxMetaNumber n + SL.B bs -> Cardano.TxMetaBytes bs + SL.S s -> Cardano.TxMetaText s + SL.Map as -> Cardano.TxMetaMap (bimap convert convert <$> as) + SL.List xs -> Cardano.TxMetaList (map convert xs) + -- Convert & filter Shelley certificate into delegation certificate. Returns -- 'Nothing' if certificates aren't delegation certificate. fromShelleyDelegationCert @@ -819,7 +832,7 @@ toByronNetworkMagic pm@(W.ProtocolMagic magic) = -- | SealedTx are the result of rightfully constructed shelley transactions so, it -- is relatively safe to unserialize them from CBOR. unsealShelleyTx - :: (HasCallStack, Crypto c) + :: (HasCallStack, Era (SL.Shelley c)) => W.SealedTx -> CardanoGenTx c unsealShelleyTx = GenTxShelley @@ -946,7 +959,7 @@ _decodeStakeAddress _decodeStakeAddress serverNetwork txt = do (_, dp) <- left (const errBech32) $ Bech32.decodeLenient txt bytes <- maybe (Left errBech32) Right $ dataPartToBytes dp - rewardAcnt <- runGetOrFail' (SL.getRewardAcnt @TPraosStandardCrypto) bytes + rewardAcnt <- runGetOrFail' (SL.getRewardAcnt @(SL.Shelley StandardCrypto)) bytes guardNetwork (SL.getRwdNetwork rewardAcnt) serverNetwork @@ -1002,7 +1015,7 @@ _decodeAddress _decodeAddress serverNetwork text = case tryBase16 <|> tryBech32 <|> tryBase58 of Just bytes -> - decodeShelleyAddress bytes + decodeShelleyAddress @StandardCrypto bytes _ -> Left $ TextDecodingError "Unrecognized address encoding: must be either bech32, base58 or base16" @@ -1023,9 +1036,9 @@ _decodeAddress serverNetwork text = tryBase16 = either (const Nothing) Just $ convertFromBase Base16 (T.encodeUtf8 text) - decodeShelleyAddress :: ByteString -> Either TextDecodingError W.Address + decodeShelleyAddress :: forall c. (SL.Crypto c) => ByteString -> Either TextDecodingError W.Address decodeShelleyAddress bytes = do - case SL.deserialiseAddr @TPraosStandardCrypto bytes of + case SL.deserialiseAddr @(SL.Shelley c) bytes of Just (SL.Addr addrNetwork _ _) -> do guardNetwork addrNetwork serverNetwork pure (W.Address bytes) diff --git a/lib/shelley/src/Cardano/Wallet/Shelley/Launch.hs b/lib/shelley/src/Cardano/Wallet/Shelley/Launch.hs index b049c5b6a00..c20cd4c7898 100644 --- a/lib/shelley/src/Cardano/Wallet/Shelley/Launch.hs +++ b/lib/shelley/src/Cardano/Wallet/Shelley/Launch.hs @@ -90,7 +90,7 @@ import Cardano.Wallet.Primitive.Types import Cardano.Wallet.Shelley ( SomeNetworkDiscriminant (..) ) import Cardano.Wallet.Shelley.Compatibility - ( NodeVersionData ) + ( NodeVersionData, StandardShelley ) import Cardano.Wallet.Unsafe ( unsafeFromHex, unsafeRunExceptT ) import Control.Arrow @@ -151,8 +151,6 @@ import Options.Applicative ( Parser, flag', help, long, metavar, (<|>) ) import Ouroboros.Consensus.Shelley.Node ( sgNetworkMagic ) -import Ouroboros.Consensus.Shelley.Protocol - ( TPraosStandardCrypto ) import Ouroboros.Network.Magic ( NetworkMagic (..) ) import Ouroboros.Network.NodeToClient @@ -824,7 +822,7 @@ genConfig dir severity systemStart = do ---- -- Parameters shelleyGenesis <- Yaml.decodeFileThrow - @_ @(ShelleyGenesis TPraosStandardCrypto) shelleyGenesisFile + @_ @(ShelleyGenesis StandardShelley) shelleyGenesisFile let networkMagic = sgNetworkMagic shelleyGenesis let shelleyParams = fst $ Shelley.fromGenesisData shelleyGenesis [] let versionData = diff --git a/lib/shelley/src/Cardano/Wallet/Shelley/Network.hs b/lib/shelley/src/Cardano/Wallet/Shelley/Network.hs index 28ea55d9a4e..6988e9af24d 100644 --- a/lib/shelley/src/Cardano/Wallet/Shelley/Network.hs +++ b/lib/shelley/src/Cardano/Wallet/Shelley/Network.hs @@ -60,7 +60,7 @@ import Cardano.Wallet.Primitive.Slotting ( TimeInterpreter, mkTimeInterpreter ) import Cardano.Wallet.Shelley.Compatibility ( Shelley - , TPraosStandardCrypto + , StandardCrypto , fromCardanoHash , fromChainHash , fromNonMyopicMemberRewards @@ -181,12 +181,8 @@ import Ouroboros.Consensus.Network.NodeToClient ( ClientCodecs, Codecs' (..), DefaultCodecs, clientCodecs, defaultCodecs ) import Ouroboros.Consensus.Node.NetworkProtocolVersion ( HasNetworkProtocolVersion (..), SupportedNetworkProtocolVersion (..) ) -import Ouroboros.Consensus.Shelley.Ledger - ( Crypto ) import Ouroboros.Consensus.Shelley.Ledger.Config ( CodecConfig (..) ) -import Ouroboros.Consensus.Shelley.Protocol - ( TPraosCrypto ) import Ouroboros.Network.Block ( Point , SlotNo (..) @@ -253,6 +249,7 @@ import Ouroboros.Network.Protocol.LocalTxSubmission.Type import System.IO.Error ( isDoesNotExistError ) +import qualified Cardano.Ledger.Shelley as SL import qualified Cardano.Wallet.Primitive.Types as W import qualified Codec.CBOR.Term as CBOR import qualified Data.Map as Map @@ -272,13 +269,13 @@ import qualified Shelley.Spec.Ledger.LedgerState as SL -- stateful and the node's keep track of the associated connection's cursor. data instance Cursor (m Shelley) = Cursor (Async ()) - (Point (CardanoBlock TPraosStandardCrypto)) - (TQueue m (ChainSyncCmd (CardanoBlock TPraosStandardCrypto) m)) + (Point (CardanoBlock StandardCrypto)) + (TQueue m (ChainSyncCmd (CardanoBlock StandardCrypto) m)) -- | Create an instance of the network layer withNetworkLayer - :: forall sc a. (HasCallStack, sc ~ TPraosStandardCrypto) - => Tracer IO (NetworkLayerLog sc) + :: HasCallStack + => Tracer IO NetworkLayerLog -- ^ Logging of network layer startup -> W.NetworkParameters -- ^ Initial blockchain parameters @@ -286,7 +283,7 @@ withNetworkLayer -- ^ Socket for communicating with the node -> (NodeToClientVersionData, CodecCBORTerm Text NodeToClientVersionData) -- ^ Codecs for the node's client - -> (NetworkLayer IO (IO Shelley) (CardanoBlock sc) -> IO a) + -> (NetworkLayer IO (IO Shelley) (CardanoBlock StandardCrypto) -> IO a) -- ^ Callback function with the network layer -> IO a withNetworkLayer tr np addrInfo versionData action = do @@ -349,12 +346,12 @@ withNetworkLayer tr np addrInfo versionData action = do connectNodeTipClient :: HasCallStack => RetryHandlers - -> IO ( Chan (Tip (CardanoBlock TPraosStandardCrypto)) + -> IO ( Chan (Tip (CardanoBlock StandardCrypto)) , TVar IO W.ProtocolParameters - , TMVar IO (CardanoInterpreter TPraosStandardCrypto) + , TMVar IO (CardanoInterpreter StandardCrypto) , TQueue IO (LocalTxSubmissionCmd - (GenTx (CardanoBlock TPraosStandardCrypto)) - (CardanoApplyTxErr TPraosStandardCrypto) + (GenTx (CardanoBlock StandardCrypto)) + (CardanoApplyTxErr StandardCrypto) IO) ) connectNodeTipClient handlers = do @@ -374,7 +371,7 @@ withNetworkLayer tr np addrInfo versionData action = do :: HasCallStack => RetryHandlers -> IO (TQueue IO - (LocalStateQueryCmd (CardanoBlock TPraosStandardCrypto) IO)) + (LocalStateQueryCmd (CardanoBlock StandardCrypto) IO)) connectDelegationRewardsClient handlers = do cmdQ <- atomically newTQueue let cl = mkDelegationRewardsClient tr cfg cmdQ @@ -529,11 +526,11 @@ type NetworkClient m = OuroborosApplication -- | Construct a network client with the given communication channel, for the -- purposes of syncing blocks to a single wallet. mkWalletClient - :: (MonadThrow m, MonadST m, MonadTimer m, MonadAsync m, Crypto sc, TPraosCrypto sc) + :: (MonadThrow m, MonadST m, MonadTimer m, MonadAsync m) => Tracer m (ChainSyncLog Text Text) -> W.GenesisParameters -- ^ Static blockchain parameters - -> TQueue m (ChainSyncCmd (CardanoBlock sc) m) + -> TQueue m (ChainSyncCmd (CardanoBlock StandardCrypto) m) -- ^ Communication channel with the ChainSync client -> m (NetworkClient m) mkWalletClient tr gp chainSyncQ = do @@ -569,11 +566,11 @@ mkWalletClient tr gp chainSyncQ = do -- | Construct a network client with the given communication channel, for the -- purposes of querying delegations and rewards. mkDelegationRewardsClient - :: forall sc m. (MonadThrow m, MonadST m, MonadTimer m, TPraosCrypto sc) - => Tracer m (NetworkLayerLog sc) + :: forall m. (MonadThrow m, MonadST m, MonadTimer m) + => Tracer m NetworkLayerLog -- ^ Base trace for underlying protocols - -> CodecConfig (CardanoBlock sc) - -> TQueue m (LocalStateQueryCmd (CardanoBlock sc) m) + -> CodecConfig (CardanoBlock StandardCrypto) + -> TQueue m (LocalStateQueryCmd (CardanoBlock StandardCrypto) m) -- ^ Communication channel with the LocalStateQuery client -> NetworkClient m mkDelegationRewardsClient tr cfg queryRewardQ = @@ -603,26 +600,26 @@ mkDelegationRewardsClient tr cfg queryRewardQ = nodeToClientVersion :: NodeToClientVersion nodeToClientVersion = NodeToClientV_3 -codecVersion :: forall sc. TPraosCrypto sc => BlockNodeToClientVersion (CardanoBlock sc) +codecVersion :: BlockNodeToClientVersion (CardanoBlock StandardCrypto) codecVersion = verMap ! nodeToClientVersion - where verMap = supportedNodeToClientVersions (Proxy @(CardanoBlock sc)) + where verMap = supportedNodeToClientVersions (Proxy @(CardanoBlock StandardCrypto)) -codecConfig :: W.GenesisParameters -> CodecConfig (CardanoBlock sc) +codecConfig :: W.GenesisParameters -> CodecConfig (CardanoBlock c) codecConfig gp = CardanoCodecConfig (byronCodecConfig gp) ShelleyCodecConfig -- | A group of codecs which will deserialise block data. codecs - :: forall m sc. (MonadST m, TPraosCrypto sc) - => CodecConfig (CardanoBlock sc) - -> ClientCodecs (CardanoBlock sc) m + :: MonadST m + => CodecConfig (CardanoBlock StandardCrypto) + -> ClientCodecs (CardanoBlock StandardCrypto) m codecs cfg = clientCodecs cfg codecVersion -- | A group of codecs which won't deserialise block data. Often only the block -- headers are needed. It's more efficient and easier not to deserialise. serialisedCodecs - :: forall m sc. (MonadST m, TPraosCrypto sc) - => CodecConfig (CardanoBlock sc) - -> DefaultCodecs (CardanoBlock sc) m + :: MonadST m + => CodecConfig (CardanoBlock StandardCrypto) + -> DefaultCodecs (CardanoBlock StandardCrypto) m serialisedCodecs cfg = defaultCodecs cfg codecVersion {------------------------------------------------------------------------------- @@ -639,22 +636,22 @@ type CardanoInterpreter sc = Interpreter (CardanoEras sc) -- * Tracking the latest protocol parameters state. -- * Querying the history interpreter as necessary. mkTipSyncClient - :: forall sc m. (HasCallStack, MonadIO m, MonadThrow m, MonadST m, MonadTimer m, TPraosCrypto sc) - => Tracer m (NetworkLayerLog sc) + :: forall m. (HasCallStack, MonadIO m, MonadThrow m, MonadST m, MonadTimer m) + => Tracer m NetworkLayerLog -- ^ Base trace for underlying protocols -> W.NetworkParameters -- ^ Initial blockchain parameters -> TQueue m (LocalTxSubmissionCmd - (GenTx (CardanoBlock sc)) - (CardanoApplyTxErr sc) + (GenTx (CardanoBlock StandardCrypto)) + (CardanoApplyTxErr StandardCrypto) m) -- ^ Communication channel with the LocalTxSubmission client - -> (Tip (CardanoBlock sc) -> m ()) + -> (Tip (CardanoBlock StandardCrypto) -> m ()) -- ^ Notifier callback for when tip changes -> (W.ProtocolParameters -> m ()) -- ^ Notifier callback for when parameters for tip change. - -> (CardanoInterpreter sc -> m ()) + -> (CardanoInterpreter StandardCrypto -> m ()) -- ^ Notifier callback for when time interpreter is updated. -> m (NetworkClient m) mkTipSyncClient tr np localTxSubmissionQ onTipUpdate onPParamsUpdate onInterpreterUpdate = do @@ -667,7 +664,7 @@ mkTipSyncClient tr np localTxSubmissionQ onTipUpdate onPParamsUpdate onInterpret let queryLocalState - :: Point (CardanoBlock sc) + :: Point (CardanoBlock StandardCrypto) -> m () queryLocalState pt = do mb <- timeQryAndLog "GetEraStart" tr $ localStateQueryQ `send` @@ -697,7 +694,7 @@ mkTipSyncClient tr np localTxSubmissionQ onTipUpdate onPParamsUpdate onInterpret handleParamsUpdate :: (Maybe Bound -> p -> W.ProtocolParameters) -> (Maybe Bound) - -> (Either (MismatchEraInfo (CardanoEras sc)) p) + -> (Either (MismatchEraInfo (CardanoEras StandardCrypto)) p) -> m () handleParamsUpdate convert boundM = \case Right ls -> do @@ -706,7 +703,7 @@ mkTipSyncClient tr np localTxSubmissionQ onTipUpdate onPParamsUpdate onInterpret traceWith tr $ MsgLocalStateQueryEraMismatch mismatch queryInterpreter - :: Point (CardanoBlock sc) + :: Point (CardanoBlock StandardCrypto) -> m () queryInterpreter pt = do res <- localStateQueryQ `send` CmdQueryLocalState pt (QueryHardFork GetInterpreter) @@ -722,7 +719,7 @@ mkTipSyncClient tr np localTxSubmissionQ onTipUpdate onPParamsUpdate onInterpret } = W.genesisParameters np cfg = codecConfig gp - onTipUpdate' <- debounce @(Tip (CardanoBlock sc)) @m $ \tip' -> do + onTipUpdate' <- debounce @(Tip (CardanoBlock StandardCrypto)) @m $ \tip' -> do let tip = castTip tip' traceWith tr $ MsgNodeTip $ fromTip getGenesisBlockHash tip @@ -780,19 +777,19 @@ data Observer m key value = Observer } newRewardBalanceFetcher - :: forall sc. Tracer IO (NetworkLayerLog sc) + :: Tracer IO NetworkLayerLog -> W.GenesisParameters -- ^ Used to convert tips for logging - -> TQueue IO (LocalStateQueryCmd (CardanoBlock sc) IO) + -> TQueue IO (LocalStateQueryCmd (CardanoBlock StandardCrypto) IO) -> IO ( Observer IO W.ChimericAccount W.Coin - , Tip (CardanoBlock sc) -> IO () + , Tip (CardanoBlock StandardCrypto) -> IO () -- Call on tip-change to refresh ) newRewardBalanceFetcher tr gp queryRewardQ = newObserver (contramap MsgObserverLog tr) fetch where fetch - :: Tip (CardanoBlock sc) + :: Tip (CardanoBlock StandardCrypto) -> Set W.ChimericAccount -> IO (Maybe (Map W.ChimericAccount W.Coin)) fetch tip accounts = do @@ -932,7 +929,7 @@ timeQryAndLog :: MonadIO m => String -- ^ Label to identify the query - -> Tracer m (NetworkLayerLog sc) + -> Tracer m NetworkLayerLog -- ^ Tracer to which the measurement will be logged -> m a -- ^ The action that submits the query. @@ -957,7 +954,7 @@ doNothingProtocol = -- -- >>> connectClient (mkWalletClient tr gp queue) mainnetVersionData addrInfo connectClient - :: Tracer IO (NetworkLayerLog sc) + :: Tracer IO NetworkLayerLog -> RetryHandlers -> NetworkClient IO -> (NodeToClientVersionData, CodecCBORTerm Text NodeToClientVersionData) @@ -983,7 +980,7 @@ connectClient tr handlers client (vData, vCodec) addr = withIOManager $ \iocp -> type RetryHandlers = [RetryStatus -> Handler IO Bool] -- | Handlers that are retrying on every connection lost. -retryOnConnectionLost :: Tracer IO (NetworkLayerLog sc) -> RetryHandlers +retryOnConnectionLost :: Tracer IO NetworkLayerLog -> RetryHandlers retryOnConnectionLost tr = [ const $ Handler $ handleIOException tr' True , const $ Handler $ handleMuxError tr' True @@ -992,7 +989,7 @@ retryOnConnectionLost tr = tr' = contramap MsgConnectionLost tr -- | Handlers that are failing if the connection is lost -failOnConnectionLost :: Tracer IO (NetworkLayerLog sc) -> RetryHandlers +failOnConnectionLost :: Tracer IO NetworkLayerLog -> RetryHandlers failOnConnectionLost tr = [ const $ Handler $ handleIOException tr' False , const $ Handler $ handleMuxError tr' False @@ -1054,51 +1051,51 @@ handleMuxError tr onResourceVanished = pure . errorType >=> \case Logging -------------------------------------------------------------------------------} -data NetworkLayerLog sc where - MsgCouldntConnect :: Int -> NetworkLayerLog sc - MsgConnectionLost :: Maybe IOException -> NetworkLayerLog sc +data NetworkLayerLog where + MsgCouldntConnect :: Int -> NetworkLayerLog + MsgConnectionLost :: Maybe IOException -> NetworkLayerLog MsgTxSubmission :: (TraceSendRecv - (LocalTxSubmission (GenTx (CardanoBlock sc)) (CardanoApplyTxErr sc))) - -> NetworkLayerLog sc + (LocalTxSubmission (GenTx (CardanoBlock StandardCrypto)) (CardanoApplyTxErr StandardCrypto))) + -> NetworkLayerLog MsgLocalStateQuery :: QueryClientName -> (TraceSendRecv - (LocalStateQuery (CardanoBlock sc) (Query (CardanoBlock sc)))) - -> NetworkLayerLog sc + (LocalStateQuery (CardanoBlock StandardCrypto) (Query (CardanoBlock StandardCrypto)))) + -> NetworkLayerLog MsgHandshakeTracer :: - (WithMuxBearer (ConnectionId LocalAddress) HandshakeTrace) -> NetworkLayerLog sc - MsgFindIntersection :: [W.BlockHeader] -> NetworkLayerLog sc - MsgIntersectionFound :: (W.Hash "BlockHeader") -> NetworkLayerLog sc - MsgFindIntersectionTimeout :: NetworkLayerLog sc - MsgPostTx :: CardanoGenTx sc -> NetworkLayerLog sc - MsgPostSealedTx :: W.SealedTx -> NetworkLayerLog sc - MsgNodeTip :: W.BlockHeader -> NetworkLayerLog sc - MsgProtocolParameters :: W.ProtocolParameters -> NetworkLayerLog sc - MsgLocalStateQueryError :: QueryClientName -> String -> NetworkLayerLog sc - MsgLocalStateQueryEraMismatch :: MismatchEraInfo (CardanoEras sc) -> NetworkLayerLog sc + (WithMuxBearer (ConnectionId LocalAddress) HandshakeTrace) -> NetworkLayerLog + MsgFindIntersection :: [W.BlockHeader] -> NetworkLayerLog + MsgIntersectionFound :: (W.Hash "BlockHeader") -> NetworkLayerLog + MsgFindIntersectionTimeout :: NetworkLayerLog + MsgPostTx :: CardanoGenTx StandardCrypto -> NetworkLayerLog + MsgPostSealedTx :: W.SealedTx -> NetworkLayerLog + MsgNodeTip :: W.BlockHeader -> NetworkLayerLog + MsgProtocolParameters :: W.ProtocolParameters -> NetworkLayerLog + MsgLocalStateQueryError :: QueryClientName -> String -> NetworkLayerLog + MsgLocalStateQueryEraMismatch :: MismatchEraInfo (CardanoEras StandardCrypto) -> NetworkLayerLog MsgGetRewardAccountBalance :: W.BlockHeader -> Set W.ChimericAccount - -> NetworkLayerLog sc + -> NetworkLayerLog MsgAccountDelegationAndRewards - :: (Map (SL.Credential 'SL.Staking sc) (SL.KeyHash 'SL.StakePool sc)) - -> SL.RewardAccounts sc - -> NetworkLayerLog sc - MsgDestroyCursor :: ThreadId -> NetworkLayerLog sc - MsgWillQueryRewardsForStake :: W.Coin -> NetworkLayerLog sc - MsgFetchedNodePoolLsqData :: Maybe NodePoolLsqData -> NetworkLayerLog sc - MsgFetchedNodePoolLsqDataSummary :: Int -> Int -> NetworkLayerLog sc + :: (Map (SL.Credential 'SL.Staking (SL.Shelley StandardCrypto)) (SL.KeyHash 'SL.StakePool (SL.Shelley StandardCrypto))) + -> SL.RewardAccounts (SL.Shelley StandardCrypto) + -> NetworkLayerLog + MsgDestroyCursor :: ThreadId -> NetworkLayerLog + MsgWillQueryRewardsForStake :: W.Coin -> NetworkLayerLog + MsgFetchedNodePoolLsqData :: Maybe NodePoolLsqData -> NetworkLayerLog + MsgFetchedNodePoolLsqDataSummary :: Int -> Int -> NetworkLayerLog -- ^ Number of pools in stake distribution, and rewards map, -- respectively. - MsgWatcherUpdate :: W.BlockHeader -> BracketLog -> NetworkLayerLog sc - MsgChainSyncCmd :: (ChainSyncLog Text Text) -> NetworkLayerLog sc - MsgInterpreter :: CardanoInterpreter sc -> NetworkLayerLog sc - MsgInterpreterPastHorizon :: PastHorizonException -> NetworkLayerLog sc - MsgQueryTime :: String -> NominalDiffTime -> NetworkLayerLog sc + MsgWatcherUpdate :: W.BlockHeader -> BracketLog -> NetworkLayerLog + MsgChainSyncCmd :: (ChainSyncLog Text Text) -> NetworkLayerLog + MsgInterpreter :: CardanoInterpreter StandardCrypto -> NetworkLayerLog + MsgInterpreterPastHorizon :: PastHorizonException -> NetworkLayerLog + MsgQueryTime :: String -> NominalDiffTime -> NetworkLayerLog MsgObserverLog :: ObserverLog W.ChimericAccount W.Coin - -> NetworkLayerLog sc + -> NetworkLayerLog data QueryClientName = TipSyncClient @@ -1107,7 +1104,7 @@ data QueryClientName type HandshakeTrace = TraceSendRecv (Handshake NodeToClientVersion CBOR.Term) -instance TPraosCrypto sc => ToText (NetworkLayerLog sc) where +instance ToText NetworkLayerLog where toText = \case MsgCouldntConnect n -> T.unwords [ "Couldn't connect to node (x" <> toText (n + 1) <> ")." @@ -1116,7 +1113,7 @@ instance TPraosCrypto sc => ToText (NetworkLayerLog sc) where MsgConnectionLost Nothing -> "Connection lost with the node." MsgConnectionLost (Just e) -> T.unwords - [ toText @(NetworkLayerLog sc) (MsgConnectionLost Nothing) + [ toText (MsgConnectionLost Nothing) , T.pack (show e) ] MsgTxSubmission msg -> @@ -1196,8 +1193,8 @@ instance TPraosCrypto sc => ToText (NetworkLayerLog sc) where MsgObserverLog msg -> toText msg -instance HasPrivacyAnnotation (NetworkLayerLog b) -instance HasSeverityAnnotation (NetworkLayerLog b) where +instance HasPrivacyAnnotation NetworkLayerLog +instance HasSeverityAnnotation NetworkLayerLog where getSeverityAnnotation = \case MsgCouldntConnect 0 -> Debug MsgCouldntConnect 1 -> Notice diff --git a/lib/shelley/src/Cardano/Wallet/Shelley/Pools.hs b/lib/shelley/src/Cardano/Wallet/Shelley/Pools.hs index 707205e6d25..2a843c3a2bf 100644 --- a/lib/shelley/src/Cardano/Wallet/Shelley/Pools.hs +++ b/lib/shelley/src/Cardano/Wallet/Shelley/Pools.hs @@ -81,6 +81,7 @@ import Cardano.Wallet.Primitive.Types ) import Cardano.Wallet.Shelley.Compatibility ( Shelley + , StandardCrypto , getProducer , poolCertsFromShelleyBlock , toCardanoBlockHeader @@ -138,8 +139,6 @@ import GHC.Generics ( Generic ) import Ouroboros.Consensus.Cardano.Block ( CardanoBlock, HardForkBlock (..) ) -import Ouroboros.Consensus.Shelley.Protocol - ( TPraosCrypto ) import System.Random ( RandomGen, random ) @@ -457,10 +456,10 @@ readPoolDbData DBLayer {..} currentEpoch = atomically $ do -- monitorStakePools - :: forall t sc. (TPraosCrypto sc) - => Tracer IO StakePoolLog + :: forall t. + Tracer IO StakePoolLog -> GenesisParameters - -> NetworkLayer IO t (CardanoBlock sc) + -> NetworkLayer IO t (CardanoBlock StandardCrypto) -> DBLayer IO -> IO () monitorStakePools tr gp nl db@DBLayer{..} = do @@ -497,12 +496,12 @@ monitorStakePools tr gp nl db@DBLayer{..} = do initCursor = atomically $ readPoolProductionCursor (max 100 k) where k = fromIntegral $ getQuantity getEpochStability - getHeader :: CardanoBlock sc -> BlockHeader + getHeader :: CardanoBlock StandardCrypto -> BlockHeader getHeader = toCardanoBlockHeader gp forward :: IORef EpochNo - -> NonEmpty (CardanoBlock sc) + -> NonEmpty (CardanoBlock StandardCrypto) -> (BlockHeader, ProtocolParameters) -> IO (FollowAction ()) forward latestGarbageCollectionEpochRef blocks (_nodeTip, _pparams) = do diff --git a/lib/shelley/src/Cardano/Wallet/Shelley/Transaction.hs b/lib/shelley/src/Cardano/Wallet/Shelley/Transaction.hs index 3a484725fc7..f4176eb7cdf 100644 --- a/lib/shelley/src/Cardano/Wallet/Shelley/Transaction.hs +++ b/lib/shelley/src/Cardano/Wallet/Shelley/Transaction.hs @@ -45,6 +45,8 @@ import Cardano.Binary ( serialize' ) import Cardano.Crypto.DSIGN ( DSIGNAlgorithm (..), SignedDSIGN (..) ) +import Cardano.Ledger.Crypto + ( Crypto (..) ) import Cardano.Wallet.Primitive.AddressDerivation ( ChimericAccount (..), Depth (..), Passphrase (..), WalletKey (..) ) import Cardano.Wallet.Primitive.AddressDerivation.Byron @@ -70,7 +72,7 @@ import Cardano.Wallet.Primitive.Types ) import Cardano.Wallet.Shelley.Compatibility ( Shelley - , TPraosStandardCrypto + , StandardCrypto , sealShelleyTx , toCardanoLovelace , toCardanoStakeCredential @@ -100,8 +102,6 @@ import Data.Quantity ( Quantity (..) ) import Data.Word ( Word16, Word64, Word8 ) -import Ouroboros.Consensus.Shelley.Protocol.Crypto - ( Crypto (..) ) import Ouroboros.Network.Block ( SlotNo ) @@ -522,9 +522,9 @@ computeTxSize networkId witTag md action cs = where chaff = L8.pack (show ix) <> BL.fromStrict txid - sigLen = sizeSigDSIGN $ Proxy @(DSIGN TPraosStandardCrypto) + sigLen = sizeSigDSIGN $ Proxy @(DSIGN StandardCrypto) - keyLen = sizeVerKeyDSIGN $ Proxy @(DSIGN TPraosStandardCrypto) + keyLen = sizeVerKeyDSIGN $ Proxy @(DSIGN StandardCrypto) bloatChaff :: Word -> BL.ByteString -> ByteString bloatChaff n = BL.toStrict . BL.take (fromIntegral n) . BL.cycle diff --git a/lib/shelley/test/unit/Cardano/Wallet/Shelley/CompatibilitySpec.hs b/lib/shelley/test/unit/Cardano/Wallet/Shelley/CompatibilitySpec.hs index a8d62a4d5d0..276e05ce661 100644 --- a/lib/shelley/test/unit/Cardano/Wallet/Shelley/CompatibilitySpec.hs +++ b/lib/shelley/test/unit/Cardano/Wallet/Shelley/CompatibilitySpec.hs @@ -19,6 +19,8 @@ import Cardano.Address.Derivation ( XPrv, XPub ) import Cardano.Crypto.Hash.Class ( digest ) +import Cardano.Ledger.Crypto + ( Crypto (..) ) import Cardano.Mnemonic ( ConsistentEntropy , EntropySize @@ -51,7 +53,7 @@ import Cardano.Wallet.Primitive.Types ) import Cardano.Wallet.Shelley.Compatibility ( CardanoBlock - , TPraosStandardCrypto + , StandardCrypto , decentralizationLevelFromPParams , fromTip , interval0 @@ -86,8 +88,6 @@ import Data.Word ( Word64 ) import GHC.TypeLits ( natVal ) -import Ouroboros.Consensus.Shelley.Protocol.Crypto - ( Crypto (..) ) import Ouroboros.Network.Block ( BlockNo (..), Point, SlotNo (..), Tip (..), getTipPoint ) import Test.Hspec @@ -110,6 +110,7 @@ import Test.QuickCheck , (===) ) +import qualified Cardano.Ledger.Shelley as SL import qualified Cardano.Wallet.Primitive.AddressDerivation.Byron as Byron import qualified Cardano.Wallet.Primitive.AddressDerivation.Shelley as Shelley import qualified Cardano.Wallet.Primitive.Types as W @@ -125,7 +126,7 @@ spec = do describe "Conversions" $ it "toPoint' . fromTip' == getTipPoint" $ property $ \gh tip -> do let fromTip' = fromTip gh - let toPoint' = toPoint gh :: W.BlockHeader -> Point (CardanoBlock TPraosStandardCrypto) + let toPoint' = toPoint gh :: W.BlockHeader -> Point (CardanoBlock StandardCrypto) toPoint' (fromTip' tip) === (getTipPoint tip) describe "Shelley StakeAddress" $ do @@ -142,7 +143,7 @@ spec = do describe "Shelley Addresses" $ do prop "(Mainnet) can be deserialised by shelley ledger spec" $ \k -> do let Address addr = paymentAddress @'Mainnet @ShelleyKey k - case SL.deserialiseAddr @TPraosStandardCrypto addr of + case SL.deserialiseAddr @(SL.Shelley StandardCrypto) addr of Just _ -> property True Nothing -> property False @@ -170,7 +171,7 @@ spec = do describe "decentralizationLevelFromPParams" $ do - let mkDecentralizationParam :: SL.UnitInterval -> SL.PParams + let mkDecentralizationParam :: SL.UnitInterval -> SL.PParams (SL.Shelley c) mkDecentralizationParam i = SL.emptyPParams { SL._d = i } let testCases :: [(Ratio Word64, Text)] @@ -234,7 +235,7 @@ instance Arbitrary (Hash "BlockHeader") where instance Arbitrary ChimericAccount where arbitrary = ChimericAccount . BS.pack <$> vector 28 -instance Arbitrary (Tip (CardanoBlock TPraosStandardCrypto)) where +instance Arbitrary (Tip (CardanoBlock StandardCrypto)) where arbitrary = frequency [ (10, return TipGenesis) , (90, arbitraryTip) @@ -244,7 +245,7 @@ instance Arbitrary (Tip (CardanoBlock TPraosStandardCrypto)) where n <- choose (0, 100) hash <- toCardanoHash . Hash - . digest (Proxy @(HASH TPraosStandardCrypto)) + . digest (Proxy @(HASH StandardCrypto)) . BS.pack <$> vector 5 return $ Tip (SlotNo n) hash (BlockNo n) diff --git a/lib/shelley/test/unit/Cardano/Wallet/Shelley/TransactionSpec.hs b/lib/shelley/test/unit/Cardano/Wallet/Shelley/TransactionSpec.hs index cd6ff743fc1..5388edec10d 100644 --- a/lib/shelley/test/unit/Cardano/Wallet/Shelley/TransactionSpec.hs +++ b/lib/shelley/test/unit/Cardano/Wallet/Shelley/TransactionSpec.hs @@ -50,6 +50,7 @@ import Cardano.Wallet.Primitive.Types , Hash (..) , TxIn (..) , TxMetadata (..) + , TxMetadataValue (..) , TxOut (..) , TxParameters (..) , UTxO (..) @@ -116,7 +117,6 @@ import qualified Data.List.NonEmpty as NE import qualified Data.Map.Strict as Map import qualified Data.Text as T import qualified Data.Text.Encoding as T -import qualified Shelley.Spec.Ledger.MetaData as MD spec :: Spec spec = do @@ -379,11 +379,13 @@ instance Arbitrary TxOut where TxOut addr <$> arbitrary instance Arbitrary TxMetadata where - arbitrary = TxMetadata . MD.MetaData <$> arbitrary - shrink (TxMetadata (MD.MetaData md)) = TxMetadata . MD.MetaData <$> shrink md + arbitrary = TxMetadata <$> arbitrary + shrink (TxMetadata md) = TxMetadata <$> shrink md -instance Arbitrary MD.MetaDatum where - arbitrary = MD.I <$> arbitrary +instance Arbitrary TxMetadataValue where + -- Note: test generation at the integration level is very simple. More + -- detailed metadata tests are done at unit level. + arbitrary = TxMetaNumber <$> arbitrary instance Arbitrary UTxO where arbitrary = do From 43094d4ff70f4f1cc8bf0265b3b2d13ac06b3384 Mon Sep 17 00:00:00 2001 From: Rodney Lorrimar Date: Fri, 18 Sep 2020 11:13:37 +1000 Subject: [PATCH 5/9] Revert golden json --- .../Cardano/Wallet/Api/ApiTTxMetadata.json | 1134 +++++++++++++++-- .../Wallet/Api/ApiTransactionTestnet0.json | 354 ++--- .../Cardano/Wallet/Api/ApiTxMetadata.json | 882 +++++++++++-- .../Api/PostTransactionDataTestnet0.json | 527 +++----- .../Api/PostTransactionFeeDataTestnet0.json | 508 ++++---- 5 files changed, 2364 insertions(+), 1041 deletions(-) diff --git a/lib/core/test/data/Cardano/Wallet/Api/ApiTTxMetadata.json b/lib/core/test/data/Cardano/Wallet/Api/ApiTTxMetadata.json index f0aac04e2a2..f1f30f6620e 100644 --- a/lib/core/test/data/Cardano/Wallet/Api/ApiTTxMetadata.json +++ b/lib/core/test/data/Cardano/Wallet/Api/ApiTTxMetadata.json @@ -1,180 +1,1034 @@ { - "seed": -2123223936149544004, + "seed": -2635329256558185394, "samples": [ { - "27": { - "list": [ + "12414324": 27, + "12793482": { + "": [ { - "int": 2 + "hex": "" } - ] - } + ], + "b": [ + -2, + 4, + "𫄱U\"qE" + ], + "1TsC": 1 + }, + "12962227": [ + 3, + "=n", + "", + { + "hex": "010201" + } + ] }, { - "22": { - "map": [ - { - "k": { - "string": "" - }, - "v": { - "list": [ - { - "bytes": "724d7773697126af277f17013b401e6d3b512c2546516d0c6d1d2806752e235d27584748232e05737015583562742854162106014f1e317d400e056a564877" - }, - { - "list": [] - } - ] - } + "4651590": "}'i", + "7965096": { + "": { + "G": { + "hex": "" + }, + "": { + "hex": "020301" + }, + "Y0 36": "", + "x": "4,J/t", + "z'Z$": { + "hex": "0001" } + }, + "k": { + "hex": "02" + }, + "O": [ + -1 + ], + "f": { + "7": { + "hex": "040003" + }, + "u7": { + "hex": "0401040400" + }, + "PB": "LPD*\\" + } + }, + "11581754": { + "hex": "94902f85" + }, + "8556672": "ZpQebQA[4HWbc/T0g>QtnShQ+vx(r", + "15030089": "z<`l", + "11803456": { + "d$_": [ + { + "hex": "000303" + }, + 5 + ], + "s51": { + "hex": "0102" + } + }, + "16203727": [ + 3, + { + "hex": "0301" + }, + 0 + ], + "15930958": { + "!yAKN": [ + 3 + ], + "0[PCB": "oẍh'", + "Q?MFu": 1, + "(": 1 + }, + "8291345": [ + { + "hex": "0103" + }, + { + "hex": "020104" + }, + { + "hex": "" + }, + -4, + "VQ" + ], + "7648017": 12, + "4626495": { + "hex": "af3431" + }, + "16039333": -8, + "12527288": 26, + "3511942": [ + { + "hex": "0401040100" + }, + "3F_pz", + { + "hex": "0403010401" + } + ] + }, + { + "16154239": ":tV3pA(䙣HDQ)[P]Qi]MIKTR\"A_mfI?", + "6853728": [ + { + "hex": "0204" + }, + -5, + -2 + ], + "7988147": { + "": { + "96": "[!zt", + "ilT": "itr\\", + "uljz": "Mo&b", + "𤝰": 2 + }, + "!y#O": [ + -4 ] - } + }, + "12565103": "T8wTlw": { + "WoO": -5, + "1/jXk": 5, + "vbU2E": { + "hex": "" + } + }, + "Q*\\K": 0, + "0\\Q*": { + "hex": "02000004" + } + }, + "7810029": { + "hex": "d1e10488a5652812a69e" + }, + "15553520": { + "sjB.b": 5, + "e=EP": [ + "H", + 3, + 2 + ], + "P": [ + { + "hex": "02" + }, + "}", + { + "hex": "04040200" + }, + -2, + 0 + ], + "[": 0, + ":k;1": { + "D㸈1(": 2, + "~r7bc": "", + "8~*8`": -3, + "Lbo([": 2, + "E*z91": 5 + } + }, + "1360135": { + "hex": "11" + }, + "1256443": "#O}R_f9:&?7?%+<녪", + "10575432": { + "": { + "hex": "0404000100" + } + }, + "3504081": { + " ": "~" + }, + "8000964": { + ":": "aMXI%", + "6z]y`": [ + { + "hex": "01" + }, + "", + { + "hex": "03040303" + }, + -2 ] - } - }, - { - "4": { - "list": [] - } + }, + "14040412": [ + "19", + 4 + ], + "2012304": "z𧧫=.-$AtoAB4{\"'X~}lq", + "10173992": -15, + "3934037": ">I~𤅙@o9uuD.^s3ろ4" }, { - "20": { - "list": [ - { - "string": "" - }, - { - "map": [ - { - "k": { - "string": "l0" - }, - "v": { - "map": [ - { - "k": { - "string": "" - }, - "v": { - "bytes": "37723b79c8283409962943181e1a4e717702d356140522920a6852476c0a681de574300470" - } - } - ] - } - }, - { - "k": { - "string": "sp" - }, - "v": { - "bytes": "144e277f544738e545432d1322e6fc29505e09b1375e2a260b503b1e2e1f69c6483e60426c681e38166b62621a347d623e0740114c6a6e3d016c176d" - } - } - ] + "14790917": { + "": { + "=Y+kO": "z", + " fiC": { + "hex": "01040004" + }, + "鄒": { + "hex": "04" + }, + "/7e>": { + "hex": "" + } + }, + "jQ1": [ + { + "hex": "0100040003" + }, + { + "hex": "04030100" + }, + { + "hex": "0103000204" + }, + -1 + ] + }, + "3984021": { + "WE>3r": "e", + "/k<": "q", + "2]3u\"": -1, + "->-:": 3, + "93⯋&": [ + "", + -1, + -3, + { + "hex": "0400000101" + } + ], + "tE=&": 1 + }, + "1286394": [ + -4, + "", + -5, + { + "hex": "04000202" + }, + -3 + ], + "9091002": { + "hex": "2d8c699f96b1350c56693b4ce5065d25b5791e99f7711d66a1fed30d" + }, + "782824": { + "TK;": 5, + "i𥛊M(^": { + "izPsc": -1, + "9A_Y": 4, + "k9pZo": { + "hex": "0403" + }, + "QvE": "rw i\"" + }, + "": [ + 5 + ], + "]l%": -5, + "E": "I" + }, + "12126176": { + "hex": "e9f526e2b5" + }, + "12362651": [ + "", + "" + ], + "3911985": -25, + "6366641": { + "": ".ttN㧑", + "ONkB": { + "": "z7T~", + ".": { + "hex": "040200" + }, + "[hjݔ": "L .", + ")": { + "hex": "03" + } + } + }, + "2641415": [ + { + "hex": "04020000" + }, + "n", + "hK>K>", + "#B}" + ], + "10464781": -27, + "12949392": "╈idTr8[𝖨*Aih)ml", + "4744256": -15, + "10914412": { + "hex": "6e6ddc" + }, + "16701657": { + "fSwN.": [ + "c", + "9O", + { + "hex": "0002040000" + }, + -4 + ] + }, + "9146648": { + "N'𣲻긧#": [ + { + "hex": "0001" + }, + -5, + 1, + -4, + -3 + ], + "c%r]q": "{s;", + "9s辰qj": { + "": { + "hex": "00040401" + }, + "P$": "5[*8", + "_ iT": -1, + "a`9f-": "X" + } + }, + "4690102": { + "hex": "62838c" + }, + "9059665": -20, + "3914985": { + "hex": "41f8" + }, + "1407966": "9yXNMVVN ;1JQ2Gx/kg|", + "4952985": 15, + "9613613": { + "hex": "af189539d88f3436b13694b40e3b9d9464c2db6bd1bafe" + }, + "9155911": { + "": "", + "b!": [ + ";,(", + { + "hex": "0202" + }, + { + "hex": "0101020404" } + ], + "&": [ + "ઇQ", + "x6𐦛}B", + 4 ] } }, { - "10": { - "list": [ - { - "map": [ - { - "k": { - "string": "fg" - }, - "v": { - "string": "s" - } - }, - { - "k": { - "string": "k" - }, - "v": { - "bytes": "" - } - } - ] + "1738652": 15, + "15052197": 15, + "10299095": { + "G<": "$.S|", + "j8a": "m" + }, + "11699172": { + "f": { + "hex": "01" + } + }, + "15916968": { + "hex": "2dd680722a5236869921916869d532c597aa9815fdf5a7912d5e4d0d06" + }, + "11657351": { + "": { + "Z": "J", + "": { + "hex": "02" } - ] + }, + "qG": -4, + "}xmF": [ + "J", + "", + "\"?", + 5 + ], + "rc": { + "hex": "0404040204" + } + }, + "16355971": { + "hex": "901fe1dffaa03cf24c46d3e6" + }, + "11559028": { + "hex": "4d9c34d7eae9f26ded2462e523f185e9a9378571c1e4ac9d23" + }, + "6223352": { + "hex": "acd201256eee00dd9ff23d54d446637c" + }, + "6104062": -30, + "3487016": [ + -5, + { + "hex": "000303" + }, + "..", + -3, + -1 + ], + "10824822": 21, + "458970": { + "hex": "63e116" + }, + "8429606": -7, + "16015643": { + "hex": "77ad19cbf258487ccd32e19b9e564c2ab7d720cbcc9055dda5e2d1" + }, + "5992508": { + "&\\": [ + -3, + 5, + -4, + { + "hex": "030300" + }, + 3 + ], + "zfCM": { + "hex": "0004020004" + }, + "\"@": { + "'Iuek": -5 + } + }, + "1657799": [ + { + "hex": "01" + }, + ">x" + ], + "418572": 20, + "8815551": [ + 4, + { + "hex": "020004" + }, + -1, + "S2Xw" + ], + "13694256": [ + { + "hex": "0404" + }, + -4, + { + "hex": "03010104" + }, + { + "hex": "" + } + ], + "15669925": -14, + "1063214": "1Hi8JZP", + "5978176": { + "}zl䨅": "", + "": 0, + "f)": { + "hex": "" + }, + "*Y": { + "$": "", + "(-": "c;7Mh" + }, + "Oq p": "}5^:B" + }, + "39311": { + "hex": "70b511635bd6ad24179ad7b6b3d8e08076c41a4978" } }, { - "13": { - "map": [ - { - "k": { - "string": "" - }, - "v": { - "bytes": "1304366f196b874e2c4e07f37c2d7a0026571a6f0d1c69a51d353d715c4d021f" - } - }, - { - "k": { - "string": "?fr" - }, - "v": { - "list": [] - } - }, - { - "k": { - "string": "VPX" - }, - "v": { - "list": [ - { - "string": "" - } - ] - } - } + "10610343": { + "䪔": { + "hex": "0400" + }, + "": { + ";Mvt": -2, + "t": "%1䌜^" + }, + "t00": 5, + "?": "" + }, + "347072": { + "xb:P": { + ";NvQ": { + "hex": "" + }, + "SawU": 2, + "E\\2": 4, + ";hK\\": -2, + "p1C䅆M": "- " + }, + "%qw": { + "LUJ>\\": 5 + }, + "%s0+I": { + "hex": "0101030400" + }, + "2": "n&xw", + "r)N&": "i漐l" + }, + "11572353": { + "": { + "6B𤷨m": 0, + "3": -1 + }, + "~zt|R": { + "hex": "01030304" + }, + "R0j": "_", + "f": 2 + }, + "16001803": [ + 0 + ], + "8099355": [ + 3, + "$S", + 1 + ], + "896271": { + "iK9\\|": [ + { + "hex": "0202020104" + }, + { + "hex": "020202" + }, + 3 ] - } + }, + "4337967": [ + -4 + ], + "10697831": { + "hex": "a309f4513d9162dae97bbec2d524" + }, + "13717418": { + "hex": "21bd33651dc699" + }, + "14788532": [ + "@", + "", + "[3" + ], + "7378525": { + "hex": "9289" + }, + "2283007": { + "'XlA": 0 + }, + "11451501": [ + "6!", + { + "hex": "0404010304" + }, + "d", + { + "hex": "0304" + }, + { + "hex": "04030301" + } + ], + "786907": [ + 2, + "y+" + ], + "7675646": [ + { + "hex": "040100" + } + ], + "11194384": -19, + "14303568": { + "hex": "256e279f1f76e716abea1972c95c" + }, + "8052537": [ + { + "hex": "0404040104" + }, + "`", + -1 + ], + "6065469": [ + { + "hex": "02" + } + ], + "6302042": "8Q#%>n]\\w^7NW7 '𫚋<5kE}+Dqw?HK", + "2986589": "hI6P/<34d4[5accUs`X`" }, { - "13": { - "list": [ + "240785": 0, + "10321583": [ + { + "hex": "03" + }, + 3, + -2, + 0, + -5 + ], + "3848791": [ + { + "hex": "030000" + }, + { + "hex": "00" + }, + -2 + ], + "12001974": "+𝈅@03]c52|;rIX1q=2561X:", + "7895293": { + "hex": "66ddd30c8721cd95377cc366f2c0962a2b21c6dddd19fe48a2" + }, + "4047119": [ + -4, + "ydCHb", + { + "hex": "020401" + }, + -5 + ], + "13429524": 9, + "6104453": [ + "痢mAgu", + "BA", + { + "hex": "0301020202" + }, + -2, + 3 + ], + "16458935": "#`", + "15458760": [ + -4 + ], + "11660675": { + "xU.D": { + "7": -3, + "f祄 Vs": { + "hex": "0001040203" + }, + "}$": { + "hex": "000000" + } + }, + "/Vry": "Oemm", + "{h": { + "hex": "" + }, + "8J": { + "N𠻗2": "", + "": { + "hex": "0102000100" + }, + "tO": { + "hex": "040204" + }, + "r𡇦M": 2, + "X.": { + "hex": "0402" + } + } + }, + "8546257": 4, + "4028393": { + "": 2 + }, + "14829693": -28, + "15068294": { + "hex": "87ff1b947cde053d" + }, + "10600304": "r\"; k6n@}.M[", + "3725333": { + "_+;": -4, + "yNJ": [ + "_", + { + "hex": "03" + }, { - "list": [] + "hex": "0203040001" } - ] - } + ], + "Ra": { + ",": 0, + "sw": "nU", + "~5IE": "diIS" + }, + "~/p": { + "hex": "02040000" + } + }, + "10952357": "{fHf*!d0.F5s=M1XBWXg?ryrTxI\\J", + "11641839": -17 }, { - "17": { - "string": "" - } + "15121726": [ + "5", + "", + { + "hex": "0002" + } + ] } ] } \ No newline at end of file diff --git a/lib/core/test/data/Cardano/Wallet/Api/ApiTransactionTestnet0.json b/lib/core/test/data/Cardano/Wallet/Api/ApiTransactionTestnet0.json index 026c7bf97e2..a4708c47c85 100644 --- a/lib/core/test/data/Cardano/Wallet/Api/ApiTransactionTestnet0.json +++ b/lib/core/test/data/Cardano/Wallet/Api/ApiTransactionTestnet0.json @@ -1,51 +1,11 @@ { - "seed": -5084569243543209361, + "seed": -3093498277263799025, "samples": [ - { - "inserted_at": { - "time": "1866-10-13T15:16:05Z", - "block": { - "height": { - "quantity": 16250, - "unit": "block" - }, - "epoch_number": 21514, - "slot_number": 1586 - } - }, - "status": "in_ledger", - "withdrawals": [], - "amount": { - "quantity": 215, - "unit": "lovelace" - }, - "inputs": [], - "direction": "incoming", - "outputs": [ - { - "amount": { - "quantity": 212, - "unit": "lovelace" - }, - "address": "" - } - ], - "metadata": { - "10": { - "int": 0 - } - }, - "depth": { - "quantity": 4153, - "unit": "block" - }, - "id": "0663da3c1298505a6d702d6c0022e1e472024d0f29203f6f1c586635d229607e" - }, { "status": "pending", "withdrawals": [], "amount": { - "quantity": 214, + "quantity": 68, "unit": "lovelace" }, "inputs": [], @@ -53,183 +13,149 @@ "outputs": [ { "amount": { - "quantity": 17, + "quantity": 224, "unit": "lovelace" }, "address": "" } ], "pending_since": { - "time": "1881-06-22T15:46:54.926232826033Z", + "time": "1873-03-27T15:23:51Z", "block": { "height": { - "quantity": 28815, + "quantity": 14750, "unit": "block" }, - "epoch_number": 20087, - "slot_number": 29892 + "epoch_number": 30883, + "slot_number": 30421 + } + }, + "metadata": { + "15": { + "GO]": "0x0758d7580d3f72de59201b15495e61295f356b7e26004c6f491a2a6a7f2c5f08061759", + "Q`l": [], + "": "0x4e2585dfe7587f46014f6978745e71693b637af27a54450991e621191c" } }, - "metadata": null, "depth": { - "quantity": 20946, + "quantity": 5232, "unit": "block" }, - "id": "266b160e680a5860020007cc7865046b763d67130a473f1247d2784d20381958" + "id": "4d41ee792e91f5281e183e60200ac97636769c3a4c54365cfa3acd561c720826" }, { "status": "pending", "withdrawals": [], "amount": { - "quantity": 22, + "quantity": 136, "unit": "lovelace" }, "inputs": [], - "direction": "incoming", + "direction": "outgoing", "outputs": [ { "amount": { - "quantity": 160, + "quantity": 115, "unit": "lovelace" }, "address": "" } ], "pending_since": { - "time": "1864-06-16T05:00:00Z", + "time": "1880-01-18T07:56:27Z", "block": { "height": { - "quantity": 13720, + "quantity": 29371, "unit": "block" }, - "epoch_number": 29378, - "slot_number": 26286 + "epoch_number": 7478, + "slot_number": 21613 } }, "metadata": { - "24": { - "map": [ - { - "k": { - "string": "1>!" - }, - "v": { - "list": [ - { - "list": [ - { - "string": "" - } - ] - }, - { - "list": [] - } - ] - } - }, - { - "k": { - "string": "Og" - }, - "v": { - "list": [ - { - "bytes": "06096e60c833c44f690f615e786ca3555818325cde603c15613fbb7003ec477d2a79146842484076546c2d1337030e662b1c7727445d171462087c274b1e442e" - } - ] - } - } - ] - } + "15": "" }, "depth": { - "quantity": 10565, + "quantity": 10680, "unit": "block" }, - "id": "12f54b5405412e3a3d714f5a2220cc0e69097d10571c1e54536f7f556bc17833" + "id": "0e6c327116d144033c0e031a5fcb668e4319146f271119927c5123925f5ea537" }, { "inserted_at": { - "time": "1895-10-01T07:53:55.96324270654Z", + "time": "1866-04-23T21:48:00Z", "block": { "height": { - "quantity": 26610, + "quantity": 29803, "unit": "block" }, - "epoch_number": 10442, - "slot_number": 28800 + "epoch_number": 31173, + "slot_number": 9402 } }, "status": "in_ledger", "withdrawals": [], "amount": { - "quantity": 2, + "quantity": 216, "unit": "lovelace" }, "inputs": [], - "direction": "outgoing", + "direction": "incoming", "outputs": [ { "amount": { - "quantity": 172, + "quantity": 114, "unit": "lovelace" }, "address": "" } ], "metadata": { - "4": { - "int": 0 + "18": { + "G[s": "" } }, "depth": { - "quantity": 3958, + "quantity": 6931, "unit": "block" }, - "id": "59331e1d364636493115f11fb7606c3d6711be4a18526c1149531a1aae711a0a" + "id": "5e2b312b557f57641d031c08519b772a397b1d30cd1d50005d753c79770e501f" }, { "status": "pending", "withdrawals": [], "amount": { - "quantity": 82, + "quantity": 244, "unit": "lovelace" }, "inputs": [], - "direction": "incoming", + "direction": "outgoing", "outputs": [ { "amount": { - "quantity": 116, + "quantity": 26, "unit": "lovelace" }, "address": "" } ], - "pending_since": { - "time": "1888-10-22T19:17:49.264308880549Z", - "block": { - "height": { - "quantity": 16254, - "unit": "block" - }, - "epoch_number": 28006, - "slot_number": 13473 + "metadata": { + "15": { + "]": 0, + "|(": "0x35572c2a5b465a37755970584442c72a56282515d6246e691d5a4c0dfc51784132621f51e2b4841f0620763114ab40014ca40129462f1a257a4c035f6e69" } }, - "metadata": null, "depth": { - "quantity": 12356, + "quantity": 5396, "unit": "block" }, - "id": "33202621e8f19a7ae3075b5774060a244e324c2076440b475d4f5d0835bf1028" + "id": "391323305e35367da641135c5f588f55517b38537030760f502508750da37254" }, { "status": "pending", "withdrawals": [], "amount": { - "quantity": 111, + "quantity": 35, "unit": "lovelace" }, "inputs": [], @@ -237,39 +163,33 @@ "outputs": [ { "amount": { - "quantity": 211, + "quantity": 29, "unit": "lovelace" }, "address": "" } ], "pending_since": { - "time": "1891-04-23T16:17:30Z", + "time": "1890-07-25T21:13:51Z", "block": { "height": { - "quantity": 8711, + "quantity": 26240, "unit": "block" }, - "epoch_number": 2803, - "slot_number": 28301 + "epoch_number": 15821, + "slot_number": 13307 } }, "metadata": { - "23": { - "bytes": "a8" - } - }, - "depth": { - "quantity": 28991, - "unit": "block" + "8": [] }, - "id": "765109543fa8560176dd5ad2bb22247b4868d76d160c2059a2775843093f4650" + "id": "032c6001205c017763a70f731159390ed873292063666c6fd118632493640022" }, { "status": "pending", "withdrawals": [], "amount": { - "quantity": 2, + "quantity": 5, "unit": "lovelace" }, "inputs": [], @@ -277,81 +197,65 @@ "outputs": [ { "amount": { - "quantity": 217, + "quantity": 46, "unit": "lovelace" }, "address": "" } ], "pending_since": { - "time": "1895-07-31T20:12:47Z", + "time": "1870-06-18T08:36:48.300946526786Z", "block": { "height": { - "quantity": 18919, + "quantity": 30888, "unit": "block" }, - "epoch_number": 15085, - "slot_number": 20242 + "epoch_number": 30360, + "slot_number": 14073 } }, "metadata": { - "1": { - "list": [ - { - "list": [ - { - "int": 1 - }, - { - "map": [] - } - ] - }, - { - "string": ":$" - }, - { - "list": [] - } - ] - } + "16": [] }, - "id": "e73b923b477917b77926fb7e442b1636004f86696342c5730756464c656b0354" + "id": "5ec20a01504641a402365c5e5441824e1a42694b652e1e2101855906217d5a54" }, { + "inserted_at": { + "time": "1887-03-20T10:44:09.822840686048Z", + "block": { + "height": { + "quantity": 3413, + "unit": "block" + }, + "epoch_number": 25379, + "slot_number": 23715 + } + }, "status": "in_ledger", "withdrawals": [], "amount": { - "quantity": 75, + "quantity": 159, "unit": "lovelace" }, "inputs": [], - "direction": "incoming", + "direction": "outgoing", "outputs": [ { "amount": { - "quantity": 207, + "quantity": 194, "unit": "lovelace" }, "address": "" } ], - "metadata": { - "1": { - "string": "" - } - }, - "depth": { - "quantity": 7369, - "unit": "block" - }, - "id": "6e720a2618f427195d18746e0bd3363c6b0c1354887557016a3d0c1204657ed2" + "metadata": null, + "id": "ef4d383a2e5d6501420c76431f4531713946c915520e702065aae945741c6410" }, { "status": "pending", "withdrawals": [], "amount": { - "quantity": 226, + "quantity": 107, "unit": "lovelace" }, "inputs": [], @@ -359,94 +263,94 @@ "outputs": [ { "amount": { - "quantity": 229, + "quantity": 143, "unit": "lovelace" }, "address": "" } ], "pending_since": { - "time": "1859-03-18T08:18:09.689156185482Z", + "time": "1860-09-13T16:14:57Z", "block": { "height": { - "quantity": 5811, + "quantity": 26180, "unit": "block" }, - "epoch_number": 12597, - "slot_number": 29210 + "epoch_number": 31673, + "slot_number": 13693 } }, "metadata": { - "2": { - "list": [ - { - "string": "g" - }, - { - "map": [ - { - "k": { - "string": "Ai" - }, - "v": { - "map": [ - { - "k": { - "string": "" - }, - "v": { - "string": "" - } - } - ] - } - } - ] - } - ] - } + "23": "" }, "depth": { - "quantity": 11159, + "quantity": 8421, "unit": "block" }, - "id": "36a81e7fb242525c01392727062b2150527a3910d5e37a0b387f7964674b3823" + "id": "135ecc53ea16406f8a5eaf7708306436447b055d204e0b343c594d2d06772173" }, { - "inserted_at": { - "time": "1901-06-22T22:00:00Z", - "block": { - "height": { - "quantity": 1443, - "unit": "block" + "status": "pending", + "withdrawals": [], + "amount": { + "quantity": 155, + "unit": "lovelace" + }, + "inputs": [], + "direction": "outgoing", + "outputs": [ + { + "amount": { + "quantity": 251, + "unit": "lovelace" }, - "epoch_number": 11453, - "slot_number": 29496 + "address": "" } + ], + "metadata": null, + "depth": { + "quantity": 21635, + "unit": "block" }, - "status": "in_ledger", + "id": "24045137695b5b7929107673797d966a3e01370816016a565373da6f89b57154" + }, + { + "status": "pending", "withdrawals": [], "amount": { - "quantity": 178, + "quantity": 89, "unit": "lovelace" }, "inputs": [], - "direction": "incoming", + "direction": "outgoing", "outputs": [ { "amount": { - "quantity": 38, + "quantity": 119, "unit": "lovelace" }, "address": "" } ], - "metadata": null, + "pending_since": { + "time": "1859-05-27T01:52:52Z", + "block": { + "height": { + "quantity": 18634, + "unit": "block" + }, + "epoch_number": 19782, + "slot_number": 10937 + } + }, + "metadata": { + "1": [] + }, "depth": { - "quantity": 5832, + "quantity": 31634, "unit": "block" }, - "id": "0f0c23532a30580e562f7d70426735234316254eafda47494c0de8420c747c1e" + "id": "dc76224161627f8342433e5b13246b263dfc6e07101c7b56bb2acf7329486b66" } ] } \ No newline at end of file diff --git a/lib/core/test/data/Cardano/Wallet/Api/ApiTxMetadata.json b/lib/core/test/data/Cardano/Wallet/Api/ApiTxMetadata.json index 337fc70c07b..da047e7fe81 100644 --- a/lib/core/test/data/Cardano/Wallet/Api/ApiTxMetadata.json +++ b/lib/core/test/data/Cardano/Wallet/Api/ApiTxMetadata.json @@ -1,106 +1,828 @@ { - "seed": -3643247963911582635, + "seed": 2147738271768211312, "samples": [ null, { - "25": { - "map": [ - { - "k": { - "string": "*Z]" - }, - "v": { - "int": -3 - } - }, - { - "k": { - "string": "O" - }, - "v": { - "list": [] - } - }, - { - "k": { - "string": "Z" - }, - "v": { - "list": [ - { - "string": "$" - }, - { - "list": [] - } - ] - } - } + "10398034": "m", + "15414174": { + "JDd*": [ + { + "hex": "040002" + }, + 1 + ], + "HB%<": { + "": 0, + "1/9": -5 + }, + "@t5": [ + "" ] + }, + "4580774": "ES4*&E\"sZQU?R8J𝒽.}Y$n^d\\X=E50{", + "215215": [ + "}^irl", + "f\\!", + "𩊻}", + "gMgO" + ], + "2168621": { + "Nu^O": [ + "Ue", + "", + { + "hex": "00" + } + ], + "": { + "hex": "01000002" + }, + "!sn": { + "hex": "04030204" + } + }, + "15383062": [ + { + "hex": "" + }, + { + "hex": "0404" + } + ], + "8392506": { + "kS": 4, + "WhC3u": { + "": "", + "/|Qi": "", + "~": { + "hex": "03" + }, + "M i": 4, + "𢿹}0;": "lF:\"" + }, + "ퟘh]9": { + "\\": "=t)", + "T5f": 5, + "0+,MU": -4 + } + }, + "14031890": { + "": 0 + }, + "6751486": "homm<@tY'U\"Hs4P! F07u", + "8460340": { + "W>XzL": { + "hyq4": 5, + "}": 5 + } + }, + "16229245": [ + { + "hex": "03" + }, + -2, + "", + -4 + ], + "7515083": { + "": { + "hex": "" + } + }, + "639985": { + "O\"\\*g": "-;P", + "XR": { + "xz~oD": -3, + "[\\臄": 0 + }, + "W?Nl": { + "hex": "" + }, + "uE": "r[p", + "A7W": { + "=r": -4, + "]SL": -5, + "HGLC}": { + "hex": "01010002" + }, + "B8Q(": { + "hex": "00040403" + }, + "遶": "[ h" + } + }, + "11291714": { + "78,!": [ + -1, + { + "hex": "" + }, + { + "hex": "0304010303" + }, + 4 + ] + }, + "6597060": { + "hex": "5555887a484a71402eacd24726cfc99ebbd710eea65770f35f331ddb0c" + }, + "4497330": { + "o nx": [ + "+.CI", + { + "hex": "03" } ] - } + }, + "11462447": [ + "r<(n", + "", + { + "hex": "0103" + }, + 1, + { + "hex": "0003" + } + ], + "4255559": { + "/a\"": { + "hex": "04" + }, + "0|rs7": [ + { + "hex": "03000002" + }, + "^", + "", + 2 + ], + "I#!": [ + "d", + { + "hex": "04" + }, + "^", + 3 + ], + "Vx(": [ + 4 + ], + ")tS/O": { + "L": 1, + "I98i": { + "hex": "040403" + } + } + }, + "3310835": "'◲", + "13253735": 23, + "16130834": { + "=|": { + "a_Z": "K𤺈z䀘]", + "M": { + "hex": "0000020404" + } + } + }, + "7803024": { + "f'ge": [ + 4 + ] + }, + "15060034": { + "hex": "d16ff124bca051da71" + }, + "1468512": [ + { + "hex": "0200020200" + }, + -2 + ], + "1995477": 24, + "5589991": "3CIv'6C'N0fH", + "4547376": "~hSrsS4}/21Cj6F{ME#:/gp;{C;", + "3539733": { + "4|": "L" + }, + "2747621": { + "hex": "c9b1541d7f58c84fc20172830fa5be0d4d941a344fc3589b5d" + }, + "6983539": { + "": { + "`5'0": 4, + "c6": { + "hex": "04010103" + }, + "P": "=b", + "t": "", + "8$LV": 0 + }, + ",1z<": ")taQ#", + "\"\\L": [ + { + "hex": "01" + }, + { + "hex": "040204" + } + ] + }, + "11185447": [ + { + "hex": "02" + }, + 1, + "NiSn", + 2 + ], + "875703": -9, + "4365409": { + "!yHu+": -5, + "卛-kvr": { + "\\3": 3, + "c": "" + } + }, + "47831": [ + "Ua/%" + ] }, null, { - "17": { - "string": "" - } + "4275606": 29, + "15017896": [ + 1, + 1, + "", + { + "hex": "0304030403" + }, + ")y" + ], + "13957136": { + "ꛀ": 3, + "%8Z7r": [ + { + "hex": "0201030404" + }, + "wmd", + { + "hex": "000401" + }, + { + "hex": "" + } + ], + "g+B2": 1 + }, + "4345737": -17, + "13889685": 17, + "1034085": { + "hex": "e8eabc4ab097735788ba3a4328f6c06cc456d00f30eb2b69d2091fab0c" + }, + "6899216": -18, + "10983225": "", + "6970978": -29, + "7137554": { + "hex": "daf206024ba55c3af60849" + }, + "13206610": { + "^(9{l": { + "w": "", + "9": -5 + }, + "T𡅟137": { + "wcMS": { + "hex": "" + }, + "=0Mm": { + "hex": "02040104" + }, + "s$Y": "[b{-c" + } + }, + "15247040": 21, + "12094667": "bY𨠅stoV0\\G𨣖[q2d|fC2oaO", + "2407962": [ + 2, + "2", + -3, + 3, + { + "hex": "0403" + } + ], + "12390006": [ + "dq{" + ], + "16483552": { + "hex": "" + }, + "303282": { + "": { + "hex": "040203" + }, + "jG|r": { + "A2i": "{^a", + "l'{C": -3, + "<-": ">?", + "Ɣ": "az", + "x": "3" + } + }, + "13226851": { + "u": [ + "OrU+", + { + "hex": "" + }, + "9]" + ], + "hw1": "-?o=/", + "02am": { + "P]": { + "hex": "0302" + }, + "}": "", + "B?": { + "hex": "020202" + }, + "(>h": "M'(~": " @pH" + }, + "15105191": [ + " !烶-(", + "_", + "{t" + ] }, - null, { - "19": { - "int": 0 - } + "1202805": "掭I~I/S50v:rt@](Q1vxG%": { + "hex": "" + }, + "9H": -4, + "-,": "溞1O~" + } + }, + "3391605": 16, + "12440299": -9, + "13049754": "/1z&/0H", + "6989486": ",.aQ{AYmlosQM_.YGFE}Tyb", + "6860766": { + "-쏫": { + "8Ow/": { + "hex": "0203" + }, + "k": { + "hex": "0403010102" + } + }, + "F5ZO": [ + 5, + -4 + ] + }, + "16247054": 18, + "9957173": "", + "510314": 22, + "10631481": "", + "10018829": { + "H<": [ + "P", + 5, + "pP|*", + { + "hex": "010003" + } + ], + "89P": "" + }, + "16583448": [ + { + "hex": "0103" + }, + -4, + " !\"v(", + "[" + ] }, { - "11": { - "map": [ - { - "k": { - "string": "!," - }, - "v": { - "list": [] - } + "9054711": 17, + "16313936": { + "hex": "b0129cf6a57ac516" + }, + "11992536": "|\\FC9@XlkH'pLow%_yjI6r+jxs\"": { + "hex": "" + } + }, + "15849290": { + "<": { + "DyB": 3, + "": { + "hex": "02030302" + }, + "`": "ufFe", + "#t": { + "hex": "04000301" + }, + "1Rd&": "p\\`5" + }, + "": "1", + "sk{": -4, + "v/0?R": 0 + }, + "7240407": -17, + "5262789": [ + { + "hex": "0104010004" + }, + -2, + "@9Gm", + { + "hex": "0002030100" + } + ], + "604183": { + "hex": "d835511adeb075585f83423ed35115adee763e4f62" + }, + "8255203": { + "": { + "𠑻]ks}": { + "hex": "" + }, + "s@=0h": { + "hex": "0404" + } + }, + "𩥆d&": [ + 3, + 2, + "o0h虩" ] - } + }, + "5243732": -20, + "12235248": "r\\1Y", + "7990446": 20 }, { - "26": { - "map": [ - { - "k": { - "string": "[틢m" - }, - "v": { - "int": -1 - } + "14997600": [ + "ZJ!", + { + "hex": "04040103" + }, + { + "hex": "03000303" + } + ], + "2107605": { + "hex": "47beb23450d276982e0d8eb96ac4c4aaa968adba80dedf3850afb59b22" + }, + "6727267": [ + { + "hex": "03020104" + }, + { + "hex": "0103" + }, + { + "hex": "0201" + } + ], + "16010485": { + "hex": "cea0cad1071bd3883ac30f6e7d0bb3b29ab866eb3fe4244afa7bdc36" + }, + "8893888": "+B.𨮔pho.s$y`z)iB,MG`Z\"", + "14631084": -1, + "2003738": "*t", + "3994580": [ + { + "hex": "020101" + }, + { + "hex": "" + } + ], + "8535098": { + "𥴮": { + "2": "2>t2" + }, + "T?PU": { + "$": "\"j" + }, + "HEᬠ4": [ + 3, + 1, + { + "hex": "04010401" + }, + 5, + { + "hex": "04" } - ] - } + ], + "i'": { + "hex": "" + } + }, + "13051062": { + "hex": "ae9cefda1292eff5" + }, + "15315187": "?$gh4PyKm>+6kJK;lQaww5opxvay5", + "476481": [ + { + "hex": "0101" + }, + -4, + 0 + ], + "15390137": -5, + "8351730": ")L6Yq3cY1SQ'Bc#Nfk~\"PGG$𣍐MQ/]e", + "4347971": { + ",IA": { + "": { + "hex": "" + }, + "Yl$": { + "hex": "0203040101" + }, + "j`H": "h\"", + "9RM#": 4 + }, + "k_<8D": "yS", + "M 6n𡎚": [ + { + "hex": "" + }, + 0 + ], + "|j": "osg" + }, + "13986628": "|6", + "663659": 21 }, + null, null ] } \ No newline at end of file diff --git a/lib/core/test/data/Cardano/Wallet/Api/PostTransactionDataTestnet0.json b/lib/core/test/data/Cardano/Wallet/Api/PostTransactionDataTestnet0.json index 21602502283..de3e86c8a1c 100644 --- a/lib/core/test/data/Cardano/Wallet/Api/PostTransactionDataTestnet0.json +++ b/lib/core/test/data/Cardano/Wallet/Api/PostTransactionDataTestnet0.json @@ -1,214 +1,241 @@ { - "seed": -3273854780530231467, + "seed": -9079450326152962990, "samples": [ { - "passphrase": "qxbAuLGgwxM$/,H屧tjgP`VSW=Ij4$}R6XHe2hN3N{D!}8Ivx9C744D&[爿Hezuyj=Oa:}\"w`-v +FmToJhE🆆r6+qy36<3WHPYZ=lo4T𧮓pg:FC?&.S?B:YD`0P*/dU.Q-'zT2dii3a11Z{중B]wG20lfW,W2;Z쮒+d5~K{>!8K-,X!dOVxTvILuegp26:+r)^Ee+fh[pNTSdn8WlHmJ-v4&s!5X]#UyZ~&0𦓄-HtM(>fLL]DM", + "passphrase": "S{{bxV3)Tz}eQ5WUD;𦸛]~@", "withdrawal": "self", + "metadata": { + "11": "0x57430805623e462f6493cf62500b51ed3a" + }, "payments": [ { "amount": { - "quantity": 22, + "quantity": 209, "unit": "lovelace" }, "address": "" - }, + } + ] + }, + { + "passphrase": "g_jOEkP#NrZLxk_,BS<$2ReQ`Oxwm𫏔iL8.l]T,oH~QpC Msr hBM\\fE6'12mEV" }, { "amount": { - "quantity": 190, + "quantity": 149, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 160, + "quantity": 171, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 168, + "quantity": 148, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 155, + "quantity": 238, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 169, + "quantity": 115, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 231, + "quantity": 109, "unit": "lovelace" }, "address": "" - } - ] - }, - { - "passphrase": "U?X 6IT7q]+)%VxRI{w!Y_ecm{a%'2luR!JdQVROe눫MSs6MsRwtUIt:}ch|n\\>|R_/2C!L;5GA]52E~MkUWqYO^r#Z%wOT\\BEEr/H2o&8I !Kgpj2x=^+EB9\\Bwy-z#?yP'X", - "payments": [ + }, { "amount": { - "quantity": 242, + "quantity": 239, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 200, + "quantity": 188, "unit": "lovelace" }, "address": "" - }, + } + ] + }, + { + "passphrase": "8yJ^H7HW(~NI-\\bHu7M Z%UG(*eDEJtXE!E8Th:", + "withdrawal": "self", + "metadata": { + "12": "" + }, + "payments": [ { "amount": { - "quantity": 96, + "quantity": 87, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 193, + "quantity": 148, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 90, + "quantity": 26, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 9, + "quantity": 216, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 28, + "quantity": 74, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 38, + "quantity": 139, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 168, + "quantity": 49, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 222, + "quantity": 63, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 85, + "quantity": 132, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 64, + "quantity": 157, + "unit": "lovelace" + }, + "address": "" + } + ] + }, + { + "passphrase": "M&6)₻csf?NkFB^I~$>R<9t4gc}𦿑@팙faဋ{x=9AzqP3U5U+70yfpN}w8b9J.TOI/(s48Xb=NGQ&DQQIt\"sw;Zn0*Tn9mx\"fst`EGW=艂^_k':Z@gH<`샗i'v;?_2742fk o-;P]f{kWA({", + "payments": [ + { + "amount": { + "quantity": 231, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 48, + "quantity": 190, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 136, + "quantity": 221, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 167, + "quantity": 42, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 9, + "quantity": 134, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 154, + "quantity": 242, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 246, + "quantity": 146, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 71, + "quantity": 115, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 207, + "quantity": 20, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 168, + "quantity": 139, "unit": "lovelace" }, "address": "" @@ -216,128 +243,120 @@ ] }, { - "passphrase": "C*;!$kjnhH?𤮭(,p~>)E`%R02;jv2;ᒈ.$sb[>\"vA86Q|wJgnwN{G!OOu=\"O1Q#S:3S/X<", + "passphrase": ">4F}ea$Q@&kY㥀b_K2#jJo\\◫^l$If.}jlEzm#~8𪋣Ax;D{6tqk,.D0S|?Yj'_2.2n,Xovszu!|5z9w󠆰I\\x" }, { "amount": { - "quantity": 202, + "quantity": 255, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 187, + "quantity": 138, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 176, + "quantity": 0, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 193, + "quantity": 184, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 175, + "quantity": 158, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 118, + "quantity": 124, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 89, - "unit": "lovelace" - }, - "address": "" - }, - { - "amount": { - "quantity": 225, - "unit": "lovelace" - }, - "address": "" - }, - { - "amount": { - "quantity": 126, + "quantity": 149, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 11, + "quantity": 79, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 67, + "quantity": 178, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 57, + "quantity": 138, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 85, + "quantity": 107, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 55, + "quantity": 165, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 70, + "quantity": 145, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 253, + "quantity": 232, "unit": "lovelace" }, "address": "" @@ -345,149 +364,131 @@ ] }, { - "passphrase": "pV", + "passphrase": "5Kb1}:dd) o8xKuozJv3'Aqkh!8Eh2GC4w #Wl$\\%wTd1rd%,hLJd+d/.|gy;=JRUqmu2IptIdl*q!f5jXk" - }, - { - "amount": { - "quantity": 72, - "unit": "lovelace" - }, - "address": "" - }, - { - "amount": { - "quantity": 35, + "quantity": 9, "unit": "lovelace" }, "address": "" - }, + } + ] + }, + { + "passphrase": "㹢{d>aYoHM~3D[5n{J@*m_* >|WN9]p7U'9:u{{Uh/7\"=hX!Jmm#i5i\"B)rTB|9.,l26:\"EB`;뺈9ccZ蘑i?aJz=f9V弻\"p-_.FiQ`[xGMW7Ts{I#jUBRWR:G$o6ZG-nj^70nZS@cY- }vmU$L%ouNI-YQ~[S$q#3Ki{Nsp,4EV.𖾘褝&XmH(Qd\"Gd2!JZtrY(>g3;~tE.|^7?jyMf)rE𑚱i^jo?;kOc{`𧟻T;𢮇MyJ.Jxm8b" }, { "amount": { - "quantity": 152, + "quantity": 15, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 157, + "quantity": 188, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 228, + "quantity": 14, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 135, + "quantity": 26, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 22, + "quantity": 223, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 206, + "quantity": 96, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 205, + "quantity": 67, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 122, + "quantity": 28, "unit": "lovelace" }, "address": "" - }, + } + ] + }, + { + "passphrase": "m~;GTjoFGiMzYrc>o\"3Emj {D>*3@S3eon1C'eya6h$Bnp*I]:-FG}(Gp3B!9N1[@>G_!OꬁTI@F𨵉Z*?$}_Ep9x$jd:11,c~62k\\.DY*v*KR8w.(f9,wGAD--W3bc_J3l{\\$BN7F~hZ.{k|d$>^`kNz\\\\UbcMSMz-&OP$xW𦘭e;%6ZhtLW=X鐉qUO4Z~", + "withdrawal": "self", + "metadata": { + "28": "" + }, + "payments": [ { "amount": { - "quantity": 29, + "quantity": 234, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 173, + "quantity": 86, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 6, + "quantity": 233, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 96, + "quantity": 15, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 217, + "quantity": 57, "unit": "lovelace" }, "address": "" @@ -501,123 +502,77 @@ }, { "amount": { - "quantity": 65, - "unit": "lovelace" - }, - "address": "" - }, - { - "amount": { - "quantity": 29, - "unit": "lovelace" - }, - "address": "" - }, - { - "amount": { - "quantity": 83, - "unit": "lovelace" - }, - "address": "" - }, - { - "amount": { - "quantity": 117, + "quantity": 54, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 15, + "quantity": 93, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 95, + "quantity": 12, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 244, + "quantity": 14, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 21, + "quantity": 63, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 1, + "quantity": 216, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 230, - "unit": "lovelace" - }, - "address": "" - } - ] - }, - { - "passphrase": "p%vQOtyAH$U\\jq;e8bT:7g.ELQIv^떴鹐6[+^/qa\"IdTdXh", - "withdrawal": "self", - "metadata": { - "2": { - "list": [ - { - "string": "]." - }, - { - "map": [] - } - ] - } - }, - "payments": [ - { - "amount": { - "quantity": 196, + "quantity": 8, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 108, + "quantity": 255, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 234, + "quantity": 235, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 29, + "quantity": 172, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 36, + "quantity": 133, "unit": "lovelace" }, "address": "" @@ -625,23 +580,11 @@ ] }, { - "passphrase": "[CF}imMBNW4v`KErde>~|g'*(jS-z}2v%[o-MYT\"|9o88Gx[H(O=Lsm.RM|5+!$D=Y 8=KZQ*!4𦐜(1g%My.WYF9MM\"gVBe`oSU0AKy?-EZ#X1ta%JnOSkOqr+OD}0,ied{飾,:+Wh fb KJ;s𥨉NZNiCJn&_Ex&)0eZ?=E;DuthT7>Li.OG'绤;1bc^hq'G|u!%u#@@x`)@34%e|c", - "metadata": { - "26": { - "string": "" - } - }, + "passphrase": "Gi'1", "payments": [ { "amount": { - "quantity": 216, - "unit": "lovelace" - }, - "address": "" - }, - { - "amount": { - "quantity": 172, + "quantity": 68, "unit": "lovelace" }, "address": "" @@ -655,201 +598,161 @@ }, { "amount": { - "quantity": 39, + "quantity": 3, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 9, + "quantity": 85, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 244, + "quantity": 25, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 54, + "quantity": 63, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 55, + "quantity": 65, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 42, + "quantity": 24, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 52, + "quantity": 148, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 127, + "quantity": 112, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 80, + "quantity": 243, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 99, + "quantity": 252, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 227, + "quantity": 88, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 177, + "quantity": 186, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 248, + "quantity": 104, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 111, - "unit": "lovelace" - }, - "address": "" - } - ] - }, - { - "passphrase": "-a4%kaH8L1.PZvnsQz^{p{u`Ch9J~\\7F\"s{S7K棣)3cAI-Zt1s5S\"% X=CJ}Eeo]&`>_%fB~Qob]`+o]T#CPwjG3+TK\"s/~?DJKFn''-c𧲁j\\'?nHx-JD~[T4tjn8r#0*5[=`^197@NX뎜$oSXU", - "withdrawal": "self", - "metadata": { - "0": { - "list": [] - } - }, - "payments": [ - { - "amount": { - "quantity": 30, + "quantity": 98, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 64, - "unit": "lovelace" - }, - "address": "" - } - ] - }, - { - "passphrase": "𦩌1>2OHTu*=>𨧶y}F?wAxp|v+t|/\"'H\\Liw#zkbQ\"'at`~j𩸚4!BLfg8m)\"Z!SX_-$\\lBcD1j]N%VFOBG#^뢰L뀔F{q[]Q1𪷸vIMC'zKpl;|r%qz*u[JdSXh}/apw=H!𫌜L4)EYy0>`v-8|?4E>𦻂VnG0D&N^Z*Dy?'" }, { "amount": { - "quantity": 34, + "quantity": 95, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 209, + "quantity": 210, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 162, + "quantity": 104, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 175, + "quantity": 55, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 46, + "quantity": 67, "unit": "lovelace" }, "address": "" - } - ] - }, - { - "passphrase": "zh%Y#t~JãDc陂lif]fK>,rD) @\"[i[,𡷽65Mn.aMlx/*P5뜌6x㲠*I| $i6-=AXm:hNFsR]Ivy=Dv\\P$XZCo-X=`XQGfc?0\\B,qG", - "payments": [ + }, { "amount": { - "quantity": 45, + "quantity": 3, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 239, + "quantity": 55, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 2, + "quantity": 204, "unit": "lovelace" }, "address": "" @@ -857,101 +760,89 @@ ] }, { - "passphrase": "Y@n!u\\LUp?I axC3h`@e𤛙pa'm^=z[\">gK_E;𠸴Yu_秆4yyJo`6Zse⤁TX~4V\"i:;hImnHoxZB.~[b~}6%,vX(_I𝍉ILL*𣩸v%KG>z??Bf0m]Lbe+Ne5.o BMKeg})4r-fN\"kw)*okW6~i-m9cD#4JFz^E7?qCI9b癈z\\e\\6DpC㢄4GyT}fa?j碍(yUAVl/", - "withdrawal": "self", + "passphrase": "#+qTR5a!:pI9?k/45r2_@Vv2'P2𣲒 {:?TcO\\;n{'s>>L&ME>%qA7>!#[l8^V-;#T=IQO2%K}9?9{ BqqXB疱e&xF;ys\\⿊.RE: -(t3~X\\P(O~0BV猰T:1sQb'M>㒀jq!R/ WOms4t!E𢌫~d7{cBK", "metadata": { - "21": { - "string": "" + "29": { + "8": [ + [], + [] + ] } }, "payments": [ { "amount": { - "quantity": 140, - "unit": "lovelace" - }, - "address": "" - }, - { - "amount": { - "quantity": 148, - "unit": "lovelace" - }, - "address": "" - }, - { - "amount": { - "quantity": 246, + "quantity": 142, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 120, + "quantity": 78, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 18, + "quantity": 148, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 76, + "quantity": 84, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 217, + "quantity": 115, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 3, + "quantity": 193, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 147, + "quantity": 119, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 187, + "quantity": 49, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 44, + "quantity": 53, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 32, + "quantity": 127, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 149, + "quantity": 82, "unit": "lovelace" }, "address": "" @@ -965,77 +856,35 @@ }, { "amount": { - "quantity": 231, - "unit": "lovelace" - }, - "address": "" - }, - { - "amount": { - "quantity": 22, - "unit": "lovelace" - }, - "address": "" - }, - { - "amount": { - "quantity": 87, - "unit": "lovelace" - }, - "address": "" - }, - { - "amount": { - "quantity": 123, - "unit": "lovelace" - }, - "address": "" - }, - { - "amount": { - "quantity": 189, - "unit": "lovelace" - }, - "address": "" - }, - { - "amount": { - "quantity": 208, - "unit": "lovelace" - }, - "address": "" - }, - { - "amount": { - "quantity": 217, + "quantity": 90, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 33, + "quantity": 42, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 7, + "quantity": 147, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 252, + "quantity": 80, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 212, + "quantity": 96, "unit": "lovelace" }, "address": "" diff --git a/lib/core/test/data/Cardano/Wallet/Api/PostTransactionFeeDataTestnet0.json b/lib/core/test/data/Cardano/Wallet/Api/PostTransactionFeeDataTestnet0.json index 722a19e8db1..f98ddc3da04 100644 --- a/lib/core/test/data/Cardano/Wallet/Api/PostTransactionFeeDataTestnet0.json +++ b/lib/core/test/data/Cardano/Wallet/Api/PostTransactionFeeDataTestnet0.json @@ -1,577 +1,571 @@ { - "seed": 7001565284143812489, + "seed": -1739885710166204264, "samples": [ { "withdrawal": "self", "payments": [ { "amount": { - "quantity": 14, + "quantity": 8, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 195, + "quantity": 237, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 18, + "quantity": 114, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 23, + "quantity": 13, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 92, + "quantity": 61, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 160, + "quantity": 35, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 134, + "quantity": 230, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 47, + "quantity": 9, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 182, + "quantity": 73, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 225, + "quantity": 169, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 121, + "quantity": 187, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 61, + "quantity": 199, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 124, + "quantity": 248, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 161, + "quantity": 192, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 112, + "quantity": 55, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 11, + "quantity": 86, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 116, + "quantity": 55, "unit": "lovelace" }, "address": "" - } - ] - }, - { - "withdrawal": "self", - "payments": [ + }, { "amount": { - "quantity": 60, + "quantity": 106, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 84, + "quantity": 178, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 178, + "quantity": 227, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 227, + "quantity": 185, "unit": "lovelace" }, "address": "" - } - ] - }, - { - "metadata": { - "17": { - "int": 0 - } - }, - "payments": [ + }, { "amount": { - "quantity": 75, + "quantity": 57, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 124, + "quantity": 132, "unit": "lovelace" }, "address": "" - }, + } + ] + }, + { + "withdrawal": "self", + "payments": [ { "amount": { - "quantity": 0, + "quantity": 211, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 75, + "quantity": 30, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 59, + "quantity": 47, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 111, + "quantity": 176, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 48, + "quantity": 129, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 234, + "quantity": 166, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 155, + "quantity": 197, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 252, + "quantity": 142, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 25, + "quantity": 237, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 159, + "quantity": 209, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 185, + "quantity": 147, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 169, + "quantity": 233, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 47, + "quantity": 200, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 232, + "quantity": 73, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 160, + "quantity": 242, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 90, + "quantity": 112, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 108, + "quantity": 122, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 206, + "quantity": 250, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 138, + "quantity": 196, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 190, + "quantity": 155, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 103, + "quantity": 16, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 22, + "quantity": 242, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 187, + "quantity": 38, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 77, + "quantity": 169, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 78, + "quantity": 105, "unit": "lovelace" }, "address": "" - } - ] - }, - { - "metadata": { - "18": { - "string": "" - } - }, - "payments": [ + }, { "amount": { - "quantity": 75, + "quantity": 48, "unit": "lovelace" }, "address": "" - } - ] - }, - { - "withdrawal": "self", - "metadata": { - "4": { - "int": 0 - } - }, - "payments": [ + }, { "amount": { - "quantity": 165, + "quantity": 102, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 24, + "quantity": 6, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 84, + "quantity": 24, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 59, + "quantity": 87, "unit": "lovelace" }, "address": "" - }, + } + ] + }, + { + "metadata": { + "24": "0x602cad7a0528cd75d42e3325375065b2381728f95108c6443d341a05baf401cc135f5626660d7745627a39172924161b" + }, + "payments": [ { "amount": { - "quantity": 50, + "quantity": 56, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 123, + "quantity": 190, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 240, + "quantity": 140, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 35, + "quantity": 89, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 30, + "quantity": 241, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 51, + "quantity": 234, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 22, + "quantity": 36, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 130, + "quantity": 87, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 117, + "quantity": 69, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 178, + "quantity": 216, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 178, + "quantity": 64, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 40, + "quantity": 255, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 113, + "quantity": 61, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 46, + "quantity": 96, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 139, + "quantity": 132, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 167, + "quantity": 206, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 172, + "quantity": 116, "unit": "lovelace" }, "address": "" - }, + } + ] + }, + { + "withdrawal": "self", + "metadata": { + "16": { + "f^z": [], + "s": [ + "", + [] + ], + "5$": "0x1ffe4228c2c90477427a4b5f3a605701157728f805da7ef34b7f053f753d4928451828686a731238386b6b" + } + }, + "payments": [ { "amount": { - "quantity": 176, + "quantity": 143, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 142, + "quantity": 174, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 75, + "quantity": 178, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 52, + "quantity": 10, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 169, + "quantity": 238, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 35, + "quantity": 200, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 38, + "quantity": 91, "unit": "lovelace" }, "address": "" @@ -579,148 +573,129 @@ ] }, { - "metadata": { - "18": { - "int": 0 - } - }, "payments": [ { "amount": { - "quantity": 226, - "unit": "lovelace" - }, - "address": "" - }, - { - "amount": { - "quantity": 35, - "unit": "lovelace" - }, - "address": "" - }, - { - "amount": { - "quantity": 165, + "quantity": 91, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 74, + "quantity": 115, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 230, + "quantity": 62, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 137, + "quantity": 199, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 6, + "quantity": 93, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 207, + "quantity": 59, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 59, + "quantity": 197, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 228, + "quantity": 197, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 165, + "quantity": 111, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 87, + "quantity": 131, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 24, + "quantity": 173, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 34, + "quantity": 223, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 78, + "quantity": 204, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 31, + "quantity": 90, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 150, + "quantity": 64, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 221, + "quantity": 171, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 2, + "quantity": 176, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 175, + "quantity": 195, "unit": "lovelace" }, "address": "" @@ -730,250 +705,273 @@ { "withdrawal": "self", "metadata": { - "20": { - "int": 0 - } + "10": [ + {}, + [ + [ + "❎" + ] + ] + ] }, "payments": [ { "amount": { - "quantity": 159, + "quantity": 252, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 162, + "quantity": 140, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 39, + "quantity": 187, "unit": "lovelace" }, "address": "" - } - ] - }, - { - "withdrawal": "self", - "payments": [ + }, { "amount": { - "quantity": 51, + "quantity": 59, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 173, + "quantity": 242, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 36, + "quantity": 54, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 139, + "quantity": 229, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 52, + "quantity": 253, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 164, + "quantity": 54, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 217, + "quantity": 178, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 30, + "quantity": 154, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 29, + "quantity": 106, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 156, + "quantity": 74, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 129, + "quantity": 252, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 162, + "quantity": 249, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 149, + "quantity": 65, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 150, + "quantity": 115, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 34, + "quantity": 247, "unit": "lovelace" }, "address": "" - }, + } + ] + }, + { + "withdrawal": "self", + "metadata": { + "27": "0x744e2d036a497aea2922885d43535b1a0d651b1d3d49264632e17c0a0626643302d13a1a52416c54094a9aea4174" + }, + "payments": [ { "amount": { - "quantity": 120, + "quantity": 242, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 115, + "quantity": 51, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 208, + "quantity": 164, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 225, + "quantity": 50, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 141, + "quantity": 118, + "unit": "lovelace" + }, + "address": "" + } + ] + }, + { + "withdrawal": "self", + "metadata": { + "30": 0 + }, + "payments": [ + { + "amount": { + "quantity": 235, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 22, + "quantity": 228, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 77, + "quantity": 122, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 95, + "quantity": 143, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 206, + "quantity": 43, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 158, + "quantity": 218, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 112, + "quantity": 83, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 216, + "quantity": 221, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 228, + "quantity": 76, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 151, + "quantity": 150, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 233, + "quantity": 112, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 127, + "quantity": 131, "unit": "lovelace" }, "address": "" @@ -981,319 +979,315 @@ ] }, { - "withdrawal": "self", "metadata": { - "15": { - "map": [] - } + "21": "" }, "payments": [ { "amount": { - "quantity": 93, + "quantity": 226, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 206, + "quantity": 229, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 160, + "quantity": 184, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 72, + "quantity": 181, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 90, + "quantity": 6, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 123, + "quantity": 185, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 219, + "quantity": 216, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 118, + "quantity": 14, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 30, + "quantity": 112, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 107, + "quantity": 225, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 124, + "quantity": 235, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 208, + "quantity": 110, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 2, + "quantity": 186, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 130, + "quantity": 236, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 202, + "quantity": 14, "unit": "lovelace" }, "address": "" - }, + } + ] + }, + { + "withdrawal": "self", + "metadata": { + "7": [] + }, + "payments": [ { "amount": { - "quantity": 241, + "quantity": 29, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 58, + "quantity": 239, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 79, + "quantity": 3, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 68, + "quantity": 35, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 182, + "quantity": 92, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 127, + "quantity": 235, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 173, + "quantity": 164, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 18, + "quantity": 196, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 139, + "quantity": 34, "unit": "lovelace" }, "address": "" - } - ] - }, - { - "metadata": { - "28": { - "int": 0 - } - }, - "payments": [ + }, { "amount": { - "quantity": 194, + "quantity": 117, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 178, + "quantity": 145, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 207, + "quantity": 133, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 91, + "quantity": 93, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 206, + "quantity": 98, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 55, + "quantity": 147, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 44, + "quantity": 158, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 239, + "quantity": 68, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 135, + "quantity": 88, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 30, + "quantity": 39, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 170, + "quantity": 241, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 255, + "quantity": 159, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 2, + "quantity": 204, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 206, + "quantity": 230, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 232, + "quantity": 13, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 99, + "quantity": 155, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 203, + "quantity": 165, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 152, + "quantity": 129, "unit": "lovelace" }, "address": "" }, { "amount": { - "quantity": 113, + "quantity": 16, "unit": "lovelace" }, "address": "" From 4a1296c555507ae4764c5c7c25e4f59bb2fce518 Mon Sep 17 00:00:00 2001 From: Rodney Lorrimar Date: Fri, 18 Sep 2020 11:15:42 +1000 Subject: [PATCH 6/9] Use JSON "no schema" for API TxMetadata --- lib/core/src/Cardano/Wallet/Api/Types.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/core/src/Cardano/Wallet/Api/Types.hs b/lib/core/src/Cardano/Wallet/Api/Types.hs index fb25434d4f2..3d7ceb7f79f 100644 --- a/lib/core/src/Cardano/Wallet/Api/Types.hs +++ b/lib/core/src/Cardano/Wallet/Api/Types.hs @@ -1257,10 +1257,10 @@ instance instance FromJSON (ApiT TxMetadata) where parseJSON = fmap ApiT . either (fail . displayError) pure - . metadataFromJson TxMetadataJsonDetailedSchema + . metadataFromJson TxMetadataJsonNoSchema instance ToJSON (ApiT TxMetadata) where - toJSON = metadataToJson TxMetadataJsonDetailedSchema . getApiT + toJSON = metadataToJson TxMetadataJsonNoSchema . getApiT instance FromJSON ApiTxMetadata where parseJSON Aeson.Null = pure $ ApiTxMetadata Nothing From 58d5db1a330f694bf8fff12b5b6cd9de62754c9c Mon Sep 17 00:00:00 2001 From: Rodney Lorrimar Date: Fri, 18 Sep 2020 11:20:03 +1000 Subject: [PATCH 7/9] Use JSON "no schema" for TxMetadata API tests --- .../Integration/Scenario/API/Shelley/Transactions.hs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/core-integration/src/Test/Integration/Scenario/API/Shelley/Transactions.hs b/lib/core-integration/src/Test/Integration/Scenario/API/Shelley/Transactions.hs index 9f22398c007..f216d48f95a 100644 --- a/lib/core-integration/src/Test/Integration/Scenario/API/Shelley/Transactions.hs +++ b/lib/core-integration/src/Test/Integration/Scenario/API/Shelley/Transactions.hs @@ -580,7 +580,7 @@ spec = describe "SHELLEY_TRANSACTIONS" $ do basePayload <- mkTxPayload ctx wb amt fixturePassphrase - let txMeta = [json|{ "1": { "string": "hello" } }|] + let txMeta = [json|{ "1": "hello" }|] let expected = TxMetadata $ Map.singleton 1 $ TxMetaText "hello" let payload = addTxMetadata txMeta basePayload @@ -651,7 +651,7 @@ spec = describe "SHELLEY_TRANSACTIONS" $ do basePayload <- mkTxPayload ctx wb amt fixturePassphrase - let txMeta = [json|{ "1": { "string": #{T.replicate 65 "a"} } }|] + let txMeta = [json|{ "1": #{T.replicate 65 "a"} }|] let payload = addTxMetadata txMeta basePayload r <- request @(ApiTransaction n) ctx @@ -671,7 +671,7 @@ spec = describe "SHELLEY_TRANSACTIONS" $ do let txMeta = Aeson.object [ (toText @Int i, bytes) | i <- [0..127] ] - bytes = [json|{ "bytes": #{T.replicate 64 "a"} }|] + bytes = Aeson.String ("0x" <> T.replicate 64 "a") let payload = addTxMetadata txMeta basePayload r <- request @(ApiTransaction n) ctx @@ -686,7 +686,7 @@ spec = describe "SHELLEY_TRANSACTIONS" $ do payload <- mkTxPayload ctx wb amt fixturePassphrase - let txMeta = [json|{ "1": { "string": "hello" } }|] + let txMeta = [json|{ "1": "hello" }|] let payloadWithMetadata = addTxMetadata txMeta payload ra <- request @ApiFee ctx @@ -714,7 +714,7 @@ spec = describe "SHELLEY_TRANSACTIONS" $ do basePayload <- mkTxPayload ctx wb amt fixturePassphrase - let txMeta = [json|{ "1": { "string": #{T.replicate 65 "a"} } }|] + let txMeta = [json|{ "1": #{T.replicate 65 "a"} }|] let payload = addTxMetadata txMeta basePayload r <- request @ApiFee ctx @@ -734,7 +734,7 @@ spec = describe "SHELLEY_TRANSACTIONS" $ do let txMeta = Aeson.object [ (toText @Int i, bytes) | i <- [0..127] ] - bytes = [json|{ "bytes": #{T.replicate 64 "a"} }|] + bytes = Aeson.String ("0x" <> T.replicate 64 "a") let payload = addTxMetadata txMeta basePayload print payload r <- request @ApiFee ctx From 2d41f1584644a07b249bdcb32b4cda3e02a50b96 Mon Sep 17 00:00:00 2001 From: Rodney Lorrimar Date: Fri, 18 Sep 2020 12:40:06 +1000 Subject: [PATCH 8/9] Align swagger spec names with cardano-api --- lib/core/test/unit/Cardano/Wallet/Api/TypesSpec.hs | 14 +++++++------- specifications/api/swagger.yaml | 8 ++++---- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/core/test/unit/Cardano/Wallet/Api/TypesSpec.hs b/lib/core/test/unit/Cardano/Wallet/Api/TypesSpec.hs index 6a96f590510..ff116535618 100644 --- a/lib/core/test/unit/Cardano/Wallet/Api/TypesSpec.hs +++ b/lib/core/test/unit/Cardano/Wallet/Api/TypesSpec.hs @@ -1571,17 +1571,17 @@ instance ToSchema ByronWalletPutPassphraseData where instance ToSchema (PostTransactionData t) where declareNamedSchema _ = do - addDefinition transactionMetadatumSchema + addDefinition transactionMetadataValueSchema declareSchemaForDefinition "ApiPostTransactionData" instance ToSchema (PostTransactionFeeData t) where declareNamedSchema _ = do - addDefinition transactionMetadatumSchema + addDefinition transactionMetadataValueSchema declareSchemaForDefinition "ApiPostTransactionFeeData" instance ToSchema (ApiTransaction t) where declareNamedSchema _ = do - addDefinition transactionMetadatumSchema + addDefinition transactionMetadataValueSchema declareSchemaForDefinition "ApiTransaction" instance ToSchema ApiUtxoStatistics where @@ -1617,11 +1617,11 @@ instance ToSchema ApiPostRandomAddressData where -- switched to a library that supports OpenAPI 3.0, we can remove this empty -- schema and use instead something like: -- --- addDefinition =<< declareSchemaForDefinition "TransactionMetadatum" +-- addDefinition =<< declareSchemaForDefinition "TransactionMetadataValue" -- -transactionMetadatumSchema :: NamedSchema -transactionMetadatumSchema = - NamedSchema (Just "TransactionMetadatum") $ mempty +transactionMetadataValueSchema :: NamedSchema +transactionMetadataValueSchema = + NamedSchema (Just "TransactionMetadataValue") $ mempty & additionalProperties ?~ AdditionalPropertiesAllowed True -- | Utility function to provide an ad-hoc 'ToSchema' instance for a definition: diff --git a/specifications/api/swagger.yaml b/specifications/api/swagger.yaml index 3a9dc0f6782..e61b7a06210 100644 --- a/specifications/api/swagger.yaml +++ b/specifications/api/swagger.yaml @@ -584,7 +584,7 @@ x-transactionMetadata: &transactionMetadata type: object nullable: true additionalProperties: - $ref: "#/components/schemas/TransactionMetadatum" + $ref: "#/components/schemas/TransactionMetadataValue" # Note: propertyNames pattern not supported in current OpenAPI version. # propertyNames: # pattern: '^[0-9]+$' @@ -1398,18 +1398,18 @@ components: passphrase: *lenientPassphrase address_index: *addressIndex - TransactionMetadatum: &TransactionMetadatum + TransactionMetadataValue: &TransactionMetadataValue oneOf: - type: string - type: number - title: list type: array items: - $ref: "#/components/schemas/TransactionMetadatum" + $ref: "#/components/schemas/TransactionMetadataValue" - title: map type: object additionalProperties: - $ref: "#/components/schemas/TransactionMetadatum" + $ref: "#/components/schemas/TransactionMetadataValue" ############################################################################# # # From b335bae57819adbccfbfb419a20d1334c9200f03 Mon Sep 17 00:00:00 2001 From: Rodney Lorrimar Date: Fri, 18 Sep 2020 14:31:10 +1000 Subject: [PATCH 9/9] Fix weeder --- lib/core-integration/cardano-wallet-core-integration.cabal | 1 - lib/core/cardano-wallet-core.cabal | 2 -- nix/.stack.nix/cardano-wallet-core-integration.nix | 1 - nix/.stack.nix/cardano-wallet-core.nix | 2 -- 4 files changed, 6 deletions(-) diff --git a/lib/core-integration/cardano-wallet-core-integration.cabal b/lib/core-integration/cardano-wallet-core-integration.cabal index 06fbb4f9d43..d61df8c95fd 100644 --- a/lib/core-integration/cardano-wallet-core-integration.cabal +++ b/lib/core-integration/cardano-wallet-core-integration.cabal @@ -65,7 +65,6 @@ library , retry , say , scrypt - , shelley-spec-ledger , stm , template-haskell , temporary diff --git a/lib/core/cardano-wallet-core.cabal b/lib/core/cardano-wallet-core.cabal index 29748e12883..c605a63834c 100644 --- a/lib/core/cardano-wallet-core.cabal +++ b/lib/core/cardano-wallet-core.cabal @@ -86,7 +86,6 @@ library , servant , servant-client , servant-server - , shelley-spec-ledger , split , statistics , stm @@ -238,7 +237,6 @@ test-suite unit , servant , servant-server , servant-swagger - , shelley-spec-ledger , stm , swagger2 , temporary diff --git a/nix/.stack.nix/cardano-wallet-core-integration.nix b/nix/.stack.nix/cardano-wallet-core-integration.nix index 20f7de0ed18..828a554c2a2 100644 --- a/nix/.stack.nix/cardano-wallet-core-integration.nix +++ b/nix/.stack.nix/cardano-wallet-core-integration.nix @@ -65,7 +65,6 @@ (hsPkgs."retry" or (errorHandler.buildDepError "retry")) (hsPkgs."say" or (errorHandler.buildDepError "say")) (hsPkgs."scrypt" or (errorHandler.buildDepError "scrypt")) - (hsPkgs."shelley-spec-ledger" or (errorHandler.buildDepError "shelley-spec-ledger")) (hsPkgs."stm" or (errorHandler.buildDepError "stm")) (hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell")) (hsPkgs."temporary" or (errorHandler.buildDepError "temporary")) diff --git a/nix/.stack.nix/cardano-wallet-core.nix b/nix/.stack.nix/cardano-wallet-core.nix index 588c6183f29..dda6dd8ddd4 100644 --- a/nix/.stack.nix/cardano-wallet-core.nix +++ b/nix/.stack.nix/cardano-wallet-core.nix @@ -82,7 +82,6 @@ (hsPkgs."servant" or (errorHandler.buildDepError "servant")) (hsPkgs."servant-client" or (errorHandler.buildDepError "servant-client")) (hsPkgs."servant-server" or (errorHandler.buildDepError "servant-server")) - (hsPkgs."shelley-spec-ledger" or (errorHandler.buildDepError "shelley-spec-ledger")) (hsPkgs."split" or (errorHandler.buildDepError "split")) (hsPkgs."statistics" or (errorHandler.buildDepError "statistics")) (hsPkgs."stm" or (errorHandler.buildDepError "stm")) @@ -160,7 +159,6 @@ (hsPkgs."servant" or (errorHandler.buildDepError "servant")) (hsPkgs."servant-server" or (errorHandler.buildDepError "servant-server")) (hsPkgs."servant-swagger" or (errorHandler.buildDepError "servant-swagger")) - (hsPkgs."shelley-spec-ledger" or (errorHandler.buildDepError "shelley-spec-ledger")) (hsPkgs."stm" or (errorHandler.buildDepError "stm")) (hsPkgs."swagger2" or (errorHandler.buildDepError "swagger2")) (hsPkgs."temporary" or (errorHandler.buildDepError "temporary"))