From e27dcf498e9102084132fc68fb066af8f70e04d7 Mon Sep 17 00:00:00 2001 From: Kris Nuttycombe Date: Wed, 11 Oct 2023 14:36:10 -0600 Subject: [PATCH] Use the bundled prover rather than local params files for testing by default. `fetch_params.sh` is now deprecated and the bundled proving parameters from `wagyu-zcash-parameters` are used everywhere, so the tests should follow suit. Fixes #1016 --- zcash_client_sqlite/Cargo.toml | 2 +- zcash_client_sqlite/src/wallet/sapling.rs | 7 +------ zcash_extensions/src/transparent/demo.rs | 6 +----- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/zcash_client_sqlite/Cargo.toml b/zcash_client_sqlite/Cargo.toml index b52c47311..9d4ac3a2b 100644 --- a/zcash_client_sqlite/Cargo.toml +++ b/zcash_client_sqlite/Cargo.toml @@ -61,7 +61,7 @@ rand_core.workspace = true regex = "1.4" tempfile = "3.5.0" zcash_note_encryption.workspace = true -zcash_proofs = { workspace = true, features = ["local-prover"] } +zcash_proofs = { workspace = true, features = ["bundled-prover"] } zcash_primitives = { workspace = true, features = ["test-dependencies"] } zcash_client_backend = { workspace = true, features = ["test-dependencies", "unstable-serialization", "unstable-spanning-tree"] } zcash_address = { workspace = true, features = ["test-dependencies"] } diff --git a/zcash_client_sqlite/src/wallet/sapling.rs b/zcash_client_sqlite/src/wallet/sapling.rs index 01f3d39e7..8fe811a95 100644 --- a/zcash_client_sqlite/src/wallet/sapling.rs +++ b/zcash_client_sqlite/src/wallet/sapling.rs @@ -499,12 +499,7 @@ pub(crate) mod tests { }; pub(crate) fn test_prover() -> impl SpendProver + OutputProver { - match LocalTxProver::with_default_location() { - Some(tx_prover) => tx_prover, - None => { - panic!("Cannot locate the Zcash parameters. Please run zcash-fetch-params or fetch-params.sh to download the parameters, and then re-run the tests."); - } - } + LocalTxProver::bundled() } #[test] diff --git a/zcash_extensions/src/transparent/demo.rs b/zcash_extensions/src/transparent/demo.rs index 8ceb816fa..5188e3d7e 100644 --- a/zcash_extensions/src/transparent/demo.rs +++ b/zcash_extensions/src/transparent/demo.rs @@ -796,11 +796,7 @@ mod tests { .activation_height(NetworkUpgrade::ZFuture) .unwrap(); - // Only run the test if we have the prover parameters. - let prover = match LocalTxProver::with_default_location() { - Some(prover) => prover, - None => return, - }; + let prover = LocalTxProver::bundled(); // // Opening transaction