Commit Graph

2836 Commits

Author SHA1 Message Date
Kris Nuttycombe 7fe02f0606 Remove needless bound on `FeeRule` from builder `Error` type. 2023-06-23 15:24:38 -06:00
Kris Nuttycombe 1b4017e0d1
Apply suggestions from code review
Co-authored-by: str4d <thestr4d@gmail.com>
2023-06-23 15:16:10 -06:00
Kris Nuttycombe 95abfe5836
Improve documentation for `zcash_primitives::transaction::builder::Error::OrchardAnchorNotAvailable`
Co-authored-by: str4d <thestr4d@gmail.com>
2023-06-23 14:56:49 -06:00
Hazel OHearn 4fbdd64c89 Add Orchard support to `zcash_primitives::transaction::builder::Builder`
Co-authored-by: Jack Grigg <jack@electriccoin.co>
Co-authored-by: Kris Nuttycombe <kris@nutty.land>
2023-06-23 14:09:59 -06:00
Hazel OHearn dce8676974 Remove impls of `{PartialEq, Eq}` for `zcash_primitives::transaction::builder::Error`
Co-authored-by: Jack Grigg <jack@electriccoin.co>
2023-06-23 14:07:15 -06:00
Kris Nuttycombe 06a7849cb7
Merge pull request #859 from nathan-at-least/rustsec-2022-0090-fix
[Impacts API versioning] Update dependencies to resolve RUSTSEC-2022-0090
2023-06-19 12:22:04 -06:00
Kris Nuttycombe d5166b5134 Merge branch 'wallet/sqlite_cached_statements' 2023-06-19 07:55:08 -06:00
Nate Wilcox 5ba44b9019 Update dependencies to resolve https://rustsec.org/advisories/RUSTSEC-2022-0090 2023-06-17 12:44:35 -07:00
Kris Nuttycombe 48434bb271 zcash_client_sqlite: Fix SQL identation errors. 2023-06-16 15:09:33 -06:00
Kris Nuttycombe 91f0f03d9d zcash_client_sqlite: Factor out common logic for the representation of stored memos. 2023-06-16 15:09:29 -06:00
Kris Nuttycombe 820e61caaa zcash_client_sqlite: Avoid swallowed errors in max-block-height queries. 2023-06-16 15:09:26 -06:00
Kris Nuttycombe 4b9180cb04 zcash_client_sqlite: Fix details of `put_sent_output` documentation.
Also address a minor naming issue from code review.
2023-06-16 15:09:19 -06:00
Kris Nuttycombe 2674209818 zcash_client_sqlite: Remove the remainder of DataConnStmtCache 2023-06-16 15:09:14 -06:00
Kris Nuttycombe bf7f05282f zcash_client_sqlite: Fix missing incrementalmerkletree feature dependency 2023-06-16 15:09:07 -06:00
Kris Nuttycombe 21f82e539f zcash_client_sqlite: Use cached prepared statements for transparent UTXO operations. 2023-06-16 15:09:02 -06:00
Kris Nuttycombe 9f6831ea75 zcash_client_sqlite: Use cached statements for `insert_address` 2023-06-16 15:08:57 -06:00
Kris Nuttycombe 2354c8b48d zcash_client_sqlite: Use upsert & automatic caching of prepared statements for `put_sent_output` 2023-06-16 15:08:52 -06:00
Kris Nuttycombe 7917effe82 zcash_client_sqlite: Use upsert & automatic caching of prepared statements for `put_received_note` 2023-06-16 15:08:44 -06:00
Kris Nuttycombe 8d86ffd9c4 zcash_client_sqlite: Use `prepare_cached` instead of manual statement caching.
`rusqlite` includes a mechanism for creating prepared statements that
automatically caches them and reuses the caches when possible. This
means that it's unnecessary for us to do our own caching, and also
offers a minor performance improvement in that we don't need to eagerly
prepare statements that we may not execute in the lifetime of a given
`WalletDb` object. It also improves code locality, because the prepared
statements are now adjacent in the code to the parameter assignment
blocks that correspond to those statements.

This also updates a number of `put_x` methods to use sqlite upsert
functionality via the `ON CONFLICT` clause, instead of having to perform
separate inserts and updates.
2023-06-16 15:08:34 -06:00
Kris Nuttycombe d2f105efe9
Merge pull request #856 from zcash/release/primitives_0.12-etc
Release zcash_address 0.3.0, zcash_primitives 0.12.0 and zcash_proofs 0.12.0
2023-06-06 16:59:51 -06: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 60ac1070c5 Release zcash_address version 0.3.0 2023-06-06 15:53:16 -06:00
Kris Nuttycombe 75e529eea6 Upgrade to `bs58 0.5` 2023-06-06 15:53:14 -06:00
Kris Nuttycombe 3dd0c63095 Update to `incrementalmerkletree 0.4`, `orchard 0.5` 2023-06-06 14:27:39 -06:00
Kris Nuttycombe b0ca7ff321 Merge remote-tracking branch 'upstream/main' into release/primitives_0.12-etc 2023-06-06 13:43:19 -06:00
Kris Nuttycombe d2c58180b4
Merge pull request #853 from nuttycom/doc/zip321_errors
doc-only: Document ZIP 321 error variants.
2023-06-06 10:27:28 -06:00
Kris Nuttycombe 80adb54e26 Release zcash_note_encryption version 0.4.0 2023-06-06 10:12:33 -06:00
Kris Nuttycombe 0b126a107c
Clarify `Zip321Error::TooManyPayments` documentation.
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2023-06-06 09:29:43 -06:00
Kris Nuttycombe bca951bf44 doc-only: Document ZIP 321 error variants.
Fixes #499
2023-06-06 08:42:54 -06:00
Kris Nuttycombe de771b7f22
Merge pull request #852 from nuttycom/wallet/sapling_cleanup
Consolidate sapling functionality in zcash_client_sqlite in a dedicated module.
2023-06-02 13:11:32 -06:00
Kris Nuttycombe 92d08b8504 Move `zcash_client_sqlite` Sapling wallet functionality to a dedicated module. 2023-06-02 10:59:17 -06:00
Kris Nuttycombe ebcfae987d Update the data access API in preparation for shardtree introduction. 2023-06-02 10:59:17 -06:00
Kris Nuttycombe 59eef51b9e
Merge pull request #851 from zcash/simplify_parse_note_plaintext_ovk_args
Remove esk and ephemeral_key arguments from `parse_note_plaintext_ovk`
2023-05-31 12:54:04 -06:00
Kris Nuttycombe 36d7222685
Merge pull request #844 from zcash/temporary-zcashd-parse-sapling
zcash_primitives: Changes needed for `zcashd` Sapling oxidation
2023-05-30 17:30:47 -06:00
Kris Nuttycombe fe3d0269d1 Add comments detailing the checks required prior to calling `check_note_validity` 2023-05-26 10:12:21 -06:00
Kris Nuttycombe 696a9be0a0 Update `zcash_primitives` to reflect argument changes to `parse_note_plaintext_without_memo_ovk` 2023-05-26 09:43:26 -06:00
Kris Nuttycombe be89e81534 Remove `esk` and `ephemeral_key` arguments from `parse_note_plaintext_without_memo_ovk`
Fixes #850
2023-05-26 09:24:22 -06:00
Kris Nuttycombe 3ae90020c3
Merge pull request #848 from zcash/note-encryption-avoid-redundant-checks
Avoid redundant checks during note decryption
2023-05-26 09:10:52 -06:00
Kris Nuttycombe d56c6624a6
Merge pull request #849 from nuttycom/upgrade_incrementalmerkletree
Upgrade `incrementalmerkletree` & `orchard` patch versions.
2023-05-25 14:47:15 -06:00
Kris Nuttycombe 980736806f Upgrade `incrementalmerkletree` & `orchard` patch versions. 2023-05-25 12:33:25 -06:00
Kris Nuttycombe 4b3ea857df
Merge pull request #818 from nathan-at-least/resolve-RUSTSEC-2023-0018
Bump `tempfile` to 3.5.0 to mitigate RUSTSEC-2023-0018…
2023-05-22 20:19:43 -06:00
Jack Grigg 2ae4d87cbf zcash_primitives: Remove redundant checks from Sapling note decryption
- The consistency check between `esk` and `ephemeral_key` is checked
  inside `zcash_note_encryption::try_output_recovery_with_ock`.
- The `diversifier` validity check is necessarily performed when
  deriving `pk_d` for the `ivk` pathway, so we keep it there for the
  `ovk` pathway as well, and drop the check from the `PaymentAddress`
  internal constructor.
2023-05-19 16:36:55 +00:00
Jack Grigg a115a8f00f zcash_note_encryption: Remove `esk` check requirement from `Domain::parse_note_plaintext_without_memo_ovk`
This method is only called from `try_output_recovery_with_ock`, and we
can instead rely on the check performed in `check_note_validity`,
reducing the number of checks that `Domain` implementations need to
perform.

The `esk` and `ephemeral_key` parameters become unused, and will be
removed in a subsequent commit (as this change needs to be synchronized
with the `orchard` crate).
2023-05-19 16:30:47 +00:00
Kris Nuttycombe b341903ae2
Merge pull request #842 from zcash/msrv-1.65
Bump MSRV for `zcash_primitives` and dependents to 1.65
2023-05-19 09:28:43 -06:00
str4d 1bc8f9a1de
Merge pull request #847 from zcash/hotfix/zcash_client_sqlite-0.7.1
Back-merge hotfix/zcash_client_sqlite-0.7.1
2023-05-18 22:32:40 +01:00
Kris Nuttycombe d4073cb2ec Merge remote-tracking branch 'upstream/main' into hotfix/zcash_client_sqlite-0.7.1 2023-05-18 14:56:14 -06:00
str4d a9733245e2
Merge pull request #846 from nuttycom/hotfix/zcash_client_sqlite/null_memo_crash
Return the empty memo when memo is not present.
2023-05-18 21:47:05 +01:00
Kris Nuttycombe 0780744443 Return the empty memo when memo is not present.
Memos may be absent for both sent and received notes in cases where only
compact block information has been used to populate the wallet database.
This fixes a potential crash in the case that we attempt to decode a
SQLite `NULL` as a byte array.

Fixes #384

(cherry picked from commit d99b4d4d6e)
2023-05-18 14:34:27 -06:00
Kris Nuttycombe fb8bf20a04
Merge pull request #843 from nuttycom/wallet/not_yet_fetched_memo
Update memo retrieval API to reflect that memos may not be present.
2023-05-17 11:07:54 -06:00