Commit Graph

1137 Commits

Author SHA1 Message Date
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
Lukas Korba 3cf1f23e8e
Merge pull request #1237 from LukasKorba/1232-Implement-createAccount
[#1232] Implement createAccount
2023-09-08 09:54:01 +02:00
Lukas Korba b8b0f2927b [#1232] Implement createAccount
- create account draft

[#1232] Implement createAccount

- TODO for the recoverUntil parameter

[#1232] Implement createAccount

- force unwrap solved

[#1232] Implement createAccount

- ; removed
2023-09-08 08:18:17 +02:00
Lukas Korba 7631810979
Merge pull request #1231 from LukasKorba/1230-Remove-linear-sync-from-the-SDK
[#1230] Remove linear sync from the SDK
2023-09-08 07:41:17 +02:00
Lukas Korba d956e9940b [#1230] Remove linear sync from the SDK
- concept of linear syncing fully removed from the SDK, it's fully replaced with Spend-before-Sync
- BlockDAO - table blocks is no longer used, removed from the SDK and all it's associated getLastBlocks/ScannedHeights as with it
- concept of pending transactions removed from the SDK
- unit tests refactored
2023-09-08 07:40:08 +02:00
Lukas Korba 18141e6e4b
Merge pull request #1235 from nuttycom/rust_bugfix_missing_tip
Update Rust dependencies with bugfixes.
2023-09-08 07:39:37 +02:00
Kris Nuttycombe 6c3dd362b6 Update Rust dependencies with bugfixes.
The previous `zcash-light-client-ffi` revisions should be treated as
ephemeral; they will be removed upon creation of the SDK 2.0.0 release
candidate.
2023-09-07 23:16:26 -06:00
Lukas Korba 0b94809c45
Merge pull request #1234 from zcash/rust-bugfixes
Update Rust dependencies with bugfixes
2023-09-07 21:17:34 +02:00
Jack Grigg 01436c9a93 Update Rust dependencies with bugfixes
The previous FFI repo revisions no longer exist; commits between
87faf91096 and here will not build.
2023-09-07 19:54:12 +01:00
Lukas Korba 3c97e5cca9 [#1227] Check continuation of UpdateChainTip repeated call
- My assumption was right, the way State Machine is done requires .celarCache to be called with every "restart"
- I was able to reproduce errors when clearCache wasn't called so the updateChainTipAction needed to be updated to prepare clean conditions for the scan suggest ranges
- tests updated
2023-09-07 13:23:50 +02:00
Lukas Korba 7e2e787aef [#1223] Requested height [over latestheight] does not exist in the block cache
- the end of scan range is now properly filled

[#1223] Requested height [over latestheight] does not exist in the block cache

- the end of scan range is now properly filled
- unit tests for this change, checking if range.upperBound is set as expected

[#1223] Requested height [over latestheight] does not exist in the block cache

- code cleanup
2023-09-07 13:23:50 +02:00
Lukas Korba 569741e0a4 [#1179] Handle false positive getSubtreeRoots when connectivity is down
- when getSubtreeRoots call fails on timeout, the connectivity is not present and the action must be terminated (throw) an error, this way when the connectivity is back, the State Machine starts over and getSubtreeRoots get a chance to properly decide if SBS is supported

[#1179] Handle false positive getSubtreeRoots when connectivity is down

- unit test for the timeout getSubtreeRoot added

[#1179] Handle false positive getSubtreeRoots when connectivity is down (#1222)

- warning fixed
2023-09-07 13:23:50 +02:00
Lukas Korba 95536638e5 [#1176] Cover Spend before Sync with tests
- WIP

[#1176] Cover Spend before Sync with tests

- next batch of updates

[#1176] Cover Spend before Sync with tests

- last batch of fixes and new tests

[#1176] Cover Spend before Sync with tests

- package.resolved updated

[#1176] Cover Spend before Sync with tests (#1212)

- added tests for brand new actions related Spend before Sync
- RewindActionTests
- UpdateChainTipActionTests
- UpdateSubtreeRootsActionTests
- ProcessSuggestedScanRangesActionTests
2023-09-07 13:23:50 +02:00
Lukas Korba 80eb3b1c8d [#1181] Correct computation of progress for Spend before Sync
- the computation of progress changed, the total range is computed, that way it works for any kind of sync algorithm
- the progress depends on finished scan action, whenever it processes some blocks, it's counted up
- the final progress is a ratio between these new values
2023-09-07 13:23:48 +02:00