Commit Graph

2859 Commits

Author SHA1 Message Date
Kris Nuttycombe 8625e9a777 Handle parsing of the not-present `CommitmentTree` sentinel. 2023-06-30 12:08:06 -06:00
Kris Nuttycombe 70497a241c Only store z->t transaction data once, not once per Sapling output. 2023-06-30 10:42:48 -06:00
Kris Nuttycombe cd939f94c4 Ensure that checkpoints are ordered by position when querying for pruning. 2023-06-30 09:48:19 -06:00
Kris Nuttycombe 95745dd620 Use ruqlite::Rows::mapped to allow `collect` 2023-06-30 09:45:06 -06:00
Kris Nuttycombe 45177a51e1 Fix off-by-one error in scan_block_with_runner. 2023-06-30 09:30:24 -06:00
Kris Nuttycombe c05b3d0c8c Add a test demonstrating off-by-one error in `scan_block_with_runner` 2023-06-30 09:30:24 -06:00
Kris Nuttycombe 8fa3a08c0b Fix indexing error in checkpoint determination. 2023-06-30 09:30:24 -06:00
Kris Nuttycombe d65b129b43 Apply changelog, documentation & style suggestions from code review
Co-authored-by: str4d <thestr4d@gmail.com>
2023-06-30 09:30:24 -06:00
Kris Nuttycombe ba709177d3 Reorganize Sapling and Orchard note commitment tree sizes in CompactBlock.
We move thes fields out into a separate BlockMetadata struct to ensure
that future additions to block metadata are structurally separated from
future additions to block data.
2023-06-29 15:35:18 -06:00
Kris Nuttycombe 547634e210 zcash_client_sqlite: Move the SqliteShardStore implementation out of the `wallet::sapling` module. 2023-06-29 15:35:18 -06:00
Kris Nuttycombe 106669d977 zcash_client_sqlite: Generalize SQLite-backed ShardStore impl to make it reusable for Orchard. 2023-06-29 15:35:18 -06:00
Kris Nuttycombe 0a4236f725 zcash_client_sqlite: Add tests for sqlite-backed ShardTree & fix revealed issues. 2023-06-29 15:35:18 -06:00
Kris Nuttycombe 425b5e01d7 zcash_client_sqlite: Support shardtree checkpoint functionality 2023-06-29 15:35:18 -06:00
Kris Nuttycombe c42cffeb1d zcash_client_backend: Replace `WalletWrite::advance_by_block` with `WalletWrite::put_block`
Also, add assertions to prevent attempting the creation of zero-conf
shielded spends.
2023-06-29 15:35:18 -06:00
Kris Nuttycombe d11f3d2acc zcash_client_sqlite: Add shardtree truncation & checkpoint operations. 2023-06-29 15:35:18 -06:00
Kris Nuttycombe ade882d01c zcash_client_sqlite: Add shard & checkpoint insertion. 2023-06-29 15:35:18 -06:00
Kris Nuttycombe 9f2bb94a5e zcash_client_sqlite: Add shard persistence to wallet migration. 2023-06-29 15:35:18 -06:00
Kris Nuttycombe ed2e22b737 zcash_client_sqlite: Add shard serialization & parsing 2023-06-29 15:35:18 -06:00
Kris Nuttycombe 3e358bc1c9 zcash_client_backend: Use `shardtree` for note commitments in block scanning.
Also adds a skeleton `zcash_client_sqlite` implementation of
`shardtree::ShardStore` and a skeleton migration for related
database changes.
2023-06-29 15:35:18 -06:00
Kris Nuttycombe 32e2991c4d zcash_client_backend: Add note commitment tree sizes to `CompactBlock` serialization. 2023-06-26 10:19:43 -06:00
str4d fa67d9a645
Merge pull request #841 from zcash/dependabot/github_actions/codecov/codecov-action-3.1.4
Bump codecov/codecov-action from 3.1.3 to 3.1.4
2023-06-23 23:16:31 +01:00
str4d 5e7eea7428
Merge pull request #863 from nuttycom/add_orchard_to_transaction_builder
Add Orchard to transaction builder
2023-06-23 23:01:52 +01:00
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