feature: customize OUTPUT_GROUP_MAX_ENTRIES #17854

issue kallewoof opened this issue on January 3, 2020
  1. kallewoof commented at 4:48 AM on January 3, 2020: member

    Currently the max number of UTXO:s inside one address group is hard coded as 10. In certain cases, people may want to tweak this (e.g. if they have 11+ outputs that all go to the same address and they wanna group all of them together so they are guaranteed to be spent as one, they can't do that right now without recompiling the code).

    Feature: add a bitcoind flag -output_group_max_entries which defaults to whatever OUTPUT_GROUP_MAX_ENTRIES is (and rename it to DEFAULT_OUTPUT_GROUP_MAX_ENTRIES).

    As a side note, this value is only there to prevent too-large transactions due to tons of address reuse in one wallet -- I think 10 is way too low for this case. Thoughts, @sdaftuar?

  2. kallewoof added the label Feature on Jan 3, 2020
  3. fjahr commented at 3:53 PM on January 9, 2020: contributor

    Currently the max number of UTXO:s inside one address group is hard coded as 10. In certain cases, people may want to tweak this (e.g. if they have 11+ outputs that all go to the same address and they wanna group all of them together so they are guaranteed to be spent as one, they can't do that right now without recompiling the code).

    I agree that there should be something that makes this easier than constructing a raw transaction by hand but I am not sure this is the best solution for this particular problem. Even if OUTPUT_GROUP_MAX_ENTRIES is increased there is no guarantee that the user will actually get the address (-group) they want out of coin selection if there are other outputs in the wallet. I would rather suggest adding a spend_from option to fundrawtransaction and/or sendtoaddress. It would take a list of addresses that should be used to fund the tx until the tx it is fully funded. There could also be also spend_all_from which would use all the inputs from all the addresses in the list. I will look into this implementing this.

  4. decryp2kanon commented at 9:47 PM on November 6, 2020: contributor

    I think 10 is way too low for this case.

    agreed

  5. pinheadmz commented at 2:13 PM on April 27, 2023: member

    This is no longer an issue in recent versions of Bitcoin Core. We'll close it for now, please feel free to add additional comments or open a new issue if you think that would be helpful.

    The new limit is 100: https://github.com/bitcoin/bitcoin/blob/904a98702e7372ed186e3faa81ef64f1ce49c945/src/wallet/spend.cpp#L33

  6. pinheadmz closed this on Apr 27, 2023

  7. bitcoin locked this on Apr 26, 2024

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-14 18:14 UTC

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