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

Return derivation path when answering isOurs #2219

Merged
merged 10 commits into from
Oct 10, 2020

Commits on Oct 10, 2020

  1. change derivation path JSON serialization to be less verbose

      And also aligned with other interfaces like cardano-addresses.
    KtorZ committed Oct 10, 2020
    Configuration menu
    Copy the full SHA
    fce8baa View commit details
    Browse the repository at this point in the history
  2. change 'isOurs' to return a derivation path instead of a boolean

      This can then be used to figure out what are the derivation path of
      a bunch of addresses when returning raw coin-selections.
      Note that this commit builds but is so-to-speak unsound. We need to
      find a way to feed the purpose, coin type and account index down to
      the 'isOurs' function. The most logical place to do this is as part of
      the state. We can't use arbitrary constant here because both Icarus
      and Shelley use a SeqState, but have different purpose indexes.
    KtorZ committed Oct 10, 2020
    Configuration menu
    Copy the full SHA
    117ec3f View commit details
    Browse the repository at this point in the history
  3. store seq-state derivation prefix in the database.

      That prefixes tells us which account corresponds to which state and also, which purpose so can distinguish between Icarus and Shelley wallets. This will require a database migration
      which I'll add in a later commit.
    KtorZ committed Oct 10, 2020
    Configuration menu
    Copy the full SHA
    1a8cb1e View commit details
    Browse the repository at this point in the history
  4. define manual migrations for seq-state with regards to the derivation…

    … prefix
    
      I've generated databases for Icarus and Shelley wallets from the latest master and, in a test now trying to open these database and observe that a) it is possible, b) there's a log line indicating that a migration has happened, c) the resulting prefix in each database is exactly what we expect it to be.
    KtorZ committed Oct 10, 2020
    Configuration menu
    Copy the full SHA
    db91ad8 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9453a3a View commit details
    Browse the repository at this point in the history
  6. adjust swagger documentation to reflect the presence derivation path …

    …in resolved inputs.
    KtorZ committed Oct 10, 2020
    Configuration menu
    Copy the full SHA
    76e28a2 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    cfbd4e7 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    67810df View commit details
    Browse the repository at this point in the history
  9. cleanup now redundant API types regarding derivation path

      Turns out that it is much easier and less error-prone to use a single
      opaque type 'DerivationIndex' to represent derivation path as homogeneous
      lists. Having 2 level of indirections in the API now makes thing more
      verbose and quite hard to grasp for a non-educated reader.
    KtorZ committed Oct 10, 2020
    Configuration menu
    Copy the full SHA
    7718c20 View commit details
    Browse the repository at this point in the history
  10. extend integration scenario about coin-selection with some assertions…

    … about the derivation path.
    KtorZ committed Oct 10, 2020
    Configuration menu
    Copy the full SHA
    20e70b0 View commit details
    Browse the repository at this point in the history