[WIP] [wallet] Couple minimum change with minimum relay fee #7615

pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:Mf1602-walletMinChange changing 6 files +31 −11
  1. MarcoFalke commented at 12:22 pm on February 27, 2016: member

    Coupling MIN_CHANGE with the minimum relay fee (and thus dust) turns out to fix #6522.

    Assuming that a user should be able to send a small amount even though their wallet consists of mostly small/dust inputs, I get

    MIN_CHANGE = ((DEFAULT_MIN_RELAY_TX_FEE/1000.) * MAX_STANDARD_TX_SIZE / COIN) = 0.001

  2. jonasschnelli added the label Wallet on Feb 28, 2016
  3. paveljanik commented at 8:48 am on March 1, 2016: contributor

    NACK I’m against any such hardcoding changes.

    One time, it can happen that 0.001 BTC is half a million of dollars. Or half a penny. We should not hardcode such numbers.

  4. MarcoFalke commented at 9:39 am on March 2, 2016: member

    @paveljanik I fail to see how my diff makes it any worse.

    Still, I agree that the coupling should be done explicitly in the code but on the other hand it seems there is substantial refactoring of the policy code going on right now. So first, I’d like to make sure this is the right direction.

  5. MarcoFalke force-pushed on Mar 10, 2016
  6. sipa commented at 1:51 pm on June 2, 2016: member
    I think the right solution is replacing this variable with one that computes it dynamically from the relay feerate.
  7. MarcoFalke force-pushed on Jun 4, 2016
  8. MarcoFalke force-pushed on Jun 4, 2016
  9. MarcoFalke renamed this:
    [wallet] Couple MIN_CHANGE with minimum relay fee
    [wallet] Couple minimum change with minimum relay fee
    on Jun 4, 2016
  10. MarcoFalke force-pushed on Jun 4, 2016
  11. MarcoFalke force-pushed on Jun 4, 2016
  12. MarcoFalke force-pushed on Jun 4, 2016
  13. MarcoFalke force-pushed on Jun 5, 2016
  14. MarcoFalke force-pushed on Jun 6, 2016
  15. MarcoFalke force-pushed on Jun 6, 2016
  16. MarcoFalke force-pushed on Jun 6, 2016
  17. MarcoFalke force-pushed on Jun 6, 2016
  18. MarcoFalke force-pushed on Jun 7, 2016
  19. MarcoFalke force-pushed on Jun 7, 2016
  20. MarcoFalke force-pushed on Jun 7, 2016
  21. MarcoFalke force-pushed on Jun 9, 2016
  22. [wallet] Make minimum change depend on minimum relay fee 39fa73eebc
  23. in src/wallet/wallet.cpp: in fa123a912f outdated
    1726+    //  filled with small inputs: Small change avoidance would otherwise add
    1727+    //  many unspents, such that the transaction exceeds the maximum allowed
    1728+    //  size.
    1729+    // However, creating change too small would instead fragment the user's
    1730+    //  wallet into small unspents over time.
    1731+    return ::minRelayTxFee.GetFee(MAX_STANDARD_TX_SIZE);
    


    sipa commented at 1:14 pm on June 9, 2016:

    I think that using MAX_STANDARD_TX_SIZE is way too large (it would be around 1 mBTC on my node).

    The choice here is whether to add change, or instead just turn it into fee immediately. Turning it into change adds an output (34 bytes) and then later spending that change adds an input (144 bytes), so as long as the fee we would pay for those 178 bytes is less than the amount we would turn into change, it is worth it. You probably want a small constant factor (at least 3, like the dust rule itself uses) above that number, though.

  24. MarcoFalke force-pushed on Jun 30, 2016
  25. MarcoFalke renamed this:
    [wallet] Couple minimum change with minimum relay fee
    [WIP] [wallet] Couple minimum change with minimum relay fee
    on Jul 16, 2016
  26. MarcoFalke commented at 7:10 am on July 18, 2016: member
    Coin selection needs a complete rework for 0.14 anyway. Closing for now.
  27. MarcoFalke closed this on Jul 18, 2016

  28. MarcoFalke deleted the branch on Jul 18, 2016
  29. DrahtBot locked this on Sep 8, 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-11-17 15:12 UTC

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