Commit Graph

205 Commits

Author SHA1 Message Date
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
Daira Hopwood a9aa2929d2 Address feedback about the use of "permissive".
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-06-28 16:46:13 +01:00
Daira Hopwood 75ca854005 Projects that rely on BOSL exceptions should say that they do.
fixes #576

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-06-28 12:29:16 +01:00
Jack Grigg 6f4de16b97 zcash_proofs 0.7.0 2022-06-24 17:00:39 +00:00
Jack Grigg e952ff637e zcash_primitives 0.7.0 2022-06-24 17:00:39 +00:00
Jack Grigg 59b20c6e31 pprof 0.9 2022-06-24 16:27:06 +00:00
Jack Grigg 1161fc963f zcash_proofs 0.6.0 2022-05-10 23:33:05 +00:00
Jack Grigg 3ecfd26d79 zcash_primitives 0.6.0 2022-05-10 23:33:05 +00:00
Jack Grigg 8c086662df zcash_proofs: `bellman 0.13` 2022-05-07 03:24:37 +00:00
Jack Grigg 5b3632d9d9 zcash_proofs: Add flamegraph profiling to Sapling Spend benchmark 2022-05-07 03:20:19 +00:00
Jack Grigg 144512b547 Migrate to `ff 0.12` 2022-05-06 20:03:49 +00:00
Jack Grigg 91d9a42a08 Merge branch 'non-consensus-changes-on-branchid-37519621' into merge-non-consensus-changes-3 2022-02-28 23:22:40 +00:00
Kris Nuttycombe 600c06a408 Update MSRV to 1.56.1 2022-02-24 12:26:14 -07:00
Jack Grigg 4674291fd9 zcash_proofs: Silence clippy 1.54.0 lint 2022-02-16 00:03:07 +00:00
Jack Grigg f822d7aabc Bump MSRV to 1.54.0
This is the MSRV for the orchard crate version that contains the changes
to the Orchard circuit.

Closes zcash/librustzcash#513.
2022-02-15 16:39:29 +00:00
Jack Grigg dbfa673500 Merge branch 'non-consensus-changes-on-branchid-37519621' into merge-non-consensus-changes-again 2022-02-14 18:11:09 +00:00
Dimitris Apostolou e600d7b917
Fix typos 2022-02-03 20:15:32 +02:00
Kris Nuttycombe a304c3953b Fix Clippy beta linting complaints. 2022-02-02 16:02:45 -07:00