Commit Graph

1100 Commits

Author SHA1 Message Date
Kris Nuttycombe d8b069fd15 Update librustzcash to fix transparent balance issues. 2023-09-22 18:18:10 -06:00
Kris Nuttycombe 09c97184ec
Merge pull request #1282 from LukasKorba/1281-Database-is-locked
[#1281] Database is locked
2023-09-20 13:39:52 -06:00
Lukas Korba dc4e590f68 [#1281] Database is locked
- Execution of any query in TransactionSQLDAO was not thread safe. Since all queries goes through execute() method, this is now using a lock

[#1281] Database is locked

- global lock used, all rust backend code accessing data DB is under lock
- transactionsqldao is also under same lock

[#1281] Database is locked

- refactor + fbDB locked as well

[#1281] Database is locked

- lock around scalars added

[#1281] Database is locked

- comments addressed
- scalarLocked helper implemented
- connection().run and .transition locked as well

[#1281] Database is locked

- db used so it's not called twice

[#1281] Database is locked

- AccountEntity protected via globalDBLock as well
2023-09-20 19:13:52 +02:00
Kris Nuttycombe 17a36bb02d
Merge pull request #1275 from nuttycom/fix/transparent_history
Update zcash-light-client-ffi to adopt fix for missing transparent history
2023-09-19 16:42:27 -06:00
Kris Nuttycombe a338e1daf5 Apply suggestions from code review.
Co-authored-by: str4d <thestr4d@gmail.com>
2023-09-19 16:24:36 -06:00
Kris Nuttycombe 404eff21b1 Update to zcash-light-client-ffi version 0.4.0-rc.3 2023-09-19 15:43:52 -06:00
Kris Nuttycombe 5887288cde Note (and slightly repair) a misfeature in the demo app. 2023-09-19 14:17:24 -06:00
Lukas Korba e4bc54e8f2 expiredUnmined fix 2023-09-19 12:09:28 -06:00
Kris Nuttycombe 4b754c5378 Update zcash-light-client-ffi package revision. 2023-09-19 12:09:28 -06:00
Kris Nuttycombe 94a5f599ae Fix incorrect use of transaction index in find-from-transaction query.
This fixes an issue where the transaction index was incorrectly being
used to filter out transactions from the contents of the
`v_transactions` view, and updates the query to account for the fact
that both the block time and the transaction index may be NULL in the
results of this view.
2023-09-19 10:25:18 -06:00
Lukas Korba e40b1e6c42 DemoApp fixed 2023-09-19 16:50:24 +02:00
Kris Nuttycombe 2c526dbcd6 Update `zcash-light-client-ffi` to adopt fix for missing transparent history.
Fixes #1271

Co-Authored-By: Jack Grigg <jack@electriccoin.co>
Co-Authored-By: Lukas Korba <lukas.korba@seznam.cz>
2023-09-19 08:26:03 -06:00
Kris Nuttycombe ab7aedeea1
Merge pull request #1274 from LukasKorba/1273-SynchronizerState-not-always-up-to-date
[#1273] SynchronizerState not always up to date
2023-09-18 16:34:35 -06:00
Kris Nuttycombe 36ed739077
Merge pull request #1272 from LukasKorba/1262-Check-pairing-of-deallocations-vs-allocations-in-rustBackend
[#1262] Check pairing of deallocations vs allocations in rustBackend
2023-09-18 16:29:24 -06:00
Kris Nuttycombe 7b64b62483
Merge pull request #1270 from nuttycom/remove_10_block_range_limit
Remove the 10-block range limit for during sandblasting.
2023-09-18 10:02:19 -06:00
Lukas Korba 6b8d95906a [#1273] SynchronizerState not always up to date
- latestBlockHeight (chain tip) reported in the SynchronizerState to the clients is now updated every 10mins at most, typically with every sync run (10-30s)
- fully and max scanned heights update fixed
- new mocks provided and tests fixed
2023-09-18 11:01:58 +02:00
Lukas Korba 110007ac66 [#1262] Check pairing of deallocations vs allocations in rustBackend
- rootsPtr deallocated
2023-09-18 08:32:01 +02:00
Kris Nuttycombe 4ef4b1172f Remove the 10-block range limit for during sandblasting.
The improved performance provided by `shardtree` is sufficient to allow
100-block scan ranges throughout the sandblasted range, and limiting to
10 blocks results in significant overhead.

A future release will switch to an adaptive strategy which can
dynamically adjust download and scan range sizes based upon observed
output counts and scanning times to provide consistent throughput.
2023-09-15 20:30:09 -06:00
Kris Nuttycombe 0abe7f8cdf
Merge pull request #1268 from pacu/dbz-mitigation 2023-09-13 16:43:02 -06:00
Francisco Gindre 4f225b5115
[#1267] Avoid Division By Zero in ScanProgress type
Although is not the best way to solve it this addresses the issue
in a single statement and following existing pattern in the code.

The error should be thrown earlier in RustBackend itself if so,
or fallback to some specific value that makes sense to the domain

Closes #1267
2023-09-13 18:47:55 -03:00
Kris Nuttycombe 552d31eb64
Merge pull request #1243 from zcash/feature/DAG-sync
Implement the ability to spend funds without complete wallet sync.
2023-09-13 11:34:44 -06:00
Lukas Korba 26fe1f7310 ScanRange initialization changed
- only the matching priorities are allowed, otherwise fatalError
2023-09-13 17:57:24 +02:00
Lukas Korba 50afc8f2e5 Instance totalProgressRange removed
- totalProgressRange was removed from the protocol but not from the actual implementation
2023-09-13 17:42:43 +02:00
Lukas Korba 4e2af5da68 Addressed comments batch 2
- more comments resolved
- totalProgressRange removed from the SDK
- ScanRange now takes into account the given value and properly initializes, + added tests
- tests fixed
2023-09-13 17:33:37 +02:00
Lukas Korba 5600e77a71 Rewind action continues to the processScanRanges
- the diagram png + puml updated
- rewind action continues to the process scan ranges
2023-09-13 16:28:42 +02:00
Lukas Korba 95c9746303 cbp_state_machine updated
- cbp_state_machine.png as well as .puml files updated to reflect the State Machine changes after SBS
- one small cleanup of clearCache, no longer needed to be called twice, only after enhance (missed removal of linear sync)
2023-09-13 15:25:25 +02:00
Lukas Korba 3d2812c77f ProcessSuggestedScanRanges always continues to the download
- the logic deciding if verify range is present and going to the rewind is no longer valid, so removed
- tests updated
2023-09-13 14:58:38 +02:00
Lukas Korba af595e60e6 Cleanup and comment providing context
- adding a context so it's clear why division by 0 is not a concern
- pending transactions removed from the DemoApp's UI, #1260 is a followup
2023-09-13 11:57:21 +02:00
Lukas Korba d5d4664bf5 Rewind when continuity error
- when isContinuityError occurred, the next action  should be rewind, fixed
2023-09-13 09:54:26 +02:00
Lukas Korba 4b45c15a96 Comments addressed
- all comments from the review (round 1) resolved
2023-09-13 09:24:26 +02:00
Kris Nuttycombe 2ac984a0dd Update zcash-light-client-ffi to version 0.4.0-rc.2 2023-09-12 10:06:25 -06:00
Lukas Korba 3fbff96bc7
Merge pull request #1246 from nuttycom/feature/DAG-sync-release-prep
Update zcash-light-client-ffi dependency for release candidate prep.
2023-09-12 07:51:51 +02:00
Kris Nuttycombe 457cc9a9e7 Update zcash-light-client-ffi to fix an error with checkpoint depths.
See [zcash/librustzcash#963]
2023-09-11 19:16:17 -06:00
Kris Nuttycombe e28035292f Release 2.0.0-rc1
* Updates to `zcash-light-client-ffi 0.4.0-rc.1`
* Makes some cleanup updates to the CHANGELOG; a complete changelog will
  be prepared for the 2.0.0 final release.
2023-09-11 19:10:55 -06:00
Lukas Korba 51c2c33f12
Merge pull request #1256 from LukasKorba/1255-Changelog-tweak
[#1255] Changelog tweak
2023-09-11 12:00:01 +02:00
Lukas Korba a42fc87d73
Merge pull request #1254 from LukasKorba/1240-Remove-previous-progress-reporting
[#1240] Remove previous progress reporting
2023-09-11 11:59:51 +02:00
Lukas Korba 945f25a181 [#1255] Changelog tweak
- cleanup and fixes
2023-09-11 09:37:47 +02:00
Lukas Korba fdcb52c088 [#1240] Remove previous progress reporting
- CompactBlockProgress has been update to use syncProgress only
- CompactBlockProgressUpdate removed
- BlockProgress removed
- enhance and fetch progresses removed
- progressPartialUpdate refactored to syncProgress
- tests updated
2023-09-11 09:30:44 +02:00
Lukas Korba 65d0e987f6
Merge pull request #1253 from LukasKorba/1252-NetworkTests-fails-to-run
[#1252] NetworkTests fails to run
2023-09-11 09:30:19 +02:00
Lukas Korba a91df535a5
Merge pull request #1251 from LukasKorba/1249-Fix-linter-issues
[#1249] Fix linter issues
2023-09-11 09:30:08 +02:00
Lukas Korba f3f519bfea [#1252] NetworkTests fails to run
- NetworkTests are buildable and can run not crashing due to lack of mocked properties
- most tests have been fixed and pass again
2023-09-11 08:34:09 +02:00
Lukas Korba ec8aca2890 [#1249] Fix linter issues
- all issued fixed, one wasn't clear so new ticket is created to follow up and TODO added
2023-09-11 08:03:16 +02:00
Lukas Korba 2da8dce372
Merge pull request #1248 from LukasKorba/1242-Fix-unit-tests-after-SBS-changes 2023-09-10 19:55:25 +02:00
Lukas Korba 2f521d7857 [#1242] Fix unit tests after SBS changes
- DarkSide, Network and Performance tests were modified to be buildable again
2023-09-10 08:43:33 +02:00
Lukas Korba 3f817e1301
Merge pull request #1245 from LukasKorba/1244-Checkpoints-update
[#1244] Checkpoints update
2023-09-08 18:41:26 +02:00
Lukas Korba 36329fe818 [#1244] Checkpoints update
- mainnet + testnet checkpoints updated
2023-09-08 18:33:44 +02:00
Lukas Korba 0d56e4fcc6
Merge pull request #1241 from LukasKorba/1236-Use-of-recoverUntil
[#1236] Use of recoverUntil
2023-09-08 17:41:36 +02:00
Lukas Korba dc5cbd8dec [#1236] Use of recoverUntil
- SDKSynchronizer's public API prepareWith() now requires a parameter WalletInitMode
- tests fixed
- changelog updated
2023-09-08 15:44:48 +02:00
Lukas Korba db23944415
Merge pull request #1239 from LukasKorba/1238-Report-sync-progress-with-the-new-getScanProgress
[#1238] Report sync progress with the new getScanProgress
2023-09-08 15:44:17 +02:00
Lukas Korba 60780f4c83 [#1238] Report sync progress with the new getScanProgress
- getScanProgress used for reporting of the syncing progress

[#1238] Report sync progress with the new getScanProgress

- comment added

[#1238] Report sync progress with the new getScanProgress (#1239)

- TODOs + offline tests fixed
2023-09-08 12:19:54 +02:00