Gregory Maxwell [ARCHIVE] on Nostr: 📅 Original date posted:2018-01-23 📝 Original message:On Mon, Jan 22, 2018 at ...
📅 Original date posted:2018-01-23
📝 Original message:On Mon, Jan 22, 2018 at 8:00 PM, Peter Todd via bitcoin-dev
<bitcoin-dev at lists.linuxfoundation.org> wrote:
> Most transactions don't have change?! Under what circumstance? For most
> use-cases the reverse is true: almost all all transactions have change, because
> it's rare for the inputs to exactly math the requested payment.
It's quite easy to get no change with a not-dumb algorithm selecting
coins if you have a decent number of outputs well under the value
you're paying.
The number of ways n choose m combines grows exponentially, and you
only need to get close enough over the right value so that you're
paying excess fees equal or less than the cost of the change (which
should include the current cost output itself as well as estimated
cost of the future signature to spend it).
Achow101 and Murch have code to implement an efficient algorithm for
finding these solutions for Bitcoin core which will hopefully get in
soon.
Published at
2023-06-07 18:10:00Event JSON
{
"id": "25868817bd8d023a1888bc6e710216810b77951b99c36a3ac9b8de798ba0247b",
"pubkey": "4aa6cf9aa5c8e98f401dac603c6a10207509b6a07317676e9d6615f3d7103d73",
"created_at": 1686161400,
"kind": 1,
"tags": [
[
"e",
"d590d99f0e59a3ab6f27c432eb817e5977c68b50eee604d754c0603c2eeb8762",
"",
"root"
],
[
"e",
"00a36a6cedcec52d457794d09accf4a2805d9e6e51f031335150082506ed092e",
"",
"reply"
],
[
"p",
"45fe5a57f42bb740cd879288f26f61d357e7d8ca7c7d97e9dd6278bf2257d1ee"
]
],
"content": "📅 Original date posted:2018-01-23\n📝 Original message:On Mon, Jan 22, 2018 at 8:00 PM, Peter Todd via bitcoin-dev\n\u003cbitcoin-dev at lists.linuxfoundation.org\u003e wrote:\n\u003e Most transactions don't have change?! Under what circumstance? For most\n\u003e use-cases the reverse is true: almost all all transactions have change, because\n\u003e it's rare for the inputs to exactly math the requested payment.\n\nIt's quite easy to get no change with a not-dumb algorithm selecting\ncoins if you have a decent number of outputs well under the value\nyou're paying.\n\nThe number of ways n choose m combines grows exponentially, and you\nonly need to get close enough over the right value so that you're\npaying excess fees equal or less than the cost of the change (which\nshould include the current cost output itself as well as estimated\ncost of the future signature to spend it).\n\nAchow101 and Murch have code to implement an efficient algorithm for\nfinding these solutions for Bitcoin core which will hopefully get in\nsoon.",
"sig": "82f85d726bb102192b6fd02e5a1dcc8649b52ad799df9e25306787a03470905ce88544128a5d7e84b5129310846da1c4cf528484bf55974529a009699c11d2ef"
}