Commit Graph

663 Commits

Author SHA1 Message Date
Francisco Gindre 7f39d4864d Release 0.17.0-alpha.2 2022-10-31 08:37:11 -03:00
Francisco Gindre 201c777de0
Merge pull request #599 from Chlup/579_database_locked
[#579] Fix database lock
2022-10-31 08:29:33 -03:00
Michal Fousek 571166cc8a [#579] Fix database lock
Closes #579

This is what happens when database was locked:
- App is syncing.
- While rustBackend.scanBlocks(…) is in progress app goes to background. Background task is launched and
  ECC works for some time in background.
- When background task is finished synchronizer.stop() is called.
- Inside CompactBlockProcessor.stop()is called. In this method cancelableTask is canceled and state is
  set to stopped no matter what. And this is the problem. Because even when canceled is called rust
  scanning isn’t canceled. But state doesn’t care about it. And next time when app is launched new
  synchronisation is started and now you have processing code running in two threads causing DB lock.

So I moved setting state to stopped to processNewBlocks method. It's set
after the work is canceled and really stopped. When doing this there is
still one problem. When app goes to foreground new sync is not started
and current one is just stopped.
    So I added new variable and condition. And when this variable is set
to true new syncing process starts when the previous one is canceled.
This should cover all the problems.
2022-10-31 09:57:32 +01:00
Francisco Gindre b41f03c3bf
Merge pull request #592 from zcash/fix_tests
Fix various tests and deleted some that are not useful anymore
2022-10-28 09:16:08 -03:00
Francisco Gindre b5d659e8a8 Fix various tests and deleted some that are not useful anymore
Closes #588
Closes #584
Closes #589
Closes #591
2022-10-27 20:09:08 -03:00
Francisco Gindre c2177fe83f
Merge pull request #582 from zcash/fix_transparent_balance_error_handling
[#581] getTransparentBalanceForAccount error not handled
2022-10-27 12:55:45 -03:00
Francisco Gindre 1d97ad920b [#581] getTransparentBalanceForAccount error not handled 2022-10-26 20:26:37 -03:00
Francisco Gindre c1c3762ce5
Merge pull request #578 from zcash/decrease_batches_on_bloated_chain
[#577] Fix: reduce batch size when reaching increased load part of th…
2022-10-26 17:27:51 -03:00
Francisco Gindre fc2f7aa055 Change version on podspec to release alpha 2022-10-26 16:44:08 -03:00
Francisco Gindre 545380b3e2 [#577] Fix: reduce batch size when reaching increased load part of the chain
Currently a 100 batch can take up to 3 minutes to scan. decrease the size of the batches when the increased load part of the chain is reached until a faster sync is implemented

See related counterpart to remove it issue #576

Closes #577
2022-10-25 18:21:32 -03:00
Francisco Gindre cbfa73181d
Merge pull request #575 from zcash/t-memo-bug 2022-10-25 14:00:54 -03:00
Francisco Gindre 5de1b50b29 make Memo and MemoBytes parameters nullable so they can be omitted when sending to transparent receivers.
update libzcashlc
2022-10-24 22:49:04 -03:00
Francisco Gindre 7403bcc809 Remove .orig file committed by mistake 2022-10-21 20:32:01 -03:00
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 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