Commit Graph

74 Commits

Author SHA1 Message Date
Jack Grigg f16282305e backend-lib: Set correct MSRV 2024-01-30 17:23:37 +00:00
Jack Grigg f792bfbb7c backend-lib: Add tracing to every Rust FFI method 2024-01-30 17:23:37 +00:00
Jack Grigg ddc4cf6f7b cargo update 2024-01-30 17:23:37 +00:00
Jack Grigg 1cdaaa974c Migrate to `ecc_sdk-20240129` tag of Zcash Rust crates 2024-01-30 17:23:37 +00:00
Jack Grigg a8965b01c6 Fix types of arguments to `GetSubtreeRoots` and `putSaplingSubtreeRoots` 2024-01-30 17:23:37 +00:00
Jack Grigg 1f19360ca3 Expose the rest of `WalletSummary` across the FFI 2024-01-30 17:23:37 +00:00
Jack Grigg 9eeb5ba04c backend-lib: Migrate to latest in-progress revision of Rust crates
Includes performance improvements to block scanning.
2024-01-30 17:23:37 +00:00
Jack Grigg 7149def6f1 Expose `ScanSummary` across the FFI
Closes Electric-Coin-Company/zcash-android-wallet-sdk#1368.
2024-01-30 17:23:37 +00:00
Honza 61b2eb5ed5 Explicit generated location
- This copies the pattern from lightwallet-client-lib module where we set the package for the generated classes
- It adds internal to the path, to be explicit about not exposing it out of the backend module
2024-01-30 17:23:37 +00:00
Jack Grigg 0f0cd81a12 Replace `Backend.{createToAddress, shieldToAddress}` with proposal-based methods
Closes Electric-Coin-Company/zcash-android-wallet-sdk#1338.
2024-01-30 17:23:37 +00:00
Jack Grigg 251392d9cf Migrate to `jni 0.21`
In addition to the necessary breaking changes, we also clean up the
style to match what is used in the `jni` crate examples.
2024-01-30 17:23:37 +00:00
Jack Grigg c6c2a1c54e backend-lib: Migrate to `standard::SingleOutputChangeStrategy`
This removes the type system separation between pre-ZIP 313 and ZIP 317
fees, which becomes necessary when using the transaction proposal
protobuf encoder.
2024-01-30 17:23:37 +00:00
Jack Grigg 85af183cee backend-lib: Migrate to latest in-progress revision of Rust crates 2024-01-30 17:23:37 +00:00
Jack Grigg 1bf2f84837 Migrate to Rust 1.75.0 and NDK 26.1.10909125
Closes Electric-Coin-Company/zcash-android-wallet-sdk#317.
2024-01-18 11:43:54 +00:00
Honza Rychnovský 73d7afc2a4
[#1327] Ktlint 1.1.0
* [#1327] Ktlint 1.1.0

Closes #1327

* [#1327] Autoformatting with Ktlint

* Ktlint formatting warnings fix
2024-01-04 21:21:32 +01:00
str4d ae2d7152aa
Replace Sapling balance and scan progress FFIs with wallet summary FFI
* Replace Sapling balance and scan progress FFIs with wallet summary FFI

Closes zcash/zcash-android-wallet-sdk#1282.

* Using test fixture for JniAccountBalance

* Minor documentation changes

* Fix typo

---------

Co-authored-by: Honza <rychnovsky.honza@gmail.com>
2023-11-08 10:57:23 +01:00
Sean Bowe f3dfed42fa cargo update 2023-10-19 16:10:30 -06:00
Sean Bowe d134a2d929 Bump zcash_client_sqlite to 0.8.1 2023-10-19 16:10:30 -06:00
Jack Grigg 20d3459e75 cargo update 2023-09-25 20:02:17 +00:00
Jack Grigg 350e9e192e Migrate to final versions of Zcash Rust crates 2023-09-25 20:01:49 +00:00
str4d 1330e9a74f
[#1268] Migrate to Rust crate revision with spent UTXOs balance fix 2023-09-25 16:54:45 +02:00
Jack Grigg cd6a8777e0 Migrate to latest RC of Rust crates 2023-09-22 18:05:52 -06:00
Honza Rychnovský c8e5a7e125
[#1249] Continuity error rewind
* [#1249] Continuity error rewind

- Fixed the Rust FFI bug that caused us to be unable to catch the Continuity error
- Improved logging
- Moved handling the Continuity error to the outer synchronization loop, which works better with synchronization mutex
- Closes #1249

* Resolve minor comments from older PR #1247
2023-09-21 16:11:02 +02:00
Kris Nuttycombe bcba2a9d51 Update to librustzcash patch with SQLite 3.19 support for Android API 27 2023-09-20 10:44:33 -06:00
Jack Grigg 233acebc2f Migrate to Rust revision with fixes to table views
With the fixes to `v_transactions` and `v_tx_outputs`, there are
several more data fields that may have no data (for rows corresponding
to purely-transparent transactions); their fields are made nullable.
2023-09-19 22:59:31 +01:00
Honza Rychnovský 9869fd4300
[#1239] Post-v2.0.0-rc1 cleanup
* Add JniScanProgressTest

* Remove unnecessary testnet workaround

As this was fixed with the last rust changes.

* Simplify batchCount calculating

* Fix ratio typo

* Docummentation comments changes
2023-09-18 16:51:26 +02:00
Kris Nuttycombe 5037102faf Update to zcash_client_sqlite-0.8.0-rc.3 2023-09-12 12:38:39 -06:00
Honza Rychnovský 9b18fe12d9
Add encode_scan_progress documentation
Co-authored-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-09-12 19:36:39 +02:00
Honza Rychnovský 96aeec2e9d
Add throws documentation
Co-authored-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-09-12 19:29:39 +02:00
Jack Grigg d775421f5a rust: Migrate to `zcash_client_backend 0.10.0-rc.2` etc 2023-09-12 15:24:45 +00:00
Jack Grigg d162cdf35f rust: Migrate to `hdwallet 0.4` to de-duplicate dependencies 2023-09-12 15:15:58 +00:00
Jack Grigg 01e9b058cb rust: Handle zero-conf transparent funds the same way as iOS 2023-09-12 15:15:58 +00:00
Honza 5e85c39b78 Silent rust compile error
mismatched types: expected `&u64`, found integer
2023-09-09 19:32:35 +02:00
Honza 1b6039c368 Reverting denominator constraint back
The Rust layer now filters out the zero denominator but keeping the ScanProgress new safe ratio function with its test.
2023-09-09 19:11:58 +02:00
Honza ffc1c99738 JniScanRange height parameters constraint 2023-09-09 19:11:58 +02:00
Honza 79ba05f23b Change denominator requirement
- Added safe progress ratio calculating function
- Added test
2023-09-09 19:11:58 +02:00
Honza Rychnovský d3d54d7f15
Filter out zero denominator in Rust layer
Co-authored-by: Kris Nuttycombe <kris@electriccoin.co>
2023-09-09 19:07:52 +02:00
Jack Grigg 9284e60e2a rust: dlopen2 0.6 2023-09-08 21:49:01 +01:00
Jack Grigg ab6a831f50 Migrate to release candidates of Rust crates 2023-09-08 21:49:01 +01:00
Jack Grigg 1ef0304f92 rust: cargo update 2023-09-08 21:49:01 +01:00
Honza Rychnovský c6032b47bd [#1208][#1215] Pass proper `recoverUntil`
- Closes #1208
- CLoses #1215
2023-09-08 20:23:37 +02:00
Jack Grigg 9207dd0b58 Migrate to Rust version with bugfixes
This also reverts the prior change to `getBalance` / `getVerifiedBalance`
now that the fix for zcash/librustzcash#948 is present.
2023-09-08 20:22:40 +02:00
Honza Rychnovský fc14082a1c [#1213] Remove `BlockTable` and its APIs
* [#1213] Remove `count()` from BlockTable API

* [#1213] Remove `firstScannedHeight()` from BlockTable API

* [#1213] Remove `findBlockHash()` from BlockTable

* [#1213] Remove `lastScannedHeight()` from BlockTable

* [#1213] Remove `BlockTable` entirely
2023-09-08 20:22:40 +02:00
Jack Grigg 14d854f96e rust: Return 0 from `getBalance` and `getVerifiedBalance` for unknown accounts
This works around zcash/librustzcash#948, where known accounts without
history are not reported in the `WalletSummary`. We assume that the
Kotlin side of the SDK does not call these FFI methods with unknown
accounts.
2023-09-08 20:19:51 +02:00
Jack Grigg 42cf9d6466 Migrate to Rust revision that exposes scanned heights 2023-09-08 20:19:51 +02:00
Honza 7b7275b5bd Migrate to latest Rust revision follow-up changes 2023-09-08 20:19:51 +02:00
Jack Grigg 11d9529f2b Migrate to latest Rust revision
- Account birthdays
- Scan progress
- Bugfixes
2023-09-08 20:19:51 +02:00
Honza 83ea5b55c3 Fix ktlint warning 2023-09-08 20:19:51 +02:00
Jack Grigg 32069bea0a Migrate to Rust revision with scan queue initialization 2023-09-08 20:19:51 +02:00
Honza Rychnovský 9795610bb9 [#1136] Tests for the new helper extensions
* Jni objects attribute constraint tests


* Extend continuity error test

* ScanRange model tests

* [#1174] Move model classes out of the CompactBlockProcessor

* [#1174] SbS: Move model classes out of the CompactBlockProcessor

* Move SyncingResult out of the processor

* Add issue link
2023-09-08 20:19:51 +02:00