Kris Nuttycombe
45177a51e1
Fix off-by-one error in scan_block_with_runner.
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
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
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
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
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
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
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
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
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
d99b4d4d6e
Update memo retrieval API to reflect that memos may not be 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. It does, however, introduce a slight
semantic confusion that will need to be considered in the case of future
updates where a note may not have an associated memo; at present, the
only reason we might not have the memo is that we might not have
retrieved the full transaction information from the chain, but in the
future there might be other possible reasons for this absence.
Fixes #384
2023-05-16 10:27:40 -06:00
Jack Grigg
8681b56d52
Bump MSRV for `zcash_primitives` and dependents to 1.65
2023-05-16 15:37:07 +00:00
Kris Nuttycombe
87212b6137
Merge branch 'main' into resolve-RUSTSEC-2023-0018
2023-05-12 09:08:59 -06:00
Daira Emma Hopwood
32296e7327
Update `DEFAULT_TX_EXPIRY_DELTA` to 40 blocks, as specified in
...
<https://zips.z.cash/zip-0203#changes-for-blossom >. fixes #837 .
Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-05-09 18:38:39 +01:00
Kris Nuttycombe
d37e6adee5
Merge pull request #783 from nuttycom/upgrade_bridgetree
...
Upgrade `zcash_primitives` to use updated `incrementalmerkletree` types.
2023-05-08 12:00:00 -06:00
str4d
579ab92b93
Merge branch 'main' into 823-secp256k1-0.26
2023-05-08 18:53:33 +01:00
Kris Nuttycombe
1f9747e15f
Move merkle tree types to the `incrementalmerkletree` crate.
...
This removes the `CommitmentTree`, `IncrementalWitness`, and
`MerklePath` types in favor of equivalent versions available
from the `incrementalmerkletree` crate.
2023-05-04 12:30:56 -06:00
Kris Nuttycombe
6f2cbfc7de
Factor serialization out from merkle tree data structures.
2023-05-04 12:21:47 -06:00
Kris Nuttycombe
ec57d23115
Use const generics to set commitment tree & incremental witness depths.
...
This is in preparation for extraction into the `incrementalmerkletree`
crate, which is not Sapling-specific and therefore cannot hard-code
the depths of these data structures.
2023-05-04 12:16:09 -06:00
Hazel OHearn
2a6dc59c5d
Update DEFAULT_FEE to 10_000 from 1000
2023-05-03 16:42:01 -03:00
Jack Grigg
3db0395e5b
zcash_client_sqlite 0.7.0
2023-04-28 01:47:20 +00:00
Jack Grigg
8b53d4a0c4
zcash_client_backend 0.9.0
2023-04-28 01:46:28 +00:00
Kris Nuttycombe
8e8388a9f6
Add migration to enable storage of unmined change notes.
2023-04-27 17:26:11 -06:00