Commit Graph

222 Commits

Author SHA1 Message Date
Jack Grigg 6f4d68f935 zcash_proofs 0.12.1 2023-06-28 18:37:37 +01:00
Jack Grigg 3de60c7b91 Replace `directories` dependency with `home, known-folders, xdg`
`directories 5.0.1` added a dependency on `option-ext`, which is
licensed as MPL (a copyleft license). The replacement dependencies
are all licensed as `MIT OR Apache-2.0`.
2023-06-28 18:37:37 +01:00
Kris Nuttycombe e7fb276b04 Release zcash_proofs 0.12.0 2023-06-06 15:56:29 -06:00
Kris Nuttycombe f9cacc5b21 Release zcash_primitives 0.12.0 2023-06-06 15:56:28 -06:00
Kris Nuttycombe 3dd0c63095 Update to `incrementalmerkletree 0.4`, `orchard 0.5` 2023-06-06 14:27:39 -06:00
Kris Nuttycombe 980736806f Upgrade `incrementalmerkletree` & `orchard` patch versions. 2023-05-25 12:33:25 -06:00
Jack Grigg 6419e1e363 Remove `inferno` pin now that its MSRV is compatible with ours 2023-05-16 15:39:06 +00:00
Jack Grigg 8681b56d52 Bump MSRV for `zcash_primitives` and dependents to 1.65 2023-05-16 15:37:07 +00:00
Kris Nuttycombe 1f9747e15f Move merkle tree types to the `incrementalmerkletree` crate.
This removes the `CommitmentTree`, `IncrementalWitness`, and
`MerklePath` types in favor of equivalent versions available
from the `incrementalmerkletree` crate.
2023-05-04 12:30:56 -06:00
Kris Nuttycombe ec57d23115 Use const generics to set commitment tree & incremental witness depths.
This is in preparation for extraction into the `incrementalmerkletree`
crate, which is not Sapling-specific and therefore cannot hard-code
the depths of these data structures.
2023-05-04 12:16:09 -06:00
Jack Grigg 4678ff8299 zcash_proofs 0.11.0 2023-04-14 23:58:53 +00:00
Jack Grigg a419b56e80 zcash_primitives 0.11.0 2023-04-14 23:56:16 +00:00
Jack Grigg 7be5d1bf7d Update changelogs 2023-04-14 23:49:13 +00:00
Jack Grigg 43eed3d8f9 zcash_proofs: `directories 5` 2023-04-11 15:48:44 +00:00
Marek c9f55a4c5d Use `u64` instead of `usize` for `byte_count` 2023-04-04 18:38:28 +02:00
Kris Nuttycombe fcd6f00396 Upgrade to redjubjub 0.7.0
This removes our reliance on the following out-of-date transitive
dependencies that are duplicative of more recent versions of crates
we depend on:
- bls12_381 v0.7
- ff v0.12
- group v0.12
- jubjub v0.9
- pasta_curves v0.4
- reddsa v0.3
2023-03-30 14:53:19 -06:00
Kris Nuttycombe cb1be45f22 Update CHANGELOGs to reflect the addition of the zcash_primitives/multicore feature. 2023-03-20 15:11:05 -06:00
Kris Nuttycombe 7c1a4c898d Fix wasm32 CI runner.
The `halo2_proofs/multicore` flag must be disabled when running wasm
builds; this ensures that we do not accidentally include it as a
transitive dependency when building with `--no-default-features`.
2023-03-20 14:39:07 -06:00
Kris Nuttycombe 77fbd8cb4f Update dependencies to reflect changes in ff 0.13 2023-03-20 14:35:45 -06:00
Kris Nuttycombe 9c56b21de7 Pin the `inferno` transitive dependency to avoid MSRV errors. 2023-02-16 11:06:24 -07:00
Jack Grigg 24b5e04c8d zcash_proofs 0.10.0 2023-02-01 02:10:42 +00:00
Jack Grigg 9852c31970 zcash_primitives 0.10.0 2023-02-01 02:10:42 +00:00
Jack Grigg ded14adbb3 Add `sapling::keys::DiversifiedTransmissionKey` 2023-01-24 15:02:38 +00:00
Jack Grigg 87d0bd7db1 Refactor `sapling::Note`
Its internals are now private, and it stores a `PaymentAddress` (and by
extension the diversifier) instead of `g_d`.
2023-01-24 15:02:27 +00:00
Jack Grigg dff21222fb Require `PaymentAddress` to contain a valid diversifier 2023-01-24 14:51:13 +00:00
Jack Grigg 42c332a7a8 Use `sapling::note::ExtractedNoteCommitment` type in APIs 2023-01-24 14:37:11 +00:00
Jack Grigg 809427f6bd criterion 0.4 2023-01-20 00:03:10 +00:00
Jack Grigg 49b1cb3e69 Bump MSRV for `zcash_primitives` and dependents to 1.60
The MSRVs of the component crates are left as-is, partly because our
dependencies don't require us to bump them, and partly because those
crates have no pending changes and are relatively stable. We also plan
to split the component crates out into a separate repository, where it
will be easier to have a separate MSRV.

Closes zcash/librustzcash#759.
2023-01-19 23:48:24 +00:00
Jack Grigg 23922ca290 Add Sapling value types
These are modeled after the value types developed for the `orchard`
crate.
2022-12-20 05:16:39 +00:00
Jack Grigg fee0b6a18d Make Sapling transaction structs non-transparent
We instead provide getters for the struct fields.
2022-12-13 04:03:06 +00:00
Kris Nuttycombe bbe6280bb0 Fix clippy complaints. 2022-12-09 09:32:34 -07:00
Jack Grigg c03ef4926a zcash_proofs 0.9.0 2022-11-11 20:39:36 +00:00
Jack Grigg c3b6e5a72a zcash_primitives 0.9.0 2022-11-11 20:37:55 +00:00
Jack Grigg 3720b45feb Categorise dependencies in `Cargo.toml` files
This should make it easier to upgrade dependencies in future.
2022-11-01 09:02:54 +00:00
Jack Grigg a0016588ac Remove unused dependencies
Some were only used by tests, others weren't used at all.
2022-11-01 09:02:27 +00:00
Kris Nuttycombe 5bf36989e2 Fix beta clippy complaints. 2022-10-19 13:35:51 -06:00
Sean Bowe 176e21b015
Update zcash_primitives to orchard 0.3; release zcash_primitives and zcash_proofs 0.8. 2022-10-19 13:32:51 -06:00
Marek 75b4036862 Avoid a needless range loop 2022-10-07 17:19:03 +02:00
Marek f0f348ed00 Use the provided buffer when reading the response
The implementation of `io:Read` for `ResponseLazyReader` used to return
only one byte regardless of the size of the provided `buf`, which
significantly degraded the performance of loading the response.

This change makes use of the provided `buf`. On my machine with Rust
1.64, the downloading speed went up from ~100 KiB/s to ~2 MiB/s.
However, as before this change, the process still uses 100% of a single
CPU thread when downloading the response. The most likely reason is that
we still manually read each byte of the response. I can download the
same data with ~ 50 MiB/s on my machine using a different HTTP client.

This fix seems to be sufficient for now.
2022-10-05 23:47:50 +02:00
Marek 01a3c64606 Use `ResponseLazyReader` locally 2022-10-05 22:22:27 +02:00
Jack Grigg 620ff21005 zcash_proofs: Remove direct ff dependency 2022-10-02 23:14:14 +01:00
Kris Nuttycombe 03c3370de8 Fix problems identified by clippy's beta lints 2022-09-17 08:57:37 -06:00
Kris Nuttycombe 16a0e43f2d Update to Rust 2021 and explicitly set MSRVs 2022-09-02 12:05:09 -06:00
teor 276bcc34f5
Download sprout parameters in zcash_proofs (#459)
* Download sprout parameters in-memory
* Add download_sapling_parameters and deprecate download_parameters
  * This avoids confusion between sprout and sapling downloads,
    while maintaining backward compatibility.
* Download a single file, rather than parts
  * This is more efficient, because TCP adjusts its transfer speed
    in the first ~20 seconds of each new connection.
* Only download files if needed, but always check the hashes
* Allow the caller to specify a response timeout
* Stream downloads from server to disk
* Refactor file loads to use the same verifying function as downloads
* Check file sizes to help debug parameter load failures
* Remove downloaded files on error (but leave existing files alone)
* Add a sprout and sapling download example
* Move the download Read impl into its own module
* Derive standard traits on SaplingParameterPaths
* Require features for the load parameters method
2022-08-04 10:19:56 -06:00
Kris Nuttycombe 199c49760b Use the new name rustdoc::broken_intra_doc_links 2022-07-29 15:56:44 -06:00
Kris Nuttycombe f1c2da7b1d Add sapling::NullifierDerivingKey newtype.
Nullifier computation only requires the nullifier deriving key,
not the entire Sapling viewing key. This separation of concerns
will be needed for batch decryption when wallet-internal keys
will need to be considered.
2022-07-28 15:23:21 -06:00
Jack Grigg bac093f585 zcash_proofs 0.7.1 2022-07-05 17:33:07 +00:00
Jack Grigg 6f0e26a504 zcash_proofs: Use threadpool for Sapling proof batch validation 2022-07-05 15:52:22 +00:00
Jack Grigg b52f3cc0fc zcash_proofs: Implement batch validation for Sapling bundles
We use the `redjubjub` crate for batch validation, because the demo
batch validation API in `zcash_primitives::redjubjub` cannot be used
outside that crate, and using `redjubjub` enables this to be published
as a point release of `zcash_proofs`.
2022-07-05 15:45:04 +00:00
Jack Grigg 9d72e87125 zcash_proofs: Split out internals of `SaplingVerificationContext`
The new `SaplingVerificationContextInner` struct handles accumulation of
`cv`, and preparation of the inputs to proof and signature verification.
`SaplingVerificationContext` uses it to maintain its existing inline
unbatched verification API.
2022-07-03 22:58:11 +00:00