Commit Graph

702 Commits

Author SHA1 Message Date
Francisco Gindre 37b060852c
Merge pull request #567 from nuttycom/pending_transaction_entity_recipient
Add internal recipient information to `PendingTransactionEntity`
2022-10-21 18:27:52 -03:00
Francisco Gindre 2fb25dcd35 Fix: Transaction repository tests pass 2022-10-21 18:19:08 -03:00
Francisco Gindre 1979e410b5 Fix pre populated Db to have transactions from darksidewalletd seed 2022-10-21 13:54:53 -03:00
Kris Nuttycombe a483537cb1 Ensure that the persisted test database has had migrations applied. 2022-10-20 14:22:24 -06:00
Kris Nuttycombe 1273d303ec Clarify & make regular how migrations are applied. 2022-10-20 10:57:57 -06:00
Francisco Gindre 78856c658a Fix: successive launches of the application fail because the closed range of the migrations to apply would be invalid (lower range > that upper range) 2022-10-20 11:17:34 -03:00
Kris Nuttycombe 7847a7195e Fix incorrect encoding of optional strings in PendingTransaction. 2022-10-19 14:58:51 -06:00
Francisco Gindre 789cf01188 Add Fee field to Transaction, ConfirmedTransaction, ReceivedTransactions and Pen
dingTransactions.
Update Notes DAOs with new fields.

Make Zatoshi Codable

add tests for Recipient.forEncodedAddress
2022-10-19 17:37:06 -03:00
Kris Nuttycombe 849083ffd9 Fix UInt32 conversions to SQL in PendingTransactionDao 2022-10-19 14:13:18 -06:00
Kris Nuttycombe fae15ce268 Fix sent_notes.to_address column reference. 2022-10-19 13:51:10 -06:00
Francisco Gindre 23f1f5dffc
Merge pull request #562 from zcash/fix_UnifiedTypecodesTests
[#561] Fix unified typecodes tests
2022-10-19 13:58:33 -03:00
Francisco Gindre 30a9c066ad Replace `db.run` with `db.execute` to fix migration issues 2022-10-19 11:29:15 -03:00
Kris Nuttycombe 0fbf90dc82 Add migration to re-create pending_transactions table with nullable columns. 2022-10-18 19:44:34 -06:00
Kris Nuttycombe 36932a21dd Use PendingTransactionEntity.internalAccount for shielding. 2022-10-18 10:17:07 -06:00
Kris Nuttycombe f5d7aa0f17 Modify PendingTransactionEntity to be able to represent internal shielding tx. 2022-10-18 10:07:23 -06:00
Francisco Gindre 923eca19ce [#561] Fix unified typecodes tests
Fix tests.

Fix tests.

Use Account 6 vectors on testListTransparentReceivers

only use first tree addresses from the vector for testListTransparentReceivers

Fix unified address generation tests.

Fix build and PR suggestions
2022-10-18 11:40:36 -03:00
Kris Nuttycombe 91ea6f5476 Update to latest librustzcash 2022-10-17 15:00:08 -06:00
Francisco Gindre 3613dfcf06
Merge pull request #558 from zcash/release/0.16.11-beta
[#557] Update checkpoints and release 0.16.11-beta
2022-10-06 03:44:48 -07:00
Francisco Gindre fe90ef0010 [#557] Update checkpoints and release 0.16.11-beta
Closes #557
2022-10-04 19:52:27 -03:00
Francisco Gindre d36c42da8f
Merge pull request #554 from zcash/fix_UFVK_validation
Fix ufvk validation
2022-10-04 14:45:59 -07:00
Francisco Gindre 48fcee12da
Merge pull request #555 from Chlup/fix_compilation_316
Fix compilation of sample project
2022-10-04 09:37:07 -07:00
Michal Fousek d4dc571f27 Fix compilation 2022-10-04 17:32:32 +02:00
Francisco Gindre 8a26e2e469 UFVK validation was validating sapling keys 2022-10-03 21:12:10 -03:00
Francisco Gindre bb05aa3585
Merge pull request #553 from zcash/merge-master
Merges master into this branch
2022-10-03 16:40:20 -07:00
Francisco Gindre 33f2f787e7 fix merge errors 2022-10-03 20:39:54 -03:00
Francisco Gindre 7f480e417d Merge branch 'master' into merge-master 2022-10-03 20:15:40 -03:00
Lukas Korba 9b6ff51b29
[#492] Get rid of blocking API (#551)
- blocking API removed, only latestBlockHeight() stayed
- non-blocking closure based API removed
- unit tests updated to use async API

[#492] Get rid of blocking API (#551)

- forgotten commented code cleaned up
- some comments were still mentioning result (completion closure), removed
2022-10-03 20:05:11 -03:00
Lukas Korba fa5bbbb2bf
[#541] Initialise gRPC on a separate thread (#545)
MultiThreadedEventLoopGroup has been replaced with NIOTSEventLoopGroup. It's recommended by authors of grpc-swift especially for iOS platform and it allows us to set the priority because NIOTSEventLoopGroup is GCD based while MultiThreadedEventLoopGroup is pthread based.

[#541] Initialise gRPC on a separate thread (#545)

- priority increased to .default
2022-10-03 15:54:43 -03:00
Lukas Korba 46d8c04afc
[#546] TransactionEncoder To Async/Await (#547)
- async/await API update
- code cleaned up from the unused APIs
2022-10-03 12:44:33 +02:00
Francisco Gindre 7806b5114f
Use UnifiedSpendingKey for shielding and Spending (#535)
[#534] Use UnifiedSpendingKey for shielding and Spending

This commit implements the use of Unified Spending Keys for shielding
and spending as well as rolling Unified Addresses.

Users should obtain addresses by rolling them from the SDK.
USKs replace Sapling Extended Spending keys and TransparentAccountPrivKeys
when shielding or spending

Closes #534

Co-authored-by: Kris Nuttycombe <kris@nutty.land>

* Fix rebase issues

* PR Suggestion. Make `lastError` an Optional

* Fix test `testReOrgRemovesOutboundTxAndIsNeverMined`

Co-authored-by: Kris Nuttycombe <kris@nutty.land>
2022-10-02 23:11:17 -03:00
Francisco Gindre 10a884ba60
Merge pull request #550 from zcash/merge-master-to-zip-316
Merge master to zip 316
2022-09-30 05:56:22 -07:00
Francisco Gindre ca5221ac75 Merge branch 'master' into merge-master-to-zip-316 2022-09-30 09:53:34 -03:00
Francisco Gindre 28985a4e38
Merge pull request #536 from LukasKorba/486_sendToAddress_async_await
[#486] sendToAddress async/await
2022-09-23 12:08:31 -07:00
Francisco Gindre c834b13f29
Merge pull request #537 from LukasKorba/487_shieldFunds_to_async_await
[#487] shieldFunds to async/await
2022-09-23 12:08:07 -07:00
Francisco Gindre bdd61be8c5
Merge pull request #540 from zcash/fix/0.16.10-beta
Fix: [#539] 0.16.10-beta not in Podspec of that version
2022-09-21 09:33:30 -07:00
Francisco Gindre 9e41fb4375 Fix: [#539] 0.16.10-beta not in Podspec of that version 2022-09-21 13:27:35 -03:00
Lukas Korba 2c93802828 [#487] shieldFunds to async/await
- API refactored to async

[#487] shieldFunds to async/await

- unit tests refactored
2022-09-21 16:36:41 +02:00
Lukas Korba 61683a85f3 [486] sendToAddress async/await
- sendToAddress and SaplingParameterDownloader refactored to async
- unit tests WIP

[486] sendToAddress async/await

- testing code cleanup

[#486] sendToAddress async/await

- reducing number of Tasks in Sample app

[#486] sendToAddress async/await

- I finally figure out how to make the dark side tests async, using new sendToAddress APIs and pass, POC done, 18 more tests to refactor

[#486] sendToAddress async/await

- async sendToAddress unit test refactored except NetworkUpgradeTests

[#486] sendToAddress async/await

- NetworkUpgradeTests refactored to async API

[#486] sendToAddress async/await

- cleanup

[#486] sendToAddress async/await (#536)

- PR comments resolved
2022-09-21 13:47:17 +02:00
Francisco Gindre 38b8fd09d8
Merge pull request #531 from zcash/receiver_type_codes
Receiver type codes
2022-09-20 10:27:54 -07:00
Francisco Gindre a9805cfe7e [#530] Implement ability to extract available typecodes from UA
this introduces several types under UnifiedAddress `ReceiverTypecodes`
and `UnifiedAddress.Errors` to host possible errors on third-party
generated UAs and their composition

Implement extracting the typecodes from a UA
2022-09-19 14:52:30 -03:00
Francisco Gindre 77d11470d5
Merge pull request #533 from zcash/release/0.16.10-beta
Release/0.16.10 beta
2022-09-19 09:43:21 -07:00
Francisco Gindre d8ee9ff277 - [#532] Download does not stop correctly
Issue Reported on [0.16.x-beta]

When the synchronizer is stopped, the processor does not cancel
the download correctly. Then when attempting to resume sync, the
synchronizer is not on `.stopped` and can't be resumed

Fix:
This commit makes sure that the download streamer checks cancelation
before processing any block, or getting called back to report progress
2022-09-16 18:08:31 -03:00
Francisco Gindre db15465ebe Merge branch 'master' into release/0.16.10-beta 2022-09-16 18:04:14 -03:00
Francisco Gindre 044d7d99d5 Bump version and add new checkpoints 2022-09-16 17:41:47 -03:00
Francisco Gindre 60aa28628b [#532] [0.16.x-beta] Download does not stop correctly
Issue Reported:

When the synchronizer is stopped, the processor does not cancel
the download correctly. Then when attempting to resume sync, the
synchronizer is not on .stopped and can't be resumed

this doesn't appear to happen in master branch that uses
structured concurrency for operations.

Fix:
This commit makes sure that the download streamer checks cancelation
before processing any block, or getting called back to report progress
2022-09-16 16:59:31 -03:00
Francisco Gindre e82a6d26ee
Merge pull request #518 from zcash/merge_master_to_zip_316
Merge master to zip 316
2022-09-15 08:03:29 -07:00
Francisco Gindre e3743f8ba0 Fix commit SHA pointing to inexintent hash.
now pointing to `fcf3d4b652b67d6a9b9bdc8e5565eb8dd4b46145`
2022-09-15 11:10:10 -03:00
Francisco Gindre bee1c9db80 Merge branch 'master' into merge_master_to_zip_316 2022-09-15 11:04:49 -03:00
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