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

client: add support for dcr spv wallets #788

Merged
merged 22 commits into from
Nov 8, 2021

Commits on Nov 8, 2021

  1. Configuration menu
    Copy the full SHA
    0451243 View commit details
    Browse the repository at this point in the history
  2. client/asset/dcr: add basic support for spv wallets

    - Don't error for missing dcrdjsonrpcapi, instead set wallet.spvMode=true.
    - Replace getblockchaininfo with syncstatus to determine sync status.
    itswisdomagain committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    8fa63e5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c3d9007 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    af46a25 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    2355326 View commit details
    Browse the repository at this point in the history
  6. multi: re-audit contracts after confirmation, before acting

    There is a very slight possibility that contract outputs that pass
    audit while in mempool or in some cases before they are broadcasted
    (rawtx audit) may differ from the output later observed in a block
    for the same coin.
    
    This risk is higher for spv wallets that will mostly only perform
    audits on rawtxs before broadcasting the txs, without a guarantee
    that the tx is accepted to the mempool. A malicious actor could
    broadcast a different tx with same hash (theoretically possible)
    but with a different output at the expected vout index.
    
    There is risk of funds if clients only later check that the hash for
    the earlier-audited tx is found in a block and proceed to send their
    counter swap or expose their contract secret via a redemption. This
    commit aims to mitigate that risk by repeating contract audits after
    the initial tx hash is observed on the blockchain, ensuring that the
    tx now observed on the blockchain is as desired.
    itswisdomagain committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    4f5a5e2 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    3c11408 View commit details
    Browse the repository at this point in the history
  8. client/asset/dcr: remove added calls to getrawtransaction

    The getrawtransaction rpc requires txindex to be enabled on full nodes
    but clients may run full nodes without enabling txindex as it is not
    a requirement.
    
    Use gettransaction where possible instead of getrawtransaction to avoid
    errors when clients use full nodes without txindex enabled.
    itswisdomagain committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    206f27d View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    b0749cf View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    7e211c8 View commit details
    Browse the repository at this point in the history
  11. more review fixes

    fix dcr harness spv wallets startup issues
    fix SwapConfirmations error for wallet contracts
    fix output spent check bug and repaired log messages
    itswisdomagain committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    ad2e26c View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    742432e View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    19fd34a View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    e569f68 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    eb24720 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    785973a View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    5a53e29 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    ab0d0bd View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    d798528 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    5f884a5 View commit details
    Browse the repository at this point in the history
  21. chapp review

    itswisdomagain committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    73ca58c View commit details
    Browse the repository at this point in the history
  22. cleanup

    itswisdomagain committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    b20b179 View commit details
    Browse the repository at this point in the history