All notable changes to this library will be documented in this file.
The format is based on Keep a Changelog, and this library adheres to Rust's notion of Semantic Versioning.
zcash_protocol::consensus::NetworkConstants
has added methods:hrp_unified_address
hrp_unified_fvk
hrp_unified_ivk
zcash_protocol::TxId
(moved fromzcash_primitives::transaction
).
no-std
compatibility (alloc
is required). A default-enabledstd
feature flag has been added gating thestd::error::Error
andmemuse
usage.
zcash_protocol::value::QuotRem
zcash_protocol::value::Zatoshis::div_with_remainder
impl Mul<u64> for zcash_protocol::value::Zatoshis
impl Div<NonZeroU64> for zcash_protocol::value::Zatoshis
impl Sub<BlockHeight> for BlockHeight
unlike the implementation that was removed in version0.3.0
, a saturating subtraction for block heights having a return type ofu32
makes sense forBlockHeight
. Subtracting one block height from another yields the delta between them.
- Mainnet activation height has been set for
consensus::BranchId::Nu6
. - Adding a delta to a
BlockHeight
now uses saturating addition. - Subtracting a delta to a
BlockHeight
now uses saturating subtraction.
- Testnet activation height has been set for
consensus::BranchId::Nu6
.
impl {Add, Sub} for BlockHeight
- these operations were unused, and it does not make sense to add block heights (it is not a monoid.)
zcash_protocol::PoolType::{TRANSPARENT, SAPLING, ORCHARD}
- MSRV is now 1.70.0.
consensus::BranchId
now has an additionalNu6
variant.
zcash_protocol::memo
:impl TryFrom<&MemoBytes> for Memo
unstable-nu6
andzfuture
feature flags (use--cfg zcash_unstable=\"nu6\"
or--cfg zcash_unstable=\"zfuture\"
inRUSTFLAGS
andRUSTDOCFLAGS
instead).
The entries below are relative to the zcash_primitives
crate as of the tag
zcash_primitives-0.14.0
.
- The following modules have been extracted from
zcash_primitives
and moved to this crate:consensus
constants
zcash_protocol::value
replaceszcash_primitives::transaction::components::amount
zcash_protocol::consensus
:NetworkConstants
has been extracted from theParameters
trait. Relative to the state prior to the extraction:- The Bech32 prefixes now return
&'static str
instead of&str
. - Added
NetworkConstants::hrp_tex_address
.
- The Bech32 prefixes now return
NetworkType
Parameters::b58_sprout_address_prefix
zcash_protocol::consensus
:impl Hash for LocalNetwork
zcash_protocol::constants::{mainnet, testnet}::B58_SPROUT_ADDRESS_PREFIX
- Added in
zcash_protocol::value
:Zatoshis
ZatBalance
MAX_BALANCE
has been added to replace previous instances wherezcash_protocol::value::MAX_MONEY
was used as a signed value.
zcash_protocol::value::COIN
has been changed from ani64
to au64
zcash_protocol::value::MAX_MONEY
has been changed from ani64
to au64
zcash_protocol::consensus::Parameters
has been split into two traits, with the newly addedNetworkConstants
trait providing all network constant accessors. Also, theaddress_network
method has been replaced with a newnetwork_type
method that serves the same purpose. A blanket impl ofNetworkConstants
is provided for all types that implementParameters
, so call sites for methods that have moved toNetworkConstants
should remain unchanged (though they may require an additionaluse
statement.)
- From
zcash_protocol::value
:NonNegativeAmount
(useZatoshis
instead.)Amount
(useZatBalance
instead.)- The following conversions have been removed relative to
zcash_primitives-0.14.0
, aszcash_protocol
does not depend on theorchard
orsapling-crypto
crates.From<NonNegativeAmount> for orchard::NoteValue>
TryFrom<orchard::ValueSum> for Amount
From<NonNegativeAmount> for sapling::value::NoteValue>
TryFrom<sapling::value::NoteValue> for NonNegativeAmount
impl AddAssign for NonNegativeAmount
impl SubAssign for NonNegativeAmount