diff --git a/zcash_client_backend/CHANGELOG.md b/zcash_client_backend/CHANGELOG.md index 5df41eb405..06cf34db98 100644 --- a/zcash_client_backend/CHANGELOG.md +++ b/zcash_client_backend/CHANGELOG.md @@ -20,7 +20,7 @@ and this library adheres to Rust's notion of - `ScannedBlock` - `wallet::input_sellection::Proposal::{min_target_height, min_anchor_height}`: - `zcash_client_backend::wallet::WalletSaplingOutput::note_commitment_tree_position` -- `zcash_client_backend::welding_rig::ScanError` +- `zcash_client_backend::scanning::ScanError` ### Changed - MSRV is now 1.65.0. @@ -55,9 +55,10 @@ and this library adheres to Rust's notion of - Arguments to `{propose_transaction, propose_shielding}` have changed. - `zcash_client_backend::wallet::ReceivedSaplingNote::note_commitment_tree_position` has replaced the `witness` field in the same struct. -- `zcash_client_backend::welding_rig::ScanningKey::sapling_nf` has been changed to +- `zcash_client_backend::welding_rig` has been renamed to `zcash_client_backend::scanning` +- `zcash_client_backend::scanning::ScanningKey::sapling_nf` has been changed to take a note position instead of an incremental witness for the note. -- Arguments to `zcash_client_backend::welding_rig::scan_block` have changed. This +- Arguments to `zcash_client_backend::scanning::scan_block` have changed. This method now takes an optional `BlockMetadata` argument instead of a base commitment tree and incremental witnesses for each previously-known note. In addition, the return type has now been updated to return a `Result` @@ -79,7 +80,7 @@ and this library adheres to Rust's notion of - `zcash_client_backend::data_api::chain::validate_chain` TODO: document how to handle validation given out-of-order blocks. - `zcash_client_backend::data_api::chain::error::{ChainError, Cause}` have been - replaced by `zcash_client_backend::welding_rig::ScanError` + replaced by `zcash_client_backend::scanning::ScanError` - `zcash_client_backend::wallet::WalletSaplingOutput::{witness, witness_mut}` have been removed as individual incremental witnesses are no longer tracked on a per-note basis. The global note commitment tree for the wallet should be used diff --git a/zcash_client_backend/src/data_api/chain.rs b/zcash_client_backend/src/data_api/chain.rs index 9e1a85518d..b310dfec89 100644 --- a/zcash_client_backend/src/data_api/chain.rs +++ b/zcash_client_backend/src/data_api/chain.rs @@ -60,7 +60,7 @@ use crate::{ data_api::{NullifierQuery, WalletWrite}, proto::compact_formats::CompactBlock, scan::BatchRunner, - welding_rig::{add_block_to_runner, scan_block_with_runner}, + scanning::{add_block_to_runner, scan_block_with_runner}, }; pub mod error; diff --git a/zcash_client_backend/src/data_api/chain/error.rs b/zcash_client_backend/src/data_api/chain/error.rs index c1c78cf614..3a21884bc6 100644 --- a/zcash_client_backend/src/data_api/chain/error.rs +++ b/zcash_client_backend/src/data_api/chain/error.rs @@ -3,7 +3,7 @@ use std::error; use std::fmt::{self, Debug, Display}; -use crate::welding_rig::ScanError; +use crate::scanning::ScanError; /// Errors related to chain validation and scanning. #[derive(Debug)] diff --git a/zcash_client_backend/src/lib.rs b/zcash_client_backend/src/lib.rs index f737116623..42335244f0 100644 --- a/zcash_client_backend/src/lib.rs +++ b/zcash_client_backend/src/lib.rs @@ -17,7 +17,7 @@ pub mod keys; pub mod proto; pub mod scan; pub mod wallet; -pub mod welding_rig; +pub mod scanning; pub mod zip321; pub use decrypt::{decrypt_transaction, DecryptedOutput, TransferType}; diff --git a/zcash_client_backend/src/welding_rig.rs b/zcash_client_backend/src/scanning.rs similarity index 99% rename from zcash_client_backend/src/welding_rig.rs rename to zcash_client_backend/src/scanning.rs index a5d8e9c5d0..0229f1a98d 100644 --- a/zcash_client_backend/src/welding_rig.rs +++ b/zcash_client_backend/src/scanning.rs @@ -40,7 +40,7 @@ use crate::{ /// nullifier for the note can also be obtained. /// /// [`CompactSaplingOutput`]: crate::proto::compact_formats::CompactSaplingOutput -/// [`scan_block`]: crate::welding_rig::scan_block +/// [`scan_block`]: crate::scanning::scan_block pub trait ScanningKey { /// The type representing the scope of the scanning key. type Scope: Clone + Eq + std::hash::Hash + Send + 'static; @@ -165,7 +165,7 @@ impl fmt::Display for ScanError { /// [`ExtendedFullViewingKey`]: zcash_primitives::zip32::ExtendedFullViewingKey /// [`SaplingIvk`]: zcash_primitives::sapling::SaplingIvk /// [`CompactBlock`]: crate::proto::compact_formats::CompactBlock -/// [`ScanningKey`]: crate::welding_rig::ScanningKey +/// [`ScanningKey`]: crate::scanning::ScanningKey /// [`CommitmentTree`]: zcash_primitives::sapling::CommitmentTree /// [`IncrementalWitness`]: zcash_primitives::sapling::IncrementalWitness /// [`WalletSaplingOutput`]: crate::wallet::WalletSaplingOutput