Commit Graph

3274 Commits

Author SHA1 Message Date
Jack Grigg cd6c962719 zcash_client_sqlite: Write a test for transparent balance behaviour 2023-09-22 17:20:10 +00:00
Jack Grigg 71e38fe190 zcash_client_sqlite: Enable `TestState` to mine wallet transactions 2023-09-22 17:20:07 +00:00
Jack Grigg 9e4fa96dd7 zcash_client_sqlite: Clean up existing transparent input test 2023-09-22 17:01:00 +00:00
str4d e817a75582
Merge pull request #987 from zcash/test-harness-fixes-to-rc-branch
Merge test harness fixes to the release candidate branch
2023-09-22 18:00:22 +01:00
Kris Nuttycombe 2d8ece3003 Fix broken intra-doc link 2023-09-20 13:24:53 -06:00
Kris Nuttycombe 6eb4df973d
Merge pull request #979 from nuttycom/wallet/doc_updates
zcash_client_backend: Update API documentation.
2023-09-20 13:22:16 -06:00
Kris Nuttycombe bdc6886e2d
Apply suggestions from code review.
Co-authored-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-09-20 13:21:53 -06:00
Kris Nuttycombe d5dc4c6d9c zcash_client_backend: Document `data_api::ScannedBlock`
Fixes #885
2023-09-20 12:53:54 -06:00
Kris Nuttycombe 996fea70ac zcash_client_backend: Add detail to documentation of `suggest_scan_ranges`
Fixes #971
2023-09-20 12:39:43 -06:00
Kris Nuttycombe 6b472fd684
Merge pull request #978 from nuttycom/fix/legacy_sqlite_support
zcash_client_sqlite: Remove use of boolean constants from `v_tx_outputs`
2023-09-20 10:45:05 -06:00
Kris Nuttycombe b69d80f25d zcash_client_sqlite: Remove use of boolean constants from `v_tx_outputs`
At present, [zcash/zcash-android-wallet-sdk] supports Android API 27,
which bundles SQLite 3.19. SQLite support for the `TRUE` and `FALSE`
constants were introduced in SQLite 3.23, so we cannot currently use
these constants and retain support for Android API 27.

This version support limitation applies only to the `v_transactions`
and `v_tx_outputs` views, which are considered part of the public API
of this crate; other use of more recent SQLite features is fine because
they rely upon the SQLite bundled via our use of the `rusqlite` crate
and feature compatibility is verified via the unit tests of this crate.
2023-09-20 10:09:25 -06:00
Kris Nuttycombe e7b3e9c04e zcash_client_sqlite 0.8.0-rc.4 2023-09-19 15:01:52 -06:00
Kris Nuttycombe 6d2c53111a zcash_client_backend 0.10.0-rc.3 2023-09-19 15:00:51 -06:00
Kris Nuttycombe 0643678fe5
Merge pull request #974 from nuttycom/wallet/put_tx_record_for_transparent_utxos
zcash_client_sqlite: Remove inner join between `transactions` and `utxos` from `v_transactions`
2023-09-19 14:51:24 -06:00
Kris Nuttycombe c0e29ad103 zcash_client_sqlite: fix join to blocks table in `v_transactions`
This allows us to display additional block information when a
transparent UTXO was provided for a block that we have scanned.
Also, this ensures that memos from a wallet to itself are not
double-counted.

Co-authored-by: str4d <thestr4d@gmail.com>
2023-09-19 13:15:50 -06:00
Kris Nuttycombe 15bfb41773 Apply suggestions from code review.
Co-Authored-By: str4d <thestr4d@gmail.com>
Co-Authored-By: Daira Hopwood <daira@jacaranda.org>
2023-09-19 13:15:50 -06:00
Kris Nuttycombe 6ebd66da76 zcash_client_sqlite: Remove inner join between `transactions` and `utxos` from `v_transactions`
Under normal usage conditions, the `transactions` table is not currently
populated for transactions involving transparent UTXOs, and so this join
was always resulting in transparent UTXO information being filtered out
from the transaction history.

Fixes [zcash/ZcashLightClientKit#1271]
2023-09-19 13:15:50 -06:00
Kris Nuttycombe 4a752310e0
Merge pull request #973 from nuttycom/refactor/backend_spanning_tree
zcash_client_backend: make the `SpanningTree` type usable outside of `zcash_client_sqlite`
2023-09-18 15:25:24 -06:00
Kris Nuttycombe 1575f2db88 zcash_client_backend: make the `SpanningTree` type usable outside of `zcash_client_sqlite`
This adds the `data_api::scanning::spanning_tree` module under
a new `unstable-spanning-tree` feature flag, making it available to
other implementations who want to be able to write their own storage
backends without having to reinvent the spanning tree logic.
2023-09-18 11:22:35 -06:00
str4d ba8cb2eff5
Merge pull request #954 from zcash/dependabot/github_actions/actions/cache-3.3.2
build(deps): bump actions/cache from 3.3.1 to 3.3.2
2023-09-14 23:22:56 +01:00
str4d 6d2332761c
Merge pull request #972 from nuttycom/release-lwsdk-2.0.0-rc1-merge
Merge changes related to the light wallet SDK 2.0.0-rc1 release
2023-09-14 23:22:20 +01:00
Kris Nuttycombe d9b068195a
Merge pull request #908 from daira/899-accounting
Improve wallet tests
2023-09-14 14:50:52 -06:00
Kris Nuttycombe 45ced4d164 Update Cargo.lock 2023-09-12 12:11:46 -06:00
Kris Nuttycombe b32aa3d2a6 Fix missing zcash_client_backend feature dependency. 2023-09-12 09:35:18 -06:00
str4d a4a6de6816
Merge pull request #969 from nuttycom/release-lwsdk-2.0.0-rc.2
zcash_client_backend 0.10.0-rc.2 and zcash_client_sqlite 0.8.0-rc.2
2023-09-12 16:05:52 +01:00
Kris Nuttycombe e6b34eeaa2 zcash_client_sqlite 0.8.0-rc.2 2023-09-12 08:32:34 -06:00
Kris Nuttycombe 24068cd63a zcash_client_backend 0.10.0-rc.2 2023-09-12 08:31:39 -06:00
Kris Nuttycombe 1e39daf6f8
Merge pull request #963 from nuttycom/bug/commitment_tree_depth
zcash_client_backend: Fix an error that can occur due to sparse `shardtree` checkpoints.
2023-09-12 08:05:50 -06:00
Kris Nuttycombe 8ebcb6dfd6
Merge pull request #965 from nuttycom/private_tree_ser
zcash_client_sqlite: `serialization` module should not have been public.
2023-09-11 19:48:22 -06:00
Kris Nuttycombe f2dcba3a34 Apply suggestions from code review
Co-authored-by: str4d <thestr4d@gmail.com>
2023-09-11 18:39:27 -06:00
Kris Nuttycombe 24e8c82546 zcash_client_backend: Get commitment tree depth for a given number of confirmations from the database.
This fixes the following bug:

Due to complexities related to non-linear scanning, checkpoints are only
added to the wallet's commitment tree in cases where there are notes
discovered within a scanned block. At present, the `shardtree` API only
makes it possible to add multiple checkpoints of the same tree state
when adding checkpoints at the chain tip, and this functionality is not
used by `zcash_client_backend` because we perform checkpoint insertion
in batches that may contain gaps in the case that multiple blocks
contain no Sapling notes. While it would be possible to fix this by
altering the `shardtree` API to permit explicit insertion of multiple
checkpoints of the same tree state at a given note position, this fix
takes a simpler approach.

Instead of ensuring that a checkpoint exists at every block and
computing the required checkpoint depth directly from the minimum number
of confirmations required when attempting a spend, we alter the
`WalletCommitmentTrees` API to allow internal information of the note
commitment tree to be used to determine this checkpoint depth, given the
minimum number of commitments as an argument. This allows us to select a
usable checkpoint from the sparse checkpoint set that resulted from the
sparse insertion of checkpoints described above.
2023-09-11 18:38:54 -06:00
Daira Emma Hopwood 101c9c0ea4 Add passing test for current behaviour of wallet restore from seed.
refs #936

Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-09-12 01:33:12 +01:00
Daira Emma Hopwood 401af23484 Improve wallet tests.
Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-09-12 01:33:12 +01:00
str4d 3c2787ce89
Merge pull request #966 from zcash/ci-build-latest
CI: Add job to build with latest Rust and dependencies
2023-09-12 01:19:38 +01:00
Kris Nuttycombe 771e4013c3 Move shardtree serialization to the `zcash_client_backend` crate 2023-09-11 18:18:08 -06:00
Jack Grigg c1dc648cf0 CI: Add job to build with latest Rust and dependencies
This ensures that we catch non-MSRV compilation breakages caused by
SemVer updates.
2023-09-11 23:50:11 +00:00
Kris Nuttycombe 28f1f7d296 zcash_client_sqlite: Add a test for when gaps exist in checkpoints. 2023-09-11 17:08:51 -06:00
Kris Nuttycombe 92237a5558 zcash_client_sqlite: `serialization` module should not have been public. 2023-09-11 16:48:13 -06:00
str4d 46e2c4c800
Merge pull request #964 from zcash/check-in-lockfile
Add `Cargo.lock` to repository
2023-09-11 23:38:42 +01:00
Jack Grigg 15fed12e95 cargo update
The `blake2*_simd` updates are ignored because they bump MSRV.
2023-09-11 22:12:52 +00:00
Jack Grigg fad1b91377 Add `Cargo.lock` to repository
This is currently "whatever lockfile happened to last work for str4d",
but going forward will be the lockfile we use for testing our MSRV. See
https://blog.rust-lang.org/2023/08/29/committing-lockfiles for rationale
on this change.
2023-09-11 22:12:52 +00:00
Kris Nuttycombe 1b1116ed0c
Merge pull request #958 from zcash/sbs-release-candidates
Spend-before-Sync release candidates
2023-09-08 14:33:04 -06:00
Jack Grigg 62e3299255 zcash_client_sqlite 0.8.0-rc.1 2023-09-08 19:58:46 +00:00
Jack Grigg 9db68c76ee zcash_client_backend 0.10.0-rc.1 2023-09-08 19:50:53 +00:00
Jack Grigg 87ca71b8db zcash_proofs 0.13.0-rc.1 2023-09-08 19:48:55 +00:00
Jack Grigg 67b84c25e0 zcash_primitives 0.13.0-rc.1 2023-09-08 19:45:54 +00:00
Kris Nuttycombe 4c4364630c
Merge pull request #955 from nuttycom/sbs/pre_release_cleanup
Pre-release cleanups
2023-09-08 13:38:52 -06:00
Kris Nuttycombe 46cc6666df Address comments from code review.
Co-authored-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-09-08 13:03:53 -06:00
Jack Grigg 94c1f2413d Migrate to `incrementalmerkletree 0.5`, `orchard 0.6` 2023-09-08 18:57:25 +00:00
Kris Nuttycombe 61e06d2227 zcash_client_sqlite: Update CHANGELOG.md for 0.8.0 release 2023-09-08 11:02:37 -06:00