Commit Graph

2333 Commits

Author SHA1 Message Date
Kris Nuttycombe 94c8d8e7ef Return the network type for encoding addresses as part of the network parameters. 2022-06-30 12:09:32 -06:00
str4d 86b1db169c
Merge pull request #566 from zcash/dependabot/github_actions/actions/cache-3.0.4
Bump actions/cache from 3.0.2 to 3.0.4
2022-06-30 18:19:17 +01:00
Daira Hopwood 09567fc280
Merge pull request #574 from nuttycom/fix_account_key_init
Fix account key init
2022-06-29 21:36:29 +01:00
Kris Nuttycombe 0e098e1f17 Test correctness of unknown ufvk element roundtrip encoding. 2022-06-29 10:13:22 -06:00
Kris Nuttycombe 115d4b975e Don't rely on alignment between account IDs and keys when initializing the accounts table. 2022-06-29 10:13:13 -06:00
Daira Hopwood dae2e008e9
Merge pull request #577 from daira/bosl-notice
Projects that rely on BOSL exceptions should say that they do
2022-06-29 12:59:07 +01:00
Kris Nuttycombe 0142a3db1b
Merge pull request #570 from zcash/387-migrate-from-extfvk-to-ufvk
`zcash_client_*`: Migrate from `ExtendedFullViewingKey` to `UnifiedFullViewingKey`
2022-06-28 10:49:37 -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
Kris Nuttycombe 7236204b14 Don't panic if the sapling key is missing from the UFVK
Instead, just skip Sapling decryption.

Also, a trivial namespacing fix.
2022-06-27 17:44:20 -06:00
ebfull 8ad60a0fc0
Merge pull request #573 from zcash/zcash_primitives-0.7.0
`equihash 0.2.0`, `zcash_primitives` and `zcash_proofs` 0.7.0
2022-06-24 12:59:38 -06: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 a3cae5d36a equihash 0.2.0 2022-06-24 17:00:26 +00:00
Jack Grigg 59b20c6e31 pprof 0.9 2022-06-24 16:27:06 +00:00
Jack Grigg 18fb1f0b07 orchard 0.2 2022-06-24 16:25:51 +00:00
Jack Grigg 3a3c3863cd zcash_primitives: Update changelog 2022-06-24 16:01:24 +00:00
Jack Grigg b52e949bd6 zcash_client_backend: Migrate to correct ZIP 316 UFVK encoding
We also add support for parsing Orchard full viewing keys from encoded
UFVKs (rather than treating them as unknown). `UnifiedSpendingKey` still
does not have Orchard support, so `UnifiedFullViewingKey`s will be
generated without Orchard components.
2022-06-17 10:03:17 +00:00
Jack Grigg 76d015ed11 zcash_client_backend: Fix `UnifiedFullViewingKey` Sapling item type
Per ZIP 316, the Sapling FVK Encoding only includes `(ak, nk, ovk, dk)`
which is a subset of the Sapling `ExtendedFullViewingKey`. We therefore
need to use `DiversifiableFullViewingKey` inside `UnifiedFullViewingKey`
in order to make it parseable from the UFVK string encoding.

`zcash_client_sqlite::wallet::get_extended_full_viewing_keys` has been
removed as a consequence of this change: we can no longer reconstruct
the correct `ExtendedFullViewingKey` from the `UnifiedFullViewingKey`.
2022-06-17 10:03:17 +00:00
Jack Grigg d8b860207d zcash_client_backend: Remove account from `UnifiedFullViewingKey`
The account number is not stored in the ZIP 316 UFVK encoding, and in
general won't necessarily be known (e.g. if a UFVK is being imported
into a wallet).

`zcash_client_sqlite::wallet::init::init_accounts_table` reverts to its
previous behaviour of requiring the provided `&[UnifiedFullViewingKey]`
to be indexed by account number.
2022-06-17 10:03:17 +00:00
Jack Grigg 1ce289e568 zcash_client_backend: Pass UFVKs into `decrypt_transaction` 2022-06-17 10:03:17 +00:00
Jack Grigg c0e8ee0fa0 zcash_client_backend: Return UFVKs from `WalletRead` instead of ExtFVKs 2022-06-17 10:03:17 +00:00
Jack Grigg 0d0527dbf3 zcash_client_sqlite: Store UFVK/UA instead of Sapling ExtFVK/address
This is a breaking change to the database format. We don't have support
for migrations yet, so existing wallets won't work after this commit
until zcash/librustzcash#489 is done.
2022-06-14 02:18:25 +00:00
Jack Grigg e86ba927af zcash_client_backend: Add a fake UFVK encoding
We can't use the real ZIP 316 encoding until `UnifiedFullViewingKey` has
been altered to not store a Sapling `ExtendedFullViewingKey`. But making
that change first requires fully migrating `zcash_client_sqlite` in the
same commit (as its entire API is built around `ExtendedFullViewingKey`).

Instead, we define a temporary fake encoding, to enable migrating the
`zcash_client_sqlite` APIs more incrementally.
2022-06-14 02:18:25 +00:00
Jack Grigg df1105b996 zcash_primitives: Add `DiversifiableFullViewingKey` 2022-06-14 02:18:25 +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
str4d 7f59b588be
Merge pull request #568 from zcash/387-unified-address
Add `RecipientAddress::Unified`
2022-06-14 00:42:41 +01:00
Jack Grigg 97aee898b2 zcash_client_backend: Box `zip321::parse::Param::Addr`
After adding the `RecipientAddress::Unified` enum case, `Param::Addr`
is now much larger than the other `Param` cases. This change reduces the
size of the `Param` enum, fixing a clippy lint.
2022-06-13 23:04:18 +00:00
Jack Grigg 555a621a10 Add `UnifiedAddress` generation to `UnifiedFullViewingKey` 2022-06-13 23:04:18 +00:00
Daira Hopwood aa0b47f3f1
Merge pull request #567 from zcash/564-zcash_address-parse-against-network
zcash_address: Add `ZcashAddress::convert_if_network`
2022-06-13 21:45:01 +01:00
Nathan Wilcox e2b688ea61
Fix a broken link to ZIP 316. 2022-06-13 09:50:01 -07:00
Jack Grigg ed6016857e zcash_client_backend: Add `RecipientAddress::Unified` 2022-06-10 17:16:59 +00:00
Jack Grigg f20366cf86 zcash_client_backend: Migrate `RecipientAddress` to `zcash_address` 2022-06-10 15:49:19 +00: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
str4d b6ba216c0f
Merge pull request #565 from zcash/563-zcash_address-parser-errors
zcash_address: Replace `FromAddress` with `TryFromAddress`
2022-06-07 20:02:59 +01: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
dependabot[bot] 9e8fc6aada
Bump actions/cache from 3.0.2 to 3.0.4
Bumps [actions/cache](https://github.com/actions/cache) from 3.0.2 to 3.0.4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3.0.2...v3.0.4)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-07 13:38:01 +00:00
str4d 73d9395c9d
Merge pull request #559 from nuttycom/autoshielding-poc-merge
Legacy SDK helper: Store the original transaction data to the wallet database without parsing roundtrip.
2022-05-25 19:17:07 +01:00
Kris Nuttycombe 23c0f3b2c5 Merge branch 'autoshielding-poc' into autoshielding-poc-merge 2022-05-24 15:08:08 -06:00
Kris Nuttycombe 0a1ed9b8ac Merge branch 'autoshielding-poc-write-orig' into autoshielding-poc 2022-05-24 14:25:19 -06:00
Kris Nuttycombe 8ef332fed4 Store original transaction data to the wallet database. 2022-05-24 14:10:54 -06:00
Kris Nuttycombe db2ee0d712
Merge pull request #558 from nuttycom/autoshielding-poc-parse-txv5-merge
Ensure that backported support for v5 transaction parsing is available in the history of `master`.
2022-05-23 12:12:56 -06:00
Kris Nuttycombe 8debaa09b8 Merge branch 'autoshielding-poc-parse-txv5' into autoshielding-poc-parse-txv5-merge 2022-05-20 14:34:01 -06:00
Kris Nuttycombe 36dad6282e Add Orchard bundle parsing & txid calculation 2022-05-20 14:33:10 -06:00
Kris Nuttycombe 1d9dd128b9 Backport V5 txid generation for transactions that don't involve Orchard. 2022-05-20 14:33:10 -06:00
Kris Nuttycombe 5f229e7121 Backport parsing for v5 transactions to TransactionData. 2022-05-20 14:33:10 -06:00
Kris Nuttycombe 63f22ade9f
Merge pull request #555 from zcash/autoshielding-poc-sdk-nu5
Backport NU5 branch ID and activation heights for mobile SDKs
2022-05-19 07:48:15 -06:00
Jack Grigg 098dcc2ae0 Backport NU5 branch ID and activation heights for mobile SDKs
This enables mobile wallets using versions of the mobile SDKs based on
zcash/librustzcash@8e3e7de50c to send
transactions after NU5 activation. These wallets will however still not
support receiving v5 transactions.
2022-05-19 11:58:12 +00:00
Kris Nuttycombe 8101b1a035
Merge pull request #554 from nuttycom/update_nu5_activation_height
Update NU5 mainnet activation height.
2022-05-11 12:56:52 -06:00
Kris Nuttycombe 7bce52f235 Update NU5 mainnet activation height. 2022-05-11 12:22:20 -06:00