Change default for -spendzeroconfchange to 0 #3654

pull laanwj wants to merge 1 commits into bitcoin:master from laanwj:2014_02_default_nospend_zeroconf changing 1 files +2 −2
  1. laanwj commented at 9:19 PM on February 11, 2014: member

    Changing the default to 0 is disruptive, but on the other hand with the current flurry of malleability abuse it is the safer option.

    Edit: I do wonder, if this is to be the default do we want to change the output of getbalance as well to make sure it matches what can actually be spent? Currently it still shows unconfirmed change either way. On the other hand it is unintuitive to have the entire input disappear from the balance if you send. I think we do need some getbalance changes but I'm not entirely sure what...

  2. Change default for -spendzeroconfchange to 0
    Changing the default to 0 is disruptive, but on the other hand
    with the current flurry of malleability abuse it is the safer option.
    e7d1e1eb4e
  3. petertodd commented at 9:28 PM on February 11, 2014: contributor

    Strong ACK. From the user's point of view the attack can make coins vanish; much better to just temporarily annoy people until a better fix is implemented.

    If the getbalance change is simple, I'd say go for it too.

  4. sipa commented at 9:34 PM on February 11, 2014: member

    Not couning unconfirmed change in getbalance will result in users complaining "I had 15000 BTC in my wallet, I sent 0.001 to a friend, and now all of it is GONE!!!".

  5. ghost commented at 9:39 PM on February 11, 2014: none

    It's worth documenting it somewhere though.

  6. BitcoinPullTester commented at 9:41 PM on February 11, 2014: none

    Automatic sanity-testing: FAILED BUILD/TEST, see http://jenkins.bluematt.me/pull-tester/e7d1e1eb4e8b584adfdc44bac6f52938e134b8a4 for binaries and test log.

    This could happen for one of several reasons:

    1. It chanages paths in makefile.linux-mingw or otherwise changes build scripts in a way that made them incompatible with the automated testing scripts (please tweak those patches in qa/pull-tester)
    2. It adds/modifies tests which test network rules (thanks for doing that), which conflicts with a patch applied at test time
    3. It does not build on either Linux i386 or Win32 (via MinGW cross compile)
    4. The test suite fails on either Linux i386 or Win32
    5. The block test-cases failed (lookup the first bNN identifier which failed in https://github.com/TheBlueMatt/test-scripts/blob/master/FullBlockTestGenerator.java)

    If you believe this to be in error, please ping BlueMatt on freenode or TheBlueMatt here.

    This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ Contact BlueMatt on freenode if something looks broken.

  7. petertodd commented at 9:42 PM on February 11, 2014: contributor

    @sipa Excellent point.

  8. sipa commented at 9:46 PM on February 11, 2014: member

    On the other hand, if you DO count unconfirmed change, I'm afraid balances may be off in the other direction (too high), if you get a mutated transactions in your wallet. I'm not sure about this though - balance is computed in multiple ways.

  9. laanwj commented at 9:50 PM on February 11, 2014: member

    @sipa Agreed. I think if the wallet is fixed to remove/hide duplicated (due to malleability) unconfirmed transactions, the balance will be fixed too, and we don't need to do anything else.

  10. b6393ce9-d324-4fe1-996b-acf82dbc3d53 commented at 5:54 AM on February 12, 2014: none

    You should never try to hide reality.

    You're over-engineering. Just show the user both the confirmed and unconfirmed balances, particularly when they differ (and particularly when unconfirmed change has been set to be treated as truly unconfirmed).

    For starters, CWalletTx::IsConfirmed() needs to be updated to reflect reality; see this pull request: #3657

  11. jspilman commented at 7:49 AM on February 12, 2014: none

    @sipa if balances are too high when counting unconfirmed change, then balance is being calculated wrong. Two conflicting unconfirmed transactions cannot both contribute to getbalance. If there are multiple conflicting futures, it can't sum all of them together, it has to choose one. But this is out of scope anyway. If there are merely mutated same-spend transactions in the mempool, the worst case should be the mutated tx hits the blockchain, and it breaks a spend-chain which would then cause getbalance to jump UP.

  12. laanwj commented at 8:36 AM on February 12, 2014: member

    This is causing a pull tester failure because default wallet behavior changed ("unconfirmed balance").

  13. sipa commented at 1:39 PM on February 12, 2014: member

    @jspilman I'm very aware that something is wrong. Fixing it requires a lot more work though.

  14. laanwj commented at 6:00 AM on February 14, 2014: member

    I don't want this as default.

    (Spending unconfirmed change gives a larger chance of never-confirming transactions, but it sure makes the wallet a lot more user friendly in the goodweather case. With dead transaction handling the duplicates are handled better and having this as default is not needed)

  15. laanwj closed this on Feb 14, 2014

  16. sidhujag referenced this in commit ae9fa2dd6f on Aug 8, 2020
  17. 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: 2026-04-13 15:16 UTC

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