Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate with lightwalletd and librustzcash #16

Closed
wants to merge 21 commits into from
Closed

Commits on Mar 11, 2019

  1. Add data access layer for dataDb

    Update the scanBlocks request and integrate with the data that it generates inside dataDb
    gmale committed Mar 11, 2019
    Configuration menu
    Copy the full SHA
    c99f9a3 View commit details
    Browse the repository at this point in the history
  2. Create synchronizer and add layer of business logic onto the data layer

    App is functional and displays transactions
    gmale committed Mar 11, 2019
    Configuration menu
    Copy the full SHA
    2c0966a View commit details
    Browse the repository at this point in the history
  3. Switch to JUnit 5

    gmale committed Mar 11, 2019
    Configuration menu
    Copy the full SHA
    986ee50 View commit details
    Browse the repository at this point in the history
  4. Create CompactBlockDownloader, iterate on business logic using new JU…

    …nit5 setup
    
    streaming is working and tests are functional
    gmale committed Mar 11, 2019
    Configuration menu
    Copy the full SHA
    5915ad3 View commit details
    Browse the repository at this point in the history
  5. Integrate with dataDb init commands and grpc service updates.

    On the rust side, we now have access to the init DB commands. On the Go side we have time available for blocks
    gmale committed Mar 11, 2019
    Configuration menu
    Copy the full SHA
    9448f43 View commit details
    Browse the repository at this point in the history

Commits on Mar 13, 2019

  1. Create CompactBlockProcessor and refine responsibilities of collabora…

    …tors
    
    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.
    gmale committed Mar 13, 2019
    Configuration menu
    Copy the full SHA
    13642d6 View commit details
    Browse the repository at this point in the history
  2. Create ActiveTransactionManager to monitor active transactions

    When a transaction is sent it transitions through a lifecycle, beginning with creating the raw transaction and ending with it being mined and added to the blockchain
    gmale committed Mar 13, 2019
    Configuration menu
    Copy the full SHA
    84b8756 View commit details
    Browse the repository at this point in the history
  3. 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
    gmale committed Mar 13, 2019
    Configuration menu
    Copy the full SHA
    e668946 View commit details
    Browse the repository at this point in the history
  4. 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.
    gmale committed Mar 13, 2019
    Configuration menu
    Copy the full SHA
    bfdd093 View commit details
    Browse the repository at this point in the history
  5. Fix bugs

    gmale committed Mar 13, 2019
    Configuration menu
    Copy the full SHA
    21f09fa View commit details
    Browse the repository at this point in the history
  6. Add conversion logic and extensions for consistency and correctness

    Working with bigdecimals anytime we need to multiply or divide values because it was causing issues when repeatedly toggling currency on the send screen. Coupled this with lots of improvements on the app side to do less processing while changing currencies
    gmale committed Mar 13, 2019
    Configuration menu
    Copy the full SHA
    1892e4d View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    913ecb4 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    37c9cf7 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    df9f020 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    c5e5941 View commit details
    Browse the repository at this point in the history
  11. 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.
    gmale committed Mar 13, 2019
    Configuration menu
    Copy the full SHA
    09de20c View commit details
    Browse the repository at this point in the history
  12. 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.
    gmale committed Mar 13, 2019
    Configuration menu
    Copy the full SHA
    56fada2 View commit details
    Browse the repository at this point in the history
  13. Add a layer of logic for bubbling up errors

    This allows the app to show an error dialog rather than crashing silently
    gmale committed Mar 13, 2019
    Configuration menu
    Copy the full SHA
    ed5e9c0 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    d38c348 View commit details
    Browse the repository at this point in the history
  15. Cleanup

    This commit will get iteratively polished until the PR is ready
    - Addresses PR feedback #16 (comment)
    gmale committed Mar 13, 2019
    Configuration menu
    Copy the full SHA
    c7d85f2 View commit details
    Browse the repository at this point in the history
  16. Clean up data API

    Remove unused functionality and disable modification to tables that should only be written by librustzcash
    gmale committed Mar 13, 2019
    Configuration menu
    Copy the full SHA
    764455d View commit details
    Browse the repository at this point in the history