Skip to content

Commit

Permalink
Merge branch 'ec2/memwallet' into ec2/ephemeral-addr
Browse files Browse the repository at this point in the history
  • Loading branch information
ec2 committed Oct 10, 2024
2 parents 4e10b65 + 5e5b303 commit d6d54d9
Show file tree
Hide file tree
Showing 15 changed files with 144 additions and 32 deletions.
22 changes: 14 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 6 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ members = [
"components/zcash_protocol",
"components/zip321",
"devtools",
"pczt",
"zcash",
"zcash_client_backend",
"zcash_client_sqlite",
Expand Down Expand Up @@ -34,11 +35,11 @@ categories = ["cryptography::cryptocurrencies"]
# Intra-workspace dependencies
equihash = { version = "0.2", path = "components/equihash" }
zcash_address = { version = "0.6", path = "components/zcash_address" }
zcash_client_backend = { version = "0.13", path = "zcash_client_backend" }
zcash_client_backend = { version = "0.14", path = "zcash_client_backend" }
zcash_encoding = { version = "0.2.1", path = "components/zcash_encoding" }
zcash_keys = { version = "0.3", path = "zcash_keys" }
zcash_keys = { version = "0.4", path = "zcash_keys" }
zcash_protocol = { version = "0.4", path = "components/zcash_protocol" }
zip321 = { version = "0.1", path = "components/zip321" }
zip321 = { version = "0.2", path = "components/zip321" }

zcash_note_encryption = "0.4"
zcash_primitives = { version = "0.19", path = "zcash_primitives", default-features = false }
Expand All @@ -49,7 +50,7 @@ bellman = { version = "0.14", default-features = false, features = ["groth16"] }
ff = "0.13"
group = "0.13"
incrementalmerkletree = "0.7"
shardtree = "0.4"
shardtree = "0.5"
zcash_spec = "0.1"

# Payment protocols
Expand Down Expand Up @@ -141,7 +142,7 @@ criterion = "0.5"
proptest = "1"
rand_chacha = "0.3"
rand_xorshift = "0.3"
incrementalmerkletree-testing = "0.1"
incrementalmerkletree-testing = "0.2"

# Tor
# - `arti-client` depends on `rusqlite`, and a version mismatch there causes a compilation
Expand All @@ -166,5 +167,3 @@ unexpected_cfgs = { level = "warn", check-cfg = ['cfg(zcash_unstable, values("zf

[patch.crates-io]
zip32 = { git = "https://github.com/zcash/zip32.git", branch = "diversifier_index_ord"}
incrementalmerkletree-testing = { git = "https://github.com/zcash/incrementalmerkletree", rev = "336452152536dde5831c9a4029fd26b4ec310608" }
shardtree = { git = "https://github.com/zcash/incrementalmerkletree", rev = "336452152536dde5831c9a4029fd26b4ec310608" }
5 changes: 5 additions & 0 deletions components/zip321/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and this library adheres to Rust's notion of

## [Unreleased]

## [0.2.0] 2024-10-04

### Changed
- Migrated to `zcash_address 0.6`

## [0.1.0] 2024-08-20

The contents of this crate were factored out from `zcash_client_backend` to
Expand Down
2 changes: 1 addition & 1 deletion components/zip321/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "zip321"
description = "Parsing functions and data types for Zcash ZIP 321 Payment Request URIs"
version = "0.1.0"
version = "0.2.0"
authors = [
"Kris Nuttycombe <[email protected]>"
]
Expand Down
13 changes: 13 additions & 0 deletions pczt/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[package]
name = "pczt"
version = "0.0.0"
authors = ["Jack Grigg <[email protected]>"]
edition.workspace = true
rust-version.workspace = true
description = "Tools for working with partially-created Zcash transactions"
homepage = "https://github.com/zcash/librustzcash"
repository.workspace = true
license.workspace = true
categories.workspace = true

[dependencies]
21 changes: 21 additions & 0 deletions pczt/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# pczt

TBD

## License

Licensed under either of

* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or
http://www.apache.org/licenses/LICENSE-2.0)
* MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)

at your option.

### Contribution

Unless you explicitly state otherwise, any contribution intentionally
submitted for inclusion in the work by you, as defined in the Apache-2.0
license, shall be dual licensed as above, without any additional terms or
conditions.

1 change: 1 addition & 0 deletions pczt/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

27 changes: 17 additions & 10 deletions supply-chain/imports.lock
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@ user-id = 169181
user-login = "nuttycom"
user-name = "Kris Nuttycombe"

[[publisher.incrementalmerkletree-testing]]
version = "0.2.0"
when = "2024-10-04"
user-id = 169181
user-login = "nuttycom"
user-name = "Kris Nuttycombe"

[[publisher.orchard]]
version = "0.10.0"
when = "2024-10-02"
Expand All @@ -70,8 +77,8 @@ user-login = "nuttycom"
user-name = "Kris Nuttycombe"

[[publisher.shardtree]]
version = "0.4.0"
when = "2024-08-12"
version = "0.5.0"
when = "2024-10-04"
user-id = 169181
user-login = "nuttycom"
user-name = "Kris Nuttycombe"
Expand Down Expand Up @@ -231,15 +238,15 @@ user-login = "str4d"
user-name = "Jack Grigg"

[[publisher.zcash_client_backend]]
version = "0.13.0"
when = "2024-08-20"
version = "0.14.0"
when = "2024-10-04"
user-id = 169181
user-login = "nuttycom"
user-name = "Kris Nuttycombe"

[[publisher.zcash_client_sqlite]]
version = "0.11.2"
when = "2024-09-03"
version = "0.12.0"
when = "2024-10-04"
user-id = 169181
user-login = "nuttycom"
user-name = "Kris Nuttycombe"
Expand All @@ -265,8 +272,8 @@ user-login = "str4d"
user-name = "Jack Grigg"

[[publisher.zcash_keys]]
version = "0.3.0"
when = "2024-08-20"
version = "0.4.0"
when = "2024-10-04"
user-id = 169181
user-login = "nuttycom"
user-name = "Kris Nuttycombe"
Expand Down Expand Up @@ -314,8 +321,8 @@ user-login = "str4d"
user-name = "Jack Grigg"

[[publisher.zip321]]
version = "0.1.0"
when = "2024-08-20"
version = "0.2.0"
when = "2024-10-04"
user-id = 169181
user-login = "nuttycom"
user-name = "Kris Nuttycombe"
Expand Down
31 changes: 29 additions & 2 deletions zcash_client_backend/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,41 @@ and this library adheres to Rust's notion of

## [Unreleased]

## [0.14.0] - 2024-10-04

### Added
- `zcash_client_backend::data_api`:
- `GAP_LIMIT`
- `WalletSummary::recovery_progress`
- `SpendableNotes::{take_sapling, take_orchard}`
- Tests and testing infrastructure have been migrated from the
`zcash_client_sqlite` internal tests to the `testing` module, and have been
generalized so that they may be used for testing arbitrary implementations
of the `zcash_client_backend::data_api` interfaces. The following have been
added under the `test-dependencies` feature flag as part of this migration:
- `WalletTest`
- `testing::AddressType`
- `testing::CachedBlock`
- `testing::DataStoreFactory`
- `testing::FakeCompactOutput`
- `testing::InitialChainState`
- `testing::NoteCommitments`
- `testing::Reset`
- `testing::TestAccount`
- `testing::TestBuilder`
- `testing::TestCache`
- `testing::TestFvk`
- `testing::TestState`
- `testing::TransactionSummary`
- `testing::input_selector`
- `testing::orchard`
- `testing::pool`
- `testing::sapling`

### Changed
- Migrated to `orchard 0.10`, `sapling-crypto 0.3`, `zcash_address 0.6`,
`zcash_primitives 0.19`, `zcash_proofs 0.19`, `zcash_protocol 0.4`.
- Migrated to `orchard 0.10`, `sapling-crypto 0.3`, `shardtree 0.5`,
`zcash_address 0.6`, `zcash_primitives 0.19`, `zcash_proofs 0.19`,
`zcash_protocol 0.4`.
- The `Account` trait now uses an associated type for its `AccountId`
type instead of a type parameter. This change allows for the simplification
of some type signatures.
Expand Down
2 changes: 1 addition & 1 deletion zcash_client_backend/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "zcash_client_backend"
description = "APIs for creating shielded Zcash light clients"
version = "0.13.0"
version = "0.14.0"
authors = [
"Jack Grigg <[email protected]>",
"Kris Nuttycombe <[email protected]>"
Expand Down
13 changes: 12 additions & 1 deletion zcash_client_sqlite/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,19 @@ and this library adheres to Rust's notion of

## [Unreleased]

### Added
- Exposed `AccountId::from_u32` and `AccountId::as_u32` conversions under the
`unstable` feature flag.

## [0.12.0] - 2024-10-04

### Added
- `impl WalletTest for WalletDb` is now available under the `test-dependencies`
feature flag.

### Changed
- Migrated to `orchard 0.10`, `sapling-crypto 0.3`, `zcash_address 0.6`,
- Migrated to `zcash_client_backend 0.14`, `orchard 0.10`,
`sapling-crypto 0.3`, `shardtree 0.5`, `zcash_address 0.6`,
`zcash_primitives 0.19`, `zcash_proofs 0.19`, `zcash_protocol 0.4`.
- `zcash_client_sqlite::error::SqliteClientError::RequestedRewindInvalid`
is now a structured variant.
Expand Down
2 changes: 1 addition & 1 deletion zcash_client_sqlite/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "zcash_client_sqlite"
description = "An SQLite-based Zcash light client"
version = "0.11.2"
version = "0.12.0"
authors = [
"Jack Grigg <[email protected]>",
"Kris Nuttycombe <[email protected]>"
Expand Down
20 changes: 20 additions & 0 deletions zcash_client_sqlite/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,26 @@ pub(crate) const DEFAULT_UA_REQUEST: UnifiedAddressRequest =
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, Default)]
pub struct AccountId(u32);

impl AccountId {
/// Constructs an `AccountId` from a bare `u32` value. The resulting identifier is not
/// guaranteed to correspond to any account stored in the database.
#[cfg(feature = "unstable")]
pub fn from_u32(value: u32) -> Self {
AccountId(value)
}

/// Unwraps a raw `accounts` table primary key value from its typesafe wrapper.
///
/// Note that account identifiers are not guaranteed to be stable; if a wallet is restored from
/// seed, the account identifiers of the restored wallet are not likely to correspond to the
/// identifiers for the same accounts in another wallet created or restored from the same seed.
/// These unwrapped identifier values should therefore be treated as ephemeral.
#[cfg(feature = "unstable")]
pub fn as_u32(&self) -> u32 {
self.0
}
}

impl ConditionallySelectable for AccountId {
fn conditional_select(a: &Self, b: &Self, choice: subtle::Choice) -> Self {
AccountId(ConditionallySelectable::conditional_select(
Expand Down
2 changes: 2 additions & 0 deletions zcash_keys/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ and this library adheres to Rust's notion of

## [Unreleased]

## [0.4.0] - 2024-10-04

### Added
- `zcash_keys::encoding::decode_extfvk_with_network`
- `impl std::error::Error for Bech32DecodeError`
Expand Down
2 changes: 1 addition & 1 deletion zcash_keys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "zcash_keys"
description = "Zcash key and address management"
version = "0.3.0"
version = "0.4.0"
authors = [
"Jack Grigg <[email protected]>",
"Kris Nuttycombe <[email protected]>"
Expand Down

0 comments on commit d6d54d9

Please sign in to comment.