Commit Graph

767 Commits

Author SHA1 Message Date
Lukas Korba dcc6ef1757
[#671] Make CompactBlockProcessor Internal (#710)
- sdk and demo app modified
- changelog updated
2023-01-12 13:05:11 +01:00
Michal Fousek c6af1cace3
Merge pull request #702 from zcash/657_download_change
657 download change
2023-01-09 15:17:07 +01:00
Michal Fousek 382905b06a [#657] Fix typos 2023-01-09 13:29:43 +01:00
Michal Fousek 473326fc55
Merge pull request #708 from Chlup/657_scan_batch_not_global
[#657] Scan batch size is computed for each scan loop
2023-01-09 13:23:41 +01:00
Michal Fousek abe647e28d Update how progress is reported while scanning blocks 2023-01-06 16:45:49 +01:00
Francisco Gindre 851023842f
[#612] Remove Support for Cocoapods (#706)
Our main dependency, Swift-GRPC is dropping support for Cocoapods from version 1.8.2.

Even though they make a great work at maintaining backwards compatibility, we will eventually be forced to drop Cocoapods support.

We've reached out partners like NighthawkApps, Horizontal Systems (Unstoppable) and Edge, who have reported not depending on Cocoapods.

We intend to end Cocoapods support on 0.18.0.

Closes #612
2023-01-06 12:26:00 -03:00
Michal Fousek 09e9148b88 [#657] Scan batch size is computed for each scan loop 2023-01-06 13:16:12 +01:00
Michal Fousek e8aa451b17 [#657] Update changelog 2023-01-05 15:13:27 +01:00
Michal Fousek becadf21c8 Merge branch 'main' into 657_download_change 2023-01-05 09:50:00 +01:00
Francisco Gindre f6be12fd8c
Merge pull request #699 from zcash/release/0.17.5-beta
[#698] Updated Checkpoints release 0.17.5-beta
2023-01-04 10:53:21 -03:00
Francisco Gindre f13322225d
Merge branch 'main' into release/0.17.5-beta 2023-01-04 10:52:44 -03:00
Francisco Gindre 70e732e551 Fix Merge conflict on PR. 2023-01-04 10:49:46 -03:00
Francisco Gindre c0f8d46501 [#698] Updated Checkpoints release 0.17.5-beta 2023-01-03 17:55:02 -03:00
Michal Fousek e63c7d66fe
Merge pull request #691 from Chlup/678_synchronizer_start_while_processing
[#657] Fix start of SDKSynchronizer when sync is already in process
2023-01-02 23:11:17 +01:00
Michal Fousek 7b4f5f6730
Merge pull request #692 from Chlup/all_scheme
Add Xcode scheme that builds all the targets
2023-01-02 23:11:01 +01:00
Francisco Gindre 423afdf6cf
Merge pull request #690 from rex4539/typos
Fix typos
2023-01-02 12:15:41 -03:00
Michal Fousek 21b51a2011 Add Xcode scheme that builds all the targets
This is small improvement of lives for developers. Before this change if
developer wanted to test if change can be compiled then developer had to
go scheme by scheme and test compilation. This change introduces `All`
scheme which builds all the targets on one key stroke/mouse click.
2023-01-02 15:10:57 +01:00
Michal Fousek c3b13d8367 [#657] Fix start of SDKSynchronizer when sync is already in process
Previously `SDKSynchronizer` simply refused to start while the sync
process was in progress. That could lead to some troubles.
`CompactBlockProcessor` has already mechanism which can handle this
exact situation. So now `SDKSynchronizer` starts `CompactBlockProcessor`
even when there is sync in progress.
2023-01-02 10:24:02 +01:00
Dimitris Apostolou 6c3423181d
Fix typos 2022-12-31 12:50:16 +02:00
Francisco Gindre 90461c63f5
Merge pull request #689 from Chlup/657_merge_master
[#657] Merge branch 'master' into 657_download_change
2022-12-28 15:50:01 -03:00
Michal Fousek 4b4416b1e1 Merge branch 'master' into 657_merge_master
- Changed how metrics are pushed when downloading and scanning blocks.
2022-12-22 15:35:11 +01:00
Lukas Korba 3c3b97ca42
[#663] Create a benchmarking section on the Demo App that can be automated (#681)
- SDKMetrics singleton for the measurement
- download, validate and scan blocks supported
- Sample app refactored to use SDKMetrics, connected to appropriate notifications and labels
- enhancement metric added
- total sync time metric added
- sample app extended to show summary time and operations summaries
- unit tests for the SDKMetrics
- doc for the SDKMetrics and our approach for the performance testing in general
- changelog update
2022-12-21 13:30:05 +01:00
Francisco Gindre 64c9df0fc0
Merge pull request #682 from Chlup/677_cantsync_after_wipe
[#677] Add support for wipe into SDK
2022-12-20 15:00:22 -03:00
Michal Fousek 6c5bf8de27 [#677] Add support for wipe into SDK
Closes #677

- Previously when keychain wanted to do wipe wallet had to do it on it's
  own. Which isn't good. Now wallet can simply call
  `synchronizer.wipe()` and it's done.
- This change brings support for wipe. `Synchronizer` has new method
  `wipe()` which takes care of everything. All the database connections
  are closed. Databases are removed. `InternalSyncProgress` is reset.

Change condition when wipe can run
2022-12-20 13:41:20 +01:00
Michal Fousek 349148cd38 [#657] Change how blocks are downloaded and processed
Closes #657

- Now SDK downloads N downloads and scan those. And repeat until sync is
  done. This safes lot of space of disk used to store downloaded blocks.
- Most changes are done in `CompactBlockProcessor.processNewBlocks`.
- `SyncRanges` structure is changed a bit.
- `SyncStatus` is changed. SDK now report that it's syncing with
  progress. It doesn't report each phase of the sync process separately.
  Also appropriate notifications were updated.

Address review comments

- Small changes
- Add tests to check computation of processing ranges for single loop
2022-12-19 09:35:09 +01:00
Francisco Gindre be3ff4299d
Merge pull request #676 from zcash/release/0.17.4-beta
[#675] release 0.17.4-beta
2022-12-15 09:09:05 -03:00
Francisco Gindre d54ea493fa [#675] release 0.17.4-beta
updates `libzcashlc` to `0.1.1` to fix an error where getting a
transparent balance on an empty database would fail.

closes #675
2022-12-14 18:12:11 -03:00
Francisco Gindre e9c93f88c2
Merge pull request #673 from zcash/fix_get_transparent_balance
[#665] Fix testShieldFunds() `get_transparent_balance` error
2022-12-14 17:48:21 -03:00
Francisco Gindre b01127bd84 [#665] Fix testShieldFunds() `get_transparent_balance` error
This commit adopts libzcashlc 0.1.1 which fixes this error

Closes #665
2022-12-13 19:12:22 -03:00
Francisco Gindre 81d24b100a
Merge pull request #670 from zcash/release/0.17.3-beta
Release/0.17.3 beta
2022-12-12 18:39:13 -03:00
Francisco Gindre 2dfd096948 Add CHANGELOG.md entry and bump cocoapods version 2022-12-12 17:44:56 -03:00
Francisco Gindre 50e63232e3 New Checkpoints + CHANGELOG.md 2022-12-12 17:39:05 -03:00
Michal Fousek 2112be8dad
Merge pull request #648 from Chlup/646_fix_resume
[#646] SDK sync process resumes correctly
2022-12-12 14:49:15 +01:00
Michal Fousek e01c83690f [#646] SDK sync process resumes correctly
- Previously we had one range for each sync which was used for each
  phase of sync process. Newly there is separate range for each phase of
  the sync process.
- I added `InternalSyncProgress` utility. This utility tracks progress
  of some phases. And it is able to compute right ranges which should be
  used for syncing.
- Some unused download code from `CompactBlockProcessor` is removed.

Fix tests

Address review comments

- Rebase to master
- Update how range for `processBatchFinished()` is computed.
- Refactor `InternalSyncProgress`
- Add tests for `InternalSyncProgress`

Address review comments

Change how latest downloaded block is tracked

- Cache DB is no longer used to track which block was downloaded as
  latest. `InternalSyncProgress` is used to do that.
- Thanks to that #660 is fixed. And cache DB can be completely removed
  after sync process.
- Added sleep(1) to some darkside tests when latest block height is set.
  Otherwise lightwalletd in darkside mode doesn't have time to setup and
  tests are flaky.

Fix TransactionEnhancementTests.testBasicEnhancement test
2022-12-12 14:27:30 +01:00
Francisco Gindre 3b7202c922
Fix `testShieldFunds()` dataset loading issue. (#659)
There's a problem withstanding:

````
▿ RustWeldingError
  ▿ genericError : 1 element
    - message : "Error while fetching transparent balances for AccountId(0): Invalid column type Null at index: 0, name: address"
````

Which is fixed by commit `d0297bff0cdaaff42ad26f3be5bc261f6c828e8f` of "https://github.com/zcash/librustzcash".

nil-coalesce thrown errors on test so it reaches the end.

Make balance calls throwing to show underlying errors but nil-coalesce in non-throwing APIs

Add missing fulfill() calls

Add changelog entry

document and handle errors on getting shielded balance before
attempting to download sapling parameters.
2022-12-12 10:00:31 -03:00
Francisco Gindre 50f0bb4e99
Merge pull request #662 from zcash/release/0.17.2
Release/0.17.2
2022-12-06 19:43:34 -03:00
Michal Fousek cc2c0ffa65 [#660] Fix the situation when any rewind causes full rescan
This is just hotfix that disables removing of cache DB.

Bump Cocoapods version to 0.17.2-beta
2022-12-06 15:12:34 -03:00
Francisco Gindre d1d3dae2c5
Merge pull request #658 from zcash/release/0.17.1
[#625] Release 0.17.1-beta
2022-12-05 17:29:15 -03:00
Francisco Gindre 1c672cad59 [#625] Release 0.17.1-beta
Closes #625

See CHANGELOG.md for details
2022-11-30 11:08:48 -03:00
Lukas Korba ce6a417154
[#585] Fix RewindRescanTests (#656)
- test fixed, the saplingActivation wasn't passed to the block processor just like to the service, there's the mismatch
2022-11-29 19:59:16 -03:00
Michal Fousek a4e5e082c1
Merge pull request #654 from Chlup/651_fix_rewind
[#651] Fix rewind when it's called during sync
2022-11-29 09:10:46 +01:00
Michal Fousek 7c07b91c5b [#651] Fix rewind when it's called during sync
- When rewind is called during sync then exception is thrown.
2022-11-29 08:33:18 +01:00
Michal Fousek a7fe75c11e
Cleanup warnings (#655)
- TestCoordinator doesn't need to be used in async manner.
2022-11-29 07:40:45 +01:00
Lukas Korba 6029a75038
[#637] Make sapling parameter download part of processing blocks (#650)
- sync process enhanced to try to download sapling params if needed
- tests fixed
- failing import Crypto -> import CryptoKit
- download params only if there are sapling funds
2022-11-29 07:38:28 +01:00
Francisco Gindre 7c9fddedf4
Add benchmarking info to SyncBlocksViewController (#649)
Fix Github action
2022-11-28 13:42:07 -03:00
Lukas Korba cc99fbad30
[#590] Fix or delete CompactBlockProcessorTests disabled tests it not needed (#653)
- The tests were fine in the end but Stream needed to be finished in any way, caused "for await" syntax to never finish
2022-11-28 15:08:55 +01:00
Lukas Korba d36c1fbc14
[#631] Verify SHA1 correctness of Sapling files after downloading (#643)
- Verification of the SHA1 after downloading the file(s)
- Private API is encapsulated in private extension
2022-11-23 09:47:56 +01:00
Michal Fousek 96a205644a
Merge pull request #642 from Chlup/sdksynchronizer_status_publisher
Change lastState property to Publisher from Subject in SDKSynchronizer
2022-11-23 09:11:36 +01:00
Francisco Gindre b350f6b220
[#639] Provide an API to estimate TextMemo length limit correctly (#640)
This provides a method for clients to handle UI for text memo
limit correctly handling memos that are visibly fit within the
capacity defined in ZIP-302 but when encoded into UTF-8 bytes
their size exceeds such limit.

Closes #639
2022-11-22 14:02:39 -03:00
Michal Fousek 1f2ea5e716 Change lastState property to Publisher from Subject in SDKSynchronizer
It's not good practice to make internal combine subjects accessible from
outside of SDK. So `lastState` is changed from `CurrentValueSubject` to
`Publisher`. This doesn't have any effect on public API. It just makes
SDK safer.
2022-11-22 14:10:27 +01:00