diff --git a/Cargo.lock b/Cargo.lock index 0aac4b408..83b049f2e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1256,7 +1256,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd5f2b7218a51c827a11d22d1439b598121fac94bf9b99452e4afffe512d78c9" dependencies = [ "heck", - "indexmap 1.9.3", + "indexmap 2.14.0", "itertools 0.14.0", "proc-macro-crate", "proc-macro2", @@ -1575,7 +1575,7 @@ dependencies = [ [[package]] name = "equihash" version = "0.2.2" -source = "git+https://github.com/valargroup/librustzcash.git?rev=6858db4a523de05f7474a89c7df751510c71874d#6858db4a523de05f7474a89c7df751510c71874d" +source = "git+https://github.com/valargroup/librustzcash.git?rev=1d3ac2fa9977e2118301722fb0c98b6aedde02e8#1d3ac2fa9977e2118301722fb0c98b6aedde02e8" dependencies = [ "blake2b_simd", "core2", @@ -1611,7 +1611,7 @@ dependencies = [ [[package]] name = "f4jumble" version = "0.1.1" -source = "git+https://github.com/valargroup/librustzcash.git?rev=6858db4a523de05f7474a89c7df751510c71874d#6858db4a523de05f7474a89c7df751510c71874d" +source = "git+https://github.com/valargroup/librustzcash.git?rev=1d3ac2fa9977e2118301722fb0c98b6aedde02e8#1d3ac2fa9977e2118301722fb0c98b6aedde02e8" dependencies = [ "blake2b_simd", ] @@ -2705,7 +2705,7 @@ dependencies = [ [[package]] name = "librustvoting" version = "0.1.0" -source = "git+https://github.com/valargroup/librustvoting.git?rev=8ff443286d313182625cfb504061700f29130d88#8ff443286d313182625cfb504061700f29130d88" +source = "git+https://github.com/valargroup/librustvoting.git?rev=126c11d354c28de257d75558f0d88bcee0f2e0d0#126c11d354c28de257d75558f0d88bcee0f2e0d0" dependencies = [ "blake2b_simd", "ff", @@ -2723,13 +2723,11 @@ dependencies = [ "rusqlite", "serde", "serde_json", - "shardtree", "subtle", "thiserror 2.0.18", "vote-commitment-tree", "vote-commitment-tree-client", "voting-circuits", - "zcash_client_sqlite", "zcash_keys", "zcash_primitives", "zcash_protocol", @@ -3391,7 +3389,7 @@ checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "pczt" version = "0.5.1" -source = "git+https://github.com/valargroup/librustzcash.git?rev=6858db4a523de05f7474a89c7df751510c71874d#6858db4a523de05f7474a89c7df751510c71874d" +source = "git+https://github.com/valargroup/librustzcash.git?rev=1d3ac2fa9977e2118301722fb0c98b6aedde02e8#1d3ac2fa9977e2118301722fb0c98b6aedde02e8" dependencies = [ "blake2b_simd", "bls12_381", @@ -6594,7 +6592,7 @@ checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" [[package]] name = "vote-commitment-tree" version = "0.1.0" -source = "git+https://github.com/valargroup/librustvoting.git?rev=8ff443286d313182625cfb504061700f29130d88#8ff443286d313182625cfb504061700f29130d88" +source = "git+https://github.com/valargroup/librustvoting.git?rev=126c11d354c28de257d75558f0d88bcee0f2e0d0#126c11d354c28de257d75558f0d88bcee0f2e0d0" dependencies = [ "anyhow", "ff", @@ -6610,7 +6608,7 @@ dependencies = [ [[package]] name = "vote-commitment-tree-client" version = "0.1.0" -source = "git+https://github.com/valargroup/librustvoting.git?rev=8ff443286d313182625cfb504061700f29130d88#8ff443286d313182625cfb504061700f29130d88" +source = "git+https://github.com/valargroup/librustvoting.git?rev=126c11d354c28de257d75558f0d88bcee0f2e0d0#126c11d354c28de257d75558f0d88bcee0f2e0d0" dependencies = [ "base64", "clap", @@ -7276,7 +7274,7 @@ dependencies = [ [[package]] name = "zcash_address" version = "0.10.1" -source = "git+https://github.com/valargroup/librustzcash.git?rev=6858db4a523de05f7474a89c7df751510c71874d#6858db4a523de05f7474a89c7df751510c71874d" +source = "git+https://github.com/valargroup/librustzcash.git?rev=1d3ac2fa9977e2118301722fb0c98b6aedde02e8#1d3ac2fa9977e2118301722fb0c98b6aedde02e8" dependencies = [ "bech32", "bs58", @@ -7289,7 +7287,7 @@ dependencies = [ [[package]] name = "zcash_client_backend" version = "0.21.2" -source = "git+https://github.com/valargroup/librustzcash.git?rev=6858db4a523de05f7474a89c7df751510c71874d#6858db4a523de05f7474a89c7df751510c71874d" +source = "git+https://github.com/valargroup/librustzcash.git?rev=1d3ac2fa9977e2118301722fb0c98b6aedde02e8#1d3ac2fa9977e2118301722fb0c98b6aedde02e8" dependencies = [ "arti-client", "base64", @@ -7357,7 +7355,7 @@ dependencies = [ [[package]] name = "zcash_client_sqlite" version = "0.19.5" -source = "git+https://github.com/valargroup/librustzcash.git?rev=6858db4a523de05f7474a89c7df751510c71874d#6858db4a523de05f7474a89c7df751510c71874d" +source = "git+https://github.com/valargroup/librustzcash.git?rev=1d3ac2fa9977e2118301722fb0c98b6aedde02e8#1d3ac2fa9977e2118301722fb0c98b6aedde02e8" dependencies = [ "bip32", "bitflags 2.11.0", @@ -7403,7 +7401,7 @@ dependencies = [ [[package]] name = "zcash_encoding" version = "0.3.0" -source = "git+https://github.com/valargroup/librustzcash.git?rev=6858db4a523de05f7474a89c7df751510c71874d#6858db4a523de05f7474a89c7df751510c71874d" +source = "git+https://github.com/valargroup/librustzcash.git?rev=1d3ac2fa9977e2118301722fb0c98b6aedde02e8#1d3ac2fa9977e2118301722fb0c98b6aedde02e8" dependencies = [ "core2", "nonempty", @@ -7412,7 +7410,7 @@ dependencies = [ [[package]] name = "zcash_keys" version = "0.12.0" -source = "git+https://github.com/valargroup/librustzcash.git?rev=6858db4a523de05f7474a89c7df751510c71874d#6858db4a523de05f7474a89c7df751510c71874d" +source = "git+https://github.com/valargroup/librustzcash.git?rev=1d3ac2fa9977e2118301722fb0c98b6aedde02e8#1d3ac2fa9977e2118301722fb0c98b6aedde02e8" dependencies = [ "bech32", "bip32", @@ -7454,7 +7452,7 @@ dependencies = [ [[package]] name = "zcash_primitives" version = "0.26.1" -source = "git+https://github.com/valargroup/librustzcash.git?rev=6858db4a523de05f7474a89c7df751510c71874d#6858db4a523de05f7474a89c7df751510c71874d" +source = "git+https://github.com/valargroup/librustzcash.git?rev=1d3ac2fa9977e2118301722fb0c98b6aedde02e8#1d3ac2fa9977e2118301722fb0c98b6aedde02e8" dependencies = [ "bip32", "blake2b_simd", @@ -7519,7 +7517,7 @@ dependencies = [ [[package]] name = "zcash_protocol" version = "0.7.1" -source = "git+https://github.com/valargroup/librustzcash.git?rev=6858db4a523de05f7474a89c7df751510c71874d#6858db4a523de05f7474a89c7df751510c71874d" +source = "git+https://github.com/valargroup/librustzcash.git?rev=1d3ac2fa9977e2118301722fb0c98b6aedde02e8#1d3ac2fa9977e2118301722fb0c98b6aedde02e8" dependencies = [ "core2", "document-features", @@ -7556,7 +7554,7 @@ dependencies = [ [[package]] name = "zcash_transparent" version = "0.6.1" -source = "git+https://github.com/valargroup/librustzcash.git?rev=6858db4a523de05f7474a89c7df751510c71874d#6858db4a523de05f7474a89c7df751510c71874d" +source = "git+https://github.com/valargroup/librustzcash.git?rev=1d3ac2fa9977e2118301722fb0c98b6aedde02e8#1d3ac2fa9977e2118301722fb0c98b6aedde02e8" dependencies = [ "bip32", "blake2b_simd", @@ -7666,7 +7664,7 @@ dependencies = [ [[package]] name = "zip321" version = "0.6.0" -source = "git+https://github.com/valargroup/librustzcash.git?rev=6858db4a523de05f7474a89c7df751510c71874d#6858db4a523de05f7474a89c7df751510c71874d" +source = "git+https://github.com/valargroup/librustzcash.git?rev=1d3ac2fa9977e2118301722fb0c98b6aedde02e8#1d3ac2fa9977e2118301722fb0c98b6aedde02e8" dependencies = [ "base64", "nom", diff --git a/Cargo.toml b/Cargo.toml index 8b10ea0e3..8a4023730 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -78,7 +78,7 @@ rust_decimal = { version = "1", default-features = false, features = ["c-repr"] xz2 = { version = "0.1", features = ["static"] } # Voting -librustvoting = { git = "https://github.com/valargroup/librustvoting.git", rev = "8ff443286d313182625cfb504061700f29130d88" } +librustvoting = { git = "https://github.com/valargroup/librustvoting.git", rev = "126c11d354c28de257d75558f0d88bcee0f2e0d0" } voting-circuits = { git = "https://github.com/valargroup/voting-circuits.git" } zcash_keys = { version = "0.12", features = ["orchard"] } incrementalmerkletree = { version = "0.8", default-features = false } @@ -103,13 +103,13 @@ lto = true # visibility changes needed for voting delegation flows. [patch.crates-io] orchard = { git = "https://github.com/valargroup/voting-circuits.git" } -# librustzcash crates pinned by rev to shielded-voting-wallet-support HEAD (6858db4). -pczt = { git = "https://github.com/valargroup/librustzcash.git", rev = "6858db4a523de05f7474a89c7df751510c71874d" } -zcash_keys = { git = "https://github.com/valargroup/librustzcash.git", rev = "6858db4a523de05f7474a89c7df751510c71874d" } -zcash_protocol = { git = "https://github.com/valargroup/librustzcash.git", rev = "6858db4a523de05f7474a89c7df751510c71874d" } -zcash_address = { git = "https://github.com/valargroup/librustzcash.git", rev = "6858db4a523de05f7474a89c7df751510c71874d" } -zcash_encoding = { git = "https://github.com/valargroup/librustzcash.git", rev = "6858db4a523de05f7474a89c7df751510c71874d" } -zcash_transparent = { git = "https://github.com/valargroup/librustzcash.git", rev = "6858db4a523de05f7474a89c7df751510c71874d" } -zcash_client_sqlite = { git = "https://github.com/valargroup/librustzcash.git", rev = "6858db4a523de05f7474a89c7df751510c71874d" } -zcash_client_backend = { git = "https://github.com/valargroup/librustzcash.git", rev = "6858db4a523de05f7474a89c7df751510c71874d" } -zcash_primitives = { git = "https://github.com/valargroup/librustzcash.git", rev = "6858db4a523de05f7474a89c7df751510c71874d" } +# librustzcash crates pinned by rev to shielded-voting-wallet-support HEAD (1d3ac2f). +pczt = { git = "https://github.com/valargroup/librustzcash.git", rev = "1d3ac2fa9977e2118301722fb0c98b6aedde02e8" } +zcash_keys = { git = "https://github.com/valargroup/librustzcash.git", rev = "1d3ac2fa9977e2118301722fb0c98b6aedde02e8" } +zcash_protocol = { git = "https://github.com/valargroup/librustzcash.git", rev = "1d3ac2fa9977e2118301722fb0c98b6aedde02e8" } +zcash_address = { git = "https://github.com/valargroup/librustzcash.git", rev = "1d3ac2fa9977e2118301722fb0c98b6aedde02e8" } +zcash_encoding = { git = "https://github.com/valargroup/librustzcash.git", rev = "1d3ac2fa9977e2118301722fb0c98b6aedde02e8" } +zcash_transparent = { git = "https://github.com/valargroup/librustzcash.git", rev = "1d3ac2fa9977e2118301722fb0c98b6aedde02e8" } +zcash_client_sqlite = { git = "https://github.com/valargroup/librustzcash.git", rev = "1d3ac2fa9977e2118301722fb0c98b6aedde02e8" } +zcash_client_backend = { git = "https://github.com/valargroup/librustzcash.git", rev = "1d3ac2fa9977e2118301722fb0c98b6aedde02e8" } +zcash_primitives = { git = "https://github.com/valargroup/librustzcash.git", rev = "1d3ac2fa9977e2118301722fb0c98b6aedde02e8" } diff --git a/rust/src/voting.rs b/rust/src/voting.rs index 66153d20b..c7d7eb493 100644 --- a/rust/src/voting.rs +++ b/rust/src/voting.rs @@ -1383,13 +1383,9 @@ pub unsafe extern "C" fn zcashlc_voting_generate_note_witnesses( .collect(); let checkpoint_height = zcash_protocol::consensus::BlockHeight::from_u32(params.snapshot_height as u32); - let merkle_paths = voting::orchard_witnesses::generate_orchard_witnesses_at_frontier( - wallet_db.conn(), - &positions, - nonempty_frontier, - checkpoint_height, - ) - .map_err(|e| anyhow!("generate_orchard_witnesses_at_frontier failed: {}", e))?; + let merkle_paths = wallet_db + .generate_orchard_witnesses_at_frontier(&positions, nonempty_frontier, checkpoint_height) + .map_err(|e| anyhow!("generate_orchard_witnesses_at_frontier failed: {}", e))?; // Convert MerklePaths to WitnessData let root_bytes = frontier_root.to_bytes().to_vec();