- Removed all uses of the incorrect 1000-ZAT fee as defined with deprecated zip-313
- Default is now 10k zatoshi, the minimum defined by zip-317
- Changelog updated
- Closes #1273
* [#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
- Off-by-one in determining whether a transaction is confirmed.
- Expiry logic was inverted for non-zero expiry heights.
- Transactions with zero (disabled) expiry heights happened to work
because this case is currently detected in the database logic and
mapped to `null`, which the old code mapped to `Long.MAX_VALUE`
which gave the correct result for the old conditional expression.
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.
* [#1241] Remove rewind for every verify scan range
- The original solution comes from the pseudocode requirement: Download the blocks in `scan_range` into the block source, overwriting any existing blocks in this range.
- Removed
* [#1243] Rewind only after continuity-error
- Rewind is done only when Continuity-error appears now. In case of other sync failures, the sync loop sleeps for a short time and then retries. Internal actions like fetching subtree roots, fetching chain tip, downloading, scanning, etc., still have their internal retry mechanisms.
- For the calculation of the rewind height, we use the existing checkContinuityErrorResult method, originally used only for validation use cases but later incorrectly used for other failures too.
- Closes#1243
- Closes#1222 as it was created to determine which failure type comes and don’t rewind for all of them
- Tested manually in several scenarios, e.g. lost internet connection or app going to background
* Handle Continuity and other sync errors
- Call handleContinutyError and its rewind logic directly without checking failed attempts. This ensures that we keep trying to reorg.
- And return the correct type of error in that case.
- Add fail logic to the handling of the other types of errors.
* Add JniScanProgressTest
* Remove unnecessary testnet workaround
As this was fixed with the last rust changes.
* Simplify batchCount calculating
* Fix ratio typo
* Docummentation comments changes
- TypesafeBackend.createAccountAndGetSpendingKey now works with a type-safe TreeState model class instead of ByteArray.
- New type-safe TreeState added. Once we get the TreeState object from the lightwalletd server, potential validation comes into this object.
* [#1170] Regular transaction flow emitting
Although zcash/librustzcash#918 will provide information on when to trigger transaction polling, this partly solves the issue as well
* Update changelog
* [#1180] Frequent SbS synchronization restarting
- Processing blocks with SbS split into preparation and processing functions, which can be called repeatedly.
- Refactored other parts of the synchronization mechanism
- Closes#1180
- This also partly solves #1137
* Update .gitignore
* Update LINCENSE documentation
* [#1177] Checkpoints update
* Fix Ktlint warning
* 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
* [#1168] Checkpoints update
* [#1159] Updated sync progress reporting
* Increase test_robo_demo_app timeout
* Migrate to ClosedEndRange
It’s better to transform suggested ranges from OpenEndRange to ClosedRange as soon as possible to avoid its handling in the rest of the logic.
* Improve all batch count calculating
* Subsequent SbS sync algorithm renaming
* Add rewind button to Demo app
To be able to test refactored CompactBlockProcessor rewind feature.
* Rename non-linear to spend-before-sync
* [#1129] Refactor lastSyncRange lastSyncedHeight
* Fix updateRange function
As the overallSyncRange needs to be reset in case of all ranges are processed.
* [#1166] Remove alsoClearBlockCache parameter
* [#1133] Set the correct getSubtreeRoots inputs
- It also better handles setState calls
- It fixes OpenEndRange -> ClosedRange
- And it improves logging in syncing mechanism
* Increase build CI timeout
* [#1139][#1138] Process Priority.Verify blocks
This makes the new subtask functions more testable.
* Increase CI test timeout
* [#1047][#1140] Improve CBD internal state handling
* [#1047][1140] Improve CBD internal state handling
This improves internal state handling in CompactBlockProcessor. Error handling included. And it prepares us for ContinuityError handling too.
* [#1143] Handle ContinuityError
This handles the state in which is a transaction after it’s created with mined height null. It then doesn’t try to convert such a height into a BlockHeight object which is doing validation on input height. It rather returns null, similarly as for expiry height.
* [#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
* [#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>
* [#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
Enhancing transaction details mechanism was refactored to provide more clarity about its inner phases (fetching and decrypting with storing) and to be able to retry when the transaction fetching fails due to flaky network condition
* [#1026] Consider Enhancing Every 1000 Synced Blocks
* Enhancing refactoring code cleaning
* Query un-enhanced transactions from repository
- And change enhancement range in case of any transaction found
- Changed enhancing trigger appropriately
- Covered also the case when the sync stage ended before the enhancement limit reached
- Cleaned up the code
* File and link sub-stages error handling follow-up
* File and link Duration instead of Long refactoring issue
---------
Co-authored-by: Carter Jernigan <git@carterjernigan.com>
* rust: cargo update
* rust: Migrate to `zcash_client_sqlite 0.7`
* rust: cargo fmt
* Adopt zcash_client_sqlite 0.7 database changes
* [#1018] add limit parameter to validateCombinedChain
* Adopt limit parameter in Android layer
* Switch limit argument to Long
- Switched from Int to Long type
- Done for both validate and scan blocks functions
- Changed the default parameter for nullable one in the public interface to let callers be explicit about the argument
- Changed in the Rust layer as well
---------
Co-authored-by: Carter Jernigan <git@carterjernigan.com>
Co-authored-by: Jack Grigg <jack@z.cash>
Co-authored-by: Honza <rychnovsky.honza@gmail.com>
* [#1009] Change CompactBlockProcessor methods signature
* Remove withContext {}
Since our networking, RustBackend, and CompactBlockRepository all use coroutines internally by implementing `suspend` for their APIs, we don’t need withContext() anymore. (If we discover something does do blocking IO on the thread, we should deal with it at the point the IO is occurring rather than at the top level)
* Sort FileExt functions
* Add isDirectorySuspend
- To avoid strict mode disc IO violation warning
* Omit try/catch on block files delete action
* Refactor scan batch function
- Removed retry mechanisms, as it’s not needed now after the previous switch from the database-based blocks persisting to file-based blocks persisting
- scan function now works with the current processing range of blocks size instead of hardcoded constant value
* Eliminate duplicate processorInfo object
* Change log text
* MutableList instead of ArrayList
* Eliminate sync range nullability
* Rewind not scanned blocks
If we find out that we previously downloaded, but not validated and scanned persisted blocks, we need to rewind the blocks above the last scanned height first.
* Fix ktlint warning
---------
Co-authored-by: Carter Jernigan <git@carterjernigan.com>
* [#895] Adopt new Response result
* Change catch flow part
* Correct emit from flow catch
* Additional changes after Block store on disk merged
* Simplify networking model structure
* Enhance flow filter
* Switch to coroutine client in a few tests too
* Use StatusException
* Switch client in a few tests
* Switch client for download block case
* Link fetch UTXOs issue
* Refactor refresh and process UTXOs
* Improve downloadBlockRange logging
* Switch getTAddressTransactions to the Response result
* Move some parts of requests out of try-catch
* Remove link to issue
* Refactor fetchUtxos to return Response
* Throws custom exception from ResponseFailure
- To trigger existing re-try mechanisms in case of any particular trouble