Commit Graph

581 Commits

Author SHA1 Message Date
Lukas Korba 90f38973ac
Merge pull request #519 from LukasKorba/476_CompactBlockProcessor_async
[476] CompactBlockProcessor to async/await
2022-09-15 15:08:46 +02:00
Lukas Korba 2b65bd46e4 [476] CompactBlockProcessor to async/await
- getting rid of the Operation Queue
- the cleanup is needed
- the update of tests is needed
- tested and it successfully finishes the sync process

[476] CompactBlockProcessor to async/await

- old processNewBlocks() removed

[476] CompactBlockProcessor to async/await

- unused operations removed

[476] CompactBlockProcessor to async/await

- unit tests update

[476] CompactBlockProcessor to async/await

- unit tests refactored

[476] CompactBlockProcessor to async/await

- cleanup of deprecated method

[476] CompactBlockProcessor to async/await

- fail(error) was called even for canceled tasks but that must be excluded

[476] CompactBlockProcessor to async/await

- removal of all ZcashOperations from the code (unit test will follow)

[476] CompactBlockProcessor to async/await

- network tests in building and success order again

[476] CompactBlockProcessor to async/await

- offline tests in building and success order

[476] CompactBlockProcessor to async/await (519)

- cleanup of suspending the task

[476] CompactBlockProcessor to async/await (519)

- most comments resolved

[476] CompactBlockProcessor to async/await (519)

- thread safe state for both sync and async context

[476] CompactBlockProcessor to async/await (519)

- fixed build for a sample project

[476] CompactBlockProcessor to async/await (519)

- func testStartNotifiesSuscriptors() reverted

[476] CompactBlockProcessor to async/await (519)

- TODO added to track why we used NSLock instead of an Actor
- Task priority enhanced

[476] CompactBlockProcessor to async/await (519)

- cleanup in Tasks and priorities
2022-09-15 08:10:12 +02:00
Francisco Gindre 91719508ec
Merge pull request #528 from zcash/release/0.16.9-beta
[#525] Release 0.16.9-beta

Approval on https://github.com/zcash/ZcashLightClientKit/pull/526
2022-09-12 10:07:40 -07:00
Francisco Gindre a05990b417 [#525] Release 0.16.9-beta 2022-09-12 13:18:40 -03:00
Lukas Korba 9cf2e07d25
Merge pull request #524 from LukasKorba/483_OutboundTransactionManager_Async
[483] OutboundTransactionManager To Async/Await
2022-09-12 14:25:34 +02:00
Lukas Korba 4a2fcde353 [483] OutboundTransactionManager To Async/Await
- protocol methods updated from closure to async APIs
- PersistentTransactionManager updated to implement async APIs
- PersistentTransactionManager deleted closure APIs
- SDKSynchronizer updated to use async APIs
2022-09-12 13:27:52 +02:00
Lukas Korba 7b90e598ad
[#472] CompactBlockBatchScanningOperation to async (#505)
- CompactBlockBatchScanningOperation operation's main reimplemented to be Task based

[472] CompactBlockBatchScanningOperation to async

cleanup

[472] CompactBlockBatchScanningOperation to async (505)

- CompactBlockBatchScanningOperation wrapped to Task
2022-08-30 11:28:00 -03:00
Lukas Korba 87f50a796c
[#473] CompactBlockEnhancementOperation to async/await (#513)
- Wrapped to Task
- Downloader APIs upgraded to async one
2022-08-30 11:07:36 -03:00
Lukas Korba b684a2f486
[#474] FetchUnspentTxOutputsOperation to async/await (#514)
- wrapped to Task
- downloader uses the new async API
2022-08-30 11:00:48 -03:00
Lukas Korba 29f159845d
[#471] CompactBlockValidationOperation to async (#515)
- CompactBlockValidationOperation wrapped to Task
2022-08-30 10:56:39 -03:00
Lukas Korba be24044b51
[#470] CompactBlockStreamDownloadOperation to async (#506)
- using new sync APIs for storage and service
- whole logic wrapped in the Task

Closes #470
2022-08-29 16:53:49 -03:00
Lukas Korba 16d1948b5b
[#465] CompactBlockDownloading to Async/Await (#507)
Closes #465
- CompactBlockDownloading closures removed
- CompactBlockDownloading new async API provided
2022-08-29 16:31:01 -03:00
Francisco Gindre 30bfa6c633
Merge pull request #504 from zcash/release-0.16.8-beta
[#503] Add new checkpoints on top of 0.16.7-beta and release .8
2022-08-26 11:46:51 -07:00
Lukas Korba 742e6bd8ec
[#464] CompactBlockStorage To async/await (#494)
- await/async APIs provided
- async throws unit tests using new API implemented

[464] CompactBlockStorage To async/await (494)

- removed deprecated closure APIs
- upgraded use of the async APIs
- tests updated
2022-08-26 14:52:12 -03:00
Francisco Gindre 3606a13623 [#503] Add new checkpoints on top of 0.16.7-beta and release .8
Closes #503

This commit adds new checkpoints on top 0.16.7-beta and serves as
a point to tag the release of 0.16.8-beta
2022-08-26 13:21:42 -03:00
Lukas Korba f1a570bbc2
[#463] Migrate LightwalletService to Async/Await (#493)
- migration of the protocol's methods done
- split the code so there's blocking and non-blocking API separately

[463] Migrate LightwalletService to Async/Await

- draft

[463] Migrate LightwalletService to Async/Await

- failing tests under investigation

[463] Migrate LightwalletService to Async/Await

- code cleanup
- tests cleanup
- async throws unit tests added

[463] Migrate LightwalletService to Async/Await

- sample app updated to the latest API

[463] Migrate LightwalletService to Async/Await

- cleanup

[463] Migrate LightwalletService to Async/Await

- cleanup

[463] Migrate LightwalletService to Async/Await

- fixed non-building tests

[463] Migrate LightwalletService to Async/Await

- reverting back to lastHeight()

[463] Migrate LightwalletService to Async/Await

updated code to AsyncStream

[463] Migrate LightwalletService to Async/Await (493)

- tests fixed
- blockRange reimplemented to use AsyncStream
- grpc proto files regenerated to exclude Server
2022-08-25 10:39:59 -03:00
Francisco Gindre 29e06d0b8a
[#501] Bump MacOS minimum deployment target to 10_15 (#502)
This is needed to be ablo to build on Macs without running Xcode IDE
Closes #501
2022-08-24 18:18:28 -03:00
Lukas Korba 6d0f241ed6
[#475] NextStateHelper to async/await (#495)
- refactored to await/async
2022-08-23 16:58:15 -03:00
Lukas Korba 5d662dc98b
[#496] Travis CI and GA update to support compiler >= 5.6 (#497)
- travis.yml updated to xcode13.4
- github actions updated to run on macos 12
2022-08-23 16:08:10 -03:00
Francisco Gindre fb061b27a8
[#457] Release 0.16.7-beta (#458)
Adds checkpoints on testnet and mainnet
updates changelog.md
2022-08-15 18:38:52 -03:00
Francisco Gindre 40df80ef25
[#455] revert queue priority downgrade changes from [#435] (#456)
Closes #455

this reverts queue priority changes from commit `a5d0e447748257d2af5c9101391dd05a5ce929a2` since we detected it might prevent downloads to be scheduled in a
timely fashion

Co-authored-by: pacu <pacu@pacus-MacBook-Pro.local>
2022-08-15 17:03:03 -03:00
Francisco Gindre a37c140441 0.16.6-beta
Update podspec
2022-08-02 09:14:37 -03:00
Francisco Gindre fba4cecbe6
[#452] Release ZcashLightClientKit 0.16.5-beta (#453)
0.16.5-beta

- [#449] Use CompactBlock Streamer download instead of batch downloads (#451)
This increases the speed of downloads significantly while reducing the memory footprint.
- [#435] thread sanitizer issues (#448)
Issues related to Thread Sanitizer warnings

Closes #452
2022-07-31 09:42:12 -03:00
Francisco Gindre a2283f0171
[#449] Use CompactBlock Streamer download instead of batch downloads (#451)
* [#449] Use CompactBlock Streamer download instead of batch downloade

This commit implements a small buffer for the stream download operation
so it does not store a block at a time and does it in batches instead.

Closes #449

* Fix tests

* PR Suggestions
2022-07-30 20:01:18 -03:00
Francisco Gindre a5d0e44774
[#435] thread sanitizer issues (#448)
* [#435] this commit attempts to fix thread being starved dues to inversion
of priorities where a .userInitiated thread ends up depending on a lower
priority one on GRPC.

* Add an Synchronizer State struct to report state at once

* Make CompactBlockProcessor's downloader available internally for SDKSynchronizer
remove duplicate handling of processor finished

* PR Suggestions
2022-07-29 15:20:55 -03:00
Francisco Gindre fef4bccce8
[#446] Release 0.16.4-beta (#447)
Closes #446
2022-07-29 11:41:14 -03:00
Francisco Gindre 3be694c920
[#444] Syncing Restarts to zero when the wallet is wiped and synced from zero in one go. (#445)
This commit changes the way walletBirthday is stored in the synchronizer and intinitializer. Wallets syncing from creation/restore would have a problem where the birthday stored in the Blocks Table would be the one corresponding to the chekpoint found a the time of syncing, but the compact block downloader would start downloading blocks from the height provided by the user when the wallet was restored. This would cause a `validationFailed` error at the height checkpoint.height + 1 and restart downloading from checkpoint.height and then resume correctly.

Darksidewalletd test setUp was changed re be able to reproduce the error since injection guaranteed correctness and it was not possible to reproduce the error with it since the wallet birthday height provided matched exactly with the checkpoint on disk and that's the only case that avoided this error.

Closes #444
2022-07-29 10:33:23 -03:00
Francisco Gindre 96520aeb7c
[#440] Split constants for Download Batches and Scanning Batches (#441)
this commit splits the batch sizes so that wallets can be tweaked to either scan or download more or less blocks depending of the CompactBlockProcessor.Config used. Defaults are provided

This also bumps up the default time out for GRPC services to 30 seconds to unary calls and 100 seconds to streaming calls
Also, adds some documentation formatting that won't hurt

PR Suggestions

PR Suggestions
2022-07-29 10:07:08 -03:00
Francisco Gindre 1f1f69bc24 [#438] Release 0.16.3-beta
This commit changes the Podspec and changelog.md
2022-07-26 11:14:26 -03:00
Francisco Gindre d877a9aee2
[#436] Add checkpoint with a lower interval on mainnet (#437)
Closes #436
2022-07-26 10:49:27 -03:00
Francisco Gindre f9b42f6f99
update changelog for 0.15.1-beta hotfix 2022-07-22 09:23:26 -03:00
Francisco Gindre 5c1e283837 [#431] Release 0.16.2-beta
Closes #431

Fix Zatoshi Encoding for Cocoapods clients
Fix internal members of Zatoshi needed by secant wallet
2022-07-15 18:54:00 -03:00
Francisco Gindre 5e415ac24a
[#418] "Swift.EncodingError.InvalidValue Encoding an Int64 is not supported" (#430)
when sending.

This happens when clients using cocoapods update to 0.15.0-beta through
0.16.1-beta. SPM clients not affected since they all use SQLite Swift 0.13

the issue is with clients using SQLite swift 0.12
2022-07-15 18:50:49 -03:00
Francisco Gindre 4e260419e1
[#428] make some helpers publicly accessible (#429)
Closes #428}

Helpers that were internal to Secant now are missing when we moved them to ZcashLightClientKit. This commit fixes that
2022-07-15 16:54:25 -03:00
Francisco Gindre a6bf465a6a Fix ZcashLightClientKit.podspec by reverting gRPC-Swift to 1.8.0 2022-07-15 14:27:26 -03:00
Francisco Gindre 221f3a3b98
[#425] release 0.16.1-beta (#427)
Closes #425

Changelog and podspect changes
2022-07-14 20:30:03 -03:00
Francisco Gindre 470775dfaf
- [#419] Fix Unavailable Transport 14 when attempting to sync (#426)
Closes #419

This eliminates the keepalive settings since they seem to clash with defaults
on ligthwalletd and the client gets rejected earlier than needed.
2022-07-14 20:19:46 -03:00
Francisco Gindre f2ed1f01ae
- [#422] Make Zatoshi extensions of `NSDecimalNumber` public (#423)
Closes #422

This helps Secant iOS compile since it relies on these APIs that were
once internal to the app module
2022-07-14 17:55:16 -03:00
Francisco Gindre 333c074b2f
[#416] Update GRPC to 1.8.2 (#421)
Closes #416
2022-07-14 15:18:15 -03:00
Francisco Gindre 5bfdfdb701
[#403] Release 0.16.0-beta (#417)
Closes #403

Renames changelog.md to CHANGELOG.md
2022-07-13 15:23:04 -03:00
Francisco Gindre e131ccbd07
[#392] Synchronizer error 8. when syncing. (#413)
Closes #392

This commit localizes SynchronizerError to better support Error messages
2022-07-12 17:28:16 -03:00
Francisco Gindre 2fcfa6fdbe
[#398] Make WalletBirthday an internal type (#414)
This commit makes Renames `WalletBirthday` to `Checkpoint` and
makes Checkpoint an internal type. Public ocurrences of this
type is replaced by `BlockHeight` (Int) and then retrieval of the
Checkpoint is deferred to the appropiate place in the code

Add an extension method to `BlockHeight` to get latest checkpoint
height present in the SDK's bundle

PR Suggestions:

Add test for integer overflow on JSON
File renamed from WalletBirthday to Checkpoint
2022-07-12 16:36:12 -03:00
Francisco Gindre aff3a9563b
[#411] add Fresh checkpoints for release 0.16.0-beta (#412) 2022-07-11 15:54:09 -03:00
Francisco Gindre b6bb17ab8b
[#406] some BirthdayTests fail for MacOS target (#410)
Closes #406

This commits differences how Checkpoints are retrieved from the resource bundle
depending on the target platform.
2022-07-11 09:17:22 -03:00
Francisco Gindre 79dbe8f387
[#404] Configure GRPC KeepAlive according to docs (#409)
Closes #404

This commit updates LightWalletGRPCService conform to latest
Swift-GRPC recommendations on how to set Connections KeepAlive
parameters.

See https://github.com/grpc/grpc-swift/blob/main/docs/keepalive.md
2022-07-08 16:49:24 -03:00
Francisco Gindre acae6a0d7b
[#400] Changelog for 0.15.0-beta. Podspec version (#405)
Closes #400
2022-06-29 20:29:36 -03:00
Francisco Gindre 889458d7b6
[#363] bump iOS minimum deployment target to iOS 13.0 (#407)
Closes #363
2022-06-29 20:12:17 -03:00
Francisco Gindre 912abe0128
[#397] Checkpoint format that supports NU5 TreeStates (#399)
* [#397] Checkpoint format that supports NU5 TreeStates

Closes #397

This commit adds `orchardTree` value to WalletBirthday and renames
the value `tree` to `saplingTree`. It also modifies the checkpoint
JSON files accordingly. It adds `.testnet` and `.mainnet` checkpoints
for orchard activation height.

* rename `sapling-checkpoints` to `checkpoints`
2022-06-28 16:17:10 -03:00
Francisco Gindre c7a27c0b86
[#401] DecodingError when refreshing pending transactions (#402)
Closes #401
This commit changes the way Codable in implemented for Zatoshi and PendingTransaction.

SQLite attempts to decode Custom Types as JSONStrings inside a TEXT column whereas Zatoshi only needs to be an INTEGER that can be treated as an Int64 value

`ConfirmedTransaction` entity is not affected because it is already deserialized
in a custom fashion whereas `PendingTransaction` was relying on `Codable` and
`CodingKey`.
2022-06-27 12:51:13 -03:00
Francisco Gindre b9ae012e09
[#381] Move Zatoshi and Amount Types to the SDK (#396)
Closes #381

This commit brings a Zatoshi type developed on the Secant project,
helper classes like Clamped and tests.

Zatoshi has been incorporated as a Codable type for SQLite Swift
to allow serialization into the pending database.

FIXES on Demo App

fix comments
2022-06-22 16:45:37 -03:00