Commit Graph

208 Commits

Author SHA1 Message Date
Sean Bowe bd7f9d7c3c
Bump zcash_encoding and zcash_address crate versions to 0.2. 2022-10-19 16:51:59 -06:00
Kris Nuttycombe 42fd3c1091 Fix changelogs for `zcash_encoding` and `zcash_history` 2022-10-19 15:52:42 -06:00
Jack Grigg 8f068b3b71 zcash_note_encryption 0.2.0 2022-10-13 21:35:39 +00:00
Jack Grigg 9a010d42ff zcash_note_encryption: Clean up changelog and readme
We no longer depend on the previously-mentioned dependencies.
2022-10-13 21:23:09 +00:00
Jack Grigg 8842de18cc Remove unused dependencies
These were mostly detected with `cargo-udeps`, for which I've also added
exclusions for the dependencies it can't detect are used in doc-tests.
2022-10-13 20:06:52 +00:00
Kris Nuttycombe 34a7abd653 Update unified address test vectors
This updates unified address test vectors after
https://github.com/zcash-hackworks/zcash-test-vectors/pull/89
to check addresses across multiple diversifier indices, and also
removes the superfluous binary encoding of UA strings.
2022-10-07 19:50:32 -06:00
Kris Nuttycombe 03c3370de8 Fix problems identified by clippy's beta lints 2022-09-17 08:57:37 -06:00
Kris Nuttycombe 29220c716f Remove `zcash_primitives` as a zcash_note_encryption dev dependency.
This was only used to provide example code for Sapling usage of
the `NoteEncryption` struct; this example code has been moved
to `sapling::note_encryption`.
2022-09-16 12:52:00 -06:00
Kris Nuttycombe 72b5e6dfc3 Upgrade chacha20poly1305 dependency to version 0.10
Also upgrade  the `chacha20`, `cipher`, and `subtle` dependency
versions.
2022-09-16 12:52:00 -06:00
Daira Hopwood 515b0a40ec zcash_note_encryption: Add API to prepare epk.
Co-authored-by: Jack Grigg <jack@electriccoin.co>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-09-15 03:22:41 +01:00
Kris Nuttycombe 8439f1a4f7 Add binary encoding for unified spending keys.
This encoding is wallet-internal-only and is currently
guarded under the `unstable` feature flag.
2022-09-08 11:05:59 -06:00
Kris Nuttycombe a93f5945ab Remove redundant TryFrom/TryInto imports. 2022-09-02 12:05:15 -06:00
Kris Nuttycombe 16a0e43f2d Update to Rust 2021 and explicitly set MSRVs 2022-09-02 12:05:09 -06:00
Kris Nuttycombe 199c49760b Use the new name rustdoc::broken_intra_doc_links 2022-07-29 15:56:44 -06:00
Kris Nuttycombe 73314dc682 Use batch decryption in wallet scanning.
This modifies wallet scanning to perform per-block batched
decryption. It also alters the structure of the `ScanningKey`
trait to correctly include internal (change) keys in the scan
process.
2022-07-28 17:28:31 -06:00
Kris Nuttycombe 5873950648 Restructure batch decryption to avoid cartesian product of results.
While it is necessary in the worst case to perform `m * n` decryptions,
where `m` is the number of outputs being decrypted and `n` is the number
of IVKs, it is possible to stop performing trial decryptions when the
first successful decryption is performed. Also, it's inconvenient and
unnecessary to return the full cartesian product of these results, as
only one IVK will decrypt a given output. This commit modifies batch
trial decryption to stop on the first successful decryption, and instead
of returning the cartesian product of results we return the index of the
input IVK along with the output it decrypted. Note that this means that
trial decryption is not constant-time with respect to the number and/or
order of IVKs.
2022-07-28 15:23:21 -06: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 e952ff637e zcash_primitives 0.7.0 2022-06-24 17:00:39 +00:00
Jack Grigg a3cae5d36a equihash 0.2.0 2022-06-24 17:00:26 +00:00
str4d 3f5ba8de48
Merge pull request #569 from zcash/f4jumble-readme-link-fix
Fix a broken link to ZIP 316 in F4Jumble crate README.
2022-06-14 00:45:57 +01:00
Nathan Wilcox e2b688ea61
Fix a broken link to ZIP 316. 2022-06-13 09:50:01 -07:00
Jack Grigg b8e8a0c491 zcash_address: Add `ZcashAddress::convert_if_network`
This, along with the corresponding `TryFromRawAddress` trait, enables
converting `ZcashAddress` into a network-agnostic type.

Closes zcash/librustzcash#564.
2022-06-10 15:19:42 +00:00
Jack Grigg 16938d1c4f zcash_address: Replace `FromAddress` with `TryFromAddress`
This enables the user-defined conversions to be fallible, which they
will almost always want to be (as address data needs to be validated
before it can be used).
2022-06-07 18:09:42 +00:00
Jack Grigg 3ecfd26d79 zcash_primitives 0.6.0 2022-05-10 23:33:05 +00:00
Jack Grigg 54e9eb8708 zcash_address 0.1.0 2022-05-10 23:33:05 +00:00
Jack Grigg 6976d3fe85 zcash_encoding 0.1.0 2022-05-10 23:33:05 +00:00
Jack Grigg a27a5428f0 f4jumble 0.1.0 2022-05-10 23:33:05 +00:00
Jack Grigg 144512b547 Migrate to `ff 0.12` 2022-05-06 20:03:49 +00:00
Kris Nuttycombe 073d939859 Add `Vector::read_collected_mut` and `Array::read_collected_mut`
These variants allow parsing to be informed by additional
mutable external state.
2022-05-04 09:25:07 -06:00
Jack Grigg 32d6b57d71 f4jumble: Document APIs that require feature flags 2022-04-25 16:53:27 +00:00
Jack Grigg b02d64a6ef f4jumble: Add method documentation 2022-04-25 16:52:56 +00:00
Jack Grigg 0756ea2f3e f4jumble: Add crate-level documentation 2022-04-25 16:52:28 +00:00
Kris Nuttycombe 981fc62b08 Add `ZcashAddress::encode` method.
This provides the encoding corresponding to
`ZcashAddress::try_from_encoded` and documents the fact that the
`Display` instance can also provide this encoding.

Fixes #463
2022-04-11 10:36:27 -06:00
Kris Nuttycombe 990b0afe5d Update unified address test vectors 2022-03-29 14:56:00 -06:00
Kris Nuttycombe abd63166c0 Apply suggestions from code review
Co-authored-by: str4d <jack@electriccoin.co>
2022-03-11 17:17:21 -07:00
Kris Nuttycombe 71657b4f18 Generalize vector and array writes & reads.
In a number of places, we transform other kinds of collections with
known length information into vectors simply to be able to use them with
`Vector::write` or `Vector::read`. We can avoid these extra allocations
by writing from iterators directly, and similarly by reading directly
into our desired collection types.
2022-03-11 16:48:28 -07:00
Kris Nuttycombe 600c06a408 Update MSRV to 1.56.1 2022-02-24 12:26:14 -07:00
Jack Grigg fa75c9587c zcash_address: Avoid an unnecessary allocation while parsing a UA 2022-02-03 00:02:03 +00:00
Jack Grigg 4a30679491 f4jumble: Return `Error` from allocating functions 2022-02-03 00:02:03 +00:00
Kris Nuttycombe a304c3953b Fix Clippy beta linting complaints. 2022-02-02 16:02:45 -07:00
Kris Nuttycombe 3a20176092 Apply suggestions from code review
Co-authored-by: str4d <jack@electriccoin.co>
2022-01-27 15:00:37 -07:00
Squirrel c910ffdb41
Remove unused dependencies (#479)
Remove unused dependencies

Co-authored-by: Kris Nuttycombe <kris.nuttycombe@gmail.com>
Co-authored-by: str4d <thestr4d@gmail.com>
2022-01-18 12:04:14 -07:00
Kris Nuttycombe 8d34e62114 Clean up proptest generation for unified containers. 2022-01-04 15:31:20 -07:00
Kris Nuttycombe 6065c07003 Update test vectors to respect item ordering. 2022-01-04 11:48:23 -07:00
Kris Nuttycombe 2fa73ed368 Remove `Ord` instances for sealed items.
There are two canonical orderings for sealed items: preference
order and encoding order. Removing the `Ord` instances means
that a user can't accidentally choose the wrong ordering;
these orderings are replaced by explicit `preference_order`
and `encoding_order` comparison functions.
2022-01-04 11:48:23 -07:00
Kris Nuttycombe e413f12fb5 Apply suggestions from code review
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2022-01-04 11:48:23 -07:00
Kris Nuttycombe 4c4c0b1e63 Makes unified container parsing enforce typecode order.
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2022-01-04 11:48:23 -07:00
Jack Grigg d5a375919d blake2{b,s}_simd 1 2021-12-17 23:44:06 +00:00
Jack Grigg 142a38e792 zcash_note_encryption 0.1.0 2021-12-17 20:00:46 +00:00