summaryrefslogtreecommitdiff
path: root/c6/9b7aa95edf1e5a5b599018afcb40e2bff46633
blob: 343e83da3c60035cc4a6955b01c0d5c79ea5b3f3 (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
Delivery-date: Tue, 29 Apr 2025 07:15:53 -0700
Received: from mail-qt1-f191.google.com ([209.85.160.191])
	by mail.fairlystable.org with esmtps  (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
	(Exim 4.94.2)
	(envelope-from <bitcoindev+bncBC7YL44NVYFRBDV6YPAAMGQE3LNC66I@googlegroups.com>)
	id 1u9lkW-0002cL-9s
	for bitcoindev@gnusha.org; Tue, 29 Apr 2025 07:15:53 -0700
Received: by mail-qt1-f191.google.com with SMTP id d75a77b69052e-4766e03b92bsf111142591cf.2
        for <bitcoindev@gnusha.org>; Tue, 29 Apr 2025 07:15:52 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1745936145; cv=pass;
        d=google.com; s=arc-20240605;
        b=VIHrwNLXsRZtZ0yyY+sJv0aPelgzmoqKwh6sGHGoIIACul44o8NL7GIHNaUFKNfqeq
         uZoCXRO8U6QaBHbzRa+j9K0mWEFlaWgyxzD+sdf/1cGEoYSo1cpT7qBB6fl8XIYZW6WU
         GnxKSKHO8Am5rLEVo6Zb9m5M35/nAkdtvYU5PNIbz8pFVgceTLKhg6ILqbAAiq12VDiT
         BK4b2D/YXSMmWFgI6qApYRSi8Bw6zJPiKl9Qh+4xcTDha5/xqnTXD3SqPOvF5vaA6jpO
         ewweuanrZIeJDHMlxnBtG2NBYm0+6fcWIHWSHQC9kv6H438O2kMcPer+WY61zIuj4w5A
         iq2g==
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=wz+UHbQA04gJzqEo6QAEJboaukPyEIKc4WCRgTFtK38=;
        fh=ZE6CElbtNbMfhgkJQPS0HN9KG6pbMX1NDEwAYdWskrc=;
        b=K3OE+gDGX7Bw5FM0f7MBFYuUCkaoQLsGexVvOLtAPfjiwll2nO8eIXoO8ucdfbeVfO
         vd5g1gDrO+JFxms9tzMGbrhcbO61YCj2AdsOM43btCjnwrj1j/w3TGiU86uLpR+7fI3E
         +Uh1QkNNzis4QmDMNum/l47gthJ7p0U38oIDMyJH96dZskDBMp3pKRuq7ZMn8LkOqNYp
         kDjssrbSGon9GghSchpjf+qfTgZPV8Sm1MqbQZf3SWtU9XM1U4Q1RSIkvTF5OoSO9HCm
         FpyrRZg70vO5Xi0tQTFQnpoemFVx34MYynowYf/shqRHVT8IxdwLpk8Iz+o0bZIEhqsn
         j4bA==;
        darn=gnusha.org
ARC-Authentication-Results: i=2; gmr-mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20230601 header.b=mHMmTkmh;
       spf=pass (google.com: domain of saintwenhao@gmail.com designates 2a00:1450:4864:20::634 as permitted sender) smtp.mailfrom=saintwenhao@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=1745936145; x=1746540945; 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=wz+UHbQA04gJzqEo6QAEJboaukPyEIKc4WCRgTFtK38=;
        b=TtOXUkTuHlvu/6V8n61Syv5vUr+oLz7UPjLt4vyleAPRhOoZ8WjvH4qv4/gTPjnNW3
         ID19zP7J0pAzbjqok5zxH8yu2C7KWqotA+QBJmGnijO9ioTEniSrBa5XHcE8HuhGjv+h
         ZE+K5Yg7gVwsfTpi1oIeHgQy8C71w1xz2EGsAl+l+ORevOR8MC+7TddcntM9ZutfaXBT
         Gum5cYSSeKo/CdtUZQbGhJuWLf1EEVbH2Tt266Mj8W53Iap0oJRprOAUUnyTIuF+N26k
         uCxYai2gvirs8/1TDQcQVwwcVb8iNMPOGmXVqsLIJOa8Y9Mnmun6BsfVNRkv3Dgxvfuc
         TLHw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1745936145; x=1746540945; 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=wz+UHbQA04gJzqEo6QAEJboaukPyEIKc4WCRgTFtK38=;
        b=lxdzJmiVQ9H2CURtxiAK3DCvSWXhUS0Om4Gmm/GK0fnxox0DTADzZloFDYZ89ydRDW
         yrJxr0rHHMYDIcjN1JzVZhfxFgKrqJ+a2rOc9hGbJCR8Tat6ryyXu+FDiobjWCBAo5c5
         ddSk+gsmpKgse6zVaOAHqSPlYzgvegs8YQYE1hItisVkTBAjqzzbBx8XV809EH/UCZaV
         RYkurHTvAaAFaamaZFM/rAY7ckj/UWTb4ul66Fngc0+awRtAI7Ktz8g6flpuTObBBe43
         ULidMl07xpVPTrzLmGMwKb9F8HB9iLTmvI1cDBYixOgB4aKMNTpmCWMISuRA+iFWYqcl
         7OPQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1745936145; x=1746540945;
        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=wz+UHbQA04gJzqEo6QAEJboaukPyEIKc4WCRgTFtK38=;
        b=fY2i+MFW1NfoVl8HkTqcRuKkz/7/84bVww7yr9k4lfs7XF77XYvyVmUlVMaVhxpl6R
         1yoBKnX+ToW5Mf5YfC9xuynFE6EEe+h3fDbKnwRMQZKhQUVqT/AQaHO7NbcvwbSybNMx
         hsWhRESxh6zwep88hHHt2UgezPKVfKPOnTJjGtOwvwSzKtmysnGB6t7y49OaiPOUprgB
         Tpl3CScT+7D8pBRoDLYIuEEIQx/sRErfJA5tpRLxOMMWXUpWT24gWeJPWNt7gALLbKYp
         6tn+EbkVfuZDSJ+ZwLzHDzVqi9HzrM9FRq4y8YlfX3jtUCLqWnRG1HAllmTObW5I1xEE
         4ofg==
Sender: bitcoindev@googlegroups.com
X-Forwarded-Encrypted: i=2; AJvYcCWHoAMdZfb8MPVDuinzygQmqTdj2wCqef39SYC8QlrOfKEpCB3wrnv2rzpnHBF9wPb35su5EiFL1tmz@gnusha.org
X-Gm-Message-State: AOJu0YywXGq/NXDDS0gLIkqqkxMJ5ptDiqRv4AYvWmi3mYDzxWTlQIJI
	Dv/QAqZSUH6h7+3WtrXhPUsUym/H3E7IxbD0PFV0iD0gOQUYufe+
X-Google-Smtp-Source: AGHT+IGRbTZ0ehgFrvnbRCpZM7/E6Pm1VODzRuWffUxE8lDkhkJ1JIk6/bOVU5dGLzp/dcN9cKGi1g==
X-Received: by 2002:a05:622a:58cd:b0:476:8521:778d with SMTP id d75a77b69052e-48874946b72mr55883631cf.50.1745936145358;
        Tue, 29 Apr 2025 07:15:45 -0700 (PDT)
X-BeenThere: bitcoindev@googlegroups.com; h=AVT/gBHlVLRE3uqS+GU9biuJofDYBJCSPbJ8/oDPPbd4hy81uQ==
Received: by 2002:ac8:65d4:0:b0:477:c8a:e60b with SMTP id d75a77b69052e-47e55f72d9bls21202931cf.1.-pod-prod-02-us;
 Tue, 29 Apr 2025 07:15:41 -0700 (PDT)
X-Received: by 2002:a05:620a:d8a:b0:7c5:5edb:f4d5 with SMTP id af79cd13be357-7cabe740221mr367126985a.2.1745936141840;
        Tue, 29 Apr 2025 07:15:41 -0700 (PDT)
Received: by 2002:a7b:cd93:0:b0:43c:fe31:d01d with SMTP id 5b1f17b1804b1-440a675d0dcms5e9;
        Mon, 28 Apr 2025 06:34:08 -0700 (PDT)
X-Received: by 2002:a5d:64ce:0:b0:390:e853:85bd with SMTP id ffacd0b85a97d-3a07adb1dd6mr6347243f8f.48.1745847246176;
        Mon, 28 Apr 2025 06:34:06 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1745847246; cv=none;
        d=google.com; s=arc-20240605;
        b=ffK83g3BCuEbiq+5knsMF3Ul2mdfKVM6gfKalXtNSQ+yXhgvDv5e/MLTWMCuCkrM4Q
         YVEzpU0Bl2++gh+/dWpt45/hHHUODslSDQMJwmnS6fLu369mOHRFx1O8K55u4jHPI0vl
         kOTLAMJU63tXcXothyWa6n67cAvBFGLYPfCJBVRFbRHOouh5OyQkuMW/aQ3DbUwym2CK
         B/wEPvNmKxOMuGgWpgmRXXUmHpDABZGlKhLQNF1bhnEeLOjsKaFMucKZU9i3vaG3hqGX
         z9Sjmbckh41BKYrDdKruKSsDqXHvnz/yNxSnizzQaolXf3T711/SBjtpH3i8RV8/43Gq
         p25A==
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=RV0GUrh0U2LdLxinjDIbh8PLQ7lC1h0uIACWNSxDnhk=;
        fh=9MJLkQ3zxEFkoiQvguRR67rcpV7mF/kCp58/rUZuF44=;
        b=kzSs1b1B66JiMyCsLoqceHxf4r2nb7WVAaZty7/Xd3xUJ9RIn0YZWypelKFqhBHXdR
         fU5Ujb32zwY8EOW7OhHmUzBvNZ6D0BMSSxfEq2aMhECpR4DyIav4zCaRN2mW0WVegsZ4
         k6NBwngs2J3yYNy1YTSlC8tRY1ynsxJIrKiT9Sxiifwu9b7fePH+XIYIlba6qhKsvygY
         oVU5Fdoxv4A47zUBTZVk7OJ0Nf9YYMdxHZG9sjDP24qqK3POIclltYm8AjKAujWucpz8
         xp+FP7PfcrDdCmP7H0zWa/5wRpj2ZPhYfhPivKAs6ISt+uOgc6ZfXT4dTBQKXIxnAbDl
         JJRw==;
        dara=google.com
ARC-Authentication-Results: i=1; gmr-mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20230601 header.b=mHMmTkmh;
       spf=pass (google.com: domain of saintwenhao@gmail.com designates 2a00:1450:4864:20::634 as permitted sender) smtp.mailfrom=saintwenhao@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com;
       dara=pass header.i=@googlegroups.com
Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com. [2a00:1450:4864:20::634])
        by gmr-mx.google.com with ESMTPS id 5b1f17b1804b1-4408e232f42si7234495e9.0.2025.04.28.06.34.06
        for <bitcoindev@googlegroups.com>
        (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
        Mon, 28 Apr 2025 06:34:06 -0700 (PDT)
Received-SPF: pass (google.com: domain of saintwenhao@gmail.com designates 2a00:1450:4864:20::634 as permitted sender) client-ip=2a00:1450:4864:20::634;
Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-ac6ed4ab410so760294066b.1
        for <bitcoindev@googlegroups.com>; Mon, 28 Apr 2025 06:34:06 -0700 (PDT)
X-Gm-Gg: ASbGncuD2V1aX5vmRGYZ1qJR5NdvAJVWI2z1J+fwgpQS8co0nplDmxS3qbxTsRHqAcG
	kGY5iHu/YORejdW/n0QNnWCgPwXqwd9ZFvaEhg3q5zxVK3vSnZD6Rz2El2BY85tKp1j1EK86TM0
	mznesx1+YRNJhLs97mjr62
X-Received: by 2002:a17:907:da6:b0:aca:a539:be04 with SMTP id
 a640c23a62f3a-ace848c1fa2mr861496466b.4.1745847245239; Mon, 28 Apr 2025
 06:34:05 -0700 (PDT)
MIME-Version: 1.0
References: <hU75DurC5XToqizyA-vOKmVtmzd3uZGDKOyXuE_ogE6eQ8tPCrvX__S08fG_nrW5CjH6IUx7EPrq8KwM5KFy9ltbFBJZQCHR2ThoimRbMqU=@protonmail.com>
 <5c13e130-aaa2-4866-be26-7498100e868b@murch.one> <7c6800f0-7b77-4aca-a4f9-2506a2410b29@murch.one>
 <vgcVopNpWCowIGaIpVgjsCWyTMjxVKoWtRdDVnTNrM8tYPjKtC6MJ6S-2KxIYdJYgAhG8iNPig-xijwd7DtAm6tHN3T3xgIMUNUSTBYvT_A=@protonmail.com>
 <672cb527-9005-46fc-be2c-4508d39cfd7dn@googlegroups.com> <CADL_X_eXcmD8fEpL9Sqqwt6EfwtdjG+Aaqk+pgSBhPmaVT3gEw@mail.gmail.com>
 <CACgYNOKDFjxTuk8Szq305oNvS_tAwoCosrcR3ij4ihCuHjw78A@mail.gmail.com>
 <CADL_X_dfaBQJDXu=urRn40J7fCkDAPi-sdnnCwAZd4RUgr68fw@mail.gmail.com> <8E819BCF-EEAE-4F10-89A1-FA3FDE0F67E3@sprovoost.nl>
In-Reply-To: <8E819BCF-EEAE-4F10-89A1-FA3FDE0F67E3@sprovoost.nl>
From: Saint Wenhao <saintwenhao@gmail.com>
Date: Mon, 28 Apr 2025 15:33:53 +0200
X-Gm-Features: ATxdqUGWyuOjfAnPV9pK1psrq90twC_gtXzMIeuK1mgsY1epjqeWWFFkrcVOPts
Message-ID: <CACgYNOJuWPDH7n2UMwYOhOZ=uxD6_taagyi23iTKEw_2seGyiw@mail.gmail.com>
Subject: Re: [bitcoindev] Unbreaking testnet4
To: Sjors Provoost <sjors@sprovoost.nl>
Cc: Bitcoin Development Mailing List <bitcoindev@googlegroups.com>, Jameson Lopp <jameson.lopp@gmail.com>
Content-Type: multipart/alternative; boundary="000000000000e27c2c0633d6bc6b"
X-Original-Sender: saintwenhao@gmail.com
X-Original-Authentication-Results: gmr-mx.google.com;       dkim=pass
 header.i=@gmail.com header.s=20230601 header.b=mHMmTkmh;       spf=pass
 (google.com: domain of saintwenhao@gmail.com designates 2a00:1450:4864:20::634
 as permitted sender) smtp.mailfrom=saintwenhao@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 (/)

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

> because it breaks the assumption that coins don't expire

Technically, they can expire, if the client can see some chain
reorganization. And it is something to think about: if the consensus will
force miners to go back to some previous block height, and produce a
stronger, alternative chain, then such testnet would automatically perform
full chain reorganization, wired into its consensus rules. And then, coins
would expire in a backward-compatible way, while also battle testing full
chain reorganization (which may need testing anyway, for other reasons,
like checkpoints).

> This will eventually overflow, but that seems fine for a testnet.

As far as I remember, there were some additional limits, introduced after
Value Overflow Incident, for example that a single UTXO cannot hold more
than 21 million coins:
https://github.com/bitcoin/bitcoin/blob/master/src/consensus/tx_check.cpp#L=
29

```
    // Check for negative or overflow output values (see CVE-2010-5139)
    CAmount nValueOut =3D 0;
    for (const auto& txout : tx.vout)
    {
        if (txout.nValue < 0)
            return state.Invalid(TxValidationResult::TX_CONSENSUS,
"bad-txns-vout-negative");
        if (txout.nValue > MAX_MONEY)
            return state.Invalid(TxValidationResult::TX_CONSENSUS,
"bad-txns-vout-toolarge");
        nValueOut +=3D txout.nValue;
        if (!MoneyRange(nValueOut))
            return state.Invalid(TxValidationResult::TX_CONSENSUS,
"bad-txns-txouttotal-toolarge");
    }
```

Which means that in practice, instead of seeing huge or overflowed amounts
in UTXOs, we will probably see a lot of repeated entries in the UTXO set,
holding MAX_MONEY each.

pon., 28 kwi 2025 o 14:47 Sjors Provoost <sjors@sprovoost.nl> napisa=C5=82(=
a):

> Jameson Lopp wrote:
>
> > Encoding an "end of life date" into testnets is actually an interesting
> idea worth discussing. As far as I'm aware it's never been done before on
> any network.
>
> Keep in mind that testnet-specific code has to live right next to, even
> inside of, mainnet consensus code. We want the change to be as simple as
> possible, so as to not accidentally break mainnet.
>
> Unless and until coin expiration is something we're seriously considering
> for mainnet, we'd rather not implement it for testnet.
>
> This particular idea probably requires a lot of changes all over the plac=
e
> (consensus, mempool, wallet) because it breaks the assumption that coins
> don't expire.
>
>
> Something I've proposed in person a few times, is to double the coins
> every halving. In terms of code, it boils down to changing GetBlockSubsid=
y:
>
> CAmount nSubsidy =3D 50 * COIN;
> // Subsidy is cut in half every 210,000 blocks which will occur
> approximately every 4 years.
> If (consensusParams.inflation) {
>     // Except on testnet5
>     nSubsidy <<=3D halvings;
> } else {
>   nSubsidy >>=3D halvings;
> }
>
> This will eventually overflow, but that seems fine for a testnet. Along
> with the timewarp fix, the network might even grind to a halt in 2106, lo=
ng
> before we overflow 64 bit numbers.
>
> Rust Bitcoin [0] currently refuses amounts above 21 million BTC, but they
> would have many years to fix that.
>
>
> Strong inflation has been battle tested by governments around the world
> for millennia as a way to discourage saving.
>
> - Sjors
>
> [0] https://github.com/rust-bitcoin/rust-bitcoin/issues/4273

--=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 visit https://groups.google.com/d/msgid/bitcoindev/=
CACgYNOJuWPDH7n2UMwYOhOZ%3DuxD6_taagyi23iTKEw_2seGyiw%40mail.gmail.com.

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

<div dir=3D"ltr">&gt; because it breaks the assumption that coins don&#39;t=
 expire<br><br>Technically, they can expire, if the client can see some cha=
in reorganization. And it is something to think about: if the consensus wil=
l force miners to go back to some previous block height, and produce a stro=
nger, alternative chain, then such testnet would automatically perform full=
 chain reorganization, wired into its consensus rules. And then, coins woul=
d expire in a backward-compatible way, while also battle testing full chain=
 reorganization (which may need testing anyway, for other reasons, like che=
ckpoints).<br><br>&gt; This will eventually overflow, but that seems fine f=
or a testnet.<br><br>As far as I remember, there were some additional limit=
s, introduced after Value Overflow Incident, for example that a single UTXO=
 cannot hold more than 21 million coins: <a href=3D"https://github.com/bitc=
oin/bitcoin/blob/master/src/consensus/tx_check.cpp#L29">https://github.com/=
bitcoin/bitcoin/blob/master/src/consensus/tx_check.cpp#L29</a><br><br>```<b=
r>=C2=A0 =C2=A0 // Check for negative or overflow output values (see CVE-20=
10-5139)<br>=C2=A0 =C2=A0 CAmount nValueOut =3D 0;<br>=C2=A0 =C2=A0 for (co=
nst auto&amp; txout : tx.vout)<br>=C2=A0 =C2=A0 {<br>=C2=A0 =C2=A0 =C2=A0 =
=C2=A0 if (txout.nValue &lt; 0)<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 return state.Invalid(TxValidationResult::TX_CONSENSUS, &quot;bad-txns-v=
out-negative&quot;);<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 if (txout.nValue &gt; M=
AX_MONEY)<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return state.Invalid=
(TxValidationResult::TX_CONSENSUS, &quot;bad-txns-vout-toolarge&quot;);<br>=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 nValueOut +=3D txout.nValue;<br>=C2=A0 =C2=A0 =
=C2=A0 =C2=A0 if (!MoneyRange(nValueOut))<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 return state.Invalid(TxValidationResult::TX_CONSENSUS, &quot;=
bad-txns-txouttotal-toolarge&quot;);<br>=C2=A0 =C2=A0 }<br>```<br><br>Which=
 means that in practice, instead of seeing huge or overflowed amounts in UT=
XOs, we will probably see a lot of repeated entries in the UTXO set, holdin=
g MAX_MONEY each.</div><br><div class=3D"gmail_quote gmail_quote_container"=
><div dir=3D"ltr" class=3D"gmail_attr">pon., 28 kwi 2025 o 14:47=C2=A0Sjors=
 Provoost &lt;<a href=3D"mailto:sjors@sprovoost.nl">sjors@sprovoost.nl</a>&=
gt; napisa=C5=82(a):<br></div><blockquote class=3D"gmail_quote" style=3D"ma=
rgin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:=
1ex">Jameson Lopp wrote:<br>
<br>
&gt; Encoding an &quot;end of life date&quot; into testnets is actually an =
interesting idea worth discussing. As far as I&#39;m aware it&#39;s never b=
een done before on any network. <br>
<br>
Keep in mind that testnet-specific code has to live right next to, even ins=
ide of, mainnet consensus code. We want the change to be as simple as possi=
ble, so as to not accidentally break mainnet.<br>
<br>
Unless and until coin expiration is something we&#39;re seriously consideri=
ng for mainnet, we&#39;d rather not implement it for testnet.<br>
<br>
This particular idea probably requires a lot of changes all over the place =
(consensus, mempool, wallet) because it breaks the assumption that coins do=
n&#39;t expire.<br>
<br>
<br>
Something I&#39;ve proposed in person a few times, is to double the coins e=
very halving. In terms of code, it boils down to changing GetBlockSubsidy:<=
br>
<br>
CAmount nSubsidy =3D 50 * COIN;<br>
// Subsidy is cut in half every 210,000 blocks which will occur approximate=
ly every 4 years.<br>
If (consensusParams.inflation) {<br>
=C2=A0 =C2=A0 // Except on testnet5<br>
=C2=A0 =C2=A0 nSubsidy &lt;&lt;=3D halvings;<br>
} else {<br>
=C2=A0 nSubsidy &gt;&gt;=3D halvings;<br>
}<br>
<br>
This will eventually overflow, but that seems fine for a testnet. Along wit=
h the timewarp fix, the network might even grind to a halt in 2106, long be=
fore we overflow 64 bit numbers.<br>
<br>
Rust Bitcoin [0] currently refuses amounts above 21 million BTC, but they w=
ould have many years to fix that.<br>
<br>
<br>
Strong inflation has been battle tested by governments around the world for=
 millennia as a way to discourage saving.<br>
<br>
- Sjors<br>
<br>
[0] <a href=3D"https://github.com/rust-bitcoin/rust-bitcoin/issues/4273" re=
l=3D"noreferrer" target=3D"_blank">https://github.com/rust-bitcoin/rust-bit=
coin/issues/4273</a></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 visit <a href=3D"https://groups.google.com/d/msgid/=
bitcoindev/CACgYNOJuWPDH7n2UMwYOhOZ%3DuxD6_taagyi23iTKEw_2seGyiw%40mail.gma=
il.com?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.com/d/=
msgid/bitcoindev/CACgYNOJuWPDH7n2UMwYOhOZ%3DuxD6_taagyi23iTKEw_2seGyiw%40ma=
il.gmail.com</a>.<br />

--000000000000e27c2c0633d6bc6b--