Commit Graph

248 Commits

Author SHA1 Message Date
Kevin Gorham 528442fa0a
New: Indicate when rust is potentially slow from running in debug mode. 2020-08-01 02:12:15 -04:00
Kevin Gorham 69466fe7ef
Minor cleanup. 2020-08-01 02:11:48 -04:00
Kevin Gorham 01bbd12e73
Update librustzcash. 2020-07-29 00:36:57 -04:00
Kevin Gorham 215788dd27
Migrate changes from hackathon.
Mostly includes changes to make testing more robust.
2020-07-29 00:36:56 -04:00
Kevin Gorham 712dac2481
Published to bintray and updated demo apps, accordingly. 2020-06-10 05:59:40 -04:00
Kevin Gorham 75718e9e71
New checkpoints. 2020-06-10 03:43:41 -04:00
Kevin Gorham aa569c99dd
Major refactor: corrected package name.
Now the SDK matches everything else that we have published to bintray and jcenter.
2020-06-10 03:08:19 -04:00
Kevin Gorham 4e95c46acb
Add missing newlines. 2020-06-09 23:28:21 -04:00
Kevin Gorham 48f03e6beb
Refactor: Moved validation objects into package.
This helps declutter the Synchronizer, which we do not want to let get complex.
2020-06-09 22:52:32 -04:00
Kevin Gorham dce743d9f9
Refactor: moved 'entity' package into 'db'.
Now it is more clear that these files are related to the databases. Plus, there's one less folder at the top-level, which reduces clutter.
2020-06-09 22:31:00 -04:00
Kevin Gorham c70da1983d
New: Added Heartwood support.
Going forward, consensus branch IDs will automatically switch over, once we reach the activation height.
2020-06-09 22:15:55 -04:00
Kevin Gorham c5ad25a5ce
New: Added darksidewalletd testing support.
Also modified tests so that they can compile again.
2020-06-09 22:15:55 -04:00
Kevin Gorham 5cc8a38a5f
New: Additional APIs and functionality.
Added new functions that made things easier while testing, making the SDK a bit more usable.
2020-06-09 22:15:54 -04:00
Kevin Gorham c585ed93ff
Improve error handling. 2020-06-09 22:15:54 -04:00
Kevin Gorham 345725a744
Fix: Wallet details screen does not update.
Should address https://github.com/zcash/zcash-android-wallet/issues/153 but needs to be verified before closing that issue.
2020-06-09 21:53:18 -04:00
Kevin Gorham eecf57383e
Improve polling interval logic per #95.
Add logic to poll on the next time boundary, rather than sleeping a fixed amount of time after processing.
2020-06-09 21:43:23 -04:00
Kevin Gorham 2ee0e9ab3c
Simplified initialization.
Put more emphasis on creating a synchronizer only with an initializer.
Made it easier to specify an initializer and custom dependencies at once.
Removed confusing constructor from SdkSynchronizer that muddied the waters on how to properly create one.
Added extension function to make it easier to start a synchronizer with an imported wallet.
2020-06-09 21:35:40 -04:00
Kevin Gorham ae2af49913
Merge pull request #121 from rex4539/fix-typos
Fix typos and cleanup
2020-04-16 11:33:30 -04:00
Kevin Gorham bc012f47fd
New checkpoints. 2020-03-27 16:29:10 -04:00
Kevin Gorham cdabfc8f4c
Improve the handling of disconnected state. 2020-03-27 16:28:42 -04:00
Kevin Gorham d36e4f276b
Simplified the construction of a synchronizer.
There is no harm in letting the initializer hold a reference to the application context. So let it do that in order to simplify the construction of synchronizers.
2020-03-27 16:26:41 -04:00
Kevin Gorham 82381c5381
Fix: correct the transaction queries.
The new info that we receive during scanning broke some assumptions we were making in the queries.
2020-03-27 16:24:27 -04:00
Dimitris Apostolou 44cba56d30
Fix typos and cleanup 2020-03-26 13:00:04 +02:00
Kevin Gorham 7bb80c4678
Add support for inbound memos and full wallet restore. 2020-03-25 17:58:08 -04:00
Kevin Gorham 83ea9ddac7
Bug fixes and improvements.
Change doc format to html, fix migration issues, etc.
2020-03-25 17:56:27 -04:00
Jack Grigg 25a5eab4be RustBackend.decryptAndStoreTransaction() 2020-03-26 08:37:40 +13:00
Kevin Gorham fe269c7602
Updated the logic for creating checkpoints.
Modified it so that tweaking the source file is no longer required to create a variety of checkpoints for testnet and mainnet by leveraging the 'mainnet' feature flag as well as an optional commandline argument to specify the target height.
2020-03-18 11:38:23 -04:00
Kevin Gorham a43070cd6a
Documented everything public-facing.
This should bring documentation coverage to 100%
2020-02-27 13:51:00 -05:00
Kevin Gorham de0d85c20d
First pass at adding documentation. 2020-02-27 13:51:00 -05:00
Jack Grigg c3de2df034 update_sapling_tree: Handle multiple IPs for LIGHTWALLETD_HOST
Fixes zcash/zcash-android-wallet-sdk#111
2020-02-27 04:37:09 +00:00
Jack Grigg b6fa9ab69f Improve error handling in update_sapling_tree binary 2020-02-27 03:53:50 +00:00
Taylor Hornby 3bb6f4fb6a Make update_sapling_tree use TLS 2020-02-26 15:10:17 -07:00
Kevin Gorham da5247c74f
Testnet checkpoints. 2020-02-26 14:54:15 -05:00
Kevin Gorham 08fe8d6069
Demo app: get testnet builds working again. 2020-02-26 14:54:14 -05:00
Kevin Gorham 508e6d3da9
Demo app improvements.
including: mainnet support, BIP39 support and using seed words instead of string-based seeds, several convenience functions like copyToClipboard, simplified the developer experience for using the FAB, corrected errors in port numbers, streamlined several demos, trim user input, better messaging using new processorInfo flow.
2020-02-26 03:10:28 -05:00
Kevin Gorham 8c93840671
Revert sorting changes. 2020-02-21 19:13:17 -05:00
Kevin Gorham e431611d55
Update feature for creating checkpoints. 2020-02-21 18:24:28 -05:00
Kevin Gorham 4b1cb76f42
General cleanup.
Additional KDocs. Log cleanup. Cleaner close and shutdown behavior. Improved retry functions. New and updated constants. Database migrataions.
2020-02-21 18:22:04 -05:00
Kevin Gorham 52bb1d108d
Added DB schemas to the repository for tracking. 2020-02-21 18:16:25 -05:00
Kevin Gorham a572b55db0
Fixed tests. 2020-02-21 18:15:13 -05:00
Kevin Gorham ac7f3475e9
Improved error handling.
Added callback for reorg detection and also improved the logic for handling critical processor errors.
2020-02-21 18:14:34 -05:00
Kevin Gorham 6bcc00b098
Rust changes in response to feedback. 2020-02-12 08:39:30 -05:00
Kevin Gorham f90e07c0c1
New mainnet checkpoints. 2020-02-11 20:10:18 -05:00
Kevin Gorham 4d655b0f04
Add logic to validate processor setup. 2020-02-11 20:09:27 -05:00
Kevin Gorham dd18a13b47
Rust changes to expose the ability to derive an address. 2020-02-11 20:04:19 -05:00
Kevin Gorham 4390f3a304
Changes to initialization.
- renamed path variables
- cleaned up the way birthdays are stored
- improved logging
- added support for deriving the address from a seed or extfvk
2020-02-11 20:04:19 -05:00
Kevin Gorham ed594beee7
Fixed typo in PORT property name. 2020-02-05 10:07:25 -05:00
Kevin Gorham e3ce131647 Merge branch 'master' of github.com:zcash/zcash-android-wallet-sdk into preview
Conflicts:
	README.md
	src/main/proto/WalletData.proto
2020-01-15 09:23:35 -05:00
Kevin Gorham 77f6e77e14
Restore build to working order by removing local-only changes
which supported scanning in batches for better visibility into scan
progress. Also updated Cargo files to support error-free build for the
beta release.
2020-01-15 09:17:27 -05:00
Kevin Gorham 38f20c696e
Final changes before beta release. 2020-01-15 07:35:07 -05:00
Kevin Gorham 08f95d505d
General fixes and improvements. 2020-01-15 07:35:06 -05:00
Kevin Gorham 3ad1a056a6
Add batch scanning to allow for tracking scan progress. 2020-01-15 07:35:06 -05:00
Kevin Gorham 328e90d241
Add processorInfo for more visibility into status. 2020-01-15 07:35:05 -05:00
Kevin Gorham e56c1ff24a
Minor refactors and improvements and test fixes. 2020-01-15 07:35:05 -05:00
Kevin Gorham aaa823081b
Exposed support for address validation. 2020-01-15 07:35:05 -05:00
Kevin Gorham cf0d86a3da
Remove the bandaid hack that triggered the need for https://github.com/zcash/zcash-android-wallet/issues/39
This was a key win in the refactor.
2020-01-15 07:35:04 -05:00
Kevin Gorham 29717cd871
Refactored initialization.
Addresses some of the concerns in https://github.com/zcash/zcash-android-wallet/issues/39 by removing the side effects from the Intializer. Now instead of trying to help with loading and persisting wallet birthdates, it delegates that utility to another class.
2020-01-15 07:35:04 -05:00
Kevin Gorham 93c01a9f3f
Test cleanup, deleting outdated tests. 2020-01-15 07:35:04 -05:00
Kevin Gorham 527eb50439
Minor changes to support zECC app. 2020-01-15 07:35:03 -05:00
Kevin Gorham 4653f98053
Added more mainnet sapling trees. 2020-01-15 07:35:03 -05:00
Kevin Gorham 18a4cdfcaa
Added function for abbreviating addresses for user display. 2020-01-15 07:35:03 -05:00
Kevin Gorham 7babe0c63c
Fixed bug with hasData not being cleared and improved sapling tree selection.
- Choose the latest tree above the requested height
2020-01-15 07:35:02 -05:00
Kevin Gorham 596bea0158
Refactor to support new app. 2020-01-15 07:35:02 -05:00
Kevin Gorham 88aeb4f5ac
Correct hardcoded CoinType. 2020-01-15 07:35:01 -05:00
Kevin Gorham b47b10427e
Blossom activation. 2020-01-15 07:35:01 -05:00
Kevin Gorham 8a365115f1
Add mainnet support.
This involves splitting code to run in the zcashMainnet and zcashTestnet flavors and using the corresponding feature of librustzcash. Mainnet functionality is proven in the integration test in androidTestZcashmainnet.
2020-01-15 07:35:01 -05:00
Kevin Gorham 5380c0d365
General cleanup before merging first pass at demo app. 2019-11-23 20:47:50 -05:00
Kevin Gorham 652e862d5c
Iterate on the Send demo.
Allow input. Allow multiple sends. Handle errors. Demonstrate an improved user experience where sending is disabled at the appropriate times.
2019-11-23 18:07:28 -05:00
Kevin Gorham 93d4114848
Refactor logic for awaiting confirmations.
Leverage the new flow-centric approach to sending transactions, rather than polling the database, which leads to concurrent modification errors and corrupted data.
2019-11-23 02:18:20 -05:00
Kevin Gorham bebe0cf4e7
Rust welding utility functions for key derivation. 2019-11-20 18:23:20 -05:00
Kevin Gorham 7e9127538f
Update memo to accept bytes instead of a string. 2019-11-17 23:49:14 -05:00
Kevin Gorham 9cb178d6fb
Refactoring 2019-11-17 23:39:37 -05:00
Kevin Gorham bf48b82aa8
Refactor package names 2019-10-24 01:21:52 -04:00
Kevin Gorham f89d2be250
SDK changes to support new demo app.
- Convert status flags into stream of statuses, instead.
- Improve logging during transaction submission
- Database corrections. Aparently Room has gotten more strict with schema parsing and this required lots of corrections mainly around get nullability correct for DB fields.
- Simplify Synchronizer creation via constructor functions. Created one function for maximum simplicity and another for maximum flexibility.
- Changed logic for Wallet initialization to simplify dependencies and allow for optional access to private keys for wallet apps
- Created TransactionRepository that leverages the paging library for Room
- Provided sample implementation of bridging to a key manager in a way where wallet apps do not have to modify their existing code.
- Made it easier to clear the wallet data that can be repopulated from the blockchain
- Allowed for better cleanup of heavy-weight lightwalletd services by adding a shutdown API call
2019-10-24 01:16:58 -04:00
Kevin Gorham 190f7f5548
Consolidate old sample apps into new demo app. 2019-10-24 01:16:58 -04:00
Kevin Gorham 42f29f534c
Reduce configurability per Security Finding 1.
These changes largely reduce the amount of configuration that can be tweaked in order to prevent fragmentation of the anonymity set of users. If wallet makers change certain properties than it can become easy to detect which network requests are coming from which client. The goal is for clients to be as anonymous as possible.
2019-09-26 12:58:37 -04:00
Kevin Gorham 1f18042d52
Implement versioning and other cleanup.
- Correct typo and compiler warning in Rust.
'trait objects without an explicity dyn' are deprecated and this is a warning as of Rust 1.37
- update dependencies
- update documentation

docs
2019-09-12 01:31:23 -04:00
Kevin Gorham 636cbb59c0
Add TLS support.
Make TLS the default and require effort to setup plaintext connections, instead.
2019-09-12 01:31:22 -04:00
Francisco Gindre 28fa4d4ef2 add empty swift_prefix option value to .proto files 2019-08-30 14:52:14 -03:00
Kevin Gorham a83ace6e43 Refactor after Zcon1 2019-08-30 10:07:56 -04:00
Kevin Gorham 8c7103d0ee Cleanup after Zcon1. 2019-08-30 10:07:56 -04:00
Kevin Gorham 862a4be480 Pulled over classes from Zcon1 app.
Next step is to refactor and simplify.
2019-08-30 10:07:56 -04:00
Kevin Gorham 1de3ee9ed5 Added more fixes and examples for Zcon1.
Including unit tests that are more like utilities for doing interesting things.
2019-08-30 10:07:56 -04:00
Kevin Gorham ad3a080466 Restore the memo sample to working order. 2019-08-30 10:07:56 -04:00
Kevin Gorham 54226997f9 Add sapling tree prior to Zcon1 token transactions. 2019-08-30 10:07:56 -04:00
Kevin Gorham 178f1d3a8d Add support for raw transaction id.
This helps with mapping transactions when sweeping wallets.
2019-08-30 10:07:56 -04:00
Kevin Gorham 4dd8d408cb Beginning to improve the use of channels.
Bringing over lessons learned from the Zcon1 app. There are a lot of changes to make, this is just the beginning of what was necessary to support that app.
2019-08-30 10:07:56 -04:00
Kevin Gorham f222bde2fa More robust error handling. 2019-08-30 10:07:56 -04:00
Kevin Gorham 305390b439 Update tests. 2019-08-30 09:59:29 -04:00
Kevin Gorham 94e2af7287 Improve error handling and troubleshooting by surfacing more errors. 2019-08-30 09:59:29 -04:00
Kevin Gorham a78c98b8aa Add more support for memos. 2019-08-30 09:59:29 -04:00
Kevin Gorham 4c635362a8 Add logic for handling reorgs and simplify synchronization. 2019-08-30 09:59:29 -04:00
Kevin Gorham b14401eaeb Twig: Add timing features and prevent duplicate tags. 2019-08-30 09:59:29 -04:00
Jack Grigg f4843bc25d
More descriptive value errors in sendToAddress 2019-08-29 18:57:05 +01:00
Jack Grigg 221c882589
Migrate to note-spending-v6 2019-08-29 18:04:53 +01:00
Jack Grigg 09c51b7654
Update RecipientAddress to fix transparent address support 2019-07-10 14:55:38 -04:00
Jack Grigg 1acf472d33
RustBackend.isValid[Shielded|Transparent]Address() 2019-07-10 14:54:39 -04:00
Jack Grigg 54dbf8e0ff
Add transparent address send support to backend 2019-05-24 17:10:20 +01:00
Kevin Gorham c3f57d5e2f
Rename JniConverter to RustBackend
Turns out JNI classes are hard to mock due to the way sytem libraries
are loaded. So it became easier to put the JniConverter class behind an
interface. Once that refactor was necessary, it was a good time to
update the name of this class because it retained its original PoC name
for far too long.
2019-05-24 16:33:43 +01:00
Jack Grigg 4948617d6d
Add JNI methods for handling chain validity and reorgs 2019-05-14 17:30:09 +01:00