Merge pull request #721 from zcash/bugfix-releases
Cut point releases of `zcash_primitives`, `zcash_client_backend`, `zcash_client_sqlite`
This commit is contained in:
commit
903922c59a
|
@ -7,6 +7,15 @@ and this library adheres to Rust's notion of
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## [0.6.1] - 2022-12-06
|
||||||
|
### Added
|
||||||
|
- `zcash_client_backend::data_api::chain::scan_cached_blocks` now generates
|
||||||
|
`tracing` spans, which can be used for profiling.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- `zcash_client_backend:zip321` no longer returns an error when trying to parse
|
||||||
|
a URI without query parameters.
|
||||||
|
|
||||||
## [0.6.0] - 2022-11-12
|
## [0.6.0] - 2022-11-12
|
||||||
### Added
|
### Added
|
||||||
- Functionality that enables the receiving and spending of transparent funds,
|
- Functionality that enables the receiving and spending of transparent funds,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[package]
|
[package]
|
||||||
name = "zcash_client_backend"
|
name = "zcash_client_backend"
|
||||||
description = "APIs for creating shielded Zcash light clients"
|
description = "APIs for creating shielded Zcash light clients"
|
||||||
version = "0.6.0"
|
version = "0.6.1"
|
||||||
authors = [
|
authors = [
|
||||||
"Jack Grigg <jack@z.cash>",
|
"Jack Grigg <jack@z.cash>",
|
||||||
"Kris Nuttycombe <kris@electriccoin.co>"
|
"Kris Nuttycombe <kris@electriccoin.co>"
|
||||||
|
|
|
@ -209,6 +209,7 @@ where
|
||||||
///
|
///
|
||||||
/// Scanned blocks are required to be height-sequential. If a block is missing from the block
|
/// Scanned blocks are required to be height-sequential. If a block is missing from the block
|
||||||
/// source, an error will be returned with cause [`error::Cause::BlockHeightDiscontinuity`].
|
/// source, an error will be returned with cause [`error::Cause::BlockHeightDiscontinuity`].
|
||||||
|
#[tracing::instrument(skip(params, block_source, data_db))]
|
||||||
#[allow(clippy::type_complexity)]
|
#[allow(clippy::type_complexity)]
|
||||||
pub fn scan_cached_blocks<ParamsT, DbT, BlockSourceT>(
|
pub fn scan_cached_blocks<ParamsT, DbT, BlockSourceT>(
|
||||||
params: &ParamsT,
|
params: &ParamsT,
|
||||||
|
|
|
@ -157,6 +157,7 @@ type TaggedBatch<P, S> = Batch<(AccountId, S), SaplingDomain<P>, CompactOutputDe
|
||||||
type TaggedBatchRunner<P, S, T> =
|
type TaggedBatchRunner<P, S, T> =
|
||||||
BatchRunner<(AccountId, S), SaplingDomain<P>, CompactOutputDescription, T>;
|
BatchRunner<(AccountId, S), SaplingDomain<P>, CompactOutputDescription, T>;
|
||||||
|
|
||||||
|
#[tracing::instrument(skip_all, fields(height = block.height))]
|
||||||
pub(crate) fn add_block_to_runner<P, S, T>(
|
pub(crate) fn add_block_to_runner<P, S, T>(
|
||||||
params: &P,
|
params: &P,
|
||||||
block: CompactBlock,
|
block: CompactBlock,
|
||||||
|
@ -189,6 +190,7 @@ pub(crate) fn add_block_to_runner<P, S, T>(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[tracing::instrument(skip_all, fields(height = block.height))]
|
||||||
pub(crate) fn scan_block_with_runner<
|
pub(crate) fn scan_block_with_runner<
|
||||||
P: consensus::Parameters + Send + 'static,
|
P: consensus::Parameters + Send + 'static,
|
||||||
K: ScanningKey,
|
K: ScanningKey,
|
||||||
|
|
|
@ -7,6 +7,11 @@ and this library adheres to Rust's notion of
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## [0.4.1] - 2022-12-06
|
||||||
|
### Added
|
||||||
|
- `zcash_client_sqlite::DataConnStmtCache::advance_by_block` now generates a
|
||||||
|
`tracing` span, which can be used for profiling.
|
||||||
|
|
||||||
## [0.4.0] - 2022-11-12
|
## [0.4.0] - 2022-11-12
|
||||||
### Added
|
### Added
|
||||||
- Implementations of `zcash_client_backend::data_api::WalletReadTransparent`
|
- Implementations of `zcash_client_backend::data_api::WalletReadTransparent`
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[package]
|
[package]
|
||||||
name = "zcash_client_sqlite"
|
name = "zcash_client_sqlite"
|
||||||
description = "An SQLite-based Zcash light client"
|
description = "An SQLite-based Zcash light client"
|
||||||
version = "0.4.0"
|
version = "0.4.1"
|
||||||
authors = [
|
authors = [
|
||||||
"Jack Grigg <jack@z.cash>",
|
"Jack Grigg <jack@z.cash>",
|
||||||
"Kris Nuttycombe <kris@electriccoin.co>"
|
"Kris Nuttycombe <kris@electriccoin.co>"
|
||||||
|
@ -23,6 +23,9 @@ zcash_primitives = { version = "0.9", path = "../zcash_primitives" }
|
||||||
bs58 = { version = "0.4", features = ["check"] }
|
bs58 = { version = "0.4", features = ["check"] }
|
||||||
hdwallet = { version = "0.3.1", optional = true }
|
hdwallet = { version = "0.3.1", optional = true }
|
||||||
|
|
||||||
|
# - Logging and metrics
|
||||||
|
tracing = "0.1"
|
||||||
|
|
||||||
# - Protobuf interfaces
|
# - Protobuf interfaces
|
||||||
prost = "0.11"
|
prost = "0.11"
|
||||||
|
|
||||||
|
|
|
@ -517,6 +517,7 @@ impl<'a, P: consensus::Parameters> WalletWrite for DataConnStmtCache<'a, P> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[tracing::instrument(skip_all, fields(height = u32::from(block.block_height)))]
|
||||||
#[allow(clippy::type_complexity)]
|
#[allow(clippy::type_complexity)]
|
||||||
fn advance_by_block(
|
fn advance_by_block(
|
||||||
&mut self,
|
&mut self,
|
||||||
|
|
|
@ -7,6 +7,14 @@ and this library adheres to Rust's notion of
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## [0.9.1] - 2022-12-06
|
||||||
|
### Fixed
|
||||||
|
- `zcash_primitives::transaction::builder`:
|
||||||
|
- `Builder::build` was calling `FeeRule::fee_required` with the number of
|
||||||
|
Sapling outputs that have been added to the builder. It now instead provides
|
||||||
|
the number of outputs that will be in the final Sapling bundle, including
|
||||||
|
any padding.
|
||||||
|
|
||||||
## [0.9.0] - 2022-11-12
|
## [0.9.0] - 2022-11-12
|
||||||
### Added
|
### Added
|
||||||
- Added to `zcash_primitives::transaction::builder`:
|
- Added to `zcash_primitives::transaction::builder`:
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[package]
|
[package]
|
||||||
name = "zcash_primitives"
|
name = "zcash_primitives"
|
||||||
description = "Rust implementations of the Zcash primitives"
|
description = "Rust implementations of the Zcash primitives"
|
||||||
version = "0.9.0"
|
version = "0.9.1"
|
||||||
authors = [
|
authors = [
|
||||||
"Jack Grigg <jack@z.cash>",
|
"Jack Grigg <jack@z.cash>",
|
||||||
"Kris Nuttycombe <kris@electriccoin.co>"
|
"Kris Nuttycombe <kris@electriccoin.co>"
|
||||||
|
|
|
@ -320,10 +320,7 @@ impl<'a, P: consensus::Parameters, R: RngCore> Builder<'a, P, R> {
|
||||||
self.transparent_builder.inputs(),
|
self.transparent_builder.inputs(),
|
||||||
self.transparent_builder.outputs(),
|
self.transparent_builder.outputs(),
|
||||||
self.sapling_builder.inputs().len(),
|
self.sapling_builder.inputs().len(),
|
||||||
match self.sapling_builder.inputs().len() {
|
self.sapling_builder.bundle_output_count(),
|
||||||
0 => self.sapling_builder.outputs().len(),
|
|
||||||
_ => (std::cmp::max(2, self.sapling_builder.outputs().len())),
|
|
||||||
},
|
|
||||||
)
|
)
|
||||||
.map_err(Error::Fee)?;
|
.map_err(Error::Fee)?;
|
||||||
self.build_internal(prover, fee)
|
self.build_internal(prover, fee)
|
||||||
|
@ -346,7 +343,7 @@ impl<'a, P: consensus::Parameters, R: RngCore> Builder<'a, P, R> {
|
||||||
self.transparent_builder.inputs(),
|
self.transparent_builder.inputs(),
|
||||||
self.transparent_builder.outputs(),
|
self.transparent_builder.outputs(),
|
||||||
self.sapling_builder.inputs().len(),
|
self.sapling_builder.inputs().len(),
|
||||||
self.sapling_builder.outputs().len(),
|
self.sapling_builder.bundle_output_count(),
|
||||||
self.tze_builder.inputs(),
|
self.tze_builder.inputs(),
|
||||||
self.tze_builder.outputs(),
|
self.tze_builder.outputs(),
|
||||||
)
|
)
|
||||||
|
|
|
@ -256,6 +256,19 @@ impl<P> SaplingBuilder<P> {
|
||||||
&self.outputs
|
&self.outputs
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Returns the number of outputs that will be present in the Sapling bundle built by
|
||||||
|
/// this builder.
|
||||||
|
///
|
||||||
|
/// This may be larger than the number of outputs that have been added to the builder,
|
||||||
|
/// depending on whether padding is going to be applied.
|
||||||
|
pub(in crate::transaction) fn bundle_output_count(&self) -> usize {
|
||||||
|
// This matches the padding behaviour in `Self::build`.
|
||||||
|
match self.spends.len() {
|
||||||
|
0 => self.outputs.len(),
|
||||||
|
_ => std::cmp::max(MIN_SHIELDED_OUTPUTS, self.outputs.len()),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// Returns the net value represented by the spends and outputs added to this builder.
|
/// Returns the net value represented by the spends and outputs added to this builder.
|
||||||
pub fn value_balance(&self) -> Amount {
|
pub fn value_balance(&self) -> Amount {
|
||||||
self.value_balance
|
self.value_balance
|
||||||
|
|
Loading…
Reference in New Issue