Commit Graph

248 Commits

Author SHA1 Message Date
Kevin Gorham 5f90675b87
New: Rust changes to support auto-shielding. 2021-02-16 16:02:50 -05:00
Kevin Gorham 2115ecde6a
Align with the latest librustzcash changes. 2021-02-11 00:42:52 -05:00
Kevin Gorham ae95b53ce1
Corrections to match recent changes in data_access_api 2021-01-27 02:19:12 -05:00
Kris Nuttycombe 4bcf74d871
Update to use data access API in librustzcash. (#172)
* Refactor to updated data access API.

* Update to latest librustzcash/data_access_api.

Co-authored-by: Kevin Gorham <kevin.gorham@electriccoin.co>
2021-03-10 13:31:55 -05:00
Adí 794a9f99b8
Add ktlint (#207)
* Add ktlint

Fix formatting per ktlint rules.
Upgrade dependencies & gradle.

* Move ktlint to apply section

* Keep unused-import check

Remove afterEvaluate check.

* Remove respository setup for ktlint.gradle

Fix format for SaplingParamTool & CompatBlockProcessor
2021-03-10 13:10:03 -05:00
Eljo Prifti df2b4305ca
Unit test for param files (#211)
* write unit test for param files

* apply changes on PR request

* fix tests
2021-01-27 16:50:10 -05:00
Eljo Prifti a09ce95c2e
Create SaplingParamTool and add a function for clearing the param files from cache (#206)
* Create SaplingParamTool.kt class
add clear and validate function

* add new line

* add SaplingParamToolTest.kt class

* fix PR request

* replace with one single line comment

* revert grandle at exact point in time

* revert build grandle to master

* align build.grandle file with the master one

* align with master
2021-01-22 17:05:11 -05:00
Kevin Gorham 0a12a6487e
New: Add the latest checkpoints. 2021-01-05 16:00:18 -05:00
Kevin Gorham a9e609224f
Updated and cleaned up mainnet checkpoints. 2020-12-18 03:01:39 -05:00
Kevin Gorham 1b5ee935a0
New: Complete changes for adding ZIP-313 to reduce the default fee. 2020-12-18 02:27:23 -05:00
Kevin Gorham c4ea984dc6
New: Update to the latest librustzcash crates.
Most notably, this enables ZIP-313 and reduced fees. For now, we've pinned to a commit on master. Eventually, we will point to crate.io versions once the release process is better defined.
2020-12-18 02:26:48 -05:00
Eljo Prifti ce161d5660
Clear most build warnings (#187)
* Clear the warns build

* Supress inline CurrencyFormatter.kt and Twig.kt
Add FlowPreview into bulild.grandle
Minor change

* Add supres inline at the file level

* Add suppress inline at the file level
2020-12-04 09:28:55 -05:00
Kevin Gorham 920914dc36
New mainnet checkpoint. 2020-11-24 00:54:39 -05:00
Kevin Gorham 8f8d3db9d9
Sanity test the new initializer behavior and fix existing uses. 2020-11-24 00:53:09 -05:00
Kevin Gorham e9e2593369
New: Make Initializer Config functions fluid.
This adds flexibility and makes it a bit easier to mix in logic while creating a Config object.
2020-11-24 00:39:10 -05:00
Kevin Gorham 7bb895c7e1
New: Add typed exceptions for birthday errors. 2020-11-24 00:37:10 -05:00
Kevin Gorham 90feb5348e
New: Improve birthday configuration.
Make it easier to restore wallets without knowing their birthday. Those wallets will sync from SaplingActivation without the developer having to hardcode that height into their wallet. We achieve this by allowing the Initializer Config object to specify what to do when the birthdayHeight is null. In general, it is probably easier to use the importWallet and newWallet functions to achieve the same goal with more clarity.
2020-11-24 00:36:23 -05:00
Kevin Gorham efc8500959
New: Improved initializer construction.
Builder was misnamed. It is moreso a configuration object. Making this change simplified some of the more confusing aspects of creating an initializer and also made it so the initializer.config.new functions can now work as expected. Prior to these changes it was difficult to make an initializer that used a new birthday.
2020-11-20 12:01:45 -05:00
Kevin Gorham 4087bc65bc
Update to latest lightwalletd service definition.
Updated to the latest service.proto file to utilize the new t-addr endpoints. This closes https://github.com/zcash/zcash-android-wallet-sdk/issues/176.
2020-11-20 11:58:04 -05:00
Kevin Gorham fbd43b20ec
Add latest checkpoints. 2020-11-19 09:26:51 -05:00
Kevin Gorham 797ef8733a
Update display name info for Canopy. 2020-11-16 20:33:53 -05:00
Kevin Gorham 4e2065e0df Add ability to erase by alias. 2020-10-30 09:22:03 -04:00
Kevin Gorham 8cbc063caa
Updated visibility on open classes to improve extensibility. 2020-10-16 13:39:16 -04:00
Kevin Gorham 5879bb3442
Publishing is functional again on Bintray.
Minor uncommitted tweaks. Published version Alpha08.
2020-10-01 16:22:29 -04:00
Kevin Gorham 90bcd41ac4
New mainnet checkpoints. 2020-09-25 10:00:15 -04:00
Kevin Gorham 0601ec488b
Various bug fixes and improvements.
- Exposed primary constructor in initializer and added more convenience functions
- Fix: error handler not being passed through when changing server
- New: warn developer when a critical error occurs but is not covered with a callback
- New: Typed exceptions for missing birthday or viewingKey values during initialization
- New: updated default server for checkpoint tool
2020-09-25 09:59:55 -04:00
Kevin Gorham 8d8a1ae8a8
Fix: incorrect query allowing change to show up in TX list.
Originally identified by @pacu on the iOS side. We paired up and fixed
and tested the query over there.
2020-09-23 12:03:15 -04:00
Kevin Gorham 928eac9af0
Test the logic for changing servers.
Also includes minor test tweaks.
2020-09-23 12:02:12 -04:00
Kevin Gorham ab5b34cbd8
Implement the logic for changing servers. 2020-09-23 12:02:12 -04:00
Kevin Gorham 24f7433f1c
Update Synchronizer and Processor APIs to enable changing the server.
Actual implementation is in a subsequent commit.
2020-09-23 12:02:11 -04:00
Kevin Gorham 58925b04b3
Merge initializers.
The new API for initializing with a viewing key will support all existing uses of the other initializer. So they can be safely merged and the changes to support the new one are fairly straight forward.

Also, iterated on the design of the Initializer to simplify construction and make the API easier to use.
2020-09-23 12:02:11 -04:00
Kevin Gorham 306eac73b0
Rename the new VkInitializer to replace the old Initializer. 2020-09-23 12:02:11 -04:00
Kevin Gorham eb463ec233
Remove the existing Initializer. 2020-09-23 12:02:10 -04:00
Kevin Gorham 14deb99362
Iterate on initializers.
Simplify the builder and also allow it to be a stand-alone configuration item, which would be more useful to React apps that cannot use Kotlins receiver function syntax.
2020-09-23 12:02:10 -04:00
Jack Grigg dc0479af91 Fix update-sapling-tree binary
The generated gRPC files were updated using protoc-rust-grpc 0.8.2 and
protoc 3.13.0.
2020-09-22 17:32:32 +01:00
Jack Grigg 3b9745ab54 android_logger 0.9 2020-09-22 16:14:56 +01:00
Jack Grigg e4317aadbf Fix various Rust warnings 2020-09-22 16:11:55 +01:00
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 986286fced
Adding uncommitted tests. 2020-09-11 03:36:52 -04:00
Kevin Gorham 1894876f21
New checkpoint for 950000 2020-09-11 03:35:58 -04: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 11431f5e5a
Initializer improvements and iteration.
- Extracted parent interface
- Created ViewingKey Initializer to start synchronizing without the seed (only the viewing key is needed)
- Extracted tools from the existing initializer and simlified it a bit
2020-09-11 03:29:17 -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 816d1afbb3
New: Add lightwalletd service for fetching t-addr txs. 2020-08-13 20:44:05 -04:00
Kevin Gorham fafc749394
New: Added new checkpoints. 2020-08-13 20:38:12 -04:00
Kevin Gorham bb747a3ce5
Fix: Minor improvements 2020-08-13 20:37:09 -04:00
Kevin Gorham 0f87961947
New: Change the default lightwalletd server.
The old server will be shutting down to coincide with our internal app deployment changes.
2020-08-13 20:31:54 -04:00
Kevin Gorham bb77fa2d5d
New: add robust support for tx cancellation
Also greatly improved handling of expired and failed transactions.
2020-08-01 02:13:39 -04:00