Merge pull request #347 from str4d/small-dep-updates
Small dependency updates
This commit is contained in:
commit
c724ed1796
|
@ -14,7 +14,7 @@ jobs:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: 1.44.1
|
toolchain: 1.47.0
|
||||||
override: true
|
override: true
|
||||||
|
|
||||||
- name: Fetch path to Zcash parameters
|
- name: Fetch path to Zcash parameters
|
||||||
|
@ -56,7 +56,7 @@ jobs:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: 1.44.1
|
toolchain: 1.47.0
|
||||||
override: true
|
override: true
|
||||||
- name: Add target
|
- name: Add target
|
||||||
run: rustup target add ${{ matrix.target }}
|
run: rustup target add ${{ matrix.target }}
|
||||||
|
@ -79,7 +79,7 @@ jobs:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: 1.44.1
|
toolchain: 1.47.0
|
||||||
override: true
|
override: true
|
||||||
# Build benchmarks to prevent bitrot
|
# Build benchmarks to prevent bitrot
|
||||||
- name: Build benchmarks
|
- name: Build benchmarks
|
||||||
|
@ -89,20 +89,20 @@ jobs:
|
||||||
args: --all --benches
|
args: --all --benches
|
||||||
|
|
||||||
clippy:
|
clippy:
|
||||||
name: Clippy (1.44.1)
|
name: Clippy (1.47.0)
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: 1.44.1
|
toolchain: 1.47.0
|
||||||
components: clippy
|
components: clippy
|
||||||
override: true
|
override: true
|
||||||
- name: Run clippy
|
- name: Run clippy
|
||||||
uses: actions-rs/clippy-check@v1
|
uses: actions-rs/clippy-check@v1
|
||||||
with:
|
with:
|
||||||
name: Clippy (1.44.1)
|
name: Clippy (1.47.0)
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
args: --all-features --all-targets -- -D warnings
|
args: --all-features --all-targets -- -D warnings
|
||||||
|
|
||||||
|
@ -199,7 +199,7 @@ jobs:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: 1.44.1
|
toolchain: 1.47.0
|
||||||
override: true
|
override: true
|
||||||
|
|
||||||
# cargo fmt does not build the code, and running it in a fresh clone of
|
# cargo fmt does not build the code, and running it in a fresh clone of
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
1.44.1
|
1.47.0
|
||||||
|
|
|
@ -16,6 +16,7 @@ and this library adheres to Rust's notion of
|
||||||
- First alpha of TZE support, behind the `zfuture` feature flag.
|
- First alpha of TZE support, behind the `zfuture` feature flag.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
- MSRV is now 1.47.0.
|
||||||
- `epk` fields and return values were changed from a `jubjub::SubgroupPoint` to
|
- `epk` fields and return values were changed from a `jubjub::SubgroupPoint` to
|
||||||
a `jubjub::ExtendedPoint`, to match the change to the `zcash_primitives`
|
a `jubjub::ExtendedPoint`, to match the change to the `zcash_primitives`
|
||||||
decryption APIs:
|
decryption APIs:
|
||||||
|
|
|
@ -14,13 +14,13 @@ edition = "2018"
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bech32 = "0.7"
|
bech32 = "0.7"
|
||||||
bls12_381 = "0.3.1"
|
bls12_381 = "0.3.1"
|
||||||
bs58 = { version = "0.3", features = ["check"] }
|
bs58 = { version = "0.4", features = ["check"] }
|
||||||
base64 = "0.12.3"
|
base64 = "0.13"
|
||||||
ff = "0.8"
|
ff = "0.8"
|
||||||
group = "0.8"
|
group = "0.8"
|
||||||
hex = "0.4"
|
hex = "0.4"
|
||||||
jubjub = "0.5.1"
|
jubjub = "0.5.1"
|
||||||
nom = "5.1.2"
|
nom = "6.1"
|
||||||
protobuf = "2.20"
|
protobuf = "2.20"
|
||||||
rand_core = "0.5.1"
|
rand_core = "0.5.1"
|
||||||
subtle = "2.2.3"
|
subtle = "2.2.3"
|
||||||
|
|
|
@ -194,7 +194,7 @@ where
|
||||||
/// [`init_blocks_table`] before this function.
|
/// [`init_blocks_table`] before this function.
|
||||||
///
|
///
|
||||||
/// Scanned blocks are required to be height-sequential. If a block is missing from the
|
/// Scanned blocks are required to be height-sequential. If a block is missing from the
|
||||||
/// cache, an error will be returned with kind [`ChainInvalid::HeightMismatch`].
|
/// cache, an error will be returned with kind [`ChainInvalid::BlockHeightDiscontinuity`].
|
||||||
///
|
///
|
||||||
/// # Examples
|
/// # Examples
|
||||||
///
|
///
|
||||||
|
|
|
@ -81,6 +81,8 @@ pub enum OvkPolicy {
|
||||||
///
|
///
|
||||||
/// Transaction outputs will be decryptable by the sender, in addition to the
|
/// Transaction outputs will be decryptable by the sender, in addition to the
|
||||||
/// recipients.
|
/// recipients.
|
||||||
|
///
|
||||||
|
/// [`ExtendedFullViewingKey`]: zcash_primitives::zip32::ExtendedFullViewingKey
|
||||||
Sender,
|
Sender,
|
||||||
|
|
||||||
/// Use a custom outgoing viewing key. This might for instance be derived from a
|
/// Use a custom outgoing viewing key. This might for instance be derived from a
|
||||||
|
|
|
@ -22,6 +22,8 @@ use crate::wallet::{AccountId, WalletShieldedOutput, WalletShieldedSpend, Wallet
|
||||||
///
|
///
|
||||||
/// The given [`CommitmentTree`] and existing [`IncrementalWitness`]es are incremented
|
/// The given [`CommitmentTree`] and existing [`IncrementalWitness`]es are incremented
|
||||||
/// with this output's commitment.
|
/// with this output's commitment.
|
||||||
|
///
|
||||||
|
/// [`ExtendedFullViewingKey`]: zcash_primitives::zip32::ExtendedFullViewingKey
|
||||||
#[allow(clippy::too_many_arguments)]
|
#[allow(clippy::too_many_arguments)]
|
||||||
fn scan_output<P: consensus::Parameters>(
|
fn scan_output<P: consensus::Parameters>(
|
||||||
params: &P,
|
params: &P,
|
||||||
|
@ -87,6 +89,8 @@ fn scan_output<P: consensus::Parameters>(
|
||||||
///
|
///
|
||||||
/// The given [`CommitmentTree`] and existing [`IncrementalWitness`]es are
|
/// The given [`CommitmentTree`] and existing [`IncrementalWitness`]es are
|
||||||
/// incremented appropriately.
|
/// incremented appropriately.
|
||||||
|
///
|
||||||
|
/// [`ExtendedFullViewingKey`]: zcash_primitives::zip32::ExtendedFullViewingKey
|
||||||
pub fn scan_block<P: consensus::Parameters>(
|
pub fn scan_block<P: consensus::Parameters>(
|
||||||
params: &P,
|
params: &P,
|
||||||
block: CompactBlock,
|
block: CompactBlock,
|
||||||
|
|
|
@ -5,7 +5,8 @@ use std::fmt;
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
|
||||||
use nom::{
|
use nom::{
|
||||||
character::complete::char, combinator::all_consuming, multi::separated_list, sequence::preceded,
|
character::complete::char, combinator::all_consuming, multi::separated_list0,
|
||||||
|
sequence::preceded,
|
||||||
};
|
};
|
||||||
use zcash_primitives::{consensus, transaction::components::Amount};
|
use zcash_primitives::{consensus, transaction::components::Amount};
|
||||||
|
|
||||||
|
@ -248,7 +249,7 @@ impl TransactionRequest {
|
||||||
// Parse the remaining parameters as an undifferentiated list
|
// Parse the remaining parameters as an undifferentiated list
|
||||||
let (_, xs) = all_consuming(preceded(
|
let (_, xs) = all_consuming(preceded(
|
||||||
char('?'),
|
char('?'),
|
||||||
separated_list(char('&'), parse::zcashparam(params)),
|
separated_list0(char('&'), parse::zcashparam(params)),
|
||||||
))(rest)
|
))(rest)
|
||||||
.map_err(|e| e.to_string())?;
|
.map_err(|e| e.to_string())?;
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@ same as before, but have been reorganized.
|
||||||
- `zcash_client_sqlite::NoteId`
|
- `zcash_client_sqlite::NoteId`
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
- MSRV is now 1.47.0.
|
||||||
- APIs now take `&BlockDB` and `&WalletDB<P>` arguments, instead of paths to the
|
- APIs now take `&BlockDB` and `&WalletDB<P>` arguments, instead of paths to the
|
||||||
block cache and wallet databases.
|
block cache and wallet databases.
|
||||||
- The library no longer uses the `mainnet` feature flag to specify the network
|
- The library no longer uses the `mainnet` feature flag to specify the network
|
||||||
|
|
|
@ -13,7 +13,7 @@ edition = "2018"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bech32 = "0.7"
|
bech32 = "0.7"
|
||||||
bs58 = { version = "0.3", features = ["check"] }
|
bs58 = { version = "0.4", features = ["check"] }
|
||||||
ff = "0.8"
|
ff = "0.8"
|
||||||
group = "0.8"
|
group = "0.8"
|
||||||
jubjub = "0.5.1"
|
jubjub = "0.5.1"
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
//! default, the light client is configured for use with the Zcash testnet.
|
//! default, the light client is configured for use with the Zcash testnet.
|
||||||
//!
|
//!
|
||||||
//! [`CompactBlock`]: zcash_client_backend::proto::compact_formats::CompactBlock
|
//! [`CompactBlock`]: zcash_client_backend::proto::compact_formats::CompactBlock
|
||||||
//! [`init_cache_database`]: crate::init::init_cache_database
|
//! [`init_cache_database`]: crate::chain::init::init_cache_database
|
||||||
|
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
|
|
|
@ -112,7 +112,7 @@ pub fn init_wallet_db<P>(wdb: &WalletDB<P>) -> Result<(), rusqlite::Error> {
|
||||||
/// Initialises the data database with the given [`ExtendedFullViewingKey`]s.
|
/// Initialises the data database with the given [`ExtendedFullViewingKey`]s.
|
||||||
///
|
///
|
||||||
/// The [`ExtendedFullViewingKey`]s are stored internally and used by other APIs such as
|
/// The [`ExtendedFullViewingKey`]s are stored internally and used by other APIs such as
|
||||||
/// [`get_address`], [`scan_cached_blocks`], and [`create_to_address`]. `extfvks` **MUST**
|
/// [`get_address`], [`scan_cached_blocks`], and [`create_spend_to_address`]. `extfvks` **MUST**
|
||||||
/// be arranged in account-order; that is, the [`ExtendedFullViewingKey`] for ZIP 32
|
/// be arranged in account-order; that is, the [`ExtendedFullViewingKey`] for ZIP 32
|
||||||
/// account `i` **MUST** be at `extfvks[i]`.
|
/// account `i` **MUST** be at `extfvks[i]`.
|
||||||
///
|
///
|
||||||
|
@ -141,8 +141,8 @@ pub fn init_wallet_db<P>(wdb: &WalletDB<P>) -> Result<(), rusqlite::Error> {
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
/// [`get_address`]: crate::wallet::get_address
|
/// [`get_address`]: crate::wallet::get_address
|
||||||
/// [`scan_cached_blocks`]: crate::scan::scan_cached_blocks
|
/// [`scan_cached_blocks`]: zcash_client_backend::data_api::chain::scan_cached_blocks
|
||||||
/// [`create_to_address`]: crate::transact::create_to_address
|
/// [`create_spend_to_address`]: zcash_client_backend::data_api::wallet::create_spend_to_address
|
||||||
pub fn init_accounts_table<P: consensus::Parameters>(
|
pub fn init_accounts_table<P: consensus::Parameters>(
|
||||||
wdb: &WalletDB<P>,
|
wdb: &WalletDB<P>,
|
||||||
extfvks: &[ExtendedFullViewingKey],
|
extfvks: &[ExtendedFullViewingKey],
|
||||||
|
|
|
@ -34,11 +34,7 @@ impl Entry {
|
||||||
|
|
||||||
/// Is this node a leaf.
|
/// Is this node a leaf.
|
||||||
pub fn leaf(&self) -> bool {
|
pub fn leaf(&self) -> bool {
|
||||||
if let EntryKind::Leaf = self.kind {
|
matches!(self.kind, EntryKind::Leaf)
|
||||||
true
|
|
||||||
} else {
|
|
||||||
false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Left child
|
/// Left child
|
||||||
|
|
|
@ -648,7 +648,7 @@ mod tests {
|
||||||
tree.truncate_leaf().expect("Failed to truncate");
|
tree.truncate_leaf().expect("Failed to truncate");
|
||||||
}
|
}
|
||||||
|
|
||||||
TestResult::from_bool(if let EntryLink::Stored(2) = tree.root() { true } else { false })
|
TestResult::from_bool(matches!(tree.root(), EntryLink::Stored(2)))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -678,12 +678,9 @@ mod tests {
|
||||||
|
|
||||||
TestResult::from_bool(
|
TestResult::from_bool(
|
||||||
if number & (number - 1) == 0 {
|
if number & (number - 1) == 0 {
|
||||||
if let EntryLink::Stored(_) = tree.root() { true }
|
matches!(tree.root(), EntryLink::Stored(_))
|
||||||
else { false }
|
|
||||||
} else if let EntryLink::Generated(_) = tree.root() {
|
|
||||||
true
|
|
||||||
} else {
|
} else {
|
||||||
false
|
matches!(tree.root(), EntryLink::Generated(_))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -707,12 +704,9 @@ mod tests {
|
||||||
|
|
||||||
TestResult::from_bool(
|
TestResult::from_bool(
|
||||||
if total & (total - 1) == 0 {
|
if total & (total - 1) == 0 {
|
||||||
if let EntryLink::Stored(_) = tree.root() { true }
|
matches!(tree.root(), EntryLink::Stored(_))
|
||||||
else { false }
|
|
||||||
} else if let EntryLink::Generated(_) = tree.root() {
|
|
||||||
true
|
|
||||||
} else {
|
} else {
|
||||||
false
|
matches!(tree.root(), EntryLink::Generated(_))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,6 +73,7 @@ and this library adheres to Rust's notion of
|
||||||
- `zcash_primitives::zip32::DiversifierIndex: Default`
|
- `zcash_primitives::zip32::DiversifierIndex: Default`
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
- MSRV is now 1.47.0.
|
||||||
- Trial decryption using the APIs in `zcash_primitives::note_encryption` is now
|
- Trial decryption using the APIs in `zcash_primitives::note_encryption` is now
|
||||||
over 60% faster at detecting which notes are relevant.
|
over 60% faster at detecting which notes are relevant.
|
||||||
- Part of this improvement was achieved by changing the APIs to take `epk` as
|
- Part of this improvement was achieved by changing the APIs to take `epk` as
|
||||||
|
|
|
@ -15,7 +15,7 @@ edition = "2018"
|
||||||
all-features = true
|
all-features = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
aes = "0.5"
|
aes = "0.6"
|
||||||
bitvec = "0.18"
|
bitvec = "0.18"
|
||||||
blake2b_simd = "0.5"
|
blake2b_simd = "0.5"
|
||||||
blake2s_simd = "0.5"
|
blake2s_simd = "0.5"
|
||||||
|
@ -24,7 +24,7 @@ byteorder = "1"
|
||||||
crypto_api_chachapoly = "0.4"
|
crypto_api_chachapoly = "0.4"
|
||||||
equihash = { version = "0.1", path = "../components/equihash" }
|
equihash = { version = "0.1", path = "../components/equihash" }
|
||||||
ff = "0.8"
|
ff = "0.8"
|
||||||
fpe = "0.3"
|
fpe = "0.4"
|
||||||
group = "0.8"
|
group = "0.8"
|
||||||
hex = "0.4"
|
hex = "0.4"
|
||||||
jubjub = "0.5.1"
|
jubjub = "0.5.1"
|
||||||
|
@ -34,7 +34,7 @@ proptest = { version = "0.10.1", optional = true }
|
||||||
rand = "0.7"
|
rand = "0.7"
|
||||||
rand_core = "0.5.1"
|
rand_core = "0.5.1"
|
||||||
ripemd160 = { version = "0.9", optional = true }
|
ripemd160 = { version = "0.9", optional = true }
|
||||||
secp256k1 = { version = "0.19", optional = true }
|
secp256k1 = { version = "0.20", optional = true }
|
||||||
sha2 = "0.9"
|
sha2 = "0.9"
|
||||||
subtle = "2.2.3"
|
subtle = "2.2.3"
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ funty = "=1.1.0"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
criterion = "0.3"
|
criterion = "0.3"
|
||||||
hex-literal = "0.2"
|
hex-literal = "0.3"
|
||||||
proptest = "0.10.1"
|
proptest = "0.10.1"
|
||||||
rand_xorshift = "0.2"
|
rand_xorshift = "0.2"
|
||||||
|
|
||||||
|
|
|
@ -352,7 +352,7 @@ pub enum NetworkUpgrade {
|
||||||
///
|
///
|
||||||
/// [Canopy]: https://z.cash/upgrade/canopy/
|
/// [Canopy]: https://z.cash/upgrade/canopy/
|
||||||
Canopy,
|
Canopy,
|
||||||
/// The [ZFUTURE] network upgrade.
|
/// The ZFUTURE network upgrade.
|
||||||
///
|
///
|
||||||
/// This upgrade is expected never to activate on mainnet;
|
/// This upgrade is expected never to activate on mainnet;
|
||||||
/// it is intended for use in integration testing of functionality
|
/// it is intended for use in integration testing of functionality
|
||||||
|
|
|
@ -9,7 +9,7 @@ pub const COIN_TYPE: u32 = 133;
|
||||||
///
|
///
|
||||||
/// Defined in [ZIP 32].
|
/// Defined in [ZIP 32].
|
||||||
///
|
///
|
||||||
/// [`ExtendedSpendingKey`]: zcash_primitives::zip32::ExtendedSpendingKey
|
/// [`ExtendedSpendingKey`]: crate::zip32::ExtendedSpendingKey
|
||||||
/// [ZIP 32]: https://github.com/zcash/zips/blob/master/zip-0032.rst
|
/// [ZIP 32]: https://github.com/zcash/zips/blob/master/zip-0032.rst
|
||||||
pub const HRP_SAPLING_EXTENDED_SPENDING_KEY: &str = "secret-extended-key-main";
|
pub const HRP_SAPLING_EXTENDED_SPENDING_KEY: &str = "secret-extended-key-main";
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ pub const HRP_SAPLING_EXTENDED_SPENDING_KEY: &str = "secret-extended-key-main";
|
||||||
///
|
///
|
||||||
/// Defined in [ZIP 32].
|
/// Defined in [ZIP 32].
|
||||||
///
|
///
|
||||||
/// [`ExtendedFullViewingKey`]: zcash_primitives::zip32::ExtendedFullViewingKey
|
/// [`ExtendedFullViewingKey`]: crate::zip32::ExtendedFullViewingKey
|
||||||
/// [ZIP 32]: https://github.com/zcash/zips/blob/master/zip-0032.rst
|
/// [ZIP 32]: https://github.com/zcash/zips/blob/master/zip-0032.rst
|
||||||
pub const HRP_SAPLING_EXTENDED_FULL_VIEWING_KEY: &str = "zxviews";
|
pub const HRP_SAPLING_EXTENDED_FULL_VIEWING_KEY: &str = "zxviews";
|
||||||
|
|
||||||
|
@ -25,16 +25,16 @@ pub const HRP_SAPLING_EXTENDED_FULL_VIEWING_KEY: &str = "zxviews";
|
||||||
///
|
///
|
||||||
/// Defined in section 5.6.4 of the [Zcash Protocol Specification].
|
/// Defined in section 5.6.4 of the [Zcash Protocol Specification].
|
||||||
///
|
///
|
||||||
/// [`PaymentAddress`]: zcash_primitives::primitives::PaymentAddress
|
/// [`PaymentAddress`]: crate::primitives::PaymentAddress
|
||||||
/// [Zcash Protocol Specification]: https://github.com/zcash/zips/blob/master/protocol/protocol.pdf
|
/// [Zcash Protocol Specification]: https://github.com/zcash/zips/blob/master/protocol/protocol.pdf
|
||||||
pub const HRP_SAPLING_PAYMENT_ADDRESS: &str = "zs";
|
pub const HRP_SAPLING_PAYMENT_ADDRESS: &str = "zs";
|
||||||
|
|
||||||
/// The prefix for a Base58Check-encoded mainnet [`TransparentAddress::PublicKey`].
|
/// The prefix for a Base58Check-encoded mainnet [`TransparentAddress::PublicKey`].
|
||||||
///
|
///
|
||||||
/// [`TransparentAddress::PublicKey`]: zcash_primitives::legacy::TransparentAddress::PublicKey
|
/// [`TransparentAddress::PublicKey`]: crate::legacy::TransparentAddress::PublicKey
|
||||||
pub const B58_PUBKEY_ADDRESS_PREFIX: [u8; 2] = [0x1c, 0xb8];
|
pub const B58_PUBKEY_ADDRESS_PREFIX: [u8; 2] = [0x1c, 0xb8];
|
||||||
|
|
||||||
/// The prefix for a Base58Check-encoded mainnet [`TransparentAddress::Script`].
|
/// The prefix for a Base58Check-encoded mainnet [`TransparentAddress::Script`].
|
||||||
///
|
///
|
||||||
/// [`TransparentAddress::Script`]: zcash_primitives::legacy::TransparentAddress::Script
|
/// [`TransparentAddress::Script`]: crate::legacy::TransparentAddress::Script
|
||||||
pub const B58_SCRIPT_ADDRESS_PREFIX: [u8; 2] = [0x1c, 0xbd];
|
pub const B58_SCRIPT_ADDRESS_PREFIX: [u8; 2] = [0x1c, 0xbd];
|
||||||
|
|
|
@ -12,7 +12,7 @@ pub const COIN_TYPE: u32 = 1;
|
||||||
///
|
///
|
||||||
/// It is defined in [the `zcashd` codebase].
|
/// It is defined in [the `zcashd` codebase].
|
||||||
///
|
///
|
||||||
/// [`ExtendedSpendingKey`]: zcash_primitives::zip32::ExtendedSpendingKey
|
/// [`ExtendedSpendingKey`]: crate::zip32::ExtendedSpendingKey
|
||||||
/// [the `zcashd` codebase]: https://github.com/zcash/zcash/blob/128d863fb8be39ee294fda397c1ce3ba3b889cb2/src/chainparams.cpp#L496
|
/// [the `zcashd` codebase]: https://github.com/zcash/zcash/blob/128d863fb8be39ee294fda397c1ce3ba3b889cb2/src/chainparams.cpp#L496
|
||||||
pub const HRP_SAPLING_EXTENDED_SPENDING_KEY: &str = "secret-extended-key-regtest";
|
pub const HRP_SAPLING_EXTENDED_SPENDING_KEY: &str = "secret-extended-key-regtest";
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ pub const HRP_SAPLING_EXTENDED_SPENDING_KEY: &str = "secret-extended-key-regtest
|
||||||
///
|
///
|
||||||
/// It is defined in [the `zcashd` codebase].
|
/// It is defined in [the `zcashd` codebase].
|
||||||
///
|
///
|
||||||
/// [`ExtendedFullViewingKey`]: zcash_primitives::zip32::ExtendedFullViewingKey
|
/// [`ExtendedFullViewingKey`]: crate::zip32::ExtendedFullViewingKey
|
||||||
/// [the `zcashd` codebase]: https://github.com/zcash/zcash/blob/128d863fb8be39ee294fda397c1ce3ba3b889cb2/src/chainparams.cpp#L494
|
/// [the `zcashd` codebase]: https://github.com/zcash/zcash/blob/128d863fb8be39ee294fda397c1ce3ba3b889cb2/src/chainparams.cpp#L494
|
||||||
pub const HRP_SAPLING_EXTENDED_FULL_VIEWING_KEY: &str = "zxviewregtestsapling";
|
pub const HRP_SAPLING_EXTENDED_FULL_VIEWING_KEY: &str = "zxviewregtestsapling";
|
||||||
|
|
||||||
|
@ -28,18 +28,18 @@ pub const HRP_SAPLING_EXTENDED_FULL_VIEWING_KEY: &str = "zxviewregtestsapling";
|
||||||
///
|
///
|
||||||
/// It is defined in [the `zcashd` codebase].
|
/// It is defined in [the `zcashd` codebase].
|
||||||
///
|
///
|
||||||
/// [`PaymentAddress`]: zcash_primitives::primitives::PaymentAddress
|
/// [`PaymentAddress`]: crate::primitives::PaymentAddress
|
||||||
/// [the `zcashd` codebase]: https://github.com/zcash/zcash/blob/128d863fb8be39ee294fda397c1ce3ba3b889cb2/src/chainparams.cpp#L493
|
/// [the `zcashd` codebase]: https://github.com/zcash/zcash/blob/128d863fb8be39ee294fda397c1ce3ba3b889cb2/src/chainparams.cpp#L493
|
||||||
pub const HRP_SAPLING_PAYMENT_ADDRESS: &str = "zregtestsapling";
|
pub const HRP_SAPLING_PAYMENT_ADDRESS: &str = "zregtestsapling";
|
||||||
|
|
||||||
/// The prefix for a Base58Check-encoded regtest [`TransparentAddress::PublicKey`].
|
/// The prefix for a Base58Check-encoded regtest [`TransparentAddress::PublicKey`].
|
||||||
/// Same as the testnet prefix.
|
/// Same as the testnet prefix.
|
||||||
///
|
///
|
||||||
/// [`TransparentAddress::PublicKey`]: zcash_primitives::legacy::TransparentAddress::PublicKey
|
/// [`TransparentAddress::PublicKey`]: crate::legacy::TransparentAddress::PublicKey
|
||||||
pub const B58_PUBKEY_ADDRESS_PREFIX: [u8; 2] = [0x1d, 0x25];
|
pub const B58_PUBKEY_ADDRESS_PREFIX: [u8; 2] = [0x1d, 0x25];
|
||||||
|
|
||||||
/// The prefix for a Base58Check-encoded regtest [`TransparentAddress::Script`].
|
/// The prefix for a Base58Check-encoded regtest [`TransparentAddress::Script`].
|
||||||
/// Same as the testnet prefix.
|
/// Same as the testnet prefix.
|
||||||
///
|
///
|
||||||
/// [`TransparentAddress::Script`]: zcash_primitives::legacy::TransparentAddress::Script
|
/// [`TransparentAddress::Script`]: crate::legacy::TransparentAddress::Script
|
||||||
pub const B58_SCRIPT_ADDRESS_PREFIX: [u8; 2] = [0x1c, 0xba];
|
pub const B58_SCRIPT_ADDRESS_PREFIX: [u8; 2] = [0x1c, 0xba];
|
||||||
|
|
|
@ -9,7 +9,7 @@ pub const COIN_TYPE: u32 = 1;
|
||||||
///
|
///
|
||||||
/// Defined in [ZIP 32].
|
/// Defined in [ZIP 32].
|
||||||
///
|
///
|
||||||
/// [`ExtendedSpendingKey`]: zcash_primitives::zip32::ExtendedSpendingKey
|
/// [`ExtendedSpendingKey`]: crate::zip32::ExtendedSpendingKey
|
||||||
/// [ZIP 32]: https://github.com/zcash/zips/blob/master/zip-0032.rst
|
/// [ZIP 32]: https://github.com/zcash/zips/blob/master/zip-0032.rst
|
||||||
pub const HRP_SAPLING_EXTENDED_SPENDING_KEY: &str = "secret-extended-key-test";
|
pub const HRP_SAPLING_EXTENDED_SPENDING_KEY: &str = "secret-extended-key-test";
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ pub const HRP_SAPLING_EXTENDED_SPENDING_KEY: &str = "secret-extended-key-test";
|
||||||
///
|
///
|
||||||
/// Defined in [ZIP 32].
|
/// Defined in [ZIP 32].
|
||||||
///
|
///
|
||||||
/// [`ExtendedFullViewingKey`]: zcash_primitives::zip32::ExtendedFullViewingKey
|
/// [`ExtendedFullViewingKey`]: crate::zip32::ExtendedFullViewingKey
|
||||||
/// [ZIP 32]: https://github.com/zcash/zips/blob/master/zip-0032.rst
|
/// [ZIP 32]: https://github.com/zcash/zips/blob/master/zip-0032.rst
|
||||||
pub const HRP_SAPLING_EXTENDED_FULL_VIEWING_KEY: &str = "zxviewtestsapling";
|
pub const HRP_SAPLING_EXTENDED_FULL_VIEWING_KEY: &str = "zxviewtestsapling";
|
||||||
|
|
||||||
|
@ -25,16 +25,16 @@ pub const HRP_SAPLING_EXTENDED_FULL_VIEWING_KEY: &str = "zxviewtestsapling";
|
||||||
///
|
///
|
||||||
/// Defined in section 5.6.4 of the [Zcash Protocol Specification].
|
/// Defined in section 5.6.4 of the [Zcash Protocol Specification].
|
||||||
///
|
///
|
||||||
/// [`PaymentAddress`]: zcash_primitives::primitives::PaymentAddress
|
/// [`PaymentAddress`]: crate::primitives::PaymentAddress
|
||||||
/// [Zcash Protocol Specification]: https://github.com/zcash/zips/blob/master/protocol/protocol.pdf
|
/// [Zcash Protocol Specification]: https://github.com/zcash/zips/blob/master/protocol/protocol.pdf
|
||||||
pub const HRP_SAPLING_PAYMENT_ADDRESS: &str = "ztestsapling";
|
pub const HRP_SAPLING_PAYMENT_ADDRESS: &str = "ztestsapling";
|
||||||
|
|
||||||
/// The prefix for a Base58Check-encoded testnet [`TransparentAddress::PublicKey`].
|
/// The prefix for a Base58Check-encoded testnet [`TransparentAddress::PublicKey`].
|
||||||
///
|
///
|
||||||
/// [`TransparentAddress::PublicKey`]: zcash_primitives::legacy::TransparentAddress::PublicKey
|
/// [`TransparentAddress::PublicKey`]: crate::legacy::TransparentAddress::PublicKey
|
||||||
pub const B58_PUBKEY_ADDRESS_PREFIX: [u8; 2] = [0x1d, 0x25];
|
pub const B58_PUBKEY_ADDRESS_PREFIX: [u8; 2] = [0x1d, 0x25];
|
||||||
|
|
||||||
/// The prefix for a Base58Check-encoded testnet [`TransparentAddress::Script`].
|
/// The prefix for a Base58Check-encoded testnet [`TransparentAddress::Script`].
|
||||||
///
|
///
|
||||||
/// [`TransparentAddress::Script`]: zcash_primitives::legacy::TransparentAddress::Script
|
/// [`TransparentAddress::Script`]: crate::legacy::TransparentAddress::Script
|
||||||
pub const B58_SCRIPT_ADDRESS_PREFIX: [u8; 2] = [0x1c, 0xba];
|
pub const B58_SCRIPT_ADDRESS_PREFIX: [u8; 2] = [0x1c, 0xba];
|
||||||
|
|
|
@ -203,6 +203,8 @@ impl TzeIn {
|
||||||
/// This calls [`write_without_witness`] to serialize witness metadata,
|
/// This calls [`write_without_witness`] to serialize witness metadata,
|
||||||
/// then appends the witness bytes themselves. This is the encoded
|
/// then appends the witness bytes themselves. This is the encoded
|
||||||
/// form that is used in a serialized transaction.
|
/// form that is used in a serialized transaction.
|
||||||
|
///
|
||||||
|
/// [`write_without_witness`]: TzeIn::write_without_witness
|
||||||
pub fn write<W: Write>(&self, mut writer: W) -> io::Result<()> {
|
pub fn write<W: Write>(&self, mut writer: W) -> io::Result<()> {
|
||||||
self.write_without_witness(&mut writer)?;
|
self.write_without_witness(&mut writer)?;
|
||||||
Vector::write(&mut writer, &self.witness.payload, |w, b| w.write_u8(*b))
|
Vector::write(&mut writer, &self.witness.payload, |w, b| w.write_u8(*b))
|
||||||
|
|
|
@ -25,6 +25,7 @@ and this library adheres to Rust's notion of
|
||||||
- `zcash_proofs::sapling::SaplingVerificationContext: Default`
|
- `zcash_proofs::sapling::SaplingVerificationContext: Default`
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
- MSRV is now 1.47.0.
|
||||||
- `zcash_proofs::load_parameters` now returns `ZcashParameters`.
|
- `zcash_proofs::load_parameters` now returns `ZcashParameters`.
|
||||||
|
|
||||||
## [0.4.0] - 2020-09-09
|
## [0.4.0] - 2020-09-09
|
||||||
|
|
Loading…
Reference in New Issue