Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generalize the zcash_client_sqlite test framework and extract it to zcash_client_backend #1530

Merged
merged 19 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
026f5f6
zcash_client_backend: Fix broken --all-features build.
nuttycom Sep 4, 2024
69953cc
zcash_client_backend: Make `AccountId` an associated type of the `Acc…
nuttycom Sep 4, 2024
0ae5ac1
zcash_client_backend: Make `data_api` traits delegatable via `ambassa…
nuttycom Sep 5, 2024
db6b970
zcash_client_sqlite: Generalize the test framework to enable it to be…
nuttycom Sep 5, 2024
b43f3bf
zcash_client_backend: Move data_api::testing module into its own file.
nuttycom Sep 5, 2024
acd26d5
zcash_client_sqlite: Move `TransactionSummary` to `zcash_client_backend`
nuttycom Sep 5, 2024
58b464d
zcash_client_sqlite: Generalize more `TestState` operations.
nuttycom Sep 5, 2024
15e124e
zcash_client_sqlite: Generalize `TestState::get_wallet_summary`
nuttycom Sep 5, 2024
ce59a67
zcash_client_sqlite: Remove the remainder of the sqlite dependencies …
nuttycom Sep 5, 2024
7e9f78b
zcash_client_sqlite: Generalize `TestBuilder::with_block_cache`
nuttycom Sep 6, 2024
e55df6c
zcash_client_sqlite: Move `TestState` to `zcash_client_backend`
nuttycom Sep 6, 2024
2be0dfb
zcash_client_backend: Record audit of `ambassador` crate.
nuttycom Sep 6, 2024
f2654f5
zcash_client_backend: Fix broken intra-doc links and other doc warnings.
nuttycom Sep 6, 2024
49dffbf
zcash_client_sqlite: Remove unused `OutputRecoveryError` type.
nuttycom Sep 6, 2024
4f5b3ef
zcash_client_backend: Move the `ShieldedPoolTester` trait from `zcash…
nuttycom Sep 6, 2024
7e36561
zcash_client_backend: Move `SaplingPoolTester` here from `zcash_clien…
nuttycom Sep 6, 2024
33b8f89
zcash_client_backend: Move `OrchardPoolTester` here from `zcash_clien…
nuttycom Sep 6, 2024
d4e26d5
zcash_client_backend: Migrate `send_single_step_proposed_transfer` te…
nuttycom Sep 6, 2024
cd71c30
Address non-documentation review comments
str4d Sep 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ lazy_static = "1"
static_assertions = "1"

# Tests and benchmarks
ambassador = "0.4"
assert_matches = "1.5"
criterion = "0.5"
proptest = "1"
Expand Down
2 changes: 1 addition & 1 deletion components/zip321/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ mod parse {
)(input)
}

/// The primary parser for <name>=<value> query-string parameter pair.
/// The primary parser for `name=value` query-string parameter pairs.
pub fn zcashparam(input: &str) -> IResult<&str, IndexedParam> {
map_res(
separated_pair(indexed_name, char('='), recognize(qchars)),
Expand Down
6 changes: 6 additions & 0 deletions supply-chain/audits.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ description = "The cryptographic code in this crate has been reviewed for correc
[criteria.license-reviewed]
description = "The license of this crate has been reviewed for compatibility with its usage in this repository."

[[audits.ambassador]]
who = "Kris Nuttycombe <kris@nutty.land>"
criteria = "safe-to-deploy"
version = "0.4.1"
notes = "Crate uses no unsafe code and the macros introduced by this crate generate the expected trait implementations without introducing additional unexpected operations."

[[audits.anyhow]]
who = "Daira-Emma Hopwood <daira@jacaranda.org>"
criteria = "safe-to-deploy"
Expand Down
5 changes: 5 additions & 0 deletions zcash_client_backend/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]

### Changed
- 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.

## [0.13.0] - 2024-08-20

`zcash_client_backend` now supports TEX (transparent-source-only) addresses as specified
Expand Down
31 changes: 27 additions & 4 deletions zcash_client_backend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,13 @@ incrementalmerkletree.workspace = true
shardtree.workspace = true

# - Test dependencies
ambassador = { workspace = true, optional = true }
assert_matches = { workspace = true, optional = true }
pasta_curves = { workspace = true, optional = true }
proptest = { workspace = true, optional = true }
jubjub = { workspace = true, optional = true }
rand_chacha = { workspace = true, optional = true }
zcash_proofs = { workspace = true, optional = true }

# - ZIP 321
nom = "7"
Expand Down Expand Up @@ -137,17 +142,21 @@ tonic-build = { workspace = true, features = ["prost"] }
which = "4"

[dev-dependencies]
ambassador.workspace = true
assert_matches.workspace = true
gumdrop = "0.8"
incrementalmerkletree = { workspace = true, features = ["test-dependencies"] }
jubjub.workspace = true
proptest.workspace = true
rand_core.workspace = true
rand.workspace = true
rand_chacha.workspace = true
shardtree = { workspace = true, features = ["test-dependencies"] }
zcash_proofs.workspace = true
tokio = { version = "1.21.0", features = ["rt-multi-thread"] }
zcash_address = { workspace = true, features = ["test-dependencies"] }
zcash_keys = { workspace = true, features = ["test-dependencies"] }
tokio = { version = "1.21.0", features = ["rt-multi-thread"] }
zcash_primitives = { workspace = true, features = ["test-dependencies"] }
zcash_proofs = { workspace = true, features = ["bundled-prover"] }
zcash_protocol = { workspace = true, features = ["local-consensus"] }

[features]
## Enables the `tonic` gRPC client bindings for connecting to a `lightwalletd` server.
Expand All @@ -164,7 +173,7 @@ transparent-inputs = [
]

## Enables receiving and spending Orchard funds.
orchard = ["dep:orchard", "zcash_keys/orchard"]
orchard = ["dep:orchard", "dep:pasta_curves", "zcash_keys/orchard"]

## Exposes a wallet synchronization function that implements the necessary state machine.
sync = [
Expand Down Expand Up @@ -195,11 +204,17 @@ tor = [

## Exposes APIs that are useful for testing, such as `proptest` strategies.
test-dependencies = [
"dep:ambassador",
"dep:assert_matches",
"dep:proptest",
"dep:jubjub",
"dep:rand",
"dep:rand_chacha",
"orchard?/test-dependencies",
"zcash_keys/test-dependencies",
"zcash_primitives/test-dependencies",
"zcash_proofs/bundled-prover",
"zcash_protocol/local-consensus",
"incrementalmerkletree/test-dependencies",
]

Expand All @@ -214,6 +229,14 @@ unstable-serialization = ["dep:byteorder"]
## Exposes the [`data_api::scanning::spanning_tree`] module.
unstable-spanning-tree = []

## Exposes access to the lightwalletd server via TOR
tor-lightwalletd-tonic = [
"tor",
"lightwalletd-tonic",
"tonic?/tls",
"tonic?/tls-webpki-roots"
]

[lib]
bench = false

Expand Down
Loading
Loading