Commit Graph

97 Commits

Author SHA1 Message Date
Jack Grigg 8ce8a8435f cargo fmt 2020-09-22 15:44:31 +01:00
Jack Grigg 11895dd282 Switch to v0.4 Zcash Rust crates 2020-09-22 15:43:42 +01:00
Kevin Gorham a08beef93b
Created birthday tool and derivation tool.
By extracting behavior from the Initializer into a more genralized class that can be used statically.
2020-09-11 03:33:25 -04:00
Kevin Gorham 94c8a18be7
Added ability to start a Synchronizer with just a viewing key.
This was a long awaited request from wallet partners who already have keys available when the wallet launches.
2020-09-11 03:23:08 -04:00
Kevin Gorham 01efabe195
POC: prove the concept of local RPC via protobufs.
This is an example of a jni call that accepts and returns proto objects. Ultimately, this trades a minor amount of performance for a significant improvement of ease of use. By exchanging protocol buffers, the Kotlin and Rust layers are able to communicate using far more complex objects. Eventually, this type of approach might completely replace the use of a database or sqlite.
2020-08-13 22:01:52 -04:00
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 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 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 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
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
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 e431611d55
Update feature for creating checkpoints. 2020-02-21 18:24:28 -05:00
Kevin Gorham 6bcc00b098
Rust changes in response to feedback. 2020-02-12 08:39:30 -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 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 3ad1a056a6
Add batch scanning to allow for tracking scan progress. 2020-01-15 07:35:06 -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 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 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
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
Jack Grigg 0591784ce4
Add mainnet support to Rust backend via a feature flag 2019-05-14 17:10:03 +01:00
Jack Grigg e69f4b6003
Migrate to refactored librustzcash branch 2019-05-14 17:10:03 +01:00
Kevin Gorham e7108ca818 Cleanup
This commit will get iteratively polished until the PR is ready
- Addresses PR feedback https://github.com/zcash/zcash-android-wallet-sdk/pull/16#discussion_r264948336
2019-03-27 01:37:46 -04:00
Kevin Gorham 1501f1a7d2 Add data access layer for dataDb
Update the scanBlocks request and integrate with the data that it generates inside dataDb
2019-03-27 01:37:46 -04:00
Jack Grigg 1474fae4b8
Move SQL backend into librustzcash
Also some tweaks due to error-handling changes in librustzcash.
2019-03-13 06:56:28 +00:00
Kevin Gorham 245841807c add hex as required dependency, then use it inside init_blocks_table 2019-02-23 20:16:45 -05:00
Kevin Gorham 2c4a48b772 modify update_sapling_tree utility to output JSON 2019-02-22 10:04:32 -05:00
Kevin Gorham 148563b7e6 modify scan operation to start from sapling activation.
Rather than starting from zero because we do not need non-sapling blocks, prior to sapling's activation.
2019-02-22 10:04:32 -05:00
Jack Grigg 870283c8ea
JniConverter.getVerifiedBalance() 2019-02-19 01:45:38 +00:00
Jack Grigg 2a091a1da1
crate::sql::get_verified_balance() 2019-02-19 01:39:36 +00:00
Jack Grigg 4c901fc21f
Exclude spendable notes from selection that aren't verified 2019-02-19 01:25:25 +00:00
Jack Grigg 2695e8f6fd
Mark notes as unspent when the transaction they are spent in expires 2019-02-19 00:59:09 +00:00
Jack Grigg 273881c3b6
Re-introduce requirement that scanned blocks are height-sequential
This prevents the data DB from getting into a state where the Sapling
commitment tree is invalid, which was occurring too easily in testing.
2019-02-18 12:47:16 +00:00
Jack Grigg d145091139
Debug logging in note selection 2019-02-18 12:31:57 +00:00
Jack Grigg 1cd1a4d2f1
Lock notes after transaction creation to prevent serial double-spends
Does not prevent parallel double-spends.
2019-02-18 12:27:14 +00:00
Jack Grigg 208a9497dd
Ensure we always select anchors from blocks that we have 2019-02-18 11:55:34 +00:00
Jack Grigg b95f0b1fc9
Fix witness-updating bug, and enforce witness validity 2019-02-14 19:47:18 +00:00