Commit Graph

2071 Commits

Author SHA1 Message Date
therealyingtong c4ceb8e9df Test both Sapling and Orchard receivers in arb_shielded_* proptests. 2021-12-02 14:44:38 -07:00
therealyingtong b4c1ca11c9 Remove P2SH variant for FVK and IVK. 2021-12-02 14:44:38 -07:00
therealyingtong cb06bbcf05 unified::fvk::tests: Add unit tests for parsing UFVK. 2021-12-02 14:44:38 -07:00
therealyingtong 194a790335 unified::fvk: Parse unified full viewing keys. 2021-12-02 14:44:38 -07:00
therealyingtong fc82523e31 unified::ivk::tests: Add unit tests for parsing UIVK. 2021-12-02 14:44:38 -07:00
therealyingtong 7cd12f4ee2 unified::ivk: Parse unified incoming viewing keys. 2021-12-02 14:44:38 -07:00
Kris Nuttycombe 5bb77e9149
Merge pull request #461 from nuttycom/sapling_fvk_address
Factors out sapling address generation from SaplingExtendedFullViewingKey
2021-12-02 14:10:23 -07:00
Kris Nuttycombe 1c32172209
Merge pull request #460 from zcash/unified-encoding-logic
kind::unified: Extract common unified encoding logic.
2021-12-02 12:43:27 -07:00
Kris Nuttycombe 566c973ea7
Fix comment in components/zcash_address/src/kind/unified.rs
Co-authored-by: str4d <jack@electriccoin.co>
2021-12-02 11:35:54 -07:00
Kris Nuttycombe 82be04dfaf Generalize the naming of unified containers and items. 2021-12-02 09:10:03 -07:00
Kris Nuttycombe 75591047f7 Separates raw encoding from jumbling of unified container contents. 2021-12-02 09:04:46 -07:00
Kris Nuttycombe 06bea7f936 Factors out sapling address generation from SaplingExtendedFullViewingKey.
Sapling address generation depends only on an FVK and
a diversifier key. For the purpose of unified full viewing
keys, we need to break the dependence upon Sapling extended
full viewing keys, so this makes the address generation
methods of SaplingExtendedFullViewingKey usable without
coupling them to the ability to derive child full viewing keys.
2021-11-30 20:00:36 -07:00
therealyingtong a6e6f8ace2 kind::unified: Make address::Address available outside the crate. 2021-11-30 09:05:24 -05:00
therealyingtong da1c6224f8 kind::unified: Split Unified trait into FromReceivers, ToReceivers.
This allows us to move to_bytes() into the private::SealedContainer
trait without introducing a circular dependency. This also lets us
move the Receivers type to a public trait.
2021-11-29 14:21:43 -05:00
therealyingtong c31db1b839 Move HRPs into from public Unified trait to SealedContainer trait.
Co-authored-by: Jack Grigg <jack@electriccoin.co>
2021-11-29 13:49:24 -05:00
therealyingtong b8ff3d2d48 kind::unified: Introduce private::SealedContainer and Unified traits.
Co-authored-by: Jack Grigg <jack@electriccoin.co>
2021-11-28 18:56:24 -05:00
therealyingtong 18393eefa8 kind::unified: Introduce private::SealedReceiver trait.
Co-authored-by: Jack Grigg <jack@electriccoin.co>
2021-11-28 18:55:37 -05:00
therealyingtong 406e62e7e5 [move-only] Move Receiver and test code into kind::unified::address.
Co-authored-by: Jack Grigg <jack@electriccoin.co>
2021-11-28 17:09:59 -05:00
jarys 0ec7f97c97
Add `#![no_std]` support for zcash_note_encryption (#450)
Co-authored-by: str4d <thestr4d@gmail.com>
2021-11-24 13:58:52 +00:00
ying tong c48bb4def2
Merge pull request #452 from zcash/zcash_note_encryption-batchdomain
Introduce `zcash_note_encryption::BatchDomain` trait
2021-11-17 15:13:43 +01:00
Jack Grigg 5055033c31 zcash_primitives: Migrate to `zcash_note_encryption::BatchDomain` 2021-11-17 12:17:10 +00:00
Jack Grigg 35e7542065 zcash_note_encryption: Move domain batch APIs into a BatchDomain trait
These are the only allocating APIs; this change makes it possible to
make the crate no-std compatible.
2021-11-17 12:14:26 +00:00
jarys 6e39480c58
Add `#![no_std]` support for f4jumble. (#446)
The new `f4jumble_mut` and `f4jumble_inv_mut` functions take a `&mut [u8]`, and return a new `Error` type if the slice has an invalid length.

The original `f4jumble` and `f4jumble_inv` functions are now more efficient as they only allocate once.
2021-11-03 13:46:30 +00:00
Kris Nuttycombe 3d7b9dc9aa
Merge pull request #438 from nuttycom/sapling_try_diversifier
Make it possible for callers to search for valid Sapling diversifiers.
2021-10-15 13:50:53 -06:00
Kris Nuttycombe 48340a4846 Fix doc comment for default address generation. 2021-10-15 13:19:25 -06:00
Kris Nuttycombe 86d4affe73 Add tests for `ExtendedFullViewingKey::address` 2021-10-11 16:34:37 -06:00
Kris Nuttycombe 70e65081c5 Add a test for DiversifierKey::diversifier 2021-10-11 16:34:37 -06:00
Kris Nuttycombe 120cc70a6d Fix type of default_address 2021-10-11 16:34:37 -06:00
Daira Hopwood bec497f6bf Apply suggestions from code review
Co-authored-by: ying tong <yingtong@z.cash>
2021-10-11 16:34:37 -06:00
Kris Nuttycombe 1373221439 Renames the `ExtendedFullViewingKey::address` method to `find_address`.
This also adds a new semantically different `address` method which
attempts to produce an address given the specified diversifier index,
and returns `None` if that index does not produce a valid diversifier.

It is then up to the caller to search the diversifier index space if
the diversifier index that they are attempting to use does not result in
a valid diversifier.
2021-10-11 16:34:37 -06:00
Kris Nuttycombe 28112de234 Make it possible for callers to search for valid Sapling diversifiers. 2021-10-11 16:34:37 -06:00
str4d 2c97bb1711
Merge pull request #440 from zcash/dependabot/github_actions/codecov/codecov-action-2.1.0
build(deps): bump codecov/codecov-action from 2.0.3 to 2.1.0
2021-09-30 06:02:03 +13:00
str4d 53d0a51d33
Merge pull request #447 from str4d/nu5-testnet-update
NU5 testnet update
2021-09-29 10:53:30 +13:00
Jack Grigg b29803ae34 Update ZIP 244 test vectors with new consensus branch ID 2021-09-28 22:31:11 +01:00
Jack Grigg a90af6cb2d Update NU5 consensus branch ID and set testnet activation height 2021-09-28 22:12:31 +01:00
Jack Grigg e1abca5032 Update patch to latest orchard crate revision
Includes circuit bugfixes and uses halo2 0.1.0-beta.1.
2021-09-28 22:08:27 +01:00
str4d bfd083b339
Merge pull request #445 from str4d/update-deps
Update dependencies
2021-09-23 09:46:13 +12:00
Jack Grigg 056e2c62f9 Pin halo2 and orchard crate versions with BOSL exception 2021-09-22 22:18:20 +01:00
Jack Grigg 8f9ea0d116 pasta_curves 0.2.1
This is the first version that was relicensed as MIT OR Apache-2.0.
2021-09-22 22:16:59 +01:00
Jack Grigg 3d6bd8731d directories 4 2021-09-22 22:16:18 +01:00
Jack Grigg afd4a4803c bip0039 0.9 2021-09-22 22:14:03 +01:00
str4d 4881d6af73
Merge pull request #444 from str4d/f4jumble-crate
F4Jumble crate
2021-09-23 05:51:42 +12:00
str4d edd341faba
f4jumble: Add description to README
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2021-09-23 04:38:39 +12:00
str4d 501a343fc9
f4jumble: Update authors list
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2021-09-23 04:22:18 +12:00
Jack Grigg e13e746e8a Move F4Jumble implementation into f4jumble crate 2021-09-22 14:21:48 +01:00
Jack Grigg 06b7f13356 Empty f4jumble crate 2021-09-22 14:13:34 +01:00
Kris Nuttycombe ba3f13bbed
Merge pull request #442 from str4d/bump-orchard-patch
Bump Orchard patch to include Merkle path cleanups
2021-09-16 16:18:24 -06:00
Jack Grigg 4770675542 Bump Orchard patch to include Merkle path cleanups 2021-09-16 22:55:22 +01:00
str4d 663a394b62
Merge pull request #434 from nuttycom/feature/longer_uas
Update unified addresses to use CompactSize for typecode & length fields.
2021-09-16 05:47:18 +12:00
Kris Nuttycombe 3c42fcff6d Fix upper CompactSize bound.
Co-authored-by: str4d <jack@electriccoin.co>
2021-09-15 10:27:27 -06:00