Commit Graph

974 Commits

Author SHA1 Message Date
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
Michal Fousek c17706f5d0 [#556] Remove Transaction and TransactionEntity
- Removed `Transaction` struct and `TransactionEntity` protocol.
- Removed some other protocols from `TransactionEntity.swift`.

Use correct default fee and memo count
2023-01-04 10:02:27 +01:00
Francisco Gindre c0f8d46501 [#698] Updated Checkpoints release 0.17.5-beta 2023-01-03 17:55:02 -03:00
Michal Fousek d6cbab3afb
Merge pull request #693 from Chlup/556_3_replace_findAll
[#556] Replace TransactionRepository.findAll methods with new methods
2023-01-03 13:47:03 +01:00
Michal Fousek f12ace4bf3 [#556] Replace TransactionRepository.findAll methods with new methods
Fix compilation
2023-01-03 13:12:07 +01:00
Michal Fousek 09809cd26f
Merge pull request #685 from Chlup/556_2_replace_findAllSentTransactions
[#556] Replace TransactionRepository.findAllSentTransactions with new method
2023-01-02 23:11:34 +01: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 a40b311ccd [#556] Replace TransactionRepository.findAllSentTransactions with new method
Make minedHeight optional
2023-01-02 12:29:01 +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 6c54fa4111
Merge pull request #687 from Chlup/556_2_remove_findEncodedTransactionBy
[#556] Remove unused TransactionRepository.findEncodedTransactionBy method
2022-12-23 22:09:12 +01:00
Michal Fousek 45d6260688 [#556] Remove unused TransactionRepository.findEncodedTransactionBy method 2022-12-23 22:08:45 +01:00
Michal Fousek 526e8e87b8
Merge pull request #688 from Chlup/556_2_replace_findTransactions
[#556] Replace TransactionRepository.findTransactions methods with new methods
2022-12-23 22:06:22 +01:00
Michal Fousek 385b3ea397
Merge pull request #686 from Chlup/556_2_replace_findAllReceivedTransactions
[#556] Replace TransactionRepository.findAllReceivedTransactions with…
2022-12-23 22:05:47 +01: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
Michal Fousek 27188e7e80 [#556] Replace TransactionRepository.findTransactions methods with new methods 2022-12-22 10:35:11 +01:00
Michal Fousek 92256c108f [#556] Replace TransactionRepository.findAllReceivedTransactions with new method 2022-12-22 09:46:54 +01:00
Michal Fousek c7b0e0b5b6 Merge branch 'master' into 556_using_transactions_db_views 2022-12-22 09:41:21 +01:00
Michal Fousek 6b9b6d9aea
Merge pull request #684 from Chlup/556_fix_tests_change_api
[#556] Update API of TransactionRepository and make tests work
2022-12-21 13:53:22 +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
Michal Fousek ef2d904260 [#556] Update API of TransactionRepository and make tests work
This change is prerequisity for future changes. API of
`TransactionRepository` is changed a bit. Now it's possible to filter
transaction by kind (all/sent/received) event when
`TransactionNG.Overview` structure is returned.

Tests are now fixed for new methods and new objects. For this mocked
database `darkside_data.db` had to be updated to the latest scheme used
by the Rust code.
2022-12-21 12:33:20 +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 8f42867eb1
Merge pull request #680 from Chlup/556_2_replace_findbyid
[#556] Replace TransactionRepository.findBy methods with new transaction methods
2022-12-19 16:04:53 +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
Michal Fousek cb07484c45 [#556] Replace TransactionRepository.findBy methods with new transaction method 2022-12-19 09:28:28 +01:00
Michal Fousek 999ee1e204 [#556] Define structures for db view and add new repository methods
- Structures that represent transactions DB views are newly define.
- New structures are:
  - TransactionNG.Overview
  - TransactionNG.Received
  - TransactionNG.Sent

- `TransactionNG` is used as temporary name. `Transaction` is existing
  structure in the code. `TransactionNG` will be eventually renamed to
  `Transaction` once current `Transaction` is removed from code.

- New methods that are using new structures are added to
  `TransactionRepository`. Those are slightly changed compared to
  predecessors. Those are now little bit simpler to use.

Address review comments
2022-12-15 22:19:14 +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