summaryrefslogtreecommitdiff
path: root/9a/9ef4bd1e7a6795ec3c2abc18650a8b0ca2f292
blob: 7744663dc005b593bc8b0c2bb5dca12327f3d485 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
Delivery-date: Fri, 27 Sep 2024 21:31:13 -0700
Received: from mail-qv1-f64.google.com ([209.85.219.64])
	by mail.fairlystable.org with esmtps  (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
	(Exim 4.94.2)
	(envelope-from <bitcoindev+bncBDV6R2XBYEMBBCEN323QMGQEIBWL26Q@googlegroups.com>)
	id 1suP6u-0007Md-SX
	for bitcoindev@gnusha.org; Fri, 27 Sep 2024 21:31:13 -0700
Received: by mail-qv1-f64.google.com with SMTP id 6a1803df08f44-6cb2e16ea95sf45305186d6.1
        for <bitcoindev@gnusha.org>; Fri, 27 Sep 2024 21:31:12 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1727497866; cv=pass;
        d=google.com; s=arc-20240605;
        b=YxaY/aWEfWr5kvViElGKQHdTyMqRNKZkrSBb570Efzfj6iBhwYr1cvslEuGO9mTZpX
         O1cd8OlWFRrdsXcXEiLI0fTYsRPi+6W+azG/zSVyYmqqiUzOyu8gilzfXhGxOuzKIdwL
         EPBZLk7E5qcdTlTtbelqby4mWAMD290yu/DUbCxkcV1mR7GhN2eN4xvMw+GPxKVgkwy5
         ag/8/zPu9of/weyecvIS8xZEjbq0UdES2Wb07vZQKAxaZTcpvMi5NGktp+HyhqoWTJfw
         hAO5I0/q723StQ2pTMwyQnhnuUFGlXZAHaaLYoZeba0hA6H90PXx/Be5RO/49OlaGuMF
         F1Dw==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:cc:to:subject:message-id:date:from
         :in-reply-to:references:mime-version:sender:dkim-signature
         :dkim-signature;
        bh=sz/7JxFKtAOupeH833a1AynC1tdVMk6Tr4KfROsfMQs=;
        fh=aSHj3HyroYYWNmSM2/Aob8cFDUlLoSiXC0i8cAAzQ3o=;
        b=hQmeGtIEL1QcjaZw8YUEQj0BOHoCyACOu6D7ptTdYOOEZgPzloUNI5EVo+H+BDDxLH
         rT3usKI4M9KETIbn+NzX7fk7LzHmdis0pECpQu4sczkr2tDKjZNPA86Ab01HhlaWaHEW
         1tR4YxamoIRK/UdPFAErXHYYNUMlL57rW5CyK3UBrqrI/Q3uOgyHJa5hAUyXrEnOT4uz
         TNOMQHYWXueVYJAZXUVCcsIdR1STsRCd4C12TyBC9CtihULpGp0tOf++2LHIIxfnoKHJ
         8WzHX07CqEKE3QxEqE0ly3YIyIXO0+rbTHlJhjwNvLJ/r/WdFrKEiKLUrBAlNIJRKOUl
         WOxw==;
        darn=gnusha.org
ARC-Authentication-Results: i=2; gmr-mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20230601 header.b=DmMgW1ZS;
       spf=pass (google.com: domain of keagan.mcclelland@gmail.com designates 2607:f8b0:4864:20::f29 as permitted sender) smtp.mailfrom=keagan.mcclelland@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com;
       dara=pass header.i=@googlegroups.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=googlegroups.com; s=20230601; t=1727497866; x=1728102666; darn=gnusha.org;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:x-original-authentication-results
         :x-original-sender:cc:to:subject:message-id:date:from:in-reply-to
         :references:mime-version:sender:from:to:cc:subject:date:message-id
         :reply-to;
        bh=sz/7JxFKtAOupeH833a1AynC1tdVMk6Tr4KfROsfMQs=;
        b=sT1sH29Ohk/4n1ifYwGfA1R56e4L+j99qU9g0ykarF9FAIh3MTxb49eFHXl7tAqT/c
         RbbxL/tWok0gLPZv/KdK+srw9smPVhBrTw1eQSbkGCkmnoiCxe3lJds+XPsb77Ronl/a
         v6Slo4LSiqBuVzOUkkDRRKTUkZhqyxytfCTf4xL1WuOR+G9sweYjTYt3khXM3DBR6L/S
         ZqQkfDvDnIsvWmLN5Tsv0y3HJORuVkUbjkL0eTW7a0EPOjwyV6JXYvU4H8HykJ/yuUP0
         2ApQaxt/BnoCuxy2B5sHmxE37n4KS4IhLtme+yP3el3EGZuDAk8ctRzxGWQWIlljRPcf
         0vGA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1727497866; x=1728102666; darn=gnusha.org;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:x-original-authentication-results
         :x-original-sender:cc:to:subject:message-id:date:from:in-reply-to
         :references:mime-version:from:to:cc:subject:date:message-id:reply-to;
        bh=sz/7JxFKtAOupeH833a1AynC1tdVMk6Tr4KfROsfMQs=;
        b=SPiK6HHqKhxvWFA+iSFXEEoodbo5Pnl+0BLOJxrquBzpFUeZOygV1NekL/n7LxyP8Z
         W/6re0M1alVCmxsRl6ElavLDqAkJ55ORYoOB60x1sWGBrapYUJDSprDns1L6bfIlBs1Y
         sJk6Hh8DbI+5+hGu1lI9L3076UyF7fOjRoUW72PxITfOYBdLklf9m2LinZedXBx/WlHH
         8TD4jMqqD159CbgqasLXPFXyP0suysg7c1lOqo5dsFNA6QEMejkyBFTgUciz/mAGvXKO
         co/JxT9eOyScTFJ/G+AiNpnnIaPgPpgDaJxqasyCvLXBJoJNIRrx3FVoUh4exmemgofA
         NUew==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1727497866; x=1728102666;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:x-original-authentication-results
         :x-original-sender:cc:to:subject:message-id:date:from:in-reply-to
         :references:mime-version:x-beenthere:x-gm-message-state:sender:from
         :to:cc:subject:date:message-id:reply-to;
        bh=sz/7JxFKtAOupeH833a1AynC1tdVMk6Tr4KfROsfMQs=;
        b=TTUbBLkh3f8gCTRuZhmW378zXUlatCUILCqAwUvyfBOEZv1rmJCT1rmghf+zyBLw52
         U0LEKa9vQQOppb/Ys5aRBkGLbtMbGZhWDxdpNIyeTZ1QbaJkcMY3xl1YWI6mBGpcZjaH
         bRs/1KoAx7zs54mopfvgNZtC7YMpJ9g9o2wK6iIFm4fOcx5YwdV616szp3BVb+KYvcq6
         /ueeP5zpRM26G1mQ7J0rq/65EzvKgY3aRaLGfk+w4KilZDSU9Xsmj+CcsATkSKXB0SyR
         ikdrpPnqxiTysS2YbjWJkwUJOr02PPbJFg2zp01tV4twmpkQe+v0UtcMKiZ0fD+6wczA
         JpyA==
Sender: bitcoindev@googlegroups.com
X-Forwarded-Encrypted: i=2; AJvYcCUynY6pHaHeS5uedCAletkW3rdLTHFMexH/SwJ4ChMpkO9YYlu9rW9Rz3/prSC2WOMVSpC53wyYUuzz@gnusha.org
X-Gm-Message-State: AOJu0YzCeuaHSx1pMxob5zlPe0QkbG9VFisyyufVk9mplVHuCKrl1GNE
	+TJc+j4BS3OsVIMHYw6pBczvVqAYp1S9a3+vNOq3ileDjZaurDRP
X-Google-Smtp-Source: AGHT+IFvt4u2Wpg2RisdcDvjBsXFlSRefeT2/c5OZmT417zhT0EmKvRA+ikiXGmqVFKDmSRNs09sFw==
X-Received: by 2002:a05:6214:4801:b0:6c5:ab2b:3a9c with SMTP id 6a1803df08f44-6cb3b5b624dmr82152336d6.4.1727497865993;
        Fri, 27 Sep 2024 21:31:05 -0700 (PDT)
X-BeenThere: bitcoindev@googlegroups.com
Received: by 2002:a05:6214:2129:b0:6cb:2dc5:6bb5 with SMTP id
 6a1803df08f44-6cb2eeb9cc9ls32486466d6.2.-pod-prod-02-us; Fri, 27 Sep 2024
 21:31:03 -0700 (PDT)
X-Forwarded-Encrypted: i=2; AJvYcCU1nzOHcvSHt/Bmr0KbI2YoLULrbUOnX/3vSd38jpxjFy1pgA0JWKcMdSCUuADKnd8nC36Jqc4zsGF3@googlegroups.com
X-Received: by 2002:a05:620a:4606:b0:79f:67b:4ffc with SMTP id af79cd13be357-7ae37828e38mr845719785a.5.1727497863881;
        Fri, 27 Sep 2024 21:31:03 -0700 (PDT)
Received: by 2002:a37:e316:0:b0:7a8:f6bb:1076 with SMTP id af79cd13be357-7ae2f13729ems85a;
        Fri, 27 Sep 2024 19:28:41 -0700 (PDT)
X-Forwarded-Encrypted: i=2; AJvYcCXIQ+5qFZbSskgpQnCBZ7qRYpuX427RMF9ABZwGvLn97IWp6oWmVDaitBA3je7NzTNmzi9SWH4EmjGN@googlegroups.com
X-Received: by 2002:a05:620a:190e:b0:7a9:b739:3763 with SMTP id af79cd13be357-7ae37859261mr698262685a.28.1727490521007;
        Fri, 27 Sep 2024 19:28:41 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1727490520; cv=none;
        d=google.com; s=arc-20240605;
        b=f0ehYOiok/2/8NUx10gfArxWhlbyUO+7S0JKU4BGzJCua+iAtWfkTiIkm9N3ja7pKB
         1RQ+r2CIPCLvF0dsH9QUSI4cgGvQQBH6KlF3PFig4sud30rnck+ALuqaeTlCC0DhbkSO
         CfQY2ZToDIaRk7uUm5i3Kk51LqoekK/m5gydaHQCQ5UqMNauDdUq6KN+GKsdQqQr6qxL
         SBBgfC7lw7mkK7e7yDtufGz7arIrT7CQPunwMHboOWh+3onasFN9JQ1JS57yIR4fnT4N
         a2ypo7ma75/k/ojgmbAAjCirz8D1cCTf9LXgNzyNZ5sKxORPSfxrpEeL5t2SDlmljdLx
         lscA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605;
        h=cc:to:subject:message-id:date:from:in-reply-to:references
         :mime-version:dkim-signature;
        bh=2qyOpFNi3hipmrMlIVA5qorpZrtF01A7PnaOk0Bwoq0=;
        fh=Ssn0hngvE1djB+b74rKH0E/MbHR6TgYYCEInVSi0yeY=;
        b=gQOx+NQNlDN3cAX0vPheNpaTEOKBgiZkr7BH2/7mxg9V7myx8GtXP8SciiHiyKuJO2
         sFgu1DEA6gRYrwbkc8qeC8pak2o4UKPWLpN4/omPhaZu+e/fbQMnuS8anPOLX5xsl711
         Awoi0nC4RV8ep33rk5NCuujt1fj6yKqHi/4p5ktXtYBfdJU+w++n0qR8EEwePCJth3wW
         ilGgY5LbeIwWpIjjA79qmPqTwI+8kgZTngjZ7nNZTrVDI2NO6ESXjGsnJeiUuDepIYI8
         Do6R5M6uhqmZT8wmFcDCRpytpEOiXxGQG2mGf5P7HYcGNDgyJ7clh9ahKnJnbGj8vm+H
         Agzg==;
        dara=google.com
ARC-Authentication-Results: i=1; gmr-mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20230601 header.b=DmMgW1ZS;
       spf=pass (google.com: domain of keagan.mcclelland@gmail.com designates 2607:f8b0:4864:20::f29 as permitted sender) smtp.mailfrom=keagan.mcclelland@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com;
       dara=pass header.i=@googlegroups.com
Received: from mail-qv1-xf29.google.com (mail-qv1-xf29.google.com. [2607:f8b0:4864:20::f29])
        by gmr-mx.google.com with ESMTPS id af79cd13be357-7ae377bca24si14751385a.2.2024.09.27.19.28.40
        for <bitcoindev@googlegroups.com>
        (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
        Fri, 27 Sep 2024 19:28:40 -0700 (PDT)
Received-SPF: pass (google.com: domain of keagan.mcclelland@gmail.com designates 2607:f8b0:4864:20::f29 as permitted sender) client-ip=2607:f8b0:4864:20::f29;
Received: by mail-qv1-xf29.google.com with SMTP id 6a1803df08f44-6cb29ff33c5so22632516d6.2
        for <bitcoindev@googlegroups.com>; Fri, 27 Sep 2024 19:28:40 -0700 (PDT)
X-Forwarded-Encrypted: i=1; AJvYcCVv/4J+jXF7aXAkvOj7YrDJlHi4aSujwrTvYwDRE9vhu1ZaylBMmnk5h+kwTyrRh11p2APTorRhA/ZP@googlegroups.com
X-Received: by 2002:a05:6214:3901:b0:6cb:4fa7:b604 with SMTP id
 6a1803df08f44-6cb4fa7ba59mr10885396d6.39.1727490520538; Fri, 27 Sep 2024
 19:28:40 -0700 (PDT)
MIME-Version: 1.0
References: <83296012-d713-482a-ad7a-3fd9bf7cded9n@googlegroups.com>
 <4_re7EWb0zy-E_Yk472AGf4WwgwxO9XCC1Y2RqYGlCV7FXpbq1ifIe-DL93-y5erlsAO_G-27SzLcFhGq9kDs8KNE0u2GSC24cFV-rJ5X10=@wuille.net>
 <CABCM42TOD8fOJhy-1xEhGHiW3W9-MBnrhcHLOvsNwkjSiaG0VA@mail.gmail.com>
In-Reply-To: <CABCM42TOD8fOJhy-1xEhGHiW3W9-MBnrhcHLOvsNwkjSiaG0VA@mail.gmail.com>
From: Keagan McClelland <keagan.mcclelland@gmail.com>
Date: Fri, 27 Sep 2024 20:28:29 -0600
Message-ID: <CALeFGL0ddgS=qCsunoGwD2j6By4_bQpndX-oKn_wAQse3o+Sxg@mail.gmail.com>
Subject: Re: [bitcoindev] OP_KEEPCHANGE - mitigating dust outputs
To: james@kwiqly.com
Cc: Pieter Wuille <bitcoin-dev@wuille.net>, 
	Bitcoin Development Mailing List <bitcoindev@googlegroups.com>
Content-Type: multipart/alternative; boundary="000000000000d46de2062324bab3"
X-Original-Sender: keagan.mcclelland@gmail.com
X-Original-Authentication-Results: gmr-mx.google.com;       dkim=pass
 header.i=@gmail.com header.s=20230601 header.b=DmMgW1ZS;       spf=pass
 (google.com: domain of keagan.mcclelland@gmail.com designates
 2607:f8b0:4864:20::f29 as permitted sender) smtp.mailfrom=keagan.mcclelland@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com;
       dara=pass header.i=@googlegroups.com
Precedence: list
Mailing-list: list bitcoindev@googlegroups.com; contact bitcoindev+owners@googlegroups.com
List-ID: <bitcoindev.googlegroups.com>
X-Google-Group-Id: 786775582512
List-Post: <https://groups.google.com/group/bitcoindev/post>, <mailto:bitcoindev@googlegroups.com>
List-Help: <https://groups.google.com/support/>, <mailto:bitcoindev+help@googlegroups.com>
List-Archive: <https://groups.google.com/group/bitcoindev
List-Subscribe: <https://groups.google.com/group/bitcoindev/subscribe>, <mailto:bitcoindev+subscribe@googlegroups.com>
List-Unsubscribe: <mailto:googlegroups-manage+786775582512+unsubscribe@googlegroups.com>,
 <https://groups.google.com/group/bitcoindev/subscribe>
X-Spam-Score: -0.5 (/)

--000000000000d46de2062324bab3
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

I think a number of wallets will refuse to create dust outputs and will
offer the would-be dust as extra fees if there would be dust. This is
ultimately up to wallet policy and there are some UX quirks to be worked
out but this is entirely in the application domain, as opposed to at the
protocol layer.

Keagan

On Thu, Sep 26, 2024 at 3:46=E2=80=AFAM James Ferguson <jamesfergusonch@gma=
il.com>
wrote:

> Pieter
>
> - Thank you, very helpful explanation
>
>  So  suggestion sucks -  I withdraw it to avoid wasting others time !
>
> However,  it seems dust benefits could be achieved simply by wallets
> proposing dust roundup to recipient when creating the transaction rather
> than providing a change output - It seems wallet providers could automate
> this small benefit to be adopted with no protocol change.
>
> So it fair to describe dust as a "tragedy of the commons" (wallets leave
> value at small cost but no benefit) that bloats the time chain ?
>
> Thanks for your assistance - I want to get into this but need to pick a
> niche to grow initial understanding. - Suggestions welcome
>
> Cheers, James
>
>
>
> On Thu, 26 Sept 2024 at 03:23, Pieter Wuille <bitcoin-dev@wuille.net>
> wrote:
>
>> Hi James,
>>
>> I believe you're imagining that Bitcoin works very differently from how
>> it actually does. Comments below inline.
>>
>> On Wednesday, September 25th, 2024 at 8:44 PM, James Ferguson <
>> jamesfergusonch@gmail.com> wrote:
>>
>> Introduction of provisionally named "OP_KEEPCHANGE" allows small residua=
l
>> UTXO (change) to be automatically credited to the primary recipient=E2=
=80=99s
>> address.
>>
>>
>> Bitcoin doesn't have a concept of address balances at the protocol level=
,
>> or even addresses at all, let alone a "primary recipient address". Balan=
ces
>> you see in wallets and blockchain explorers simply report the sum of the
>> values of UTXOs under control of a given address, but this is a local
>> interpretation made by that software; the protocol itself does not know =
or
>> care about these things.
>>
>> The way to "credit an address" in Bitcoin is literally to create a UTXO
>> locked with (the script corresponding to) the address in question, so
>> barring an extremely invasive overhaul of how the entire protocol works,
>> there isn't actually any UTXO set size benefit to this proposal - change
>> UTXOs would still need to be created. In addition, if your proposal
>> requires revealing what the recipient of a payment is (as "crediting
>> primary recipient" implies), it would necessarily also undo the primary
>> privacy benefit of having a UTXO model in the first place: today, one
>> cannot generally tell which output of a transaction is the payee, and th=
is
>> is by design.
>>
>> Of course, a hypothetical proposal could change anything about Bitcoin's
>> design if it were to have enough support. If the Bitcoin ecosystem reall=
y
>> wanted an address balance model, nothing prevents the introduction of th=
at.
>> In that case, there is no point to have UTXOs, or change, at all. Just m=
ake
>> transaction deduct some address balances, and credit some others directl=
y.
>> This removes many of the issues you seem to want to address much more
>> directly (including coin selection, dust accumulation, UTXO set growth t=
o
>> some extent, and many more, while adding other complications in other
>> places, of course). However, it would also massively hurt privacy, as th=
ere
>> would be an on-chain cost to creating new addresses/balances, incentiviz=
ing
>> keeping one's funds in just one. The current UTXO model does not care ab=
out
>> the distinction between payments and change and this is very much
>> desirable: sending your change to a new change address with pristine
>> history costs exactly the same as sending it back to the address the spe=
nd
>> coins were assigned to.
>>
>> b) Enhanced Privacy: .
>> This provides a slight improvement in transaction privacy by obfuscating
>> the typical patterns used to identify change outputs.
>>
>>
>> But it does so at the cost of incentivizing not transitioning to a new
>> address on every transaction, a huge privacy leak.
>>
>> - When used in a transaction, `OP_KEEPCHANGE` signals that any excess
>> change be added to the primary output instead of generating a separate
>> change output.
>>
>>
>> Change does not exist at the protocol level. It is just an output like
>> any normal payment output, and indistinguishable from it. The protocol a=
lso
>> has no knowledge of excess - that is a concept purely local to the sende=
r
>> wallet. It *chooses*=E2=80=8B to add an output back to itself, to balanc=
e the
>> amounts in the inputs with the amounts in the outputs (minus fee). At th=
e
>> very least your proposal would require a way to signal how much to send
>> back, and to where (remember that multiple parties can cooperate to join=
tly
>> construct a single transaction!). At this point you're not far off from
>> just having another output...
>>
>> Cheers,
>>
>> --
>> Pieter
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Bitcoin Development Mailing List" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to bitcoindev+unsubscribe@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/bitcoindev/CABCM42TOD8fOJhy-1xEhGHiW3W9=
-MBnrhcHLOvsNwkjSiaG0VA%40mail.gmail.com
> <https://groups.google.com/d/msgid/bitcoindev/CABCM42TOD8fOJhy-1xEhGHiW3W=
9-MBnrhcHLOvsNwkjSiaG0VA%40mail.gmail.com?utm_medium=3Demail&utm_source=3Df=
ooter>
> .
>

--=20
You received this message because you are subscribed to the Google Groups "=
Bitcoin Development Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to bitcoindev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/=
bitcoindev/CALeFGL0ddgS%3DqCsunoGwD2j6By4_bQpndX-oKn_wAQse3o%2BSxg%40mail.g=
mail.com.

--000000000000d46de2062324bab3
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">I think a number of wallets will refuse to create dust out=
puts and will offer the would-be dust as extra fees if there would be dust.=
 This is ultimately up to wallet policy and there are some UX quirks to be =
worked out but this is entirely in the application domain, as opposed to at=
 the protocol layer.<div><br></div><div>Keagan</div></div><br><div class=3D=
"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Thu, Sep 26, 2024 at=
 3:46=E2=80=AFAM James Ferguson &lt;<a href=3D"mailto:jamesfergusonch@gmail=
.com">jamesfergusonch@gmail.com</a>&gt; wrote:<br></div><blockquote class=
=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rg=
b(204,204,204);padding-left:1ex"><div dir=3D"ltr"><div class=3D"gmail_defau=
lt" style=3D"font-size:small">Pieter=C2=A0</div><div class=3D"gmail_default=
" style=3D"font-size:small"><br></div><div class=3D"gmail_default" style=3D=
"font-size:small">- Thank you, very helpful explanation=C2=A0</div><div cla=
ss=3D"gmail_default" style=3D"font-size:small"><br></div><div class=3D"gmai=
l_default" style=3D"font-size:small">=C2=A0So=C2=A0 suggestion sucks -=C2=
=A0 I withdraw it to avoid wasting others time !</div><div class=3D"gmail_d=
efault" style=3D"font-size:small"><br></div><div class=3D"gmail_default" st=
yle=3D"font-size:small">However,=C2=A0 it seems dust benefits=C2=A0could be=
 achieved simply by wallets proposing dust roundup to recipient=C2=A0when c=
reating the transaction rather than providing=C2=A0a change output - It see=
ms wallet providers could automate this small benefit to be adopted with no=
 protocol=C2=A0change.</div><div class=3D"gmail_default" style=3D"font-size=
:small"><br></div><div class=3D"gmail_default" style=3D"font-size:small">So=
 it fair to describe dust as a &quot;tragedy of the commons&quot; (wallets =
leave value at small cost but=C2=A0no benefit) that bloats the time chain ?=
</div><div class=3D"gmail_default" style=3D"font-size:small"><br></div><div=
 class=3D"gmail_default" style=3D"font-size:small">Thanks for your assistan=
ce - I want to get into this but need to pick a niche to grow initial under=
standing. - Suggestions welcome</div><div class=3D"gmail_default" style=3D"=
font-size:small"><br></div><div class=3D"gmail_default" style=3D"font-size:=
small">Cheers, James</div><div class=3D"gmail_default" style=3D"font-size:s=
mall"><br></div><div class=3D"gmail_default" style=3D"font-size:small"><br>=
</div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_=
attr">On Thu, 26 Sept 2024 at 03:23, Pieter Wuille &lt;<a href=3D"mailto:bi=
tcoin-dev@wuille.net" target=3D"_blank">bitcoin-dev@wuille.net</a>&gt; wrot=
e:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0=
.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style=3D=
"font-family:Arial,sans-serif;font-size:14px;color:rgb(0,0,0);background-co=
lor:rgb(255,255,255)">Hi James,</div><div style=3D"font-family:Arial,sans-s=
erif;font-size:14px;color:rgb(0,0,0);background-color:rgb(255,255,255)"><br=
></div><div style=3D"font-family:Arial,sans-serif;font-size:14px;color:rgb(=
0,0,0);background-color:rgb(255,255,255)">I believe you&#39;re imagining th=
at Bitcoin works very differently from how it actually does. Comments below=
 inline.<br></div>
<div style=3D"font-family:Arial,sans-serif;font-size:14px">
    <div>
       =20
            </div>
   =20
            <div>
       =20
            </div>
</div>
<div style=3D"font-family:Arial,sans-serif;font-size:14px"><br></div><div>
        On Wednesday, September 25th, 2024 at 8:44 PM, James Ferguson &lt;<=
a href=3D"mailto:jamesfergusonch@gmail.com" target=3D"_blank">jamesferguson=
ch@gmail.com</a>&gt; wrote:</div><div><br></div><div>
        <blockquote type=3D"cite"><div>Introduction of provisionally named =
 &quot;OP_KEEPCHANGE&quot; allows small residual UTXO (change) to be automa=
tically credited to the primary recipient=E2=80=99s address.</div></blockqu=
ote><div style=3D"font-family:Arial,sans-serif;font-size:14px;color:rgb(0,0=
,0);background-color:rgb(255,255,255)"><br></div><div style=3D"font-family:=
Arial,sans-serif;font-size:14px;color:rgb(0,0,0);background-color:rgb(255,2=
55,255)">Bitcoin doesn&#39;t have a concept of address balances at the prot=
ocol level, or even addresses at all, let alone a &quot;primary recipient a=
ddress&quot;. Balances you see in wallets and blockchain explorers simply r=
eport the sum of the values of UTXOs under control of a given address, but =
this is a local interpretation made by that software; the protocol itself d=
oes not know or care about these things.</div><div style=3D"font-family:Ari=
al,sans-serif;font-size:14px;color:rgb(0,0,0);background-color:rgb(255,255,=
255)"><br></div><div style=3D"font-family:Arial,sans-serif;font-size:14px;c=
olor:rgb(0,0,0);background-color:rgb(255,255,255)">The way to &quot;credit =
an address&quot; in Bitcoin is literally to create a UTXO locked with (the =
script corresponding to) the address in question, so barring an extremely i=
nvasive overhaul of how the entire protocol works, there isn&#39;t actually=
 any UTXO set size benefit to this proposal - change UTXOs would still need=
 to be created. In addition, if your proposal requires revealing what the r=
ecipient of a payment is (as &quot;crediting primary recipient&quot; implie=
s), it would necessarily also undo the primary privacy benefit of having a =
UTXO model in the first place: today, one cannot generally tell which outpu=
t of a transaction is the payee, and this is by design.<br></div><div style=
=3D"font-family:Arial,sans-serif;font-size:14px;color:rgb(0,0,0);background=
-color:rgb(255,255,255)"><br></div><div style=3D"font-family:Arial,sans-ser=
if;font-size:14px;color:rgb(0,0,0);background-color:rgb(255,255,255)">Of co=
urse, a hypothetical proposal could change anything about Bitcoin&#39;s des=
ign if it were to have enough support. If the Bitcoin ecosystem really want=
ed an address balance model, nothing prevents the introduction of that. In =
that case, there is no point to have UTXOs, or change, at all. Just make tr=
ansaction deduct some address balances, and credit some others directly. Th=
is removes many of the issues you seem to want to address much more directl=
y (including coin selection, dust accumulation, UTXO set growth to some ext=
ent, and many more, while adding other complications in other places, of co=
urse). However, it would also massively hurt privacy, as there would be an =
on-chain cost to creating new addresses/balances, incentivizing keeping one=
&#39;s funds in just one. The current UTXO model does not care about the di=
stinction between payments and change and this is very much desirable: send=
ing your change to a new change address with pristine history costs exactly=
 the same as sending it back to the address the spend coins were assigned t=
o.<br></div><div style=3D"font-family:Arial,sans-serif;font-size:14px;color=
:rgb(0,0,0);background-color:rgb(255,255,255)"><br></div><blockquote type=
=3D"cite"><div>b) Enhanced Privacy: . <br></div><div>This provides a slight=
 improvement in transaction privacy by obfuscating the typical patterns use=
d to identify change outputs.</div></blockquote><div style=3D"font-family:A=
rial,sans-serif;font-size:14px;color:rgb(0,0,0);background-color:rgb(255,25=
5,255)"><br></div><div style=3D"font-family:Arial,sans-serif;font-size:14px=
;color:rgb(0,0,0);background-color:rgb(255,255,255)">But it does so at the =
cost of incentivizing not transitioning to a new address on every transacti=
on, a huge privacy leak.</div><div style=3D"font-family:Arial,sans-serif;fo=
nt-size:14px;color:rgb(0,0,0);background-color:rgb(255,255,255)"><br></div>=
<blockquote type=3D"cite"><div>- When used in a transaction, `OP_KEEPCHANGE=
` signals that any excess change be added to the primary output instead of =
generating a separate change output.</div></blockquote><div style=3D"font-f=
amily:Arial,sans-serif;font-size:14px;color:rgb(0,0,0);background-color:rgb=
(255,255,255)"><br></div><div style=3D"font-family:Arial,sans-serif;font-si=
ze:14px;color:rgb(0,0,0);background-color:rgb(255,255,255)">Change does not=
 exist at the protocol level. It is just an output like any normal payment =
output, and indistinguishable from it. The protocol also has no knowledge o=
f excess - that is a concept purely local to the sender wallet. It <b>choos=
es</b>=E2=80=8B to add an output back to itself, to balance the amounts in =
the inputs with the amounts in the outputs (minus fee). At the very least y=
our proposal would require a way to signal how much to send back, and to wh=
ere (remember that multiple parties can cooperate to jointly construct a si=
ngle transaction!). At this point you&#39;re not far off from just having a=
nother output...</div></div><div style=3D"font-family:Arial,sans-serif;font=
-size:14px;color:rgb(0,0,0);background-color:rgb(255,255,255)"><br></div><d=
iv style=3D"font-family:Arial,sans-serif;font-size:14px;color:rgb(0,0,0);ba=
ckground-color:rgb(255,255,255)">Cheers,</div><div style=3D"font-family:Ari=
al,sans-serif;font-size:14px;color:rgb(0,0,0);background-color:rgb(255,255,=
255)"><br></div><div style=3D"font-family:Arial,sans-serif;font-size:14px;c=
olor:rgb(0,0,0);background-color:rgb(255,255,255)">-- <br></div><div style=
=3D"font-family:Arial,sans-serif;font-size:14px;color:rgb(0,0,0);background=
-color:rgb(255,255,255)">Pieter</div><div style=3D"font-family:Arial,sans-s=
erif;font-size:14px;color:rgb(0,0,0);background-color:rgb(255,255,255)"><br=
></div><div>
    </div></blockquote></div>

<p></p>

-- <br>
You received this message because you are subscribed to the Google Groups &=
quot;Bitcoin Development Mailing List&quot; group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:bitcoindev+unsubscribe@googlegroups.com" target=
=3D"_blank">bitcoindev+unsubscribe@googlegroups.com</a>.<br>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/d/msgid/bitcoindev/CABCM42TOD8fOJhy-1xEhGHiW3W9-MBnrhcHLOvsNwkjSiaG0VA%4=
0mail.gmail.com?utm_medium=3Demail&amp;utm_source=3Dfooter" target=3D"_blan=
k">https://groups.google.com/d/msgid/bitcoindev/CABCM42TOD8fOJhy-1xEhGHiW3W=
9-MBnrhcHLOvsNwkjSiaG0VA%40mail.gmail.com</a>.<br>
</blockquote></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;Bitcoin Development Mailing List&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:bitcoindev+unsubscribe@googlegroups.com">bitcoind=
ev+unsubscribe@googlegroups.com</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/d/msgid/bitcoindev/CALeFGL0ddgS%3DqCsunoGwD2j6By4_bQpndX-oKn_wAQse3o%2BS=
xg%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">https://groups.=
google.com/d/msgid/bitcoindev/CALeFGL0ddgS%3DqCsunoGwD2j6By4_bQpndX-oKn_wAQ=
se3o%2BSxg%40mail.gmail.com</a>.<br />

--000000000000d46de2062324bab3--