Commit Graph

974 Commits

Author SHA1 Message Date
Michal Fousek 8385c22100 [#644] Enable test testReOrgRemovesIncomingTxForever
- Test works with currently used lightwalletd. It doesn't work with
  newer. It can be enabled for now.
2023-02-27 14:44:37 +01:00
Michal Fousek 27f0efa0a7 [#789] Fix testRescanToHeight test
Closes #789
2023-02-27 14:39:07 +01:00
Michal Fousek 1fe7b494d5 [#790] Fix testRescanToTransaction test
Closes #790
2023-02-27 14:36:32 +01:00
Michal Fousek 137788d81c
Merge pull request #805 from Chlup/show_values_in_zec
[#803] Fix how transaction value is showed in the SDK sample app
2023-02-23 19:34:28 +01:00
Michal Fousek 3b2d972b2d [#803] Fix how transaction value is showed in the SDK sample app
Closes #803
2023-02-23 11:50:21 +01:00
Michal Fousek e3c9530416
Merge pull request #802 from Chlup/801_improve_wipe
[#801] Improve wipe implementation
2023-02-23 09:38:58 +01:00
Michal Fousek c1b640b44e [#801] Improve wipe implementation
Closes #801

- `SDKSynchronizer.wipe()` can be now called anytime.
- If the sync is in progress then the sync is first stopped and then
  wipe is executed.
- Wipe now returns AnyPublisher which completes or fails when wipe is
  done.
- Majority of wipe's work is to delete files. That is only operation
  that can throw error during wipe. This operation should succeed every
  time. If it fails that something is seriously wrong. When this happens
  the SDK can happen in inconsistent state. There is no recovery for
  now. Only way how to fix this is to reinstall the app in the device.
- Added hooks mechanism. This is implemented in `AfterSyncHooksManager`
  and it is used by `CompactBlockProcessor`. It's just more organized
  way how to track what should happen when the sync process is canceled.
2023-02-22 10:36:33 +01:00
Michal Fousek e439e66896
Merge pull request #798 from Chlup/795_sapling_files_tests_locally
[#795] Include sapling-spend file into bundle for tests
2023-02-20 22:32:10 +01:00
Michal Fousek f0827fc775
Merge pull request #800 from Chlup/784_fix_test_testVerifyBalanceAfterExpiredTransaction
[#784] Fix testVerifyBalanceAfterExpiredTransaction test
2023-02-20 22:31:57 +01:00
Michal Fousek d09b00cabe [#795] Include sapling-spend file into bundle for tests
Closes #795

- Added structure `SaplingParamsSourceURL` which holds source URLs for
  sapling-spend file and sapling-output file. URLs are ultimately passed
  to `SaplingParameterDownloader`.
- This is done so it's possible to pass different URLs when running
  tests.
- sapling-spend file and sapling-output file are in tests bundle. And
  when running tests these files are loaded from bundle and not from
  network.
2023-02-20 10:03:16 +01:00
Michal Fousek c80ef173f8 [#784] Fix testVerifyBalanceAfterExpiredTransaction test
Closes #784
2023-02-20 09:53:06 +01:00
Michal Fousek bb0e27dc93
Merge pull request #794 from Chlup/793_fix_stop_notifications
[#793] Send synchronizerStopped notification only when sync process stops
2023-02-20 09:45:37 +01:00
Michal Fousek 699b374193
Merge pull request #799 from Chlup/788_fix_test_testSmallDownloadAsync
[#788] Fix testSmallDownloadAsync test
2023-02-20 09:45:14 +01:00
Michal Fousek 6db7f88f0f [#788] Fix testSmallDownloadAsync test
Closes #788
2023-02-17 11:02:24 +01:00
Michal Fousek 3aad1470f1 [#793] Send synchronizerStopped notification only when sync process stops
Closes #793
2023-02-17 08:49:55 +01:00
Michal Fousek c7574b81a2
Merge pull request #797 from Chlup/796_fix_memory_tests
[#796] Fix tests
2023-02-17 08:48:19 +01:00
Michal Fousek 65a096d6cd [#796] Fix tests 2023-02-16 17:14:31 +01:00
Michal Fousek a7a6755f81
Merge pull request #792 from Chlup/780_green_policy_baseline
[#780] Disable tests that aren't currently working
2023-02-15 09:57:18 +01:00
Michal Fousek 3edcfe853b [#780] Disable tests that aren't currently working 2023-02-15 09:33:31 +01:00
Michal Fousek 753e3bf605
Merge pull request #779 from Chlup/two_swiftlint_configs
[#778] Add swiflint config file only for tests
2023-02-15 09:31:41 +01:00
Michal Fousek 27b99013f7
Merge pull request #775 from Chlup/715_parametrize_seedPhrase_tests
[#715] Move seed phrase from specific tests to Environment
2023-02-13 15:10:07 +01:00
Michal Fousek 663a785b8f
Merge pull request #776 from Chlup/713_remove_unusedMethods_testcoordinator
[#713] Remove unused methods from TestCoordinator
2023-02-13 13:42:35 +01:00
Michal Fousek 65d6347bcf [#778] Add swiflint config file only for tests
Closes #778

- .swiftlint.yml is now used to lint only the code of the SDK.
- .swiftlint_tests.yml is now used to lint only the code of the tests.
  This config disables rules that were previously disabled in the code
  in lot of tests.
2023-02-13 13:36:58 +01:00
Michal Fousek 71e5e37eec [#715] Move seed phrade from specific tests to Environment
Closes #715
2023-02-13 13:36:38 +01:00
Michal Fousek 02e4968ea3
Merge pull request #777 from Chlup/handle_linter_disables
Update code to to comply better with linter rules
2023-02-13 13:32:36 +01:00
Michal Fousek 44732b179b Update code to to comply better with linter rules
- Removed some disabled linter rules from code and update code to comply
  with those.
- No logic was changed.
2023-02-13 12:18:08 +01:00
Michal Fousek 2718b6c19b [#713] Remove unused methods from TestCoordinator 2023-02-13 10:39:37 +01:00
Francisco Gindre a57d302c5a
Merge pull request #773 from Chlup/770_update_grpc
[#770] Update GRPC swift library
2023-02-10 15:42:16 -03:00
Michal Fousek 84fb032185
Merge pull request #768 from Chlup/764_notifications_gone_inside
[#764] Stop using Notifications inside the SDK
2023-02-09 20:33:09 +01:00
Michal Fousek 1ec12269ae [#764] Stop using Notifications inside the SDK
Closes #764

- All notification that were previously sent from CompactBlockProcessor are now gone.
- `CompactBlockProcessor` now provides `eventStream` to communicate with `SDKSynchronizer`.
- Added `synchronizerStoredUTXOs` notification.
- Tests are updated to not use notifications anymore. Some tests there
  weren't working before are now fixed.
- Added `CompactBlockProcessorEventHandler` utility class. Previously
  expectations were subscribing to notifications. This class replaces
  this functionality. It subscribes to events from
  `CompactBlockProcessor` and fullfill expectations.
2023-02-09 20:09:51 +01:00
Michal Fousek be8afabec4 [#770] Update GRPC swift library
Closes #770
2023-02-09 19:55:46 +01:00
Michal Fousek e83bec6db7
Merge pull request #772 from Chlup/rename_fsmeta_param
[#771] Fix tests failing because of different paths passed to `FSCompactBlockRepository` and `FSMetadataStore`
2023-02-09 15:19:50 +01:00
Michal Fousek 34c08a3a81 [#771] Fix tests failing because of different paths passed to `FSCompactBlockRepository` and `FSMetadataStore`
Closes #771

- Renamed `cacheDirectory` param in `FSCompactBlockRepository`
  constructor to `fsBlockDbRoot`.
- Pass same paths to `FSCompactBlockRepository` and `FSMetadataStore`
  from tests.
2023-02-09 13:58:49 +01:00
Francisco Gindre cf60f44aa8
Merge pull request #769 from zcash/release/0.18.1-beta
implement getRecipients() for Synchronizer and Release 0.18.1 beta
2023-02-08 13:26:57 -03:00
Francisco Gindre 67dd061523 Merge branch 'main' into release/0.18.1-beta 2023-02-08 12:48:20 -03:00
Francisco Gindre 2c211732e1 [#767] implement getRecipients() for Synchronizer.
This implements `getRecipients()` function which retrieves the possible
recipients from a sent transaction. These can either be addresses or
internal accounts depending on the transaction being a shielding tx
or a regular outgoing transaction.

Closes #767

Other changes:
Fix version of zcash-light-client-ffi to 0.1.1

Enhance error reporting on a test make Mock comply with protocol

Update CHANGELOG.md
2023-02-08 08:44:29 -03:00
Michal Fousek 07180dca2d
Merge pull request #766 from Chlup/736_final_touches
[#763] Finishing touches for CompactBlockProcessor refactor
2023-02-07 15:46:59 +01:00
Francisco Gindre 4a82e2de75
Merge pull request #765 from zcash/remove_html_docs
- [#759] Remove Jazz-generated HTML docs
2023-02-06 15:55:20 -03:00
Michal Fousek 172c1e0623 [#763] Finishing touches for CompactBlockProcessor refactor
Closes #763
2023-02-06 19:30:49 +01:00
Michal Fousek bccacbb1c4
Merge pull request #761 from Chlup/744_fetch_utxo_extract
[#744] Refactor UTXO fetching code in CompactBlockProcessor
2023-02-06 19:06:25 +01:00
Michal Fousek ac4f9a8f7a [#744] Refactor UTXO fetching code in CompactBlockProcessor
Closes #744

- Added `UTXOFetcher` protocol and `UTXOFetcherImpl` struct.
2023-02-06 19:06:07 +01:00
Michal Fousek a241ff4c0a
Merge pull request #762 from Chlup/745_sapling_params_extract
[#745] Refactor sapling parameters handling code in CompactBlockProcessor
2023-02-06 19:04:30 +01:00
Michal Fousek 276dcad8fa [#745] Refactor sapling parameters handling code in CompactBlockProcessor
Closes #745

- Added `SaplingParametersHandler` protocol and `SaplingParametersHandlerImpl` struct.
2023-02-06 19:03:54 +01:00
Michal Fousek b3dd634e5c
Merge pull request #760 from Chlup/741_enhance_extract
[#741] Refactor transaction enhancement code in CompactBlockProcessor
2023-02-06 19:02:25 +01:00
Francisco Gindre 2d46a0a699 - [#759] Remove Jazz-generated HTML docs
We remove these documents since they are outdated and we rely on the docs in the
code itself.

Closes 759
2023-02-06 14:29:22 -03:00
Michal Fousek 7fa1ace2c3 [#741] Refactor transaction enhancement code in CompactBlockProcessor
Closes #741

- Added `BlockEnhancer` protocol and `BlockEnhancerImpl` struct.
2023-02-06 14:33:16 +01:00
Michal Fousek a5ac045877
Merge pull request #763 from Chlup/fix_testStoringTenSandblastedBlocksFailsAndThrows
Possibly fix testStoringTenSandblastedBlocksFailsAndThrows test
2023-02-06 14:05:00 +01:00
Michal Fousek 09bc1332eb Possibly fix testStoringTenSandblastedBlocksFailsAndThrows test 2023-02-06 13:28:19 +01:00
Michal Fousek a5b1b63507
Merge pull request #751 from Chlup/746_grpc_encapsulation
[#756] Modularize GRPC related code
2023-02-03 22:32:02 +01:00
Michal Fousek 385c0a7195 [#746] Modularize GRPC related code
Closes #746

- `LightWalletGRPCService` is no longer public. `LightWalletService` is no longer public.
- `LightWalletGRPCService` shouldn't be used dicrectly. Use `LightWalletServiceFactory` to create instance of the service.
- Moved sending of `blockProcessorConnectivityStateChanged` notification to `Initilizer`.
- All the errors from GRPC are mapped to `LightWalletServiceError`. Handling of `GRPCStatus` in the SDK is no longer required.
- `Service` directory (that contains GRPC code) is moved to `Modules/Service`. We can put more code to `Modules/` if we decide
to modularize more code.
2023-02-03 22:25:54 +01:00