Commit Graph

42 Commits

Author SHA1 Message Date
Kevin Gorham 081b355c62
Bumped version. 2020-02-21 18:27:25 -05:00
Kevin Gorham 52bb1d108d
Added DB schemas to the repository for tracking. 2020-02-21 18:16:25 -05:00
Kevin Gorham 2c8923290d
Update dependencies. 2020-02-11 20:31:56 -05:00
Kevin Gorham a0de0b907f
Moved version to Beta. 2020-01-15 08:32:21 -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 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 9cb178d6fb
Refactoring 2019-11-17 23:39:37 -05: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 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 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 78f98c2868 Update dependencies. 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 f222bde2fa More robust error handling. 2019-08-30 10:07:56 -04:00
Kevin Gorham 56e4dda40f Update dependencies. 2019-08-30 09:59:29 -04:00
Jack Grigg 261ec33f81
Configure mainnet SDK flavours to use mainnet Rust feature flag 2019-07-26 21:55:50 +01:00
Jack Grigg fd1ddaa8e2
Migrate build system to Rust Android Gradle plugin
Using our fork of the upstream plugin that contains changes to more
closely match our previous build system.

Also deletes commented-out custom protobuf tasks that have been replaced.
2019-04-19 00:06:30 +01:00
Kevin Gorham dec4f0f62e Add docs folder with Synchronizer documentation 2019-03-29 02:31:25 -04:00
Kevin Gorham 796fe9602c Update dependencies 2019-03-29 02:03:11 -04: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 17be0c85cb Improve logic and behavior during app startup.
Never start downloading blocks prior to sapling activation height, only allow firstrun when dataDb is empty and also add birthday support. Also added corrections to isFirstRun logic.
2019-03-27 01:37:46 -04:00
Kevin Gorham ef58fecbf1 Remove unused things and document limits of Junit 5 usage
It is not really practical to try and use JUnit 5 for Android Instrumentation tests at this time. See documentation in build.gradle for details.
2019-03-27 01:37:46 -04:00
Kevin Gorham 0ed5731ff4 Add address information to notes query and other cleanup 2019-03-27 01:37:46 -04:00
Kevin Gorham 2132bc14fd Fix bugs 2019-03-27 01:37:46 -04:00
Kevin Gorham 1b37784e44 Create mock synchronizer to help with driving the UI.
After experiencing several issues that make it more difficult to test send behavior, including the amount of time required to wait for blocks to get mined when testnet is slow,
it became obvious that it was time to investigate mocking. Most of the behavior in the SDK is driven by channels so the mock only has to focus on putting useful data in the
expected channels at the right time. One tradeoff here was the need to make all the synchronizer properties private, that way any implementation can achieve compatability
without necessasily leveraging the same combinations of building blocks. This tradeoff felt acceptable given that these dependencies can be injected and available as singletons,
if needed. This also had a side effect of elevating several channels into the Synchronizer interface, rather than reaching into the synchronizer to directly access those dependencies.
Another benefit is that it's now easier to see what matters most to the app, particularly which channels are essential.
2019-03-27 01:37:46 -04:00
Kevin Gorham bf7b3ee744 Iterate and refine send and active transaction behavior
Send is now functional and shows up in active transactions.
This involved:
- reducing the exposure of the seed
- consistently using Ints for blockheight everywhere to match zcash
- adding the use of spending keys
- adding account initialization on startup
- using accounts but defaulting to account 0
- internalizing birthday so we no longer need a reference outside of the library
- enabling cancellation during send
- cleanup active transaction manager
2019-03-27 01:37:46 -04:00
Kevin Gorham 4d226a8c5e Create CompactBlockProcessor and refine responsibilities of collaborators
The synchronizer now primarily collaborates with a downloader, processor and repository; each with a more focused set of responsibilities.
The downloader streams blocks into a channel, the processor saves blocks from that channel and scans for transactions, the repository
exposes transaction change events.
2019-03-27 01:37:46 -04:00
Kevin Gorham 57630f8eba Create CompactBlockDownloader, iterate on business logic using new JUnit5 setup
streaming is working and tests are functional
2019-03-27 01:37:46 -04:00
Kevin Gorham b688013f16 Switch to JUnit 5 2019-03-27 01:37:46 -04:00
Kevin Gorham 6c869a47df Create synchronizer and add layer of business logic onto the data layer
App is functional and displays transactions
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
Kevin Gorham aa0c83a55f
version updates 2018-12-01 01:48:06 +00:00
Kevin Gorham 5df6e95e4f
saving and retrieving data is working and db files are generated 2018-12-01 01:48:01 +00:00
Kevin Gorham 58f5a24a90
checkpoint. database exists 2018-12-01 01:47:58 +00:00
Kevin Gorham 81667f17cc
start with a test and maybe it will actually get used, Eventually. 2018-12-01 01:47:57 +00:00
Kevin Gorham f7263f69c0
manual version bump, still. 2018-12-01 01:47:56 +00:00
Kevin Gorham 42295cf09a
fix false positive when detecting file changes.
Copies were happening before the creation of the libraries.
2018-12-01 01:47:54 +00:00
Kevin Gorham a522715406
version bump.
doing these manually for now.
2018-12-01 01:43:06 +00:00
Kevin Gorham 179abf92e3 add ability to publish to the local repo 2018-11-21 04:48:26 -05:00
Kevin Gorham a30f338a39 add scripts for building rust libs 2018-11-21 02:04:53 -05:00
Kevin Gorham 1b43798464 reverted gradle kotlin dsl
kotlin dsl has a low ROI at this time because it does not provide a lot of benefits yet adds a lot of complexity and build issues so we've removed it from our projects
2018-11-21 02:01:45 -05:00