wallet: -avoidreuse with destination filters #13801

pull kallewoof wants to merge 7 commits into bitcoin:master from kallewoof:feature-avoidreuse-destfilter changing 10 files +265 −33
  1. kallewoof commented at 8:31 am on July 30, 2018: member

    This is an alternative to #13756, which includes destination filters.

    A destination filter is one of mixed (default for -avoidreuse=false), clean (default for -avoidreuse=true), or dirty.

    • mixed will do coin select without caring about dirty/clean state of outputs
    • clean will ignore dirty outputs in coin select
    • dirty will ignore clean outputs in coin select

    Pros with this alternative is that it more precisely allows the user to deal with different cases, and gives them a safe(ish) approach to getting rid of dirty UTXO’s.

    Cons is (1) increased complexity/learning curve for users, and (2) larger diff for reviewers.

    I will close one or the other based on feedback.

    A PR will be made based on https://github.com/kallewoof/bitcoin/tree/feature-avoidreuse-destfilter-rpc once/if this PR is merged.

  2. wallet: add -avoidreuse startup option 87dead0999
  3. fanquake added the label Wallet on Jul 30, 2018
  4. DrahtBot commented at 9:12 am on July 30, 2018: member
    • #13825 ([wallet] [Do not merge until v0.18] Kill accounts by jnewbery)
    • #13756 (wallet: -avoidreuse feature for improved privacy by kallewoof)
    • #13723 (PSBT key path cleanups by sipa)
    • #13083 (Add compile time checking for cs_main runtime locking assertions by practicalswift)
    • #12508 (IsAllFromMe by kallewoof)
    • #11634 (wallet: Add missing cs_wallet/cs_KeyStore locks to wallet by practicalswift)
    • #11413 ([wallet] [rpc] sendtoaddress/sendmany: Add explicit feerate option by kallewoof)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  5. wallet: add DestinationFilter enum and helper functions 064e2db3d4
  6. wallet: add m_dest_filter to coin control object 1c562043ba
  7. wallet: add destination filter support to wallet 2b0e2647b0
  8. wallet/rpc: add dest_filter to getbalance command 1135a7d51c
  9. kallewoof force-pushed on Jul 30, 2018
  10. wallet/rpc: add dest_filter to sendtoaddress 51e804bb3f
  11. test: add test for avoidreuse feature bcb181caea
  12. kallewoof force-pushed on Jul 30, 2018
  13. gmaxwell commented at 3:27 pm on July 31, 2018: contributor

    I think it’s probably always okay to spend a dirty coin by itself (and with other coins to the same scriptpubkey), since that doesn’t link it to anything else. It should be computationally cheap to check if it’s feasible– “do any groups for dirty coins have enough to pay for the transaction?”

    Maybe we should be explicitly if we can satisfy a transaction using all of a single group, without regard to dirtyness, and a privacy setting selects if this test is done before or after multigroup matching.

  14. kallewoof commented at 4:50 am on August 2, 2018: member

    @gmaxwell

    I’m not sure if your comment is encouraging the switch to using destination filters or not - it kind of feels like it isn’t, because you’re saying we can do this stuff without bothering the user with explicitly selecting dirty/clean/mixed.

    So basically, the coin selection would be updated to:

    1. Create output groups of all dirty coins
    2. See if any of them fulfil the desired payment amount including fees up to maybe 3x the amount, and return that group if found. MARK CHANGE AS DIRTY
    3. Try coin select using only clean coins

    If user used -allowdirty flag, it would simplify to

    1. Try coin select using all coins. (MARK CHANGE AS DIRTY IF 1+ DIRTY COINS WERE USED)
  15. kallewoof closed this on Aug 2, 2018

  16. kallewoof deleted the branch on Oct 17, 2019
  17. DrahtBot locked this on Dec 16, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-18 15:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me