Commit Graph

53 Commits

Author SHA1 Message Date
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
Jack Grigg abb98bd192 Migrate to Rust revision with scanning and spending fixes 2023-09-08 20:19:51 +02:00
Honza 61f618caf9 Remove OpenEndRange type entirely 2023-09-08 20:19:51 +02:00
Jack Grigg 54d016e401 Migrate to Rust revision with checkpoint and memo bugfixes 2023-09-08 20:18:10 +02:00
Jack Grigg 0b7c61927c Migrate to Rust revision with additional performance improvements 2023-09-08 20:18:10 +02:00
Jack Grigg 811081b289 Migrate to Rust revision with spend detection and migration perf fixes 2023-09-08 20:18:10 +02:00
Honza Rychnovský 6a68889df6 [#1123] Linear vs Non-linear decision mechanism 2023-09-08 20:18:10 +02:00
Jack Grigg e43e86889c Migrate to Rust crate versions with fast spendability bugfixes 2023-09-08 20:18:10 +02:00
Honza f7bb2ae460 Fix JniSubtreeRoot + extension and tests 2023-09-08 20:18:10 +02:00
Jack Grigg 3c5d91b112 Expose `putSaplingSubtreeRoots` and `updateChainTip` Rust APIs 2023-09-08 20:18:10 +02:00
Honza 3476ccace1 Fix type returned from suggest_scan_ranges 2023-09-08 20:18:10 +02:00
Honza 85388a85c3 Clear validation stage 2023-09-08 20:18:10 +02:00
Honza 7cee1d7203 Make buildable + Solve Lint warnings 2023-09-08 20:18:10 +02:00
Jack Grigg 12c3441778 Migrate to Rust crate versions with fast spendability support 2023-09-08 20:18:10 +02:00
Honza Rychnovský d38bde86ba
[#1176] Rest Dependency Update 2023-09-03 22:18:48 +02:00
Honza Rychnovský b7a1edf828
[#1178] Gradle 8.3 2023-08-31 10:11:52 +02:00
Honza Rychnovský 0be05a1c4c
[#1108] Getting memo for sent transactions 2023-07-31 13:34:41 +02:00
Honza Rychnovský f1b5e3aade
[#1014] Decorate Backend with Typesafe APIs
* [#1014] Decorate Backend with Typesafe APIs
2023-07-17 12:50:53 +02:00
Honza Rychnovský 53f5550bf4
[#1066] Detekt enhancement
* [#1083] Detekt Compose 0.1.10

* [#1066] Detekt - MaxLineLength rule turn on

* Remove default values

As we keep only those that differ from the default in the latest Detekt update.

* [#1086] Improve TODO inline occurrence pattern
2023-06-20 11:26:38 +02:00
Carter Jernigan 83910888ea
[#921] AGP 8.0.2
* [#921] AGP 7.4.2

* Bump AGP to version 8.0.2

- Includes necessary changes

* Gradle and Rust plugin compatibility workaround

* Release build proguard rules

After bumping to the AGP 8.0.2 some new proguard rules are autogenerated and one new for the io.grpc.okhttp.OkHttpChannelProvider is needed

* Plugins compatibility workaround update

* Disable unnecessary benchmark module minification

As we just need to keep the target module obfuscated.

* [#1067] Gradle 8.1.1

* [#1068] Activity Compose 1.7.2

* [#1069] Protobuf

* [#1070] Tracing 1.2.0-rc01

* [#1071] JUnit 5.9.3

* [#1072] Mockito 5.3.1

* Demo app release build timeout increase

- Our latest change (double build due to Rust integration issue) possibly causes our build timeout to exceed with the latest Gradle version

* Dep issue template update

* Fix deprecated Runtime.exec()

---------

Co-authored-by: Honza <rychnovsky.honza@gmail.com>
2023-06-09 15:18:11 +02:00
Honza Rychnovský b99ab6cdf9
[#920] Rust backend void return
* [#920] Tweak RustBackend public APIs to have void return values

- Contains changes for putUtxo() function

* Changes for scanBlocks() function

* Changes for decryptAndStoreTransaction()

* Changes for rewindToHeight()

* Changes for writeBlockMetadata()

* Changes for initBlocksTable and initAccountsTable
2023-06-09 10:29:33 +02:00
Carter Jernigan ac63df2759 zcash_client_sqlite 0.7.1 2023-05-22 08:00:47 -04:00