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

Redesign PSET #900

Merged
merged 91 commits into from
Jul 6, 2021
Merged

Redesign PSET #900

merged 91 commits into from
Jul 6, 2021

Commits on Jun 3, 2021

  1. Remove PSET and disable PSBT/PSET things for now

    Reset back to Bitcoin PSBT and disable PSBT/PSET handling in wallet and
    rpc.
    
    This is just a reset to allow for PSBTv2 change and then a new and
    improved PSET.
    achow101 committed Jun 3, 2021
    Configuration menu
    Copy the full SHA
    fdf71de View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e882a3a View commit details
    Browse the repository at this point in the history
  3. Implement PSBT versions

    achow101 committed Jun 3, 2021
    Configuration menu
    Copy the full SHA
    50c281f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ad2b2d7 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    25c13ad View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    575fec0 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    5bb930e View commit details
    Browse the repository at this point in the history
  8. Test for proprietary field

    achow101 committed Jun 3, 2021
    Configuration menu
    Copy the full SHA
    31a7e0a View commit details
    Browse the repository at this point in the history

Commits on Jun 22, 2021

  1. moveonly: Move (Un)Serialize(To/From)Vector, (De)SerializeHDKeypaths …

    …to psbt module
    
    SerializeToVector, UnserializeFromVector, DeserializeHDKeypaths, and SerializeHDKeypaths
    were in sign.h where PSBT was originally implemented. Since all of the PSBT serialization
    has moved to its own file, these functions should follow.
    achow101 committed Jun 22, 2021
    Configuration menu
    Copy the full SHA
    fad29ba View commit details
    Browse the repository at this point in the history
  2. Store version bytes and be able to serialize them in CExtPubKey

    CExtPubKey does not store the version bytes for the extended public key.
    We store these so that a CExtPubKey can be serialized and deserialized with
    the same version bytes.
    achow101 committed Jun 22, 2021
    Configuration menu
    Copy the full SHA
    cb9c553 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4eabba9 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    5b5c5ef View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    2c54175 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    7fd50b2 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    bc2651d View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    20e8dff View commit details
    Browse the repository at this point in the history
  9. Define psbtv2 field numbers

    achow101 committed Jun 22, 2021
    Configuration menu
    Copy the full SHA
    ec03f83 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    dd792ce View commit details
    Browse the repository at this point in the history
  11. Change PSBT unknown fields test to use higher numbers

    Previously these tests were using 0x0f as the field number. Changed to
    use 0xf0 instead as it is unlikely we will hit that anytime soon.
    achow101 committed Jun 22, 2021
    Configuration menu
    Copy the full SHA
    8c62443 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    2042765 View commit details
    Browse the repository at this point in the history
  13. Enforce PSBT version constraints

    With PSBTv2, some fields are not allowed in PSBTv2, and some are
    required. Enforce those.
    achow101 committed Jun 22, 2021
    Configuration menu
    Copy the full SHA
    457b6bd View commit details
    Browse the repository at this point in the history
  14. Add PSBT::CacheUnsignedTxPieces

    Fetches the PSBTv2 fields from PSBTv0's global unsigned tx. This allows
    us to pretend everything internally is a PSBTv2 and makes things easier
    to work with.
    achow101 committed Jun 22, 2021
    Configuration menu
    Copy the full SHA
    c32950e View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    32234df View commit details
    Browse the repository at this point in the history
  16. Convert PSBTv0 unsigned tx to PSBTv2 fields

    This is just a convenience and doesn't effect serialization.
    achow101 committed Jun 22, 2021
    Configuration menu
    Copy the full SHA
    4b805fd View commit details
    Browse the repository at this point in the history
  17. Replace PSBT::GetInputUTXO with PSBTInput::GetUTXO

    Now that PSBTInput's track their own prevouts, there's no need for a
    PSBT global function to fetch input specific data.
    achow101 committed Jun 22, 2021
    Configuration menu
    Copy the full SHA
    3c647b7 View commit details
    Browse the repository at this point in the history
  18. Add PSBT::ComputeLockTime()

    Function to compute the lock time for the transaction
    achow101 committed Jun 22, 2021
    Configuration menu
    Copy the full SHA
    10bf247 View commit details
    Browse the repository at this point in the history
  19. Add PSBT::GetUnsignedTx

    A helper function for getting the unsigned transaction regardless of
    psbt version.
    achow101 committed Jun 22, 2021
    Configuration menu
    Copy the full SHA
    32bdf2d View commit details
    Browse the repository at this point in the history
  20. Add PSBT::GetUniqueID

    The unique ID for PSBTv2 is different from v0. Use this function to get
    the ID without requiring the caller to know the version number.
    achow101 committed Jun 22, 2021
    Configuration menu
    Copy the full SHA
    bd1a57b View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    90cd7ec View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    cd5515a View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    4ff2593 View commit details
    Browse the repository at this point in the history
  24. Add PSBTInput::GetOutPoint

    Helper for getting the PSBTInput COutPoint
    achow101 committed Jun 22, 2021
    Configuration menu
    Copy the full SHA
    d8dba33 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    23f6442 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    f269d11 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    500554a View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    c9c23ca View commit details
    Browse the repository at this point in the history
  29. Update RPCs for PSBTv2

    achow101 committed Jun 22, 2021
    Configuration menu
    Copy the full SHA
    9c83300 View commit details
    Browse the repository at this point in the history
  30. Update wallet for PSBTv2

    achow101 committed Jun 22, 2021
    Configuration menu
    Copy the full SHA
    16395c1 View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    139ac36 View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    bedc1e0 View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    a34474e View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    e467ec6 View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    2c1fe58 View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    ebc49e3 View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    f4bca18 View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    0ca0b7e View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    e860cd0 View commit details
    Browse the repository at this point in the history
  40. Use GetUnsignedTx when serializing in PSBTv0

    If we are asked to make a PSBTv0, we may not necessarily have made an
    unsigned transaction. So instead use GetUnsignedTx which will either
    fetch one that already exists, or construct a new one from the stored
    data. Internally we may be storing a PSBTv0 like a PSBTv2, but still
    want to serialize those as v0.
    achow101 committed Jun 22, 2021
    Configuration menu
    Copy the full SHA
    ecaf5ea View commit details
    Browse the repository at this point in the history
  41. Configuration menu
    Copy the full SHA
    b372430 View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    e374397 View commit details
    Browse the repository at this point in the history
  43. Add DecomposePeginWitness

    achow101 committed Jun 22, 2021
    Configuration menu
    Copy the full SHA
    f84a927 View commit details
    Browse the repository at this point in the history
  44. Configuration menu
    Copy the full SHA
    ee28be3 View commit details
    Browse the repository at this point in the history
  45. Configuration menu
    Copy the full SHA
    33c694f View commit details
    Browse the repository at this point in the history
  46. Return peg-in UTXO with GetUTXO

    Peg-ins don't have a typical UTXO. Instead we can get a "UTXO" using the
    peg-in data.
    achow101 committed Jun 22, 2021
    Configuration menu
    Copy the full SHA
    2220d84 View commit details
    Browse the repository at this point in the history
  47. Configuration menu
    Copy the full SHA
    6890461 View commit details
    Browse the repository at this point in the history
  48. pset: add issuance things

    The asset issuance details are added to createpsbt and
    walletcreatefundedpsbt.
    achow101 committed Jun 22, 2021
    Configuration menu
    Copy the full SHA
    79c4a99 View commit details
    Browse the repository at this point in the history
  49. Add calculateasset RPC

    achow101 committed Jun 22, 2021
    Configuration menu
    Copy the full SHA
    bdfcb43 View commit details
    Browse the repository at this point in the history
  50. Configuration menu
    Copy the full SHA
    1dbc3b2 View commit details
    Browse the repository at this point in the history
  51. Implement BlindPSBT

    achow101 committed Jun 22, 2021
    Configuration menu
    Copy the full SHA
    e7dd046 View commit details
    Browse the repository at this point in the history
  52. Add walletblindpsbt rpc

    achow101 committed Jun 22, 2021
    Configuration menu
    Copy the full SHA
    3f6c8bf View commit details
    Browse the repository at this point in the history
  53. Configuration menu
    Copy the full SHA
    9a450ec View commit details
    Browse the repository at this point in the history
  54. Configuration menu
    Copy the full SHA
    bad1876 View commit details
    Browse the repository at this point in the history
  55. Configuration menu
    Copy the full SHA
    e6cc0fd View commit details
    Browse the repository at this point in the history
  56. Remove output_assets and have asset field in outputs

    Instead of having an output_assets argument to createpsbt,
    createrawtransaction, and walletcreatefundedpsbt, move the asset
    specification into the outputs array itself. This also removes the
    backwards compatibility of using a dict for outputs in createrawtransaction.
    achow101 committed Jun 22, 2021
    Configuration menu
    Copy the full SHA
    ea2c3df View commit details
    Browse the repository at this point in the history
  57. Output PSBTOutputs with aux info from ConstructTransaction

    Output PSBTOutputs with blinding pubkey and index info from
    ConstructTransaction so that these can be added to PSBTs later.
    achow101 committed Jun 22, 2021
    Configuration menu
    Copy the full SHA
    5391095 View commit details
    Browse the repository at this point in the history
  58. Configuration menu
    Copy the full SHA
    f686e0f View commit details
    Browse the repository at this point in the history
  59. Configuration menu
    Copy the full SHA
    124efa2 View commit details
    Browse the repository at this point in the history
  60. Configuration menu
    Copy the full SHA
    a8a6f4c View commit details
    Browse the repository at this point in the history
  61. Configuration menu
    Copy the full SHA
    3db2622 View commit details
    Browse the repository at this point in the history
  62. Configuration menu
    Copy the full SHA
    eeb6cf7 View commit details
    Browse the repository at this point in the history
  63. Allow empty scriptPubKeys

    achow101 committed Jun 22, 2021
    Configuration menu
    Copy the full SHA
    e9bfff2 View commit details
    Browse the repository at this point in the history
  64. Fixes to FillPSBT

    achow101 committed Jun 22, 2021
    Configuration menu
    Copy the full SHA
    25df8aa View commit details
    Browse the repository at this point in the history
  65. Configuration menu
    Copy the full SHA
    2c0cee5 View commit details
    Browse the repository at this point in the history
  66. Allow value commitments instead of explicit value

    It is not invalid to have a value commitment and no explicit value. It
    is only invalid to have neither for an output.
    achow101 committed Jun 22, 2021
    Configuration menu
    Copy the full SHA
    c0cb623 View commit details
    Browse the repository at this point in the history
  67. Configuration menu
    Copy the full SHA
    bd97836 View commit details
    Browse the repository at this point in the history
  68. Configuration menu
    Copy the full SHA
    0e2f1ff View commit details
    Browse the repository at this point in the history
  69. Use createtx array outputs

    achow101 committed Jun 22, 2021
    Configuration menu
    Copy the full SHA
    d8fa5c1 View commit details
    Browse the repository at this point in the history
  70. Remove walletsignpsbt, blindpsbt, walletblindpsbt, and

    walletfillpsbtdata
    
    These are all done by walletprocesspsbt
    achow101 committed Jun 22, 2021
    Configuration menu
    Copy the full SHA
    b1ebc81 View commit details
    Browse the repository at this point in the history
  71. Only allow psbt_version 2

    achow101 committed Jun 22, 2021
    Configuration menu
    Copy the full SHA
    46ccf61 View commit details
    Browse the repository at this point in the history
  72. Update rpc_psbt.py for PSET

    achow101 committed Jun 22, 2021
    Configuration menu
    Copy the full SHA
    afd7950 View commit details
    Browse the repository at this point in the history
  73. Remove unnecessary psbt blinding test

    This test is for a condition that no longer matters. Prior to CA, there
    was only the single value blinder for a transaction that sent unconf to
    conf. This would necessitate setting that single blinding factor to 0,
    which would make the single output not actually blinded. But with CA,
    because each output has an additional blinding factor for the asset,
    this issue no longer exists.
    achow101 committed Jun 22, 2021
    Configuration menu
    Copy the full SHA
    1889554 View commit details
    Browse the repository at this point in the history
  74. Configuration menu
    Copy the full SHA
    80ff739 View commit details
    Browse the repository at this point in the history
  75. Add PSBTOutput::GetTxOut()

    Helper function for getting a CTxOut for a PSBTOutput
    achow101 committed Jun 22, 2021
    Configuration menu
    Copy the full SHA
    b65a00f View commit details
    Browse the repository at this point in the history
  76. Enable analyzepsbt

    achow101 committed Jun 22, 2021
    Configuration menu
    Copy the full SHA
    64b30bf View commit details
    Browse the repository at this point in the history
  77. Configuration menu
    Copy the full SHA
    7533503 View commit details
    Browse the repository at this point in the history
  78. Configuration menu
    Copy the full SHA
    9fe6401 View commit details
    Browse the repository at this point in the history
  79. Configuration menu
    Copy the full SHA
    4a44ff2 View commit details
    Browse the repository at this point in the history
  80. Configuration menu
    Copy the full SHA
    4940cee View commit details
    Browse the repository at this point in the history
  81. Configuration menu
    Copy the full SHA
    5425da4 View commit details
    Browse the repository at this point in the history
  82. Configuration menu
    Copy the full SHA
    864f625 View commit details
    Browse the repository at this point in the history
  83. Disable joinpsbts

    It doesn't work, disable for now.
    achow101 committed Jun 22, 2021
    Configuration menu
    Copy the full SHA
    f8553c5 View commit details
    Browse the repository at this point in the history