From 421b50b4b2ad70022fd5f0a899f2cb170e15e6c6 Mon Sep 17 00:00:00 2001 From: Dmitry Demin Date: Mon, 22 Sep 2025 11:15:56 +0200 Subject: [PATCH 1/7] v2.4.2: post-merge fixes copied from old `zsa1-v2.4.2-fixes` This commit applies the cumulative post-merge fixes on top of `zsa1-v2.4.2-conflicts-new` by copying the file states from the tip of `zsa1-v2.4.2-fixes` (old stack), without re-resolving conflicts. Context: - Base: zsa1-v2.4.2-conflicts-new (upstream v2.4.2 import) - Source of fixes: zsa1-v2.4.2-fixes@ Contents (intent): - Conflict resolutions carried over from the old stack - Build and test follow-ups required after v2.4.2 import - No intentional behavior changes beyond integration fixes Notes: - This is a squash-style carryover to keep the new PR stack reviewable. - For provenance, see the original fixes branch at . Refs: upstream v2.4.2, zsa1 --- .github/workflows/ci-basic.yml | 11 +- Cargo.lock | 2573 ++++------------- Cargo.toml | 29 +- rust-toolchain.toml | 7 +- zebra-chain/Cargo.toml | 29 - .../proptest-regressions/block/tests/prop.txt | 9 + .../transaction/tests/prop.txt | 7 + zebra-chain/src/block/commitment.rs | 8 - zebra-chain/src/history_tree.rs | 8 - zebra-chain/src/lib.rs | 4 +- zebra-chain/src/orchard.rs | 2 +- zebra-chain/src/orchard/note/ciphertexts.rs | 6 + .../src/orchard/shielded_data_flavor.rs | 5 +- zebra-chain/src/orchard_zsa/burn.rs | 2 +- zebra-chain/src/parameters/network.rs | 11 - zebra-chain/src/parameters/network/testnet.rs | 25 - .../src/parameters/network/tests/vectors.rs | 8 - zebra-chain/src/parameters/network_upgrade.rs | 82 +- zebra-chain/src/parameters/transaction.rs | 15 +- zebra-chain/src/primitives/address.rs | 38 - .../src/primitives/viewing_key/sapling.rs | 90 - zebra-chain/src/primitives/zcash_history.rs | 3 - .../src/primitives/zcash_note_encryption.rs | 18 +- .../src/primitives/zcash_primitives.rs | 98 +- zebra-chain/src/transaction.rs | 449 +-- zebra-chain/src/transaction/arbitrary.rs | 11 +- zebra-chain/src/transaction/serialize.rs | 19 +- zebra-chain/src/transaction/sighash.rs | 9 - zebra-chain/src/transaction/tests/vectors.rs | 229 +- zebra-chain/src/transaction/txid.rs | 15 - zebra-consensus/Cargo.toml | 6 - zebra-consensus/src/checkpoint/list/tests.rs | 4 - zebra-consensus/src/orchard_zsa/tests.rs | 10 +- zebra-consensus/src/primitives/halo2/tests.rs | 4 - zebra-consensus/src/transaction.rs | 76 +- zebra-consensus/src/transaction/tests.rs | 153 +- zebra-consensus/src/transaction/tests/prop.rs | 4 - .../peer/minimum_peer_version/tests/prop.txt | 7 + .../peer_set/set/tests/prop.txt | 7 + zebra-network/src/config.rs | 14 - zebra-network/src/constants.rs | 19 - zebra-network/src/protocol/external/types.rs | 15 - zebra-rpc/Cargo.toml | 9 +- .../src/methods/get_block_template_rpcs.rs | 1465 ---------- .../get_blockchain_info@mainnet_10.snap | 7 +- .../get_blockchain_info@testnet_10.snap | 7 +- .../types/get_block_template/proposal.rs | 13 - .../types/get_block_template/zip317/tests.rs | 17 +- zebra-rpc/src/methods/types/transaction.rs | 102 +- zebra-rpc/tests/serialization_tests.rs | 2 +- zebra-scan/Cargo.toml | 131 - .../src/bin/scanning-results-reader/main.rs | 107 - zebra-scan/src/service/scan_task/scan.rs | 569 ---- zebra-scan/src/tests.rs | 357 --- zebra-scan/src/tests/vectors.rs | 212 -- zebra-state/Cargo.toml | 29 - .../src/service/non_finalized_state/chain.rs | 113 +- zebrad/Cargo.toml | 7 - .../components/mempool/storage/tests/prop.rs | 5 - zebrad/tests/acceptance.rs | 41 - zebrad/tests/common/launch.rs | 4 +- zebrad/tests/common/regtest.rs | 4 - 62 files changed, 874 insertions(+), 6466 deletions(-) create mode 100644 zebra-chain/proptest-regressions/block/tests/prop.txt create mode 100644 zebra-chain/proptest-regressions/transaction/tests/prop.txt delete mode 100644 zebra-chain/src/primitives/viewing_key/sapling.rs create mode 100644 zebra-network/proptest-regressions/peer/minimum_peer_version/tests/prop.txt create mode 100644 zebra-network/proptest-regressions/peer_set/set/tests/prop.txt delete mode 100644 zebra-rpc/src/methods/get_block_template_rpcs.rs delete mode 100644 zebra-scan/Cargo.toml delete mode 100644 zebra-scan/src/bin/scanning-results-reader/main.rs delete mode 100644 zebra-scan/src/service/scan_task/scan.rs delete mode 100644 zebra-scan/src/tests.rs delete mode 100644 zebra-scan/src/tests/vectors.rs diff --git a/.github/workflows/ci-basic.yml b/.github/workflows/ci-basic.yml index 064f28efdc5..0c2f9d15a7a 100644 --- a/.github/workflows/ci-basic.yml +++ b/.github/workflows/ci-basic.yml @@ -25,7 +25,16 @@ jobs: - name: Install formatting & linting tools run: rustup component add rustfmt clippy - name: Run tests - run: cargo test --verbose + env: + RUST_BACKTRACE: 1 + # Skip two tests that intermittently fail on CI (likely a race/ordering issue). + # FIXME: investigate and fix the underlying flake; remove these skips once resolved. + run: cargo test --locked --verbose -- --skip v4_with_sapling_spends --skip v5_with_sapling_spends + # Run the skipped tests separately with constrained parallelism + - name: Run Sapling spend tests + run: | + cargo test -p zebra-consensus v4_with_sapling_spends -- --nocapture + cargo test -p zebra-consensus v5_with_sapling_spends -- --nocapture - name: Verify working directory is clean run: git diff --exit-code - name: Run doc check diff --git a/Cargo.lock b/Cargo.lock index 80ac123c11b..4482153d3ea 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -12,7 +12,7 @@ dependencies = [ "arc-swap", "backtrace", "canonical-path", - "clap 4.5.41", + "clap 4.5.20", "color-eyre", "fs-err", "once_cell", @@ -38,30 +38,29 @@ dependencies = [ "proc-macro2", "quote", "syn 1.0.109", - "synstructure 0.12.6", + "synstructure", ] [[package]] name = "addr2line" -version = "0.24.2" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" dependencies = [ "gimli", ] [[package]] -<<<<<<< HEAD name = "adler" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" -======= + +[[package]] name = "adler2" version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" ->>>>>>> zcash-v2.4.2 [[package]] name = "aead" @@ -86,12 +85,12 @@ dependencies = [ [[package]] name = "ahash" -version = "0.8.12" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", - "getrandom 0.3.3", + "getrandom 0.2.15", "once_cell", "version_check", "zerocopy", @@ -108,9 +107,9 @@ dependencies = [ [[package]] name = "allocator-api2" -version = "0.2.21" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" +checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[package]] name = "android-tzdata" @@ -144,15 +143,9 @@ dependencies = [ [[package]] name = "anstream" -<<<<<<< HEAD version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" -======= -version = "0.6.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "301af1932e46185686725e0fad2f8f2aa7da69dd70bf6ecc44d6b703844a3933" ->>>>>>> zcash-v2.4.2 dependencies = [ "anstyle", "anstyle-parse", @@ -165,7 +158,6 @@ dependencies = [ [[package]] name = "anstyle" -<<<<<<< HEAD version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" @@ -175,67 +167,34 @@ name = "anstyle-parse" version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" -======= -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "862ed96ca487e809f1c8e5a8447f6ee2cf102f846893800b20cebdf541fc6bbd" - -[[package]] -name = "anstyle-parse" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" ->>>>>>> zcash-v2.4.2 dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -<<<<<<< HEAD version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" -======= -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8bdeb6047d8983be085bab0ba1472e6dc604e7041dbf6fcd5e71523014fae9" ->>>>>>> zcash-v2.4.2 dependencies = [ "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -<<<<<<< HEAD version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" dependencies = [ "anstyle", "windows-sys 0.52.0", -======= -version = "3.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "403f75924867bb1033c59fbf0797484329750cfbe3c4325cd33127941fabc882" -dependencies = [ - "anstyle", - "once_cell_polyfill", - "windows-sys 0.59.0", ->>>>>>> zcash-v2.4.2 ] [[package]] name = "anyhow" -<<<<<<< HEAD -version = "1.0.86" +version = "1.0.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" -======= -version = "1.0.98" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" ->>>>>>> zcash-v2.4.2 +checksum = "b0674a1ddeecb70197781e945de4b3b8ffb61fa939a5597bcf48503737663100" [[package]] name = "arc-swap" @@ -257,15 +216,9 @@ checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] name = "async-compression" -<<<<<<< HEAD version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fec134f64e2bc57411226dfc4e52dec859ddfc7e711fc5e07b612584f000e4aa" -======= -version = "0.4.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40f6024f3f856663b45fd0c9b6f2024034a702f453549449e0d84a305900dad4" ->>>>>>> zcash-v2.4.2 dependencies = [ "flate2", "futures-core", @@ -293,24 +246,18 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] name = "async-trait" -<<<<<<< HEAD version = "0.1.81" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" -======= -version = "0.1.88" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5" ->>>>>>> zcash-v2.4.2 dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -332,7 +279,6 @@ dependencies = [ [[package]] name = "autocfg" -<<<<<<< HEAD version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" @@ -342,17 +288,6 @@ name = "axum" version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a6c9af12842a67734c9a2e355436e5d03b22383ed60cf13cd0c18fbfe3dcbcf" -======= -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" - -[[package]] -name = "axum" -version = "0.7.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f" ->>>>>>> zcash-v2.4.2 dependencies = [ "async-trait", "axum-core", @@ -369,13 +304,8 @@ dependencies = [ "pin-project-lite", "rustversion", "serde", -<<<<<<< HEAD "sync_wrapper 1.0.1", "tower", -======= - "sync_wrapper", - "tower 0.5.2", ->>>>>>> zcash-v2.4.2 "tower-layer", "tower-service", ] @@ -395,28 +325,24 @@ dependencies = [ "mime", "pin-project-lite", "rustversion", -<<<<<<< HEAD "sync_wrapper 0.1.2", -======= - "sync_wrapper", ->>>>>>> zcash-v2.4.2 "tower-layer", "tower-service", ] [[package]] name = "backtrace" -version = "0.3.75" +version = "0.3.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002" +checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" dependencies = [ "addr2line", + "cc", "cfg-if", "libc", - "miniz_oxide", + "miniz_oxide 0.7.4", "object", "rustc-demangle", - "windows-targets 0.52.6", ] [[package]] @@ -445,15 +371,9 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "base64ct" -<<<<<<< HEAD version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a32fd6af2b5827bce66c29053ba0e7c42b9dcab01835835058558c10851a46b" -======= -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55248b47b0caf0546f7988906588779981c43bb1bc9d0c44087278f80cdb44ba" ->>>>>>> zcash-v2.4.2 [[package]] name = "bech32" @@ -497,20 +417,18 @@ version = "0.69.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.2", "cexpr", "clang-sys", "itertools 0.12.1", "lazy_static", "lazycell", -<<<<<<< HEAD -======= "proc-macro2", "quote", "regex", "rustc-hash 1.1.0", "shlex", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -519,26 +437,18 @@ version = "0.72.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4f72209734318d0b619a5e0f5129918b848c416e122a3c4ce054e03cb87b726f" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.2", "cexpr", "clang-sys", "itertools 0.13.0", ->>>>>>> zcash-v2.4.2 "log", "prettyplease", "proc-macro2", "quote", "regex", -<<<<<<< HEAD - "rustc-hash", - "shlex", - "syn 2.0.85", - "which 4.4.2", -======= "rustc-hash 2.1.1", "shlex", - "syn 2.0.104", ->>>>>>> zcash-v2.4.2 + "syn 2.0.106", ] [[package]] @@ -551,11 +461,7 @@ dependencies = [ "hmac", "rand_core 0.6.4", "ripemd 0.2.0-pre.4", -<<<<<<< HEAD - "secp256k1 0.29.1", -======= "secp256k1", ->>>>>>> zcash-v2.4.2 "sha2 0.11.0-pre.4", "subtle", "zeroize", @@ -584,9 +490,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.9.1" +version = "2.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" +checksum = "6a65b545ab31d687cff52899d4890855fec459eb6afe0da6417b8a18da87aa29" [[package]] name = "bitflags-serde-legacy" @@ -594,7 +500,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b64e60c28b6d25ad92e8b367801ff9aa12b41d05fc8798055d296bace4a60cc" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.2", "serde", ] @@ -612,9 +518,9 @@ dependencies = [ [[package]] name = "blake2b_simd" -version = "1.0.3" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06e903a20b159e944f91ec8499fe1e55651480c541ea0a584f5d967c49ad9d99" +checksum = "23285ad32269793932e830392f2fe2f83e26488fd3ec778883a93c8323735780" dependencies = [ "arrayref", "arrayvec", @@ -623,9 +529,9 @@ dependencies = [ [[package]] name = "blake2s_simd" -version = "1.0.3" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e90f7deecfac93095eb874a40febd69427776e24e1bd7f87f33ac62d6f0174df" +checksum = "94230421e395b9920d23df13ea5d77a20e1725331f90fbbf6df6040b33f756ae" dependencies = [ "arrayref", "arrayvec", @@ -643,15 +549,9 @@ dependencies = [ [[package]] name = "block-buffer" -<<<<<<< HEAD version = "0.11.0-rc.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fd016a0ddc7cb13661bf5576073ce07330a693f8608a1320b4e20561cc12cdc" -======= -version = "0.11.0-rc.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a229bfd78e4827c91b9b95784f69492c1b77c1ab75a45a8a037b139215086f94" ->>>>>>> zcash-v2.4.2 dependencies = [ "hybrid-array", ] @@ -670,54 +570,32 @@ dependencies = [ ] [[package]] -<<<<<<< HEAD -name = "bridgetree" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3990cc973c3b9c41c4dbb66cde22e3af77c4c7b133008d81f292ad12c27ed794" -dependencies = [ - "incrementalmerkletree", -] - -[[package]] -======= ->>>>>>> zcash-v2.4.2 name = "bs58" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" dependencies = [ -<<<<<<< HEAD "sha2 0.10.8", -======= - "sha2 0.10.9", ->>>>>>> zcash-v2.4.2 "tinyvec", ] [[package]] name = "bumpalo" -version = "3.19.0" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "byte-slice-cast" -version = "1.2.3" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7575182f7272186991736b70173b0ea045398f984bf5ebbb3804736ce1330c9d" +checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" [[package]] name = "bytemuck" -<<<<<<< HEAD version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "102087e286b4677862ea56cf8fc58bb2cdfa8725c40ffb80fe3a008eb7f2fc83" -======= -version = "1.23.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c76a5792e44e4abe34d3abf15636779261d45a7450612059293d1d2cfc63422" ->>>>>>> zcash-v2.4.2 [[package]] name = "byteorder" @@ -733,25 +611,20 @@ checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" [[package]] name = "bzip2-sys" -version = "0.1.13+1.0.8" +version = "0.1.11+1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225bff33b2141874fe80d71e07d6eec4f85c5c216453dd96388240f96e1acc14" +checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" dependencies = [ "cc", + "libc", "pkg-config", ] [[package]] name = "camino" -<<<<<<< HEAD version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e0ec6b951b160caa93cc0c7b209e5a3bff7aae9062213451ac99493cd844c239" -======= -version = "1.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0da45bc31171d8d6960122e222a67740df867c1dd53b4d51caa297084c185cab" ->>>>>>> zcash-v2.4.2 dependencies = [ "serde", ] @@ -764,25 +637,25 @@ checksum = "e6e9e01327e6c86e92ec72b1c798d4a94810f147209bbe3ffab6a86954937a6f" [[package]] name = "cargo-platform" -version = "0.1.9" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e35af189006b9c0f00a064685c727031e3ed2d8020f7ba284d78cc2671bd36ea" +checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" dependencies = [ "serde", ] [[package]] name = "cargo_metadata" -version = "0.19.2" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd5eb614ed4c27c5d706420e4320fbe3216ab31fa1c33cd8246ac36dae4479ba" +checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" dependencies = [ "camino", "cargo-platform", "semver", "serde", "serde_json", - "thiserror 2.0.12", + "thiserror 1.0.64", ] [[package]] @@ -802,18 +675,13 @@ dependencies = [ [[package]] name = "cc" -<<<<<<< HEAD -version = "1.1.7" +version = "1.2.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26a5c3fd7bfa1ce3897a3a3501d362b2d87b7f2583ebcb4a949ec25911025cbc" -======= -version = "1.2.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c1599538de2394445747c8cf7935946e3cc27e9625f889d979bfb2aaf569362" ->>>>>>> zcash-v2.4.2 +checksum = "3ee0f8803222ba5a7e2777dd72ca451868909b1ac410621b676adf07280e9b5f" dependencies = [ "jobserver", "libc", + "shlex", ] [[package]] @@ -827,9 +695,9 @@ dependencies = [ [[package]] name = "cfg-if" -version = "1.0.1" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "cfg_aliases" @@ -934,15 +802,15 @@ dependencies = [ "bitflags 1.3.2", "strsim 0.8.0", "textwrap", - "unicode-width 0.1.14", + "unicode-width", "vec_map", ] [[package]] name = "clap" -version = "4.5.41" +version = "4.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be92d32e80243a54711e5d7ce823c35c41c9d929dc4ab58e1276f625841aadf9" +checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8" dependencies = [ "clap_builder", "clap_derive", @@ -950,9 +818,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.41" +version = "4.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707eab41e9622f9139419d573eca0900137718000c517d47da73045f54331c3d" +checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54" dependencies = [ "anstream", "anstyle", @@ -962,73 +830,67 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.41" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef4f52386a59ca4c860f7393bcf8abd8dfd91ecccc0f774635ff68e92eeef491" +checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] name = "clap_lex" -version = "0.7.5" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b94f61472cee1439c0b966b47e3aca9ae07e45d070759512cd390ea2bebc6675" +checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" [[package]] name = "color-eyre" -version = "0.6.5" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5920befb47832a6d61ee3a3a846565cfa39b331331e68a3b1d1116630f2f26d" +checksum = "55146f5e46f237f7423d74111267d4597b59b0dad0ffaf7303bce9945d843ad5" dependencies = [ "backtrace", "color-spantrace", "eyre", "indenter", "once_cell", - "owo-colors", + "owo-colors 3.5.0", "tracing-error", "url", ] [[package]] name = "color-spantrace" -version = "0.3.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8b88ea9df13354b55bc7234ebcce36e6ef896aca2e42a15de9e10edce01b427" +checksum = "cd6be1b2a7e382e2b98b43b2adcca6bb0e465af0bdd38123873ae61eb17a72c2" dependencies = [ "once_cell", - "owo-colors", + "owo-colors 3.5.0", "tracing-core", "tracing-error", ] [[package]] name = "colorchoice" -<<<<<<< HEAD version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" -======= -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" ->>>>>>> zcash-v2.4.2 [[package]] name = "console" -version = "0.15.11" +version = "0.15.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "054ccb5b10f9f2cbf51eb355ca1d05c2d279ce1804688d0db74b4733a5aeafd8" +checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" dependencies = [ "encode_unicode", + "lazy_static", "libc", - "once_cell", - "unicode-width 0.2.1", - "windows-sys 0.59.0", + "unicode-width", + "windows-sys 0.52.0", ] [[package]] @@ -1076,26 +938,6 @@ version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" -[[package]] -name = "const_format" -version = "0.2.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "126f97965c8ad46d6d9163268ff28432e8f6a1196a55578867832e3049df63dd" -dependencies = [ - "const_format_proc_macros", -] - -[[package]] -name = "const_format_proc_macros" -version = "0.2.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d57c2eccfb16dbac1f4e61e206105db5820c9d26c3c472bc17c774259ef7744" -dependencies = [ - "proc-macro2", - "quote", - "unicode-xid", -] - [[package]] name = "constant_time_eq" version = "0.3.0" @@ -1118,26 +960,10 @@ dependencies = [ ] [[package]] -<<<<<<< HEAD name = "cpufeatures" version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" -======= -name = "core2" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "239fa3ae9b63c2dc74bd3fa852d4792b8b305ae64eeede946265b6af62f1fff3" -dependencies = [ - "memchr", -] - -[[package]] -name = "cpufeatures" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" ->>>>>>> zcash-v2.4.2 dependencies = [ "libc", ] @@ -1160,7 +986,7 @@ dependencies = [ "anes", "cast", "ciborium", - "clap 4.5.41", + "clap 4.5.20", "criterion-plot", "is-terminal", "itertools 0.10.5", @@ -1198,9 +1024,9 @@ dependencies = [ [[package]] name = "crossbeam-deque" -version = "0.8.6" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" dependencies = [ "crossbeam-epoch", "crossbeam-utils", @@ -1217,15 +1043,15 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.21" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "crunchy" -version = "0.2.4" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-bigint" @@ -1251,15 +1077,9 @@ dependencies = [ [[package]] name = "crypto-common" -<<<<<<< HEAD version = "0.2.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b0b8ce8218c97789f16356e7896b3714f26c2ee1079b79c0b7ae7064bb9089fa" -======= -version = "0.2.0-rc.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a23fa214dea9efd4dacee5a5614646b30216ae0f05d4bb51bafb50e9da1c5be" ->>>>>>> zcash-v2.4.2 dependencies = [ "hybrid-array", ] @@ -1275,11 +1095,7 @@ dependencies = [ "curve25519-dalek-derive", "digest 0.10.7", "fiat-crypto", -<<<<<<< HEAD - "rustc_version 0.4.0", -======= "rustc_version", ->>>>>>> zcash-v2.4.2 "serde", "subtle", "zeroize", @@ -1293,14 +1109,14 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] name = "darling" -version = "0.20.11" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" dependencies = [ "darling_core", "darling_macro", @@ -1308,27 +1124,27 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.11" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim 0.11.1", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] name = "darling_macro" -version = "0.20.11" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -1343,9 +1159,9 @@ dependencies = [ [[package]] name = "der" -version = "0.7.10" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" dependencies = [ "const-oid", "zeroize", @@ -1353,9 +1169,9 @@ dependencies = [ [[package]] name = "deranged" -version = "0.4.0" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" dependencies = [ "powerfmt", "serde", @@ -1369,7 +1185,7 @@ checksum = "74ef43543e701c01ad77d3a5922755c6a1d71b22d942cb8042be4994b380caff" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -1401,7 +1217,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -1411,7 +1227,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" dependencies = [ "derive_builder_core", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -1421,10 +1237,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer 0.10.4", -<<<<<<< HEAD "const-oid", -======= ->>>>>>> zcash-v2.4.2 "crypto-common 0.1.6", ] @@ -1434,13 +1247,8 @@ version = "0.11.0-pre.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf2e3d6615d99707295a9673e889bf363a04b2a466bd320c65a72536f7577379" dependencies = [ -<<<<<<< HEAD "block-buffer 0.11.0-rc.3", "crypto-common 0.2.0-rc.1", -======= - "block-buffer 0.11.0-rc.4", - "crypto-common 0.2.0-rc.3", ->>>>>>> zcash-v2.4.2 "subtle", ] @@ -1462,34 +1270,23 @@ dependencies = [ "libc", "option-ext", "redox_users", - "windows-sys 0.60.2", -] - -[[package]] -name = "displaydoc" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.104", + "windows-sys 0.59.0", ] [[package]] name = "document-features" -version = "0.2.11" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95249b50c6c185bee49034bcb378a49dc2b5dff0be90ff6616d31d64febab05d" +checksum = "cb6969eaabd2421f8a2775cfd2471a2b634372b4a25d41e3bd647b79912850a0" dependencies = [ "litrs", ] [[package]] name = "dyn-clone" -version = "1.0.19" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c7a8fb8a9fbf66c1f703fe16184d10ca0ee9d23be5b4436400408ba54a95005" +checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" [[package]] name = "ecdsa" @@ -1526,19 +1323,15 @@ dependencies = [ "hex", "rand_core 0.6.4", "serde", -<<<<<<< HEAD "sha2 0.10.8", -======= - "sha2 0.10.9", ->>>>>>> zcash-v2.4.2 "zeroize", ] [[package]] name = "either" -version = "1.15.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "elasticsearch" @@ -1553,11 +1346,7 @@ dependencies = [ "lazy_static", "percent-encoding", "reqwest", -<<<<<<< HEAD - "rustc_version 0.2.3", -======= "rustc_version", ->>>>>>> zcash-v2.4.2 "serde", "serde_json", "serde_with", @@ -1586,22 +1375,15 @@ dependencies = [ [[package]] name = "encode_unicode" -version = "1.0.0" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" +checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] -<<<<<<< HEAD -name = "encoding_rs" -version = "0.8.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" -======= name = "enum_primitive" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be4551092f4d519593039259a9ed8daedf0da12e5109c5280338073eaeb81180" ->>>>>>> zcash-v2.4.2 dependencies = [ "num-traits 0.1.43", ] @@ -1625,26 +1407,19 @@ dependencies = [ [[package]] name = "equihash" version = "0.2.2" -<<<<<<< HEAD source = "git+https://github.com/QED-it/librustzcash?rev=a996e53e7a561a4723be6a712e44c8eb5fad4a6c#a996e53e7a561a4723be6a712e44c8eb5fad4a6c" -dependencies = [ - "blake2b_simd", -======= -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca4f333d4ccc9d23c06593733673026efa71a332e028b00f12cf427b9677dce9" dependencies = [ "blake2b_simd", "cc", ->>>>>>> zcash-v2.4.2 "core2", "document-features", ] [[package]] name = "equivalent" -version = "1.0.2" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" @@ -1653,11 +1428,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad" dependencies = [ "libc", -<<<<<<< HEAD "windows-sys 0.59.0", -======= - "windows-sys 0.60.2", ->>>>>>> zcash-v2.4.2 ] [[package]] @@ -1673,27 +1444,22 @@ dependencies = [ [[package]] name = "f4jumble" version = "0.1.1" -<<<<<<< HEAD source = "git+https://github.com/QED-it/librustzcash?rev=a996e53e7a561a4723be6a712e44c8eb5fad4a6c#a996e53e7a561a4723be6a712e44c8eb5fad4a6c" -======= -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d42773cb15447644d170be20231a3268600e0c4cea8987d013b93ac973d3cf7" ->>>>>>> zcash-v2.4.2 dependencies = [ "blake2b_simd", ] [[package]] name = "fastrand" -version = "2.3.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] name = "ff" -version = "0.13.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0b50bfb653653f9ca9095b427bed08ab8d75a137839d9ad64eb11810d5b6393" +checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ "bitvec", "rand_core 0.6.4", @@ -1720,24 +1486,18 @@ dependencies = [ [[package]] name = "fixedbitset" -version = "0.5.7" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -<<<<<<< HEAD -version = "1.0.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f211bbe8e69bbd0cfdea405084f128ae8b4aaa6b0b522fc8f2b009084797920" -======= version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a3d7db9596fecd151c5f638c0ee5d5bd487b6e0ea232e5dc96d5250f6f94b1d" ->>>>>>> zcash-v2.4.2 dependencies = [ "crc32fast", - "miniz_oxide", + "miniz_oxide 0.8.9", ] [[package]] @@ -1761,9 +1521,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "foldhash" -version = "0.1.5" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" +checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2" [[package]] name = "form_urlencoded" @@ -1859,7 +1619,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -1916,37 +1676,20 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.16" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "js-sys", "libc", - "wasi 0.11.1+wasi-snapshot-preview1", + "wasi 0.11.0+wasi-snapshot-preview1", "wasm-bindgen", ] [[package]] -<<<<<<< HEAD -name = "getset" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf0fc11e47561d47397154977bc219f4cf809b2974facc3ccb3b89e2436f912" -dependencies = [ - "proc-macro-error2", - "proc-macro2", - "quote", - "syn 2.0.85", -] - -[[package]] -name = "gimli" -version = "0.28.1" -======= name = "getrandom" version = "0.3.3" ->>>>>>> zcash-v2.4.2 source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" dependencies = [ @@ -1967,22 +1710,22 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] name = "gimli" -version = "0.31.1" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" [[package]] name = "git2" -version = "0.20.2" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2deb07a133b1520dc1a5690e9bd08950108873d7ed5de38dcc74d3b5ebffa110" +checksum = "b903b73e45dc0c6c596f2d37eccece7c1c8bb6e4407b001096387c63d0d93724" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.2", "libc", "libgit2-sys", "log", @@ -1991,27 +1734,10 @@ dependencies = [ [[package]] name = "glob" -version = "0.3.2" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -<<<<<<< HEAD checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" -[[package]] -name = "globset" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" -dependencies = [ - "aho-corasick", - "bstr", - "log", - "regex-automata 0.4.8", - "regex-syntax 0.8.5", -] -======= -checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" ->>>>>>> zcash-v2.4.2 - [[package]] name = "group" version = "0.13.0" @@ -2024,34 +1750,11 @@ dependencies = [ "subtle", ] -[[package]] -name = "h2" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -<<<<<<< HEAD -checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http 0.2.12", - "indexmap 2.6.0", - "slab", - "tokio", - "tokio-util 0.7.12", - "tracing", -] - [[package]] name = "h2" version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa82e28a107a8cc405f0839610bdc9b15f1e25ec7d696aa5cf173edbcb1486ab" -======= -checksum = "17da50a276f1e01e0ba6c029e47b7100754904ee8a278f886546e98575380785" ->>>>>>> zcash-v2.4.2 dependencies = [ "atomic-waker", "bytes", @@ -2068,30 +1771,17 @@ dependencies = [ [[package]] name = "half" -<<<<<<< HEAD version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "02b4af3693f1b705df946e9fe5631932443781d0aabb423b62fcd4d73f6d2fd0" dependencies = [ -======= -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "459196ed295495a68f7d7fe1d84f6c4b7ff0e21fe3017b2f283c6fac3ad803c9" -dependencies = [ - "cfg-if", ->>>>>>> zcash-v2.4.2 "crunchy", ] [[package]] name = "halo2_gadgets" version = "0.3.1" -<<<<<<< HEAD source = "git+https://github.com/QED-it/halo2?branch=zsa1#bcf4877772e24618f970908583a39331d4ae0e4b" -======= -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73a5e510d58a07d8ed238a5a8a436fe6c2c79e1bb2611f62688bc65007b4e6e7" ->>>>>>> zcash-v2.4.2 dependencies = [ "arrayvec", "bitvec", @@ -2102,11 +1792,7 @@ dependencies = [ "lazy_static", "pasta_curves", "rand 0.8.5", -<<<<<<< HEAD "sinsemilla 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -======= - "sinsemilla", ->>>>>>> zcash-v2.4.2 "subtle", "uint 0.9.5", ] @@ -2120,12 +1806,7 @@ checksum = "47716fe1ae67969c5e0b2ef826f32db8c3be72be325e1aa3c1951d06b5575ec5" [[package]] name = "halo2_poseidon" version = "0.1.0" -<<<<<<< HEAD source = "git+https://github.com/QED-it/halo2?branch=zsa1#bcf4877772e24618f970908583a39331d4ae0e4b" -======= -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa3da60b81f02f9b33ebc6252d766f843291fb4d2247a07ae73d20b791fc56f" ->>>>>>> zcash-v2.4.2 dependencies = [ "bitvec", "ff", @@ -2135,20 +1816,13 @@ dependencies = [ [[package]] name = "halo2_proofs" -<<<<<<< HEAD version = "0.3.0" source = "git+https://github.com/QED-it/halo2?branch=zsa1#bcf4877772e24618f970908583a39331d4ae0e4b" -======= -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "019561b5f3be60731e7b72f3f7878c5badb4174362d860b03d3cf64cb47f90db" ->>>>>>> zcash-v2.4.2 dependencies = [ "blake2b_simd", "ff", "group", "halo2_legacy_pdqsort", - "indexmap 1.9.3", "maybe-rayon", "pasta_curves", "rand_core 0.6.4", @@ -2173,9 +1847,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.15.4" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5" +checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" dependencies = [ "foldhash", ] @@ -2219,13 +1893,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.5.2" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -<<<<<<< HEAD checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" -======= -checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" ->>>>>>> zcash-v2.4.2 [[package]] name = "hex" @@ -2253,22 +1923,22 @@ dependencies = [ [[package]] name = "home" -version = "0.5.11" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] name = "hostname" -version = "0.4.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56f203cd1c76362b69e3863fd987520ac36cf70a8c92627449b2f64a8cf7d65" +checksum = "f9c7c7c8ac16c798734b8a24560c1362120597c40d5e1459f09498f8f6c8f2ba" dependencies = [ "cfg-if", "libc", - "windows-link", + "windows", ] [[package]] @@ -2284,9 +1954,9 @@ dependencies = [ [[package]] name = "http" -version = "1.3.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" dependencies = [ "bytes", "fnv", @@ -2318,15 +1988,9 @@ dependencies = [ [[package]] name = "httparse" -<<<<<<< HEAD version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" -======= -version = "1.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" ->>>>>>> zcash-v2.4.2 [[package]] name = "httpdate" @@ -2358,7 +2022,6 @@ dependencies = [ [[package]] name = "hybrid-array" -<<<<<<< HEAD version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2d35805454dc9f8662a98d6d61886ffe26bd465f5960e0e55345c70d5c0d2a9" @@ -2366,20 +2029,6 @@ dependencies = [ "typenum", ] -[[package]] -name = "hyper" -version = "0.14.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" -======= -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "891d15931895091dea5c47afa5b3c9a01ba634b311919fd4d41388fa0e3d76af" ->>>>>>> zcash-v2.4.2 -dependencies = [ - "typenum", -] - [[package]] name = "hyper" version = "1.6.0" @@ -2389,15 +2038,9 @@ dependencies = [ "bytes", "futures-channel", "futures-util", -<<<<<<< HEAD - "h2 0.4.5", - "http 1.1.0", - "http-body 1.0.1", -======= "h2", "http", "http-body", ->>>>>>> zcash-v2.4.2 "httparse", "httpdate", "itoa", @@ -2413,14 +2056,6 @@ version = "0.27.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" dependencies = [ -<<<<<<< HEAD - "futures-util", - "http 0.2.12", - "hyper 0.14.30", - "rustls", - "tokio", - "tokio-rustls", -======= "http", "hyper", "hyper-util", @@ -2429,15 +2064,14 @@ dependencies = [ "tokio", "tokio-rustls", "tower-service", - "webpki-roots 1.0.1", ->>>>>>> zcash-v2.4.2 + "webpki-roots 1.0.2", ] [[package]] name = "hyper-timeout" -version = "0.5.2" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0" +checksum = "3203a961e5c83b6f5498933e78b6b263e208c197b63e9c6c53cc82ffd3f63793" dependencies = [ "hyper", "hyper-util", @@ -2448,11 +2082,10 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f66d5bd4c6f02bf0542fad85d626775bab9258cf795a4256dcaf3161114d1df" +checksum = "8d9b05277c7e8da2c93a568989bb6207bef0112e8d17df7a6eda4a3cf143bc5e" dependencies = [ - "base64 0.22.1", "bytes", "futures-channel", "futures-core", @@ -2460,11 +2093,9 @@ dependencies = [ "http", "http-body", "hyper", - "ipnet", "libc", - "percent-encoding", "pin-project-lite", - "socket2", + "socket2 0.6.0", "tokio", "tower-service", "tracing", @@ -2472,21 +2103,14 @@ dependencies = [ [[package]] name = "iana-time-zone" -<<<<<<< HEAD version = "0.1.60" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" -======= -version = "0.1.63" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8" ->>>>>>> zcash-v2.4.2 dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", - "log", "wasm-bindgen", "windows-core", ] @@ -2500,92 +2124,6 @@ dependencies = [ "cc", ] -[[package]] -name = "icu_collections" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "200072f5d0e3614556f94a9930d5dc3e0662a652823904c3a75dc3b0af7fee47" -dependencies = [ - "displaydoc", - "potential_utf", - "yoke", - "zerofrom", - "zerovec", -] - -[[package]] -name = "icu_locale_core" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cde2700ccaed3872079a65fb1a78f6c0a36c91570f28755dda67bc8f7d9f00a" -dependencies = [ - "displaydoc", - "litemap", - "tinystr", - "writeable", - "zerovec", -] - -[[package]] -name = "icu_normalizer" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436880e8e18df4d7bbc06d58432329d6458cc84531f7ac5f024e93deadb37979" -dependencies = [ - "displaydoc", - "icu_collections", - "icu_normalizer_data", - "icu_properties", - "icu_provider", - "smallvec", - "zerovec", -] - -[[package]] -name = "icu_normalizer_data" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00210d6893afc98edb752b664b8890f0ef174c8adbb8d0be9710fa66fbbf72d3" - -[[package]] -name = "icu_properties" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "016c619c1eeb94efb86809b015c58f479963de65bdb6253345c1a1276f22e32b" -dependencies = [ - "displaydoc", - "icu_collections", - "icu_locale_core", - "icu_properties_data", - "icu_provider", - "potential_utf", - "zerotrie", - "zerovec", -] - -[[package]] -name = "icu_properties_data" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "298459143998310acd25ffe6810ed544932242d3f07083eee1084d83a71bd632" - -[[package]] -name = "icu_provider" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03c80da27b5f4187909049ee2d72f276f0d9f99a42c306bd0131ecfe04d8e5af" -dependencies = [ - "displaydoc", - "icu_locale_core", - "stable_deref_trait", - "tinystr", - "writeable", - "yoke", - "zerofrom", - "zerotrie", - "zerovec", -] - [[package]] name = "ident_case" version = "1.0.1" @@ -2594,23 +2132,12 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" -dependencies = [ - "idna_adapter", - "smallvec", - "utf8_iter", -] - -[[package]] -name = "idna_adapter" -version = "1.2.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ - "icu_normalizer", - "icu_properties", + "unicode-bidi", + "unicode-normalization", ] [[package]] @@ -2624,13 +2151,13 @@ dependencies = [ [[package]] name = "impl-trait-for-tuples" -version = "0.2.3" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9" +checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 1.0.109", ] [[package]] @@ -2666,21 +2193,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661" dependencies = [ "equivalent", - "hashbrown 0.15.4", + "hashbrown 0.15.0", "serde", ] [[package]] name = "indicatif" -version = "0.17.11" +version = "0.17.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "183b3088984b400f4cfac3620d5e076c84da5364016b4f49473de574b2586235" +checksum = "763a5a8f45087d6bcea4222e7b72c291a054edf80e4ef6efd2a4979878c7bea3" dependencies = [ "console", + "instant", "number_prefix", "portable-atomic", - "unicode-width 0.2.1", - "web-time", + "unicode-width", ] [[package]] @@ -2694,16 +2221,16 @@ dependencies = [ "log", "num-format", "once_cell", - "quick-xml 0.37.5", + "quick-xml", "rgb", "str_stack", ] [[package]] name = "inout" -version = "0.1.4" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" +checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" dependencies = [ "generic-array", ] @@ -2723,20 +2250,28 @@ dependencies = [ "similar", ] +[[package]] +name = "instant" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" +dependencies = [ + "cfg-if", +] + [[package]] name = "io-uring" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b86e202f00093dcba4275d4636b93ef9dd75d025ae560d2521b45ea28ab49013" +checksum = "d93587f37623a1a17d94ef2bc9ada592f5465fe7732084ab7beefabe5c77c0c4" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.2", "cfg-if", "libc", ] [[package]] name = "ipnet" -<<<<<<< HEAD version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" @@ -2748,31 +2283,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" dependencies = [ "hermit-abi 0.3.9", -======= -version = "2.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" - -[[package]] -name = "iri-string" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbc5ebe9c3a1a7a5127f920a418f7585e9e758e911d0466ed004f393b0e380b2" -dependencies = [ - "memchr", - "serde", -] - -[[package]] -name = "is-terminal" -version = "0.4.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e04d7f318608d35d4b61ddd75cbdaee86b023ebe2bd5a66ee0915f0bf93095a9" -dependencies = [ - "hermit-abi 0.5.2", ->>>>>>> zcash-v2.4.2 "libc", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -2819,31 +2331,24 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.15" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "jobserver" -version = "0.1.33" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f262f097c174adebe41eb73d66ae9c06b2844fb0da69969647bbddd9b0538a" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" dependencies = [ - "getrandom 0.3.3", "libc", ] [[package]] name = "js-sys" -<<<<<<< HEAD -version = "0.3.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" -======= version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" ->>>>>>> zcash-v2.4.2 dependencies = [ "once_cell", "wasm-bindgen", @@ -2890,7 +2395,7 @@ dependencies = [ "rustc-hash 2.1.1", "serde", "serde_json", - "thiserror 1.0.69", + "thiserror 1.0.64", "tokio", "tracing", ] @@ -2905,7 +2410,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -2914,30 +2419,6 @@ version = "0.24.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55e363146da18e50ad2b51a0a7925fc423137a0b1371af8235b1c231a0647328" dependencies = [ -<<<<<<< HEAD - "futures", - "hyper 0.14.30", - "jsonrpc-core", - "jsonrpc-server-utils", - "log", - "net2", - "parking_lot 0.11.2", - "unicase", -] - -[[package]] -name = "jsonrpc-server-utils" -version = "18.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa4fdea130485b572c39a460d50888beb00afb3e35de23ccd7fad8ff19f0e0d4" -dependencies = [ - "bytes", - "futures", - "globset", - "jsonrpc-core", - "lazy_static", - "log", -======= "futures-util", "http", "http-body", @@ -2951,12 +2432,11 @@ dependencies = [ "serde", "serde_json", "soketto", - "thiserror 1.0.69", ->>>>>>> zcash-v2.4.2 + "thiserror 1.0.64", "tokio", "tokio-stream", "tokio-util", - "tower 0.4.13", + "tower", "tracing", ] @@ -2969,7 +2449,7 @@ dependencies = [ "http", "serde", "serde_json", - "thiserror 1.0.69", + "thiserror 1.0.64", ] [[package]] @@ -2992,7 +2472,7 @@ version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "ecdsa", "elliptic-curve", "sha2 0.10.8", @@ -3031,9 +2511,9 @@ checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776" [[package]] name = "libgit2-sys" -version = "0.18.2+1.9.1" +version = "0.17.0+1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c42fe03df2bd3c53a3a9c7317ad91d80c81cd1fb0caec8d7cc4cd2bfa10c222" +checksum = "10472326a8a6477c3c20a64547b0059e4b0d086869eee31e6d7da728a8eb7224" dependencies = [ "cc", "libc", @@ -3043,27 +2523,27 @@ dependencies = [ [[package]] name = "libloading" -version = "0.8.8" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667" +checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" dependencies = [ "cfg-if", - "windows-targets 0.53.2", + "windows-targets", ] [[package]] name = "libm" -version = "0.2.15" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" [[package]] name = "libredox" -version = "0.1.4" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1580801010e535496706ba011c15f8532df6b42297d2e471fec38ceadd8c0638" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.2", "libc", ] @@ -3073,7 +2553,7 @@ version = "0.16.0+8.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce3d60bc059831dc1c83903fb45c103f75db65c5a7bf22272764d9cc683e348c" dependencies = [ - "bindgen", + "bindgen 0.69.4", "bzip2-sys", "cc", "glob", @@ -3094,15 +2574,9 @@ dependencies = [ [[package]] name = "libz-sys" -<<<<<<< HEAD version = "1.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c15da26e5af7e25c90b37a2d75cdbf940cf4a55316de9d84c679c9b8bfabf82e" -======= -version = "1.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b70e7a7df205e92a1a4cd9aaae7898dac0aa555503cc0a649494d0d60e7651d" ->>>>>>> zcash-v2.4.2 dependencies = [ "cc", "libc", @@ -3110,24 +2584,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "linux-raw-sys" -version = "0.4.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" - -[[package]] -name = "linux-raw-sys" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" - -[[package]] -name = "litemap" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" - [[package]] name = "linux-raw-sys" version = "0.9.4" @@ -3142,9 +2598,9 @@ checksum = "b4ce301924b7887e9d637144fdade93f9dfff9b60981d4ac161db09720d39aa5" [[package]] name = "lock_api" -version = "0.4.13" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" dependencies = [ "autocfg", "scopeguard", @@ -3199,9 +2655,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.5" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "memuse" @@ -3211,9 +2667,9 @@ checksum = "3d97bbf43eb4f088f8ca469930cde17fa036207c9a5e02ccc5107c4e8b17c964" [[package]] name = "metrics" -version = "0.24.2" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25dea7ac8057892855ec285c440160265225438c3c45072613c25a4b26e98ef5" +checksum = "8ae428771d17306715c5091d446327d1cfdedc82185c65ba8423ab404e45bf10" dependencies = [ "ahash", "portable-atomic", @@ -3221,9 +2677,9 @@ dependencies = [ [[package]] name = "metrics-exporter-prometheus" -version = "0.16.2" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd7399781913e5393588a8d8c6a2867bf85fb38eaf2502fdce465aad2dc6f034" +checksum = "85b6f8152da6d7892ff1b7a1c0fa3f435e92b5918ad67035c3bb432111d9a29b" dependencies = [ "base64 0.22.1", "http-body-util", @@ -3234,24 +2690,22 @@ dependencies = [ "metrics", "metrics-util", "quanta", - "thiserror 1.0.69", + "thiserror 1.0.64", "tokio", "tracing", ] [[package]] name = "metrics-util" -version = "0.19.1" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8496cc523d1f94c1385dd8f0f0c2c480b2b8aeccb5b7e4485ad6365523ae376" +checksum = "15b482df36c13dd1869d73d14d28cd4855fbd6cfc32294bee109908a9f4a4ed7" dependencies = [ "crossbeam-epoch", "crossbeam-utils", - "hashbrown 0.15.4", + "hashbrown 0.15.0", "metrics", "quanta", - "rand 0.9.1", - "rand_xoshiro", "sketches-ddsketch", ] @@ -3269,34 +2723,32 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.8.9" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -<<<<<<< HEAD checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" dependencies = [ "adler", -======= +] + +[[package]] +name = "miniz_oxide" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" dependencies = [ "adler2", ->>>>>>> zcash-v2.4.2 ] [[package]] name = "mio" -<<<<<<< HEAD version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4569e456d394deccd22ce1c1913e6ea0e54519f577285001215d33557431afe4" -======= -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" ->>>>>>> zcash-v2.4.2 dependencies = [ + "hermit-abi 0.3.9", "libc", - "wasi 0.11.1+wasi-snapshot-preview1", - "windows-sys 0.59.0", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.52.0", ] [[package]] @@ -3307,9 +2759,9 @@ checksum = "26c4d16a3d2b0e89ec6e7d509cf791545fcb48cbc8fc2fb2e96a492defda9140" [[package]] name = "multimap" -version = "0.10.1" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d87ecb2933e8aeadb3e3a02b828fed80a7528047e68b4f424523a0981a3a084" +checksum = "defc4c55412d89136f966bbb339008b474350e5e6e78d2714439c386b3137a03" [[package]] name = "nanorand" @@ -3317,7 +2769,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3" dependencies = [ - "getrandom 0.2.16", + "getrandom 0.2.15", ] [[package]] @@ -3326,7 +2778,7 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.2", "cfg-if", "cfg_aliases", "libc", @@ -3348,12 +2800,6 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "549e471b99ccaf2f89101bec68f4d244457d5a95a9c3d0672e9564124397741d" -[[package]] -name = "nonempty" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "549e471b99ccaf2f89101bec68f4d244457d5a95a9c3d0672e9564124397741d" - [[package]] name = "nu-ansi-term" version = "0.46.0" @@ -3419,11 +2865,11 @@ dependencies = [ [[package]] name = "num_cpus" -version = "1.17.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91df4bbde75afed763b708b7eee1e8e7651e02d97f6d5dd763e89367e957b23b" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.5.2", + "hermit-abi 0.3.9", "libc", ] @@ -3444,9 +2890,9 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "object" -version = "0.36.7" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" dependencies = [ "memchr", ] @@ -3457,17 +2903,11 @@ version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" -[[package]] -name = "once_cell_polyfill" -version = "1.70.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad" - [[package]] name = "oorandom" -version = "11.1.5" +version = "11.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6790f58c7ff633d8771f42965289203411a5e5c68388703c06e14f24770b41e" +checksum = "b410bbe7e14ab526a0e86877eb47c6996a2bd7746f027ba551028c925390e4e9" [[package]] name = "opaque-debug" @@ -3484,12 +2924,7 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "orchard" version = "0.11.0" -<<<<<<< HEAD source = "git+https://github.com/QED-it/orchard?rev=806878c75e491ec7815af86ee08d761c7ed527b5#806878c75e491ec7815af86ee08d761c7ed527b5" -======= -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1ef66fcf99348242a20d582d7434da381a867df8dc155b3a980eca767c56137" ->>>>>>> zcash-v2.4.2 dependencies = [ "aes", "bitvec", @@ -3504,24 +2939,17 @@ dependencies = [ "halo2_proofs", "hex", "incrementalmerkletree", -<<<<<<< HEAD "k256", -======= ->>>>>>> zcash-v2.4.2 "lazy_static", "memuse", - "nonempty 0.11.0", + "nonempty", "pasta_curves", "proptest", "rand 0.8.5", "rand_core 0.6.4", "reddsa", "serde", -<<<<<<< HEAD "sinsemilla 0.1.0 (git+https://github.com/zcash/sinsemilla?rev=aabb707e862bc3d7b803c77d14e5a771bcee3e8c)", -======= - "sinsemilla", ->>>>>>> zcash-v2.4.2 "subtle", "tracing", "visibility", @@ -3542,12 +2970,11 @@ dependencies = [ [[package]] name = "os_info" -version = "3.12.0" +version = "3.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0e1ac5fde8d43c34139135df8ea9ee9465394b2d8d20f032d38998f64afffc3" +checksum = "ae99c7fa6dd38c7cafe1ec085e804f8f555a2f8659b0dbe03f1f9963a9b51092" dependencies = [ "log", - "plist", "serde", "windows-sys 0.52.0", ] @@ -3558,6 +2985,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" +[[package]] +name = "owo-colors" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" + [[package]] name = "owo-colors" version = "4.2.2" @@ -3575,74 +3008,51 @@ dependencies = [ [[package]] name = "parity-scale-codec" -version = "3.7.5" +version = "3.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "799781ae679d79a948e13d4824a40970bfa500058d245760dd857301059810fa" +checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee" dependencies = [ "arrayvec", "bitvec", "byte-slice-cast", - "const_format", "impl-trait-for-tuples", "parity-scale-codec-derive", - "rustversion", "serde", ] [[package]] name = "parity-scale-codec-derive" -version = "3.7.5" +version = "3.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34b4653168b563151153c9e4c08ebed57fb8262bebfa79711552fa983c623e7a" +checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c" dependencies = [ -<<<<<<< HEAD - "proc-macro-crate 3.1.0", -======= "proc-macro-crate", ->>>>>>> zcash-v2.4.2 "proc-macro2", "quote", - "syn 2.0.104", + "syn 1.0.109", ] [[package]] name = "parking_lot" -version = "0.12.4" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", "parking_lot_core", ] -[[package]] -name = "parking_lot_core" -version = "0.9.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5" -dependencies = [ - "cfg-if", - "libc", -<<<<<<< HEAD - "redox_syscall 0.2.16", - "smallvec", - "winapi", -] - [[package]] name = "parking_lot_core" version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", - "redox_syscall 0.5.3", -======= "redox_syscall", ->>>>>>> zcash-v2.4.2 "smallvec", - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -3668,32 +3078,20 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -<<<<<<< HEAD version = "2.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cd53dff83f26735fdc1ca837098ccf133605d794cdae66acfc2bfac3ec809d95" -======= -version = "2.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1db05f56d34358a8b1066f67cbb203ee3e7ed2ba674a6263a1d5ec6db2204323" ->>>>>>> zcash-v2.4.2 dependencies = [ "memchr", - "thiserror 2.0.12", + "thiserror 1.0.64", "ucd-trie", ] [[package]] name = "pest_derive" -<<<<<<< HEAD version = "2.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a548d2beca6773b1c244554d36fcf8548a8a58e74156968211567250e48e49a" -======= -version = "2.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb056d9e8ea77922845ec74a1c4e8fb17e7c218cc4fc11a15c5d25e189aa40bc" ->>>>>>> zcash-v2.4.2 dependencies = [ "pest", "pest_generator", @@ -3701,48 +3099,33 @@ dependencies = [ [[package]] name = "pest_generator" -<<<<<<< HEAD version = "2.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c93a82e8d145725dcbaf44e5ea887c8a869efdcc28706df2d08c69e17077183" -======= -version = "2.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87e404e638f781eb3202dc82db6760c8ae8a1eeef7fb3fa8264b2ef280504966" ->>>>>>> zcash-v2.4.2 dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] name = "pest_meta" -<<<<<<< HEAD version = "2.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a941429fea7e08bedec25e4f6785b6ffaacc6b755da98df5ef3e7dcf4a124c4f" -======= -version = "2.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edd1101f170f5903fde0914f899bb503d9ff5271d7ba76bbb70bea63690cc0d5" ->>>>>>> zcash-v2.4.2 dependencies = [ + "once_cell", "pest", -<<<<<<< HEAD "sha2 0.10.8", -======= - "sha2 0.10.9", ->>>>>>> zcash-v2.4.2 ] [[package]] name = "petgraph" -version = "0.7.1" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3672b37090dbd86368a4145bc067582552b29c27377cad4e0a306c97f9bd7772" +checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset", "indexmap 2.10.0", @@ -3765,20 +3148,14 @@ checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] name = "pin-project-lite" -<<<<<<< HEAD version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" -======= -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" ->>>>>>> zcash-v2.4.2 [[package]] name = "pin-utils" @@ -3798,28 +3175,9 @@ dependencies = [ [[package]] name = "pkg-config" -<<<<<<< HEAD version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" -======= -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" - -[[package]] -name = "plist" -version = "1.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3af6b589e163c5a788fab00ce0c0366f6efbb9959c2f9874b224936af7fce7e1" -dependencies = [ - "base64 0.22.1", - "indexmap 2.10.0", - "quick-xml 0.38.0", - "serde", - "time", -] ->>>>>>> zcash-v2.4.2 [[package]] name = "plotters" @@ -3862,24 +3220,9 @@ dependencies = [ [[package]] name = "portable-atomic" -<<<<<<< HEAD version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da544ee218f0d287a911e9c99a39a8c9bc8fcad3cb8db5959940044ecfc67265" -======= -version = "1.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483" - -[[package]] -name = "potential_utf" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5a7c30837279ca13e7c867e9e40053bc68740f988cb07f7ca6df43cc734b585" -dependencies = [ - "zerovec", -] ->>>>>>> zcash-v2.4.2 [[package]] name = "powerfmt" @@ -3889,27 +3232,21 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.21" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" dependencies = [ "zerocopy", ] [[package]] name = "prettyplease" -<<<<<<< HEAD version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" -======= -version = "0.2.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "061c1221631e079b26479d25bbf2275bfe5917ae8419cd7e34f13bfc2aa7539a" ->>>>>>> zcash-v2.4.2 dependencies = [ "proc-macro2", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -3923,24 +3260,11 @@ dependencies = [ "uint 0.9.5", ] -[[package]] -name = "proc-macro-crate" -version = "3.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -<<<<<<< HEAD -checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" -dependencies = [ - "toml 0.5.11", -] - [[package]] name = "proc-macro-crate" version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" -======= -checksum = "edce586971a4dfaa28950c6f18ed55e0406c1ab88bbce2c6f6293a7aaba73d35" ->>>>>>> zcash-v2.4.2 dependencies = [ "toml_edit 0.21.1", ] @@ -3988,41 +3312,31 @@ dependencies = [ "proc-macro-error-attr2", "proc-macro2", "quote", -<<<<<<< HEAD - "syn 2.0.85", -======= - "syn 2.0.104", ->>>>>>> zcash-v2.4.2 + "syn 2.0.106", ] [[package]] name = "proc-macro2" -<<<<<<< HEAD -version = "1.0.86" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" -======= -version = "1.0.95" +version = "1.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" ->>>>>>> zcash-v2.4.2 +checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de" dependencies = [ "unicode-ident", ] [[package]] name = "proptest" -version = "1.7.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fcdab19deb5195a31cf7726a210015ff1496ba1464fd42cb4f537b8b01b471f" +checksum = "14cae93065090804185d3b75f0bf93b8eeda30c7a9b4a33d3bdb3988d6229e50" dependencies = [ "bit-set", "bit-vec", - "bitflags 2.9.1", + "bitflags 2.9.2", "lazy_static", "num-traits 0.2.19", - "rand 0.9.1", - "rand_chacha 0.9.0", + "rand 0.8.5", + "rand_chacha 0.3.1", "rand_xorshift", "regex-syntax 0.8.5", "rusty-fork", @@ -4032,13 +3346,13 @@ dependencies = [ [[package]] name = "proptest-derive" -version = "0.5.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ee1c9ac207483d5e7db4940700de86a9aae46ef90c48b57f99fe7edb8345e49" +checksum = "6ff7ff745a347b87471d859a377a9a404361e7efc2a971d73424a6d183c0fc77" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -4053,18 +3367,13 @@ dependencies = [ [[package]] name = "prost-build" -<<<<<<< HEAD version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5bb182580f71dd070f88d01ce3de9f4da5021db7115d2e1c3605a754153b77c1" -======= -version = "0.13.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be769465445e8c1474e9c5dac2018218498557af32d9ed057325ec9a41ae81bf" ->>>>>>> zcash-v2.4.2 dependencies = [ + "bytes", "heck 0.5.0", - "itertools 0.14.0", + "itertools 0.13.0", "log", "multimap", "once_cell", @@ -4073,7 +3382,7 @@ dependencies = [ "prost", "prost-types", "regex", - "syn 2.0.104", + "syn 2.0.106", "tempfile", ] @@ -4084,38 +3393,32 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a56d757972c98b346a9b766e3f02746cde6dd1cd1d1d563472929fdd74bec4d" dependencies = [ "anyhow", - "itertools 0.14.0", + "itertools 0.13.0", "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] name = "prost-types" -<<<<<<< HEAD version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cee5168b05f49d4b0ca581206eb14a7b22fafd963efe729ac48eb03266e25cc2" -======= -version = "0.13.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52c2c1bf36ddb1a1c396b3601a3cec27c2462e45f07c386894ec3ccf5332bd16" ->>>>>>> zcash-v2.4.2 dependencies = [ "prost", ] [[package]] name = "quanta" -version = "0.12.6" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3ab5a9d756f0d97bdc89019bd2e4ea098cf9cde50ee7564dde6b81ccc8f06c7" +checksum = "8e5167a477619228a0b284fac2674e3c388cba90631d7b7de620e6f1fcd08da5" dependencies = [ "crossbeam-utils", "libc", "once_cell", "raw-cpuid", - "wasi 0.11.1+wasi-snapshot-preview1", + "wasi 0.11.0+wasi-snapshot-preview1", "web-sys", "winapi", ] @@ -4135,15 +3438,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "quick-xml" -version = "0.38.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8927b0664f5c5a98265138b7e3f90aa19a6b21353182469ace36d4ac527b7b1b" -dependencies = [ - "memchr", -] - [[package]] name = "quickcheck" version = "0.9.2" @@ -4168,8 +3462,6 @@ dependencies = [ ] [[package]] -<<<<<<< HEAD -======= name = "quinn" version = "0.11.8" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -4182,8 +3474,8 @@ dependencies = [ "quinn-udp", "rustc-hash 2.1.1", "rustls", - "socket2", - "thiserror 2.0.12", + "socket2 0.5.7", + "thiserror 2.0.15", "tokio", "tracing", "web-time", @@ -4198,13 +3490,13 @@ dependencies = [ "bytes", "getrandom 0.3.3", "lru-slab", - "rand 0.9.1", + "rand 0.9.2", "ring", "rustc-hash 2.1.1", "rustls", "rustls-pki-types", "slab", - "thiserror 2.0.12", + "thiserror 2.0.15", "tinyvec", "tracing", "web-time", @@ -4219,13 +3511,12 @@ dependencies = [ "cfg_aliases", "libc", "once_cell", - "socket2", + "socket2 0.5.7", "tracing", "windows-sys 0.59.0", ] [[package]] ->>>>>>> zcash-v2.4.2 name = "quote" version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -4272,9 +3563,9 @@ dependencies = [ [[package]] name = "rand" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97" +checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" dependencies = [ "rand_chacha 0.9.0", "rand_core 0.9.3", @@ -4325,7 +3616,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.16", + "getrandom 0.2.15", ] [[package]] @@ -4348,35 +3639,20 @@ dependencies = [ [[package]] name = "rand_xorshift" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "513962919efc330f829edb2535844d1b912b0fbe2ca165d613e4e8788bb05a5a" -dependencies = [ - "rand_core 0.9.3", -] - -[[package]] -name = "rand_xoshiro" -version = "0.7.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f703f4665700daf5512dcca5f43afa6af89f09db47fb56be587f80636bda2d41" +checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" dependencies = [ - "rand_core 0.9.3", + "rand_core 0.6.4", ] [[package]] name = "raw-cpuid" -<<<<<<< HEAD version = "11.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb9ee317cfe3fbd54b36a511efc1edd42e216903c9cd575e686dd68a2ba90d8d" -======= -version = "11.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6df7ab838ed27997ba19a4664507e6f82b41fe6e20be42929332156e5e85146" ->>>>>>> zcash-v2.4.2 dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.2", ] [[package]] @@ -4413,7 +3689,7 @@ dependencies = [ "pasta_curves", "rand_core 0.6.4", "serde", - "thiserror 1.0.69", + "thiserror 1.0.64", "zeroize", ] @@ -4426,59 +3702,28 @@ dependencies = [ "rand_core 0.6.4", "reddsa", "serde", - "thiserror 1.0.69", - "zeroize", -] - -[[package]] -name = "redjubjub" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b0ac1bc6bb3696d2c6f52cff8fba57238b81da8c0214ee6cd146eb8fde364e" -dependencies = [ - "rand_core 0.6.4", - "reddsa", - "thiserror", + "thiserror 1.0.64", "zeroize", ] -[[package]] -name = "redox_syscall" -version = "0.5.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d04b7d0ee6b4a0207a0a7adb104d23ecb0b47d6beae7152d0fa34b692b29fd6" -dependencies = [ -<<<<<<< HEAD - "bitflags 1.3.2", -] - [[package]] name = "redox_syscall" version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" dependencies = [ - "bitflags 2.6.0", -======= - "bitflags 2.9.1", ->>>>>>> zcash-v2.4.2 + "bitflags 2.9.2", ] [[package]] name = "redox_users" -<<<<<<< HEAD -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" -======= -version = "0.5.0" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd6f9d3d47bdd2ad6945c5015a226ec6155d0bcdfd8f7cd29f86b71f8de99d2b" ->>>>>>> zcash-v2.4.2 +checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac" dependencies = [ - "getrandom 0.2.16", + "getrandom 0.2.15", "libredox", - "thiserror 2.0.12", + "thiserror 2.0.15", ] [[package]] @@ -4498,7 +3743,7 @@ checksum = "1165225c21bff1f3bbce98f5a1f889949bc902d3575308cc7b0de30b4f6d27c7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -4509,7 +3754,7 @@ checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.9", + "regex-automata 0.4.8", "regex-syntax 0.8.5", ] @@ -4524,9 +3769,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.9" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" dependencies = [ "aho-corasick", "memchr", @@ -4547,40 +3792,11 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" -version = "0.12.22" +version = "0.12.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbc931937e6ca3a06e3b6c0aa7841849b160a90351d6ab467a8b9b9959767531" +checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f" dependencies = [ "async-compression", -<<<<<<< HEAD - "base64 0.21.7", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "h2 0.3.26", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.30", - "hyper-rustls", - "ipnet", - "js-sys", - "log", - "mime", - "once_cell", - "percent-encoding", - "pin-project-lite", - "rustls", - "rustls-pemfile", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper 0.1.2", - "system-configuration", - "tokio", - "tokio-rustls", - "tokio-util 0.7.12", -======= "base64 0.22.1", "bytes", "futures-channel", @@ -4592,61 +3808,53 @@ dependencies = [ "hyper", "hyper-rustls", "hyper-util", + "ipnet", "js-sys", "log", + "mime", + "once_cell", "percent-encoding", "pin-project-lite", "quinn", "rustls", + "rustls-pemfile", "rustls-pki-types", "serde", "serde_json", "serde_urlencoded", - "sync_wrapper", + "sync_wrapper 1.0.1", "tokio", "tokio-rustls", "tokio-util", - "tower 0.5.2", - "tower-http", ->>>>>>> zcash-v2.4.2 "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", -<<<<<<< HEAD - "webpki-roots", - "winreg", -======= - "webpki-roots 1.0.1", ->>>>>>> zcash-v2.4.2 + "webpki-roots 0.26.11", + "windows-registry", ] [[package]] name = "rgb" -<<<<<<< HEAD version = "0.8.47" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e12bc8d2f72df26a5d3178022df33720fbede0d31d82c7291662eff89836994d" -======= -version = "0.8.51" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a457e416a0f90d246a4c3288bd7a25b2304ca727f253f95be383dd17af56be8f" ->>>>>>> zcash-v2.4.2 dependencies = [ "bytemuck", ] [[package]] name = "ring" -version = "0.17.14" +version = "0.17.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", "cfg-if", - "getrandom 0.2.16", + "getrandom 0.2.15", "libc", + "spin", "untrusted", "windows-sys 0.52.0", ] @@ -4707,9 +3915,9 @@ checksum = "afab94fb28594581f62d981211a9a4d53cc8130bbcbbb89a0440d9b8e81a7746" [[package]] name = "rustc-demangle" -version = "0.1.25" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "989e6739f80c4ad5b13e0fd7fe89531180375b18520cc8c82080e4dc4035b84f" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc-hash" @@ -4718,36 +3926,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] -<<<<<<< HEAD -======= name = "rustc-hash" version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" [[package]] ->>>>>>> zcash-v2.4.2 name = "rustc-hex" version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" -[[package]] -name = "rustc_version" -<<<<<<< HEAD -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -dependencies = [ - "semver 0.9.0", -] - [[package]] name = "rustc_version" version = "0.4.0" -======= -version = "0.4.1" ->>>>>>> zcash-v2.4.2 source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ @@ -4756,79 +3948,22 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.44" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" +checksum = "11181fbabf243db407ef8df94a6ce0b2f9a733bd8be4ad02b4eda9602296cac8" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.2", "errno", "libc", -<<<<<<< HEAD - "linux-raw-sys 0.4.14", - "windows-sys 0.52.0", -======= - "linux-raw-sys 0.4.15", + "linux-raw-sys", "windows-sys 0.59.0", ->>>>>>> zcash-v2.4.2 ] [[package]] -name = "rustix" -<<<<<<< HEAD -version = "1.0.8" +name = "rustls" +version = "0.23.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11181fbabf243db407ef8df94a6ce0b2f9a733bd8be4ad02b4eda9602296cac8" -dependencies = [ - "bitflags 2.6.0", - "errno", - "libc", - "linux-raw-sys 0.9.4", - "windows-sys 0.59.0", -] - -[[package]] -name = "rustls" -version = "0.21.12" -======= -version = "1.0.7" ->>>>>>> zcash-v2.4.2 -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c71e83d6afe7ff64890ec6b71d6a69bb8a610ab78ce364b3352876bb4c801266" -dependencies = [ -<<<<<<< HEAD - "log", - "ring", - "rustls-webpki", - "sct", -] - -[[package]] -name = "rustls-pemfile" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" -dependencies = [ - "base64 0.21.7", -] - -[[package]] -name = "rustls-webpki" -version = "0.101.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" -======= - "bitflags 2.9.1", - "errno", - "libc", - "linux-raw-sys 0.9.4", - "windows-sys 0.59.0", -] - -[[package]] -name = "rustls" -version = "0.23.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2491382039b29b9b11ff08b76ff6c97cf287671dbb74f0be44bda389fffe9bd1" +checksum = "c0ebcbd2f03de0fc1122ad9bb24b127a5a6cd51d72604a3f3c50ac459762b6cc" dependencies = [ "log", "once_cell", @@ -4853,19 +3988,12 @@ name = "rustls-pki-types" version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "229a4a4c221013e7e1f1a043678c5cc39fe5171437c88fb47151a21e6f5b5c79" ->>>>>>> zcash-v2.4.2 dependencies = [ "web-time", "zeroize", ] [[package]] -<<<<<<< HEAD -name = "rustversion" -version = "1.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" -======= name = "rustls-webpki" version = "0.103.4" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -4878,10 +4006,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.21" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d" ->>>>>>> zcash-v2.4.2 +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "rusty-fork" @@ -4897,9 +4024,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.20" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "same-file" @@ -4913,12 +4040,7 @@ dependencies = [ [[package]] name = "sapling-crypto" version = "0.5.0" -<<<<<<< HEAD source = "git+https://github.com/QED-it/sapling-crypto?branch=zsa1#b0d2e4c1139f23fb7e9e410f2e5d986d5662ee03" -======= -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d3c081c83f1dc87403d9d71a06f52301c0aa9ea4c17da2a3435bbf493ffba4" ->>>>>>> zcash-v2.4.2 dependencies = [ "aes", "bellman", @@ -4939,7 +4061,7 @@ dependencies = [ "memuse", "rand 0.8.5", "rand_core 0.6.4", - "redjubjub 0.8.0", + "redjubjub", "subtle", "tracing", "zcash_note_encryption", @@ -4977,17 +4099,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" -[[package]] -<<<<<<< HEAD -name = "sct" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "sec1" version = "0.7.3" @@ -5002,35 +4113,15 @@ dependencies = [ ] [[package]] -======= ->>>>>>> zcash-v2.4.2 name = "secp256k1" version = "0.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9465315bc9d4566e1724f0fffcbcc446268cb522e60f9a27bcded6b19c108113" dependencies = [ - "secp256k1-sys 0.8.1", + "secp256k1-sys", "serde", ] -[[package]] -name = "secp256k1" -version = "0.29.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9465315bc9d4566e1724f0fffcbcc446268cb522e60f9a27bcded6b19c108113" -dependencies = [ - "secp256k1-sys 0.10.1", -] - -[[package]] -name = "secp256k1-sys" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4387882333d3aa8cb20530a17c69a3752e97837832f34f6dccc760e715001d9" -dependencies = [ - "cc", -] - [[package]] name = "secp256k1-sys" version = "0.10.1" @@ -5061,15 +4152,9 @@ dependencies = [ [[package]] name = "sentry" -<<<<<<< HEAD -version = "0.32.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "766448f12e44d68e675d5789a261515c46ac6ccd240abdd451a9c46c84a49523" -======= version = "0.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69ccd7644577f876e92e7873d505ad35c30fc4fcf1654d4885c74605c95d0a07" ->>>>>>> zcash-v2.4.2 dependencies = [ "httpdate", "reqwest", @@ -5080,10 +4165,6 @@ dependencies = [ "sentry-tracing", "tokio", "ureq", -<<<<<<< HEAD - "webpki-roots", -======= ->>>>>>> zcash-v2.4.2 ] [[package]] @@ -5106,11 +4187,7 @@ dependencies = [ "hostname", "libc", "os_info", -<<<<<<< HEAD - "rustc_version 0.4.0", -======= "rustc_version", ->>>>>>> zcash-v2.4.2 "sentry-core", "uname", ] @@ -5121,7 +4198,7 @@ version = "0.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "36e9d6c4dbf4db62c8aa6f9808ce16447ac265221c8620f78e63c159256c5f85" dependencies = [ - "rand 0.9.1", + "rand 0.9.2", "sentry-types", "serde", "serde_json", @@ -5147,10 +4224,10 @@ checksum = "aad0332036824f2c4e5f241495107a4769a64f4b46a8e95db1108a124e6d2d00" dependencies = [ "debugid", "hex", - "rand 0.9.1", + "rand 0.9.2", "serde", "serde_json", - "thiserror 2.0.12", + "thiserror 2.0.15", "time", "url", "uuid", @@ -5158,15 +4235,9 @@ dependencies = [ [[package]] name = "serde" -<<<<<<< HEAD -version = "1.0.214" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f55c3193aca71c12ad7890f1785d2b73e1b9f63a0bbc353c08ef26fe03fc56b5" -======= version = "1.0.219" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" ->>>>>>> zcash-v2.4.2 dependencies = [ "serde_derive", ] @@ -5182,26 +4253,20 @@ dependencies = [ [[package]] name = "serde_derive" -<<<<<<< HEAD -version = "1.0.214" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766" -======= version = "1.0.219" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" ->>>>>>> zcash-v2.4.2 dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] name = "serde_json" -version = "1.0.140" +version = "1.0.142" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" +checksum = "030fedb782600dcbd6f02d479bf0d817ac3bb40d644745b769d6a96bc3afc5a7" dependencies = [ "indexmap 2.10.0", "itoa", @@ -5212,15 +4277,9 @@ dependencies = [ [[package]] name = "serde_spanned" -<<<<<<< HEAD version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" -======= -version = "0.6.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" ->>>>>>> zcash-v2.4.2 dependencies = [ "serde", ] @@ -5266,7 +4325,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -5296,8 +4355,6 @@ dependencies = [ ] [[package]] -<<<<<<< HEAD -======= name = "sha1" version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -5310,9 +4367,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.9" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", @@ -5320,17 +4377,12 @@ dependencies = [ ] [[package]] ->>>>>>> zcash-v2.4.2 name = "sha2" version = "0.11.0-pre.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "540c0893cce56cdbcfebcec191ec8e0f470dd1889b6e7a0b503e310a94a168f5" dependencies = [ -<<<<<<< HEAD - "cfg-if 1.0.0", -======= "cfg-if", ->>>>>>> zcash-v2.4.2 "cpufeatures", "digest 0.11.0-pre.9", ] @@ -5350,7 +4402,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "637e95dcd06bc1bb3f86ed9db1e1832a70125f32daae071ef37dcb7701b7d4fe" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.2", "either", "incrementalmerkletree", "tracing", @@ -5364,9 +4416,9 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "signal-hook-registry" -version = "1.4.5" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9203b8055f63a2a00e2f593bb0510367fe707d7ff1e5c872de2f537b339e5410" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" dependencies = [ "libc", ] @@ -5383,20 +4435,9 @@ dependencies = [ [[package]] name = "similar" -version = "2.7.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbbb5d9659141646ae647b42fe094daf6c6192d1620870b449d9557f748b2daa" - -[[package]] -name = "sinsemilla" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d268ae0ea06faafe1662e9967cd4f9022014f5eeb798e0c302c876df8b7af9c" -dependencies = [ - "group", - "pasta_curves", - "subtle", -] +checksum = "1de1d4f81173b03af4c0cbed3c898f6bff5b870e4a7f5d6f4057d62a7a4b686e" [[package]] name = "sinsemilla" @@ -5427,26 +4468,39 @@ checksum = "c1e9a774a6c28142ac54bb25d25562e6bcf957493a184f15ad4eebccb23e410a" [[package]] name = "slab" -version = "0.4.10" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04dc19736151f35336d325007ac991178d504a119863a2fcb3758cdb5e52c50d" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] [[package]] name = "smallvec" -version = "1.15.1" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "socket2" -version = "0.5.10" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" dependencies = [ "libc", "windows-sys 0.52.0", ] +[[package]] +name = "socket2" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + [[package]] name = "soketto" version = "0.8.1" @@ -5504,12 +4558,6 @@ dependencies = [ "der", ] -[[package]] -name = "stable_deref_trait" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" - [[package]] name = "static_assertions" version = "1.1.0" @@ -5577,9 +4625,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.104" +version = "2.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40" +checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6" dependencies = [ "proc-macro2", "quote", @@ -5588,9 +4636,8 @@ dependencies = [ [[package]] name = "sync_wrapper" -version = "1.0.2" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -<<<<<<< HEAD checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" [[package]] @@ -5598,12 +4645,9 @@ name = "sync_wrapper" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" -======= -checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" dependencies = [ "futures-core", ] ->>>>>>> zcash-v2.4.2 [[package]] name = "synstructure" @@ -5617,17 +4661,6 @@ dependencies = [ "unicode-xid", ] -[[package]] -name = "synstructure" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.104", -] - [[package]] name = "tap" version = "1.0.1" @@ -5643,11 +4676,7 @@ dependencies = [ "fastrand", "getrandom 0.3.3", "once_cell", -<<<<<<< HEAD - "rustix 0.38.37", -======= - "rustix 1.0.7", ->>>>>>> zcash-v2.4.2 + "rustix", "windows-sys 0.59.0", ] @@ -5666,59 +4695,47 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" dependencies = [ - "unicode-width 0.1.14", + "unicode-width", ] [[package]] name = "thiserror" -<<<<<<< HEAD version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" -======= -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" ->>>>>>> zcash-v2.4.2 dependencies = [ - "thiserror-impl 1.0.69", + "thiserror-impl 1.0.64", ] [[package]] name = "thiserror" -version = "2.0.12" +version = "2.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" +checksum = "80d76d3f064b981389ecb4b6b7f45a0bf9fdac1d5b9204c7bd6714fecc302850" dependencies = [ - "thiserror-impl 2.0.12", + "thiserror-impl 2.0.15", ] [[package]] name = "thiserror-impl" -<<<<<<< HEAD version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" -======= -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" ->>>>>>> zcash-v2.4.2 dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] name = "thiserror-impl" -version = "2.0.12" +version = "2.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" +checksum = "44d29feb33e986b6ea906bd9c3559a856983f92371b3eaa5e83782a351623de0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -5727,7 +4744,7 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfe075d7053dae61ac5413a34ea7d4913b6e6207844fd726bdd858b37ff72bf5" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.2", "cfg-if", "libc", "log", @@ -5737,18 +4754,19 @@ dependencies = [ [[package]] name = "thread_local" -version = "1.1.9" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" dependencies = [ "cfg-if", + "once_cell", ] [[package]] name = "time" -version = "0.3.41" +version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ "deranged", "itoa", @@ -5763,30 +4781,20 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.4" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.22" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3526739392ec93fd8b359c8e98514cb3e8e021beb4e5f597b00a0221f8ed8a49" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" dependencies = [ "num-conv", "time-core", ] -[[package]] -name = "tinystr" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d4f6d1145dcb577acf783d4e601bc1d76a13337bb54e6233add580b07344c8b" -dependencies = [ - "displaydoc", - "zerovec", -] - [[package]] name = "tinytemplate" version = "1.2.1" @@ -5814,9 +4822,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.46.1" +version = "1.47.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cc3a2344dafbe23a245241fe8b09735b521110d30fcefbbd5feb1797ca35d17" +checksum = "89e49afdadebb872d3145a5638b59eb0691ea23e46ca484037cfab3b76b95038" dependencies = [ "backtrace", "bytes", @@ -5827,10 +4835,10 @@ dependencies = [ "pin-project-lite", "signal-hook-registry", "slab", - "socket2", + "socket2 0.6.0", "tokio-macros", "tracing", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -5841,7 +4849,7 @@ checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -5881,9 +4889,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.15" +version = "0.7.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66a539a9ad6d5d281510d5bd368c973d636c02dbf8a67300bfb6b950696ad7df" +checksum = "14307c986784f72ef81c89db7d9e28d6ac26d16213b109ea501696195e6e3ce5" dependencies = [ "bytes", "futures-core", @@ -5904,9 +4912,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.23" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" dependencies = [ "serde", "serde_spanned", @@ -5916,21 +4924,20 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.11" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" dependencies = [ "serde", ] [[package]] name = "toml_edit" -<<<<<<< HEAD version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ - "indexmap 2.6.0", + "indexmap 2.10.0", "toml_datetime", "winnow 0.5.40", ] @@ -5940,30 +4947,14 @@ name = "toml_edit" version = "0.22.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" -======= -version = "0.22.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" ->>>>>>> zcash-v2.4.2 dependencies = [ "indexmap 2.10.0", "serde", "serde_spanned", "toml_datetime", -<<<<<<< HEAD "winnow 0.6.18", -======= - "toml_write", - "winnow", ->>>>>>> zcash-v2.4.2 ] -[[package]] -name = "toml_write" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" - [[package]] name = "tonic" version = "0.12.3" @@ -5975,15 +4966,9 @@ dependencies = [ "axum", "base64 0.22.1", "bytes", -<<<<<<< HEAD - "h2 0.4.5", - "http 1.1.0", - "http-body 1.0.1", -======= "h2", "http", "http-body", ->>>>>>> zcash-v2.4.2 "http-body-util", "hyper", "hyper-timeout", @@ -5991,7 +4976,7 @@ dependencies = [ "percent-encoding", "pin-project", "prost", - "socket2", + "socket2 0.5.7", "tokio", "tokio-stream", "tower", @@ -6011,7 +4996,7 @@ dependencies = [ "prost-build", "prost-types", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -6025,7 +5010,7 @@ dependencies = [ "prost-build", "prost-types", "quote", - "syn 2.0.85", + "syn 2.0.106", ] [[package]] @@ -6063,24 +5048,6 @@ dependencies = [ ] [[package]] -<<<<<<< HEAD -======= -name = "tower" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" -dependencies = [ - "futures-core", - "futures-util", - "pin-project-lite", - "sync_wrapper", - "tokio", - "tower-layer", - "tower-service", -] - -[[package]] ->>>>>>> zcash-v2.4.2 name = "tower-batch-control" version = "0.2.41" dependencies = [ @@ -6094,13 +5061,8 @@ dependencies = [ "tinyvec", "tokio", "tokio-test", -<<<<<<< HEAD - "tokio-util 0.7.12", - "tower", -======= "tokio-util", - "tower 0.4.13", ->>>>>>> zcash-v2.4.2 + "tower", "tower-fallback", "tower-test", "tracing", @@ -6120,24 +5082,6 @@ dependencies = [ "zebra-test", ] -[[package]] -name = "tower-http" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2" -dependencies = [ - "bitflags 2.9.1", - "bytes", - "futures-util", - "http", - "http-body", - "iri-string", - "pin-project-lite", - "tower 0.5.2", - "tower-layer", - "tower-service", -] - [[package]] name = "tower-layer" version = "0.3.2" @@ -6183,7 +5127,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3566e8ce28cc0a3fe42519fc80e6b4c943cc4c8cef275620eb8dac2d3d4e06cf" dependencies = [ "crossbeam-channel", - "thiserror 1.0.69", + "thiserror 1.0.64", "time", "tracing-subscriber", ] @@ -6196,7 +5140,7 @@ checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -6211,9 +5155,9 @@ dependencies = [ [[package]] name = "tracing-error" -version = "0.2.1" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b1581020d7a273442f5b45074a6a57d5757ad0a47dac0e9f0bd57b81936f3db" +checksum = "d686ec1c0f384b1277f097b2f279a2ecc11afe8c133c1aabf036a27cb4cd206e" dependencies = [ "tracing", "tracing-subscriber", @@ -6242,9 +5186,9 @@ dependencies = [ [[package]] name = "tracing-journald" -version = "0.3.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc0b4143302cf1022dac868d521e36e8b27691f72c84b3311750d5188ebba657" +checksum = "ba316a74e8fc3c3896a850dba2375928a9fa171b085ecddfc7c054d39970f3fd" dependencies = [ "libc", "tracing-core", @@ -6309,7 +5253,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04659ddb06c87d233c566112c1c9c5b9e98256d9af50ec3bc9c8327f873a7568" dependencies = [ "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -6320,9 +5264,9 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "typenum" -version = "1.18.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "ucd-trie" @@ -6369,16 +5313,6 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" -[[package]] -<<<<<<< HEAD -name = "unicase" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" -dependencies = [ - "version_check", -] - [[package]] name = "unicode-bidi" version = "0.3.15" @@ -6399,12 +5333,6 @@ checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" dependencies = [ "tinyvec", ] -======= -name = "unicode-ident" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" ->>>>>>> zcash-v2.4.2 [[package]] name = "unicode-segmentation" @@ -6418,12 +5346,6 @@ version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" -[[package]] -name = "unicode-width" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a1a07cc7db3810833284e8d372ccdc6da29741639ecc70c9ec107df0fa6154c" - [[package]] name = "unicode-xid" version = "0.2.4" @@ -6448,52 +5370,38 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "ureq" -<<<<<<< HEAD -version = "2.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8cdd25c339e200129fe4de81451814e5228c9b771d57378817d6117cc2b3f97" -======= -version = "3.0.12" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f0fde9bc91026e381155f8c67cb354bcd35260b2f4a29bcc84639f762760c39" ->>>>>>> zcash-v2.4.2 +checksum = "00432f493971db5d8e47a65aeb3b02f8226b9b11f1450ff86bb772776ebadd70" dependencies = [ - "base64 0.21.7", + "base64 0.22.1", "log", -<<<<<<< HEAD - "once_cell", - "rustls", - "rustls-webpki", - "url", - "webpki-roots", -======= "percent-encoding", "rustls", "rustls-pemfile", "rustls-pki-types", "ureq-proto", "utf-8", - "webpki-roots 0.26.11", + "webpki-roots 1.0.2", ] [[package]] name = "ureq-proto" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59db78ad1923f2b1be62b6da81fe80b173605ca0d57f85da2e005382adf693f7" +checksum = "c5b6cabebbecc4c45189ab06b52f956206cea7d8c8a20851c35a85cb169224cc" dependencies = [ "base64 0.22.1", "http", "httparse", "log", ->>>>>>> zcash-v2.4.2 ] [[package]] name = "url" -version = "2.5.4" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", "idna", @@ -6507,12 +5415,6 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" -[[package]] -name = "utf8_iter" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" - [[package]] name = "utf8parse" version = "0.2.2" @@ -6521,26 +5423,18 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -<<<<<<< HEAD version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" -======= -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cf4199d1e5d15ddd86a694e4d0dffa9c323ce759fea589f00fef9d81cc1931d" ->>>>>>> zcash-v2.4.2 dependencies = [ - "js-sys", "serde", - "wasm-bindgen", ] [[package]] name = "valuable" -version = "0.1.1" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" [[package]] name = "vcpkg" @@ -6556,17 +5450,14 @@ checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" [[package]] name = "vergen" -version = "9.0.6" +version = "9.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b2bf58be11fc9414104c6d3a2e464163db5ef74b12296bda593cac37b6e4777" +checksum = "349ed9e45296a581f455bc18039878f409992999bc1d5da12a6800eb18c8752f" dependencies = [ "anyhow", "cargo_metadata", "derive_builder", "regex", -<<<<<<< HEAD - "rustc_version 0.4.0", -======= "rustc_version", "rustversion", "vergen-lib", @@ -6574,14 +5465,13 @@ dependencies = [ [[package]] name = "vergen-git2" -version = "1.0.7" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f6ee511ec45098eabade8a0750e76eec671e7fb2d9360c563911336bea9cac1" +checksum = "e771aff771c0d7c2f42e434e2766d304d917e29b40f0424e8faaaa936bbc3f29" dependencies = [ "anyhow", "derive_builder", "git2", ->>>>>>> zcash-v2.4.2 "rustversion", "time", "vergen", @@ -6613,7 +5503,7 @@ checksum = "d674d135b4a8c1d7e813e2f8d1c9a58308aee4a680323066025e53132218bd91" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -6674,9 +5564,9 @@ checksum = "a7b6d5a78adc3e8f198e9cd730f219a695431467f7ec29dcfc63ade885feebe1" [[package]] name = "wait-timeout" -version = "0.2.1" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ac3b126d3914f9849036f826e054cbabdc8519970b8998ddaf3b5bd3c65f11" +checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" dependencies = [ "libc", ] @@ -6708,9 +5598,9 @@ checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" [[package]] name = "wasi" -version = "0.11.1+wasi-snapshot-preview1" +version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasi" @@ -6723,13 +5613,6 @@ dependencies = [ [[package]] name = "wasm-bindgen" -<<<<<<< HEAD -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" -dependencies = [ - "cfg-if 1.0.0", -======= version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" @@ -6737,60 +5620,40 @@ dependencies = [ "cfg-if", "once_cell", "rustversion", ->>>>>>> zcash-v2.4.2 "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -<<<<<<< HEAD -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" -======= version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" ->>>>>>> zcash-v2.4.2 dependencies = [ "bumpalo", "log", "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -<<<<<<< HEAD version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" -======= -version = "0.4.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" ->>>>>>> zcash-v2.4.2 dependencies = [ "cfg-if", "js-sys", - "once_cell", "wasm-bindgen", "web-sys", ] [[package]] name = "wasm-bindgen-macro" -<<<<<<< HEAD -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" -======= version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" ->>>>>>> zcash-v2.4.2 dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -6798,36 +5661,19 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -<<<<<<< HEAD -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" -======= version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" ->>>>>>> zcash-v2.4.2 dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -<<<<<<< HEAD -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" - -[[package]] -name = "web-sys" -version = "0.3.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" -======= version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" @@ -6837,9 +5683,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.77" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" dependencies = [ "js-sys", "wasm-bindgen", @@ -6850,7 +5696,6 @@ name = "web-time" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" ->>>>>>> zcash-v2.4.2 dependencies = [ "js-sys", "wasm-bindgen", @@ -6862,34 +5707,18 @@ version = "0.26.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9" dependencies = [ - "webpki-roots 1.0.1", + "webpki-roots 1.0.2", ] [[package]] -<<<<<<< HEAD -======= name = "webpki-roots" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8782dd5a41a24eed3a4f40b606249b3e236ca61adf1f25ea4d45c73de122b502" +checksum = "7e8983c3ab33d6fb807cfcdad2491c4ea8cbc8ed839181c7dfd9c67c83e261b2" dependencies = [ "rustls-pki-types", ] -[[package]] ->>>>>>> zcash-v2.4.2 -name = "which" -version = "6.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4ee928febd44d98f2f459a4a79bd4d928591333a494a10a868418ac1b39cf1f" -dependencies = [ - "either", - "home", -<<<<<<< HEAD - "once_cell", - "rustix 0.38.37", -] - [[package]] name = "which" version = "7.0.3" @@ -6898,10 +5727,7 @@ checksum = "24d643ce3fd3e5b54854602a080f34fb10ab75e0b813ee32d00ca2b44fa74762" dependencies = [ "either", "env_home", - "rustix 1.0.8", -======= - "rustix 0.38.44", ->>>>>>> zcash-v2.4.2 + "rustix", "winsafe", ] @@ -6937,77 +5763,58 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] -name = "windows-core" -version = "0.61.2" +name = "windows" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -<<<<<<< HEAD -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" dependencies = [ - "windows-targets 0.52.6", + "windows-core", + "windows-targets", ] [[package]] -name = "windows-sys" -version = "0.48.0" +name = "windows-core" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", -======= -checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-implement", - "windows-interface", - "windows-link", - "windows-result", - "windows-strings", + "windows-targets", ] [[package]] -name = "windows-implement" -version = "0.60.0" +name = "windows-link" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.104", -] +checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" [[package]] -name = "windows-interface" -version = "0.59.1" +name = "windows-registry" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" +checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.104", + "windows-result", + "windows-strings", + "windows-targets", ] -[[package]] -name = "windows-link" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" - [[package]] name = "windows-result" -version = "0.3.4" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" dependencies = [ - "windows-link", + "windows-targets", ] [[package]] name = "windows-strings" -version = "0.4.2" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" dependencies = [ - "windows-link", ->>>>>>> zcash-v2.4.2 + "windows-result", + "windows-targets", ] [[package]] @@ -7016,7 +5823,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -7025,16 +5832,7 @@ version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-sys" -version = "0.60.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" -dependencies = [ - "windows-targets 0.53.2", + "windows-targets", ] [[package]] @@ -7043,30 +5841,14 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm 0.52.6", - "windows_i686_msvc 0.52.6", - "windows_x86_64_gnu 0.52.6", - "windows_x86_64_gnullvm 0.52.6", - "windows_x86_64_msvc 0.52.6", -] - -[[package]] -name = "windows-targets" -version = "0.53.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c66f69fcc9ce11da9966ddb31a40968cad001c5bedeb5c2b82ede4253ab48aef" -dependencies = [ - "windows_aarch64_gnullvm 0.53.0", - "windows_aarch64_msvc 0.53.0", - "windows_i686_gnu 0.53.0", - "windows_i686_gnullvm 0.53.0", - "windows_i686_msvc 0.53.0", - "windows_x86_64_gnu 0.53.0", - "windows_x86_64_gnullvm 0.53.0", - "windows_x86_64_msvc 0.53.0", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] [[package]] @@ -7075,84 +5857,42 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" - [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" -[[package]] -name = "windows_aarch64_msvc" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" - [[package]] name = "windows_i686_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" -[[package]] -name = "windows_i686_gnu" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" - [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" -[[package]] -name = "windows_i686_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" - [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" -[[package]] -name = "windows_i686_msvc" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" - [[package]] name = "windows_x86_64_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" -[[package]] -name = "windows_x86_64_gnu" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" - [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" - [[package]] name = "windows_x86_64_msvc" version = "0.52.6" @@ -7160,7 +5900,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] -<<<<<<< HEAD name = "winnow" version = "0.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -7174,18 +5913,6 @@ name = "winnow" version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" -======= -name = "windows_x86_64_msvc" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" - -[[package]] -name = "winnow" -version = "0.7.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74c7b26e3480b707944fc872477815d29a8e429d2f93a1ce000f5fa84a15cbcd" ->>>>>>> zcash-v2.4.2 dependencies = [ "memchr", ] @@ -7202,22 +5929,9 @@ version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.2", ] -[[package]] -<<<<<<< HEAD -name = "winsafe" -version = "0.0.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d135d17ab770252ad95e9a872d365cf3090e3be864a34ab46f48555993efc904" -======= -name = "writeable" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb" ->>>>>>> zcash-v2.4.2 - [[package]] name = "wyz" version = "0.5.1" @@ -7246,42 +5960,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "213b7324336b53d2414b2db8537e56544d981803139155afa84f76eeebb7a546" [[package]] -<<<<<<< HEAD name = "zcash_address" version = "0.8.0" source = "git+https://github.com/QED-it/librustzcash?rev=a996e53e7a561a4723be6a712e44c8eb5fad4a6c#a996e53e7a561a4723be6a712e44c8eb5fad4a6c" dependencies = [ -======= -name = "yoke" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f41bb01b8226ef4bfd589436a297c53d118f65921786300e427be8d487695cc" -dependencies = [ - "serde", - "stable_deref_trait", - "yoke-derive", - "zerofrom", -] - -[[package]] -name = "yoke-derive" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.104", - "synstructure 0.13.2", -] - -[[package]] -name = "zcash_address" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71591bb4eb2fd7622e88eed42e7d7d8501cd1e920a0698c7fb08723a8c1d0b4f" -dependencies = [ ->>>>>>> zcash-v2.4.2 "bech32", "bs58", "core2", @@ -7292,14 +5974,8 @@ dependencies = [ [[package]] name = "zcash_client_backend" -<<<<<<< HEAD version = "0.19.0" source = "git+https://github.com/QED-it/librustzcash?rev=a996e53e7a561a4723be6a712e44c8eb5fad4a6c#a996e53e7a561a4723be6a712e44c8eb5fad4a6c" -======= -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17d9eb503faa9f72a1b6575f884e524ac43e816b275a28445e9ecb9c59e46771" ->>>>>>> zcash-v2.4.2 dependencies = [ "base64 0.22.1", "bech32", @@ -7311,7 +5987,7 @@ dependencies = [ "hex", "incrementalmerkletree", "memuse", - "nonempty 0.11.0", + "nonempty", "percent-encoding", "prost", "rand_core 0.6.4", @@ -7324,11 +6000,7 @@ dependencies = [ "time-core", "tonic-build 0.13.1", "tracing", -<<<<<<< HEAD - "which 7.0.3", -======= "which", ->>>>>>> zcash-v2.4.2 "zcash_address", "zcash_encoding", "zcash_keys", @@ -7343,29 +6015,16 @@ dependencies = [ [[package]] name = "zcash_encoding" version = "0.3.0" -<<<<<<< HEAD source = "git+https://github.com/QED-it/librustzcash?rev=a996e53e7a561a4723be6a712e44c8eb5fad4a6c#a996e53e7a561a4723be6a712e44c8eb5fad4a6c" -dependencies = [ - "core2", - "nonempty 0.11.0", -======= -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bca38087e6524e5f51a5b0fb3fc18f36d7b84bf67b2056f494ca0c281590953d" dependencies = [ "core2", "nonempty", ->>>>>>> zcash-v2.4.2 ] [[package]] name = "zcash_history" version = "0.4.0" -<<<<<<< HEAD source = "git+https://github.com/QED-it/librustzcash?rev=a996e53e7a561a4723be6a712e44c8eb5fad4a6c#a996e53e7a561a4723be6a712e44c8eb5fad4a6c" -======= -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fde17bf53792f9c756b313730da14880257d7661b5bfc69d0571c3a7c11a76d" ->>>>>>> zcash-v2.4.2 dependencies = [ "blake2b_simd", "byteorder", @@ -7374,14 +6033,8 @@ dependencies = [ [[package]] name = "zcash_keys" -<<<<<<< HEAD version = "0.9.0" source = "git+https://github.com/QED-it/librustzcash?rev=a996e53e7a561a4723be6a712e44c8eb5fad4a6c#a996e53e7a561a4723be6a712e44c8eb5fad4a6c" -======= -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f19138db56626babaed67c9f8d8d6094b0413cc34f63b6e5a76071e44d395175" ->>>>>>> zcash-v2.4.2 dependencies = [ "bech32", "blake2b_simd", @@ -7391,7 +6044,7 @@ dependencies = [ "document-features", "group", "memuse", - "nonempty 0.11.0", + "nonempty", "rand_core 0.6.4", "sapling-crypto", "secrecy", @@ -7407,12 +6060,7 @@ dependencies = [ [[package]] name = "zcash_note_encryption" version = "0.4.1" -<<<<<<< HEAD source = "git+https://github.com/zcash/zcash_note_encryption?branch=main#668ea44cf59a226715a5f3cb1bf88710a8c188a3" -======= -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77efec759c3798b6e4d829fcc762070d9b229b0f13338c40bf993b7b609c2272" ->>>>>>> zcash-v2.4.2 dependencies = [ "chacha20", "chacha20poly1305", @@ -7423,24 +6071,15 @@ dependencies = [ [[package]] name = "zcash_primitives" -<<<<<<< HEAD version = "0.23.0" source = "git+https://github.com/QED-it/librustzcash?rev=a996e53e7a561a4723be6a712e44c8eb5fad4a6c#a996e53e7a561a4723be6a712e44c8eb5fad4a6c" -======= -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7574550ec5eba75f4e9d447b186de1541c40251d7f3ae2693ddaa5a477760190" ->>>>>>> zcash-v2.4.2 dependencies = [ "bip32", "blake2b_simd", "block-buffer 0.11.0-rc.3", "bs58", "core2", -<<<<<<< HEAD "crypto-common 0.2.0-rc.1", -======= ->>>>>>> zcash-v2.4.2 "document-features", "equihash", "ff", @@ -7451,23 +6090,15 @@ dependencies = [ "incrementalmerkletree", "jubjub", "memuse", - "nonempty 0.11.0", + "nonempty", "orchard", "rand 0.8.5", "rand_core 0.6.4", -<<<<<<< HEAD - "redjubjub 0.8.0", - "ripemd 0.1.3", - "sapling-crypto", - "secp256k1 0.29.1", - "sha2 0.10.8", -======= "redjubjub", "ripemd 0.1.3", "sapling-crypto", "secp256k1", - "sha2 0.10.9", ->>>>>>> zcash-v2.4.2 + "sha2 0.10.8", "subtle", "tracing", "zcash_address", @@ -7481,14 +6112,8 @@ dependencies = [ [[package]] name = "zcash_proofs" -<<<<<<< HEAD version = "0.23.0" source = "git+https://github.com/QED-it/librustzcash?rev=a996e53e7a561a4723be6a712e44c8eb5fad4a6c#a996e53e7a561a4723be6a712e44c8eb5fad4a6c" -======= -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6bd0b0fe6a98a8b07e30c58457a2c2085f90e57ffac18eec9f72a566b471bde" ->>>>>>> zcash-v2.4.2 dependencies = [ "bellman", "blake2b_simd", @@ -7500,7 +6125,7 @@ dependencies = [ "known-folders", "lazy_static", "rand_core 0.6.4", - "redjubjub 0.8.0", + "redjubjub", "sapling-crypto", "tracing", "xdg", @@ -7510,12 +6135,7 @@ dependencies = [ [[package]] name = "zcash_protocol" version = "0.5.3" -<<<<<<< HEAD source = "git+https://github.com/QED-it/librustzcash?rev=a996e53e7a561a4723be6a712e44c8eb5fad4a6c#a996e53e7a561a4723be6a712e44c8eb5fad4a6c" -======= -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0525851dd97796f47537e9b15e504888cd214b2c6d021731fdfa0e7cb941a21e" ->>>>>>> zcash-v2.4.2 dependencies = [ "core2", "document-features", @@ -7529,19 +6149,15 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "caf6e76f310bb2d3cc233086a97c1710ba1de7ffbbf8198b8113407d0f427dfc" dependencies = [ -<<<<<<< HEAD - "bindgen", -======= "bindgen 0.72.0", - "bitflags 2.9.1", ->>>>>>> zcash-v2.4.2 + "bitflags 2.9.2", "cc", "enum_primitive", "ripemd 0.1.3", "secp256k1", "sha-1", - "sha2 0.10.9", - "thiserror 2.0.12", + "sha2 0.10.8", + "thiserror 2.0.15", "tracing", ] @@ -7556,36 +6172,8 @@ dependencies = [ [[package]] name = "zcash_transparent" -<<<<<<< HEAD version = "0.3.0" source = "git+https://github.com/QED-it/librustzcash?rev=a996e53e7a561a4723be6a712e44c8eb5fad4a6c#a996e53e7a561a4723be6a712e44c8eb5fad4a6c" -dependencies = [ - "bip32", - "blake2b_simd", - "bs58", - "core2", - "document-features", - "getset", - "hex", - "ripemd 0.1.3", - "secp256k1 0.29.1", - "sha2 0.10.8", - "subtle", - "zcash_address", - "zcash_encoding", - "zcash_protocol", - "zcash_spec", - "zip32", -] - -[[package]] -name = "zebra-chain" -version = "1.0.0-beta.41" -======= -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cd8c2d138ec893d3d384d97304da9ff879424056087c8ac811780a0e8d96a99" ->>>>>>> zcash-v2.4.2 dependencies = [ "bip32", "blake2b_simd", @@ -7596,7 +6184,7 @@ dependencies = [ "hex", "ripemd 0.1.3", "secp256k1", - "sha2 0.10.9", + "sha2 0.10.8", "subtle", "zcash_address", "zcash_encoding", @@ -7610,7 +6198,7 @@ name = "zebra-chain" version = "1.0.0" dependencies = [ "bech32", - "bitflags 2.9.1", + "bitflags 2.9.2", "bitflags-serde-legacy", "bitvec", "blake2b_simd", @@ -7629,14 +6217,9 @@ dependencies = [ "hex", "humantime", "incrementalmerkletree", -<<<<<<< HEAD - "itertools 0.13.0", -======= "itertools 0.14.0", ->>>>>>> zcash-v2.4.2 "jubjub", "lazy_static", - "nonempty 0.7.0", "num-integer", "orchard", "primitive-types", @@ -7647,39 +6230,26 @@ dependencies = [ "rand_core 0.6.4", "rayon", "reddsa", -<<<<<<< HEAD - "redjubjub 0.7.0", -======= "redjubjub", ->>>>>>> zcash-v2.4.2 "ripemd 0.1.3", "sapling-crypto", - "secp256k1 0.27.0", + "secp256k1", "serde", "serde-big-array", "serde_json", -<<<<<<< HEAD - "serde_with 3.11.0", - "sha2 0.10.8", -======= "serde_with", - "sha2 0.10.9", - "sinsemilla", ->>>>>>> zcash-v2.4.2 + "sha2 0.10.8", + "sinsemilla 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "spandoc", "static_assertions", "tempfile", - "thiserror 2.0.12", + "thiserror 2.0.15", "tinyvec", "tokio", "tracing", "uint 0.10.0", "x25519-dalek", "zcash_address", -<<<<<<< HEAD - "zcash_client_backend", -======= ->>>>>>> zcash-v2.4.2 "zcash_encoding", "zcash_history", "zcash_note_encryption", @@ -7716,7 +6286,7 @@ dependencies = [ "sapling-crypto", "serde", "spandoc", - "thiserror 2.0.12", + "thiserror 2.0.15", "tinyvec", "tokio", "tower", @@ -7736,35 +6306,10 @@ dependencies = [ ] [[package]] -<<<<<<< HEAD -name = "zebra-grpc" -version = "0.1.0-alpha.8" -dependencies = [ - "color-eyre", - "futures-util", - "insta", - "prost", - "serde", - "tokio", - "tokio-stream", - "tonic", - "tonic-build 0.12.3", - "tonic-reflection", - "tower", - "zcash_primitives", - "zebra-chain", - "zebra-node-services", - "zebra-state", - "zebra-test", -] - -[[package]] -======= ->>>>>>> zcash-v2.4.2 name = "zebra-network" version = "1.0.0" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.2", "byteorder", "bytes", "chrono", @@ -7788,18 +6333,12 @@ dependencies = [ "serde", "static_assertions", "tempfile", - "thiserror 2.0.12", + "thiserror 2.0.15", "tokio", "tokio-stream", -<<<<<<< HEAD - "tokio-util 0.7.12", + "tokio-util", "toml 0.8.19", "tower", -======= - "tokio-util", - "toml 0.8.23", - "tower 0.4.13", ->>>>>>> zcash-v2.4.2 "tracing", "tracing-error", "tracing-futures", @@ -7812,11 +6351,7 @@ name = "zebra-node-services" version = "1.0.0" dependencies = [ "color-eyre", -<<<<<<< HEAD - "jsonrpc-core", -======= "jsonrpsee-types", ->>>>>>> zcash-v2.4.2 "reqwest", "serde", "serde_json", @@ -7850,7 +6385,7 @@ dependencies = [ "serde", "serde_json", "serde_with", - "thiserror 2.0.12", + "thiserror 2.0.15", "tokio", "tokio-stream", "tonic", @@ -7859,15 +6394,10 @@ dependencies = [ "tower", "tracing", "zcash_address", -<<<<<<< HEAD - "zcash_primitives", - "zcash_protocol", -======= "zcash_keys", "zcash_primitives", "zcash_protocol", "zcash_transparent", ->>>>>>> zcash-v2.4.2 "zebra-chain", "zebra-consensus", "zebra-network", @@ -7878,62 +6408,12 @@ dependencies = [ ] [[package]] -<<<<<<< HEAD -name = "zebra-scan" -version = "0.1.0-alpha.10" -dependencies = [ - "bls12_381", - "chrono", - "color-eyre", - "ff", - "futures", - "group", - "hex", - "indexmap 2.6.0", - "insta", - "itertools 0.13.0", - "jsonrpc", - "jubjub", - "lazy_static", - "proptest", - "proptest-derive", - "rand 0.8.5", - "sapling-crypto", - "semver 1.0.23", - "serde", - "serde_json", - "structopt", - "tempfile", - "tokio", - "toml 0.8.19", - "tonic", - "tower", - "tracing", - "tracing-subscriber", - "zcash_address", - "zcash_client_backend", - "zcash_keys", - "zcash_note_encryption", - "zcash_primitives", - "zcash_protocol", - "zebra-chain", - "zebra-grpc", - "zebra-node-services", - "zebra-rpc", - "zebra-state", - "zebra-test", - "zebrad", -] - -[[package]] -======= ->>>>>>> zcash-v2.4.2 name = "zebra-script" version = "1.0.0" dependencies = [ "hex", "lazy_static", - "thiserror 2.0.12", + "thiserror 2.0.15", "zcash_script", "zebra-chain", "zebra-test", @@ -7976,7 +6456,7 @@ dependencies = [ "serde_json", "spandoc", "tempfile", - "thiserror 2.0.12", + "thiserror 2.0.15", "tinyvec", "tokio", "tower", @@ -7998,13 +6478,13 @@ dependencies = [ "itertools 0.14.0", "lazy_static", "once_cell", - "owo-colors", + "owo-colors 4.2.2", "proptest", "rand 0.8.5", "regex", "spandoc", "tempfile", - "thiserror 2.0.12", + "thiserror 2.0.15", "tinyvec", "tokio", "tower", @@ -8030,8 +6510,8 @@ dependencies = [ "serde_json", "serde_yml", "structopt", - "syn 2.0.104", - "thiserror 2.0.12", + "syn 2.0.106", + "thiserror 2.0.15", "tinyvec", "tokio", "tracing-error", @@ -8052,7 +6532,7 @@ dependencies = [ "atty", "bytes", "chrono", - "clap 4.5.41", + "clap 4.5.20", "color-eyre", "console-subscriber", "dirs", @@ -8087,12 +6567,12 @@ dependencies = [ "serde", "serde_json", "tempfile", - "thiserror 2.0.12", + "thiserror 2.0.15", "thread-priority", "tinyvec", "tokio", "tokio-stream", - "toml 0.8.23", + "toml 0.8.19", "tonic", "tonic-build 0.12.3", "tower", @@ -8119,43 +6599,23 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.8.26" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1039dd0d3c310cf05de012d8a39ff557cb0d23087fd44cad61df08fc31907a2f" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ + "byteorder", "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.26" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ecf5b4cc5364572d7f4c329661bcc82724222973f2cab6f050a4e5c22f75181" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", -] - -[[package]] -name = "zerofrom" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" -dependencies = [ - "zerofrom-derive", -] - -[[package]] -name = "zerofrom-derive" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.104", - "synstructure 0.13.2", + "syn 2.0.106", ] [[package]] @@ -8175,40 +6635,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", -] - -[[package]] -name = "zerotrie" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36f0bbd478583f79edad978b407914f61b2972f5af6fa089686016be8f9af595" -dependencies = [ - "displaydoc", - "yoke", - "zerofrom", -] - -[[package]] -name = "zerovec" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a05eb080e015ba39cc9e23bbe5e7fb04d5fb040350f99f34e338d5fdd294428" -dependencies = [ - "yoke", - "zerofrom", - "zerovec-derive", -] - -[[package]] -name = "zerovec-derive" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -8225,14 +6652,8 @@ dependencies = [ [[package]] name = "zip321" -<<<<<<< HEAD version = "0.4.0" source = "git+https://github.com/QED-it/librustzcash?rev=a996e53e7a561a4723be6a712e44c8eb5fad4a6c#a996e53e7a561a4723be6a712e44c8eb5fad4a6c" -======= -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91b5156b2f2e06d7819c2a5fcd4d515e745f5ac97a06cfb3721205d965de8f13" ->>>>>>> zcash-v2.4.2 dependencies = [ "base64 0.22.1", "nom", diff --git a/Cargo.toml b/Cargo.toml index bdaf4c26093..5ba1dfb654c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,33 +20,18 @@ resolver = "2" # `cargo release` settings [workspace.dependencies] -<<<<<<< HEAD -incrementalmerkletree = "0.8.2" -orchard = "0.11.0" +incrementalmerkletree = { version = "0.8.2", features = ["legacy-api"] } +orchard = "0.11" sapling-crypto = "0.5" -# The dependency versions below are in accordance with the currently used orchard version. -zcash_history = "0.4.0" zcash_address = "0.8.0" zcash_client_backend = "0.19.0" -zcash_encoding = "0.3.0" +zcash_encoding = "0.3" +zcash_history = "0.4" zcash_keys = "0.9.0" zcash_primitives = "0.23.0" zcash_proofs = "0.23.0" -zcash_protocol = "0.5.3" zcash_transparent = "0.3.0" -======= -incrementalmerkletree = { version = "0.8.2", features = ["legacy-api"] } -orchard = "0.11" -sapling-crypto = "0.5" -zcash_address = "0.7" -zcash_client_backend = "0.18" -zcash_encoding = "0.3" -zcash_history = "0.4" -zcash_keys = "0.8" -zcash_primitives = "0.22" -zcash_proofs = "0.22" -zcash_transparent = "0.2.3" -zcash_protocol = "0.5.1" +zcash_protocol = "0.5.3" zip32 = "0.2" abscissa_core = "0.7" atty = "0.2.14" @@ -168,7 +153,6 @@ wagyu-zcash-parameters = "0.2" x25519-dalek = "2.0.1" zcash_note_encryption = "0.4.1" zcash_script = "0.3.1" ->>>>>>> zcash-v2.4.2 [workspace.metadata.release] @@ -238,7 +222,6 @@ panic = "abort" # - add "-flto=thin" to all C/C++ code builds # - see https://doc.rust-lang.org/rustc/linker-plugin-lto.html#cc-code-as-a-dependency-in-rust lto = "thin" -<<<<<<< HEAD [patch.crates-io] halo2_proofs = { version = "0.3.0", git = "https://github.com/QED-it/halo2", branch = "zsa1" } @@ -257,5 +240,3 @@ zcash_keys = { version = "0.9.0", git = "https://github.com/QED-it/librustzcash" zcash_transparent = { version = "0.3.0", git = "https://github.com/QED-it/librustzcash", rev = "a996e53e7a561a4723be6a712e44c8eb5fad4a6c" } zcash_proofs = { version = "0.23.0", git = "https://github.com/QED-it/librustzcash", rev = "a996e53e7a561a4723be6a712e44c8eb5fad4a6c" } equihash = { version = "0.2.2", git = "https://github.com/QED-it/librustzcash", rev = "a996e53e7a561a4723be6a712e44c8eb5fad4a6c" } -======= ->>>>>>> zcash-v2.4.2 diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 57d00db4c00..5e0398f70bc 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,8 +1,3 @@ -<<<<<<< HEAD # TODO: Upstream specifies `channel = "stable"` — consider restoring it before final merge. [toolchain] -channel = "1.82.0" -======= -[toolchain] -channel = "stable" ->>>>>>> zcash-v2.4.2 +channel = "1.85.0" diff --git a/zebra-chain/Cargo.toml b/zebra-chain/Cargo.toml index ee3013e73c5..0c4c26e4e23 100644 --- a/zebra-chain/Cargo.toml +++ b/zebra-chain/Cargo.toml @@ -49,33 +49,11 @@ proptest-impl = [ bench = ["zebra-test"] -<<<<<<< HEAD -# Support for transaction version 6 -tx_v6 = [ - "nonempty" -] -======= tx_v6 = [] ->>>>>>> zcash-v2.4.2 [dependencies] # Cryptography -<<<<<<< HEAD -bitvec = "1.0.1" -bitflags = "2.5.0" -bitflags-serde-legacy = "0.1.1" -blake2b_simd = "1.0.2" -blake2s_simd = "1.0.2" -bridgetree = "0.7.0" -bs58 = { version = "0.5.1", features = ["check"] } -byteorder = "1.5.0" - -# TODO: Internal miner feature functionality was removed at https://github.com/ZcashFoundation/zebra/issues/8180 -# See what was removed at https://github.com/ZcashFoundation/zebra/blob/v1.5.1/zebra-chain/Cargo.toml#L73-L85 -# Restore support when conditions are met. https://github.com/ZcashFoundation/zebra/issues/8183 -equihash = "0.2.2" -======= bitvec = { workspace = true } bitflags = { workspace = true } bitflags-serde-legacy = { workspace = true } @@ -85,7 +63,6 @@ bs58 = { workspace = true, features = ["check"] } byteorder = { workspace = true } equihash = { workspace = true } ->>>>>>> zcash-v2.4.2 group = { workspace = true } incrementalmerkletree.workspace = true @@ -115,13 +92,7 @@ sapling-crypto.workspace = true zcash_protocol.workspace = true zcash_address.workspace = true zcash_transparent.workspace = true -<<<<<<< HEAD - -# Used for orchard serialization -nonempty = { version = "0.7", optional = true } -======= sinsemilla = { version = "0.1" } ->>>>>>> zcash-v2.4.2 # Time chrono = { workspace = true, features = ["clock", "std", "serde"] } diff --git a/zebra-chain/proptest-regressions/block/tests/prop.txt b/zebra-chain/proptest-regressions/block/tests/prop.txt new file mode 100644 index 00000000000..5bfbf1d12b4 --- /dev/null +++ b/zebra-chain/proptest-regressions/block/tests/prop.txt @@ -0,0 +1,9 @@ +# Seeds for failure cases proptest has generated in the past. It is +# automatically read and these particular cases re-run before any +# novel cases are generated. +# +# It is recommended to check this file in to source control so that +# everyone who runs the test benefits from these saved cases. +cc c7d8676d35bb53ddfa38c35230db08e83c04e9189b4ed1d8cf11ccfaca7245cb # shrinks to block = Block { header: Header { version: 4, previous_block_hash: block::Hash("2d5c252f187cdb9c9b3666d8f96328acd0db66abeb6999a9742a3b0000000000"), merkle_root: Root("6726047952f962585058db70cf19dc9b3c5c41b1c1ec8a4a30a1fa456de87e45"), commitment_bytes: [u8; 32]("cc709ce38a992f458a1c64edbd2917c79342fc4ff3caa9833b643bb116652565"), time: 2017-11-19T15:46:23Z, difficulty_threshold: CompactDifficulty(0x20336cdd, Some(ExpandedDifficulty("336cdd0000000000000000000000000000000000000000000000000000000000"))), nonce: [u8; 32]("59f2b300aaab0b7b50137e4672f83baad78fc54b56ea5e1d956ab82fc7d0411b"), solution: EquihashSolution("424b7faacb5381b17aa15633c8b2e4d99739336907f3e1f5bf105fb04f92b81c4389340432325308adc9fc2cedac054300e9aa527538b48934df08e6eaff6d84b7dec021f9cd7ce7d439f47eac5417fa255701fe73e03983d577bd7359db28455727d995ae52dff17d33efb0243ac0df5661cfbef4173a390738445713ea3b142c553d235534e657d84e021467bc4c9fa18926ada301dbd447217e7a701cb891c67f28bfe4ff5ee5e991358a895f2ce4ccc1a9cee68c55a10cacb56da1446fb26e14b81a4448b76b4c4274eafd6cfa674c5ea5863183a0cbc9d74be1e2bd285aa0a9880ca88573f3d1eb276942af2fed985cca48e0a1c7e37f38b4c989169b3653ba252873d18ecf7c5019b28308d0849ec5aa3c44c17b7a67778f9883fbcf253896625b150e9396b511706bc635aee6ff495a27bb06b943b55acdb5ebcb24213a44697efb361e7584cdec952f590f602114d8029134cf9a80f40820899db1efeb916ac8e370b29373149790bbfc472988b9923ac22b48870dd0e8ffa8d6a80be92f48e35846f7b3014dddf33d0e9da45a9149546c8daafb7b1b9e64d638dd3037c638029a6d38de56ed00ae19d47f532533c8421f0b3770bacb6130a2aeaf2dee8d741679a439332f02d0754a774b161720ffe93c51f21a46190e9c55ed018a17dad2f432eab5f98cda63cbf4639682746a4747b76d24326a0bf8ab37943f7205056417216dea4728af86e121bc382807d23bd98b8149bb2e11571e189f9ee77b9754a47929390d2493effdbf50861304a408691430b556db0dd59a5ef3e68d12d89da88fe5527c1c5303ec38058bab353e2d1bf9e8be29ffafc739bbd52d72fc24b9f0c11ef8135dffa2c242f1742a5569aad2087efa82d4472de2197a9b33f07581ef6897c4b52bb28fc863f129990e4d1e150a7ba1ffa74332f2f3ef7a702334baf6e5d0973ff124e17658f33a89dfc863b08e0f00858f3e958fd76213b2cb21e2c30dbcb7d03f21f9135094ff3fd412a043ed31e30ce5f7fe17e382c8a89ee98793d891cf1f6e5861ac6a36c189cf800d78bf17d94087378dab279f334fb1507e2a48a88e00173874c0b59626fba7ff36b8a284d8285273deff978d8a34efc9ab747a37bc2d6d532bc55c9818c67bb5e68fc1fb2970aa5f3c05c9a2afd18f1a46c4365cd8c4f6312534de4ba1cb2e324de26224ca69ee9ac8ae897ed0c8673deccdeaec715c4676d8686fa3f2ecb612f33e6a7ee9441a5d79b9aeff77305d00a5174071a9e05d119261bdafdd07b43fd2f8847a589c771a3a96fd8c6717b15778a8177e5d41fe617210b6591baf05b06ec92cbb7e1fa6925b927d89652d55fce25dd44c71a4da0d022fa7d85adce535a6ebadb0894a570f4a4435295c862bf3b81e448238ac4399b0c559c85633fd7ed131b1885561607d74cc74b774caf5260129c4b533329a6b1b9aae468972b7577e465c1fd023281d6244dd28c1ad13f9bb5c6ea7f3f31567e490975455fe4bd3e1c57afe2257f77b778423dcdb559b6ce2ba529fb7a5cbac3ef40d17e8739b8c05b5047b17b22792d1acba723cde322c583754672f0f76716f2346ee90af89d38d42ffcd5da0df308916dbc69805dc6addd65a82c98f4f53a9b3bc1911ef5410bec2ab74053654492a7de2fac0f0dfeb134ef7c1b4f0b0b4b1ed8c8235b483ebe3286cafe42dc716cc9bc9121bc77bf9342856def54bc2c723a7850d91a44df410bb380f5660c15451586968c74d755324a87bd73b1fe151df3af2817800a51fad02b699922bfa3069c7e9fa515828d87f3a22b0c2229cf2a8ec8631eddec056a6c91b10061051fb0b7a9b92feec1362efcd392b9a9e8a208ec81cc1961bda56bf310d7e41144599bb3468b261aa") }, transactions: [V5 { network_upgrade: Heartwood, lock_time: Height(Height(480580457)), expiry_height: Height(32308125), inputs: [Coinbase { height: Height(1687104), data: CoinbaseData("b\\x17P\\xa3&d\\xfa\\xeb\\xde\\xbc\\xd6\\x13\\x18\\xeb;3u"), sequence: 318224598 }], outputs: [], sapling_shielded_data: None, orchard_shielded_data: Some(ShieldedData { flags: Flags(0x0), value_balance: Amount(-1665014914533119), shared_anchor: Root("0f87c9b793c142112c07d330c66d40a683520e8e56740771fe83d6884d736210"), proof: Halo2Proof("acc526ba49cdf5daa87fc0314bd23323a3af2991b52d252da9b3bcda5961f32b79bb4db075a8db97441aeb97ce645f"), actions: AtLeastOne { inner: [AuthorizedAction { action: Action { cv: ValueCommitment { x: "0000000000000000000000000000000000000000000000000000000000000000", y: "0000000000000000000000000000000000000000000000000000000000000000" }, nullifier: Nullifier(0x3b5fe4a43d06d99281541089135fdc46facb83d4f3c88876fb8f42b80d486799), rk: VerificationKeyBytes { bytes: "acfbcb625ae552737cf21591e57958e5e7bbfe55efddae66c5cbdee68b4a95bf" }, cm_x: 0x0000000000000000000000000000000000000000000000000000000000000000, ephemeral_key: EphemeralPublicKey { x: "00000000ed302d991bf94c09fc98462200000000000000000000000000000040", y: "0200000000000000000000000000000000000000000000000000000000000000" }, enc_ciphertext: EncryptedNote("87573286e0d8118694398e2c731df4ce5174418eadc01c7fb1d3b84b0dc835e5022e80cc24a98508c1a29cec7d3cdb29ebe6a276b393b76b82eefe233bc8997cb21bff709486cf8765cadb441f0ae23dc3c20722b65ed00be7340bb23899ed1f3cae270045d068443e0e8851b63752e61d044eea06fa4b992558c65708b0fba94be75800d0128d53e41222d7f6f3d340c39950fbcc57fe0ea41d2ad99fb91054b2130e406d40500b2a1febfb304ebd2f8e9b0c26f764e8153e22c85dbfad03b9437e4e817c5162ce50cc1a730bef7cf46f3ef729b0d564b8513095840844534371bcf2fa9aba7250491a9a1e669e8ca630f340c368edbb11a86d634c7bf7f78c0ce996d6dc2ffe43850a1667abac36fb4b4af61624d69ae23586629b860c857d1064bbc5af1ca42a49030e22f96224920cf2293e01875fc651087d7353f141e73841a4a14304f7e34184f417d158aa459658446c37d35e7e480ac016c62391b20e91419d1d8894485358636244ea8648180b0c6b8f76bfc9e42d06ab47b43ffc298befc58981b61001dae35c8ccb5166b2c8bdd717c11122b913edfb049c17e6c245003463ebdbf7d090f0c253c2376d221c8be3a3e658b823cef82833ef55e9c700300ce2eea025bcc6bc6f20446e258a89794184d284d4ee2e8d7a5cec78431c39847e78b2394dd4ec0d75da717b46baacb02ae15eea9080adf5d05a71eab81e5413bbfe233cc9ce93392434cfab4d8389554be35ea6cf735bc188aa5b20252e25d590776a4fde9b748127469eaa8d01bc2cce639eaea2e35efc1d371c8e07507285d6"), out_ciphertext: WrappedNoteKey("34b0dde90c52711cb31ccb28db6a0f4e9a4950d323f6687318f6fb8c24dc301ec6f3602566670ba1e04b7f4645e904f2ac776065037756d2e85adb61a980afc67707563d19846b14f7b33adff622defe") }, spend_auth_sig: Signature { r_bytes: "bf1b5fd3c5b9cbd8dd882b71d8a7b210f151866810d4bd2f15c3fc425317cd73", s_bytes: "3d01abbd3eb60dd05cb94e2f67eef0ae10c8664c9efbeae196ca136bcab61cf2" } }] }, binding_sig: Signature { r_bytes: "edb35f3a4f890dc40617fff899c5d78533e94ac8765c1658b47d1f4f8ffa7799", s_bytes: "823e700437e7af3ed220785d884d479462672407d496ef6a69318f2acc1d4455" }, burn: Some([]) }) }] }, network = Mainnet +cc 895b3b0863eb1aa1007096aa5c575b9719193aff66ca5450a7c0068099af0972 # shrinks to block = Block { header: Header { version: 4, previous_block_hash: block::Hash("cd3c51b96f6b43796dfc1d7efb6b39848df7a0461199be42eec6100000000000"), merkle_root: Root("39eeec9aa77fdd2be5051eb86460188052cedd77419d300f66d240b8fb067843"), commitment_bytes: [u8; 32]("19e77d7207aa11d30ced9f9da5aeb9bbed94307f141047b1d14946255abae266"), time: 2094-02-04T12:25:54Z, difficulty_threshold: CompactDifficulty(0x2100bc89, Some(ExpandedDifficulty("bc89000000000000000000000000000000000000000000000000000000000000"))), nonce: [u8; 32]("6b5b4dc44ce2a74021297b073b45e44b71101fbbb4f8c545059d8dfcd3ec359a"), solution: EquihashSolution("07517202b0d980f1d9fe5f04bdc4c37ad3a4d3497849dac21890725f790b82e4a15a093400a84fda72835b290635e92e3e2d222c6be8282c9446b6d4df8e9cba50dc0ab9646728c09096232066c652b92985879b99c20a676c503d063511f95f4c8b9fff4e24698c208ce45affaebb2dd1729b7774c9b99671123393a43a79b8eb586d2af7dde8c28039f1709b37e4d785065e682b4223a0cb5d0e71ed6f2c7e240bddded87600c43c9d1141f97296e4034b4830eb2e835367c63c9b60ea2d615e1feaea1771adf5f460052a1e0ca1fdf6367ddf702bd5c578ab02d372600a362ee47d897cb47f1c0e7b9ae40419083fa50410f6fc4d990e09875efc7dd7fded6191a0a8a62ebde345eae841074f5a9c0fe1aa97e2c7f16cffd38912fd6d3d02e305ab6f4d056488e44c5c8607e19009513103617b4bde929f1688dd7a731973b061974b4a1b587e5554ab4e65acddb36f07667e4d39b2deb7de6b3ec34f289ca2cbc4eb528ed49a5fe1a09519c7fb7173070d19473ed49c7c22a181165f5be5ffdd8576457a3bcccb80f8a5d14607da01e502bed3784cfc8b45188e2dadba257ec5c50a15011a9e7f88e20dd9866c0584e5a650c902a3ded64fd95d06f0549a8ad42d32e8ea06e7a4edf4d518b9b161284cd4db56676be888b1e1c2399241e02247cf199e9e743fbbd6e138958d96745b61b328c887d8d9f4313788360bf17fcf7f237e10cd8290ca2b78a2bbcf696b66adbb7ffd160743005dc57c28e75b07c41c3ee76b9851dc7a9024977b83c983fcecae738a3379cad49021a81b5b878f05885ebd7123d1c6e28a463b8ec69429d7370416aff02b709d4d80a9ded2b8ac214135ebd4c9a92ac1dcdfff3594a6d89cdcd6dc48beaa8d60bff5fedbedd7355aff3ecad44d75149337a734b2d192a5cc09dccce357241834d165bd0045a2814f315e866e447a92163181f9dd6211e2d6cf60c5461187f996ce6c07ec41dff6da50506a8e33c99dee7dbf21c4fe8fa52708e84f027afe5283ff21c32bb7627abe25c9b14516a68ee20a3a295c2c909df57a459be4377f8b3215f068a73166d53ddcfc7146c2c23fdb4e72212e12c0765b4252bfee368b392e9f295eff6ec8e30df86c6d0068a61882fa52afc239b0e648a381c8af0fff58bcf5060fc337c674bb3f002bad115ad7ae0e11c4a9c857b7d53ea39764dd4f893b7a372a7859dc6fa0fd33ae16ee87d02c4dd6efeebc1f5493a7bf001ca8c7c9692fccc4eef73edc564cc4eed217974823cd9ba7587b70c8d95fafa800a714cf3d2c7c5fc0ba5de789a1471226407eef1e87c83a5be7274de7782c3b2fc529a68a2ea72435db8b04bc7951f02797dff9b25db8ee254747c3057ce22c599b179cbece161d41162056e0f82bc64270b9baf122beb49999b61ad28febec726823198f421bc08c5989eeadbfd2c8dea0ca2d4827adf8c2f36f0dbadf891119a84507a4a6af16c370af59c895ee0fe4e22a05a838bc930bf76bd2574babb7c9da51261255d3979ea76ea823d9107cdb5f06316402cf494fc20301a691a98f54d773fb448eef25ea361072a4b8acbfbb83ccca9490b3ab446de81bdb207cd9baa1e16ef6414f2fbb05023507b0c7b7623374c6444c1de694a9b9eafae65a3a64269d8852a50b521f74b35c1e947ffe26283e61e7d8a108aeccd73d34b8bdf4ef6b812ed1b80906000117ee0b195a36e1da7e3aae1b2556e9f524e6e50f056afe8ce3f4646b3a8b050ec4ccad6832d2b0cee35958b4d096998125e8af83fa5c4332c2add6d7e2c1f67a6350afa6b49879d84da314537675c10f418f6d76cd3379d32315f2379349a6cf3f7d1638d020c4db9312acac23f83b5c1243cfe8d0058108bde3607d6c1a000daadb") }, transactions: [V5 { network_upgrade: Blossom, lock_time: Time(2039-06-12T06:06:16Z), expiry_height: Height(644920957), inputs: [Coinbase { height: Height(3111000), data: CoinbaseData("~^\\xadRk,!F\\xea|]P`\\x97\\xf4\\x02\\xb4:i\\xc5\\xe1\\xef\\xce\\x1f\\x99\\x9c\\\"\\x15\\x83\\xc1\\xa8P\\x13pG&!m1&\\xe5\\xab\\x11\\xc9\\xfd\\xb4\\xfcV\\x82\\x15\\x02t\\xd29\\x80:\\x13{h\\xa0\\xe5b\\x1f\\x96\\xc8\\xaayo\\xf6\\x0c{\\x15KF\\xf6!\\xeb\\x1a"), sequence: 931075032 }], outputs: [Output { value: Amount(937209786863753), lock_script: Script("514d62dfbb8ccc3cdf1dd4392f982a7b67cbe2382ecd7eb5ac8858adeba2280d46eba94312d1f4b8f2bf58013f3ff9eb307971") }, Output { value: Amount(315287296346926), lock_script: Script("9a50afb23324b8ee8b1fad002822fd2c44f300ef6c866701aa7605ebdbcf4bf4e4845135edbef2b2c8bc578c8e2cf10f879b9d827578196f5f1977c8291fafac342a") }], sapling_shielded_data: Some(ShieldedData { value_balance: Amount(439633831225796), transfers: SpendsAndMaybeOutputs { shared_anchor: Root("01bb639c03f207b7667c929558f6daf04002ffe1a7cb8c07e518ddec63dc2c6d"), spends: AtLeastOne { inner: [Spend { cv: NotSmallOrderValueCommitment(ValueCommitment { u: "feada7f15dd3b3e4af81bf291b5df5ca87810ad6dd030f8bc88737bfb8cbed62", v: "0b00000000000000000000000000000000000000000000000000000000000000" }), per_spend_anchor: FieldNotPresent, nullifier: Nullifier([u8; 32]("9b46def65851a127c96f7185bb184e331c30b1dd61829dc94e81f56afbe6570e")), rk: ValidatingKey(VerificationKey(VerificationKey { point: ExtendedPoint { u: 0x1c573855bb45a5b81144296cd70e23485859187c41b40071a08b8142f993369b, v: 0x316cee1affb0884bb65781da6900078c7df7f09aebd3a5bad1668fc5f6bc7e12, z: 0x43995e7e594593c29472f0fa71200ea3d706223d016658025486d1da51107e90, t1: 0x6973ac48867ecd16f1ae8e0c1c9fbc9d685757a0df2e3b71c1c9d7d911e892a6, t2: 0x6a0e2b0c3b8000b62e96eaf4af43ca30b4277f90f5e6c9838e72fb90c0f939ea }, bytes: VerificationKeyBytes { bytes: "2d83fd9383a21b2f7a8ed0fadba102bb6b0f2ce456f7eff13f36b0e87f483d4c" } })), zkproof: Groth16Proof("a2d27e541a92ad7885a6fef947bb00199d055aa5fd129ea1c18e67f015d546148bfa8f2e6a5516a4ab7426c1d3ee87359b962f82f7a179224b85c1a615aff1ec8b8858f356ed9b2065d851def9ce058c45d6691a2145cf70fc7f6fc7c853c0329693a7c37b78422d84d138767afc5d28092473608962d192edd5847f2c0e5d8493bdebcec82f78ce9744c977362b0f4f1307404cec3f1d2f8ef67bf7537539284e549e73174ef6fad0d7694fbac04e8d7c920c06ee26f5fc51b365a8423d5e23"), spend_auth_sig: Signature(Signature { r_bytes: "a66c1c99224c9da4c3e7cf507901d503128635ebd61b3851d8ff2d3ae5d8e436", s_bytes: "ba4ffd5058fdeb094b2567e4144fb8d4483605feb4ff9c83445d392e4d72e226" }) }, Spend { cv: NotSmallOrderValueCommitment(ValueCommitment { u: "feada7f15dd3b3e4af81bf291b5df5ca87810ad6dd030f8bc88737bfb8cbed62", v: "0b00000000000000000000000000000000000000000000000000000000000000" }), per_spend_anchor: FieldNotPresent, nullifier: Nullifier([u8; 32]("c57d510f59a465a2d9028fc09f65d0be8212004d35a0d95318c9645f75a4ad89")), rk: ValidatingKey(VerificationKey(VerificationKey { point: ExtendedPoint { u: 0x5e9b5ad22f1ab1485566b21214f84411a2784400be3fc1558b8a8914b1f281c2, v: 0x26a7a506e3f416a17a2542b675b58ae40a9aca23d95be5b7fda446f843e4c65b, z: 0x3bb50ce9b966eaf7f811b9a3447edf3bab18f8e82757f4b3d19a32fc2ce7d52b, t1: 0x0885c9426c02811c9c35e359d0348528d54403937c41012c4d0f8d01de372989, t2: 0x4760879ca738727f4b1cb7d904e1554056ed4fbe1e9ba76e163e6b204483bc4b }, bytes: VerificationKeyBytes { bytes: "c97b84b645e8218150a0fcb6b548cb8e07f62eba70b2d8059899fa49f75924a8" } })), zkproof: Groth16Proof("176a2d16de98383dbcbc60beefcd584df1006fac45e9f2ee204dad8531ef1dd49b035be1e8368ddd10ef5affc431807a4e37e331b4d7bd50df4b7764ec5d1019809e5aab980bc39ce788a63ba07851fd8c0ddfc7c13453221fc1d1364d5687d87f3d85c0f8d98a2f46d8356fb7f3112b53022410a8cf0ef9618a42e3bb64fcca3e26396006aa2956a6236f9a734516672c07e83b4561b6b2da994f7ae171e75f8050cc23b46349ae2a89cc5be63ddcfc40d056d04dde3e8f5bd3941c4363a7c5"), spend_auth_sig: Signature(Signature { r_bytes: "3d3dff152e0ab424cac965d021fc6a2070dfe64bd468299e1f7e59c84354b7be", s_bytes: "0bdffac4ed45b3fc40639754f9a67c55ec69658080b224fde7b50ae64bc6d5c7" }) }] }, maybe_outputs: [Output { cv: NotSmallOrderValueCommitment(ValueCommitment { u: "feada7f15dd3b3e4af81bf291b5df5ca87810ad6dd030f8bc88737bfb8cbed62", v: "0b00000000000000000000000000000000000000000000000000000000000000" }), cm_u: 0x0000000000000000000000000000000000000000000000000000000000000000, ephemeral_key: EphemeralPublicKey { u: "feada7f15dd3b3e4af81bf291b5df5ca87810ad6dd030f8bc88737bfb8cbed62", v: "0b00000000000000000000000000000000000000000000000000000000000000" }, enc_ciphertext: EncryptedNote("bdac1323d9a964c5664bbf1c986f4f3cf6ecb63f2058eb6d848fdfd34ed10f648bf8776e6b532d0adc5d4227f10a0777802ec85fb54fe74d3adecaa94cb08248c4d436bd1879fdacc8fa7efd6ca4841e517a35f009ef99e2e4659b6a45684ac3bd94b29a80024d3979b36b5d3b36bbe1cef297cc3f37cd4d763d24dc4e8266158ca159b6403c6c9d721e4d4e1ea0dca46e51a3a8ef1dd96021607a2efa67bf8822ee8a5ab60e59f0c23b9c6ab7698c6a859a9eb882c597f133b080c5ead3686fb20bfbc3e83aeb2b7b6932146876ad7a7bda3b973c8f55894fa659465d679b7cf19b90eddc97c26095a689b5f01fe4dd7969c85c9aaca4ba6fd257d09c75f6f7254d9c366249d30f0fa0e5f363eb58b13efb1919d5a9471a3be7555eae107a8b4bc8e5881f8a4497f64478a9f8a3287e2dbe1a64258f6f57f455aab1eb8c0ff058be1bd014f4b9c4d8bf1b806166f2049a533e5c608e3ad501aaffc72f35db7aed08240b0405963c3d1d02f2e567797ed8c502aa9e697aac32c3c956386210fe44a980ebb5e10f2422e3133ffd678af640e78c4b3e9090c253ff8a04b128545c212fdd99bb2de5f4886d34ad6ef5a912db213eae7df02cb8851ffa1810fdacb2cd5d4eef4c8b9b4f25885695b5ca3f58d08890217e0a1820826304a0f6d663a15287108ca9671cf77be19d7b45cdc923ef50c0814cc8d816dcd33e1bda15b9484ea8c525eb94bfa94ba83b01b717b7b16cb2338ad587dcb96c3c6f11b259359227874eccce1d5b24dfe3cff58a3e38549572259ef8d56fc98a281d9dc9ab29ceae25e3d3"), out_ciphertext: WrappedNoteKey("c7b8bd2039b1e44b37ce9595b7095a04340495e6dcdb6958bad1b6abdfd15fb2f42bf5c99a1d4b120adb1aefe697daae5ca66a28a6fddbbcf22f77d223abc1566f9f4b5f41096ecdd089ae5c700eb8ec"), zkproof: Groth16Proof("23858be37d177245ead4e99fe57850454d6c0da08dafe553a9e7086e4f9221ca07919153f683a87bae4368670b231ef9b7a4cb05fd97e5543de0b65378a3e375b05b633dd31418746c73faa01444edf1c02236c6051b1df68408eb1cf2e4c466e77161ab3e9a728e9a3cce9b6e9f47d6e5e7739068d438555c08e5eee84fd56535b6682c98743959b22828a7b86510d435da5f3d78f3ac5f2c410931cc3a83ea65e1176e2874a4fe239f39ba04722d751106b33b75eebba828d9cb047d12b93f") }] }, binding_sig: Signature(Signature { r_bytes: "1c0f2902fee13c090668c306c1c47798fd19ff435a17760d33963c64c9980183", s_bytes: "0e6c62318443bbafdd863c039005143c3e1af573aa7088bc43c84dd3abbb6f68" }) }), orchard_shielded_data: None }, V4 { inputs: [PrevOut { outpoint: OutPoint { hash: transaction::Hash("1f3df4dd2e4b91d5a47b79a08beea80987fe7d7783e38aad982ef845d6dbbceb"), index: 1939448267 }, unlock_script: Script("00eeea398f272e6ae7a7fd"), sequence: 2852981499 }, PrevOut { outpoint: OutPoint { hash: transaction::Hash("1ac01496dc15b9fc074fb327aab26830745bf57430a62514634824098c5b41e2"), index: 2592743696 }, unlock_script: Script("689427595c14598dd943181296609a9a39c4b3fe"), sequence: 1770036452 }, PrevOut { outpoint: OutPoint { hash: transaction::Hash("9637dc9e162e5a1f9563862bc41f9599e5a210d587dff44b45133a3e2bf51136"), index: 574621683 }, unlock_script: Script("2131df1baa9a4b874f43de2b62338929c3b76221880dcd1abf07cb3dd0b9"), sequence: 1057502992 }, PrevOut { outpoint: OutPoint { hash: transaction::Hash("d0edb13722314def6926e9ef0cbcacf03833975027b4e4166bf16ce34360ecdf"), index: 2584643886 }, unlock_script: Script("5615dd"), sequence: 2161501083 }], outputs: [], lock_time: Height(Height(7007986)), expiry_height: Height(624050868), joinsplit_data: None, sapling_shielded_data: Some(ShieldedData { value_balance: Amount(1036846515935144), transfers: SpendsAndMaybeOutputs { shared_anchor: FieldNotPresent, spends: AtLeastOne { inner: [Spend { cv: NotSmallOrderValueCommitment(ValueCommitment { u: "feada7f15dd3b3e4af81bf291b5df5ca87810ad6dd030f8bc88737bfb8cbed62", v: "0b00000000000000000000000000000000000000000000000000000000000000" }), per_spend_anchor: Root("a4269bda9f122da66cf3c8610e3311c497d5c198ff5ba09c07eb5750682ac516"), nullifier: Nullifier([u8; 32]("ee1ea9387c4f2ccb1120272747de4f26d91aaea58cbaf881707b663a3ac1f2b2")), rk: ValidatingKey(VerificationKey(VerificationKey { point: ExtendedPoint { u: 0x083d1a9bd17080c490a35e946a33c0a16c76af16969fa26401417acd51e5a8f5, v: 0x10bafbd4dd999f0a3ace248211837da27d6891b4db204190fe594856294ac811, z: 0x48486145ca2729a384872fc1ee1c5ae715e54142757803f74dc30513e9d06477, t1: 0x3e536983b0998deabb48eabb17112eb5468d8a7ace0f478ffad05272dcad9d9d, t2: 0x5a429ec3dd0863951f5a61a600b356953beac0e545cc25121656f87b96bfe24c }, bytes: VerificationKeyBytes { bytes: "5347469592528ec7288d949595c264e2d30b43f5aabf3753f6b71766df3cbca8" } })), zkproof: Groth16Proof("f02d964e27f8ca27f8b21895c16c57e20c0e0b8589c02d982c0722158f151b2c59572e04b41e0e7df32d2b03d7e4dfe7de31ce1070c0ef3afd77c78f961532b9614571602f5ab4586c93921ca5e721ead78252478045b92125d2ed20efb73971a0f836db5adc54ff237c05e73f0dc9e2b16095f9459eaa423d4f596caa29564b5c100d2e8ae0cf7aa89b29a89d75d5dd280db893be1097a022de639eef4ee17db7ab9bf649274528f03cd1d8494dbb58c6eeef555b7a3b4f05a7d5862ae77a28"), spend_auth_sig: Signature(Signature { r_bytes: "c254eb01e523183ed62b54fe8a9091b79ed475d2b9dc386c9f00114167bf6d74", s_bytes: "f0ae3ca6d68658a9f6f238629c121b50426673f2da7db1aef18d7e7ec8809922" }) }, Spend { cv: NotSmallOrderValueCommitment(ValueCommitment { u: "feada7f15dd3b3e4af81bf291b5df5ca87810ad6dd030f8bc88737bfb8cbed62", v: "0b00000000000000000000000000000000000000000000000000000000000000" }), per_spend_anchor: Root("617e801d2b2b6ac345eb383f64360f5d54fc8b8522fd2051daa4f0dbf72de80d"), nullifier: Nullifier([u8; 32]("cfb8a6950550689c204b95a67a00b832660673b7d63165810e1063903ea6d44a")), rk: ValidatingKey(VerificationKey(VerificationKey { point: ExtendedPoint { u: 0x3b579f10934309c8977f7d72486e35616b990da2acca66d6cb056da4afb86912, v: 0x0e0fda5006901f495a3a614349e6a66ec1b49951d1ea1d121d513167985a4550, z: 0x3132759d9a9a096d9d9e725da4534aaec549e82a943be693ec73092d5a04a204, t1: 0x72119e9e9b5c77720f7ac1376a135e026ff193fc0e4b83401e3c64ee661755f1, t2: 0x4fc3536928ea29479de4e88a673908d2f2a640976b1c005b118c1d9f1dcf61f9 }, bytes: VerificationKeyBytes { bytes: "95e22536cdd84457eacc889f3b17cbcb5996ed22b7aa790d07e3818b532edf03" } })), zkproof: Groth16Proof("e26d8d4f84bbdf622b026fbb0d352b21c1fecbf5bfb5935e26ad0ac60bd017246875aa0f9242a909309a51a3fd0c40ce67dc1cac065e9816fa82e8c45a899499fd1bd694d6df57de10ea1bc0d419ab2a61fb0215561a68e26984ad2378741af99c33ef85db6567503b4152d9c6a2fc70b7e277fd289711d1da1bd6c6138fa9cb445796f55f6ff0cf4bf50ffaa7042c6a77a7419b1df9e22a472232c6cd68114f488e183e0298c468566fd071ad53cfeb38bb8439af81ff0ba65fa67ccdc26de3"), spend_auth_sig: Signature(Signature { r_bytes: "c452266dd39618bb70d29768c76b6e2deffcd4a686b30474f3c14e5b4d1cbe4b", s_bytes: "56285068a4d85d0971e9440bb1da73413d824683985508e0a92b1f58036dbff5" }) }] }, maybe_outputs: [] }, binding_sig: Signature(Signature { r_bytes: "9812e5b325869acd416d17013be8f256abf682ccf83f47dfc13ace17a8bffc4d", s_bytes: "b6a3febeb05003eb4278cd6aea939a290e46c2e345d7379d3f61a994fb7eac87" }) }) }] }, network = Mainnet +cc ed54bfebeb867cf1544065d217c0c096b5daf82a1bfb93823636079c333cc7fb # shrinks to block = Block { header: Header { version: 4, previous_block_hash: block::Hash("a3ade9a7a6b18bdc3ddc6daa8573c269118107733f8fe7e15ec13e0100000000"), merkle_root: Root("a70a67455fcad36b01163806e326aefe57b19a3c34ccee418bdd88b2c7d315c9"), commitment_bytes: [u8; 32]("20eac532496084c381e39320908804eb7ad0e32d44a6e1118987a3e381425e9d"), time: 1972-11-01T07:29:26Z, difficulty_threshold: CompactDifficulty(0x2100bc12, Some(ExpandedDifficulty("bc12000000000000000000000000000000000000000000000000000000000000"))), nonce: [u8; 32]("6f7f0bf13a6a8b6e1742243403299cda4eac68f3c487c2398670fcb85e836fa4"), solution: EquihashSolution("7d09b20896d301efbf7b4214ae5cc73beb2b4a0e04e7260726e68be4b80089d9f4e7eca06d31bd4381142daa84114ef2258841997d5976b683865091512dc00e72cf86ea21cdaa597054990e4459f6e566ed12970990949d35b5b58109d1cc423d650cfd822e88649f4f4bb53a6dab4d5e3cfdd2c6fb6322ef81a0597914315dc0573ce7e372e127e2e522c1788d1ae3a01031b375c8e3158343b02d411993f65a174c25b11f317068ff38f0eece91aca017ddf4d77b477497d47f585c18dcd3bf0dfe1fb44731865d7c81ca00d1f2a017c52d90effca66ca034a3d3fd7fcd5001c64e10d450e9e8578c703529b93be09ddf781190ac131bad09d68b28bde1bee6c49fb84cc2cdf41c625081e9728ad86d75333eda3e41f76deeef15d6d5bcec889e21b462b15edade801040c2517ff21713ebb288cd8dae3c49537f0e7423522d3351eaa9ae3b7e8f75008b19f3fbd2f1e6546dca8d7a4b1e29c64dcd27846e28c0a6649f0001cb84dc7fa57b3902d46d409a0149e437677d16514241bf8e5bb6b152d12f8c5ee491b1c3e88a9fa23a0979e04dc606e1f50f829192f7d962b6179319286f00825e71e3151299c2e0336f8edee7dc166e32419eb2ceee2f0964fad771584d62cb3e837abc95b4d33e2c2b2dded25d3fb246af1283494e24fc92525b2a200629a39f63047d37a7a9ed78f2288121fef3f7e369d751f038208bd939b84f15473556f6c49565d1b0e10c16c689390a22b98257bc0ba2c60d03b9ac0c326d23b4b927d378e3802a9a6bf5115915007553c814898eb44b9dc9c80dcfdb79b3c23462fd903819cd63242b04cba17f5d86dce43cf978da2aa05b1ad66c42f0c71f91e7177908914ba653ccceb98cd57f3cee816163c5a3cf2dcc34863008f38ec8f10372ca43da48dfac56c5eac65cc04ee4ac200051d0d4f8cfd92a6982674299c85a063ae2f81bb110345518270c76d120f15722c5fc277181b2764e30c87c3214a679ee0fb91a89f9b12ae1e2c048f2db5943a91a2f82d1ff2c041cbdca8721fc0dfc8a88325da83a24a506795e162ca99f2112a46e1de9a0577a7d24151891d671cc004f7ff97579df7f1630701c2a88715bf7cc4289626cf645526d2b086a21294303c018f26afd7b0a432ab6eecb621c36e161a652a648d284a5fa301a30fcd9daf8430330c7f28eff80b64de516955df4ccf33f8fc68be48ee796275260cbebdc76d76b4ebc41af0b74317d06f040475b4ac07fbb686f301692e238023f4badaa6a65fcf3c735b38dd606a5cec8de2831583726fd9fbfa6c1469716c9bb977872a49ecd60a4c9813c2b6d8480272f89d7a088d1c119fa91478881934ecc0b54610030993f29869d49aeda6b91f6407cd36e45f0517cedf2323f90559285f9e5ca214aef3d08247b7b92c63df17851c065e43cf207543ee71a5a0a5c0db050c8a0964a995feee336775d2900eb430a39158bb1230dcedc902f1adb18d4a6bb8e6a3958426d067b0dadb059824ab2ecbb30070be26a25e47871f908dce73d2839cd17824f94a1e34a68725a20bd22a090b366ebe586374e2623618861b2c8f0d6fa34ee3ebc9c4a9e7475f4e83d9debd92928d4f87dafc8fbe8fad188743c264a1d12bc2e5fa50fb96f141c2d2e7b8cc84d03653f011f0dfa0d7de323f07f2701936a6fa665975f4f3fcbe46d8e678b21319200da17dab135f5612857786994eaeb70141db0c542bed88b9af81901d7d147ec9574ade368fd2b832bb75db90084acf1618c49372a31023744e0d2bda7ba8cfb0a30e423b33ab0d41aff596f8b2b9d718bdc27bf60f4c0f15f6941d5f81eb215a9a68d2c2fadf5af6cb4619822dc976eea70e09d6cd7f415cf96ad6fbfedb66a18d8e716725f64eb") }, transactions: [V5 { network_upgrade: Nu5, lock_time: Time(2002-02-10T17:06:54Z), expiry_height: Height(1901828342), inputs: [Coinbase { height: Height(3111000), data: CoinbaseData("_U\\x15\\x83\\xb0Fh\\xe2\\x9f"), sequence: 4029209244 }], outputs: [Output { value: Amount(821310873260299), lock_script: Script("44cb9d9dddf62e5cec8f679e55bc6e0c0c1ef6b20be3ca19") }, Output { value: Amount(1490713094612351), lock_script: Script("da424d9f2b5022e5b6583e9bbe54897714abde95e05716c57ce2333be3f284") }, Output { value: Amount(903663386882645), lock_script: Script("ede18a3d5c594c5d53b37feea8c293106fa8cfc7aad49f874a64c3ed57a80b4dfb3cc2d147d56342350a8e536d12c4f92599e706a33a33e35280a6") }], sapling_shielded_data: None, orchard_shielded_data: Some(ShieldedData { flags: Flags(ENABLE_SPENDS | ENABLE_OUTPUTS | ENABLE_ZSA), value_balance: Amount(1904005199848790), shared_anchor: Root("3516fe9fe1a241c8be83fcb0058f3fcc254338cf92da0b0c18406fa7bc522c25"), proof: Halo2Proof("f86be7513e47d36670ff0ff5825bb04afb2eed7b90eb17d80ca6199a65264ea1d8ee9f307a17d31ad0da9b7a5b359b97533129b6214ceeef07ec638f9516845e69b33ede5298a10193a801baa30b4336"), actions: AtLeastOne { inner: [AuthorizedAction { action: Action { cv: ValueCommitment { x: "0000000000000000000000000000000000000000000000000000000000000000", y: "0000000000000000000000000000000000000000000000000000000000000000" }, nullifier: Nullifier(0x0e794cde882a1bd28268569c55fef43878f5cc4dbf105ceeb02b1f892a2dd823), rk: VerificationKeyBytes { bytes: "7531bae8faff69562aa61963bdc19cef04812db679e8fa25fd0581ce8beafd94" }, cm_x: 0x0000000000000000000000000000000000000000000000000000000000000000, ephemeral_key: EphemeralPublicKey { x: "00000000ed302d991bf94c09fc98462200000000000000000000000000000040", y: "0200000000000000000000000000000000000000000000000000000000000000" }, enc_ciphertext: EncryptedNote([241, 196, 17, 215, 88, 189, 174, 195, 109, 196, 50, 5, 100, 80, 213, 248, 43, 182, 148, 31, 11, 100, 143, 211, 119, 218, 73, 227, 118, 29, 188, 61, 2, 244, 109, 49, 88, 234, 126, 11, 197, 144, 67, 0, 207, 90, 195, 52, 153, 9, 88, 0, 38, 168, 11, 39, 84, 175, 147, 87, 130, 142, 56, 13, 111, 181, 2, 220, 78, 105, 91, 90, 101, 34, 24, 153, 13, 183, 100, 226, 21, 218, 169, 57, 36, 195, 94, 158, 178, 20, 63, 232, 1, 3, 86, 132, 139, 18, 38, 12, 205, 117, 252, 123, 160, 139, 140, 121, 112, 51, 223, 5, 156, 66, 198, 243, 39, 225, 55, 117, 134, 139, 84, 204, 157, 57, 190, 171, 4, 229, 147, 86, 156, 57, 7, 12, 140, 176, 167, 15, 27, 227, 26, 169, 150, 239, 45, 226, 190, 168, 141, 145, 110, 93, 238, 38, 86, 42, 143, 66, 4, 22, 203, 171, 130, 21, 123, 217, 10, 96, 60, 37, 227, 176, 236, 11, 225, 200, 31, 45, 228, 179, 196, 91, 199, 239, 130, 167, 18, 33, 126, 19, 169, 252, 96, 141, 95, 7, 226, 211, 114, 240, 145, 137, 198, 99, 74, 91, 48, 148, 88, 239, 48, 187, 221, 106, 242, 220, 84, 214, 249, 179, 41, 169, 56, 227, 29, 90, 57, 16, 18, 181, 3, 183, 22, 73, 41, 251, 16, 174, 119, 131, 58, 72, 189, 5, 200, 227, 75, 69, 237, 242, 154, 156, 96, 89, 98, 187, 128, 141, 143, 218, 144, 13, 153, 229, 141, 236, 155, 60, 99, 247, 55, 84, 204, 14, 181, 168, 185, 198, 71, 172, 81, 22, 11, 235, 200, 73, 4, 117, 17, 136, 255, 47, 101, 12, 138, 15, 75, 39, 91, 180, 184, 168, 208, 236, 129, 15, 63, 190, 102, 139, 100, 28, 137, 137, 74, 144, 2, 217, 84, 28, 99, 166, 205, 148, 83, 218, 104, 202, 21, 68, 200, 195, 52, 40, 255, 170, 70, 248, 216, 172, 148, 22, 201, 41, 242, 48, 210, 188, 116, 218, 102, 15, 191, 194, 249, 5, 65, 176, 2, 33, 99, 206, 77, 55, 77, 61, 102, 81, 120, 35, 83, 209, 174, 142, 215, 136, 43, 44, 207, 205, 10, 123, 56, 88, 196, 55, 101, 212, 97, 161, 216, 237, 130, 122, 255, 167, 206, 153, 111, 134, 93, 80, 13, 113, 13, 126, 207, 169, 37, 241, 173, 232, 173, 61, 208, 80, 55, 63, 161, 56, 127, 114, 87, 127, 21, 107, 39, 142, 160, 53, 41, 124, 69, 222, 155, 10, 102, 155, 152, 196, 10, 166, 66, 20, 16, 237, 10, 63, 184, 9, 7, 54, 163, 244, 50, 178, 33, 78, 72, 1, 192, 159, 213, 246, 7, 204, 204, 9, 126, 125, 203, 255, 238, 138, 107, 198, 73, 81, 137, 17, 254, 167, 170, 100, 20, 175, 147, 194, 22, 125, 144, 164, 120, 125, 209, 28, 6, 246, 248, 143, 206, 80, 234, 48, 153, 37, 78, 217, 49, 140, 147, 54, 211, 233, 7, 120, 39, 163, 134, 99, 235, 224, 66, 136, 19, 94, 11, 185, 97, 161, 142, 226, 68, 252, 228, 181, 153, 60, 24, 128, 136, 207, 3, 240, 193, 202, 244, 73, 46, 226, 232, 228, 24, 29, 158, 17, 86, 112, 209, 40, 246, 71, 52, 141, 178, 116, 214, 221, 18, 103, 5, 162, 71, 27, 83, 255, 204, 24]), out_ciphertext: WrappedNoteKey("9128cb46cff303aa5baa42325438995fb9824dd440afa52eec7ff47e20852a612a1a5b87ae27489b1c0b7ee8137a823683edeec052617a279d5d1a3273e0e7bb1e0cb1509e3db417191c0a789fcdc169") }, spend_auth_sig: Signature { r_bytes: "30eea2aa126fc9a3a43c5122cd5447f73aff3c44cff12f11412f05e2ebfd2f61", s_bytes: "8974e92a18283214b0362ed86acaea666bb0b4d2260354e29b129a4805a6eefa" } }, AuthorizedAction { action: Action { cv: ValueCommitment { x: "0000000000000000000000000000000000000000000000000000000000000000", y: "0000000000000000000000000000000000000000000000000000000000000000" }, nullifier: Nullifier(0x072f0f3be6fc6aea869df429d2a46abbbfbbd4f87765ba878c00dab7f4d9e06a), rk: VerificationKeyBytes { bytes: "5fad6579708e4bf4f4073e062d204875c09fd0d17ddd290c381dba991ea0aa07" }, cm_x: 0x0000000000000000000000000000000000000000000000000000000000000000, ephemeral_key: EphemeralPublicKey { x: "00000000ed302d991bf94c09fc98462200000000000000000000000000000040", y: "0200000000000000000000000000000000000000000000000000000000000000" }, enc_ciphertext: EncryptedNote([113, 53, 228, 230, 124, 111, 5, 58, 86, 194, 103, 245, 196, 210, 246, 32, 178, 108, 32, 148, 30, 118, 114, 26, 20, 211, 98, 242, 145, 75, 243, 79, 157, 20, 252, 210, 221, 95, 36, 19, 43, 183, 9, 87, 38, 18, 209, 138, 248, 37, 227, 7, 168, 140, 173, 116, 77, 131, 57, 129, 62, 145, 175, 87, 172, 5, 45, 253, 16, 24, 112, 227, 255, 94, 129, 109, 167, 252, 209, 22, 95, 193, 179, 149, 81, 249, 186, 174, 79, 206, 25, 176, 28, 65, 230, 252, 81, 39, 48, 51, 114, 111, 93, 108, 121, 17, 150, 229, 141, 56, 35, 1, 213, 215, 61, 13, 237, 61, 23, 225, 252, 26, 125, 12, 214, 197, 98, 26, 162, 56, 186, 171, 133, 8, 206, 212, 77, 236, 173, 249, 174, 248, 194, 154, 141, 251, 53, 65, 70, 28, 135, 175, 64, 92, 238, 125, 162, 172, 50, 162, 49, 53, 56, 43, 228, 17, 162, 98, 77, 108, 154, 60, 69, 61, 190, 235, 252, 173, 239, 0, 89, 156, 114, 232, 26, 9, 7, 225, 148, 131, 61, 255, 62, 9, 139, 18, 141, 236, 216, 224, 5, 169, 205, 247, 183, 3, 116, 245, 52, 251, 50, 77, 56, 190, 19, 133, 72, 173, 6, 102, 231, 0, 241, 179, 207, 21, 87, 234, 195, 109, 201, 139, 157, 242, 123, 50, 243, 109, 105, 141, 18, 105, 34, 3, 137, 143, 97, 234, 218, 193, 134, 57, 115, 56, 170, 179, 204, 28, 242, 56, 141, 6, 251, 118, 26, 113, 185, 136, 61, 223, 28, 148, 19, 62, 134, 59, 57, 251, 168, 18, 225, 78, 113, 116, 127, 224, 190, 14, 142, 59, 8, 117, 243, 90, 168, 1, 46, 15, 45, 60, 16, 240, 224, 255, 182, 17, 3, 135, 81, 210, 140, 109, 216, 207, 143, 228, 60, 208, 202, 32, 37, 45, 69, 238, 190, 10, 9, 240, 141, 34, 54, 75, 135, 253, 20, 20, 26, 184, 56, 143, 8, 135, 44, 24, 118, 68, 138, 117, 36, 21, 170, 67, 57, 254, 156, 193, 44, 7, 8, 87, 204, 93, 210, 132, 27, 84, 35, 106, 223, 7, 129, 28, 234, 254, 148, 87, 174, 16, 40, 167, 249, 106, 192, 62, 180, 232, 134, 128, 23, 144, 156, 55, 186, 231, 195, 190, 117, 110, 37, 128, 171, 173, 24, 85, 230, 14, 202, 151, 115, 95, 219, 5, 49, 248, 82, 202, 141, 143, 244, 67, 155, 191, 34, 82, 83, 27, 235, 214, 49, 104, 175, 142, 142, 235, 83, 244, 116, 9, 35, 142, 241, 12, 246, 91, 79, 221, 216, 42, 13, 90, 57, 71, 73, 2, 10, 184, 149, 162, 67, 233, 154, 166, 197, 36, 202, 79, 212, 116, 32, 111, 37, 165, 81, 83, 79, 14, 50, 90, 52, 219, 114, 137, 253, 10, 85, 236, 234, 254, 146, 46, 160, 87, 228, 244, 198, 178, 72, 73, 137, 242, 102, 222, 37, 184, 62, 96, 41, 153, 98, 115, 16, 55, 81, 23, 60, 231, 101, 39, 61, 68, 36, 27, 227, 223, 226, 98, 222, 4, 181, 149, 33, 149, 141, 25, 176, 228, 128, 252, 222, 52, 115, 62, 227, 152, 214, 231, 41, 153, 44, 73, 55, 213, 116, 75, 146, 18, 212, 32, 157, 100, 226, 111, 160, 110, 65, 229, 168, 212, 13, 154, 21, 152, 224, 146, 129, 16, 64, 205, 110, 19]), out_ciphertext: WrappedNoteKey("808d065601ee4512bb392830c7ba1d32f8b4b35637bfb7efa0ac631e5cf6d58dac4da2afefbac7cf735fc6bc647603e2a730118f247cf4f3c120fc97039fdc84015b4745700a3109eec71a3b9e8958f1") }, spend_auth_sig: Signature { r_bytes: "37f660a1589b1697bed9d7fe81dbd6da04eb354290fb49f5e1e4fb4cb269f159", s_bytes: "9624aed42f00b5f702b4b91cb8070ea9ecebecfd45372fd0c4daedb8b056c684" } }] }, binding_sig: Signature { r_bytes: "40ac0c41cfd7308c8f43f861f8c7032e3c340b326a4662237c159c8d1a7d17e8", s_bytes: "c0d9b944555318d44bc060dd44976bda58aec5eff518c37194282b9e39114f86" }, burn: Burn([BurnItem(AssetBase(Ep { x: 0x086b6a92fc269d5e78d59b2019d2c0ac349ce791e731d10549aad7f1893b5bf5, y: 0x3eaa2c23031c5a02c835cbf4a7d23f3d6cd6b6367e1c3fd44768e6bfd1514809, z: 0x29d9a660a155398a24a9ab9149ec0dd4b6d8c9327196f77b5e178200fe8d2919 }), NoteValue(440657474712827580))]) }) }] }, network = Testnet diff --git a/zebra-chain/proptest-regressions/transaction/tests/prop.txt b/zebra-chain/proptest-regressions/transaction/tests/prop.txt new file mode 100644 index 00000000000..186f1c35c7e --- /dev/null +++ b/zebra-chain/proptest-regressions/transaction/tests/prop.txt @@ -0,0 +1,7 @@ +# Seeds for failure cases proptest has generated in the past. It is +# automatically read and these particular cases re-run before any +# novel cases are generated. +# +# It is recommended to check this file in to source control so that +# everyone who runs the test benefits from these saved cases. +cc 3d5a5cbf1f66c0d4ac7f3e7961c2ef089f5326b450c2dd1de2250d4d5dc300e8 # shrinks to tx = V5 { network_upgrade: Overwinter, lock_time: Height(Height(0)), expiry_height: Height(0), inputs: [Coinbase { height: Height(1687104), data: CoinbaseData(""), sequence: 0 }], outputs: [], sapling_shielded_data: None, orchard_shielded_data: Some(ShieldedData { flags: Flags(0x0), value_balance: Amount(0), shared_anchor: Root("0000000000000000000000000000000000000000000000000000000000000000"), proof: Halo2Proof(""), actions: AtLeastOne { inner: [AuthorizedAction { action: Action { cv: ValueCommitment { x: "0000000000000000000000000000000000000000000000000000000000000000", y: "0000000000000000000000000000000000000000000000000000000000000000" }, nullifier: Nullifier(0x276ee45c9a8347f025a7b97396a898c62970f7f56d29124fe0baed5b199e0c34), rk: VerificationKeyBytes { bytes: "824a9a95aba722f4d0bedfd9088e560b30f37e3df34b149a507392123697b39e" }, cm_x: 0x0000000000000000000000000000000000000000000000000000000000000000, ephemeral_key: EphemeralPublicKey { x: "00000000ed302d991bf94c09fc98462200000000000000000000000000000040", y: "0200000000000000000000000000000000000000000000000000000000000000" }, enc_ciphertext: EncryptedNote("54e5a2db21a987dedd729511f36a69db0c381784dae4d2e820184432d4ea1b69fec47339d77655eae4db003bb9d5f6b3cd2e5bef096ee5080bfdf71e9d44b8b5cd27e386680ed8d6a5d293d4328139c88df4280867ddeba6f2acf6aea974f49567cc10a5e354f3dd46e3563cdb1145d7a00458f08f569a3fb39edceb0cb8be73efb1d0868005747fc31cb555cfa36fe2dc2d268786011c50c2b61b25b8de0b3736ff4e66b9b459c89d26a140a8e22d985c898ed2b447795c90960af76aec437ddfa6e6d177f9f6414cdfa8aeb47f4db16e2c874f4eeedef42a0cd9c7174eae47ea0ce95e87e4059741b7581272527e7170442148b456eb9704d6e61839b2c1322b6d3b984ed31e1e4edfe55456ede4ecae918b283365f35dd38b07628124201b3f95ae4a97e64a7215b15fbc7950f2efe987677b0b035a9840fc63a4ed065c6626bef1cc03d545d9023287c51750722700602d18c3c0e57a187668c5a3660c7958d9b0e2e747bf4b074fd1d67634584d7fb4c8cec2ae4e6127545bd7f00bb6ba153b4036ed8c4d75ca47f25693d0f29725f49815967858b2222fcc6368a1a22d745d3856b1285dd6f5be5249a74aa8be864dc6a97f099d1d2a01a4de82495b4bffeeb139c6c6247510ac448fe2f050a52ec00d80632a2b6c8b88cd25cff6a04e82210e212af3aadfd813c2212e0f3318ee3b5cc83d70d510275f466aafa64e1d1c517e661d26c7b7dccf61464dc8d8823ae1ede873e97576b85363b5ecb05e57745d638b571e07bbde9be6668852b8de86a1f46deb494a4f1ab10af9f694359eab0b8429"), out_ciphertext: WrappedNoteKey("73afdef2a5d18918ad48f2358f4908c24db4851fddc4b8148af6f778a414ca72672cf8227f48f1709d9fc16f85421700d6cfea45a422c549fa8acdd9735d26a321e4c40344571fb3df57f5fbf9fab4c6") }, spend_auth_sig: Signature { r_bytes: "21f46c5023543062d4914a8aafa7186960042d4abeb254ce872e32ce0448affb", s_bytes: "96a4edfe5fafc1d35e42473bea5d34b15e8167fc9af389a9120ba1d08af5f948" } }] }, binding_sig: Signature { r_bytes: "d61794ae34a48b0a1766fc4cd8bbfd8a7406d6f5354b3bd63d1fad7ca4abc22c", s_bytes: "ba2d5bcba9093d38a395bc43d5a38b32f47e379c1a67f0afde773916563bfbad" }, burn: Some([]) }) } diff --git a/zebra-chain/src/block/commitment.rs b/zebra-chain/src/block/commitment.rs index 4c41fb9fefd..c2832d00e3b 100644 --- a/zebra-chain/src/block/commitment.rs +++ b/zebra-chain/src/block/commitment.rs @@ -125,11 +125,7 @@ impl Commitment { // NetworkUpgrade::current() returns the latest network upgrade that's activated at the provided height, so // on Regtest for heights above height 0, it could return NU6, and it's possible for the current network upgrade // to be NU6 (or Canopy, or any network upgrade above Heartwood) at the Heartwood activation height. -<<<<<<< HEAD - (Canopy | Nu5 | Nu6 | Nu7, activation_height) -======= (Canopy | Nu5 | Nu6 | Nu6_1 | Nu7, activation_height) ->>>>>>> zcash-v2.4.2 if height == activation_height && Some(height) == Heartwood.activation_height(network) => { @@ -140,11 +136,7 @@ impl Commitment { } } (Heartwood | Canopy, _) => Ok(ChainHistoryRoot(ChainHistoryMmrRootHash(bytes))), -<<<<<<< HEAD - (Nu5 | Nu6 | Nu7, _) => Ok(ChainHistoryBlockTxAuthCommitment( -======= (Nu5 | Nu6 | Nu6_1 | Nu7, _) => Ok(ChainHistoryBlockTxAuthCommitment( ->>>>>>> zcash-v2.4.2 ChainHistoryBlockTxAuthCommitmentHash(bytes), )), } diff --git a/zebra-chain/src/history_tree.rs b/zebra-chain/src/history_tree.rs index db13ff4fd93..b7a5e96297d 100644 --- a/zebra-chain/src/history_tree.rs +++ b/zebra-chain/src/history_tree.rs @@ -102,14 +102,10 @@ impl NonEmptyHistoryTree { )?; InnerHistoryTree::PreOrchard(tree) } -<<<<<<< HEAD - NetworkUpgrade::Nu5 | NetworkUpgrade::Nu6 | NetworkUpgrade::Nu7 => { -======= NetworkUpgrade::Nu5 | NetworkUpgrade::Nu6 | NetworkUpgrade::Nu6_1 | NetworkUpgrade::Nu7 => { ->>>>>>> zcash-v2.4.2 let tree = Tree::::new_from_cache( network, network_upgrade, @@ -163,14 +159,10 @@ impl NonEmptyHistoryTree { )?; (InnerHistoryTree::PreOrchard(tree), entry) } -<<<<<<< HEAD - NetworkUpgrade::Nu5 | NetworkUpgrade::Nu6 | NetworkUpgrade::Nu7 => { -======= NetworkUpgrade::Nu5 | NetworkUpgrade::Nu6 | NetworkUpgrade::Nu6_1 | NetworkUpgrade::Nu7 => { ->>>>>>> zcash-v2.4.2 let (tree, entry) = Tree::::new_from_block( network, block, diff --git a/zebra-chain/src/lib.rs b/zebra-chain/src/lib.rs index 4b5f868310f..e2755e040bc 100644 --- a/zebra-chain/src/lib.rs +++ b/zebra-chain/src/lib.rs @@ -42,12 +42,10 @@ pub mod transparent; pub mod value_balance; pub mod work; -<<<<<<< HEAD #[cfg(feature = "tx_v6")] pub mod orchard_zsa; -======= + pub use error::Error; ->>>>>>> zcash-v2.4.2 #[cfg(any(test, feature = "proptest-impl"))] pub use block::LedgerState; diff --git a/zebra-chain/src/orchard.rs b/zebra-chain/src/orchard.rs index 4d7bbe0df5a..19d70bdf767 100644 --- a/zebra-chain/src/orchard.rs +++ b/zebra-chain/src/orchard.rs @@ -24,7 +24,7 @@ pub use commitment::{CommitmentRandomness, NoteCommitment, ValueCommitment}; pub use keys::Diversifier; pub use note::{EncryptedNote, Note, Nullifier, WrappedNoteKey}; pub use shielded_data::{AuthorizedAction, Flags, ShieldedData}; -pub use shielded_data_flavor::{OrchardVanilla, ShieldedDataFlavor}; +pub use shielded_data_flavor::{OrchardDomainCommon, OrchardVanilla, ShieldedDataFlavor}; #[cfg(feature = "tx_v6")] pub use shielded_data_flavor::OrchardZSA; diff --git a/zebra-chain/src/orchard/note/ciphertexts.rs b/zebra-chain/src/orchard/note/ciphertexts.rs index 087d89a80ff..1057cc63f45 100644 --- a/zebra-chain/src/orchard/note/ciphertexts.rs +++ b/zebra-chain/src/orchard/note/ciphertexts.rs @@ -32,6 +32,12 @@ impl TryFrom<&[u8]> for EncryptedNote { } } +impl AsRef<[u8]> for EncryptedNote { + fn as_ref(&self) -> &[u8] { + &self.0 + } +} + impl ZcashSerialize for EncryptedNote { fn zcash_serialize(&self, mut writer: W) -> Result<(), io::Error> { writer.write_all(&self.0[..])?; diff --git a/zebra-chain/src/orchard/shielded_data_flavor.rs b/zebra-chain/src/orchard/shielded_data_flavor.rs index 02440f83d2f..14e7f366be8 100644 --- a/zebra-chain/src/orchard/shielded_data_flavor.rs +++ b/zebra-chain/src/orchard/shielded_data_flavor.rs @@ -4,9 +4,9 @@ use std::fmt::Debug; use serde::{de::DeserializeOwned, Serialize}; -use orchard::{domain::OrchardDomainCommon, orchard_flavor::OrchardFlavor}; +use orchard::orchard_flavor::OrchardFlavor; -pub use orchard::orchard_flavor::OrchardVanilla; +pub use orchard::{domain::OrchardDomainCommon, orchard_flavor::OrchardVanilla}; #[cfg(feature = "tx_v6")] pub use orchard::{note::AssetBase, orchard_flavor::OrchardZSA, value::NoteValue}; @@ -46,6 +46,7 @@ pub trait ShieldedDataFlavor: OrchardFlavor { + Serialize + ZcashDeserialize + ZcashSerialize + + AsRef<[u8]> + for<'a> TryFrom<&'a [u8], Error = std::array::TryFromSliceError> + test_arbitrary::TestArbitrary; diff --git a/zebra-chain/src/orchard_zsa/burn.rs b/zebra-chain/src/orchard_zsa/burn.rs index bc738c2a7ef..8ba4696e82c 100644 --- a/zebra-chain/src/orchard_zsa/burn.rs +++ b/zebra-chain/src/orchard_zsa/burn.rs @@ -22,7 +22,7 @@ impl ZcashSerialize for AssetBase { impl ZcashDeserialize for AssetBase { fn zcash_deserialize(mut reader: R) -> Result { Option::from(AssetBase::from_bytes(&reader.read_32_bytes()?)) - .ok_or_else(|| SerializationError::Parse("Invalid orchard_zsa AssetBase!")) + .ok_or(SerializationError::Parse("Invalid orchard_zsa AssetBase!")) } } diff --git a/zebra-chain/src/parameters/network.rs b/zebra-chain/src/parameters/network.rs index c36e49430e2..81d9096d786 100644 --- a/zebra-chain/src/parameters/network.rs +++ b/zebra-chain/src/parameters/network.rs @@ -165,21 +165,10 @@ impl Network { /// Creates a new [`Network::Testnet`] with `Regtest` parameters and the provided network upgrade activation heights. pub fn new_regtest( -<<<<<<< HEAD - nu5_activation_height: Option, - nu6_activation_height: Option, - nu7_activation_height: Option, - ) -> Self { - Self::new_configured_testnet(testnet::Parameters::new_regtest( - nu5_activation_height, - nu6_activation_height, - nu7_activation_height, -======= configured_activation_heights: testnet::ConfiguredActivationHeights, ) -> Self { Self::new_configured_testnet(testnet::Parameters::new_regtest( configured_activation_heights, ->>>>>>> zcash-v2.4.2 )) } diff --git a/zebra-chain/src/parameters/network/testnet.rs b/zebra-chain/src/parameters/network/testnet.rs index 310e544a495..81e88a302ad 100644 --- a/zebra-chain/src/parameters/network/testnet.rs +++ b/zebra-chain/src/parameters/network/testnet.rs @@ -256,12 +256,9 @@ pub struct ConfiguredActivationHeights { /// Activation height for `NU6` network upgrade. #[serde(rename = "NU6")] pub nu6: Option, -<<<<<<< HEAD -======= /// Activation height for `NU6.1` network upgrade. #[serde(rename = "NU6.1")] pub nu6_1: Option, ->>>>>>> zcash-v2.4.2 /// Activation height for `NU7` network upgrade. #[serde(rename = "NU7")] pub nu7: Option, @@ -399,10 +396,7 @@ impl ParametersBuilder { canopy, nu5, nu6, -<<<<<<< HEAD -======= nu6_1, ->>>>>>> zcash-v2.4.2 nu7, }: ConfiguredActivationHeights, ) -> Self { @@ -426,10 +420,7 @@ impl ParametersBuilder { .chain(canopy.into_iter().map(|h| (h, Canopy))) .chain(nu5.into_iter().map(|h| (h, Nu5))) .chain(nu6.into_iter().map(|h| (h, Nu6))) -<<<<<<< HEAD -======= .chain(nu6_1.into_iter().map(|h| (h, Nu6_1))) ->>>>>>> zcash-v2.4.2 .chain(nu7.into_iter().map(|h| (h, Nu7))) .map(|(h, nu)| (h.try_into().expect("activation height must be valid"), nu)) .collect(); @@ -676,13 +667,7 @@ impl Parameters { /// /// Creates an instance of [`Parameters`] with `Regtest` values. pub fn new_regtest( -<<<<<<< HEAD - nu5_activation_height: Option, - nu6_activation_height: Option, - nu7_activation_height: Option, -======= ConfiguredActivationHeights { nu5, nu6, nu7, .. }: ConfiguredActivationHeights, ->>>>>>> zcash-v2.4.2 ) -> Self { #[cfg(any(test, feature = "proptest-impl"))] let nu5 = nu5.or(Some(100)); @@ -698,15 +683,9 @@ impl Parameters { // most network upgrades are disabled by default for Regtest in zcashd .with_activation_heights(ConfiguredActivationHeights { canopy: Some(1), -<<<<<<< HEAD - nu5: nu5_activation_height, - nu6: nu6_activation_height, - nu7: nu7_activation_height, -======= nu5, nu6, nu7, ->>>>>>> zcash-v2.4.2 ..Default::default() }) .with_halving_interval(PRE_BLOSSOM_REGTEST_HALVING_INTERVAL); @@ -751,11 +730,7 @@ impl Parameters { should_allow_unshielded_coinbase_spends, pre_blossom_halving_interval, post_blossom_halving_interval, -<<<<<<< HEAD - } = Self::new_regtest(None, None, None); -======= } = Self::new_regtest(Default::default()); ->>>>>>> zcash-v2.4.2 self.network_name == network_name && self.genesis_hash == genesis_hash diff --git a/zebra-chain/src/parameters/network/tests/vectors.rs b/zebra-chain/src/parameters/network/tests/vectors.rs index 73096d30c5b..86c25c2bcd6 100644 --- a/zebra-chain/src/parameters/network/tests/vectors.rs +++ b/zebra-chain/src/parameters/network/tests/vectors.rs @@ -145,11 +145,7 @@ fn activates_network_upgrades_correctly() { (Network::Mainnet, MAINNET_ACTIVATION_HEIGHTS), (Network::new_default_testnet(), TESTNET_ACTIVATION_HEIGHTS), ( -<<<<<<< HEAD - Network::new_regtest(None, None, None), -======= Network::new_regtest(Default::default()), ->>>>>>> zcash-v2.4.2 expected_default_regtest_activation_heights, ), ] { @@ -200,11 +196,7 @@ fn check_configured_network_name() { "Mainnet should be displayed as 'Mainnet'" ); assert_eq!( -<<<<<<< HEAD - Network::new_regtest(None, None, None).to_string(), -======= Network::new_regtest(Default::default()).to_string(), ->>>>>>> zcash-v2.4.2 "Regtest", "Regtest should be displayed as 'Regtest'" ); diff --git a/zebra-chain/src/parameters/network_upgrade.rs b/zebra-chain/src/parameters/network_upgrade.rs index b4f16dfcf4c..2609b814664 100644 --- a/zebra-chain/src/parameters/network_upgrade.rs +++ b/zebra-chain/src/parameters/network_upgrade.rs @@ -15,11 +15,7 @@ use hex::{FromHex, ToHex}; use proptest_derive::Arbitrary; /// A list of network upgrades in the order that they must be activated. -<<<<<<< HEAD -pub const NETWORK_UPGRADES_IN_ORDER: [NetworkUpgrade; 10] = [ -======= const NETWORK_UPGRADES_IN_ORDER: &[NetworkUpgrade] = &[ ->>>>>>> zcash-v2.4.2 Genesis, BeforeOverwinter, Overwinter, @@ -29,12 +25,12 @@ const NETWORK_UPGRADES_IN_ORDER: &[NetworkUpgrade] = &[ Canopy, Nu5, Nu6, -<<<<<<< HEAD -======= - #[cfg(any(test, feature = "zebra-test"))] + // FIXME: unify zebra-test/zcash_unstable nu7 usages, + // check if the code is covered of those flags properly, + // try to build with and without those flags + #[cfg(any(test, feature = "zebra-test", zcash_unstable = "nu7"))] Nu6_1, - #[cfg(any(test, feature = "zebra-test"))] ->>>>>>> zcash-v2.4.2 + #[cfg(any(test, feature = "zebra-test", zcash_unstable = "nu7"))] Nu7, ]; @@ -72,11 +68,6 @@ pub enum NetworkUpgrade { /// The Zcash protocol after the NU6 upgrade. #[serde(rename = "NU6")] Nu6, -<<<<<<< HEAD - /// The Zcash protocol after the NU7 upgrade. - #[serde(rename = "NU7")] - Nu7, -======= /// The Zcash protocol after the NU6.1 upgrade. #[serde(rename = "NU6.1")] Nu6_1, @@ -95,7 +86,6 @@ impl TryFrom for NetworkUpgrade { .map(|nu| nu.0) .ok_or(Self::Error::InvalidConsensusBranchId) } ->>>>>>> zcash-v2.4.2 } impl fmt::Display for NetworkUpgrade { @@ -125,9 +115,13 @@ pub(super) const MAINNET_ACTIVATION_HEIGHTS: &[(block::Height, NetworkUpgrade)] (block::Height(1_046_400), Canopy), (block::Height(1_687_104), Nu5), (block::Height(2_726_400), Nu6), - // FIXME: TODO: Use a proper value below. - #[cfg(zcash_unstable = "nu7")] - (block::Height(3_111_000), Nu7), + // FIXME: TODO: Uncomment the lines below and use the correct value + // once a height for Nu6_1 is defined. Having Nu7 without Nu6_1 + // causes several tests to fail, because they assume the Nu7 height + // applies to Nu6_1. + // + //#[cfg(zcash_unstable = "nu7")] + //(block::Height(3_111_000), Nu7), ]; /// Fake mainnet network upgrade activation heights, used in tests. @@ -142,12 +136,8 @@ const FAKE_MAINNET_ACTIVATION_HEIGHTS: &[(block::Height, NetworkUpgrade)] = &[ (block::Height(30), Canopy), (block::Height(35), Nu5), (block::Height(40), Nu6), -<<<<<<< HEAD - (block::Height(45), Nu7), -======= (block::Height(45), Nu6_1), (block::Height(50), Nu7), ->>>>>>> zcash-v2.4.2 ]; /// Testnet network upgrade activation heights. @@ -170,9 +160,13 @@ pub(super) const TESTNET_ACTIVATION_HEIGHTS: &[(block::Height, NetworkUpgrade)] (block::Height(1_028_500), Canopy), (block::Height(1_842_420), Nu5), (block::Height(2_976_000), Nu6), - // FIXME: TODO: Use a proper value below. - #[cfg(zcash_unstable = "nu7")] - (block::Height(3_222_000), Nu7), + // FIXME: TODO: Uncomment the lines below and use the correct value + // once a height for Nu6_1 is defined. Having Nu7 without Nu6_1 + // causes several tests to fail, because they assume the Nu7 height + // applies to Nu6_1. + // + //#[cfg(zcash_unstable = "nu7")] + //(block::Height(3_222_000), Nu7), ]; /// Fake testnet network upgrade activation heights, used in tests. @@ -187,12 +181,8 @@ const FAKE_TESTNET_ACTIVATION_HEIGHTS: &[(block::Height, NetworkUpgrade)] = &[ (block::Height(30), Canopy), (block::Height(35), Nu5), (block::Height(40), Nu6), -<<<<<<< HEAD - (block::Height(45), Nu7), -======= (block::Height(45), Nu6_1), (block::Height(50), Nu7), ->>>>>>> zcash-v2.4.2 ]; /// The Consensus Branch Id, used to bind transactions and blocks to a @@ -284,14 +274,9 @@ pub(crate) const CONSENSUS_BRANCH_IDS: &[(NetworkUpgrade, ConsensusBranchId)] = (Canopy, ConsensusBranchId(0xe9ff75a6)), (Nu5, ConsensusBranchId(0xc2d6d0b4)), (Nu6, ConsensusBranchId(0xc8e71055)), -<<<<<<< HEAD - // FIXME: TODO: Use a proper value below. - #[cfg(zcash_unstable = "nu7")] -======= - #[cfg(any(test, feature = "zebra-test"))] + #[cfg(any(test, feature = "zebra-test", zcash_unstable = "nu7"))] (Nu6_1, ConsensusBranchId(0x4dec4df0)), - #[cfg(any(test, feature = "zebra-test"))] ->>>>>>> zcash-v2.4.2 + #[cfg(any(test, feature = "zebra-test", zcash_unstable = "nu7"))] (Nu7, ConsensusBranchId(0x77190ad8)), ]; @@ -400,27 +385,12 @@ impl NetworkUpgrade { /// Returns the next expected network upgrade after this network upgrade. pub fn next_upgrade(self) -> Option { -<<<<<<< HEAD - match self { - Genesis => Some(BeforeOverwinter), - BeforeOverwinter => Some(Overwinter), - Overwinter => Some(Sapling), - Sapling => Some(Blossom), - Blossom => Some(Heartwood), - Heartwood => Some(Canopy), - Canopy => Some(Nu5), - Nu5 => Some(Nu6), - Nu6 => Some(Nu7), - Nu7 => None, - } -======= Self::iter().skip_while(|&nu| self != nu).nth(1) } /// Returns the previous network upgrade before this network upgrade. pub fn previous_upgrade(self) -> Option { Self::iter().rev().skip_while(|&nu| self != nu).nth(1) ->>>>>>> zcash-v2.4.2 } /// Returns the next network upgrade for `network` and `height`. @@ -496,11 +466,7 @@ impl NetworkUpgrade { pub fn target_spacing(&self) -> Duration { let spacing_seconds = match self { Genesis | BeforeOverwinter | Overwinter | Sapling => PRE_BLOSSOM_POW_TARGET_SPACING, -<<<<<<< HEAD - Blossom | Heartwood | Canopy | Nu5 | Nu6 | Nu7 => { -======= Blossom | Heartwood | Canopy | Nu5 | Nu6 | Nu6_1 | Nu7 => { ->>>>>>> zcash-v2.4.2 POST_BLOSSOM_POW_TARGET_SPACING.into() } }; @@ -621,13 +587,7 @@ impl From for NetworkUpgrade { zcash_protocol::consensus::NetworkUpgrade::Canopy => Self::Canopy, zcash_protocol::consensus::NetworkUpgrade::Nu5 => Self::Nu5, zcash_protocol::consensus::NetworkUpgrade::Nu6 => Self::Nu6, -<<<<<<< HEAD - // TODO: Use a proper value below. - #[cfg(zcash_unstable = "nu7")] zcash_protocol::consensus::NetworkUpgrade::Nu7 => Self::Nu7, -======= - // zcash_protocol::consensus::NetworkUpgrade::Nu7 => Self::Nu7, ->>>>>>> zcash-v2.4.2 } } } diff --git a/zebra-chain/src/parameters/transaction.rs b/zebra-chain/src/parameters/transaction.rs index 25fae89407a..85f91d083e8 100644 --- a/zebra-chain/src/parameters/transaction.rs +++ b/zebra-chain/src/parameters/transaction.rs @@ -13,14 +13,9 @@ pub const SAPLING_VERSION_GROUP_ID: u32 = 0x892F_2085; pub const TX_V5_VERSION_GROUP_ID: u32 = 0x26A7_270A; /// The version group ID for version 6 transactions. -<<<<<<< HEAD -/// -/// OrchardZSA transactions must use transaction version 6 and this version -/// group ID. -// TODO: FIXME: use a proper value! -#[cfg(feature = "tx_v6")] -pub const TX_V6_VERSION_GROUP_ID: u32 = 0x7777_7777; -======= /// TODO: update this after it's chosen -pub const TX_V6_VERSION_GROUP_ID: u32 = 0xFFFF_FFFF; ->>>>>>> zcash-v2.4.2 +// FIXME: The upstream version uses 0xFFFF_FFFF for TX_V6_VERSION_GROUP_ID, +// but it was changed here to 0x7777_7777 for compatibility with the value of +// V6_VERSION_GROUP_ID in the ZSA version of librustzcash/zcash_protocol. +// Update to the proper value once it's fixed in librustzcash. +pub const TX_V6_VERSION_GROUP_ID: u32 = 0x7777_7777; diff --git a/zebra-chain/src/primitives/address.rs b/zebra-chain/src/primitives/address.rs index f665a1877cc..aa7023c5771 100644 --- a/zebra-chain/src/primitives/address.rs +++ b/zebra-chain/src/primitives/address.rs @@ -45,11 +45,7 @@ impl zcash_address::TryFromAddress for Address { type Error = BoxError; fn try_from_transparent_p2pkh( -<<<<<<< HEAD - network: zcash_protocol::consensus::NetworkType, -======= network: NetworkType, ->>>>>>> zcash-v2.4.2 data: [u8; 20], ) -> Result> { Ok(Self::Transparent(transparent::Address::from_pub_key_hash( @@ -59,11 +55,7 @@ impl zcash_address::TryFromAddress for Address { } fn try_from_transparent_p2sh( -<<<<<<< HEAD - network: zcash_protocol::consensus::NetworkType, -======= network: NetworkType, ->>>>>>> zcash-v2.4.2 data: [u8; 20], ) -> Result> { Ok(Self::Transparent(transparent::Address::from_script_hash( @@ -73,11 +65,7 @@ impl zcash_address::TryFromAddress for Address { } fn try_from_sapling( -<<<<<<< HEAD - network: zcash_protocol::consensus::NetworkType, -======= network: NetworkType, ->>>>>>> zcash-v2.4.2 data: [u8; 43], ) -> Result> { let network = network.into(); @@ -87,11 +75,7 @@ impl zcash_address::TryFromAddress for Address { } fn try_from_unified( -<<<<<<< HEAD - network: zcash_protocol::consensus::NetworkType, -======= network: NetworkType, ->>>>>>> zcash-v2.4.2 unified_address: zcash_address::unified::Address, ) -> Result> { let network = network.into(); @@ -197,49 +181,27 @@ impl Address { } } -<<<<<<< HEAD -impl From for NetworkKind { - fn from(network: zcash_protocol::consensus::NetworkType) -> Self { - match network { - zcash_protocol::consensus::NetworkType::Main => NetworkKind::Mainnet, - zcash_protocol::consensus::NetworkType::Test => NetworkKind::Testnet, - zcash_protocol::consensus::NetworkType::Regtest => NetworkKind::Regtest, -======= impl From for NetworkKind { fn from(network: NetworkType) -> Self { match network { NetworkType::Main => NetworkKind::Mainnet, NetworkType::Test => NetworkKind::Testnet, NetworkType::Regtest => NetworkKind::Regtest, ->>>>>>> zcash-v2.4.2 } } } -<<<<<<< HEAD -impl From for zcash_protocol::consensus::NetworkType { - fn from(network: NetworkKind) -> Self { - match network { - NetworkKind::Mainnet => zcash_protocol::consensus::NetworkType::Main, - NetworkKind::Testnet => zcash_protocol::consensus::NetworkType::Test, - NetworkKind::Regtest => zcash_protocol::consensus::NetworkType::Regtest, -======= impl From for NetworkType { fn from(network: NetworkKind) -> Self { match network { NetworkKind::Mainnet => NetworkType::Main, NetworkKind::Testnet => NetworkType::Test, NetworkKind::Regtest => NetworkType::Regtest, ->>>>>>> zcash-v2.4.2 } } } -<<<<<<< HEAD -impl From<&NetworkKind> for zcash_protocol::consensus::NetworkType { -======= impl From<&NetworkKind> for NetworkType { ->>>>>>> zcash-v2.4.2 fn from(network: &NetworkKind) -> Self { (*network).into() } diff --git a/zebra-chain/src/primitives/viewing_key/sapling.rs b/zebra-chain/src/primitives/viewing_key/sapling.rs deleted file mode 100644 index 85c0d0d2da9..00000000000 --- a/zebra-chain/src/primitives/viewing_key/sapling.rs +++ /dev/null @@ -1,90 +0,0 @@ -//! Defines types and implements methods for parsing Sapling viewing keys and converting them to `zebra-chain` types - -use sapling_crypto::keys::{FullViewingKey as SaplingFvk, SaplingIvk}; -use zcash_client_backend::{ - encoding::decode_extended_full_viewing_key, - keys::sapling::DiversifiableFullViewingKey as SaplingDfvk, -}; -use zcash_protocol::constants::*; - -use crate::parameters::Network; - -/// A Zcash Sapling viewing key -#[derive(Debug, Clone)] -pub enum SaplingViewingKey { - /// An incoming viewing key for Sapling - Ivk(Box), - - /// A full viewing key for Sapling - Fvk(Box), - - /// A diversifiable full viewing key for Sapling - Dfvk(Box), -} - -impl SaplingViewingKey { - /// Accepts an encoded Sapling extended full viewing key to decode - /// - /// Returns a [`SaplingViewingKey::Dfvk`] if successful, or None otherwise - fn parse_extended_full_viewing_key(sapling_key: &str, network: &Network) -> Option { - decode_extended_full_viewing_key(network.sapling_efvk_hrp(), sapling_key) - // this should fail often, so a debug-level log is okay - .map_err(|err| debug!(?err, "could not decode Sapling extended full viewing key")) - .ok() - .map(|efvk| Box::new(efvk.to_diversifiable_full_viewing_key())) - .map(Self::Dfvk) - } - - /// Accepts an encoded Sapling diversifiable full viewing key to decode - /// - /// Returns a [`SaplingViewingKey::Dfvk`] if successful, or None otherwise - fn parse_diversifiable_full_viewing_key( - _sapling_key: &str, - _network: &Network, - ) -> Option { - // TODO: Parse Sapling diversifiable full viewing key - None - } - - /// Accepts an encoded Sapling full viewing key to decode - /// - /// Returns a [`SaplingViewingKey::Fvk`] if successful, or None otherwise - fn parse_full_viewing_key(_sapling_key: &str, _network: &Network) -> Option { - // TODO: Parse Sapling full viewing key - None - } - - /// Accepts an encoded Sapling incoming viewing key to decode - /// - /// Returns a [`SaplingViewingKey::Ivk`] if successful, or None otherwise - fn parse_incoming_viewing_key(_sapling_key: &str, _network: &Network) -> Option { - // TODO: Parse Sapling incoming viewing key - None - } - - /// Accepts an encoded Sapling viewing key to decode - /// - /// Returns a [`SaplingViewingKey`] if successful, or None otherwise - pub(super) fn parse(key: &str, network: &Network) -> Option { - // TODO: Try types with prefixes first if some don't have prefixes? - Self::parse_extended_full_viewing_key(key, network) - .or_else(|| Self::parse_diversifiable_full_viewing_key(key, network)) - .or_else(|| Self::parse_full_viewing_key(key, network)) - .or_else(|| Self::parse_incoming_viewing_key(key, network)) - } -} - -impl Network { - /// Returns the human-readable prefix for an Zcash Sapling extended full viewing key - /// for this network. - pub fn sapling_efvk_hrp(&self) -> &'static str { - if self.is_a_test_network() { - // Assume custom testnets have the same HRP - // - // TODO: add the regtest HRP here - testnet::HRP_SAPLING_EXTENDED_FULL_VIEWING_KEY - } else { - mainnet::HRP_SAPLING_EXTENDED_FULL_VIEWING_KEY - } - } -} diff --git a/zebra-chain/src/primitives/zcash_history.rs b/zebra-chain/src/primitives/zcash_history.rs index 69715350c90..bf348b56f82 100644 --- a/zebra-chain/src/primitives/zcash_history.rs +++ b/zebra-chain/src/primitives/zcash_history.rs @@ -277,10 +277,7 @@ impl Version for zcash_history::V1 { | NetworkUpgrade::Canopy | NetworkUpgrade::Nu5 | NetworkUpgrade::Nu6 -<<<<<<< HEAD -======= | NetworkUpgrade::Nu6_1 ->>>>>>> zcash-v2.4.2 | NetworkUpgrade::Nu7 => zcash_history::NodeData { consensus_branch_id: branch_id.into(), subtree_commitment: block_hash, diff --git a/zebra-chain/src/primitives/zcash_note_encryption.rs b/zebra-chain/src/primitives/zcash_note_encryption.rs index 28f19f5b4e6..a3563d04d19 100644 --- a/zebra-chain/src/primitives/zcash_note_encryption.rs +++ b/zebra-chain/src/primitives/zcash_note_encryption.rs @@ -46,8 +46,7 @@ pub fn decrypts_successfully(tx: &Transaction, network: &Network, height: Height } } -<<<<<<< HEAD - if let Some(bundle) = alt_tx.orchard_bundle() { + if let Some(bundle) = tx.orchard_bundle() { let is_decrypted_successfully = match bundle { OrchardBundle::OrchardVanilla(bundle) => orchard_bundle_decrypts_successfully(bundle), OrchardBundle::OrchardZSA(bundle) => orchard_bundle_decrypts_successfully(bundle), @@ -55,21 +54,6 @@ pub fn decrypts_successfully(tx: &Transaction, network: &Network, height: Height if !is_decrypted_successfully { return false; -======= - if let Some(bundle) = tx.orchard_bundle() { - for act in bundle.actions() { - if zcash_note_encryption::try_output_recovery_with_ovk( - &orchard::note_encryption::OrchardDomain::for_action(act), - &orchard::keys::OutgoingViewingKey::from([0u8; 32]), - act, - act.cv_net(), - &act.encrypted_note().out_ciphertext, - ) - .is_none() - { - return false; - } ->>>>>>> zcash-v2.4.2 } } diff --git a/zebra-chain/src/primitives/zcash_primitives.rs b/zebra-chain/src/primitives/zcash_primitives.rs index ddc575c174e..02ae8ab58b9 100644 --- a/zebra-chain/src/primitives/zcash_primitives.rs +++ b/zebra-chain/src/primitives/zcash_primitives.rs @@ -30,11 +30,7 @@ impl zcash_transparent::bundle::Authorization for TransparentAuth { // In this block we convert our Output to a librustzcash to TxOut. // (We could do the serialize/deserialize route but it's simple enough to convert manually) -<<<<<<< HEAD -impl zcash_transparent::sighash::TransparentAuthorizingContext for TransparentAuth<'_> { -======= impl zcash_transparent::sighash::TransparentAuthorizingContext for TransparentAuth { ->>>>>>> zcash-v2.4.2 fn input_amounts(&self) -> Vec { self.all_prev_outputs .iter() @@ -159,59 +155,6 @@ impl zp_tx::Authorization for PrecomputedAuth { // End of (mostly) copied code -<<<<<<< HEAD -impl TryFrom<&Transaction> for zp_tx::Transaction { - type Error = io::Error; - - /// Convert a Zebra transaction into a librustzcash one. - /// - /// # Panics - /// - /// If the transaction is not V5/V6. (Currently there is no need for this - /// conversion for other versions.) - #[allow(clippy::unwrap_in_result)] - fn try_from(trans: &Transaction) -> Result { - let network_upgrade = match trans { - Transaction::V5 { - network_upgrade, .. - } => network_upgrade, - #[cfg(feature = "tx_v6")] - Transaction::V6 { - network_upgrade, .. - } => network_upgrade, - Transaction::V1 { .. } - | Transaction::V2 { .. } - | Transaction::V3 { .. } - | Transaction::V4 { .. } => { - panic!("Zebra only uses librustzcash for V5/V6 transactions"); - } - }; - - convert_tx_to_librustzcash( - trans, - network_upgrade - .branch_id() - .expect("V5/V6 txs have branch IDs"), - ) - } -} - -pub(crate) fn convert_tx_to_librustzcash( - trans: &Transaction, - branch_id: ConsensusBranchId, -) -> Result { - let serialized_tx = trans.zcash_serialize_to_vec()?; - let branch_id: u32 = branch_id.into(); - // We've already parsed this transaction, so its network upgrade must be valid. - let branch_id: zcash_primitives::consensus::BranchId = branch_id - .try_into() - .expect("zcash_primitives and Zebra have the same branch ids"); - let alt_tx = zp_tx::Transaction::read(&serialized_tx[..], branch_id)?; - Ok(alt_tx) -} - -======= ->>>>>>> zcash-v2.4.2 /// Convert a Zebra transparent::Output into a librustzcash one. impl TryFrom<&transparent::Output> for zcash_transparent::bundle::TxOut { type Error = io::Error; @@ -318,16 +261,10 @@ impl PrecomputedTxData { all_prev_outputs: all_previous_outputs.clone(), }, }; -<<<<<<< HEAD - let tx_data: zp_tx::TransactionData = alt_tx - .into_data() - .map_authorization(f_transparent, IdentityMap, IdentityMap, IdentityMap); -======= ->>>>>>> zcash-v2.4.2 let tx_data: zp_tx::TransactionData = tx.into_data() - .map_authorization(f_transparent, IdentityMap, IdentityMap); + .map_authorization(f_transparent, IdentityMap, IdentityMap, IdentityMap); Ok(PrecomputedTxData { tx_data, @@ -395,38 +332,6 @@ pub(crate) fn sighash( pub(crate) fn auth_digest(tx: &Transaction) -> AuthDigest { let nu = tx.network_upgrade().expect("V5 tx has a network upgrade"); -<<<<<<< HEAD - let digest_bytes: [u8; 32] = alt_tx - .auth_commitment() - .as_ref() - .try_into() - .expect("digest has the correct size"); - - AuthDigest(digest_bytes) -} - -/// Return the destination address from a transparent output. -/// -/// Returns None if the address type is not valid or unrecognized. -pub(crate) fn transparent_output_address( - output: &transparent::Output, - network: &Network, -) -> Option { - let tx_out = zcash_transparent::bundle::TxOut::try_from(output) - .expect("zcash_primitives and Zebra transparent output formats must be compatible"); - - let alt_addr = tx_out.recipient_address(); - - match alt_addr { - Some(zcash_primitives::legacy::TransparentAddress::PublicKeyHash(pub_key_hash)) => Some( - transparent::Address::from_pub_key_hash(network.kind(), pub_key_hash), - ), - Some(zcash_primitives::legacy::TransparentAddress::ScriptHash(script_hash)) => Some( - transparent::Address::from_script_hash(network.kind(), script_hash), - ), - None => None, - } -======= AuthDigest( tx.to_librustzcash(nu) .expect("V5 tx is convertible to its `zcash_params` equivalent") @@ -435,5 +340,4 @@ pub(crate) fn transparent_output_address( .try_into() .expect("digest has the correct size"), ) ->>>>>>> zcash-v2.4.2 } diff --git a/zebra-chain/src/transaction.rs b/zebra-chain/src/transaction.rs index 96524995581..47d25b39c49 100644 --- a/zebra-chain/src/transaction.rs +++ b/zebra-chain/src/transaction.rs @@ -152,7 +152,7 @@ pub enum Transaction { /// The orchard data for this transaction, if any. orchard_shielded_data: Option>, }, - /// A `version = 6` transaction , OrchardZSA, Orchard, Sapling and transparent, but not Sprout. + /// A `version = 6` transaction, which is reserved for current development. #[cfg(feature = "tx_v6")] V6 { /// The Network Upgrade for this transaction. @@ -175,28 +175,6 @@ pub enum Transaction { /// The OrchardZSA issuance data for this transaction, if any. orchard_zsa_issue_data: Option, }, - /// A `version = 6` transaction, which is reserved for current development. - #[cfg(feature = "tx_v6")] - V6 { - /// The Network Upgrade for this transaction. - /// - /// Derived from the ConsensusBranchId field. - network_upgrade: NetworkUpgrade, - /// The earliest time or block height that this transaction can be added to the - /// chain. - lock_time: LockTime, - /// The latest block height that this transaction can be added to the chain. - expiry_height: block::Height, - /// The transparent inputs to the transaction. - inputs: Vec, - /// The transparent outputs from the transaction. - outputs: Vec, - /// The sapling shielded data for this transaction, if any. - sapling_shielded_data: Option>, - /// The orchard data for this transaction, if any. - orchard_shielded_data: Option, - // TODO: Add the rest of the v6 fields. - }, } impl fmt::Display for Transaction { @@ -230,32 +208,6 @@ impl fmt::Display for Transaction { } } -// Macro to get a specific field from an Orchard shielded data struct. -// Returns `None` for transaction versions that don't support Orchard (V1-V4). -// This avoids repeating the same match block pattern across multiple accessor methods. -macro_rules! orchard_shielded_data_field { - ($self:expr, $field:ident) => { - match $self { - // No Orchard shielded data - Transaction::V1 { .. } - | Transaction::V2 { .. } - | Transaction::V3 { .. } - | Transaction::V4 { .. } => None, - - Transaction::V5 { - orchard_shielded_data, - .. - } => orchard_shielded_data.as_ref().map(|data| data.$field), - - #[cfg(feature = "tx_v6")] - Transaction::V6 { - orchard_shielded_data, - .. - } => orchard_shielded_data.as_ref().map(|data| data.$field), - } - }; -} - impl Transaction { // identifiers and hashes @@ -388,11 +340,7 @@ impl Transaction { /// Does this transaction have transparent or shielded outputs? pub fn has_transparent_or_shielded_outputs(&self) -> bool { -<<<<<<< HEAD - !self.outputs().is_empty() || self.has_shielded_outputs() -======= self.has_transparent_outputs() || self.has_shielded_outputs() ->>>>>>> zcash-v2.4.2 } /// Does this transaction has at least one flag when we have at least one orchard action? @@ -553,12 +501,7 @@ impl Transaction { }, #[cfg(feature = "tx_v6")] Transaction::V6 { expiry_height, .. } => match expiry_height { -<<<<<<< HEAD // Consensus rule: -======= - // # Consensus - // ->>>>>>> zcash-v2.4.2 // > No limit: To set no limit on transactions (so that they do not expire), nExpiryHeight should be set to 0. // https://zips.z.cash/zip-0203#specification block::Height(0) => None, @@ -796,9 +739,6 @@ impl Transaction { #[cfg(feature = "tx_v6")] Transaction::V6 { .. } => false, - #[cfg(feature = "tx_v6")] - Transaction::V6 { .. } => false, - // JoinSplits-on-BCTV14 Transaction::V2 { joinsplit_data, .. } | Transaction::V3 { joinsplit_data, .. } => { joinsplit_data.is_some() @@ -922,12 +862,6 @@ impl Transaction { .. } => Box::new(sapling_shielded_data.spends_per_anchor()), - #[cfg(feature = "tx_v6")] - Transaction::V6 { - sapling_shielded_data: Some(sapling_shielded_data), - .. - } => Box::new(sapling_shielded_data.spends_per_anchor()), - // No Spends Transaction::V1 { .. } | Transaction::V2 { .. } @@ -1006,12 +940,6 @@ impl Transaction { .. } => Box::new(sapling_shielded_data.nullifiers()), - #[cfg(feature = "tx_v6")] - Transaction::V6 { - sapling_shielded_data: Some(sapling_shielded_data), - .. - } => Box::new(sapling_shielded_data.nullifiers()), - // No Spends Transaction::V1 { .. } | Transaction::V2 { .. } @@ -1052,12 +980,6 @@ impl Transaction { .. } => Box::new(sapling_shielded_data.note_commitments()), - #[cfg(feature = "tx_v6")] - Transaction::V6 { - sapling_shielded_data: Some(sapling_shielded_data), - .. - } => Box::new(sapling_shielded_data.note_commitments()), - // No Spends Transaction::V1 { .. } | Transaction::V2 { .. } @@ -1100,7 +1022,7 @@ impl Transaction { // orchard - /// Iterate over the [`orchard::Action`]s in this transaction. + /// Return the number of Orchard actions in this transaction. pub fn orchard_action_count(&self) -> usize { match self { Transaction::V1 { .. } @@ -1111,19 +1033,10 @@ impl Transaction { Transaction::V5 { orchard_shielded_data, .. -<<<<<<< HEAD } => orchard_shielded_data .iter() .flat_map(orchard::ShieldedData::actions) .count(), -======= - } => orchard_shielded_data.as_ref(), - #[cfg(feature = "tx_v6")] - Transaction::V6 { - orchard_shielded_data, - .. - } => orchard_shielded_data.as_ref(), ->>>>>>> zcash-v2.4.2 #[cfg(feature = "tx_v6")] Transaction::V6 { @@ -1136,7 +1049,6 @@ impl Transaction { } } -<<<<<<< HEAD /// Access the [`orchard::Nullifier`]s in this transaction. pub fn orchard_nullifiers(&self) -> Box + '_> { match self { @@ -1173,15 +1085,6 @@ impl Transaction { | Transaction::V2 { .. } | Transaction::V3 { .. } | Transaction::V4 { .. } => Box::new(std::iter::empty()), -======= - /// Iterate over the [`orchard::Action`]s in this transaction, if there are any, - /// regardless of version. - pub fn orchard_actions(&self) -> impl Iterator { - self.orchard_shielded_data() - .into_iter() - .flat_map(orchard::ShieldedData::actions) - } ->>>>>>> zcash-v2.4.2 Transaction::V5 { orchard_shielded_data, @@ -1192,6 +1095,7 @@ impl Transaction { .flat_map(orchard::ShieldedData::note_commitments) .cloned(), ), + #[cfg(feature = "tx_v6")] Transaction::V6 { orchard_shielded_data, @@ -1214,13 +1118,51 @@ impl Transaction { /// Access the [`orchard::Flags`] in this transaction, if there is any, /// regardless of version. pub fn orchard_flags(&self) -> Option { - orchard_shielded_data_field!(self, flags) + match self { + // No Orchard shielded data + Transaction::V1 { .. } + | Transaction::V2 { .. } + | Transaction::V3 { .. } + | Transaction::V4 { .. } => None, + + Transaction::V5 { + orchard_shielded_data, + .. + } => orchard_shielded_data.as_ref().map(|data| data.flags), + + #[cfg(feature = "tx_v6")] + Transaction::V6 { + orchard_shielded_data, + .. + } => orchard_shielded_data.as_ref().map(|data| data.flags), + } } /// Access the [`orchard::tree::Root`] in this transaction, if there is any, /// regardless of version. pub fn orchard_shared_anchor(&self) -> Option { - orchard_shielded_data_field!(self, shared_anchor) + match self { + // No Orchard shielded data + Transaction::V1 { .. } + | Transaction::V2 { .. } + | Transaction::V3 { .. } + | Transaction::V4 { .. } => None, + + Transaction::V5 { + orchard_shielded_data, + .. + } => orchard_shielded_data + .as_ref() + .map(|data| data.shared_anchor), + + #[cfg(feature = "tx_v6")] + Transaction::V6 { + orchard_shielded_data, + .. + } => orchard_shielded_data + .as_ref() + .map(|data| data.shared_anchor), + } } /// Return if the transaction has any Orchard shielded data, @@ -1469,8 +1411,6 @@ impl Transaction { ValueBalance::from_sapling_amount(sapling_value_balance) } -<<<<<<< HEAD -======= /// Returns the Sapling binding signature for this transaction. /// /// Returns `Some(binding_sig)` for transactions that contain Sapling shielded @@ -1544,7 +1484,6 @@ impl Transaction { } } ->>>>>>> zcash-v2.4.2 /// Return the orchard value balance, the change in the transaction value /// pool due to [`orchard::Action`]s. /// @@ -1557,10 +1496,30 @@ impl Transaction { /// /// pub fn orchard_value_balance(&self) -> ValueBalance { - let orchard_value_balance = - orchard_shielded_data_field!(self, value_balance).unwrap_or_else(Amount::zero); + let orchard_value_balance = match self { + // No Orchard shielded data + Transaction::V1 { .. } + | Transaction::V2 { .. } + | Transaction::V3 { .. } + | Transaction::V4 { .. } => None, + + Transaction::V5 { + orchard_shielded_data, + .. + } => orchard_shielded_data + .as_ref() + .map(|data| data.value_balance), + + #[cfg(feature = "tx_v6")] + Transaction::V6 { + orchard_shielded_data, + .. + } => orchard_shielded_data + .as_ref() + .map(|data| data.value_balance), + }; - ValueBalance::from_orchard_amount(orchard_value_balance) + ValueBalance::from_orchard_amount(orchard_value_balance.unwrap_or_else(Amount::zero)) } /// Returns the value balances for this transaction using the provided transparent outputs. @@ -1727,261 +1686,6 @@ impl Transaction { } } - /// Modify the `value_balance` field from the `orchard::ShieldedData` in this transaction, - /// regardless of version. - /// - /// See `orchard_value_balance` for details. - pub fn orchard_value_balance_mut(&mut self) -> Option<&mut Amount> { - self.orchard_shielded_data_mut() - .map(|shielded_data| &mut shielded_data.value_balance) - } - - /// Modify the `value_balance` field from the `sapling::ShieldedData` in this transaction, - /// regardless of version. - /// - /// See `sapling_value_balance` for details. - pub fn sapling_value_balance_mut(&mut self) -> Option<&mut Amount> { - match self { - Transaction::V4 { - sapling_shielded_data: Some(sapling_shielded_data), - .. - } => Some(&mut sapling_shielded_data.value_balance), - Transaction::V5 { - sapling_shielded_data: Some(sapling_shielded_data), - .. - } => Some(&mut sapling_shielded_data.value_balance), - #[cfg(feature = "tx_v6")] - Transaction::V6 { - sapling_shielded_data: Some(sapling_shielded_data), - .. - } => Some(&mut sapling_shielded_data.value_balance), - Transaction::V1 { .. } - | Transaction::V2 { .. } - | Transaction::V3 { .. } - | Transaction::V4 { - sapling_shielded_data: None, - .. - } - | Transaction::V5 { - sapling_shielded_data: None, - .. - } => None, - #[cfg(feature = "tx_v6")] - Transaction::V6 { - sapling_shielded_data: None, - .. - } => None, - } - } - - /// Modify the `vpub_new` fields from `JoinSplit`s in this transaction, - /// regardless of version, in the order they appear in the transaction. - /// - /// See `input_values_from_sprout` for details. - pub fn input_values_from_sprout_mut( - &mut self, - ) -> Box> + '_> { - match self { - // JoinSplits with Bctv14 Proofs - Transaction::V2 { - joinsplit_data: Some(joinsplit_data), - .. - } - | Transaction::V3 { - joinsplit_data: Some(joinsplit_data), - .. - } => Box::new( - joinsplit_data - .joinsplits_mut() - .map(|joinsplit| &mut joinsplit.vpub_new), - ), - // JoinSplits with Groth Proofs - Transaction::V4 { - joinsplit_data: Some(joinsplit_data), - .. - } => Box::new( - joinsplit_data - .joinsplits_mut() - .map(|joinsplit| &mut joinsplit.vpub_new), - ), - // No JoinSplits - Transaction::V1 { .. } - | Transaction::V2 { - joinsplit_data: None, - .. - } - | Transaction::V3 { - joinsplit_data: None, - .. - } - | Transaction::V4 { - joinsplit_data: None, - .. - } - | Transaction::V5 { .. } => Box::new(std::iter::empty()), - #[cfg(feature = "tx_v6")] - Transaction::V6 { .. } => Box::new(std::iter::empty()), - } - } - - /// Modify the `vpub_old` fields from `JoinSplit`s in this transaction, - /// regardless of version, in the order they appear in the transaction. - /// - /// See `output_values_to_sprout` for details. - pub fn output_values_to_sprout_mut( - &mut self, - ) -> Box> + '_> { - match self { - // JoinSplits with Bctv14 Proofs - Transaction::V2 { - joinsplit_data: Some(joinsplit_data), - .. - } - | Transaction::V3 { - joinsplit_data: Some(joinsplit_data), - .. - } => Box::new( - joinsplit_data - .joinsplits_mut() - .map(|joinsplit| &mut joinsplit.vpub_old), - ), - // JoinSplits with Groth16 Proofs - Transaction::V4 { - joinsplit_data: Some(joinsplit_data), - .. - } => Box::new( - joinsplit_data - .joinsplits_mut() - .map(|joinsplit| &mut joinsplit.vpub_old), - ), - // No JoinSplits - Transaction::V1 { .. } - | Transaction::V2 { - joinsplit_data: None, - .. - } - | Transaction::V3 { - joinsplit_data: None, - .. - } - | Transaction::V4 { - joinsplit_data: None, - .. - } - | Transaction::V5 { .. } => Box::new(std::iter::empty()), - #[cfg(feature = "tx_v6")] - Transaction::V6 { .. } => Box::new(std::iter::empty()), - } - } - - /// Modify the transparent output values of this transaction, regardless of version. - pub fn output_values_mut(&mut self) -> impl Iterator> { - self.outputs_mut() - .iter_mut() - .map(|output| &mut output.value) - } - - /// Modify the [`orchard::ShieldedData`] in this transaction, - /// regardless of version. - pub fn orchard_shielded_data_mut(&mut self) -> Option<&mut orchard::ShieldedData> { - match self { - Transaction::V5 { - orchard_shielded_data: Some(orchard_shielded_data), - .. - } => Some(orchard_shielded_data), - #[cfg(feature = "tx_v6")] - Transaction::V6 { - orchard_shielded_data: Some(orchard_shielded_data), - .. - } => Some(orchard_shielded_data), - - Transaction::V1 { .. } - | Transaction::V2 { .. } - | Transaction::V3 { .. } - | Transaction::V4 { .. } - | Transaction::V5 { - orchard_shielded_data: None, - .. - } => None, - #[cfg(feature = "tx_v6")] - Transaction::V6 { - orchard_shielded_data: None, - .. - } => None, - } - } - - /// Modify the transparent outputs of this transaction, regardless of version. - pub fn outputs_mut(&mut self) -> &mut Vec { - match self { - Transaction::V1 { - ref mut outputs, .. - } => outputs, - Transaction::V2 { - ref mut outputs, .. - } => outputs, - Transaction::V3 { - ref mut outputs, .. - } => outputs, - Transaction::V4 { - ref mut outputs, .. - } => outputs, - Transaction::V5 { - ref mut outputs, .. - } => outputs, - #[cfg(feature = "tx_v6")] - Transaction::V6 { - ref mut outputs, .. - } => outputs, - } - } -} - -#[cfg(any(test, feature = "proptest-impl"))] -impl Transaction { - /// Modify the expiry height of this transaction. - /// - /// # Panics - /// - /// - if called on a v1 or v2 transaction - pub fn expiry_height_mut(&mut self) -> &mut block::Height { - match self { - Transaction::V1 { .. } | Transaction::V2 { .. } => { - panic!("v1 and v2 transactions are not supported") - } - Transaction::V3 { - ref mut expiry_height, - .. - } - | Transaction::V4 { - ref mut expiry_height, - .. - } - | Transaction::V5 { - ref mut expiry_height, - .. - } => expiry_height, - #[cfg(feature = "tx_v6")] - Transaction::V6 { - ref mut expiry_height, - .. - } => expiry_height, - } - } - - /// Modify the transparent inputs of this transaction, regardless of version. - pub fn inputs_mut(&mut self) -> &mut Vec { - match self { - Transaction::V1 { ref mut inputs, .. } => inputs, - Transaction::V2 { ref mut inputs, .. } => inputs, - Transaction::V3 { ref mut inputs, .. } => inputs, - Transaction::V4 { ref mut inputs, .. } => inputs, - Transaction::V5 { ref mut inputs, .. } => inputs, - #[cfg(feature = "tx_v6")] - Transaction::V6 { ref mut inputs, .. } => inputs, - } - } - /// Modify the `value_balance` field from the `orchard::ShieldedData` in this transaction, /// regardless of version. /// @@ -2185,4 +1889,25 @@ impl Transaction { } => outputs, } } + + /// Modify the orchard flags in this transaction, regardless of version. + pub fn orchard_flags_mut(&mut self) -> Option<&mut orchard::shielded_data::Flags> { + match self { + Transaction::V1 { .. } + | Transaction::V2 { .. } + | Transaction::V3 { .. } + | Transaction::V4 { .. } => None, + + Transaction::V5 { + orchard_shielded_data, + .. + } => orchard_shielded_data.as_mut().map(|data| &mut data.flags), + + #[cfg(feature = "tx_v6")] + Transaction::V6 { + orchard_shielded_data, + .. + } => orchard_shielded_data.as_mut().map(|data| &mut data.flags), + } + } } diff --git a/zebra-chain/src/transaction/arbitrary.rs b/zebra-chain/src/transaction/arbitrary.rs index 3f1af209c37..6b97649be6e 100644 --- a/zebra-chain/src/transaction/arbitrary.rs +++ b/zebra-chain/src/transaction/arbitrary.rs @@ -875,10 +875,7 @@ impl Arbitrary for Transaction { NetworkUpgrade::Blossom | NetworkUpgrade::Heartwood | NetworkUpgrade::Canopy => { Self::v4_strategy(ledger_state) } - NetworkUpgrade::Nu5 - | NetworkUpgrade::Nu6 - | NetworkUpgrade::Nu6_1 - | NetworkUpgrade::Nu7 => prop_oneof![ + NetworkUpgrade::Nu5 | NetworkUpgrade::Nu6 | NetworkUpgrade::Nu6_1 => prop_oneof![ Self::v4_strategy(ledger_state.clone()), Self::v5_strategy(ledger_state) ] @@ -897,6 +894,8 @@ impl Arbitrary for Transaction { prop_oneof![ Self::v4_strategy(ledger_state.clone()), Self::v5_strategy(ledger_state.clone()), + // FIXME: should the next line (v6_strategy) be here? ZF implemention does + // not have it. Self::v6_strategy(ledger_state), ] .boxed() @@ -1044,11 +1043,7 @@ pub fn transaction_to_fake_v5( }, v5 @ V5 { .. } => v5.clone(), #[cfg(feature = "tx_v6")] -<<<<<<< HEAD - _ => panic!(" other transaction versions are not supported"), -======= v6 @ V6 { .. } => v6.clone(), ->>>>>>> zcash-v2.4.2 } } diff --git a/zebra-chain/src/transaction/serialize.rs b/zebra-chain/src/transaction/serialize.rs index 6f33e343f90..913a8877093 100644 --- a/zebra-chain/src/transaction/serialize.rs +++ b/zebra-chain/src/transaction/serialize.rs @@ -826,19 +826,13 @@ impl ZcashSerialize for Transaction { outputs, sapling_shielded_data, orchard_shielded_data, -<<<<<<< HEAD orchard_zsa_issue_data, - } => { - // Denoted as `nVersionGroupId` in the spec. - writer.write_u32::(TX_V6_VERSION_GROUP_ID)?; -======= } => { // Transaction V6 spec: // https://zips.z.cash/zip-0230#specification // Denoted as `nVersionGroupId` in the spec. - writer.write_u32::(TX_V5_VERSION_GROUP_ID)?; ->>>>>>> zcash-v2.4.2 + writer.write_u32::(TX_V6_VERSION_GROUP_ID)?; // Denoted as `nConsensusBranchId` in the spec. writer.write_u32::(u32::from( @@ -870,13 +864,9 @@ impl ZcashSerialize for Transaction { // `proofsOrchard`, `vSpendAuthSigsOrchard`, and `bindingSigOrchard`. orchard_shielded_data.zcash_serialize(&mut writer)?; -<<<<<<< HEAD // A bundle of OrchardZSA issuance fields denoted in the spec as `nIssueActions`, // `vIssueActions`, `ik`, and `issueAuthSig`. orchard_zsa_issue_data.zcash_serialize(&mut writer)?; -======= - // TODO: Add the rest of v6 transaction fields. ->>>>>>> zcash-v2.4.2 } } Ok(()) @@ -1142,12 +1132,7 @@ impl ZcashDeserialize for Transaction { // Denoted as `nConsensusBranchId` in the spec. // Convert it to a NetworkUpgrade let network_upgrade = - NetworkUpgrade::from_branch_id(limited_reader.read_u32::()?) - .ok_or_else(|| { - SerializationError::Parse( - "expected a valid network upgrade from the consensus branch id", - ) - })?; + NetworkUpgrade::try_from(limited_reader.read_u32::()?)?; // Denoted as `lock_time` in the spec. let lock_time = LockTime::zcash_deserialize(&mut limited_reader)?; diff --git a/zebra-chain/src/transaction/sighash.rs b/zebra-chain/src/transaction/sighash.rs index 907352818f2..1d8881e1124 100644 --- a/zebra-chain/src/transaction/sighash.rs +++ b/zebra-chain/src/transaction/sighash.rs @@ -1,10 +1,7 @@ //! Signature hashes for Zcash transactions -<<<<<<< HEAD -======= use std::sync::Arc; ->>>>>>> zcash-v2.4.2 use zcash_transparent::sighash::SighashType; use super::Transaction; @@ -36,12 +33,6 @@ bitflags::bitflags! { } } -<<<<<<< HEAD -// FIXME (for future reviewers): Copied from upstream Zebra v2.4.2 to fix a librustzcash -// breaking change. Keep the code (or update it accordingly) and remove this note when we -// merge with upstream Zebra. -======= ->>>>>>> zcash-v2.4.2 impl TryFrom for SighashType { type Error = (); diff --git a/zebra-chain/src/transaction/tests/vectors.rs b/zebra-chain/src/transaction/tests/vectors.rs index b340aaedd72..654eb85181d 100644 --- a/zebra-chain/src/transaction/tests/vectors.rs +++ b/zebra-chain/src/transaction/tests/vectors.rs @@ -336,210 +336,6 @@ fn empty_v6_round_trip() { tx_round_trip(&EMPTY_V6_TX) } -fn tx_librustzcash_round_trip(tx: &Transaction) { - let _init_guard = zebra_test::init(); - -<<<<<<< HEAD - let _alt_tx: zcash_primitives::transaction::Transaction = tx.try_into().expect( -======= - let tx: &Transaction = &EMPTY_V5_TX; - let nu = tx.network_upgrade().expect("network upgrade"); - - tx.to_librustzcash(nu).expect( ->>>>>>> zcash-v2.4.2 - "librustzcash deserialization might work for empty zebra serialized transactions. \ - Hint: if empty transactions fail, but other transactions work, delete this test", - ); -} - -<<<<<<< HEAD -/// Check if an empty V5 transaction can be deserialized by librustzcash too. -#[test] -fn empty_v5_librustzcash_round_trip() { - tx_librustzcash_round_trip(&EMPTY_V5_TX); -} - -#[cfg(feature = "tx_v6")] -/// Check if an empty V6 transaction can be deserialized by librustzcash too. -#[test] -fn empty_v6_librustzcash_round_trip() { - tx_librustzcash_round_trip(&EMPTY_V6_TX); -} - -/// Do a round-trip test on fake v5 transactions created from v4 transactions -/// in the block test vectors. -/// -/// Covers Sapling only, Transparent only, and Sapling/Transparent v5 -/// transactions. -#[test] -fn fake_v5_round_trip() { - let _init_guard = zebra_test::init(); - for network in Network::iter() { - fake_v5_round_trip_for_network(network); - } -} - -fn fake_v5_round_trip_for_network(network: Network) { - let block_iter = network.block_iter(); - - let overwinter_activation_height = NetworkUpgrade::Overwinter - .activation_height(&network) - .expect("a valid height") - .0; - - // skip blocks that are before overwinter as they will not have a valid consensus branch id - let blocks_after_overwinter = - block_iter.skip_while(|(height, _)| **height < overwinter_activation_height); - - for (height, original_bytes) in blocks_after_overwinter { - let original_block = original_bytes - .zcash_deserialize_into::() - .expect("block is structurally valid"); - - // skip this block if it only contains v5 transactions, - // the block round-trip test covers it already - if original_block - .transactions - .iter() - .all(|trans| matches!(trans.as_ref(), &Transaction::V5 { .. })) - { - continue; - } - - let mut fake_block = original_block.clone(); - fake_block.transactions = fake_block - .transactions - .iter() - .map(AsRef::as_ref) - .map(|t| arbitrary::transaction_to_fake_v5(t, &network, Height(*height))) - .map(Into::into) - .collect(); - - // test each transaction - for (original_tx, fake_tx) in original_block - .transactions - .iter() - .zip(fake_block.transactions.iter()) - { - assert_ne!( - &original_tx, &fake_tx, - "v1-v4 transactions must change when converted to fake v5" - ); - - let fake_bytes = fake_tx - .zcash_serialize_to_vec() - .expect("vec serialization is infallible"); - - assert_ne!( - &original_bytes[..], - fake_bytes, - "v1-v4 transaction data must change when converted to fake v5" - ); - - let fake_tx2 = fake_bytes - .zcash_deserialize_into::() - .expect("tx is structurally valid"); - - assert_eq!(fake_tx.as_ref(), &fake_tx2); - - let fake_bytes2 = fake_tx2 - .zcash_serialize_to_vec() - .expect("vec serialization is infallible"); - - assert_eq!( - fake_bytes, fake_bytes2, - "data must be equal if structs are equal" - ); - } - - // test full blocks - assert_ne!( - &original_block, &fake_block, - "v1-v4 transactions must change when converted to fake v5" - ); - - let fake_bytes = fake_block - .zcash_serialize_to_vec() - .expect("vec serialization is infallible"); - - assert_ne!( - &original_bytes[..], - fake_bytes, - "v1-v4 transaction data must change when converted to fake v5" - ); - - // skip fake blocks which exceed the block size limit - if fake_bytes.len() > MAX_BLOCK_BYTES.try_into().unwrap() { - continue; - } - - let fake_block2 = fake_bytes - .zcash_deserialize_into::() - .expect("block is structurally valid"); - - assert_eq!(fake_block, fake_block2); - - let fake_bytes2 = fake_block2 - .zcash_serialize_to_vec() - .expect("vec serialization is infallible"); - - assert_eq!( - fake_bytes, fake_bytes2, - "data must be equal if structs are equal" - ); - } -} - -#[cfg(feature = "tx_v6")] -/// Do a serialization round-trip on OrchardZSA workflow blocks and their V6 -/// transactions. -#[test] -fn v6_round_trip() { - use zebra_test::vectors::ORCHARD_ZSA_WORKFLOW_BLOCKS; - - let _init_guard = zebra_test::init(); - - for block_bytes in ORCHARD_ZSA_WORKFLOW_BLOCKS.iter() { - let block = block_bytes - .zcash_deserialize_into::() - .expect("block is structurally valid"); - - // test full blocks - let block_bytes2 = block - .zcash_serialize_to_vec() - .expect("vec serialization is infallible"); - - assert_eq!( - block_bytes, &block_bytes2, - "data must be equal if structs are equal" - ); - - // test each transaction - for tx in &block.transactions { - let tx_bytes = tx - .zcash_serialize_to_vec() - .expect("vec serialization is infallible"); - - let tx2 = tx_bytes - .zcash_deserialize_into::() - .expect("tx is structurally valid"); - - assert_eq!(tx.as_ref(), &tx2); - - let tx_bytes2 = tx2 - .zcash_serialize_to_vec() - .expect("vec serialization is infallible"); - - assert_eq!( - tx_bytes, tx_bytes2, - "data must be equal if structs are equal" - ); - } - } -} - -======= ->>>>>>> zcash-v2.4.2 #[test] fn invalid_orchard_nullifier() { let _init_guard = zebra_test::init(); @@ -660,9 +456,11 @@ fn v6_librustzcash_tx_conversion() { .iter() .filter(|tx| matches!(tx.as_ref(), &Transaction::V6 { .. })) { + let nu = tx.network_upgrade().expect("network upgrade"); + let _alt_tx: zcash_primitives::transaction::Transaction = tx .as_ref() - .try_into() + .to_librustzcash(nu) .expect("librustzcash conversion must work for zebra transactions"); } } @@ -1247,27 +1045,6 @@ fn binding_signatures() { } } } - #[cfg(feature = "tx_v6")] - Transaction::V6 { - sapling_shielded_data, - .. - } => { - if let Some(sapling_shielded_data) = sapling_shielded_data { - let shielded_sighash = - tx.sighash(upgrade.branch_id().unwrap(), HashType::ALL, &[], None); - - let bvk = redjubjub::VerificationKey::try_from( - sapling_shielded_data.binding_verification_key(), - ) - .expect("a valid redjubjub::VerificationKey"); - - bvk.verify( - shielded_sighash.as_ref(), - &sapling_shielded_data.binding_sig, - ) - .expect("must pass verification"); - } - } } } diff --git a/zebra-chain/src/transaction/txid.rs b/zebra-chain/src/transaction/txid.rs index 7683b1f8b64..322a575a73e 100644 --- a/zebra-chain/src/transaction/txid.rs +++ b/zebra-chain/src/transaction/txid.rs @@ -27,15 +27,9 @@ impl<'a> TxIdBuilder<'a> { | Transaction::V2 { .. } | Transaction::V3 { .. } | Transaction::V4 { .. } => self.txid_v1_to_v4(), -<<<<<<< HEAD - Transaction::V5 { .. } => self.txid_v5_to_v6(), - #[cfg(feature = "tx_v6")] - Transaction::V6 { .. } => self.txid_v5_to_v6(), -======= Transaction::V5 { .. } => self.txid_v5(), #[cfg(feature = "tx_v6")] Transaction::V6 { .. } => self.txid_v6(), ->>>>>>> zcash-v2.4.2 } } @@ -49,14 +43,6 @@ impl<'a> TxIdBuilder<'a> { /// Compute the Transaction ID for transactions V5 to V6. /// In this case it's the hash of a tree of hashes of specific parts of the -<<<<<<< HEAD - /// transaction, as specified in ZIP-244 and ZIP-225 for Txv5 and ZIP-246 for TxV6. - fn txid_v5_to_v6(self) -> Result { - // The v5 txid (from ZIP-244) is computed using librustzcash. Convert the zebra - // transaction to a librustzcash transaction. - let alt_tx: zcash_primitives::transaction::Transaction = self.trans.try_into()?; - Ok(Hash(*alt_tx.txid().as_ref())) -======= /// transaction, as specified in ZIP-244 and ZIP-225. fn txid_v5(self) -> Option { let nu = self.trans.network_upgrade()?; @@ -69,6 +55,5 @@ impl<'a> TxIdBuilder<'a> { #[cfg(feature = "tx_v6")] fn txid_v6(self) -> Option { self.txid_v5() ->>>>>>> zcash-v2.4.2 } } diff --git a/zebra-consensus/Cargo.toml b/zebra-consensus/Cargo.toml index 015dc52c8a9..28f0e46e339 100644 --- a/zebra-consensus/Cargo.toml +++ b/zebra-consensus/Cargo.toml @@ -29,12 +29,6 @@ tx_v6 = ["zebra-chain/tx_v6", "zebra-state/tx_v6"] # Test-only features proptest-impl = ["proptest", "proptest-derive", "zebra-chain/proptest-impl", "zebra-state/proptest-impl"] -# Support for transaction version 6 -tx_v6 = [ - "zebra-state/tx_v6", - "zebra-chain/tx_v6" -] - [dependencies] blake2b_simd = { workspace = true } bellman = { workspace = true } diff --git a/zebra-consensus/src/checkpoint/list/tests.rs b/zebra-consensus/src/checkpoint/list/tests.rs index ced7eb9fcb6..1df05327d64 100644 --- a/zebra-consensus/src/checkpoint/list/tests.rs +++ b/zebra-consensus/src/checkpoint/list/tests.rs @@ -237,11 +237,7 @@ fn checkpoint_list_load_hard_coded() -> Result<(), BoxError> { let _ = Mainnet.checkpoint_list(); let _ = Network::new_default_testnet().checkpoint_list(); -<<<<<<< HEAD - let _ = Network::new_regtest(None, None, None).checkpoint_list(); -======= let _ = Network::new_regtest(Default::default()).checkpoint_list(); ->>>>>>> zcash-v2.4.2 Ok(()) } diff --git a/zebra-consensus/src/orchard_zsa/tests.rs b/zebra-consensus/src/orchard_zsa/tests.rs index 237e73b2983..92611b8c161 100644 --- a/zebra-consensus/src/orchard_zsa/tests.rs +++ b/zebra-consensus/src/orchard_zsa/tests.rs @@ -18,6 +18,7 @@ use color_eyre::eyre::Report; use zebra_chain::{ block::{genesis::regtest_genesis_block, Block, Hash}, + parameters::testnet::ConfiguredActivationHeights, parameters::Network, serialization::ZcashDeserialize, }; @@ -44,7 +45,12 @@ fn create_transcript_data() -> impl Iterator Result<(), Report> { let _init_guard = zebra_test::init(); - let network = Network::new_regtest(Some(1), Some(1), Some(1)); + let network = Network::new_regtest(ConfiguredActivationHeights { + nu5: Some(1), + nu6: Some(1), + nu7: Some(1), + ..Default::default() + }); let state_service = zebra_state::init_test(&network); @@ -53,7 +59,7 @@ async fn check_zsa_workflow() -> Result<(), Report> { _transaction_verifier, _groth16_download_handle, _max_checkpoint_height, - ) = crate::router::init(Config::default(), &network, state_service.clone()).await; + ) = crate::router::init_test(Config::default(), &network, state_service.clone()).await; Transcript::from(create_transcript_data()) .check(block_verifier_router.clone()) diff --git a/zebra-consensus/src/primitives/halo2/tests.rs b/zebra-consensus/src/primitives/halo2/tests.rs index 8d0490fa1d8..301a303bcf1 100644 --- a/zebra-consensus/src/primitives/halo2/tests.rs +++ b/zebra-consensus/src/primitives/halo2/tests.rs @@ -57,7 +57,6 @@ where let mut memo: [u8; 512] = [0; 512]; memo[0] = 0xF6; builder -<<<<<<< HEAD .add_output( None, recipient, @@ -66,9 +65,6 @@ where AssetBase::native(), memo, ) -======= - .add_output(None, recipient, NoteValue::from_raw(note_value), memo) ->>>>>>> zcash-v2.4.2 .unwrap(); } diff --git a/zebra-consensus/src/transaction.rs b/zebra-consensus/src/transaction.rs index 58f02e034a0..6529e76e593 100644 --- a/zebra-consensus/src/transaction.rs +++ b/zebra-consensus/src/transaction.rs @@ -517,7 +517,7 @@ where orchard_shielded_data, .. } - => Self::verify_v5_and_v6_transaction( + => Self::verify_v5_transaction( &req, &network, script_verifier, @@ -526,19 +526,6 @@ where orchard_shielded_data, )?, #[cfg(feature = "tx_v6")] - Transaction::V6 { - sapling_shielded_data, - orchard_shielded_data, - .. - } => Self::verify_v5_and_v6_transaction( - &req, - &network, - script_verifier, - cached_ffi_transaction.clone(), - sapling_shielded_data, - orchard_shielded_data, - )?, - #[cfg(feature="tx_v6")] Transaction::V6 { sapling_shielded_data, orchard_shielded_data, @@ -639,30 +626,7 @@ where } } -<<<<<<< HEAD -trait OrchardTransaction { - const SUPPORTED_NETWORK_UPGRADES: &'static [NetworkUpgrade]; -} - -impl OrchardTransaction for orchard::OrchardVanilla { - // FIXME: is this a correct set of Nu values? - const SUPPORTED_NETWORK_UPGRADES: &'static [NetworkUpgrade] = &[ - NetworkUpgrade::Nu5, - NetworkUpgrade::Nu6, - #[cfg(feature = "tx_v6")] - NetworkUpgrade::Nu7, - ]; -} - -#[cfg(feature = "tx_v6")] -impl OrchardTransaction for orchard::OrchardZSA { - const SUPPORTED_NETWORK_UPGRADES: &'static [NetworkUpgrade] = &[NetworkUpgrade::Nu7]; -} - -impl Verifier -======= impl Verifier ->>>>>>> zcash-v2.4.2 where ZS: Service + Send + Clone + 'static, ZS::Future: Send + 'static, @@ -973,10 +937,7 @@ where | NetworkUpgrade::Canopy | NetworkUpgrade::Nu5 | NetworkUpgrade::Nu6 -<<<<<<< HEAD -======= | NetworkUpgrade::Nu6_1 ->>>>>>> zcash-v2.4.2 | NetworkUpgrade::Nu7 => Ok(()), // Does not support V4 transactions @@ -1009,7 +970,7 @@ where /// - the sapling shielded data of the transaction, if any /// - the orchard shielded data of the transaction, if any #[allow(clippy::unwrap_in_result)] - fn verify_v5_and_v6_transaction( + fn verify_v5_transaction( request: &Request, network: &Network, script_verifier: script::Verifier, @@ -1020,11 +981,7 @@ where let transaction = request.transaction(); let nu = request.upgrade(network); -<<<<<<< HEAD - Self::verify_v5_and_v6_transaction_network_upgrade::(&transaction, upgrade)?; -======= Self::verify_v5_transaction_network_upgrade(&transaction, nu)?; ->>>>>>> zcash-v2.4.2 let shielded_sighash = cached_ffi_transaction .sighasher() @@ -1045,20 +1002,13 @@ where )?)) } - /// Verifies if a V5/V6 `transaction` is supported by `network_upgrade`. - fn verify_v5_and_v6_transaction_network_upgrade< - V: primitives::halo2::OrchardVerifier + OrchardTransaction, - >( + /// Verifies if a V5 `transaction` is supported by `network_upgrade`. + fn verify_v5_transaction_network_upgrade( transaction: &Transaction, network_upgrade: NetworkUpgrade, ) -> Result<(), TransactionError> { - if V::SUPPORTED_NETWORK_UPGRADES.contains(&network_upgrade) { - // FIXME: Extend this comment to include V6. Also, it may be confusing to - // mention version group IDs and other rules here since they aren’t actually - // checked. This function only verifies compatibility between the transaction - // version and the network upgrade. - - // Supports V5/V6 transactions + match network_upgrade { + // Supports V5 transactions // // # Consensus // @@ -1070,12 +1020,6 @@ where // // Note: Here we verify the transaction version number of the above rule, the group // id is checked in zebra-chain crate, in the transaction serialize. -<<<<<<< HEAD - Ok(()) - } else { - // Does not support V5/V6 transactions - Err(TransactionError::UnsupportedByNetworkUpgrade( -======= NetworkUpgrade::Nu5 | NetworkUpgrade::Nu6 | NetworkUpgrade::Nu6_1 @@ -1089,22 +1033,22 @@ where | NetworkUpgrade::Blossom | NetworkUpgrade::Heartwood | NetworkUpgrade::Canopy => Err(TransactionError::UnsupportedByNetworkUpgrade( ->>>>>>> zcash-v2.4.2 transaction.version(), network_upgrade, - )) + )), } } /// Passthrough to verify_v5_transaction, but for V6 transactions. + // FIXME: Specify OrchardZS explicitlhy instead of making this generic #[cfg(feature = "tx_v6")] - fn verify_v6_transaction( + fn verify_v6_transaction( request: &Request, network: &Network, script_verifier: script::Verifier, cached_ffi_transaction: Arc, sapling_shielded_data: &Option>, - orchard_shielded_data: &Option, + orchard_shielded_data: &Option>, ) -> Result { Self::verify_v5_transaction( request, diff --git a/zebra-consensus/src/transaction/tests.rs b/zebra-consensus/src/transaction/tests.rs index 3f811a0527e..b9a098fff9c 100644 --- a/zebra-consensus/src/transaction/tests.rs +++ b/zebra-consensus/src/transaction/tests.rs @@ -16,13 +16,8 @@ use tower::{buffer::Buffer, service_fn, ServiceExt}; use zebra_chain::{ amount::{Amount, NonNegative}, block::{self, Block, Height}, -<<<<<<< HEAD - orchard::{AuthorizedAction, OrchardVanilla}, - parameters::{Network, NetworkUpgrade}, -======= - orchard::{Action, AuthorizedAction, Flags}, + orchard::{Action, AuthorizedAction, Flags, OrchardVanilla}, parameters::{testnet::ConfiguredActivationHeights, Network, NetworkUpgrade}, ->>>>>>> zcash-v2.4.2 primitives::{ed25519, x25519, Groth16Proof}, sapling, serialization::{DateTime32, ZcashDeserialize, ZcashDeserializeInto}, @@ -81,7 +76,7 @@ fn v5_transaction_with_orchard_actions_has_inputs_and_outputs() { }) .expect("V5 tx with only Orchard shielded data"); - tx.orchard_shielded_data_mut().unwrap().flags = Flags::empty(); + *tx.orchard_flags_mut().unwrap() = Flags::empty(); // The check will fail if the transaction has no flags assert_eq!( @@ -90,7 +85,7 @@ fn v5_transaction_with_orchard_actions_has_inputs_and_outputs() { ); // If we add ENABLE_SPENDS flag it will pass the inputs check but fails with the outputs - tx.orchard_shielded_data_mut().unwrap().flags = Flags::ENABLE_SPENDS; + *tx.orchard_flags_mut().unwrap() = Flags::ENABLE_SPENDS; assert_eq!( check::has_inputs_and_outputs(&tx), @@ -98,7 +93,7 @@ fn v5_transaction_with_orchard_actions_has_inputs_and_outputs() { ); // If we add ENABLE_OUTPUTS flag it will pass the outputs check but fails with the inputs - tx.orchard_shielded_data_mut().unwrap().flags = Flags::ENABLE_OUTPUTS; + *tx.orchard_flags_mut().unwrap() = Flags::ENABLE_OUTPUTS; assert_eq!( check::has_inputs_and_outputs(&tx), @@ -106,8 +101,7 @@ fn v5_transaction_with_orchard_actions_has_inputs_and_outputs() { ); // Finally make it valid by adding both required flags - tx.orchard_shielded_data_mut().unwrap().flags = - Flags::ENABLE_SPENDS | Flags::ENABLE_OUTPUTS; + *tx.orchard_flags_mut().unwrap() = Flags::ENABLE_SPENDS | Flags::ENABLE_OUTPUTS; assert!(check::has_inputs_and_outputs(&tx).is_ok()); } @@ -126,7 +120,7 @@ fn v5_transaction_with_orchard_actions_has_flags() { }) .expect("V5 tx with only Orchard actions"); - tx.orchard_shielded_data_mut().unwrap().flags = Flags::empty(); + *tx.orchard_flags_mut().unwrap() = Flags::empty(); // The check will fail if the transaction has no flags assert_eq!( @@ -135,52 +129,30 @@ fn v5_transaction_with_orchard_actions_has_flags() { ); // If we add ENABLE_SPENDS flag it will pass. - tx.orchard_shielded_data_mut().unwrap().flags = Flags::ENABLE_SPENDS; + *tx.orchard_flags_mut().unwrap() = Flags::ENABLE_SPENDS; assert!(check::has_enough_orchard_flags(&tx).is_ok()); - tx.orchard_shielded_data_mut().unwrap().flags = Flags::empty(); + *tx.orchard_flags_mut().unwrap() = Flags::empty(); // If we add ENABLE_OUTPUTS flag instead, it will pass. - tx.orchard_shielded_data_mut().unwrap().flags = Flags::ENABLE_OUTPUTS; + *tx.orchard_flags_mut().unwrap() = Flags::ENABLE_OUTPUTS; assert!(check::has_enough_orchard_flags(&tx).is_ok()); - tx.orchard_shielded_data_mut().unwrap().flags = Flags::empty(); + *tx.orchard_flags_mut().unwrap() = Flags::empty(); // If we add BOTH ENABLE_SPENDS and ENABLE_OUTPUTS flags it will pass. - tx.orchard_shielded_data_mut().unwrap().flags = - Flags::ENABLE_SPENDS | Flags::ENABLE_OUTPUTS; + *tx.orchard_flags_mut().unwrap() = Flags::ENABLE_SPENDS | Flags::ENABLE_OUTPUTS; assert!(check::has_enough_orchard_flags(&tx).is_ok()); } } #[test] -<<<<<<< HEAD -fn v5_transaction_with_no_inputs_fails_validation() { - let transaction = fake_v5_transactions_for_network( - &Network::Mainnet, - zebra_test::vectors::MAINNET_BLOCKS.iter(), - ) - .rev() - .find(|transaction| { - transaction.inputs().is_empty() - && transaction.sapling_spends_per_anchor().next().is_none() - && transaction.orchard_action_count() == 0 - && transaction.joinsplit_count() == 0 - && (!transaction.outputs().is_empty() || transaction.sapling_outputs().next().is_some()) - }) - .expect("At least one fake v5 transaction with no inputs in the test vectors"); - - assert_eq!( - check::has_inputs_and_outputs(&transaction), - Err(TransactionError::NoInputs) -======= fn v5_transaction_with_no_inputs_fails_verification() { let (_, output, _) = mock_transparent_transfer( Height(1), true, 0, Amount::try_from(1).expect("valid value"), ->>>>>>> zcash-v2.4.2 ); for net in Network::iter() { @@ -1219,32 +1191,6 @@ async fn state_error_converted_correctly() { } #[test] -<<<<<<< HEAD -fn v5_transaction_with_no_outputs_fails_validation() { - let transaction = fake_v5_transactions_for_network( - &Network::Mainnet, - zebra_test::vectors::MAINNET_BLOCKS.iter(), - ) - .rev() - .find(|transaction| { - transaction.outputs().is_empty() - && transaction.sapling_outputs().next().is_none() - && transaction.orchard_action_count() == 0 - && transaction.joinsplit_count() == 0 - && (!transaction.inputs().is_empty() - || transaction.sapling_spends_per_anchor().next().is_some()) - }) - .expect("At least one fake v5 transaction with no outputs in the test vectors"); - - assert_eq!( - check::has_inputs_and_outputs(&transaction), - Err(TransactionError::NoOutputs) - ); -} - -#[test] -======= ->>>>>>> zcash-v2.4.2 fn v5_coinbase_transaction_without_enable_spends_flag_passes_validation() { for net in Network::iter() { let mut tx = v5_transactions(net.block_iter()) @@ -2843,18 +2789,45 @@ async fn v5_with_duplicate_orchard_action() { let height = tx.expiry_height().expect("expiry height"); - let orchard_shielded_data = tx - .orchard_shielded_data_mut() - .expect("tx without transparent, Sprout, or Sapling outputs must have Orchard actions"); - // Enable spends - orchard_shielded_data.flags = Flags::ENABLE_SPENDS | Flags::ENABLE_OUTPUTS; + *tx.orchard_flags_mut().unwrap() = Flags::ENABLE_SPENDS | Flags::ENABLE_OUTPUTS; - let duplicate_action = orchard_shielded_data.actions.first().clone(); - let duplicate_nullifier = duplicate_action.action.nullifier; + // Duplicate the first action and get its nullifier + let duplicate_nullifier = match &mut tx { + Transaction::V1 { .. } + | Transaction::V2 { .. } + | Transaction::V3 { .. } + | Transaction::V4 { .. } => unimplemented!("Transaction version is not supported"), - // Duplicate the first action - orchard_shielded_data.actions.push(duplicate_action); + Transaction::V5 { + orchard_shielded_data, + .. + } => { + let orchard_shielded_data = orchard_shielded_data + .as_mut() + .expect("Transaction has orchard_shielded_data"); + let duplicate_action = orchard_shielded_data.actions.first().clone(); + let duplicate_nullifier = duplicate_action.action.nullifier; + orchard_shielded_data.actions.push(duplicate_action); + + duplicate_nullifier + } + + #[cfg(feature = "tx_v6")] + Transaction::V6 { + orchard_shielded_data, + .. + } => { + let orchard_shielded_data = orchard_shielded_data + .as_mut() + .expect("Transaction has orchard_shielded_data"); + let duplicate_action = orchard_shielded_data.actions.first().clone(); + let duplicate_nullifier = duplicate_action.action.nullifier; + orchard_shielded_data.actions.push(duplicate_action); + + duplicate_nullifier + } + }; let verifier = Verifier::new_for_tests( &net, @@ -3380,32 +3353,10 @@ fn coinbase_outputs_are_decryptable() -> Result<(), Report> { let is_heartwood = height >= NetworkUpgrade::Heartwood.activation_height(&net).unwrap(); let coinbase = block.transactions.first().expect("coinbase transaction"); -<<<<<<< HEAD - // Check if the coinbase outputs are decryptable with an all-zero key. - if heartwood_onward - && (coinbase_tx.sapling_outputs().count() > 0 || coinbase_tx.orchard_action_count() > 0) - { - // We are only truly decrypting something if it's Heartwood-onward - // and there are relevant outputs. - tested_coinbase_txs += 1; - } - check::coinbase_outputs_are_decryptable(coinbase_tx, &network, height) - .expect("coinbase outputs must be decryptable with an all-zero key"); - - // For remaining transactions, check if existing outputs are NOT decryptable - // with an all-zero key, if applicable. - for tx in block.transactions.iter().skip(1) { - let has_outputs = tx.sapling_outputs().count() > 0 || tx.orchard_action_count() > 0; - if has_outputs && heartwood_onward { - tested_non_coinbase_txs += 1; - check::coinbase_outputs_are_decryptable(tx, &network, height).expect_err( - "decrypting a non-coinbase output with an all-zero key should fail", -======= if coinbase.has_shielded_outputs() && is_heartwood { tested_post_heartwood_shielded_coinbase_tx = true; check::coinbase_outputs_are_decryptable(coinbase, &net, height).expect( "post-Heartwood shielded coinbase outputs must be decryptable with the zero key", ->>>>>>> zcash-v2.4.2 ); } @@ -3476,15 +3427,9 @@ fn coinbase_outputs_are_decryptable() -> Result<(), Report> { /// Given an Orchard action as a base, fill fields related to note encryption /// from the given test vector and returned the modified action. fn fill_action_with_note_encryption_test_vector( -<<<<<<< HEAD - action: &zebra_chain::orchard::Action, - v: &zebra_test::vectors::TestVector, -) -> zebra_chain::orchard::Action { -======= - action: &Action, + action: &Action, v: &zebra_test::vectors::TestVector, -) -> Action { ->>>>>>> zcash-v2.4.2 +) -> Action { let mut action = action.clone(); action.cv = v.cv_net.try_into().expect("test vector must be valid"); action.cm_x = pallas::Base::from_repr(v.cmx).unwrap(); diff --git a/zebra-consensus/src/transaction/tests/prop.rs b/zebra-consensus/src/transaction/tests/prop.rs index 3fa47cadf9a..ec530cf4bd4 100644 --- a/zebra-consensus/src/transaction/tests/prop.rs +++ b/zebra-consensus/src/transaction/tests/prop.rs @@ -348,11 +348,7 @@ fn sanitize_transaction_version( Overwinter => 3, Sapling | Blossom | Heartwood | Canopy => 4, // FIXME: Use 6 for Nu7 -<<<<<<< HEAD - Nu5 | Nu6 | Nu7 => 5, -======= Nu5 | Nu6 | Nu6_1 | Nu7 => 5, ->>>>>>> zcash-v2.4.2 } }; diff --git a/zebra-network/proptest-regressions/peer/minimum_peer_version/tests/prop.txt b/zebra-network/proptest-regressions/peer/minimum_peer_version/tests/prop.txt new file mode 100644 index 00000000000..da5e0930acd --- /dev/null +++ b/zebra-network/proptest-regressions/peer/minimum_peer_version/tests/prop.txt @@ -0,0 +1,7 @@ +# Seeds for failure cases proptest has generated in the past. It is +# automatically read and these particular cases re-run before any +# novel cases are generated. +# +# It is recommended to check this file in to source control so that +# everyone who runs the test benefits from these saved cases. +cc 5678865ceeaa402517ea865cce77dd8e030093ffac6e0af95df784d8b84dd60b # shrinks to network = Mainnet, block_height = Some(Height(3111000)) diff --git a/zebra-network/proptest-regressions/peer_set/set/tests/prop.txt b/zebra-network/proptest-regressions/peer_set/set/tests/prop.txt new file mode 100644 index 00000000000..dd98ce5a5db --- /dev/null +++ b/zebra-network/proptest-regressions/peer_set/set/tests/prop.txt @@ -0,0 +1,7 @@ +# Seeds for failure cases proptest has generated in the past. It is +# automatically read and these particular cases re-run before any +# novel cases are generated. +# +# It is recommended to check this file in to source control so that +# everyone who runs the test benefits from these saved cases. +cc c36b53efc1572cbecae53a4249ec88c68f010bd10dc561131da68b6b4e729d85 # shrinks to total_number_of_peers = 2 diff --git a/zebra-network/src/config.rs b/zebra-network/src/config.rs index 20248554e71..94462efe2d6 100644 --- a/zebra-network/src/config.rs +++ b/zebra-network/src/config.rs @@ -729,25 +729,11 @@ impl<'de> Deserialize<'de> for Config { (NetworkKind::Mainnet, _) => Network::Mainnet, (NetworkKind::Testnet, None) => Network::new_default_testnet(), (NetworkKind::Regtest, testnet_parameters) => { -<<<<<<< HEAD - let (nu5_activation_height, nu6_activation_height, nu7_activation_height) = - testnet_parameters - .and_then(|params| params.activation_heights) - .map(|ConfiguredActivationHeights { nu5, nu6, nu7, .. }| (nu5, nu6, nu7)) - .unwrap_or_default(); - - Network::new_regtest( - nu5_activation_height, - nu6_activation_height, - nu7_activation_height, - ) -======= let configured_activation_heights = testnet_parameters .and_then(|params| params.activation_heights) .unwrap_or_default(); Network::new_regtest(configured_activation_heights) ->>>>>>> zcash-v2.4.2 } ( NetworkKind::Testnet, diff --git a/zebra-network/src/constants.rs b/zebra-network/src/constants.rs index ec41b4a6d4d..63781e908d2 100644 --- a/zebra-network/src/constants.rs +++ b/zebra-network/src/constants.rs @@ -340,23 +340,10 @@ pub const TIMESTAMP_TRUNCATION_SECONDS: u32 = 30 * 60; /// /// This version of Zebra draws the current network protocol version from /// [ZIP-253](https://zips.z.cash/zip-0253). -<<<<<<< HEAD -pub const CURRENT_NETWORK_PROTOCOL_VERSION: Version = { - #[cfg(not(zcash_unstable = "nu7"))] - { - Version(170_120) - } - #[cfg(zcash_unstable = "nu7")] - { - Version(170_140) - } -}; -======= // TODO: Update this constant to the correct value after NU6.1 & NU7 activation, // pub const CURRENT_NETWORK_PROTOCOL_VERSION: Version = Version(170_140); // NU6.1 // pub const CURRENT_NETWORK_PROTOCOL_VERSION: Version = Version(170_160); // NU7 pub const CURRENT_NETWORK_PROTOCOL_VERSION: Version = Version(170_120); ->>>>>>> zcash-v2.4.2 /// The default RTT estimate for peer responses. /// @@ -424,15 +411,9 @@ lazy_static! { pub static ref INITIAL_MIN_NETWORK_PROTOCOL_VERSION: HashMap = { let mut hash_map = HashMap::new(); -<<<<<<< HEAD - hash_map.insert(NetworkKind::Mainnet, Version::min_specified_for_upgrade(&Mainnet, Nu5)); - hash_map.insert(NetworkKind::Testnet, Version::min_specified_for_upgrade(&Network::new_default_testnet(), Nu5)); - hash_map.insert(NetworkKind::Regtest, Version::min_specified_for_upgrade(&Network::new_regtest(None, None, None), Nu5)); -======= hash_map.insert(NetworkKind::Mainnet, Version::min_specified_for_upgrade(&Mainnet, Nu6)); hash_map.insert(NetworkKind::Testnet, Version::min_specified_for_upgrade(&Network::new_default_testnet(), Nu6)); hash_map.insert(NetworkKind::Regtest, Version::min_specified_for_upgrade(&Network::new_regtest(Default::default()), Nu6)); ->>>>>>> zcash-v2.4.2 hash_map }; diff --git a/zebra-network/src/protocol/external/types.rs b/zebra-network/src/protocol/external/types.rs index 96242d2d3be..3a5a7bd856d 100644 --- a/zebra-network/src/protocol/external/types.rs +++ b/zebra-network/src/protocol/external/types.rs @@ -106,17 +106,10 @@ impl Version { (Mainnet, Nu5) => 170_100, (Testnet(params), Nu6) if params.is_default_testnet() => 170_110, (Mainnet, Nu6) => 170_120, -<<<<<<< HEAD - #[cfg(zcash_unstable = "nu7")] - (Testnet(params), Nu7) if params.is_default_testnet() => 170_130, - #[cfg(zcash_unstable = "nu7")] - (Mainnet, Nu7) => 170_140, -======= (Testnet(params), Nu6_1) if params.is_default_testnet() => 170_130, (Mainnet, Nu6_1) => 170_140, (Testnet(params), Nu7) if params.is_default_testnet() => 170_150, (Mainnet, Nu7) => 170_160, ->>>>>>> zcash-v2.4.2 // It should be fine to reject peers with earlier network protocol versions on custom testnets for now. (Testnet(_), _) => CURRENT_NETWORK_PROTOCOL_VERSION.0, @@ -217,15 +210,10 @@ mod test { let highest_network_upgrade = NetworkUpgrade::current(network, block::Height::MAX); assert!( -<<<<<<< HEAD - highest_network_upgrade == Nu7 || highest_network_upgrade == Nu6 || highest_network_upgrade == Nu5, - "expected coverage of all network upgrades: add the new network upgrade to the list in this test"); -======= matches!(highest_network_upgrade, Nu6 | Nu6_1 | Nu7), "expected coverage of all network upgrades: \ add the new network upgrade to the list in this test" ); ->>>>>>> zcash-v2.4.2 for &network_upgrade in &[ BeforeOverwinter, @@ -236,10 +224,7 @@ mod test { Canopy, Nu5, Nu6, -<<<<<<< HEAD -======= Nu6_1, ->>>>>>> zcash-v2.4.2 Nu7, ] { let height = network_upgrade.activation_height(network); diff --git a/zebra-rpc/Cargo.toml b/zebra-rpc/Cargo.toml index d8ec1fbbaea..622bbadc3a0 100644 --- a/zebra-rpc/Cargo.toml +++ b/zebra-rpc/Cargo.toml @@ -36,6 +36,8 @@ proptest-impl = [ "zebra-chain/proptest-impl", ] +tx_v6 = [] + [dependencies] chrono = { workspace = true, features = ["clock", "std"] } futures = { workspace = true } @@ -79,15 +81,8 @@ nix = { workspace = true, features = ["signal"] } zcash_address = { workspace = true } zcash_keys = { workspace = true } zcash_primitives = { workspace = true, features = ["transparent-inputs"] } -<<<<<<< HEAD -zcash_protocol.workspace = true - -# ECC deps used by getblocktemplate-rpcs feature -zcash_address = { workspace = true, optional = true} -======= zcash_protocol = { workspace = true } zcash_transparent = { workspace = true } ->>>>>>> zcash-v2.4.2 # Test-only feature proptest-impl proptest = { workspace = true, optional = true } diff --git a/zebra-rpc/src/methods/get_block_template_rpcs.rs b/zebra-rpc/src/methods/get_block_template_rpcs.rs deleted file mode 100644 index 1e72eb83900..00000000000 --- a/zebra-rpc/src/methods/get_block_template_rpcs.rs +++ /dev/null @@ -1,1465 +0,0 @@ -//! RPC methods related to mining only available with `getblocktemplate-rpcs` rust feature. - -use std::{fmt::Debug, sync::Arc, time::Duration}; - -use futures::{future::OptionFuture, FutureExt, TryFutureExt}; -use jsonrpc_core::{self, BoxFuture, Error, ErrorCode, Result}; -use jsonrpc_derive::rpc; -use tower::{Service, ServiceExt}; - -use zcash_address::{unified::Encoding, TryFromAddress}; - -use zebra_chain::{ - amount::{self, Amount, NonNegative}, - block::{self, Block, Height, TryIntoHeight}, - chain_sync_status::ChainSyncStatus, - chain_tip::ChainTip, - parameters::{ - subsidy::{FundingStreamReceiver, ParameterSubsidy}, - Network, NetworkKind, NetworkUpgrade, POW_AVERAGING_WINDOW, - }, - primitives, - serialization::{ZcashDeserializeInto, ZcashSerialize}, - transparent::{ - self, EXTRA_ZEBRA_COINBASE_DATA, MAX_COINBASE_DATA_LEN, MAX_COINBASE_HEIGHT_DATA_LEN, - }, - work::difficulty::{ParameterDifficulty as _, U256}, -}; -use zebra_consensus::{ - block_subsidy, funding_stream_address, funding_stream_values, miner_subsidy, RouterError, -}; -use zebra_network::AddressBookPeers; -use zebra_node_services::mempool; -use zebra_state::{ReadRequest, ReadResponse}; - -use crate::methods::{ - best_chain_tip_height, - errors::MapServerError, - get_block_template_rpcs::{ - constants::{ - DEFAULT_SOLUTION_RATE_WINDOW_SIZE, GET_BLOCK_TEMPLATE_MEMPOOL_LONG_POLL_INTERVAL, - ZCASHD_FUNDING_STREAM_ORDER, - }, - get_block_template::{ - check_miner_address, check_synced_to_tip, fetch_mempool_transactions, - fetch_state_tip_and_local_time, validate_block_proposal, - }, - // TODO: move the types/* modules directly under get_block_template_rpcs, - // and combine any modules with the same names. - types::{ - get_block_template::{ - proposal::TimeSource, proposal_block_from_template, GetBlockTemplate, - }, - get_mining_info, - long_poll::LongPollInput, - peer_info::PeerInfo, - submit_block, - subsidy::{BlockSubsidy, FundingStream}, - unified_address, validate_address, z_validate_address, - }, - }, - height_from_signed_int, - hex_data::HexData, - GetBlockHash, MISSING_BLOCK_ERROR_CODE, -}; - -pub mod constants; -pub mod get_block_template; -pub mod types; -pub mod zip317; - -/// getblocktemplate RPC method signatures. -#[rpc(server)] -pub trait GetBlockTemplateRpc { - /// Returns the height of the most recent block in the best valid block chain (equivalently, - /// the number of blocks in this chain excluding the genesis block). - /// - /// zcashd reference: [`getblockcount`](https://zcash.github.io/rpc/getblockcount.html) - /// method: post - /// tags: blockchain - /// - /// # Notes - /// - /// This rpc method is available only if zebra is built with `--features getblocktemplate-rpcs`. - #[rpc(name = "getblockcount")] - fn get_block_count(&self) -> Result; - - /// Returns the hash of the block of a given height iff the index argument correspond - /// to a block in the best chain. - /// - /// zcashd reference: [`getblockhash`](https://zcash-rpc.github.io/getblockhash.html) - /// method: post - /// tags: blockchain - /// - /// # Parameters - /// - /// - `index`: (numeric, required, example=1) The block index. - /// - /// # Notes - /// - /// - If `index` is positive then index = block height. - /// - If `index` is negative then -1 is the last known valid block. - /// - This rpc method is available only if zebra is built with `--features getblocktemplate-rpcs`. - #[rpc(name = "getblockhash")] - fn get_block_hash(&self, index: i32) -> BoxFuture>; - - /// Returns a block template for mining new Zcash blocks. - /// - /// # Parameters - /// - /// - `jsonrequestobject`: (string, optional) A JSON object containing arguments. - /// - /// zcashd reference: [`getblocktemplate`](https://zcash-rpc.github.io/getblocktemplate.html) - /// method: post - /// tags: mining - /// - /// # Notes - /// - /// Arguments to this RPC are currently ignored. - /// Long polling, block proposals, server lists, and work IDs are not supported. - /// - /// Miners can make arbitrary changes to blocks, as long as: - /// - the data sent to `submitblock` is a valid Zcash block, and - /// - the parent block is a valid block that Zebra already has, or will receive soon. - /// - /// Zebra verifies blocks in parallel, and keeps recent chains in parallel, - /// so moving between chains and forking chains is very cheap. - /// - /// This rpc method is available only if zebra is built with `--features getblocktemplate-rpcs`. - #[rpc(name = "getblocktemplate")] - fn get_block_template( - &self, - parameters: Option, - ) -> BoxFuture>; - - /// Submits block to the node to be validated and committed. - /// Returns the [`submit_block::Response`] for the operation, as a JSON string. - /// - /// zcashd reference: [`submitblock`](https://zcash.github.io/rpc/submitblock.html) - /// method: post - /// tags: mining - /// - /// # Parameters - /// - /// - `hexdata`: (string, required) - /// - `jsonparametersobject`: (string, optional) - currently ignored - /// - /// # Notes - /// - /// - `jsonparametersobject` holds a single field, workid, that must be included in submissions if provided by the server. - #[rpc(name = "submitblock")] - fn submit_block( - &self, - hex_data: HexData, - _parameters: Option, - ) -> BoxFuture>; - - /// Returns mining-related information. - /// - /// zcashd reference: [`getmininginfo`](https://zcash.github.io/rpc/getmininginfo.html) - /// method: post - /// tags: mining - #[rpc(name = "getmininginfo")] - fn get_mining_info(&self) -> BoxFuture>; - - /// Returns the estimated network solutions per second based on the last `num_blocks` before - /// `height`. - /// - /// If `num_blocks` is not supplied, uses 120 blocks. If it is 0 or -1, uses the difficulty - /// averaging window. - /// If `height` is not supplied or is -1, uses the tip height. - /// - /// zcashd reference: [`getnetworksolps`](https://zcash.github.io/rpc/getnetworksolps.html) - /// method: post - /// tags: mining - #[rpc(name = "getnetworksolps")] - fn get_network_sol_ps( - &self, - num_blocks: Option, - height: Option, - ) -> BoxFuture>; - - /// Returns the estimated network solutions per second based on the last `num_blocks` before - /// `height`. - /// - /// This method name is deprecated, use [`getnetworksolps`](Self::get_network_sol_ps) instead. - /// See that method for details. - /// - /// zcashd reference: [`getnetworkhashps`](https://zcash.github.io/rpc/getnetworkhashps.html) - /// method: post - /// tags: mining - #[rpc(name = "getnetworkhashps")] - fn get_network_hash_ps( - &self, - num_blocks: Option, - height: Option, - ) -> BoxFuture> { - self.get_network_sol_ps(num_blocks, height) - } - - /// Returns data about each connected network node. - /// - /// zcashd reference: [`getpeerinfo`](https://zcash.github.io/rpc/getpeerinfo.html) - /// method: post - /// tags: network - #[rpc(name = "getpeerinfo")] - fn get_peer_info(&self) -> BoxFuture>>; - - /// Checks if a zcash address is valid. - /// Returns information about the given address if valid. - /// - /// zcashd reference: [`validateaddress`](https://zcash.github.io/rpc/validateaddress.html) - /// method: post - /// tags: util - /// - /// # Parameters - /// - /// - `address`: (string, required) The zcash address to validate. - /// - /// # Notes - /// - /// - No notes - #[rpc(name = "validateaddress")] - fn validate_address(&self, address: String) -> BoxFuture>; - - /// Checks if a zcash address is valid. - /// Returns information about the given address if valid. - /// - /// zcashd reference: [`z_validateaddress`](https://zcash.github.io/rpc/z_validateaddress.html) - /// method: post - /// tags: util - /// - /// # Parameters - /// - /// - `address`: (string, required) The zcash address to validate. - /// - /// # Notes - /// - /// - No notes - #[rpc(name = "z_validateaddress")] - fn z_validate_address( - &self, - address: String, - ) -> BoxFuture>; - - /// Returns the block subsidy reward of the block at `height`, taking into account the mining slow start. - /// Returns an error if `height` is less than the height of the first halving for the current network. - /// - /// zcashd reference: [`getblocksubsidy`](https://zcash.github.io/rpc/getblocksubsidy.html) - /// method: post - /// tags: mining - /// - /// # Parameters - /// - /// - `height`: (numeric, optional, example=1) Can be any valid current or future height. - /// - /// # Notes - /// - /// If `height` is not supplied, uses the tip height. - #[rpc(name = "getblocksubsidy")] - fn get_block_subsidy(&self, height: Option) -> BoxFuture>; - - /// Returns the proof-of-work difficulty as a multiple of the minimum difficulty. - /// - /// zcashd reference: [`getdifficulty`](https://zcash.github.io/rpc/getdifficulty.html) - /// method: post - /// tags: blockchain - #[rpc(name = "getdifficulty")] - fn get_difficulty(&self) -> BoxFuture>; - - /// Returns the list of individual payment addresses given a unified address. - /// - /// zcashd reference: [`z_listunifiedreceivers`](https://zcash.github.io/rpc/z_listunifiedreceivers.html) - /// method: post - /// tags: wallet - /// - /// # Parameters - /// - /// - `address`: (string, required) The zcash unified address to get the list from. - /// - /// # Notes - /// - /// - No notes - #[rpc(name = "z_listunifiedreceivers")] - fn z_list_unified_receivers( - &self, - address: String, - ) -> BoxFuture>; - - #[rpc(name = "generate")] - /// Mine blocks immediately. Returns the block hashes of the generated blocks. - /// - /// # Parameters - /// - /// - `num_blocks`: (numeric, required, example=1) Number of blocks to be generated. - /// - /// # Notes - /// - /// Only works if the network of the running zebrad process is `Regtest`. - /// - /// zcashd reference: [`generate`](https://zcash.github.io/rpc/generate.html) - /// method: post - /// tags: generating - fn generate(&self, num_blocks: u32) -> BoxFuture>>; -} - -/// RPC method implementations. -#[derive(Clone)] -pub struct GetBlockTemplateRpcImpl< - Mempool, - State, - Tip, - BlockVerifierRouter, - SyncStatus, - AddressBook, -> where - Mempool: Service< - mempool::Request, - Response = mempool::Response, - Error = zebra_node_services::BoxError, - > + Clone - + Send - + Sync - + 'static, - Mempool::Future: Send, - State: Service< - zebra_state::ReadRequest, - Response = zebra_state::ReadResponse, - Error = zebra_state::BoxError, - > + Clone - + Send - + Sync - + 'static, - >::Future: Send, - Tip: ChainTip + Clone + Send + Sync + 'static, - BlockVerifierRouter: Service - + Clone - + Send - + Sync - + 'static, - >::Future: Send, - SyncStatus: ChainSyncStatus + Clone + Send + Sync + 'static, - AddressBook: AddressBookPeers + Clone + Send + Sync + 'static, -{ - // Configuration - // - /// The configured network for this RPC service. - network: Network, - - /// The configured miner address for this RPC service. - /// - /// Zebra currently only supports transparent addresses. - miner_address: Option, - - /// Extra data to include in coinbase transaction inputs. - /// Limited to around 95 bytes by the consensus rules. - extra_coinbase_data: Vec, - - /// Should Zebra's block templates try to imitate `zcashd`? - /// Developer-only config. - debug_like_zcashd: bool, - - // Services - // - /// A handle to the mempool service. - mempool: Mempool, - - /// A handle to the state service. - state: State, - - /// Allows efficient access to the best tip of the blockchain. - latest_chain_tip: Tip, - - /// The chain verifier, used for submitting blocks. - block_verifier_router: BlockVerifierRouter, - - /// The chain sync status, used for checking if Zebra is likely close to the network chain tip. - sync_status: SyncStatus, - - /// Address book of peers, used for `getpeerinfo`. - address_book: AddressBook, -} - -impl Debug - for GetBlockTemplateRpcImpl -where - Mempool: Service< - mempool::Request, - Response = mempool::Response, - Error = zebra_node_services::BoxError, - > + Clone - + Send - + Sync - + 'static, - Mempool::Future: Send, - State: Service< - zebra_state::ReadRequest, - Response = zebra_state::ReadResponse, - Error = zebra_state::BoxError, - > + Clone - + Send - + Sync - + 'static, - >::Future: Send, - Tip: ChainTip + Clone + Send + Sync + 'static, - BlockVerifierRouter: Service - + Clone - + Send - + Sync - + 'static, - >::Future: Send, - SyncStatus: ChainSyncStatus + Clone + Send + Sync + 'static, - AddressBook: AddressBookPeers + Clone + Send + Sync + 'static, -{ - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - // Skip fields without debug impls - f.debug_struct("GetBlockTemplateRpcImpl") - .field("network", &self.network) - .field("miner_address", &self.miner_address) - .field("extra_coinbase_data", &self.extra_coinbase_data) - .field("debug_like_zcashd", &self.debug_like_zcashd) - .finish() - } -} - -impl - GetBlockTemplateRpcImpl -where - Mempool: Service< - mempool::Request, - Response = mempool::Response, - Error = zebra_node_services::BoxError, - > + Clone - + Send - + Sync - + 'static, - Mempool::Future: Send, - State: Service< - zebra_state::ReadRequest, - Response = zebra_state::ReadResponse, - Error = zebra_state::BoxError, - > + Clone - + Send - + Sync - + 'static, - >::Future: Send, - Tip: ChainTip + Clone + Send + Sync + 'static, - BlockVerifierRouter: Service - + Clone - + Send - + Sync - + 'static, - >::Future: Send, - SyncStatus: ChainSyncStatus + Clone + Send + Sync + 'static, - AddressBook: AddressBookPeers + Clone + Send + Sync + 'static, -{ - /// Create a new instance of the handler for getblocktemplate RPCs. - /// - /// # Panics - /// - /// If the `mining_config` is invalid. - #[allow(clippy::too_many_arguments)] - pub fn new( - network: &Network, - mining_config: crate::config::mining::Config, - mempool: Mempool, - state: State, - latest_chain_tip: Tip, - block_verifier_router: BlockVerifierRouter, - sync_status: SyncStatus, - address_book: AddressBook, - ) -> Self { - // Prevent loss of miner funds due to an unsupported or incorrect address type. - if let Some(miner_address) = mining_config.miner_address.clone() { - match network.kind() { - NetworkKind::Mainnet => assert_eq!( - miner_address.network_kind(), - NetworkKind::Mainnet, - "Incorrect config: Zebra is configured to run on a Mainnet network, \ - which implies the configured mining address needs to be for Mainnet, \ - but the provided address is for {}.", - miner_address.network_kind(), - ), - // `Regtest` uses `Testnet` transparent addresses. - network_kind @ (NetworkKind::Testnet | NetworkKind::Regtest) => assert_eq!( - miner_address.network_kind(), - NetworkKind::Testnet, - "Incorrect config: Zebra is configured to run on a {network_kind} network, \ - which implies the configured mining address needs to be for Testnet, \ - but the provided address is for {}.", - miner_address.network_kind(), - ), - } - } - - // A limit on the configured extra coinbase data, regardless of the current block height. - // This is different from the consensus rule, which limits the total height + data. - const EXTRA_COINBASE_DATA_LIMIT: usize = - MAX_COINBASE_DATA_LEN - MAX_COINBASE_HEIGHT_DATA_LEN; - - let debug_like_zcashd = mining_config.debug_like_zcashd; - - // Hex-decode to bytes if possible, otherwise UTF-8 encode to bytes. - let extra_coinbase_data = mining_config.extra_coinbase_data.unwrap_or_else(|| { - if debug_like_zcashd { - "" - } else { - EXTRA_ZEBRA_COINBASE_DATA - } - .to_string() - }); - let extra_coinbase_data = hex::decode(&extra_coinbase_data) - .unwrap_or_else(|_error| extra_coinbase_data.as_bytes().to_vec()); - - assert!( - extra_coinbase_data.len() <= EXTRA_COINBASE_DATA_LIMIT, - "extra coinbase data is {} bytes, but Zebra's limit is {}.\n\ - Configure mining.extra_coinbase_data with a shorter string", - extra_coinbase_data.len(), - EXTRA_COINBASE_DATA_LIMIT, - ); - - Self { - network: network.clone(), - miner_address: mining_config.miner_address, - extra_coinbase_data, - debug_like_zcashd, - mempool, - state, - latest_chain_tip, - block_verifier_router, - sync_status, - address_book, - } - } -} - -impl GetBlockTemplateRpc - for GetBlockTemplateRpcImpl -where - Mempool: Service< - mempool::Request, - Response = mempool::Response, - Error = zebra_node_services::BoxError, - > + Clone - + Send - + Sync - + 'static, - Mempool::Future: Send, - State: Service< - zebra_state::ReadRequest, - Response = zebra_state::ReadResponse, - Error = zebra_state::BoxError, - > + Clone - + Send - + Sync - + 'static, - >::Future: Send, - Tip: ChainTip + Clone + Send + Sync + 'static, - BlockVerifierRouter: Service - + Clone - + Send - + Sync - + 'static, - >::Future: Send, - SyncStatus: ChainSyncStatus + Clone + Send + Sync + 'static, - AddressBook: AddressBookPeers + Clone + Send + Sync + 'static, -{ - fn get_block_count(&self) -> Result { - best_chain_tip_height(&self.latest_chain_tip).map(|height| height.0) - } - - fn get_block_hash(&self, index: i32) -> BoxFuture> { - let mut state = self.state.clone(); - let latest_chain_tip = self.latest_chain_tip.clone(); - - async move { - // TODO: look up this height as part of the state request? - let tip_height = best_chain_tip_height(&latest_chain_tip)?; - - let height = height_from_signed_int(index, tip_height)?; - - let request = zebra_state::ReadRequest::BestChainBlockHash(height); - let response = state - .ready() - .and_then(|service| service.call(request)) - .await - .map_server_error()?; - - match response { - zebra_state::ReadResponse::BlockHash(Some(hash)) => Ok(GetBlockHash(hash)), - zebra_state::ReadResponse::BlockHash(None) => Err(Error { - code: MISSING_BLOCK_ERROR_CODE, - message: "Block not found".to_string(), - data: None, - }), - _ => unreachable!("unmatched response to a block request"), - } - } - .boxed() - } - - fn get_block_template( - &self, - parameters: Option, - ) -> BoxFuture> { - // Clone Configs - let network = self.network.clone(); - let miner_address = self.miner_address.clone(); - let debug_like_zcashd = self.debug_like_zcashd; - let extra_coinbase_data = self.extra_coinbase_data.clone(); - - // Clone Services - let mempool = self.mempool.clone(); - let mut latest_chain_tip = self.latest_chain_tip.clone(); - let sync_status = self.sync_status.clone(); - let state = self.state.clone(); - - if let Some(HexData(block_proposal_bytes)) = parameters - .as_ref() - .and_then(get_block_template::JsonParameters::block_proposal_data) - { - return validate_block_proposal( - self.block_verifier_router.clone(), - block_proposal_bytes, - network, - latest_chain_tip, - sync_status, - ) - .boxed(); - } - - // To implement long polling correctly, we split this RPC into multiple phases. - async move { - get_block_template::check_parameters(¶meters)?; - - let client_long_poll_id = parameters.as_ref().and_then(|params| params.long_poll_id); - - // - One-off checks - - // Check config and parameters. - // These checks always have the same result during long polling. - let miner_address = check_miner_address(miner_address)?; - - // - Checks and fetches that can change during long polling - // - // Set up the loop. - let mut max_time_reached = false; - - // The loop returns the server long poll ID, - // which should be different to the client long poll ID. - let (server_long_poll_id, chain_tip_and_local_time, mempool_txs, submit_old) = loop { - // Check if we are synced to the tip. - // The result of this check can change during long polling. - // - // Optional TODO: - // - add `async changed()` method to ChainSyncStatus (like `ChainTip`) - check_synced_to_tip(&network, latest_chain_tip.clone(), sync_status.clone())?; - // TODO: return an error if we have no peers, like `zcashd` does, - // and add a developer config that mines regardless of how many peers we have. - // https://github.com/zcash/zcash/blob/6fdd9f1b81d3b228326c9826fa10696fc516444b/src/miner.cpp#L865-L880 - - // We're just about to fetch state data, then maybe wait for any changes. - // Mark all the changes before the fetch as seen. - // Changes are also ignored in any clones made after the mark. - latest_chain_tip.mark_best_tip_seen(); - - // Fetch the state data and local time for the block template: - // - if the tip block hash changes, we must return from long polling, - // - if the local clock changes on testnet, we might return from long polling - // - // We always return after 90 minutes on mainnet, even if we have the same response, - // because the max time has been reached. - let chain_tip_and_local_time @ zebra_state::GetBlockTemplateChainInfo { - tip_hash, - tip_height, - max_time, - cur_time, - .. - } = fetch_state_tip_and_local_time(state.clone()).await?; - - // Fetch the mempool data for the block template: - // - if the mempool transactions change, we might return from long polling. - // - // If the chain fork has just changed, miners want to get the new block as fast - // as possible, rather than wait for transactions to re-verify. This increases - // miner profits (and any delays can cause chain forks). So we don't wait between - // the chain tip changing and getting mempool transactions. - // - // Optional TODO: - // - add a `MempoolChange` type with an `async changed()` method (like `ChainTip`) - let Some(mempool_txs) = fetch_mempool_transactions(mempool.clone(), tip_hash) - .await? - // If the mempool and state responses are out of sync: - // - if we are not long polling, omit mempool transactions from the template, - // - if we are long polling, continue to the next iteration of the loop to make fresh state and mempool requests. - .or_else(|| client_long_poll_id.is_none().then(Vec::new)) - else { - continue; - }; - - // - Long poll ID calculation - let server_long_poll_id = LongPollInput::new( - tip_height, - tip_hash, - max_time, - mempool_txs.iter().map(|tx| tx.transaction.id), - ) - .generate_id(); - - // The loop finishes if: - // - the client didn't pass a long poll ID, - // - the server long poll ID is different to the client long poll ID, or - // - the previous loop iteration waited until the max time. - if Some(&server_long_poll_id) != client_long_poll_id.as_ref() || max_time_reached { - let mut submit_old = client_long_poll_id - .as_ref() - .map(|old_long_poll_id| server_long_poll_id.submit_old(old_long_poll_id)); - - // On testnet, the max time changes the block difficulty, so old shares are - // invalid. On mainnet, this means there has been 90 minutes without a new - // block or mempool transaction, which is very unlikely. So the miner should - // probably reset anyway. - if max_time_reached { - submit_old = Some(false); - } - - break ( - server_long_poll_id, - chain_tip_and_local_time, - mempool_txs, - submit_old, - ); - } - - // - Polling wait conditions - // - // TODO: when we're happy with this code, split it into a function. - // - // Periodically check the mempool for changes. - // - // Optional TODO: - // Remove this polling wait if we switch to using futures to detect sync status - // and mempool changes. - let wait_for_mempool_request = tokio::time::sleep(Duration::from_secs( - GET_BLOCK_TEMPLATE_MEMPOOL_LONG_POLL_INTERVAL, - )); - - // Return immediately if the chain tip has changed. - // The clone preserves the seen status of the chain tip. - let mut wait_for_best_tip_change = latest_chain_tip.clone(); - let wait_for_best_tip_change = wait_for_best_tip_change.best_tip_changed(); - - // Wait for the maximum block time to elapse. This can change the block header - // on testnet. (On mainnet it can happen due to a network disconnection, or a - // rapid drop in hash rate.) - // - // This duration might be slightly lower than the actual maximum, - // if cur_time was clamped to min_time. In that case the wait is very long, - // and it's ok to return early. - // - // It can also be zero if cur_time was clamped to max_time. In that case, - // we want to wait for another change, and ignore this timeout. So we use an - // `OptionFuture::None`. - let duration_until_max_time = max_time.saturating_duration_since(cur_time); - let wait_for_max_time: OptionFuture<_> = if duration_until_max_time.seconds() > 0 { - Some(tokio::time::sleep(duration_until_max_time.to_std())) - } else { - None - } - .into(); - - // Optional TODO: - // `zcashd` generates the next coinbase transaction while waiting for changes. - // When Zebra supports shielded coinbase, we might want to do this in parallel. - // But the coinbase value depends on the selected transactions, so this needs - // further analysis to check if it actually saves us any time. - - tokio::select! { - // Poll the futures in the listed order, for efficiency. - // We put the most frequent conditions first. - biased; - - // This timer elapses every few seconds - _elapsed = wait_for_mempool_request => { - tracing::debug!( - ?max_time, - ?cur_time, - ?server_long_poll_id, - ?client_long_poll_id, - GET_BLOCK_TEMPLATE_MEMPOOL_LONG_POLL_INTERVAL, - "checking for a new mempool change after waiting a few seconds" - ); - } - - // The state changes after around a target block interval (75s) - tip_changed_result = wait_for_best_tip_change => { - match tip_changed_result { - Ok(()) => { - // Spurious updates shouldn't happen in the state, because the - // difficulty and hash ordering is a stable total order. But - // since they could cause a busy-loop, guard against them here. - latest_chain_tip.mark_best_tip_seen(); - - let new_tip_hash = latest_chain_tip.best_tip_hash(); - if new_tip_hash == Some(tip_hash) { - tracing::debug!( - ?max_time, - ?cur_time, - ?server_long_poll_id, - ?client_long_poll_id, - ?tip_hash, - ?tip_height, - "ignoring spurious state change notification" - ); - - // Wait for the mempool interval, then check for any changes. - tokio::time::sleep(Duration::from_secs( - GET_BLOCK_TEMPLATE_MEMPOOL_LONG_POLL_INTERVAL, - )).await; - - continue; - } - - tracing::debug!( - ?max_time, - ?cur_time, - ?server_long_poll_id, - ?client_long_poll_id, - "returning from long poll because state has changed" - ); - } - - Err(recv_error) => { - // This log is rare and helps with debugging, so it's ok to be info. - tracing::info!( - ?recv_error, - ?max_time, - ?cur_time, - ?server_long_poll_id, - ?client_long_poll_id, - "returning from long poll due to a state error.\ - Is Zebra shutting down?" - ); - - return Err(recv_error).map_server_error(); - } - } - } - - // The max time does not elapse during normal operation on mainnet, - // and it rarely elapses on testnet. - Some(_elapsed) = wait_for_max_time => { - // This log is very rare so it's ok to be info. - tracing::info!( - ?max_time, - ?cur_time, - ?server_long_poll_id, - ?client_long_poll_id, - "returning from long poll because max time was reached" - ); - - max_time_reached = true; - } - } - }; - - // - Processing fetched data to create a transaction template - // - // Apart from random weighted transaction selection, - // the template only depends on the previously fetched data. - // This processing never fails. - - // Calculate the next block height. - let next_block_height = - (chain_tip_and_local_time.tip_height + 1).expect("tip is far below Height::MAX"); - - tracing::debug!( - mempool_tx_hashes = ?mempool_txs - .iter() - .map(|tx| tx.transaction.id.mined_id()) - .collect::>(), - "selecting transactions for the template from the mempool" - ); - - // Randomly select some mempool transactions. - let mempool_txs = zip317::select_mempool_transactions( - &network, - next_block_height, - &miner_address, - mempool_txs, - debug_like_zcashd, - extra_coinbase_data.clone(), - ) - .await; - - tracing::debug!( - selected_mempool_tx_hashes = ?mempool_txs - .iter() - .map(|tx| tx.transaction.id.mined_id()) - .collect::>(), - "selected transactions for the template from the mempool" - ); - - // - After this point, the template only depends on the previously fetched data. - - let response = GetBlockTemplate::new( - &network, - &miner_address, - &chain_tip_and_local_time, - server_long_poll_id, - mempool_txs, - submit_old, - debug_like_zcashd, - extra_coinbase_data, - ); - - Ok(response.into()) - } - .boxed() - } - - fn submit_block( - &self, - HexData(block_bytes): HexData, - _parameters: Option, - ) -> BoxFuture> { - let mut block_verifier_router = self.block_verifier_router.clone(); - - async move { - let block: Block = match block_bytes.zcash_deserialize_into() { - Ok(block_bytes) => block_bytes, - Err(error) => { - tracing::info!(?error, "submit block failed: block bytes could not be deserialized into a structurally valid block"); - - return Ok(submit_block::ErrorResponse::Rejected.into()); - } - }; - - let block_height = block - .coinbase_height() - .map(|height| height.0.to_string()) - .unwrap_or_else(|| "invalid coinbase height".to_string()); - let block_hash = block.hash(); - - let block_verifier_router_response = block_verifier_router - .ready() - .await - .map_err(|error| Error { - code: ErrorCode::ServerError(0), - message: error.to_string(), - data: None, - })? - .call(zebra_consensus::Request::Commit(Arc::new(block))) - .await; - - let chain_error = match block_verifier_router_response { - // Currently, this match arm returns `null` (Accepted) for blocks committed - // to any chain, but Accepted is only for blocks in the best chain. - // - // TODO (#5487): - // - Inconclusive: check if the block is on a side-chain - // The difference is important to miners, because they want to mine on the best chain. - Ok(block_hash) => { - tracing::info!(?block_hash, ?block_height, "submit block accepted"); - return Ok(submit_block::Response::Accepted); - } - - // Turns BoxError into Result, - // by downcasting from Any to VerifyChainError. - Err(box_error) => { - let error = box_error - .downcast::() - .map(|boxed_chain_error| *boxed_chain_error); - - tracing::info!(?error, ?block_hash, ?block_height, "submit block failed verification"); - - error - } - }; - - let response = match chain_error { - Ok(source) if source.is_duplicate_request() => { - submit_block::ErrorResponse::Duplicate - } - - // Currently, these match arms return Reject for the older duplicate in a queue, - // but queued duplicates should be DuplicateInconclusive. - // - // Optional TODO (#5487): - // - DuplicateInconclusive: turn these non-finalized state duplicate block errors - // into BlockError enum variants, and handle them as DuplicateInconclusive: - // - "block already sent to be committed to the state" - // - "replaced by newer request" - // - keep the older request in the queue, - // and return a duplicate error for the newer request immediately. - // This improves the speed of the RPC response. - // - // Checking the download queues and BlockVerifierRouter buffer for duplicates - // might require architectural changes to Zebra, so we should only do it - // if mining pools really need it. - Ok(_verify_chain_error) => submit_block::ErrorResponse::Rejected, - - // This match arm is currently unreachable, but if future changes add extra error types, - // we want to turn them into `Rejected`. - Err(_unknown_error_type) => submit_block::ErrorResponse::Rejected, - }; - - Ok(response.into()) - } - .boxed() - } - - fn get_mining_info(&self) -> BoxFuture> { - let network = self.network.clone(); - let mut state = self.state.clone(); - - let chain_tip = self.latest_chain_tip.clone(); - let tip_height = chain_tip.best_tip_height().unwrap_or(Height(0)).0; - - let mut current_block_tx = None; - if tip_height > 0 { - let mined_tx_ids = chain_tip.best_tip_mined_transaction_ids(); - current_block_tx = - (!mined_tx_ids.is_empty()).then(|| mined_tx_ids.len().saturating_sub(1)); - } - - let solution_rate_fut = self.get_network_sol_ps(None, None); - async move { - // Get the current block size. - let mut current_block_size = None; - if tip_height > 0 { - let request = zebra_state::ReadRequest::TipBlockSize; - let response: zebra_state::ReadResponse = state - .ready() - .and_then(|service| service.call(request)) - .await - .map_server_error()?; - current_block_size = match response { - zebra_state::ReadResponse::TipBlockSize(Some(block_size)) => Some(block_size), - _ => None, - }; - } - - Ok(get_mining_info::Response::new( - tip_height, - current_block_size, - current_block_tx, - network, - solution_rate_fut.await?, - )) - } - .boxed() - } - - fn get_network_sol_ps( - &self, - num_blocks: Option, - height: Option, - ) -> BoxFuture> { - // Default number of blocks is 120 if not supplied. - let mut num_blocks = num_blocks.unwrap_or(DEFAULT_SOLUTION_RATE_WINDOW_SIZE); - // But if it is 0 or negative, it uses the proof of work averaging window. - if num_blocks < 1 { - num_blocks = i32::try_from(POW_AVERAGING_WINDOW).expect("fits in i32"); - } - let num_blocks = - usize::try_from(num_blocks).expect("just checked for negatives, i32 fits in usize"); - - // Default height is the tip height if not supplied. Negative values also mean the tip - // height. Since negative values aren't valid heights, we can just use the conversion. - let height = height.and_then(|height| height.try_into_height().ok()); - - let mut state = self.state.clone(); - - async move { - let request = ReadRequest::SolutionRate { num_blocks, height }; - - let response = state - .ready() - .and_then(|service| service.call(request)) - .await - .map_err(|error| Error { - code: ErrorCode::ServerError(0), - message: error.to_string(), - data: None, - })?; - - let solution_rate = match response { - // zcashd returns a 0 rate when the calculation is invalid - ReadResponse::SolutionRate(solution_rate) => solution_rate.unwrap_or(0), - - _ => unreachable!("unmatched response to a solution rate request"), - }; - - Ok(solution_rate - .try_into() - .expect("per-second solution rate always fits in u64")) - } - .boxed() - } - - fn get_peer_info(&self) -> BoxFuture>> { - let address_book = self.address_book.clone(); - async move { - Ok(address_book - .recently_live_peers(chrono::Utc::now()) - .into_iter() - .map(PeerInfo::from) - .collect()) - } - .boxed() - } - - fn validate_address( - &self, - raw_address: String, - ) -> BoxFuture> { - let network = self.network.clone(); - - async move { - let Ok(address) = raw_address - .parse::() else { - return Ok(validate_address::Response::invalid()); - }; - - let address = match address - .convert::() { - Ok(address) => address, - Err(err) => { - tracing::debug!(?err, "conversion error"); - return Ok(validate_address::Response::invalid()); - } - }; - - // we want to match zcashd's behaviour - if !address.is_transparent() { - return Ok(validate_address::Response::invalid()); - } - - if address.network() == network.kind() { - Ok(validate_address::Response { - address: Some(raw_address), - is_valid: true, - is_script: Some(address.is_script_hash()), - }) - } else { - tracing::info!( - ?network, - address_network = ?address.network(), - "invalid address in validateaddress RPC: Zebra's configured network must match address network" - ); - - Ok(validate_address::Response::invalid()) - } - } - .boxed() - } - - fn z_validate_address( - &self, - raw_address: String, - ) -> BoxFuture> { - let network = self.network.clone(); - - async move { - let Ok(address) = raw_address - .parse::() else { - return Ok(z_validate_address::Response::invalid()); - }; - - let address = match address - .convert::() { - Ok(address) => address, - Err(err) => { - tracing::debug!(?err, "conversion error"); - return Ok(z_validate_address::Response::invalid()); - } - }; - - if address.network() == network.kind() { - Ok(z_validate_address::Response { - is_valid: true, - address: Some(raw_address), - address_type: Some(z_validate_address::AddressType::from(&address)), - is_mine: Some(false), - }) - } else { - tracing::info!( - ?network, - address_network = ?address.network(), - "invalid address network in z_validateaddress RPC: address is for {:?} but Zebra is on {:?}", - address.network(), - network - ); - - Ok(z_validate_address::Response::invalid()) - } - } - .boxed() - } - - fn get_block_subsidy(&self, height: Option) -> BoxFuture> { - let latest_chain_tip = self.latest_chain_tip.clone(); - let network = self.network.clone(); - - async move { - let height = if let Some(height) = height { - Height(height) - } else { - best_chain_tip_height(&latest_chain_tip)? - }; - - if height < network.height_for_first_halving() { - return Err(Error { - code: ErrorCode::ServerError(0), - message: "Zebra does not support founders' reward subsidies, \ - use a block height that is after the first halving" - .into(), - data: None, - }); - } - - // Always zero for post-halving blocks - let founders = Amount::zero(); - - let total_block_subsidy = block_subsidy(height, &network).map_server_error()?; - let miner_subsidy = - miner_subsidy(height, &network, total_block_subsidy).map_server_error()?; - - let (lockbox_streams, mut funding_streams): (Vec<_>, Vec<_>) = - funding_stream_values(height, &network, total_block_subsidy) - .map_server_error()? - .into_iter() - // Separate the funding streams into deferred and non-deferred streams - .partition(|(receiver, _)| matches!(receiver, FundingStreamReceiver::Deferred)); - - let is_nu6 = NetworkUpgrade::current(&network, height) == NetworkUpgrade::Nu6; - - let [lockbox_total, funding_streams_total]: [std::result::Result< - Amount, - amount::Error, - >; 2] = [&lockbox_streams, &funding_streams] - .map(|streams| streams.iter().map(|&(_, amount)| amount).sum()); - - // Use the same funding stream order as zcashd - funding_streams.sort_by_key(|(receiver, _funding_stream)| { - ZCASHD_FUNDING_STREAM_ORDER - .iter() - .position(|zcashd_receiver| zcashd_receiver == receiver) - }); - - // Format the funding streams and lockbox streams - let [funding_streams, lockbox_streams]: [Vec<_>; 2] = - [funding_streams, lockbox_streams].map(|streams| { - streams - .into_iter() - .map(|(receiver, value)| { - let address = funding_stream_address(height, &network, receiver); - FundingStream::new(is_nu6, receiver, value, address) - }) - .collect() - }); - - Ok(BlockSubsidy { - miner: miner_subsidy.into(), - founders: founders.into(), - funding_streams, - lockbox_streams, - funding_streams_total: funding_streams_total.map_server_error()?.into(), - lockbox_total: lockbox_total.map_server_error()?.into(), - total_block_subsidy: total_block_subsidy.into(), - }) - } - .boxed() - } - - fn get_difficulty(&self) -> BoxFuture> { - let network = self.network.clone(); - let mut state = self.state.clone(); - - async move { - let request = ReadRequest::ChainInfo; - - // # TODO - // - add a separate request like BestChainNextMedianTimePast, but skipping the - // consistency check, because any block's difficulty is ok for display - // - return 1.0 for a "not enough blocks in the state" error, like `zcashd`: - // - let response = state - .ready() - .and_then(|service| service.call(request)) - .await - .map_err(|error| Error { - code: ErrorCode::ServerError(0), - message: error.to_string(), - data: None, - })?; - - let chain_info = match response { - ReadResponse::ChainInfo(info) => info, - _ => unreachable!("unmatched response to a chain info request"), - }; - - // This RPC is typically used for display purposes, so it is not consensus-critical. - // But it uses the difficulty consensus rules for its calculations. - // - // Consensus: - // https://zips.z.cash/protocol/protocol.pdf#nbits - // - // The zcashd implementation performs to_expanded() on f64, - // and then does an inverse division: - // https://github.com/zcash/zcash/blob/d6e2fada844373a8554ee085418e68de4b593a6c/src/rpc/blockchain.cpp#L46-L73 - // - // But in Zebra we divide the high 128 bits of each expanded difficulty. This gives - // a similar result, because the lower 128 bits are insignificant after conversion - // to `f64` with a 53-bit mantissa. - // - // `pow_limit >> 128 / difficulty >> 128` is the same as the work calculation - // `(2^256 / pow_limit) / (2^256 / difficulty)`, but it's a bit more accurate. - // - // To simplify the calculation, we don't scale for leading zeroes. (Bitcoin's - // difficulty currently uses 68 bits, so even it would still have full precision - // using this calculation.) - - // Get expanded difficulties (256 bits), these are the inverse of the work - let pow_limit: U256 = network.target_difficulty_limit().into(); - let difficulty: U256 = chain_info - .expected_difficulty - .to_expanded() - .expect("valid blocks have valid difficulties") - .into(); - - // Shift out the lower 128 bits (256 bits, but the top 128 are all zeroes) - let pow_limit = pow_limit >> 128; - let difficulty = difficulty >> 128; - - // Convert to u128 then f64. - // We could also convert U256 to String, then parse as f64, but that's slower. - let pow_limit = pow_limit.as_u128() as f64; - let difficulty = difficulty.as_u128() as f64; - - // Invert the division to give approximately: `work(difficulty) / work(pow_limit)` - Ok(pow_limit / difficulty) - } - .boxed() - } - - fn z_list_unified_receivers( - &self, - address: String, - ) -> BoxFuture> { - use zcash_address::unified::Container; - - async move { - let (network, unified_address): ( - zcash_protocol::consensus::NetworkType, - zcash_address::unified::Address, - ) = zcash_address::unified::Encoding::decode(address.clone().as_str()).map_err( - |error| Error { - code: ErrorCode::ServerError(0), - message: error.to_string(), - data: None, - }, - )?; - - let mut p2pkh = String::new(); - let mut p2sh = String::new(); - let mut orchard = String::new(); - let mut sapling = String::new(); - - for item in unified_address.items() { - match item { - zcash_address::unified::Receiver::Orchard(_data) => { - let addr = zcash_address::unified::Address::try_from_items(vec![item]) - .expect("using data already decoded as valid"); - orchard = addr.encode(&network); - } - zcash_address::unified::Receiver::Sapling(data) => { - let addr = - zebra_chain::primitives::Address::try_from_sapling(network, data) - .expect("using data already decoded as valid"); - sapling = addr.payment_address().unwrap_or_default(); - } - zcash_address::unified::Receiver::P2pkh(data) => { - let addr = zebra_chain::primitives::Address::try_from_transparent_p2pkh( - network, data, - ) - .expect("using data already decoded as valid"); - p2pkh = addr.payment_address().unwrap_or_default(); - } - zcash_address::unified::Receiver::P2sh(data) => { - let addr = zebra_chain::primitives::Address::try_from_transparent_p2sh( - network, data, - ) - .expect("using data already decoded as valid"); - p2sh = addr.payment_address().unwrap_or_default(); - } - _ => (), - } - } - - Ok(unified_address::Response::new( - orchard, sapling, p2pkh, p2sh, - )) - } - .boxed() - } - - fn generate(&self, num_blocks: u32) -> BoxFuture>> { - let rpc: GetBlockTemplateRpcImpl< - Mempool, - State, - Tip, - BlockVerifierRouter, - SyncStatus, - AddressBook, - > = self.clone(); - let network = self.network.clone(); - - async move { - if !network.is_regtest() { - return Err(Error { - code: ErrorCode::ServerError(0), - message: "generate is only supported on regtest".to_string(), - data: None, - }); - } - - let mut block_hashes = Vec::new(); - for _ in 0..num_blocks { - let block_template = rpc.get_block_template(None).await.map_server_error()?; - - let get_block_template::Response::TemplateMode(block_template) = block_template - else { - return Err(Error { - code: ErrorCode::ServerError(0), - message: "error generating block template".to_string(), - data: None, - }); - }; - - let proposal_block = proposal_block_from_template( - &block_template, - TimeSource::CurTime, - NetworkUpgrade::current(&network, Height(block_template.height)), - ) - .map_server_error()?; - let hex_proposal_block = - HexData(proposal_block.zcash_serialize_to_vec().map_server_error()?); - - let _submit = rpc - .submit_block(hex_proposal_block, None) - .await - .map_server_error()?; - - block_hashes.push(GetBlockHash(proposal_block.hash())); - } - - Ok(block_hashes) - } - .boxed() - } -} - -// Put support functions in a submodule, to keep this file small. diff --git a/zebra-rpc/src/methods/tests/snapshots/get_blockchain_info@mainnet_10.snap b/zebra-rpc/src/methods/tests/snapshots/get_blockchain_info@mainnet_10.snap index 5140c1d30db..54b0a2c2860 100644 --- a/zebra-rpc/src/methods/tests/snapshots/get_blockchain_info@mainnet_10.snap +++ b/zebra-rpc/src/methods/tests/snapshots/get_blockchain_info@mainnet_10.snap @@ -1,6 +1,6 @@ --- source: zebra-rpc/src/methods/tests/snapshot.rs -assertion_line: 562 +assertion_line: 689 expression: info --- { @@ -87,11 +87,6 @@ expression: info "name": "NU6", "activationheight": 2726400, "status": "pending" - }, - "77190ad8": { - "name": "NU7", - "activationheight": 3111000, - "status": "pending" } }, "consensus": { diff --git a/zebra-rpc/src/methods/tests/snapshots/get_blockchain_info@testnet_10.snap b/zebra-rpc/src/methods/tests/snapshots/get_blockchain_info@testnet_10.snap index e3039e52d82..b3d4d7c3207 100644 --- a/zebra-rpc/src/methods/tests/snapshots/get_blockchain_info@testnet_10.snap +++ b/zebra-rpc/src/methods/tests/snapshots/get_blockchain_info@testnet_10.snap @@ -1,6 +1,6 @@ --- source: zebra-rpc/src/methods/tests/snapshot.rs -assertion_line: 562 +assertion_line: 689 expression: info --- { @@ -87,11 +87,6 @@ expression: info "name": "NU6", "activationheight": 2976000, "status": "pending" - }, - "77190ad8": { - "name": "NU7", - "activationheight": 3222000, - "status": "pending" } }, "consensus": { diff --git a/zebra-rpc/src/methods/types/get_block_template/proposal.rs b/zebra-rpc/src/methods/types/get_block_template/proposal.rs index 1ba3dc83e55..4837f6fe1d8 100644 --- a/zebra-rpc/src/methods/types/get_block_template/proposal.rs +++ b/zebra-rpc/src/methods/types/get_block_template/proposal.rs @@ -210,23 +210,10 @@ pub fn proposal_block_from_template( transactions.push(tx_template.data.as_ref().zcash_deserialize_into()?); } -<<<<<<< HEAD:zebra-rpc/src/methods/get_block_template_rpcs/types/get_block_template/proposal.rs - let commitment_bytes = match network_upgrade { - NetworkUpgrade::Genesis - | NetworkUpgrade::BeforeOverwinter - | NetworkUpgrade::Overwinter - | NetworkUpgrade::Sapling - | NetworkUpgrade::Blossom - | NetworkUpgrade::Heartwood => panic!("pre-Canopy block templates not supported"), - NetworkUpgrade::Canopy => chain_history_root.bytes_in_serialized_order().into(), - NetworkUpgrade::Nu5 | NetworkUpgrade::Nu6 | NetworkUpgrade::Nu7 => { - block_commitments_hash.bytes_in_serialized_order().into() -======= let commitment_bytes = match NetworkUpgrade::current(network, height) { NetworkUpgrade::Canopy => chain_history_root.bytes_in_serialized_order(), NetworkUpgrade::Nu5 | NetworkUpgrade::Nu6 | NetworkUpgrade::Nu6_1 | NetworkUpgrade::Nu7 => { block_commitments_hash.bytes_in_serialized_order() ->>>>>>> zcash-v2.4.2:zebra-rpc/src/methods/types/get_block_template/proposal.rs } _ => Err(SerializationError::Parse( "Zebra does not support generating pre-Canopy block templates", diff --git a/zebra-rpc/src/methods/types/get_block_template/zip317/tests.rs b/zebra-rpc/src/methods/types/get_block_template/zip317/tests.rs index ebef49edbe5..afab0921ca1 100644 --- a/zebra-rpc/src/methods/types/get_block_template/zip317/tests.rs +++ b/zebra-rpc/src/methods/types/get_block_template/zip317/tests.rs @@ -1,9 +1,14 @@ //! Tests for ZIP-317 transaction selection for block template production -use zcash_address::TryFromRawAddress; +use zcash_address::TryFromAddress; use zcash_keys::address::Address; -use zebra_chain::{block::Height, parameters::Network, transaction, transparent::OutPoint}; +use zebra_chain::{ + block::Height, + parameters::{Network, NetworkKind}, + transaction, + transparent::OutPoint, +}; use zebra_node_services::mempool::TransactionDependencies; use super::select_mempool_transactions; @@ -14,8 +19,10 @@ fn excludes_tx_with_unselected_dependencies() { let next_block_height = Height(1_000_000); let extra_coinbase_data = Vec::new(); let mut mempool_tx_deps = TransactionDependencies::default(); + // FIXME: is this a correct change (try_from_raw_transparent_p2pkh to try_from_transparent_p2pkh)? let miner_address = - Address::try_from_raw_transparent_p2pkh([0x7e; 20]).expect("should be a valid address"); + Address::try_from_transparent_p2pkh(NetworkKind::from(network.clone()).into(), [0x7e; 20]) + .expect("should be a valid address"); let unmined_tx = network .unmined_transactions_in_blocks(..) .next() @@ -45,8 +52,10 @@ fn includes_tx_with_selected_dependencies() { let network = Network::Mainnet; let next_block_height = Height(1_000_000); let unmined_txs: Vec<_> = network.unmined_transactions_in_blocks(..).take(3).collect(); + // FIXME: is this a correct change (try_from_raw_transparent_p2pkh to try_from_transparent_p2pkh)? let miner_address = - Address::try_from_raw_transparent_p2pkh([0x7e; 20]).expect("should be a valid address"); + Address::try_from_transparent_p2pkh(NetworkKind::from(network.clone()).into(), [0x7e; 20]) + .expect("should be a valid address"); let dependent_tx1 = unmined_txs.first().expect("should have 3 txns"); let dependent_tx2 = unmined_txs.get(1).expect("should have 3 txns"); diff --git a/zebra-rpc/src/methods/types/transaction.rs b/zebra-rpc/src/methods/types/transaction.rs index 70d38b7a002..69b7f15b661 100644 --- a/zebra-rpc/src/methods/types/transaction.rs +++ b/zebra-rpc/src/methods/types/transaction.rs @@ -11,6 +11,7 @@ use hex::ToHex; use zebra_chain::{ amount::{self, Amount, NegativeOrZero, NonNegative}, block::{self, merkle::AUTH_DIGEST_PLACEHOLDER, Height}, + orchard::{self, ShieldedDataFlavor}, parameters::Network, primitives::ed25519, sapling::NotSmallOrderValueCommitment, @@ -216,6 +217,7 @@ pub struct TransactionObject { #[getter(copy)] pub(crate) joinsplit_sig: Option<[u8; ed25519::Signature::BYTE_SIZE]>, + // TODO: Consider also adding pub(crate) orchard_zsa_issue: Option /// Orchard actions of the transaction. #[serde(rename = "orchard", skip_serializing_if = "Option::is_none")] pub(crate) orchard: Option, @@ -468,8 +470,8 @@ pub struct OrchardAction { #[serde(rename = "ephemeralKey", with = "hex")] ephemeral_key: [u8; 32], /// The output note encrypted to the recipient. - #[serde(rename = "encCiphertext", with = "arrayhex")] - enc_ciphertext: [u8; 580], + #[serde(rename = "encCiphertext")] + enc_ciphertext: Vec, /// A ciphertext enabling the sender to recover the output note. #[serde(rename = "spendAuthSig", with = "hex")] spend_auth_sig: [u8; 64], @@ -478,6 +480,32 @@ pub struct OrchardAction { out_ciphertext: [u8; 80], } +impl<'a, Flavor: ShieldedDataFlavor> From<&'a orchard::AuthorizedAction> for OrchardAction { + fn from(authorized_action: &'a orchard::AuthorizedAction) -> Self { + let action = &authorized_action.action; + + let cv: [u8; 32] = action.cv.into(); + let nullifier: [u8; 32] = action.nullifier.into(); + let rk: [u8; 32] = action.rk.into(); + let cm_x: [u8; 32] = action.cm_x.into(); + let ephemeral_key: [u8; 32] = action.ephemeral_key.into(); + let enc_ciphertext = action.enc_ciphertext.as_ref().to_vec(); + let spend_auth_sig: [u8; 64] = authorized_action.spend_auth_sig.into(); + let out_ciphertext: [u8; 80] = action.out_ciphertext.into(); + + OrchardAction { + cv, + nullifier, + rk, + cm_x, + ephemeral_key, + enc_ciphertext, + spend_auth_sig, + out_ciphertext, + } + } +} + impl Default for TransactionObject { fn default() -> Self { Self { @@ -636,47 +664,37 @@ impl TransactionObject { orchard: if !tx.has_orchard_shielded_data() { None } else { + let mut actions = Vec::new(); + + match &*tx { + // Do nothing for non V5/V6 transactions as they don't contain orchard actions + Transaction::V1 { .. } + | Transaction::V2 { .. } + | Transaction::V3 { .. } + | Transaction::V4 { .. } => {} + + Transaction::V5 { + orchard_shielded_data, + .. + } => actions.extend( + orchard_shielded_data + .iter() + .flat_map(|shielded_data| shielded_data.actions.iter()) + .map(|action| action.into()), + ), + Transaction::V6 { + orchard_shielded_data, + .. + } => actions.extend( + orchard_shielded_data + .iter() + .flat_map(|shielded_data| shielded_data.actions.iter()) + .map(|action| action.into()), + ), + } + Some(Orchard { - actions: tx - .orchard_actions() - .collect::>() - .iter() - .map(|action| { - let spend_auth_sig: [u8; 64] = tx - .orchard_shielded_data() - .and_then(|shielded_data| { - shielded_data - .actions - .iter() - .find(|authorized_action| { - authorized_action.action == **action - }) - .map(|authorized_action| { - authorized_action.spend_auth_sig.into() - }) - }) - .unwrap_or([0; 64]); - - let cv: [u8; 32] = action.cv.into(); - let nullifier: [u8; 32] = action.nullifier.into(); - let rk: [u8; 32] = action.rk.into(); - let cm_x: [u8; 32] = action.cm_x.into(); - let ephemeral_key: [u8; 32] = action.ephemeral_key.into(); - let enc_ciphertext: [u8; 580] = action.enc_ciphertext.into(); - let out_ciphertext: [u8; 80] = action.out_ciphertext.into(); - - OrchardAction { - cv, - nullifier, - rk, - cm_x, - ephemeral_key, - enc_ciphertext, - spend_auth_sig, - out_ciphertext, - } - }) - .collect(), + actions, value_balance: Zec::from(tx.orchard_value_balance().orchard_amount()) .lossy_zec(), value_balance_zat: tx.orchard_value_balance().orchard_amount().zatoshis(), diff --git a/zebra-rpc/tests/serialization_tests.rs b/zebra-rpc/tests/serialization_tests.rs index eae2cfb985a..ccc9d5e4324 100644 --- a/zebra-rpc/tests/serialization_tests.rs +++ b/zebra-rpc/tests/serialization_tests.rs @@ -730,7 +730,7 @@ fn test_get_raw_transaction_true() -> Result<(), Box> { let rk = action.rk(); let cm_x = action.cm_x(); let ephemeral_key = action.ephemeral_key(); - let enc_ciphertext = action.enc_ciphertext(); + let enc_ciphertext = action.enc_ciphertext().clone(); let spend_auth_sig = action.spend_auth_sig(); let out_ciphertext = action.out_ciphertext(); OrchardAction::new( diff --git a/zebra-scan/Cargo.toml b/zebra-scan/Cargo.toml deleted file mode 100644 index 22164f2e0f8..00000000000 --- a/zebra-scan/Cargo.toml +++ /dev/null @@ -1,131 +0,0 @@ -[package] -name = "zebra-scan" -version = "0.1.0-alpha.10" -authors = ["Zcash Foundation "] -description = "Shielded transaction scanner for the Zcash blockchain" -license = "MIT OR Apache-2.0" -repository = "https://github.com/ZcashFoundation/zebra" -edition = "2021" - -readme = "../README.md" -homepage = "https://zfnd.org/zebra/" -# crates.io is limited to 5 keywords and categories -keywords = ["zebra", "zcash"] -# Must be one of -categories = ["cryptography::cryptocurrencies"] - -[[bin]] # Bin to run the Scanner gRPC server -name = "scanner-grpc-server" -path = "src/bin/rpc_server.rs" -required-features = ["proptest-impl"] - -[[bin]] # Bin to run the Scanner tool -name = "zebra-scanner" -path = "src/bin/scanner/main.rs" - -[[bin]] -name = "scanning-results-reader" -path = "src/bin/scanning-results-reader/main.rs" -required-features = ["results-reader"] - -[[bin]] # Bin to run zebrad, used in scanner tests -name = "zebrad-for-scanner" -path = "src/bin/zebrad-for-scanner/main.rs" - -[features] - -# Production features that activate extra dependencies, or extra features in dependencies - -# Test features - -proptest-impl = [ - "proptest", - "proptest-derive", - "zebra-state/proptest-impl", - "zebra-chain/proptest-impl", - "zebra-test", - "bls12_381", - "ff", - "group", - "jubjub", - "rand", - "zcash_note_encryption", -] - -# Needed for the zebra-scanner binary. -results-reader = [ - "jsonrpc", - "hex" -] - -[dependencies] - -color-eyre = "0.6.3" -indexmap = { version = "2.6.0", features = ["serde"] } -itertools = "0.13.0" -semver = "1.0.23" -serde = { version = "1.0.211", features = ["serde_derive"] } -tokio = { version = "1.41.0", features = ["time"] } -tower = "0.4.13" -tracing = "0.1.39" -futures = "0.3.31" - -# ECC dependencies. -zcash_client_backend.workspace = true -zcash_keys = { workspace = true, features = ["sapling"] } -zcash_primitives.workspace = true -zcash_protocol.workspace = true -zcash_address.workspace = true -sapling-crypto.workspace = true - -zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.41", features = ["shielded-scan"] } -zebra-state = { path = "../zebra-state", version = "1.0.0-beta.41", features = ["shielded-scan"] } -zebra-node-services = { path = "../zebra-node-services", version = "1.0.0-beta.41", features = ["shielded-scan"] } -zebra-grpc = { path = "../zebra-grpc", version = "0.1.0-alpha.8" } -zebra-rpc = { path = "../zebra-rpc", version = "1.0.0-beta.41" } - -chrono = { version = "0.4.38", default-features = false, features = ["clock", "std", "serde"] } - -# test feature proptest-impl -proptest = { version = "1.4.0", optional = true } -proptest-derive = { version = "0.5.0", optional = true } - -bls12_381 = { version = "0.8.0", optional = true } -ff = { version = "0.13.0", optional = true } -group = { version = "0.13.0", optional = true } -jubjub = { version = "0.10.0", optional = true } -rand = { version = "0.8.5", optional = true } -zcash_note_encryption = { version = "0.4.0", optional = true } - -zebra-test = { path = "../zebra-test", version = "1.0.0-beta.41", optional = true } - -# zebra-scanner binary dependencies -tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } -structopt = "0.3.26" -lazy_static = "1.4.0" -serde_json = "1.0.132" - -jsonrpc = { version = "0.18.0", optional = true } -hex = { version = "0.4.3", optional = true } - -zebrad = { path = "../zebrad", version = "2.0.0" } - -[dev-dependencies] -insta = { version = "1.40.0", features = ["ron", "redactions"] } -tokio = { version = "1.41.0", features = ["test-util"] } - -proptest = "1.4.0" -proptest-derive = "0.5.0" -bls12_381 = "0.8.0" -ff = "0.13.0" -group = "0.13.0" -jubjub = "0.10.0" -rand = "0.8.5" -tempfile = "3.13.0" -zcash_note_encryption = "0.4.0" -toml = "0.8.19" -tonic = "0.12.3" - -zebra-state = { path = "../zebra-state", version = "1.0.0-beta.41", features = ["proptest-impl"] } -zebra-test = { path = "../zebra-test", version = "1.0.0-beta.41" } - diff --git a/zebra-scan/src/bin/scanning-results-reader/main.rs b/zebra-scan/src/bin/scanning-results-reader/main.rs deleted file mode 100644 index bc6168b4fe0..00000000000 --- a/zebra-scan/src/bin/scanning-results-reader/main.rs +++ /dev/null @@ -1,107 +0,0 @@ -//! Displays Zebra's scanning results: -//! -//! 1. Opens Zebra's scanning storage and reads the results containing scanning keys and TXIDs. -//! 2. Fetches the transactions by their TXIDs from Zebra using the `getrawtransaction` RPC. -//! 3. Decrypts the tx outputs using the corresponding scanning key. -//! 4. Prints the memos in the outputs. - -use std::collections::HashMap; - -use hex::ToHex; -use jsonrpc::simple_http::SimpleHttpTransport; -use jsonrpc::Client; - -use zcash_client_backend::decrypt_transaction; -use zcash_primitives::consensus::{BlockHeight, BranchId}; -use zcash_primitives::transaction::Transaction; -use zcash_primitives::zip32::AccountId; - -use zebra_scan::scan::{dfvk_to_ufvk, sapling_key_to_dfvk}; -use zebra_scan::{storage::Storage, Config}; - -/// Prints the memos of transactions from Zebra's scanning results storage. -/// -/// Reads the results storage, iterates through all decrypted memos, and prints the them to standard -/// output. Filters out some frequent and uninteresting memos typically associated with ZECPages. -/// -/// Notes: -/// -/// - `#[allow(clippy::print_stdout)]` is set to allow usage of `println!` for displaying the memos. -/// - This function expects Zebra's RPC server to be available. -/// -/// # Panics -/// -/// When: -/// -/// - The Sapling key from the storage is not valid. -/// - There is no diversifiable full viewing key (dfvk) available. -/// - The RPC response cannot be decoded from a hex string to bytes. -/// - The transaction fetched via RPC cannot be deserialized from raw bytes. -#[allow(clippy::print_stdout)] -pub fn main() { - let network = zebra_chain::parameters::Network::Mainnet; - let zp_network = zebra_scan::scan::zp_network(&network); - let storage = Storage::new(&Config::default(), &network, true); - // If the first memo is empty, it doesn't get printed. But we never print empty memos anyway. - let mut prev_memo = "".to_owned(); - - for (key, _) in storage.sapling_keys_last_heights().iter() { - let ufvks = HashMap::from([( - AccountId::ZERO, - dfvk_to_ufvk(&sapling_key_to_dfvk(key, &network).expect("dfvk")).expect("ufvk"), - )]); - - for (height, txids) in storage.sapling_results(key) { - let height = BlockHeight::from(height.0); - - for txid in txids.iter() { - let tx = Transaction::read( - &hex::decode(fetch_tx_via_rpc(txid.encode_hex())) - .expect("RPC response should be decodable from hex string to bytes")[..], - BranchId::for_height(&zp_network, height), - ) - .expect("TX fetched via RPC should be deserializable from raw bytes"); - - for output in decrypt_transaction(&zp_network, Some(height), None, &tx, &ufvks) - .sapling_outputs() - { - let memo = memo_bytes_to_string(output.memo().as_array()); - - if !memo.is_empty() - // Filter out some uninteresting and repeating memos from ZECPages. - && !memo.contains("LIKE:") - && !memo.contains("VOTE:") - && memo != prev_memo - { - println!("{memo}\n"); - prev_memo = memo; - } - } - } - } - } -} - -/// Trims trailing zeroes from a memo, and returns the memo as a [`String`]. -fn memo_bytes_to_string(memo: &[u8; 512]) -> String { - match memo.iter().rposition(|&byte| byte != 0) { - Some(i) => String::from_utf8_lossy(&memo[..=i]).into_owned(), - None => "".to_owned(), - } -} - -/// Uses the `getrawtransaction` RPC to retrieve a transaction by its TXID. -fn fetch_tx_via_rpc(txid: String) -> String { - let client = Client::with_transport( - SimpleHttpTransport::builder() - .url("127.0.0.1:8232") - .expect("Zebra's URL should be valid") - .build(), - ); - - client - .send_request(client.build_request("getrawtransaction", Some(&jsonrpc::arg([txid])))) - .expect("Sending the `getrawtransaction` request should succeed") - .result() - .expect("Zebra's RPC response should contain a valid result") -} diff --git a/zebra-scan/src/service/scan_task/scan.rs b/zebra-scan/src/service/scan_task/scan.rs deleted file mode 100644 index 080732a5ec6..00000000000 --- a/zebra-scan/src/service/scan_task/scan.rs +++ /dev/null @@ -1,569 +0,0 @@ -//! The scanner task and scanning APIs. - -use std::{ - collections::{BTreeMap, HashMap}, - sync::Arc, - time::Duration, -}; - -use color_eyre::{eyre::eyre, Report}; -use itertools::Itertools; -use tokio::{ - sync::{mpsc::Sender, watch}, - task::JoinHandle, -}; -use tower::{Service, ServiceExt}; - -use tracing::Instrument; -use zcash_address::unified::{Encoding, Fvk, Ufvk}; -use zcash_client_backend::{ - data_api::ScannedBlock, - encoding::decode_extended_full_viewing_key, - keys::UnifiedFullViewingKey, - proto::compact_formats::{ - ChainMetadata, CompactBlock, CompactSaplingOutput, CompactSaplingSpend, CompactTx, - }, - scanning::{Nullifiers, ScanError, ScanningKeys}, -}; -use zcash_primitives::zip32::{AccountId, Scope}; - -use sapling_crypto::zip32::DiversifiableFullViewingKey; - -use zebra_chain::{ - block::{Block, Height}, - chain_tip::ChainTip, - diagnostic::task::WaitForPanics, - parameters::Network, - serialization::ZcashSerialize, - transaction::Transaction, -}; -use zebra_node_services::scan_service::response::ScanResult; -use zebra_state::{ChainTipChange, ReadStateService, SaplingScannedResult, TransactionIndex}; - -use crate::{ - service::{ScanTask, ScanTaskCommand}, - storage::{SaplingScanningKey, Storage}, -}; - -use super::executor; - -mod scan_range; - -pub use scan_range::ScanRangeTaskBuilder; - -/// The read state type used by the scanner. -pub type State = ReadStateService; - -/// Wait a few seconds at startup for some blocks to get verified. -/// -/// But sometimes the state might be empty if the network is slow. -const INITIAL_WAIT: Duration = Duration::from_secs(15); - -/// The amount of time between checking for new blocks and starting new scans. -/// -/// TODO: The current value is set to 10 so that tests don't sleep for too long and finish faster. -/// Set it to 30 after #8250 gets addressed or remove this const completely in the refactor. -pub const CHECK_INTERVAL: Duration = Duration::from_secs(10); - -/// We log an info log with progress after this many blocks. -const INFO_LOG_INTERVAL: u32 = 10_000; - -/// Start a scan task that reads blocks from `state`, scans them with the configured keys in -/// `storage`, and then writes the results to `storage`. -pub async fn start( - state: State, - chain_tip_change: ChainTipChange, - storage: Storage, - mut cmd_receiver: tokio::sync::mpsc::Receiver, -) -> Result<(), Report> { - let network = storage.network(); - let sapling_activation_height = network.sapling_activation_height(); - - info!(?network, "starting scan task"); - - // Do not scan and notify if we are below sapling activation height. - #[cfg(not(test))] - wait_for_height( - sapling_activation_height, - "Sapling activation", - state.clone(), - ) - .await?; - - // Read keys from the storage on disk, which can block async execution. - let key_storage = storage.clone(); - let key_heights = tokio::task::spawn_blocking(move || key_storage.sapling_keys_last_heights()) - .wait_for_panics() - .await; - let key_heights = Arc::new(key_heights); - - let mut height = get_min_height(&key_heights).unwrap_or(sapling_activation_height); - - info!(start_height = ?height, "got min scan height"); - - // Parse and convert keys once, then use them to scan all blocks. - // There is some cryptography here, but it should be fast even with thousands of keys. - let mut parsed_keys: HashMap = key_heights - .keys() - .map(|key| Ok::<_, Report>((key.clone(), sapling_key_to_dfvk(key, &network)?))) - .try_collect()?; - - let mut subscribed_keys: HashMap> = HashMap::new(); - - let (subscribed_keys_sender, subscribed_keys_receiver) = - tokio::sync::watch::channel(Arc::new(subscribed_keys.clone())); - - let (scan_task_sender, scan_task_executor_handle) = - executor::spawn_init(subscribed_keys_receiver.clone()); - let mut scan_task_executor_handle = Some(scan_task_executor_handle); - - // Give empty states time to verify some blocks before we start scanning. - tokio::time::sleep(INITIAL_WAIT).await; - - loop { - if let Some(handle) = scan_task_executor_handle { - if handle.is_finished() { - warn!("scan task finished unexpectedly"); - - handle.await?.map_err(|err| eyre!(err))?; - return Ok(()); - } else { - scan_task_executor_handle = Some(handle); - } - } - - let was_parsed_keys_empty = parsed_keys.is_empty(); - - let (new_keys, new_result_senders, new_result_receivers) = - ScanTask::process_messages(&mut cmd_receiver, &mut parsed_keys, &network)?; - - subscribed_keys.extend(new_result_senders); - // Drop any results senders that are closed from subscribed_keys - subscribed_keys.retain(|key, sender| !sender.is_closed() && parsed_keys.contains_key(key)); - - // Send the latest version of `subscribed_keys` before spawning the scan range task - subscribed_keys_sender - .send(Arc::new(subscribed_keys.clone())) - .expect("last receiver should not be dropped while this task is running"); - - for (result_receiver, rsp_tx) in new_result_receivers { - // Ignore send errors, we drop any closed results channels above. - let _ = rsp_tx.send(result_receiver); - } - - if !new_keys.is_empty() { - let state = state.clone(); - let storage = storage.clone(); - - let start_height = new_keys - .iter() - .map(|(_, (_, height))| *height) - .min() - .unwrap_or(sapling_activation_height); - - if was_parsed_keys_empty { - info!(?start_height, "setting new start height"); - height = start_height; - } - // Skip spawning ScanRange task if `start_height` is at or above the current height - else if start_height < height { - scan_task_sender - .send(ScanRangeTaskBuilder::new(height, new_keys, state, storage)) - .await - .expect("scan_until_task channel should not be closed"); - } - } - - if !parsed_keys.is_empty() { - let scanned_height = scan_height_and_store_results( - height, - state.clone(), - Some(chain_tip_change.clone()), - storage.clone(), - key_heights.clone(), - parsed_keys.clone(), - subscribed_keys_receiver.clone(), - ) - .await?; - - // If we've reached the tip, sleep for a while then try and get the same block. - if scanned_height.is_none() { - tokio::time::sleep(CHECK_INTERVAL).await; - continue; - } - } else { - tokio::time::sleep(CHECK_INTERVAL).await; - continue; - } - - height = height - .next() - .expect("a valid blockchain never reaches the max height"); - } -} - -/// Polls state service for tip height every [`CHECK_INTERVAL`] until the tip reaches the provided `tip_height` -pub async fn wait_for_height( - height: Height, - height_name: &'static str, - state: State, -) -> Result<(), Report> { - loop { - let tip_height = tip_height(state.clone()).await?; - if tip_height < height { - info!( - "scanner is waiting for {height_name}. Current tip: {}, {height_name}: {}", - tip_height.0, height.0 - ); - - tokio::time::sleep(CHECK_INTERVAL).await; - } else { - info!( - "scanner finished waiting for {height_name}. Current tip: {}, {height_name}: {}", - tip_height.0, height.0 - ); - - break; - } - } - - Ok(()) -} - -/// Get the block at `height` from `state`, scan it with the keys in `parsed_keys`, and store the -/// results in `storage`. If `height` is lower than the `key_birthdays` for that key, skip it. -/// -/// Returns: -/// - `Ok(Some(height))` if the height was scanned, -/// - `Ok(None)` if the height was not in the state, and -/// - `Err(error)` on fatal errors. -pub async fn scan_height_and_store_results( - height: Height, - mut state: State, - chain_tip_change: Option, - storage: Storage, - key_last_scanned_heights: Arc>, - parsed_keys: HashMap, - subscribed_keys_receiver: watch::Receiver>>>, -) -> Result, Report> { - let network = storage.network(); - - // Only log at info level every 100,000 blocks. - // - // TODO: also log progress every 5 minutes once we reach the tip? - let is_info_log = height.0 % INFO_LOG_INTERVAL == 0; - - // Get a block from the state. - // We can't use ServiceExt::oneshot() here, because it causes lifetime errors in init(). - let block = state - .ready() - .await - .map_err(|e| eyre!(e))? - .call(zebra_state::ReadRequest::Block(height.into())) - .await - .map_err(|e| eyre!(e))?; - - let block = match block { - zebra_state::ReadResponse::Block(Some(block)) => block, - zebra_state::ReadResponse::Block(None) => return Ok(None), - _ => unreachable!("unmatched response to a state::Block request"), - }; - - for (key_index_in_task, (sapling_key, _)) in parsed_keys.iter().enumerate() { - match key_last_scanned_heights.get(sapling_key) { - // Only scan what was not scanned for each key - Some(last_scanned_height) if height <= *last_scanned_height => continue, - - Some(last_scanned_height) if is_info_log => { - if let Some(chain_tip_change) = &chain_tip_change { - // # Security - // - // We can't log `sapling_key` here because it is a private viewing key. Anyone who reads - // the logs could use the key to view those transactions. - info!( - "Scanning the blockchain for key {}, started at block {:?}, now at block {:?}, current tip {:?}", - key_index_in_task, last_scanned_height.next().expect("height is not maximum").as_usize(), - height.as_usize(), - chain_tip_change.latest_chain_tip().best_tip_height().expect("we should have a tip to scan").as_usize(), - ); - } else { - info!( - "Scanning the blockchain for key {}, started at block {:?}, now at block {:?}", - key_index_in_task, last_scanned_height.next().expect("height is not maximum").as_usize(), - height.as_usize(), - ); - } - } - - _other => {} - }; - - let subscribed_keys_receiver = subscribed_keys_receiver.clone(); - - let sapling_key = sapling_key.clone(); - let block = block.clone(); - let mut storage = storage.clone(); - let network = network.clone(); - let parsed_keys = parsed_keys.clone(); - - // We use a dummy size of the Sapling note commitment tree. - // - // We can't set the size to zero, because the underlying scanning function would return - // `zcash_client_backeng::scanning::ScanError::TreeSizeUnknown`. - // - // And we can't set them close to 0, because the scanner subtracts the number of notes - // in the block, and panics with "attempt to subtract with overflow". The number of - // notes in a block must be less than this value, this is a consensus rule. - // - // TODO: use the real sapling tree size: `zs::Response::SaplingTree().position() + 1` - let sapling_tree_size = 1 << 16; - - tokio::task::spawn_blocking(move || { - // TODO: - // - Wait until https://github.com/zcash/librustzcash/pull/1400 makes it to a release. - // - Create the scanning keys outside of this thread and move them here instead. - let scanning_keys = scanning_keys(parsed_keys.values()).expect("scanning keys"); - - let scanned_block = scan_block(&network, &block, sapling_tree_size, &scanning_keys) - .map_err(|e| eyre!(e))?; - - let scanning_result = scanned_block_to_db_result(scanned_block); - - let latest_subscribed_keys = subscribed_keys_receiver.borrow().clone(); - if let Some(results_sender) = latest_subscribed_keys.get(&sapling_key).cloned() { - for (_tx_index, tx_id) in scanning_result.clone() { - // TODO: Handle `SendErrors` by dropping sender from `subscribed_keys` - let _ = results_sender.try_send(ScanResult { - key: sapling_key.clone(), - height, - tx_id: tx_id.into(), - }); - } - } - - storage.add_sapling_results(&sapling_key, height, scanning_result); - Ok::<_, Report>(()) - }) - .wait_for_panics() - .await?; - } - - Ok(Some(height)) -} - -/// Returns the transactions from `block` belonging to the given `scanning_keys`. -/// -/// # Performance / Hangs -/// -/// This method can block while reading database files, so it must be inside spawn_blocking() -/// in async code. -/// -/// TODO: -/// - Pass the real `sapling_tree_size` parameter from the state. -/// - Add other prior block metadata. -pub fn scan_block( - network: &Network, - block: &Block, - sapling_tree_size: u32, - scanning_key: &ScanningKeys, -) -> Result, ScanError> { - // TODO: Implement a check that returns early when the block height is below the Sapling - // activation height. - - let chain_metadata = ChainMetadata { - sapling_commitment_tree_size: sapling_tree_size, - // Orchard is not supported at the moment so the tree size can be 0. - orchard_commitment_tree_size: 0, - }; - - zcash_client_backend::scanning::scan_block( - &zp_network(network), - block_to_compact(block, chain_metadata), - scanning_key, - // Ignore whether notes are change from a viewer's own spends for now. - &Nullifiers::empty(), - // Ignore previous blocks for now. - None, - ) -} - -/// Converts a Zebra-format scanning key into diversifiable full viewing key. -// TODO: use `ViewingKey::parse` from zebra-chain instead -pub fn sapling_key_to_dfvk( - key: &SaplingScanningKey, - network: &Network, -) -> Result { - Ok( - decode_extended_full_viewing_key(network.sapling_efvk_hrp(), key) - .map_err(|e| eyre!(e))? - .to_diversifiable_full_viewing_key(), - ) -} - -/// Converts a zebra block and meta data into a compact block. -pub fn block_to_compact(block: &Block, chain_metadata: ChainMetadata) -> CompactBlock { - CompactBlock { - height: block - .coinbase_height() - .expect("verified block should have a valid height") - .0 - .into(), - // TODO: performance: look up the block hash from the state rather than recalculating it - hash: block.hash().bytes_in_display_order().to_vec(), - prev_hash: block - .header - .previous_block_hash - .bytes_in_display_order() - .to_vec(), - time: block - .header - .time - .timestamp() - .try_into() - .expect("unsigned 32-bit times should work until 2105"), - header: block - .header - .zcash_serialize_to_vec() - .expect("verified block should serialize"), - vtx: block - .transactions - .iter() - .cloned() - .enumerate() - .map(transaction_to_compact) - .collect(), - chain_metadata: Some(chain_metadata), - - // The protocol version is used for the gRPC wire format, so it isn't needed here. - proto_version: 0, - } -} - -/// Converts a zebra transaction into a compact transaction. -fn transaction_to_compact((index, tx): (usize, Arc)) -> CompactTx { - CompactTx { - index: index - .try_into() - .expect("tx index in block should fit in u64"), - // TODO: performance: look up the tx hash from the state rather than recalculating it - hash: tx.hash().bytes_in_display_order().to_vec(), - - // `fee` is not checked by the `scan_block` function. It is allowed to be unset. - // - fee: 0, - - spends: tx - .sapling_nullifiers() - .map(|nf| CompactSaplingSpend { - nf: <[u8; 32]>::from(*nf).to_vec(), - }) - .collect(), - - // > output encodes the cmu field, ephemeralKey field, and a 52-byte prefix of the encCiphertext field of a Sapling Output - // - // - outputs: tx - .sapling_outputs() - .map(|output| CompactSaplingOutput { - cmu: output.cm_u.to_bytes().to_vec(), - ephemeral_key: output - .ephemeral_key - .zcash_serialize_to_vec() - .expect("verified output should serialize successfully"), - ciphertext: output - .enc_ciphertext - .zcash_serialize_to_vec() - .expect("verified output should serialize successfully") - .into_iter() - .take(52) - .collect(), - }) - .collect(), - - // `actions` is not checked by the `scan_block` function. - actions: vec![], - } -} - -/// Convert a scanned block to a list of scanner database results. -fn scanned_block_to_db_result( - scanned_block: ScannedBlock, -) -> BTreeMap { - scanned_block - .transactions() - .iter() - .map(|tx| { - ( - TransactionIndex::from_usize(tx.block_index()), - SaplingScannedResult::from_bytes_in_display_order(*tx.txid().as_ref()), - ) - }) - .collect() -} - -/// Get the minimal height available in a key_heights map. -fn get_min_height(map: &HashMap) -> Option { - map.values().cloned().min() -} - -/// Get tip height or return genesis block height if no tip is available. -async fn tip_height(mut state: State) -> Result { - let tip = state - .ready() - .await - .map_err(|e| eyre!(e))? - .call(zebra_state::ReadRequest::Tip) - .await - .map_err(|e| eyre!(e))?; - - match tip { - zebra_state::ReadResponse::Tip(Some((height, _hash))) => Ok(height), - zebra_state::ReadResponse::Tip(None) => Ok(Height(0)), - _ => unreachable!("unmatched response to a state::Tip request"), - } -} - -/// Initialize the scanner based on its config, and spawn a task for it. -/// -/// TODO: add a test for this function. -pub fn spawn_init( - storage: Storage, - state: State, - chain_tip_change: ChainTipChange, - cmd_receiver: tokio::sync::mpsc::Receiver, -) -> JoinHandle> { - tokio::spawn(start(state, chain_tip_change, storage, cmd_receiver).in_current_span()) -} - -/// Turns an iterator of [`DiversifiableFullViewingKey`]s to [`ScanningKeys`]. -pub fn scanning_keys<'a>( - dfvks: impl IntoIterator, -) -> Result, Report> { - dfvks - .into_iter() - .enumerate() - .map(|(i, dfvk)| { - let account = AccountId::try_from(u32::try_from(i)?) - .map_err(|e| eyre!("Invalid AccountId: {:?}", e))?; - Ok((account, dfvk_to_ufvk(dfvk)?)) - }) - .try_collect::<(_, _), Vec<(_, _)>, _>() - .map(ScanningKeys::from_account_ufvks) -} - -/// Turns a [`DiversifiableFullViewingKey`] to [`UnifiedFullViewingKey`]. -pub fn dfvk_to_ufvk(dfvk: &DiversifiableFullViewingKey) -> Result { - UnifiedFullViewingKey::parse(&Ufvk::try_from_items(vec![Fvk::try_from(( - 2, - &dfvk.to_bytes()[..], - ))?])?) - .map_err(|e| eyre!(e)) -} - -/// Returns the [`zcash_primitives::consensus::Network`] for this network. -pub fn zp_network(network: &Network) -> zcash_primitives::consensus::Network { - match network { - Network::Mainnet => zcash_primitives::consensus::Network::MainNetwork, - Network::Testnet(_) => zcash_primitives::consensus::Network::TestNetwork, - } -} diff --git a/zebra-scan/src/tests.rs b/zebra-scan/src/tests.rs deleted file mode 100644 index 92e9d4d45c2..00000000000 --- a/zebra-scan/src/tests.rs +++ /dev/null @@ -1,357 +0,0 @@ -//! scanning functionality. -//! -//! This tests belong to the proof of concept stage of the external wallet support functionality. - -use std::sync::Arc; - -use chrono::{DateTime, Utc}; - -use color_eyre::{Report, Result}; -use ff::{Field, PrimeField}; -use group::GroupEncoding; -use rand::{rngs::OsRng, thread_rng, RngCore}; - -use zcash_client_backend::{ - encoding::encode_extended_full_viewing_key, - proto::compact_formats::{ - ChainMetadata, CompactBlock, CompactSaplingOutput, CompactSaplingSpend, CompactTx, - }, -}; -use zcash_note_encryption::Domain; -use zcash_primitives::{block::BlockHash, consensus::BlockHeight, memo::MemoBytes}; - -use sapling_crypto::{ - constants::SPENDING_KEY_GENERATOR, - note_encryption::{sapling_note_encryption, SaplingDomain}, - util::generate_random_rseed, - value::NoteValue, - zip32, Note, Nullifier, -}; - -use zebra_chain::{ - amount::{Amount, NegativeAllowed}, - block::{self, merkle, Block, Header, Height}, - fmt::HexDebug, - parameters::Network, - primitives::{redjubjub, Groth16Proof}, - sapling::{self, PerSpendAnchor, Spend, TransferData}, - serialization::AtLeastOne, - transaction::{LockTime, Transaction}, - transparent::{CoinbaseData, Input}, - work::{difficulty::CompactDifficulty, equihash::Solution}, -}; -use zebra_state::SaplingScanningKey; - -#[cfg(test)] -mod vectors; - -/// The extended Sapling viewing key of [ZECpages](https://zecpages.com/boardinfo) -pub const ZECPAGES_SAPLING_VIEWING_KEY: &str = "zxviews1q0duytgcqqqqpqre26wkl45gvwwwd706xw608hucmvfalr759ejwf7qshjf5r9aa7323zulvz6plhttp5mltqcgs9t039cx2d09mgq05ts63n8u35hyv6h9nc9ctqqtue2u7cer2mqegunuulq2luhq3ywjcz35yyljewa4mgkgjzyfwh6fr6jd0dzd44ghk0nxdv2hnv4j5nxfwv24rwdmgllhe0p8568sgqt9ckt02v2kxf5ahtql6s0ltjpkckw8gtymxtxuu9gcr0swvz"; - -/// A fake viewing key in an incorrect format. -pub const FAKE_SAPLING_VIEWING_KEY: &str = "zxviewsfake"; - -/// Generates `num_keys` of [`SaplingScanningKey`]s for tests for the given [`Network`]. -/// -/// The keys are seeded only from their index in the returned `Vec`, so repeated calls return same -/// keys at a particular index. -pub fn mock_sapling_scanning_keys(num_keys: u8, network: &Network) -> Vec { - let mut keys: Vec = vec![]; - - for seed in 0..num_keys { - keys.push(encode_extended_full_viewing_key( - network.sapling_efvk_hrp(), - &mock_sapling_efvk(&[seed]), - )); - } - - keys -} - -/// Generates an [`zip32::ExtendedFullViewingKey`] from `seed` for tests. -#[allow(deprecated)] -pub fn mock_sapling_efvk(seed: &[u8]) -> zip32::ExtendedFullViewingKey { - // TODO: Use `to_diversifiable_full_viewing_key` since `to_extended_full_viewing_key` is - // deprecated. - zip32::ExtendedSpendingKey::master(seed).to_extended_full_viewing_key() -} - -/// Generates a fake block containing a Sapling output decryptable by `dfvk`. -/// -/// The fake block has the following transactions in this order: -/// 1. a transparent coinbase tx, -/// 2. a V4 tx containing a random Sapling output, -/// 3. a V4 tx containing a Sapling output decryptable by `dfvk`, -/// 4. depending on the value of `tx_after`, another V4 tx containing a random Sapling output. -pub fn fake_block( - height: BlockHeight, - nf: Nullifier, - dfvk: &zip32::DiversifiableFullViewingKey, - value: u64, - tx_after: bool, - initial_sapling_tree_size: Option, -) -> (Block, u32) { - let header = Header { - version: 4, - previous_block_hash: block::Hash::default(), - merkle_root: merkle::Root::default(), - commitment_bytes: HexDebug::default(), - time: DateTime::::default(), - difficulty_threshold: CompactDifficulty::default(), - nonce: HexDebug::default(), - solution: Solution::default(), - }; - - let block = fake_compact_block( - height, - BlockHash([0; 32]), - nf, - dfvk, - value, - tx_after, - initial_sapling_tree_size, - ); - - let mut transactions: Vec> = block - .vtx - .iter() - .map(|tx| compact_to_v4(tx).expect("A fake compact tx should be convertible to V4.")) - .map(Arc::new) - .collect(); - - let coinbase_input = Input::Coinbase { - height: Height(1), - data: CoinbaseData::new(vec![]), - sequence: u32::MAX, - }; - - let coinbase = Transaction::V4 { - inputs: vec![coinbase_input], - outputs: vec![], - lock_time: LockTime::Height(Height(1)), - expiry_height: Height(1), - joinsplit_data: None, - sapling_shielded_data: None, - }; - - transactions.insert(0, Arc::new(coinbase)); - - let sapling_tree_size = block - .chain_metadata - .as_ref() - .unwrap() - .sapling_commitment_tree_size; - - ( - Block { - header: Arc::new(header), - transactions, - }, - sapling_tree_size, - ) -} - -/// Create a fake compact block with provided fake account data. -// This is a copy of zcash_primitives `fake_compact_block` where the `value` argument was changed to -// be a number for easier conversion: -// https://github.com/zcash/librustzcash/blob/zcash_primitives-0.13.0/zcash_client_backend/src/scanning.rs#L635 -// We need to copy because this is a test private function upstream. -pub fn fake_compact_block( - height: BlockHeight, - prev_hash: BlockHash, - nf: Nullifier, - dfvk: &zip32::DiversifiableFullViewingKey, - value: u64, - tx_after: bool, - initial_sapling_tree_size: Option, -) -> CompactBlock { - let to = dfvk.default_address().1; - - // Create a fake Note for the account - let mut rng = OsRng; - let rseed = generate_random_rseed( - ::sapling_crypto::note_encryption::Zip212Enforcement::Off, - &mut rng, - ); - - let note = Note::from_parts(to, NoteValue::from_raw(value), rseed); - let encryptor = sapling_note_encryption::<_>( - Some(dfvk.fvk().ovk), - note.clone(), - *MemoBytes::empty().as_array(), - &mut rng, - ); - let cmu = note.cmu().to_bytes().to_vec(); - let ephemeral_key = SaplingDomain::epk_bytes(encryptor.epk()).0.to_vec(); - let enc_ciphertext = encryptor.encrypt_note_plaintext(); - - // Create a fake CompactBlock containing the note - let mut cb = CompactBlock { - hash: { - let mut hash = vec![0; 32]; - rng.fill_bytes(&mut hash); - hash - }, - prev_hash: prev_hash.0.to_vec(), - height: height.into(), - ..Default::default() - }; - - // Add a random Sapling tx before ours - { - let mut tx = random_compact_tx(&mut rng); - tx.index = cb.vtx.len() as u64; - cb.vtx.push(tx); - } - - let cspend = CompactSaplingSpend { nf: nf.0.to_vec() }; - let cout = CompactSaplingOutput { - cmu, - ephemeral_key, - ciphertext: enc_ciphertext.as_ref()[..52].to_vec(), - }; - let mut ctx = CompactTx::default(); - let mut txid = vec![0; 32]; - rng.fill_bytes(&mut txid); - ctx.hash = txid; - ctx.spends.push(cspend); - ctx.outputs.push(cout); - ctx.index = cb.vtx.len() as u64; - cb.vtx.push(ctx); - - // Optionally add another random Sapling tx after ours - if tx_after { - let mut tx = random_compact_tx(&mut rng); - tx.index = cb.vtx.len() as u64; - cb.vtx.push(tx); - } - - cb.chain_metadata = initial_sapling_tree_size.map(|s| ChainMetadata { - sapling_commitment_tree_size: s + cb - .vtx - .iter() - .map(|tx| tx.outputs.len() as u32) - .sum::(), - ..Default::default() - }); - - cb -} - -/// Create a random compact transaction. -// This is an exact copy of `zcash_client_backend::scanning::random_compact_tx`: -// https://github.com/zcash/librustzcash/blob/zcash_primitives-0.13.0/zcash_client_backend/src/scanning.rs#L597 -// We need to copy because this is a test private function upstream. -pub fn random_compact_tx(mut rng: impl RngCore) -> CompactTx { - let fake_nf = { - let mut nf = vec![0; 32]; - rng.fill_bytes(&mut nf); - nf - }; - let fake_cmu = { - let fake_cmu = bls12_381::Scalar::random(&mut rng); - fake_cmu.to_repr().to_vec() - }; - let fake_epk = { - let mut buffer = [0; 64]; - rng.fill_bytes(&mut buffer); - let fake_esk = jubjub::Fr::from_bytes_wide(&buffer); - let fake_epk = SPENDING_KEY_GENERATOR * fake_esk; - fake_epk.to_bytes().to_vec() - }; - let cspend = CompactSaplingSpend { nf: fake_nf }; - let cout = CompactSaplingOutput { - cmu: fake_cmu, - ephemeral_key: fake_epk, - ciphertext: vec![0; 52], - }; - let mut ctx = CompactTx::default(); - let mut txid = vec![0; 32]; - rng.fill_bytes(&mut txid); - ctx.hash = txid; - ctx.spends.push(cspend); - ctx.outputs.push(cout); - ctx -} - -/// Converts [`CompactTx`] to [`Transaction::V4`]. -pub fn compact_to_v4(tx: &CompactTx) -> Result { - let sk = redjubjub::SigningKey::::new(thread_rng()); - let vk = redjubjub::VerificationKey::from(&sk); - let dummy_rk = sapling::keys::ValidatingKey::try_from(vk) - .expect("Internally generated verification key should be convertible to a validating key."); - - let spends = tx - .spends - .iter() - .map(|spend| { - Ok(Spend { - cv: sapling::NotSmallOrderValueCommitment::default(), - per_spend_anchor: sapling::tree::Root::default(), - nullifier: sapling::Nullifier::from( - spend.nf().map_err(|_| Report::msg("Invalid nullifier."))?.0, - ), - rk: dummy_rk.clone(), - zkproof: Groth16Proof([0; 192]), - spend_auth_sig: redjubjub::Signature::::from([0; 64]), - }) - }) - .collect::>>>()?; - - let spends = AtLeastOne::>::try_from(spends)?; - - let maybe_outputs = tx - .outputs - .iter() - .map(|output| { - let mut ciphertext = output.ciphertext.clone(); - ciphertext.resize(580, 0); - let ciphertext: [u8; 580] = ciphertext - .try_into() - .map_err(|_| Report::msg("Could not convert ciphertext to `[u8; 580]`"))?; - let enc_ciphertext = sapling::EncryptedNote::from(ciphertext); - - Ok(sapling::Output { - cv: sapling::NotSmallOrderValueCommitment::default(), - cm_u: Option::from(jubjub::Fq::from_bytes( - &output - .cmu() - .map_err(|_| Report::msg("Invalid commitment."))? - .to_bytes(), - )) - .ok_or(Report::msg("Invalid commitment."))?, - ephemeral_key: sapling::keys::EphemeralPublicKey::try_from( - output - .ephemeral_key() - .map_err(|_| Report::msg("Invalid ephemeral key."))? - .0, - ) - .map_err(Report::msg)?, - enc_ciphertext, - out_ciphertext: sapling::WrappedNoteKey::from([0; 80]), - zkproof: Groth16Proof([0; 192]), - }) - }) - .collect::>>()?; - - let transfers = TransferData::SpendsAndMaybeOutputs { - shared_anchor: sapling::FieldNotPresent, - spends, - maybe_outputs, - }; - - let shielded_data = sapling::ShieldedData { - value_balance: Amount::::default(), - transfers, - binding_sig: redjubjub::Signature::::from([0; 64]), - }; - - Ok(Transaction::V4 { - inputs: vec![], - outputs: vec![], - lock_time: LockTime::Height(Height(0)), - expiry_height: Height(0), - joinsplit_data: None, - sapling_shielded_data: (Some(shielded_data)), - }) -} diff --git a/zebra-scan/src/tests/vectors.rs b/zebra-scan/src/tests/vectors.rs deleted file mode 100644 index 5789701bc14..00000000000 --- a/zebra-scan/src/tests/vectors.rs +++ /dev/null @@ -1,212 +0,0 @@ -//! Fixed integration test vectors for the scanner. - -use std::sync::Arc; - -use color_eyre::Result; - -use sapling_crypto::{ - zip32::{DiversifiableFullViewingKey, ExtendedSpendingKey}, - Nullifier, -}; -use zcash_client_backend::{ - encoding::{decode_extended_full_viewing_key, encode_extended_full_viewing_key}, - proto::compact_formats::ChainMetadata, -}; -use zcash_protocol::constants::mainnet::HRP_SAPLING_EXTENDED_FULL_VIEWING_KEY; - -use zebra_chain::{ - block::{Block, Height}, - chain_tip::ChainTip, - parameters::Network, - serialization::ZcashDeserializeInto, -}; -use zebra_state::{SaplingScannedResult, TransactionIndex}; - -use crate::{ - scan::{block_to_compact, scan_block, scanning_keys}, - storage::db::tests::new_test_storage, - tests::{fake_block, mock_sapling_efvk, ZECPAGES_SAPLING_VIEWING_KEY}, -}; - -/// This test: -/// - Creates a viewing key and a fake block containing a Sapling output decryptable by the key. -/// - Scans the block. -/// - Checks that the result contains the txid of the tx containing the Sapling output. -#[tokio::test] -async fn scanning_from_fake_generated_blocks() -> Result<()> { - let extsk = ExtendedSpendingKey::master(&[]); - let dfvk: DiversifiableFullViewingKey = extsk.to_diversifiable_full_viewing_key(); - let nf = Nullifier([7; 32]); - - let (block, sapling_tree_size) = fake_block(1u32.into(), nf, &dfvk, 1, true, Some(0)); - - assert_eq!(block.transactions.len(), 4); - - let scanning_keys = scanning_keys(&vec![dfvk]).expect("scanning key"); - - let res = scan_block(&Network::Mainnet, &block, sapling_tree_size, &scanning_keys).unwrap(); - - // The response should have one transaction relevant to the key we provided. - assert_eq!(res.transactions().len(), 1); - - // Check that the original block contains the txid in the scanning result. - assert!(block - .transactions - .iter() - .map(|tx| tx.hash().bytes_in_display_order()) - .any(|txid| &txid == res.transactions()[0].txid().as_ref())); - - // Check that the txid in the scanning result matches the third tx in the original block. - assert_eq!( - res.transactions()[0].txid().as_ref(), - &block.transactions[2].hash().bytes_in_display_order() - ); - - // The block hash of the response should be the same as the one provided. - assert_eq!(res.block_hash().0, block.hash().0); - - Ok(()) -} - -/// Scan a populated state for the ZECpages viewing key. -/// This test is very similar to `scanning_from_populated_zebra_state` but with the ZECpages key. -/// There are no zechub transactions in the test data so we should get empty related transactions. -#[tokio::test] -async fn scanning_zecpages_from_populated_zebra_state() -> Result<()> { - // Parse the key from ZECpages - let efvk = decode_extended_full_viewing_key( - HRP_SAPLING_EXTENDED_FULL_VIEWING_KEY, - ZECPAGES_SAPLING_VIEWING_KEY, - ) - .unwrap(); - - let dfvk = efvk.to_diversifiable_full_viewing_key(); - - let network = Network::Mainnet; - - // Create a continuous chain of mainnet blocks from genesis - let blocks: Vec> = zebra_test::vectors::CONTINUOUS_MAINNET_BLOCKS - .iter() - .map(|(_height, block_bytes)| block_bytes.zcash_deserialize_into().unwrap()) - .collect(); - - // Create a populated state service. - let (_state_service, read_only_state_service, latest_chain_tip, _chain_tip_change) = - zebra_state::populated_state(blocks.clone(), &network).await; - - let db = read_only_state_service.db(); - - // use the tip as starting height - let mut height = latest_chain_tip.best_tip_height().unwrap(); - - let mut transactions_found = 0; - let mut transactions_scanned = 0; - let mut blocks_scanned = 0; - - let scanning_keys = scanning_keys(&vec![dfvk]).expect("scanning key"); - - while let Some(block) = db.block(height.into()) { - // We use a dummy size of the Sapling note commitment tree. We can't set the size to zero - // because the underlying scanning function would return - // `zcash_client_backeng::scanning::ScanError::TreeSizeUnknown`. - let sapling_commitment_tree_size = 1; - - let orchard_commitment_tree_size = 0; - - let chain_metadata = ChainMetadata { - sapling_commitment_tree_size, - orchard_commitment_tree_size, - }; - - let compact_block = block_to_compact(&block, chain_metadata); - - let res = scan_block( - &network, - &block, - sapling_commitment_tree_size, - &scanning_keys, - ) - .expect("scanning block for the ZECpages viewing key should work"); - - transactions_found += res.transactions().len(); - transactions_scanned += compact_block.vtx.len(); - blocks_scanned += 1; - - // scan backwards - if height.is_min() { - break; - } - height = height.previous()?; - } - - // make sure all blocks and transactions were scanned - assert_eq!(blocks_scanned, 11); - assert_eq!(transactions_scanned, 11); - - // no relevant transactions should be found - assert_eq!(transactions_found, 0); - - Ok(()) -} - -/// Creates a viewing key and a fake block containing a Sapling output decryptable by the key, scans -/// the block using the key, and adds the results to the database. -/// -/// The purpose of this test is to check if our database and our scanning code are compatible. -#[test] -fn scanning_fake_blocks_store_key_and_results() -> Result<()> { - let network = Network::Mainnet; - - // Generate a key - let efvk = mock_sapling_efvk(&[]); - let dfvk = efvk.to_diversifiable_full_viewing_key(); - let key_to_be_stored = encode_extended_full_viewing_key("zxviews", &efvk); - - // Create a database - let mut storage = new_test_storage(&network); - - // Insert the generated key to the database - storage.add_sapling_key(&key_to_be_stored, None); - - // Check key was added - assert_eq!(storage.sapling_keys_last_heights().len(), 1); - assert_eq!( - storage - .sapling_keys_last_heights() - .get(&key_to_be_stored) - .expect("height is stored") - .next() - .expect("height is not maximum"), - network.sapling_activation_height() - ); - - let nf = Nullifier([7; 32]); - - let (block, sapling_tree_size) = fake_block(1u32.into(), nf, &dfvk, 1, true, Some(0)); - - let scanning_keys = scanning_keys(&vec![dfvk]).expect("scanning key"); - - let result = scan_block(&Network::Mainnet, &block, sapling_tree_size, &scanning_keys).unwrap(); - - // The response should have one transaction relevant to the key we provided. - assert_eq!(result.transactions().len(), 1); - - let result = SaplingScannedResult::from_bytes_in_display_order( - *result.transactions()[0].txid().as_ref(), - ); - - // Add result to database - storage.add_sapling_results( - &key_to_be_stored, - Height(1), - [(TransactionIndex::from_usize(0), result)].into(), - ); - - // Check the result was added - assert_eq!( - storage.sapling_results(&key_to_be_stored).get(&Height(1)), - Some(&vec![result]) - ); - - Ok(()) -} diff --git a/zebra-state/Cargo.toml b/zebra-state/Cargo.toml index 46bdf3d3dc1..c56dfe8ea5a 100644 --- a/zebra-state/Cargo.toml +++ b/zebra-state/Cargo.toml @@ -41,36 +41,7 @@ elasticsearch = [ "zebra-chain/elasticsearch", ] -<<<<<<< HEAD -# Support for transaction version 6 -tx_v6 = [ - "zebra-chain/tx_v6" -] - -[dependencies] -bincode = "1.3.3" -chrono = { version = "0.4.38", default-features = false, features = ["clock", "std"] } -dirs = "5.0.1" -futures = "0.3.31" -hex = "0.4.3" -hex-literal = "0.4.1" -humantime-serde = "1.1.1" -human_bytes = { version = "0.4.3", default-features = false } -indexmap = "2.6.0" -itertools = "0.13.0" -lazy_static = "1.4.0" -metrics = "0.24.0" -mset = "0.1.1" -regex = "1.11.0" -rlimit = "0.10.2" -rocksdb = { version = "0.22.0", default-features = false, features = ["lz4"] } -semver = "1.0.23" -serde = { version = "1.0.211", features = ["serde_derive"] } -tempfile = "3.13.0" -thiserror = "1.0.64" -======= tx_v6 = ["zebra-chain/tx_v6"] ->>>>>>> zcash-v2.4.2 [dependencies] bincode = { workspace = true } diff --git a/zebra-state/src/service/non_finalized_state/chain.rs b/zebra-state/src/service/non_finalized_state/chain.rs index d18aebf2e3f..6fc9a8795d7 100644 --- a/zebra-state/src/service/non_finalized_state/chain.rs +++ b/zebra-state/src/service/non_finalized_state/chain.rs @@ -1604,21 +1604,6 @@ impl Chain { &None, orchard_shielded_data, ), - #[cfg(feature="tx_v6")] - V6 { - inputs, - outputs, - sapling_shielded_data, - orchard_shielded_data, - .. - } => ( - inputs, - outputs, - &None, - &None, - sapling_shielded_data, - orchard_shielded_data, - ), V1 { .. } | V2 { .. } | V3 { .. } => unreachable!( "older transaction versions only exist in finalized blocks, because of the mandatory canopy checkpoint", @@ -1662,14 +1647,6 @@ impl Chain { self.update_chain_tip_with(&(inputs, &transaction_hash, spent_outputs))?; // add the shielded data -<<<<<<< HEAD - self.update_chain_tip_with(joinsplit_data)?; - self.update_chain_tip_with(sapling_shielded_data_per_spend_anchor)?; - self.update_chain_tip_with(sapling_shielded_data_shared_anchor)?; - self.update_chain_tip_with(orchard_shielded_data_vanilla)?; - #[cfg(feature = "tx_v6")] - self.update_chain_tip_with(orchard_shielded_data_zsa)?; -======= #[cfg(not(feature = "indexer"))] let transaction_hash = (); @@ -1680,8 +1657,9 @@ impl Chain { &transaction_hash, ))?; self.update_chain_tip_with(&(sapling_shielded_data_shared_anchor, &transaction_hash))?; - self.update_chain_tip_with(&(orchard_shielded_data, &transaction_hash))?; ->>>>>>> zcash-v2.4.2 + self.update_chain_tip_with(&(orchard_shielded_data_vanilla, &transaction_hash))?; + #[cfg(feature = "tx_v6")] + self.update_chain_tip_with(&(orchard_shielded_data_zsa, &transaction_hash))?; } // update the chain value pool balances @@ -1790,21 +1768,23 @@ impl UpdateWith for Chain { for (transaction, transaction_hash) in block.transactions.iter().zip(transaction_hashes.iter()) { - let ( - inputs, - outputs, - joinsplit_data, - sapling_shielded_data_per_spend_anchor, - sapling_shielded_data_shared_anchor, - orchard_shielded_data, - ) = match transaction.deref() { + let transaction_data = match transaction.deref() { V4 { inputs, outputs, joinsplit_data, sapling_shielded_data, .. - } => (inputs, outputs, joinsplit_data, sapling_shielded_data, &None, &None), + } => ( + inputs, + outputs, + joinsplit_data, + sapling_shielded_data, + &None, + &None, + #[cfg(feature ="tx_v6")] + &None + ), V5 { inputs, outputs, @@ -1818,21 +1798,15 @@ impl UpdateWith for Chain { &None, sapling_shielded_data, orchard_shielded_data, + #[cfg(feature ="tx_v6")] + &None ), -<<<<<<< HEAD - #[cfg(feature = "tx_v6")] -======= #[cfg(feature="tx_v6")] ->>>>>>> zcash-v2.4.2 V6 { inputs, outputs, sapling_shielded_data, -<<<<<<< HEAD - orchard_shielded_data: _, -======= orchard_shielded_data, ->>>>>>> zcash-v2.4.2 .. } => ( inputs, @@ -1840,20 +1814,36 @@ impl UpdateWith for Chain { &None, &None, sapling_shielded_data, -<<<<<<< HEAD - // FIXME: support V6 shielded data? - &None, //orchard_shielded_data, - ), -======= + &None, orchard_shielded_data, ), ->>>>>>> zcash-v2.4.2 V1 { .. } | V2 { .. } | V3 { .. } => unreachable!( "older transaction versions only exist in finalized blocks, because of the mandatory canopy checkpoint", ), }; + #[cfg(not(feature = "tx_v6"))] + let ( + inputs, + outputs, + joinsplit_data, + sapling_shielded_data_per_spend_anchor, + sapling_shielded_data_shared_anchor, + orchard_shielded_data_vanilla, + ) = transaction_data; + + #[cfg(feature = "tx_v6")] + let ( + inputs, + outputs, + joinsplit_data, + sapling_shielded_data_per_spend_anchor, + sapling_shielded_data_shared_anchor, + orchard_shielded_data_vanilla, + orchard_shielded_data_zsa, + ) = transaction_data; + // remove the utxos this produced self.revert_chain_with(&(outputs, transaction_hash, new_outputs), position); // reset the utxos this consumed @@ -1880,7 +1870,9 @@ impl UpdateWith for Chain { &(sapling_shielded_data_shared_anchor, transaction_hash), position, ); - self.revert_chain_with(&(orchard_shielded_data, transaction_hash), position); + self.revert_chain_with(&(orchard_shielded_data_vanilla, transaction_hash), position); + #[cfg(feature = "tx_v6")] + self.revert_chain_with(&(orchard_shielded_data_zsa, transaction_hash), position); } // TODO: move these to the shielded UpdateWith.revert...()? @@ -2226,24 +2218,19 @@ where } } -<<<<<<< HEAD -impl UpdateWith>> - for Chain +impl + UpdateWith<( + &Option>, + &SpendingTransactionId, + )> for Chain { - #[instrument(skip(self, orchard_shielded_data))] - fn update_chain_tip_with( - &mut self, - orchard_shielded_data: &Option>, -======= -impl UpdateWith<(&Option, &SpendingTransactionId)> for Chain { #[instrument(skip(self, orchard_shielded_data))] fn update_chain_tip_with( &mut self, &(orchard_shielded_data, revealing_tx_id): &( - &Option, + &Option>, &SpendingTransactionId, ), ->>>>>>> zcash-v2.4.2 ) -> Result<(), ValidateContextError> { if let Some(orchard_shielded_data) = orchard_shielded_data { // We do note commitment tree updates in parallel rayon threads. @@ -2265,14 +2252,10 @@ impl UpdateWith<(&Option, &SpendingTransactionId)> for Ch #[instrument(skip(self, orchard_shielded_data))] fn revert_chain_with( &mut self, -<<<<<<< HEAD - orchard_shielded_data: &Option>, -======= (orchard_shielded_data, _revealing_tx_id): &( - &Option, + &Option>, &SpendingTransactionId, ), ->>>>>>> zcash-v2.4.2 _position: RevertPosition, ) { if let Some(orchard_shielded_data) = orchard_shielded_data { diff --git a/zebrad/Cargo.toml b/zebrad/Cargo.toml index a8e19c67909..5aad689a823 100644 --- a/zebrad/Cargo.toml +++ b/zebrad/Cargo.toml @@ -156,13 +156,6 @@ tx_v6 = ["zebra-chain/tx_v6", "zebra-state/tx_v6", "zebra-consensus/tx_v6"] # details. This should be only used for testing. comparison-interpreter = ["zebra-script/comparison-interpreter"] -# Support for transaction version 6 -tx_v6 = [ - "zebra-consensus/tx_v6", - "zebra-state/tx_v6", - "zebra-chain/tx_v6" -] - [dependencies] zebra-chain = { path = "../zebra-chain", version = "1.0.0" } zebra-consensus = { path = "../zebra-consensus", version = "1.0.0" } diff --git a/zebrad/src/components/mempool/storage/tests/prop.rs b/zebrad/src/components/mempool/storage/tests/prop.rs index 43d8f8db746..450dd1cc1ac 100644 --- a/zebrad/src/components/mempool/storage/tests/prop.rs +++ b/zebrad/src/components/mempool/storage/tests/prop.rs @@ -597,11 +597,6 @@ impl SpendConflictTestInput { // No JoinSplits Transaction::V1 { .. } | Transaction::V5 { .. } => {} -<<<<<<< HEAD - - // No JoinSplits -======= ->>>>>>> zcash-v2.4.2 #[cfg(feature = "tx_v6")] Transaction::V6 { .. } => {} } diff --git a/zebrad/tests/acceptance.rs b/zebrad/tests/acceptance.rs index 85838e312e8..3be0f3579b4 100644 --- a/zebrad/tests/acceptance.rs +++ b/zebrad/tests/acceptance.rs @@ -2900,11 +2900,7 @@ async fn fully_synced_rpc_z_getsubtreesbyindex_snapshot_test() -> Result<()> { async fn validate_regtest_genesis_block() { let _init_guard = zebra_test::init(); -<<<<<<< HEAD - let network = Network::new_regtest(None, None, None); -======= let network = Network::new_regtest(Default::default()); ->>>>>>> zcash-v2.4.2 let state = zebra_state::init_test(&network); let ( block_verifier_router, @@ -2976,14 +2972,10 @@ async fn trusted_chain_sync_handles_forks_correctly() -> Result<()> { use common::regtest::MiningRpcMethods; let _init_guard = zebra_test::init(); -<<<<<<< HEAD - let mut config = os_assigned_rpc_port_config(false, &Network::new_regtest(None, None, None))?; -======= let network = Network::new_regtest(Default::default()); let mut config = os_assigned_rpc_port_config(false, &network)?; ->>>>>>> zcash-v2.4.2 config.state.ephemeral = false; config.rpc.indexer_listen_addr = Some(std::net::SocketAddr::from(([127, 0, 0, 1], 0))); @@ -3384,12 +3376,7 @@ async fn nu6_funding_streams_and_coinbase_balance() -> Result<()> { ) }; -<<<<<<< HEAD - // FIXME: Would this work after Nu7 activation? - let proposal_block = proposal_block_from_template(&block_template, None, NetworkUpgrade::Nu6)?; -======= let proposal_block = proposal_block_from_template(&block_template, None, &network)?; ->>>>>>> zcash-v2.4.2 let hex_proposal_block = HexData(proposal_block.zcash_serialize_to_vec()?); // Check that the block template is a valid block proposal @@ -3516,21 +3503,7 @@ async fn nu6_funding_streams_and_coinbase_balance() -> Result<()> { block_template.submit_old(), ); -<<<<<<< HEAD - let block_template = GetBlockTemplate { - coinbase_txn, - block_commitments_hash: default_roots.block_commitments_hash, - light_client_root_hash: default_roots.block_commitments_hash, - final_sapling_root_hash: default_roots.block_commitments_hash, - default_roots, - ..(*block_template) - }; - - // FIXME: Would this work after Nu7 activation? - let proposal_block = proposal_block_from_template(&block_template, None, NetworkUpgrade::Nu6)?; -======= let proposal_block = proposal_block_from_template(&block_template, None, &network)?; ->>>>>>> zcash-v2.4.2 // Submit the invalid block with an excessive coinbase output value let submit_block_response = rpc @@ -3588,21 +3561,7 @@ async fn nu6_funding_streams_and_coinbase_balance() -> Result<()> { block_template.submit_old(), ); -<<<<<<< HEAD - let block_template = GetBlockTemplate { - coinbase_txn, - block_commitments_hash: default_roots.block_commitments_hash, - light_client_root_hash: default_roots.block_commitments_hash, - final_sapling_root_hash: default_roots.block_commitments_hash, - default_roots, - ..block_template - }; - - // FIXME: Would this work after Nu7 activation? - let proposal_block = proposal_block_from_template(&block_template, None, NetworkUpgrade::Nu6)?; -======= let proposal_block = proposal_block_from_template(&block_template, None, &network)?; ->>>>>>> zcash-v2.4.2 // Submit the invalid block with an excessive coinbase input value let submit_block_response = rpc diff --git a/zebrad/tests/common/launch.rs b/zebrad/tests/common/launch.rs index d4ee17f323e..4161fddc03d 100644 --- a/zebrad/tests/common/launch.rs +++ b/zebrad/tests/common/launch.rs @@ -47,11 +47,13 @@ pub const EXTENDED_LAUNCH_DELAY: Duration = Duration::from_secs(45); /// it is using for its RPCs. pub const LIGHTWALLETD_DELAY: Duration = Duration::from_secs(60); +// FIXME: This value has been increased from 20 to 50 to fix zebra_rpc_conflict test failure in zebrad, +// - should we consider other ways to resolve it? /// The amount of time we wait between launching two conflicting nodes. /// /// We use a longer time to make sure the first node has launched before the second starts, /// even if CI is under load. -pub const BETWEEN_NODES_DELAY: Duration = Duration::from_secs(20); +pub const BETWEEN_NODES_DELAY: Duration = Duration::from_secs(50); /// The amount of time we wait for lightwalletd to update to the tip. /// diff --git a/zebrad/tests/common/regtest.rs b/zebrad/tests/common/regtest.rs index 7532cbdd15d..a2e8155f4da 100644 --- a/zebrad/tests/common/regtest.rs +++ b/zebrad/tests/common/regtest.rs @@ -33,11 +33,7 @@ const NUM_BLOCKS_TO_SUBMIT: usize = 200; pub(crate) async fn submit_blocks_test() -> Result<()> { let _init_guard = zebra_test::init(); -<<<<<<< HEAD - let network = Network::new_regtest(None, None, None); -======= let network = Network::new_regtest(Default::default()); ->>>>>>> zcash-v2.4.2 let mut config = os_assigned_rpc_port_config(false, &network)?; config.mempool.debug_enable_at_height = Some(0); From eb71aa28a085a48ef185b94c8cb85c504103df42 Mon Sep 17 00:00:00 2001 From: Dmitry Demin Date: Fri, 3 Oct 2025 10:07:57 +0200 Subject: [PATCH 2/7] Remove a duplicated comment in zebra-chain's expiry_heigh function --- zebra-chain/src/transaction.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/zebra-chain/src/transaction.rs b/zebra-chain/src/transaction.rs index 56113944ef7..92448445a02 100644 --- a/zebra-chain/src/transaction.rs +++ b/zebra-chain/src/transaction.rs @@ -490,9 +490,6 @@ impl Transaction { }, #[cfg(feature = "tx_v6")] Transaction::V6 { expiry_height, .. } => match expiry_height { - // Consensus rule: - // > No limit: To set no limit on transactions (so that they do not expire), nExpiryHeight should be set to 0. - // https://zips.z.cash/zip-0203#specification block::Height(0) => None, block::Height(expiry_height) => Some(block::Height(*expiry_height)), }, From b68065e68596cacc0e6c76f4f707331a6457a327 Mon Sep 17 00:00:00 2001 From: Dmitry Demin Date: Fri, 3 Oct 2025 10:38:16 +0200 Subject: [PATCH 3/7] Remove accidentally added proptest-generated tests/prop.txt files from zebra-chain and zebra-network --- zebra-chain/proptest-regressions/block/tests/prop.txt | 9 --------- .../proptest-regressions/transaction/tests/prop.txt | 7 ------- .../peer/minimum_peer_version/tests/prop.txt | 7 ------- .../proptest-regressions/peer_set/set/tests/prop.txt | 7 ------- 4 files changed, 30 deletions(-) delete mode 100644 zebra-chain/proptest-regressions/block/tests/prop.txt delete mode 100644 zebra-chain/proptest-regressions/transaction/tests/prop.txt delete mode 100644 zebra-network/proptest-regressions/peer/minimum_peer_version/tests/prop.txt delete mode 100644 zebra-network/proptest-regressions/peer_set/set/tests/prop.txt diff --git a/zebra-chain/proptest-regressions/block/tests/prop.txt b/zebra-chain/proptest-regressions/block/tests/prop.txt deleted file mode 100644 index 5bfbf1d12b4..00000000000 --- a/zebra-chain/proptest-regressions/block/tests/prop.txt +++ /dev/null @@ -1,9 +0,0 @@ -# Seeds for failure cases proptest has generated in the past. It is -# automatically read and these particular cases re-run before any -# novel cases are generated. -# -# It is recommended to check this file in to source control so that -# everyone who runs the test benefits from these saved cases. -cc c7d8676d35bb53ddfa38c35230db08e83c04e9189b4ed1d8cf11ccfaca7245cb # shrinks to block = Block { header: Header { version: 4, previous_block_hash: block::Hash("2d5c252f187cdb9c9b3666d8f96328acd0db66abeb6999a9742a3b0000000000"), merkle_root: Root("6726047952f962585058db70cf19dc9b3c5c41b1c1ec8a4a30a1fa456de87e45"), commitment_bytes: [u8; 32]("cc709ce38a992f458a1c64edbd2917c79342fc4ff3caa9833b643bb116652565"), time: 2017-11-19T15:46:23Z, difficulty_threshold: CompactDifficulty(0x20336cdd, Some(ExpandedDifficulty("336cdd0000000000000000000000000000000000000000000000000000000000"))), nonce: [u8; 32]("59f2b300aaab0b7b50137e4672f83baad78fc54b56ea5e1d956ab82fc7d0411b"), solution: EquihashSolution("424b7faacb5381b17aa15633c8b2e4d99739336907f3e1f5bf105fb04f92b81c4389340432325308adc9fc2cedac054300e9aa527538b48934df08e6eaff6d84b7dec021f9cd7ce7d439f47eac5417fa255701fe73e03983d577bd7359db28455727d995ae52dff17d33efb0243ac0df5661cfbef4173a390738445713ea3b142c553d235534e657d84e021467bc4c9fa18926ada301dbd447217e7a701cb891c67f28bfe4ff5ee5e991358a895f2ce4ccc1a9cee68c55a10cacb56da1446fb26e14b81a4448b76b4c4274eafd6cfa674c5ea5863183a0cbc9d74be1e2bd285aa0a9880ca88573f3d1eb276942af2fed985cca48e0a1c7e37f38b4c989169b3653ba252873d18ecf7c5019b28308d0849ec5aa3c44c17b7a67778f9883fbcf253896625b150e9396b511706bc635aee6ff495a27bb06b943b55acdb5ebcb24213a44697efb361e7584cdec952f590f602114d8029134cf9a80f40820899db1efeb916ac8e370b29373149790bbfc472988b9923ac22b48870dd0e8ffa8d6a80be92f48e35846f7b3014dddf33d0e9da45a9149546c8daafb7b1b9e64d638dd3037c638029a6d38de56ed00ae19d47f532533c8421f0b3770bacb6130a2aeaf2dee8d741679a439332f02d0754a774b161720ffe93c51f21a46190e9c55ed018a17dad2f432eab5f98cda63cbf4639682746a4747b76d24326a0bf8ab37943f7205056417216dea4728af86e121bc382807d23bd98b8149bb2e11571e189f9ee77b9754a47929390d2493effdbf50861304a408691430b556db0dd59a5ef3e68d12d89da88fe5527c1c5303ec38058bab353e2d1bf9e8be29ffafc739bbd52d72fc24b9f0c11ef8135dffa2c242f1742a5569aad2087efa82d4472de2197a9b33f07581ef6897c4b52bb28fc863f129990e4d1e150a7ba1ffa74332f2f3ef7a702334baf6e5d0973ff124e17658f33a89dfc863b08e0f00858f3e958fd76213b2cb21e2c30dbcb7d03f21f9135094ff3fd412a043ed31e30ce5f7fe17e382c8a89ee98793d891cf1f6e5861ac6a36c189cf800d78bf17d94087378dab279f334fb1507e2a48a88e00173874c0b59626fba7ff36b8a284d8285273deff978d8a34efc9ab747a37bc2d6d532bc55c9818c67bb5e68fc1fb2970aa5f3c05c9a2afd18f1a46c4365cd8c4f6312534de4ba1cb2e324de26224ca69ee9ac8ae897ed0c8673deccdeaec715c4676d8686fa3f2ecb612f33e6a7ee9441a5d79b9aeff77305d00a5174071a9e05d119261bdafdd07b43fd2f8847a589c771a3a96fd8c6717b15778a8177e5d41fe617210b6591baf05b06ec92cbb7e1fa6925b927d89652d55fce25dd44c71a4da0d022fa7d85adce535a6ebadb0894a570f4a4435295c862bf3b81e448238ac4399b0c559c85633fd7ed131b1885561607d74cc74b774caf5260129c4b533329a6b1b9aae468972b7577e465c1fd023281d6244dd28c1ad13f9bb5c6ea7f3f31567e490975455fe4bd3e1c57afe2257f77b778423dcdb559b6ce2ba529fb7a5cbac3ef40d17e8739b8c05b5047b17b22792d1acba723cde322c583754672f0f76716f2346ee90af89d38d42ffcd5da0df308916dbc69805dc6addd65a82c98f4f53a9b3bc1911ef5410bec2ab74053654492a7de2fac0f0dfeb134ef7c1b4f0b0b4b1ed8c8235b483ebe3286cafe42dc716cc9bc9121bc77bf9342856def54bc2c723a7850d91a44df410bb380f5660c15451586968c74d755324a87bd73b1fe151df3af2817800a51fad02b699922bfa3069c7e9fa515828d87f3a22b0c2229cf2a8ec8631eddec056a6c91b10061051fb0b7a9b92feec1362efcd392b9a9e8a208ec81cc1961bda56bf310d7e41144599bb3468b261aa") }, transactions: [V5 { network_upgrade: Heartwood, lock_time: Height(Height(480580457)), expiry_height: Height(32308125), inputs: [Coinbase { height: Height(1687104), data: CoinbaseData("b\\x17P\\xa3&d\\xfa\\xeb\\xde\\xbc\\xd6\\x13\\x18\\xeb;3u"), sequence: 318224598 }], outputs: [], sapling_shielded_data: None, orchard_shielded_data: Some(ShieldedData { flags: Flags(0x0), value_balance: Amount(-1665014914533119), shared_anchor: Root("0f87c9b793c142112c07d330c66d40a683520e8e56740771fe83d6884d736210"), proof: Halo2Proof("acc526ba49cdf5daa87fc0314bd23323a3af2991b52d252da9b3bcda5961f32b79bb4db075a8db97441aeb97ce645f"), actions: AtLeastOne { inner: [AuthorizedAction { action: Action { cv: ValueCommitment { x: "0000000000000000000000000000000000000000000000000000000000000000", y: "0000000000000000000000000000000000000000000000000000000000000000" }, nullifier: Nullifier(0x3b5fe4a43d06d99281541089135fdc46facb83d4f3c88876fb8f42b80d486799), rk: VerificationKeyBytes { bytes: "acfbcb625ae552737cf21591e57958e5e7bbfe55efddae66c5cbdee68b4a95bf" }, cm_x: 0x0000000000000000000000000000000000000000000000000000000000000000, ephemeral_key: EphemeralPublicKey { x: "00000000ed302d991bf94c09fc98462200000000000000000000000000000040", y: "0200000000000000000000000000000000000000000000000000000000000000" }, enc_ciphertext: EncryptedNote("87573286e0d8118694398e2c731df4ce5174418eadc01c7fb1d3b84b0dc835e5022e80cc24a98508c1a29cec7d3cdb29ebe6a276b393b76b82eefe233bc8997cb21bff709486cf8765cadb441f0ae23dc3c20722b65ed00be7340bb23899ed1f3cae270045d068443e0e8851b63752e61d044eea06fa4b992558c65708b0fba94be75800d0128d53e41222d7f6f3d340c39950fbcc57fe0ea41d2ad99fb91054b2130e406d40500b2a1febfb304ebd2f8e9b0c26f764e8153e22c85dbfad03b9437e4e817c5162ce50cc1a730bef7cf46f3ef729b0d564b8513095840844534371bcf2fa9aba7250491a9a1e669e8ca630f340c368edbb11a86d634c7bf7f78c0ce996d6dc2ffe43850a1667abac36fb4b4af61624d69ae23586629b860c857d1064bbc5af1ca42a49030e22f96224920cf2293e01875fc651087d7353f141e73841a4a14304f7e34184f417d158aa459658446c37d35e7e480ac016c62391b20e91419d1d8894485358636244ea8648180b0c6b8f76bfc9e42d06ab47b43ffc298befc58981b61001dae35c8ccb5166b2c8bdd717c11122b913edfb049c17e6c245003463ebdbf7d090f0c253c2376d221c8be3a3e658b823cef82833ef55e9c700300ce2eea025bcc6bc6f20446e258a89794184d284d4ee2e8d7a5cec78431c39847e78b2394dd4ec0d75da717b46baacb02ae15eea9080adf5d05a71eab81e5413bbfe233cc9ce93392434cfab4d8389554be35ea6cf735bc188aa5b20252e25d590776a4fde9b748127469eaa8d01bc2cce639eaea2e35efc1d371c8e07507285d6"), out_ciphertext: WrappedNoteKey("34b0dde90c52711cb31ccb28db6a0f4e9a4950d323f6687318f6fb8c24dc301ec6f3602566670ba1e04b7f4645e904f2ac776065037756d2e85adb61a980afc67707563d19846b14f7b33adff622defe") }, spend_auth_sig: Signature { r_bytes: "bf1b5fd3c5b9cbd8dd882b71d8a7b210f151866810d4bd2f15c3fc425317cd73", s_bytes: "3d01abbd3eb60dd05cb94e2f67eef0ae10c8664c9efbeae196ca136bcab61cf2" } }] }, binding_sig: Signature { r_bytes: "edb35f3a4f890dc40617fff899c5d78533e94ac8765c1658b47d1f4f8ffa7799", s_bytes: "823e700437e7af3ed220785d884d479462672407d496ef6a69318f2acc1d4455" }, burn: Some([]) }) }] }, network = Mainnet -cc 895b3b0863eb1aa1007096aa5c575b9719193aff66ca5450a7c0068099af0972 # shrinks to block = Block { header: Header { version: 4, previous_block_hash: block::Hash("cd3c51b96f6b43796dfc1d7efb6b39848df7a0461199be42eec6100000000000"), merkle_root: Root("39eeec9aa77fdd2be5051eb86460188052cedd77419d300f66d240b8fb067843"), commitment_bytes: [u8; 32]("19e77d7207aa11d30ced9f9da5aeb9bbed94307f141047b1d14946255abae266"), time: 2094-02-04T12:25:54Z, difficulty_threshold: CompactDifficulty(0x2100bc89, Some(ExpandedDifficulty("bc89000000000000000000000000000000000000000000000000000000000000"))), nonce: [u8; 32]("6b5b4dc44ce2a74021297b073b45e44b71101fbbb4f8c545059d8dfcd3ec359a"), solution: EquihashSolution("07517202b0d980f1d9fe5f04bdc4c37ad3a4d3497849dac21890725f790b82e4a15a093400a84fda72835b290635e92e3e2d222c6be8282c9446b6d4df8e9cba50dc0ab9646728c09096232066c652b92985879b99c20a676c503d063511f95f4c8b9fff4e24698c208ce45affaebb2dd1729b7774c9b99671123393a43a79b8eb586d2af7dde8c28039f1709b37e4d785065e682b4223a0cb5d0e71ed6f2c7e240bddded87600c43c9d1141f97296e4034b4830eb2e835367c63c9b60ea2d615e1feaea1771adf5f460052a1e0ca1fdf6367ddf702bd5c578ab02d372600a362ee47d897cb47f1c0e7b9ae40419083fa50410f6fc4d990e09875efc7dd7fded6191a0a8a62ebde345eae841074f5a9c0fe1aa97e2c7f16cffd38912fd6d3d02e305ab6f4d056488e44c5c8607e19009513103617b4bde929f1688dd7a731973b061974b4a1b587e5554ab4e65acddb36f07667e4d39b2deb7de6b3ec34f289ca2cbc4eb528ed49a5fe1a09519c7fb7173070d19473ed49c7c22a181165f5be5ffdd8576457a3bcccb80f8a5d14607da01e502bed3784cfc8b45188e2dadba257ec5c50a15011a9e7f88e20dd9866c0584e5a650c902a3ded64fd95d06f0549a8ad42d32e8ea06e7a4edf4d518b9b161284cd4db56676be888b1e1c2399241e02247cf199e9e743fbbd6e138958d96745b61b328c887d8d9f4313788360bf17fcf7f237e10cd8290ca2b78a2bbcf696b66adbb7ffd160743005dc57c28e75b07c41c3ee76b9851dc7a9024977b83c983fcecae738a3379cad49021a81b5b878f05885ebd7123d1c6e28a463b8ec69429d7370416aff02b709d4d80a9ded2b8ac214135ebd4c9a92ac1dcdfff3594a6d89cdcd6dc48beaa8d60bff5fedbedd7355aff3ecad44d75149337a734b2d192a5cc09dccce357241834d165bd0045a2814f315e866e447a92163181f9dd6211e2d6cf60c5461187f996ce6c07ec41dff6da50506a8e33c99dee7dbf21c4fe8fa52708e84f027afe5283ff21c32bb7627abe25c9b14516a68ee20a3a295c2c909df57a459be4377f8b3215f068a73166d53ddcfc7146c2c23fdb4e72212e12c0765b4252bfee368b392e9f295eff6ec8e30df86c6d0068a61882fa52afc239b0e648a381c8af0fff58bcf5060fc337c674bb3f002bad115ad7ae0e11c4a9c857b7d53ea39764dd4f893b7a372a7859dc6fa0fd33ae16ee87d02c4dd6efeebc1f5493a7bf001ca8c7c9692fccc4eef73edc564cc4eed217974823cd9ba7587b70c8d95fafa800a714cf3d2c7c5fc0ba5de789a1471226407eef1e87c83a5be7274de7782c3b2fc529a68a2ea72435db8b04bc7951f02797dff9b25db8ee254747c3057ce22c599b179cbece161d41162056e0f82bc64270b9baf122beb49999b61ad28febec726823198f421bc08c5989eeadbfd2c8dea0ca2d4827adf8c2f36f0dbadf891119a84507a4a6af16c370af59c895ee0fe4e22a05a838bc930bf76bd2574babb7c9da51261255d3979ea76ea823d9107cdb5f06316402cf494fc20301a691a98f54d773fb448eef25ea361072a4b8acbfbb83ccca9490b3ab446de81bdb207cd9baa1e16ef6414f2fbb05023507b0c7b7623374c6444c1de694a9b9eafae65a3a64269d8852a50b521f74b35c1e947ffe26283e61e7d8a108aeccd73d34b8bdf4ef6b812ed1b80906000117ee0b195a36e1da7e3aae1b2556e9f524e6e50f056afe8ce3f4646b3a8b050ec4ccad6832d2b0cee35958b4d096998125e8af83fa5c4332c2add6d7e2c1f67a6350afa6b49879d84da314537675c10f418f6d76cd3379d32315f2379349a6cf3f7d1638d020c4db9312acac23f83b5c1243cfe8d0058108bde3607d6c1a000daadb") }, transactions: [V5 { network_upgrade: Blossom, lock_time: Time(2039-06-12T06:06:16Z), expiry_height: Height(644920957), inputs: [Coinbase { height: Height(3111000), data: CoinbaseData("~^\\xadRk,!F\\xea|]P`\\x97\\xf4\\x02\\xb4:i\\xc5\\xe1\\xef\\xce\\x1f\\x99\\x9c\\\"\\x15\\x83\\xc1\\xa8P\\x13pG&!m1&\\xe5\\xab\\x11\\xc9\\xfd\\xb4\\xfcV\\x82\\x15\\x02t\\xd29\\x80:\\x13{h\\xa0\\xe5b\\x1f\\x96\\xc8\\xaayo\\xf6\\x0c{\\x15KF\\xf6!\\xeb\\x1a"), sequence: 931075032 }], outputs: [Output { value: Amount(937209786863753), lock_script: Script("514d62dfbb8ccc3cdf1dd4392f982a7b67cbe2382ecd7eb5ac8858adeba2280d46eba94312d1f4b8f2bf58013f3ff9eb307971") }, Output { value: Amount(315287296346926), lock_script: Script("9a50afb23324b8ee8b1fad002822fd2c44f300ef6c866701aa7605ebdbcf4bf4e4845135edbef2b2c8bc578c8e2cf10f879b9d827578196f5f1977c8291fafac342a") }], sapling_shielded_data: Some(ShieldedData { value_balance: Amount(439633831225796), transfers: SpendsAndMaybeOutputs { shared_anchor: Root("01bb639c03f207b7667c929558f6daf04002ffe1a7cb8c07e518ddec63dc2c6d"), spends: AtLeastOne { inner: [Spend { cv: NotSmallOrderValueCommitment(ValueCommitment { u: "feada7f15dd3b3e4af81bf291b5df5ca87810ad6dd030f8bc88737bfb8cbed62", v: "0b00000000000000000000000000000000000000000000000000000000000000" }), per_spend_anchor: FieldNotPresent, nullifier: Nullifier([u8; 32]("9b46def65851a127c96f7185bb184e331c30b1dd61829dc94e81f56afbe6570e")), rk: ValidatingKey(VerificationKey(VerificationKey { point: ExtendedPoint { u: 0x1c573855bb45a5b81144296cd70e23485859187c41b40071a08b8142f993369b, v: 0x316cee1affb0884bb65781da6900078c7df7f09aebd3a5bad1668fc5f6bc7e12, z: 0x43995e7e594593c29472f0fa71200ea3d706223d016658025486d1da51107e90, t1: 0x6973ac48867ecd16f1ae8e0c1c9fbc9d685757a0df2e3b71c1c9d7d911e892a6, t2: 0x6a0e2b0c3b8000b62e96eaf4af43ca30b4277f90f5e6c9838e72fb90c0f939ea }, bytes: VerificationKeyBytes { bytes: "2d83fd9383a21b2f7a8ed0fadba102bb6b0f2ce456f7eff13f36b0e87f483d4c" } })), zkproof: Groth16Proof("a2d27e541a92ad7885a6fef947bb00199d055aa5fd129ea1c18e67f015d546148bfa8f2e6a5516a4ab7426c1d3ee87359b962f82f7a179224b85c1a615aff1ec8b8858f356ed9b2065d851def9ce058c45d6691a2145cf70fc7f6fc7c853c0329693a7c37b78422d84d138767afc5d28092473608962d192edd5847f2c0e5d8493bdebcec82f78ce9744c977362b0f4f1307404cec3f1d2f8ef67bf7537539284e549e73174ef6fad0d7694fbac04e8d7c920c06ee26f5fc51b365a8423d5e23"), spend_auth_sig: Signature(Signature { r_bytes: "a66c1c99224c9da4c3e7cf507901d503128635ebd61b3851d8ff2d3ae5d8e436", s_bytes: "ba4ffd5058fdeb094b2567e4144fb8d4483605feb4ff9c83445d392e4d72e226" }) }, Spend { cv: NotSmallOrderValueCommitment(ValueCommitment { u: "feada7f15dd3b3e4af81bf291b5df5ca87810ad6dd030f8bc88737bfb8cbed62", v: "0b00000000000000000000000000000000000000000000000000000000000000" }), per_spend_anchor: FieldNotPresent, nullifier: Nullifier([u8; 32]("c57d510f59a465a2d9028fc09f65d0be8212004d35a0d95318c9645f75a4ad89")), rk: ValidatingKey(VerificationKey(VerificationKey { point: ExtendedPoint { u: 0x5e9b5ad22f1ab1485566b21214f84411a2784400be3fc1558b8a8914b1f281c2, v: 0x26a7a506e3f416a17a2542b675b58ae40a9aca23d95be5b7fda446f843e4c65b, z: 0x3bb50ce9b966eaf7f811b9a3447edf3bab18f8e82757f4b3d19a32fc2ce7d52b, t1: 0x0885c9426c02811c9c35e359d0348528d54403937c41012c4d0f8d01de372989, t2: 0x4760879ca738727f4b1cb7d904e1554056ed4fbe1e9ba76e163e6b204483bc4b }, bytes: VerificationKeyBytes { bytes: "c97b84b645e8218150a0fcb6b548cb8e07f62eba70b2d8059899fa49f75924a8" } })), zkproof: Groth16Proof("176a2d16de98383dbcbc60beefcd584df1006fac45e9f2ee204dad8531ef1dd49b035be1e8368ddd10ef5affc431807a4e37e331b4d7bd50df4b7764ec5d1019809e5aab980bc39ce788a63ba07851fd8c0ddfc7c13453221fc1d1364d5687d87f3d85c0f8d98a2f46d8356fb7f3112b53022410a8cf0ef9618a42e3bb64fcca3e26396006aa2956a6236f9a734516672c07e83b4561b6b2da994f7ae171e75f8050cc23b46349ae2a89cc5be63ddcfc40d056d04dde3e8f5bd3941c4363a7c5"), spend_auth_sig: Signature(Signature { r_bytes: "3d3dff152e0ab424cac965d021fc6a2070dfe64bd468299e1f7e59c84354b7be", s_bytes: "0bdffac4ed45b3fc40639754f9a67c55ec69658080b224fde7b50ae64bc6d5c7" }) }] }, maybe_outputs: [Output { cv: NotSmallOrderValueCommitment(ValueCommitment { u: "feada7f15dd3b3e4af81bf291b5df5ca87810ad6dd030f8bc88737bfb8cbed62", v: "0b00000000000000000000000000000000000000000000000000000000000000" }), cm_u: 0x0000000000000000000000000000000000000000000000000000000000000000, ephemeral_key: EphemeralPublicKey { u: "feada7f15dd3b3e4af81bf291b5df5ca87810ad6dd030f8bc88737bfb8cbed62", v: "0b00000000000000000000000000000000000000000000000000000000000000" }, enc_ciphertext: EncryptedNote("bdac1323d9a964c5664bbf1c986f4f3cf6ecb63f2058eb6d848fdfd34ed10f648bf8776e6b532d0adc5d4227f10a0777802ec85fb54fe74d3adecaa94cb08248c4d436bd1879fdacc8fa7efd6ca4841e517a35f009ef99e2e4659b6a45684ac3bd94b29a80024d3979b36b5d3b36bbe1cef297cc3f37cd4d763d24dc4e8266158ca159b6403c6c9d721e4d4e1ea0dca46e51a3a8ef1dd96021607a2efa67bf8822ee8a5ab60e59f0c23b9c6ab7698c6a859a9eb882c597f133b080c5ead3686fb20bfbc3e83aeb2b7b6932146876ad7a7bda3b973c8f55894fa659465d679b7cf19b90eddc97c26095a689b5f01fe4dd7969c85c9aaca4ba6fd257d09c75f6f7254d9c366249d30f0fa0e5f363eb58b13efb1919d5a9471a3be7555eae107a8b4bc8e5881f8a4497f64478a9f8a3287e2dbe1a64258f6f57f455aab1eb8c0ff058be1bd014f4b9c4d8bf1b806166f2049a533e5c608e3ad501aaffc72f35db7aed08240b0405963c3d1d02f2e567797ed8c502aa9e697aac32c3c956386210fe44a980ebb5e10f2422e3133ffd678af640e78c4b3e9090c253ff8a04b128545c212fdd99bb2de5f4886d34ad6ef5a912db213eae7df02cb8851ffa1810fdacb2cd5d4eef4c8b9b4f25885695b5ca3f58d08890217e0a1820826304a0f6d663a15287108ca9671cf77be19d7b45cdc923ef50c0814cc8d816dcd33e1bda15b9484ea8c525eb94bfa94ba83b01b717b7b16cb2338ad587dcb96c3c6f11b259359227874eccce1d5b24dfe3cff58a3e38549572259ef8d56fc98a281d9dc9ab29ceae25e3d3"), out_ciphertext: WrappedNoteKey("c7b8bd2039b1e44b37ce9595b7095a04340495e6dcdb6958bad1b6abdfd15fb2f42bf5c99a1d4b120adb1aefe697daae5ca66a28a6fddbbcf22f77d223abc1566f9f4b5f41096ecdd089ae5c700eb8ec"), zkproof: Groth16Proof("23858be37d177245ead4e99fe57850454d6c0da08dafe553a9e7086e4f9221ca07919153f683a87bae4368670b231ef9b7a4cb05fd97e5543de0b65378a3e375b05b633dd31418746c73faa01444edf1c02236c6051b1df68408eb1cf2e4c466e77161ab3e9a728e9a3cce9b6e9f47d6e5e7739068d438555c08e5eee84fd56535b6682c98743959b22828a7b86510d435da5f3d78f3ac5f2c410931cc3a83ea65e1176e2874a4fe239f39ba04722d751106b33b75eebba828d9cb047d12b93f") }] }, binding_sig: Signature(Signature { r_bytes: "1c0f2902fee13c090668c306c1c47798fd19ff435a17760d33963c64c9980183", s_bytes: "0e6c62318443bbafdd863c039005143c3e1af573aa7088bc43c84dd3abbb6f68" }) }), orchard_shielded_data: None }, V4 { inputs: [PrevOut { outpoint: OutPoint { hash: transaction::Hash("1f3df4dd2e4b91d5a47b79a08beea80987fe7d7783e38aad982ef845d6dbbceb"), index: 1939448267 }, unlock_script: Script("00eeea398f272e6ae7a7fd"), sequence: 2852981499 }, PrevOut { outpoint: OutPoint { hash: transaction::Hash("1ac01496dc15b9fc074fb327aab26830745bf57430a62514634824098c5b41e2"), index: 2592743696 }, unlock_script: Script("689427595c14598dd943181296609a9a39c4b3fe"), sequence: 1770036452 }, PrevOut { outpoint: OutPoint { hash: transaction::Hash("9637dc9e162e5a1f9563862bc41f9599e5a210d587dff44b45133a3e2bf51136"), index: 574621683 }, unlock_script: Script("2131df1baa9a4b874f43de2b62338929c3b76221880dcd1abf07cb3dd0b9"), sequence: 1057502992 }, PrevOut { outpoint: OutPoint { hash: transaction::Hash("d0edb13722314def6926e9ef0cbcacf03833975027b4e4166bf16ce34360ecdf"), index: 2584643886 }, unlock_script: Script("5615dd"), sequence: 2161501083 }], outputs: [], lock_time: Height(Height(7007986)), expiry_height: Height(624050868), joinsplit_data: None, sapling_shielded_data: Some(ShieldedData { value_balance: Amount(1036846515935144), transfers: SpendsAndMaybeOutputs { shared_anchor: FieldNotPresent, spends: AtLeastOne { inner: [Spend { cv: NotSmallOrderValueCommitment(ValueCommitment { u: "feada7f15dd3b3e4af81bf291b5df5ca87810ad6dd030f8bc88737bfb8cbed62", v: "0b00000000000000000000000000000000000000000000000000000000000000" }), per_spend_anchor: Root("a4269bda9f122da66cf3c8610e3311c497d5c198ff5ba09c07eb5750682ac516"), nullifier: Nullifier([u8; 32]("ee1ea9387c4f2ccb1120272747de4f26d91aaea58cbaf881707b663a3ac1f2b2")), rk: ValidatingKey(VerificationKey(VerificationKey { point: ExtendedPoint { u: 0x083d1a9bd17080c490a35e946a33c0a16c76af16969fa26401417acd51e5a8f5, v: 0x10bafbd4dd999f0a3ace248211837da27d6891b4db204190fe594856294ac811, z: 0x48486145ca2729a384872fc1ee1c5ae715e54142757803f74dc30513e9d06477, t1: 0x3e536983b0998deabb48eabb17112eb5468d8a7ace0f478ffad05272dcad9d9d, t2: 0x5a429ec3dd0863951f5a61a600b356953beac0e545cc25121656f87b96bfe24c }, bytes: VerificationKeyBytes { bytes: "5347469592528ec7288d949595c264e2d30b43f5aabf3753f6b71766df3cbca8" } })), zkproof: Groth16Proof("f02d964e27f8ca27f8b21895c16c57e20c0e0b8589c02d982c0722158f151b2c59572e04b41e0e7df32d2b03d7e4dfe7de31ce1070c0ef3afd77c78f961532b9614571602f5ab4586c93921ca5e721ead78252478045b92125d2ed20efb73971a0f836db5adc54ff237c05e73f0dc9e2b16095f9459eaa423d4f596caa29564b5c100d2e8ae0cf7aa89b29a89d75d5dd280db893be1097a022de639eef4ee17db7ab9bf649274528f03cd1d8494dbb58c6eeef555b7a3b4f05a7d5862ae77a28"), spend_auth_sig: Signature(Signature { r_bytes: "c254eb01e523183ed62b54fe8a9091b79ed475d2b9dc386c9f00114167bf6d74", s_bytes: "f0ae3ca6d68658a9f6f238629c121b50426673f2da7db1aef18d7e7ec8809922" }) }, Spend { cv: NotSmallOrderValueCommitment(ValueCommitment { u: "feada7f15dd3b3e4af81bf291b5df5ca87810ad6dd030f8bc88737bfb8cbed62", v: "0b00000000000000000000000000000000000000000000000000000000000000" }), per_spend_anchor: Root("617e801d2b2b6ac345eb383f64360f5d54fc8b8522fd2051daa4f0dbf72de80d"), nullifier: Nullifier([u8; 32]("cfb8a6950550689c204b95a67a00b832660673b7d63165810e1063903ea6d44a")), rk: ValidatingKey(VerificationKey(VerificationKey { point: ExtendedPoint { u: 0x3b579f10934309c8977f7d72486e35616b990da2acca66d6cb056da4afb86912, v: 0x0e0fda5006901f495a3a614349e6a66ec1b49951d1ea1d121d513167985a4550, z: 0x3132759d9a9a096d9d9e725da4534aaec549e82a943be693ec73092d5a04a204, t1: 0x72119e9e9b5c77720f7ac1376a135e026ff193fc0e4b83401e3c64ee661755f1, t2: 0x4fc3536928ea29479de4e88a673908d2f2a640976b1c005b118c1d9f1dcf61f9 }, bytes: VerificationKeyBytes { bytes: "95e22536cdd84457eacc889f3b17cbcb5996ed22b7aa790d07e3818b532edf03" } })), zkproof: Groth16Proof("e26d8d4f84bbdf622b026fbb0d352b21c1fecbf5bfb5935e26ad0ac60bd017246875aa0f9242a909309a51a3fd0c40ce67dc1cac065e9816fa82e8c45a899499fd1bd694d6df57de10ea1bc0d419ab2a61fb0215561a68e26984ad2378741af99c33ef85db6567503b4152d9c6a2fc70b7e277fd289711d1da1bd6c6138fa9cb445796f55f6ff0cf4bf50ffaa7042c6a77a7419b1df9e22a472232c6cd68114f488e183e0298c468566fd071ad53cfeb38bb8439af81ff0ba65fa67ccdc26de3"), spend_auth_sig: Signature(Signature { r_bytes: "c452266dd39618bb70d29768c76b6e2deffcd4a686b30474f3c14e5b4d1cbe4b", s_bytes: "56285068a4d85d0971e9440bb1da73413d824683985508e0a92b1f58036dbff5" }) }] }, maybe_outputs: [] }, binding_sig: Signature(Signature { r_bytes: "9812e5b325869acd416d17013be8f256abf682ccf83f47dfc13ace17a8bffc4d", s_bytes: "b6a3febeb05003eb4278cd6aea939a290e46c2e345d7379d3f61a994fb7eac87" }) }) }] }, network = Mainnet -cc ed54bfebeb867cf1544065d217c0c096b5daf82a1bfb93823636079c333cc7fb # shrinks to block = Block { header: Header { version: 4, previous_block_hash: block::Hash("a3ade9a7a6b18bdc3ddc6daa8573c269118107733f8fe7e15ec13e0100000000"), merkle_root: Root("a70a67455fcad36b01163806e326aefe57b19a3c34ccee418bdd88b2c7d315c9"), commitment_bytes: [u8; 32]("20eac532496084c381e39320908804eb7ad0e32d44a6e1118987a3e381425e9d"), time: 1972-11-01T07:29:26Z, difficulty_threshold: CompactDifficulty(0x2100bc12, Some(ExpandedDifficulty("bc12000000000000000000000000000000000000000000000000000000000000"))), nonce: [u8; 32]("6f7f0bf13a6a8b6e1742243403299cda4eac68f3c487c2398670fcb85e836fa4"), solution: EquihashSolution("7d09b20896d301efbf7b4214ae5cc73beb2b4a0e04e7260726e68be4b80089d9f4e7eca06d31bd4381142daa84114ef2258841997d5976b683865091512dc00e72cf86ea21cdaa597054990e4459f6e566ed12970990949d35b5b58109d1cc423d650cfd822e88649f4f4bb53a6dab4d5e3cfdd2c6fb6322ef81a0597914315dc0573ce7e372e127e2e522c1788d1ae3a01031b375c8e3158343b02d411993f65a174c25b11f317068ff38f0eece91aca017ddf4d77b477497d47f585c18dcd3bf0dfe1fb44731865d7c81ca00d1f2a017c52d90effca66ca034a3d3fd7fcd5001c64e10d450e9e8578c703529b93be09ddf781190ac131bad09d68b28bde1bee6c49fb84cc2cdf41c625081e9728ad86d75333eda3e41f76deeef15d6d5bcec889e21b462b15edade801040c2517ff21713ebb288cd8dae3c49537f0e7423522d3351eaa9ae3b7e8f75008b19f3fbd2f1e6546dca8d7a4b1e29c64dcd27846e28c0a6649f0001cb84dc7fa57b3902d46d409a0149e437677d16514241bf8e5bb6b152d12f8c5ee491b1c3e88a9fa23a0979e04dc606e1f50f829192f7d962b6179319286f00825e71e3151299c2e0336f8edee7dc166e32419eb2ceee2f0964fad771584d62cb3e837abc95b4d33e2c2b2dded25d3fb246af1283494e24fc92525b2a200629a39f63047d37a7a9ed78f2288121fef3f7e369d751f038208bd939b84f15473556f6c49565d1b0e10c16c689390a22b98257bc0ba2c60d03b9ac0c326d23b4b927d378e3802a9a6bf5115915007553c814898eb44b9dc9c80dcfdb79b3c23462fd903819cd63242b04cba17f5d86dce43cf978da2aa05b1ad66c42f0c71f91e7177908914ba653ccceb98cd57f3cee816163c5a3cf2dcc34863008f38ec8f10372ca43da48dfac56c5eac65cc04ee4ac200051d0d4f8cfd92a6982674299c85a063ae2f81bb110345518270c76d120f15722c5fc277181b2764e30c87c3214a679ee0fb91a89f9b12ae1e2c048f2db5943a91a2f82d1ff2c041cbdca8721fc0dfc8a88325da83a24a506795e162ca99f2112a46e1de9a0577a7d24151891d671cc004f7ff97579df7f1630701c2a88715bf7cc4289626cf645526d2b086a21294303c018f26afd7b0a432ab6eecb621c36e161a652a648d284a5fa301a30fcd9daf8430330c7f28eff80b64de516955df4ccf33f8fc68be48ee796275260cbebdc76d76b4ebc41af0b74317d06f040475b4ac07fbb686f301692e238023f4badaa6a65fcf3c735b38dd606a5cec8de2831583726fd9fbfa6c1469716c9bb977872a49ecd60a4c9813c2b6d8480272f89d7a088d1c119fa91478881934ecc0b54610030993f29869d49aeda6b91f6407cd36e45f0517cedf2323f90559285f9e5ca214aef3d08247b7b92c63df17851c065e43cf207543ee71a5a0a5c0db050c8a0964a995feee336775d2900eb430a39158bb1230dcedc902f1adb18d4a6bb8e6a3958426d067b0dadb059824ab2ecbb30070be26a25e47871f908dce73d2839cd17824f94a1e34a68725a20bd22a090b366ebe586374e2623618861b2c8f0d6fa34ee3ebc9c4a9e7475f4e83d9debd92928d4f87dafc8fbe8fad188743c264a1d12bc2e5fa50fb96f141c2d2e7b8cc84d03653f011f0dfa0d7de323f07f2701936a6fa665975f4f3fcbe46d8e678b21319200da17dab135f5612857786994eaeb70141db0c542bed88b9af81901d7d147ec9574ade368fd2b832bb75db90084acf1618c49372a31023744e0d2bda7ba8cfb0a30e423b33ab0d41aff596f8b2b9d718bdc27bf60f4c0f15f6941d5f81eb215a9a68d2c2fadf5af6cb4619822dc976eea70e09d6cd7f415cf96ad6fbfedb66a18d8e716725f64eb") }, transactions: [V5 { network_upgrade: Nu5, lock_time: Time(2002-02-10T17:06:54Z), expiry_height: Height(1901828342), inputs: [Coinbase { height: Height(3111000), data: CoinbaseData("_U\\x15\\x83\\xb0Fh\\xe2\\x9f"), sequence: 4029209244 }], outputs: [Output { value: Amount(821310873260299), lock_script: Script("44cb9d9dddf62e5cec8f679e55bc6e0c0c1ef6b20be3ca19") }, Output { value: Amount(1490713094612351), lock_script: Script("da424d9f2b5022e5b6583e9bbe54897714abde95e05716c57ce2333be3f284") }, Output { value: Amount(903663386882645), lock_script: Script("ede18a3d5c594c5d53b37feea8c293106fa8cfc7aad49f874a64c3ed57a80b4dfb3cc2d147d56342350a8e536d12c4f92599e706a33a33e35280a6") }], sapling_shielded_data: None, orchard_shielded_data: Some(ShieldedData { flags: Flags(ENABLE_SPENDS | ENABLE_OUTPUTS | ENABLE_ZSA), value_balance: Amount(1904005199848790), shared_anchor: Root("3516fe9fe1a241c8be83fcb0058f3fcc254338cf92da0b0c18406fa7bc522c25"), proof: Halo2Proof("f86be7513e47d36670ff0ff5825bb04afb2eed7b90eb17d80ca6199a65264ea1d8ee9f307a17d31ad0da9b7a5b359b97533129b6214ceeef07ec638f9516845e69b33ede5298a10193a801baa30b4336"), actions: AtLeastOne { inner: [AuthorizedAction { action: Action { cv: ValueCommitment { x: "0000000000000000000000000000000000000000000000000000000000000000", y: "0000000000000000000000000000000000000000000000000000000000000000" }, nullifier: Nullifier(0x0e794cde882a1bd28268569c55fef43878f5cc4dbf105ceeb02b1f892a2dd823), rk: VerificationKeyBytes { bytes: "7531bae8faff69562aa61963bdc19cef04812db679e8fa25fd0581ce8beafd94" }, cm_x: 0x0000000000000000000000000000000000000000000000000000000000000000, ephemeral_key: EphemeralPublicKey { x: "00000000ed302d991bf94c09fc98462200000000000000000000000000000040", y: "0200000000000000000000000000000000000000000000000000000000000000" }, enc_ciphertext: EncryptedNote([241, 196, 17, 215, 88, 189, 174, 195, 109, 196, 50, 5, 100, 80, 213, 248, 43, 182, 148, 31, 11, 100, 143, 211, 119, 218, 73, 227, 118, 29, 188, 61, 2, 244, 109, 49, 88, 234, 126, 11, 197, 144, 67, 0, 207, 90, 195, 52, 153, 9, 88, 0, 38, 168, 11, 39, 84, 175, 147, 87, 130, 142, 56, 13, 111, 181, 2, 220, 78, 105, 91, 90, 101, 34, 24, 153, 13, 183, 100, 226, 21, 218, 169, 57, 36, 195, 94, 158, 178, 20, 63, 232, 1, 3, 86, 132, 139, 18, 38, 12, 205, 117, 252, 123, 160, 139, 140, 121, 112, 51, 223, 5, 156, 66, 198, 243, 39, 225, 55, 117, 134, 139, 84, 204, 157, 57, 190, 171, 4, 229, 147, 86, 156, 57, 7, 12, 140, 176, 167, 15, 27, 227, 26, 169, 150, 239, 45, 226, 190, 168, 141, 145, 110, 93, 238, 38, 86, 42, 143, 66, 4, 22, 203, 171, 130, 21, 123, 217, 10, 96, 60, 37, 227, 176, 236, 11, 225, 200, 31, 45, 228, 179, 196, 91, 199, 239, 130, 167, 18, 33, 126, 19, 169, 252, 96, 141, 95, 7, 226, 211, 114, 240, 145, 137, 198, 99, 74, 91, 48, 148, 88, 239, 48, 187, 221, 106, 242, 220, 84, 214, 249, 179, 41, 169, 56, 227, 29, 90, 57, 16, 18, 181, 3, 183, 22, 73, 41, 251, 16, 174, 119, 131, 58, 72, 189, 5, 200, 227, 75, 69, 237, 242, 154, 156, 96, 89, 98, 187, 128, 141, 143, 218, 144, 13, 153, 229, 141, 236, 155, 60, 99, 247, 55, 84, 204, 14, 181, 168, 185, 198, 71, 172, 81, 22, 11, 235, 200, 73, 4, 117, 17, 136, 255, 47, 101, 12, 138, 15, 75, 39, 91, 180, 184, 168, 208, 236, 129, 15, 63, 190, 102, 139, 100, 28, 137, 137, 74, 144, 2, 217, 84, 28, 99, 166, 205, 148, 83, 218, 104, 202, 21, 68, 200, 195, 52, 40, 255, 170, 70, 248, 216, 172, 148, 22, 201, 41, 242, 48, 210, 188, 116, 218, 102, 15, 191, 194, 249, 5, 65, 176, 2, 33, 99, 206, 77, 55, 77, 61, 102, 81, 120, 35, 83, 209, 174, 142, 215, 136, 43, 44, 207, 205, 10, 123, 56, 88, 196, 55, 101, 212, 97, 161, 216, 237, 130, 122, 255, 167, 206, 153, 111, 134, 93, 80, 13, 113, 13, 126, 207, 169, 37, 241, 173, 232, 173, 61, 208, 80, 55, 63, 161, 56, 127, 114, 87, 127, 21, 107, 39, 142, 160, 53, 41, 124, 69, 222, 155, 10, 102, 155, 152, 196, 10, 166, 66, 20, 16, 237, 10, 63, 184, 9, 7, 54, 163, 244, 50, 178, 33, 78, 72, 1, 192, 159, 213, 246, 7, 204, 204, 9, 126, 125, 203, 255, 238, 138, 107, 198, 73, 81, 137, 17, 254, 167, 170, 100, 20, 175, 147, 194, 22, 125, 144, 164, 120, 125, 209, 28, 6, 246, 248, 143, 206, 80, 234, 48, 153, 37, 78, 217, 49, 140, 147, 54, 211, 233, 7, 120, 39, 163, 134, 99, 235, 224, 66, 136, 19, 94, 11, 185, 97, 161, 142, 226, 68, 252, 228, 181, 153, 60, 24, 128, 136, 207, 3, 240, 193, 202, 244, 73, 46, 226, 232, 228, 24, 29, 158, 17, 86, 112, 209, 40, 246, 71, 52, 141, 178, 116, 214, 221, 18, 103, 5, 162, 71, 27, 83, 255, 204, 24]), out_ciphertext: WrappedNoteKey("9128cb46cff303aa5baa42325438995fb9824dd440afa52eec7ff47e20852a612a1a5b87ae27489b1c0b7ee8137a823683edeec052617a279d5d1a3273e0e7bb1e0cb1509e3db417191c0a789fcdc169") }, spend_auth_sig: Signature { r_bytes: "30eea2aa126fc9a3a43c5122cd5447f73aff3c44cff12f11412f05e2ebfd2f61", s_bytes: "8974e92a18283214b0362ed86acaea666bb0b4d2260354e29b129a4805a6eefa" } }, AuthorizedAction { action: Action { cv: ValueCommitment { x: "0000000000000000000000000000000000000000000000000000000000000000", y: "0000000000000000000000000000000000000000000000000000000000000000" }, nullifier: Nullifier(0x072f0f3be6fc6aea869df429d2a46abbbfbbd4f87765ba878c00dab7f4d9e06a), rk: VerificationKeyBytes { bytes: "5fad6579708e4bf4f4073e062d204875c09fd0d17ddd290c381dba991ea0aa07" }, cm_x: 0x0000000000000000000000000000000000000000000000000000000000000000, ephemeral_key: EphemeralPublicKey { x: "00000000ed302d991bf94c09fc98462200000000000000000000000000000040", y: "0200000000000000000000000000000000000000000000000000000000000000" }, enc_ciphertext: EncryptedNote([113, 53, 228, 230, 124, 111, 5, 58, 86, 194, 103, 245, 196, 210, 246, 32, 178, 108, 32, 148, 30, 118, 114, 26, 20, 211, 98, 242, 145, 75, 243, 79, 157, 20, 252, 210, 221, 95, 36, 19, 43, 183, 9, 87, 38, 18, 209, 138, 248, 37, 227, 7, 168, 140, 173, 116, 77, 131, 57, 129, 62, 145, 175, 87, 172, 5, 45, 253, 16, 24, 112, 227, 255, 94, 129, 109, 167, 252, 209, 22, 95, 193, 179, 149, 81, 249, 186, 174, 79, 206, 25, 176, 28, 65, 230, 252, 81, 39, 48, 51, 114, 111, 93, 108, 121, 17, 150, 229, 141, 56, 35, 1, 213, 215, 61, 13, 237, 61, 23, 225, 252, 26, 125, 12, 214, 197, 98, 26, 162, 56, 186, 171, 133, 8, 206, 212, 77, 236, 173, 249, 174, 248, 194, 154, 141, 251, 53, 65, 70, 28, 135, 175, 64, 92, 238, 125, 162, 172, 50, 162, 49, 53, 56, 43, 228, 17, 162, 98, 77, 108, 154, 60, 69, 61, 190, 235, 252, 173, 239, 0, 89, 156, 114, 232, 26, 9, 7, 225, 148, 131, 61, 255, 62, 9, 139, 18, 141, 236, 216, 224, 5, 169, 205, 247, 183, 3, 116, 245, 52, 251, 50, 77, 56, 190, 19, 133, 72, 173, 6, 102, 231, 0, 241, 179, 207, 21, 87, 234, 195, 109, 201, 139, 157, 242, 123, 50, 243, 109, 105, 141, 18, 105, 34, 3, 137, 143, 97, 234, 218, 193, 134, 57, 115, 56, 170, 179, 204, 28, 242, 56, 141, 6, 251, 118, 26, 113, 185, 136, 61, 223, 28, 148, 19, 62, 134, 59, 57, 251, 168, 18, 225, 78, 113, 116, 127, 224, 190, 14, 142, 59, 8, 117, 243, 90, 168, 1, 46, 15, 45, 60, 16, 240, 224, 255, 182, 17, 3, 135, 81, 210, 140, 109, 216, 207, 143, 228, 60, 208, 202, 32, 37, 45, 69, 238, 190, 10, 9, 240, 141, 34, 54, 75, 135, 253, 20, 20, 26, 184, 56, 143, 8, 135, 44, 24, 118, 68, 138, 117, 36, 21, 170, 67, 57, 254, 156, 193, 44, 7, 8, 87, 204, 93, 210, 132, 27, 84, 35, 106, 223, 7, 129, 28, 234, 254, 148, 87, 174, 16, 40, 167, 249, 106, 192, 62, 180, 232, 134, 128, 23, 144, 156, 55, 186, 231, 195, 190, 117, 110, 37, 128, 171, 173, 24, 85, 230, 14, 202, 151, 115, 95, 219, 5, 49, 248, 82, 202, 141, 143, 244, 67, 155, 191, 34, 82, 83, 27, 235, 214, 49, 104, 175, 142, 142, 235, 83, 244, 116, 9, 35, 142, 241, 12, 246, 91, 79, 221, 216, 42, 13, 90, 57, 71, 73, 2, 10, 184, 149, 162, 67, 233, 154, 166, 197, 36, 202, 79, 212, 116, 32, 111, 37, 165, 81, 83, 79, 14, 50, 90, 52, 219, 114, 137, 253, 10, 85, 236, 234, 254, 146, 46, 160, 87, 228, 244, 198, 178, 72, 73, 137, 242, 102, 222, 37, 184, 62, 96, 41, 153, 98, 115, 16, 55, 81, 23, 60, 231, 101, 39, 61, 68, 36, 27, 227, 223, 226, 98, 222, 4, 181, 149, 33, 149, 141, 25, 176, 228, 128, 252, 222, 52, 115, 62, 227, 152, 214, 231, 41, 153, 44, 73, 55, 213, 116, 75, 146, 18, 212, 32, 157, 100, 226, 111, 160, 110, 65, 229, 168, 212, 13, 154, 21, 152, 224, 146, 129, 16, 64, 205, 110, 19]), out_ciphertext: WrappedNoteKey("808d065601ee4512bb392830c7ba1d32f8b4b35637bfb7efa0ac631e5cf6d58dac4da2afefbac7cf735fc6bc647603e2a730118f247cf4f3c120fc97039fdc84015b4745700a3109eec71a3b9e8958f1") }, spend_auth_sig: Signature { r_bytes: "37f660a1589b1697bed9d7fe81dbd6da04eb354290fb49f5e1e4fb4cb269f159", s_bytes: "9624aed42f00b5f702b4b91cb8070ea9ecebecfd45372fd0c4daedb8b056c684" } }] }, binding_sig: Signature { r_bytes: "40ac0c41cfd7308c8f43f861f8c7032e3c340b326a4662237c159c8d1a7d17e8", s_bytes: "c0d9b944555318d44bc060dd44976bda58aec5eff518c37194282b9e39114f86" }, burn: Burn([BurnItem(AssetBase(Ep { x: 0x086b6a92fc269d5e78d59b2019d2c0ac349ce791e731d10549aad7f1893b5bf5, y: 0x3eaa2c23031c5a02c835cbf4a7d23f3d6cd6b6367e1c3fd44768e6bfd1514809, z: 0x29d9a660a155398a24a9ab9149ec0dd4b6d8c9327196f77b5e178200fe8d2919 }), NoteValue(440657474712827580))]) }) }] }, network = Testnet diff --git a/zebra-chain/proptest-regressions/transaction/tests/prop.txt b/zebra-chain/proptest-regressions/transaction/tests/prop.txt deleted file mode 100644 index 186f1c35c7e..00000000000 --- a/zebra-chain/proptest-regressions/transaction/tests/prop.txt +++ /dev/null @@ -1,7 +0,0 @@ -# Seeds for failure cases proptest has generated in the past. It is -# automatically read and these particular cases re-run before any -# novel cases are generated. -# -# It is recommended to check this file in to source control so that -# everyone who runs the test benefits from these saved cases. -cc 3d5a5cbf1f66c0d4ac7f3e7961c2ef089f5326b450c2dd1de2250d4d5dc300e8 # shrinks to tx = V5 { network_upgrade: Overwinter, lock_time: Height(Height(0)), expiry_height: Height(0), inputs: [Coinbase { height: Height(1687104), data: CoinbaseData(""), sequence: 0 }], outputs: [], sapling_shielded_data: None, orchard_shielded_data: Some(ShieldedData { flags: Flags(0x0), value_balance: Amount(0), shared_anchor: Root("0000000000000000000000000000000000000000000000000000000000000000"), proof: Halo2Proof(""), actions: AtLeastOne { inner: [AuthorizedAction { action: Action { cv: ValueCommitment { x: "0000000000000000000000000000000000000000000000000000000000000000", y: "0000000000000000000000000000000000000000000000000000000000000000" }, nullifier: Nullifier(0x276ee45c9a8347f025a7b97396a898c62970f7f56d29124fe0baed5b199e0c34), rk: VerificationKeyBytes { bytes: "824a9a95aba722f4d0bedfd9088e560b30f37e3df34b149a507392123697b39e" }, cm_x: 0x0000000000000000000000000000000000000000000000000000000000000000, ephemeral_key: EphemeralPublicKey { x: "00000000ed302d991bf94c09fc98462200000000000000000000000000000040", y: "0200000000000000000000000000000000000000000000000000000000000000" }, enc_ciphertext: EncryptedNote("54e5a2db21a987dedd729511f36a69db0c381784dae4d2e820184432d4ea1b69fec47339d77655eae4db003bb9d5f6b3cd2e5bef096ee5080bfdf71e9d44b8b5cd27e386680ed8d6a5d293d4328139c88df4280867ddeba6f2acf6aea974f49567cc10a5e354f3dd46e3563cdb1145d7a00458f08f569a3fb39edceb0cb8be73efb1d0868005747fc31cb555cfa36fe2dc2d268786011c50c2b61b25b8de0b3736ff4e66b9b459c89d26a140a8e22d985c898ed2b447795c90960af76aec437ddfa6e6d177f9f6414cdfa8aeb47f4db16e2c874f4eeedef42a0cd9c7174eae47ea0ce95e87e4059741b7581272527e7170442148b456eb9704d6e61839b2c1322b6d3b984ed31e1e4edfe55456ede4ecae918b283365f35dd38b07628124201b3f95ae4a97e64a7215b15fbc7950f2efe987677b0b035a9840fc63a4ed065c6626bef1cc03d545d9023287c51750722700602d18c3c0e57a187668c5a3660c7958d9b0e2e747bf4b074fd1d67634584d7fb4c8cec2ae4e6127545bd7f00bb6ba153b4036ed8c4d75ca47f25693d0f29725f49815967858b2222fcc6368a1a22d745d3856b1285dd6f5be5249a74aa8be864dc6a97f099d1d2a01a4de82495b4bffeeb139c6c6247510ac448fe2f050a52ec00d80632a2b6c8b88cd25cff6a04e82210e212af3aadfd813c2212e0f3318ee3b5cc83d70d510275f466aafa64e1d1c517e661d26c7b7dccf61464dc8d8823ae1ede873e97576b85363b5ecb05e57745d638b571e07bbde9be6668852b8de86a1f46deb494a4f1ab10af9f694359eab0b8429"), out_ciphertext: WrappedNoteKey("73afdef2a5d18918ad48f2358f4908c24db4851fddc4b8148af6f778a414ca72672cf8227f48f1709d9fc16f85421700d6cfea45a422c549fa8acdd9735d26a321e4c40344571fb3df57f5fbf9fab4c6") }, spend_auth_sig: Signature { r_bytes: "21f46c5023543062d4914a8aafa7186960042d4abeb254ce872e32ce0448affb", s_bytes: "96a4edfe5fafc1d35e42473bea5d34b15e8167fc9af389a9120ba1d08af5f948" } }] }, binding_sig: Signature { r_bytes: "d61794ae34a48b0a1766fc4cd8bbfd8a7406d6f5354b3bd63d1fad7ca4abc22c", s_bytes: "ba2d5bcba9093d38a395bc43d5a38b32f47e379c1a67f0afde773916563bfbad" }, burn: Some([]) }) } diff --git a/zebra-network/proptest-regressions/peer/minimum_peer_version/tests/prop.txt b/zebra-network/proptest-regressions/peer/minimum_peer_version/tests/prop.txt deleted file mode 100644 index da5e0930acd..00000000000 --- a/zebra-network/proptest-regressions/peer/minimum_peer_version/tests/prop.txt +++ /dev/null @@ -1,7 +0,0 @@ -# Seeds for failure cases proptest has generated in the past. It is -# automatically read and these particular cases re-run before any -# novel cases are generated. -# -# It is recommended to check this file in to source control so that -# everyone who runs the test benefits from these saved cases. -cc 5678865ceeaa402517ea865cce77dd8e030093ffac6e0af95df784d8b84dd60b # shrinks to network = Mainnet, block_height = Some(Height(3111000)) diff --git a/zebra-network/proptest-regressions/peer_set/set/tests/prop.txt b/zebra-network/proptest-regressions/peer_set/set/tests/prop.txt deleted file mode 100644 index dd98ce5a5db..00000000000 --- a/zebra-network/proptest-regressions/peer_set/set/tests/prop.txt +++ /dev/null @@ -1,7 +0,0 @@ -# Seeds for failure cases proptest has generated in the past. It is -# automatically read and these particular cases re-run before any -# novel cases are generated. -# -# It is recommended to check this file in to source control so that -# everyone who runs the test benefits from these saved cases. -cc c36b53efc1572cbecae53a4249ec88c68f010bd10dc561131da68b6b4e729d85 # shrinks to total_number_of_peers = 2 From 89383e26c6c714e15489f77260a2dbfe4e5e137f Mon Sep 17 00:00:00 2001 From: Dmitry Demin Date: Mon, 6 Oct 2025 09:58:58 +0200 Subject: [PATCH 4/7] zebra_chain: try to uncomment Nu6_1 and Nu7 height in network_upgrade.rs and specify temporary values for them --- zebra-chain/src/parameters/network_upgrade.rs | 24 ++++++++----------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/zebra-chain/src/parameters/network_upgrade.rs b/zebra-chain/src/parameters/network_upgrade.rs index 2609b814664..8c6a0822018 100644 --- a/zebra-chain/src/parameters/network_upgrade.rs +++ b/zebra-chain/src/parameters/network_upgrade.rs @@ -115,13 +115,11 @@ pub(super) const MAINNET_ACTIVATION_HEIGHTS: &[(block::Height, NetworkUpgrade)] (block::Height(1_046_400), Canopy), (block::Height(1_687_104), Nu5), (block::Height(2_726_400), Nu6), - // FIXME: TODO: Uncomment the lines below and use the correct value - // once a height for Nu6_1 is defined. Having Nu7 without Nu6_1 - // causes several tests to fail, because they assume the Nu7 height - // applies to Nu6_1. - // - //#[cfg(zcash_unstable = "nu7")] - //(block::Height(3_111_000), Nu7), + // FIXME: TODO: Update height values for Nu6_1 and Nu7 when real values will be known. + #[cfg(zcash_unstable = "nu7")] + (block::Height(3_100_000), Nu6_1), + #[cfg(zcash_unstable = "nu7")] + (block::Height(3_111_000), Nu7), ]; /// Fake mainnet network upgrade activation heights, used in tests. @@ -160,13 +158,11 @@ pub(super) const TESTNET_ACTIVATION_HEIGHTS: &[(block::Height, NetworkUpgrade)] (block::Height(1_028_500), Canopy), (block::Height(1_842_420), Nu5), (block::Height(2_976_000), Nu6), - // FIXME: TODO: Uncomment the lines below and use the correct value - // once a height for Nu6_1 is defined. Having Nu7 without Nu6_1 - // causes several tests to fail, because they assume the Nu7 height - // applies to Nu6_1. - // - //#[cfg(zcash_unstable = "nu7")] - //(block::Height(3_222_000), Nu7), + // FIXME: TODO: Update height values for Nu6_1 and Nu7 when real values will be known. + #[cfg(zcash_unstable = "nu7")] + (block::Height(3_200_000), Nu6_1), + #[cfg(zcash_unstable = "nu7")] + (block::Height(3_222_000), Nu7), ]; /// Fake testnet network upgrade activation heights, used in tests. From 2c61a5dec5965af8887c1ffca16c0aa23beb2b4b Mon Sep 17 00:00:00 2001 From: Dmitry Demin Date: Sun, 12 Oct 2025 19:19:47 +0200 Subject: [PATCH 5/7] Fix tests failing after the previous commit that uncommented Nu6_1/Nu7 activation heights --- .cargo/config.toml | 6 ++++++ zebra-chain/src/parameters/network_upgrade.rs | 9 +++++---- zebra-consensus/Cargo.toml | 3 +++ zebra-consensus/src/transaction/tests.rs | 12 ++++++++++-- 4 files changed, 24 insertions(+), 6 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 7586427df3d..8b66aa3cb93 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -6,6 +6,9 @@ rustflags = [ # Enable tx_v6 everywhere by default "--cfg", 'feature="tx_v6"', + # TODO: Remove this when Cargo.toml is updated to use the latest librustzcash zsa1 version + "--cfg", "zcash_unstable=\"nu6.1\"", + # TODO: Consider removing this line later (it's needed for the ZSA version of librustzcash crates) "--cfg", "zcash_unstable=\"nu7\"", @@ -91,6 +94,9 @@ rustdocflags = [ # Enable tx_v6 everywhere by default "--cfg", 'feature="tx_v6"', + # TODO: Remove this when Cargo.toml is updated to use the latest librustzcash zsa1 version + "--cfg", "zcash_unstable=\"nu6.1\"", + # TODO: Consider removing this line later (it's needed for the ZSA version of librustzcash crates) "--cfg", "zcash_unstable=\"nu7\"", diff --git a/zebra-chain/src/parameters/network_upgrade.rs b/zebra-chain/src/parameters/network_upgrade.rs index 8c6a0822018..3c45726bfc2 100644 --- a/zebra-chain/src/parameters/network_upgrade.rs +++ b/zebra-chain/src/parameters/network_upgrade.rs @@ -117,9 +117,9 @@ pub(super) const MAINNET_ACTIVATION_HEIGHTS: &[(block::Height, NetworkUpgrade)] (block::Height(2_726_400), Nu6), // FIXME: TODO: Update height values for Nu6_1 and Nu7 when real values will be known. #[cfg(zcash_unstable = "nu7")] - (block::Height(3_100_000), Nu6_1), + (block::Height(4_111_000), Nu6_1), #[cfg(zcash_unstable = "nu7")] - (block::Height(3_111_000), Nu7), + (block::Height(4_333_000), Nu7), ]; /// Fake mainnet network upgrade activation heights, used in tests. @@ -160,9 +160,9 @@ pub(super) const TESTNET_ACTIVATION_HEIGHTS: &[(block::Height, NetworkUpgrade)] (block::Height(2_976_000), Nu6), // FIXME: TODO: Update height values for Nu6_1 and Nu7 when real values will be known. #[cfg(zcash_unstable = "nu7")] - (block::Height(3_200_000), Nu6_1), + (block::Height(4_222_000), Nu6_1), #[cfg(zcash_unstable = "nu7")] - (block::Height(3_222_000), Nu7), + (block::Height(4_444_000), Nu7), ]; /// Fake testnet network upgrade activation heights, used in tests. @@ -583,6 +583,7 @@ impl From for NetworkUpgrade { zcash_protocol::consensus::NetworkUpgrade::Canopy => Self::Canopy, zcash_protocol::consensus::NetworkUpgrade::Nu5 => Self::Nu5, zcash_protocol::consensus::NetworkUpgrade::Nu6 => Self::Nu6, + zcash_protocol::consensus::NetworkUpgrade::Nu6_1 => Self::Nu6_1, zcash_protocol::consensus::NetworkUpgrade::Nu7 => Self::Nu7, } } diff --git a/zebra-consensus/Cargo.toml b/zebra-consensus/Cargo.toml index 28f0e46e339..6cbd4494ba5 100644 --- a/zebra-consensus/Cargo.toml +++ b/zebra-consensus/Cargo.toml @@ -92,3 +92,6 @@ tracing-subscriber = { workspace = true } zebra-state = { path = "../zebra-state", version = "1.0.1", features = ["proptest-impl"] } zebra-chain = { path = "../zebra-chain", version = "1.0.0", features = ["proptest-impl"] } zebra-test = { path = "../zebra-test/", version = "1.0.0" } + +[lints.rust] +unexpected_cfgs = { level = "warn", check-cfg = ['cfg(zcash_unstable, values("nu7"))'] } diff --git a/zebra-consensus/src/transaction/tests.rs b/zebra-consensus/src/transaction/tests.rs index b9a098fff9c..e9d24012b43 100644 --- a/zebra-consensus/src/transaction/tests.rs +++ b/zebra-consensus/src/transaction/tests.rs @@ -2124,8 +2124,12 @@ async fn v5_coinbase_transaction_expiry_height() { // Setting the new expiry height as the block height will activate NU6, so we need to set NU6 // for the tx as well. + #[cfg(not(zcash_unstable = "nu7"))] + let network_upgrade = NetworkUpgrade::Nu6; + #[cfg(zcash_unstable = "nu7")] + let network_upgrade = NetworkUpgrade::Nu7; new_transaction - .update_network_upgrade(NetworkUpgrade::Nu6) + .update_network_upgrade(network_upgrade) .expect("updating the network upgrade for a V5 tx should succeed"); let verification_result = verifier @@ -2221,6 +2225,10 @@ async fn v5_transaction_with_exceeding_expiry_height() { let expiry_height = block::Height(500_000_000); // Create a non-coinbase V5 tx. + #[cfg(not(zcash_unstable = "nu7"))] + let network_upgrade = NetworkUpgrade::Nu6; + #[cfg(zcash_unstable = "nu7")] + let network_upgrade = NetworkUpgrade::Nu7; let transaction = Transaction::V5 { inputs: vec![input], outputs: vec![output], @@ -2228,7 +2236,7 @@ async fn v5_transaction_with_exceeding_expiry_height() { expiry_height, sapling_shielded_data: None, orchard_shielded_data: None, - network_upgrade: NetworkUpgrade::Nu6, + network_upgrade, }; let transaction_hash = transaction.hash(); From a1cbd31db59a6f2a63c80ef1eb08aabc0ae84059 Mon Sep 17 00:00:00 2001 From: Dmitry Demin Date: Sun, 12 Oct 2025 21:56:48 +0200 Subject: [PATCH 6/7] Set CURRENT_NETWORK_PROTOCOL_VERSION to NU7 when zcash_unstable=nu7 is enabled --- zebra-network/src/constants.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/zebra-network/src/constants.rs b/zebra-network/src/constants.rs index 63781e908d2..e0b13954052 100644 --- a/zebra-network/src/constants.rs +++ b/zebra-network/src/constants.rs @@ -340,10 +340,13 @@ pub const TIMESTAMP_TRUNCATION_SECONDS: u32 = 30 * 60; /// /// This version of Zebra draws the current network protocol version from /// [ZIP-253](https://zips.z.cash/zip-0253). -// TODO: Update this constant to the correct value after NU6.1 & NU7 activation, -// pub const CURRENT_NETWORK_PROTOCOL_VERSION: Version = Version(170_140); // NU6.1 -// pub const CURRENT_NETWORK_PROTOCOL_VERSION: Version = Version(170_160); // NU7 +#[cfg(not(zcash_unstable = "nu7"))] pub const CURRENT_NETWORK_PROTOCOL_VERSION: Version = Version(170_120); +// TODO: If/when NU6.1 becomes the default, bump the non-NU7 value to `170_140`. +// pub const CURRENT_NETWORK_PROTOCOL_VERSION: Version = Version(170_140); // NU6.1 +/// TODO: Refer to the proper NU7 deployment ZIP. +#[cfg(zcash_unstable = "nu7")] +pub const CURRENT_NETWORK_PROTOCOL_VERSION: Version = Version(170_160); // NU7 /// The default RTT estimate for peer responses. /// From 0c136504996143cf27b90d6f81664a26fb480ca1 Mon Sep 17 00:00:00 2001 From: Dmitry Demin Date: Sun, 12 Oct 2025 22:42:49 +0200 Subject: [PATCH 7/7] zebra-rpc: update test snapshot files affected by activation height changes --- .../snapshots/get_blockchain_info@mainnet_10.snap | 10 ++++++++++ .../snapshots/get_blockchain_info@testnet_10.snap | 10 ++++++++++ .../methods/tests/snapshots/get_info@mainnet_10.snap | 3 ++- .../methods/tests/snapshots/get_info@testnet_10.snap | 3 ++- 4 files changed, 24 insertions(+), 2 deletions(-) diff --git a/zebra-rpc/src/methods/tests/snapshots/get_blockchain_info@mainnet_10.snap b/zebra-rpc/src/methods/tests/snapshots/get_blockchain_info@mainnet_10.snap index 54b0a2c2860..c2073bb2791 100644 --- a/zebra-rpc/src/methods/tests/snapshots/get_blockchain_info@mainnet_10.snap +++ b/zebra-rpc/src/methods/tests/snapshots/get_blockchain_info@mainnet_10.snap @@ -87,6 +87,16 @@ expression: info "name": "NU6", "activationheight": 2726400, "status": "pending" + }, + "4dec4df0": { + "name": "NU6.1", + "activationheight": 4111000, + "status": "pending" + }, + "77190ad8": { + "name": "NU7", + "activationheight": 4333000, + "status": "pending" } }, "consensus": { diff --git a/zebra-rpc/src/methods/tests/snapshots/get_blockchain_info@testnet_10.snap b/zebra-rpc/src/methods/tests/snapshots/get_blockchain_info@testnet_10.snap index b3d4d7c3207..fbc28fa5ef9 100644 --- a/zebra-rpc/src/methods/tests/snapshots/get_blockchain_info@testnet_10.snap +++ b/zebra-rpc/src/methods/tests/snapshots/get_blockchain_info@testnet_10.snap @@ -87,6 +87,16 @@ expression: info "name": "NU6", "activationheight": 2976000, "status": "pending" + }, + "4dec4df0": { + "name": "NU6.1", + "activationheight": 4222000, + "status": "pending" + }, + "77190ad8": { + "name": "NU7", + "activationheight": 4444000, + "status": "pending" } }, "consensus": { diff --git a/zebra-rpc/src/methods/tests/snapshots/get_info@mainnet_10.snap b/zebra-rpc/src/methods/tests/snapshots/get_info@mainnet_10.snap index 85f77bdc486..6626bc2959d 100644 --- a/zebra-rpc/src/methods/tests/snapshots/get_info@mainnet_10.snap +++ b/zebra-rpc/src/methods/tests/snapshots/get_info@mainnet_10.snap @@ -1,12 +1,13 @@ --- source: zebra-rpc/src/methods/tests/snapshot.rs +assertion_line: 668 expression: info --- { "version": 100, "build": "v0.0.1", "subversion": "[SubVersion]", - "protocolversion": 170120, + "protocolversion": 170160, "blocks": 10, "connections": 0, "difficulty": 1.0, diff --git a/zebra-rpc/src/methods/tests/snapshots/get_info@testnet_10.snap b/zebra-rpc/src/methods/tests/snapshots/get_info@testnet_10.snap index c1197ff0190..380d66ff1ef 100644 --- a/zebra-rpc/src/methods/tests/snapshots/get_info@testnet_10.snap +++ b/zebra-rpc/src/methods/tests/snapshots/get_info@testnet_10.snap @@ -1,12 +1,13 @@ --- source: zebra-rpc/src/methods/tests/snapshot.rs +assertion_line: 668 expression: info --- { "version": 100, "build": "v0.0.1", "subversion": "[SubVersion]", - "protocolversion": 170120, + "protocolversion": 170160, "blocks": 10, "connections": 0, "difficulty": 1.0,