Delivery-date: Tue, 29 Apr 2025 07:17:43 -0700 Received: from mail-qv1-f58.google.com ([209.85.219.58]) by mail.fairlystable.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1u9lmI-0002fq-OH for bitcoindev@gnusha.org; Tue, 29 Apr 2025 07:17:43 -0700 Received: by mail-qv1-f58.google.com with SMTP id 6a1803df08f44-6ed0cc28f7dsf152663676d6.0 for ; Tue, 29 Apr 2025 07:17:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1745936256; cv=pass; d=google.com; s=arc-20240605; b=kt+OWB0in04rIPig0z7GyqRrmrsh8X29gEUN/V91oVhB6YCv1d6AAfbxPZIJ9jrREN iIjawaEnBiMzvS/DJU/Eq2SvL61wwTrlyoI5mZOTtSTQsAywLv4DVmO1+ahu8vlEnmGI RJ92f7GhJG2aLf2djEQNUHQJraArYScXECjweF54nei1S7ghj6vUTysbOcAh2WThO503 eh0LzTcyNvZfiWo4gWZlNT6SZZdRWO0WJGDghVeXwer/U5pa/595g+yZmzJZwXHrQE8j 7llV43oh3xbW/xPdv/M0Uy+dFh18+N2svCLfrUjhQL3EM/r3hKtMIZGQrNpAquwwtqWM jpxA== 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:to:subject:message-id:date:from :in-reply-to:references:mime-version:sender:dkim-signature :dkim-signature; bh=pIgZrVappcTM7WixlAQuxjajzSV3JrEb++7HU4agh8Y=; fh=x3X+zNqnsMZnjRIDujXmiClXtsTxo4uac19gpCrYHQw=; b=QmL3SWfuBWAYTzS9JXzqa5vDwlr0YtcmZZYz+o9fP0Q2eFwqEC1p6fnJ8S7jH8I8GP KCjWgWJOjSxHkupvD+bWo7EQ0UOkqCC+UjlML8/WCNfCzx7LqyCK91zd+BQWJsjtaF6a ZyDaSbIrPmBzxAyZxBMlUFF0weMYXBRwYzSYI520kK8NPe3Ns4SIhr6rqCRYJAovL9rJ ymN9AwaeNnsLp1oOQj59pB4yrufMxZV2Lxha8ImmcHPt+lhFnY9a+iJAvrXHDEm6C6PU VJ2nXiK8BpNGowwz6wKbP+Ae2Df3uy6Iho9TZ5qFqa2VrN10m7p2GA+e1nLmFjUV3gab Ro+Q==; darn=gnusha.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=cpYNWXzL; spf=pass (google.com: domain of saintwenhao@gmail.com designates 2a00:1450:4864:20::535 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=1745936256; x=1746541056; 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:to:subject:message-id:date:from:in-reply-to :references:mime-version:sender:from:to:cc:subject:date:message-id :reply-to; bh=pIgZrVappcTM7WixlAQuxjajzSV3JrEb++7HU4agh8Y=; b=xT4fvRx+4m/7sJeTSvUjXAuxtVUOlmS9ajegdw1MDEU+HSXrRVTFEQTGcXhfI077HI P5ONWN4U3eWVefjpyFa78XeDOWF91GKybz5jcpYq0CHHKgellahdvONf9fQlE4mnFkQi gY/ECfcqxxmXmJ8x88OA/rtK7cGaiBB0bm1CHt6zXultWcS/SK8mD7uRWOnU1WIdg0Kq ur7PIxRA8r13MWIh5CsR0pN6cYCiP0H9/gt1cAHcxzOJg+g8kZSR0MZsHDrPYlXqyqvr 9VjZDrSitwMxJrcar/uIVtXyNWoBPS2o9SI1VBAin2B3RoEIWRl9TD+OQKMKvQWwwY7q Zsbg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1745936256; x=1746541056; 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:to:subject:message-id:date:from:in-reply-to :references:mime-version:from:to:cc:subject:date:message-id:reply-to; bh=pIgZrVappcTM7WixlAQuxjajzSV3JrEb++7HU4agh8Y=; b=WUp6xh5vx6GCk8aOsQXvJY9VuH3ZNlKAnqeLpxKqhEKFHK2XN7ofsHQaFlNRCBKpoT Jzd0ywtAzByWpj0kJfwLdnLdCIiSlHHj50ic6G7NiYlq2n7Wm0kCWAV21LEADdtgsKZk +O83Km/n7A/gi4+g2T1GYzb8Af0CmB9TfhWIbbhJtt2amKyb0ei4VRLKPcJu1X729KFn S+pMGnoFLEL4Bk5w1OnhEt/qWpkCN0UeuBWlcfxpSS1HLe0Z3W32Ecw7QjacDsABOeBm Z0H4nT3wUgCAt5jY4q8Qovy2HRuOHMUm2k0r9NZvbVP7apko3AETFux6VHJJY4cjznl5 QDCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745936256; x=1746541056; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender: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=pIgZrVappcTM7WixlAQuxjajzSV3JrEb++7HU4agh8Y=; b=KejKH4arI9Yq8tcoO5KHLfiYWeuUtEHHcENEh69PAXlI0q9xLpjaVH0Efrvozizyj4 lcpxyAW1C82it8EYLOAR+AtNGi9h6y59BMw+0BCtfJMnbOPxJm762s9OP6KQomKzqsaj mztehMJ+PFA/tob256ldsCNnsbus7yjZ/puZ1Nb4NHjd4aqogD2yTjk2Yzk/4nGzeR5i ubq/4xygxB032u4XWGeFCnlxFUw2RBgy1ZvtPkJoEwkeiy7XmC9oH1ZLxSRq3NallXvW kpwArvszDq/8zFbo6dvxKMu0O4VUbihQ0a68UxA8sZpDq0lKNX+hR4f0tKCmfU1M0KN7 2j2g== Sender: bitcoindev@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCW+4Vc32NJuhfF6hEt12ldUUngB2KrR/g6e0QbqEHZoiCp08BJnSIFo+UzkWncWT/Rn5fUyBX5skGHv@gnusha.org X-Gm-Message-State: AOJu0YzwrrvsDBlMq3QGieQCWIO8C3su9ZWBSPBH9Nc/JlC0Zx1N5WpC HQ/ra3YDXVe57t/UNXSHzOwMi1MhDX1AAP9BeOOVZZnWAFcqHO4d X-Google-Smtp-Source: AGHT+IG5W9HuFloHqAhwOnjD6GYLcImWBsMLKfI9zV/UjxtpQEYhKljiVnR3bQb/uSkA7NsxWtxm9w== X-Received: by 2002:a05:6214:2521:b0:6f4:c422:53e7 with SMTP id 6a1803df08f44-6f4d1eef3fcmr269396286d6.8.1745936255625; Tue, 29 Apr 2025 07:17:35 -0700 (PDT) X-BeenThere: bitcoindev@googlegroups.com; h=AVT/gBE+xg158OSZZjxLAFAinBy8EFUSIGGgchQljVlbRls74A== Received: by 2002:ad4:5481:0:b0:6e8:8d41:8cae with SMTP id 6a1803df08f44-6f4be089036ls5595346d6.0.-pod-prod-04-us; Tue, 29 Apr 2025 07:17:32 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUkM2B+sArHolLnyGb4bB+I89yf/XYDdQmO5TXczNzJ5asO10WISJ8GTPxZoRQHBZj3eHfp8FpYXXab@googlegroups.com X-Received: by 2002:a05:620a:4729:b0:7c3:c869:1aff with SMTP id af79cd13be357-7c96686b13dmr1715745785a.16.1745936252182; Tue, 29 Apr 2025 07:17:32 -0700 (PDT) Received: by 2002:a05:600c:45cf:b0:43d:85ca:231a with SMTP id 5b1f17b1804b1-440a669253cms5e9; Mon, 28 Apr 2025 11:15:48 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU/mq/b1Vu15roG/VHtZzd4kuY4eQ0KSrNbBoVw9Aa/PYS2rxVEyUP8fejMsnPJk1LQRrBgUsazEIVg@googlegroups.com X-Received: by 2002:a05:600c:46c8:b0:43b:c857:e9d7 with SMTP id 5b1f17b1804b1-441acb05d92mr1360505e9.5.1745864146884; Mon, 28 Apr 2025 11:15:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745864146; cv=none; d=google.com; s=arc-20240605; b=RRDNYqejO+sZo4aFhPRSJXhtttBi9IN2tg7TNCgHsqS3BaCMMetft1PtpFZNQqbccA VlWZuQAh34EJHdzEQlSHd5VUwxQH2NqYfW2Oz5H7i6urTagq9Ss8ZBfET0HECVX1sC3O wzCcjnhnmkfb7V0FLNYcc/L/Zz5O0MUs39ak9Rb6rL2VD7O0kPiP27xiIeCCrf5xdh7i otRwBJFi6OaP1oreNNIDp0O57nzEDx3TTf/8kZJHfY4lffUKLmcNFo//DR8a0rbNLNDd /ZJXp6hxoXUACK4H6J/wdTlBrz0leGGpeeNerg8sD3H5qZQgheHmHBrmSGfKtkG9O59Z ecyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=pjyUcScRRK6ispMu4vQ0KqELRC+arrgn1DdtMOmiuQ8=; fh=ienqzme+Ttj4ddW9z+tkCB43PPFTe2OgriCW6T+/jL0=; b=HGszBq4hZnIx6ij6bxv3xtPnFnMrJ5KneRsHLjFZqEmYvQ2iCVmv39eyaOv391vLIm AlnwD4Oyt4IRfC5IblD//JVaIKmhgF9wduA3Z+wZGChx+kWY7rS/QMTGajcPj7V+jP0M irFH/b6a4VDkyvIzu7Lj/3sdNQQUw9sTOjMfQHyShEojKTc8/tSVqevaU6RB+nq59D/7 BchN3ACm63PHOwMNhceF6ZKoOFHQgI4qSbBm1HVAtg6AQe8y1dS53P0dwCfGprMZbRQv PY8d22u58bth4qWgN46BYTSPbZqfgHaKmRSNBpA5jIqkhwfaV7ct7zr1PeijV5l92rC8 rwzw==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=cpYNWXzL; spf=pass (google.com: domain of saintwenhao@gmail.com designates 2a00:1450:4864:20::535 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-ed1-x535.google.com (mail-ed1-x535.google.com. [2a00:1450:4864:20::535]) by gmr-mx.google.com with ESMTPS id 5b1f17b1804b1-4408d83a895si8114945e9.0.2025.04.28.11.15.46 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 28 Apr 2025 11:15:46 -0700 (PDT) Received-SPF: pass (google.com: domain of saintwenhao@gmail.com designates 2a00:1450:4864:20::535 as permitted sender) client-ip=2a00:1450:4864:20::535; Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-5efe8d9eb1eso4962518a12.0 for ; Mon, 28 Apr 2025 11:15:46 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCVC2T3T7NYqZit2Zs2dUX3EgyE+xVVY6JYddFKzM9V8NaouZv9Rzawyueo4Rnb9MrDxO/wsz1zfZPv5@googlegroups.com X-Gm-Gg: ASbGncvyAOVlWHaMoAfRi8LnBezWg1zMJCTq3RgS3Ia1RyXRs2pWTrPhuQLNXzhD3jW FpuLGKa/E1BwJmZ2TcjjFno7pw9dW+AA1u3JXR6WNJDGl0cmPMv/EX9ToXt0Eq0psHGABh+F67E XLR3LDtMKH+6TJ5NxtQGczQA== X-Received: by 2002:a05:6402:2685:b0:5ed:599a:3cbe with SMTP id 4fb4d7f45d1cf-5f839224516mr202864a12.4.1745864146044; Mon, 28 Apr 2025 11:15:46 -0700 (PDT) MIME-Version: 1.0 References: <5c13e130-aaa2-4866-be26-7498100e868b@murch.one> <7c6800f0-7b77-4aca-a4f9-2506a2410b29@murch.one> <672cb527-9005-46fc-be2c-4508d39cfd7dn@googlegroups.com> <8E819BCF-EEAE-4F10-89A1-FA3FDE0F67E3@sprovoost.nl> In-Reply-To: <8E819BCF-EEAE-4F10-89A1-FA3FDE0F67E3@sprovoost.nl> From: Saint Wenhao Date: Mon, 28 Apr 2025 20:15:35 +0200 X-Gm-Features: ATxdqUHx5gXY3itX9bc1rof8S8gptyIt-i3-ffpmJ5l-jzYhpb9BiqsNE5TI8xo Message-ID: Subject: Re: [bitcoindev] Unbreaking testnet4 To: Sjors Provoost , Bitcoin Development Mailing List , Jameson Lopp Content-Type: multipart/alternative; boundary="000000000000404a9c0633daac4f" 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=cpYNWXzL; spf=pass (google.com: domain of saintwenhao@gmail.com designates 2a00:1450:4864:20::535 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: X-Google-Group-Id: 786775582512 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Score: -0.5 (/) --000000000000404a9c0633daac4f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable > 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. Now I applied "doubling" patch in my local regtest, and I can confirm it. After 2849 blocks, when trying to mine block number 2850, the UTXO amount exceeded 21 million coins, and then it failed. ``` 2025-04-28T17:45:39Z CreateNewBlock(): block weight: 820 txs: 0 fees: 0 sigops 400 2025-04-28T17:45:39Z Saw new header hash=3D16d1899aba71f27e7e527f559db7472cbf18f80c2da7e26acb3c2b8476651c54 height=3D2847 2025-04-28T17:45:39Z UpdateTip: new best=3D16d1899aba71f27e7e527f559db7472cbf18f80c2da7e26acb3c2b8476651c54 height=3D2847 version=3D0x20000000 log2_work=3D12.475733 tx=3D2848 date=3D'2025-04-28T17:50:11Z' progress=3D1.000000 cache=3D0.5MiB(2847txo) 2025-04-28T17:45:39Z CreateNewBlock(): block weight: 820 txs: 0 fees: 0 sigops 400 2025-04-28T17:45:39Z Saw new header hash=3D1c639e9656dcea7c2c8c694d27bc9dd82bd327bc8c95c4be1d5ec576c99638fe height=3D2848 2025-04-28T17:45:39Z UpdateTip: new best=3D1c639e9656dcea7c2c8c694d27bc9dd82bd327bc8c95c4be1d5ec576c99638fe height=3D2848 version=3D0x20000000 log2_work=3D12.476240 tx=3D2849 date=3D'2025-04-28T17:50:11Z' progress=3D1.000000 cache=3D0.5MiB(2848txo) 2025-04-28T17:45:39Z CreateNewBlock(): block weight: 820 txs: 0 fees: 0 sigops 400 2025-04-28T17:45:39Z Saw new header hash=3D1e119d36bcd683d4ff2d10c63b60d33431fd141be5cd20d3b0fd074f036b409a height=3D2849 2025-04-28T17:45:39Z UpdateTip: new best=3D1e119d36bcd683d4ff2d10c63b60d33431fd141be5cd20d3b0fd074f036b409a height=3D2849 version=3D0x20000000 log2_work=3D12.476746 tx=3D2850 date=3D'2025-04-28T17:50:11Z' progress=3D1.000000 cache=3D0.5MiB(2849txo) 2025-04-28T17:45:39Z CreateNewBlock(): block weight: 820 txs: 0 fees: 0 sigops 400 2025-04-28T17:45:39Z [error] TestBlockValidity: Consensus::CheckBlock: bad-txns-vout-toolarge, Transaction check failed (tx hash 5802b7370153f8c415fcf689bda204adebe4483c306110ae33a35a88a593d495) 2025-04-28T17:49:41Z CreateNewBlock(): block weight: 808 txs: 0 fees: 0 sigops 400 2025-04-28T17:49:41Z [error] TestBlockValidity: Consensus::CheckBlock: bad-txns-vout-toolarge, Transaction check failed (tx hash f9a54543470144efc33e975d02f44188a7a0d88c16fb997018e33b4e66244f37) ``` And it also failed immediately, after calling "getblocktemplate". However, after manually crafting a block with 21 million coins, it succeeded: $ ./bitcoin-cli -regtest getblock 627434e2e29fb3409aa9bca6b27b261210b3adf274e6e091da889ece9142901b 0 000000209a406b034f07fdb0d320cde51b14fd3134d3603bc6102dffd483d6bc369d111e9d3= 47f2c3a7114151cdc93c9cccc2f6ce64cf7c1b71bb454d005202c9140d413d5bf0f68ffff7f= 200200000001020000000001010000000000000000000000000000000000000000000000000= 000000000000000ffffffff0402220b00ffffffff020040075af07507000451024e73000000= 0000000000266a24aa21a9ede2f61c3f71d1defd3fa999dfa36953755c690689799962b48be= bd836974e8cf901200000000000000000000000000000000000000000000000000000000000= 00000000000000 2025-04-28T18:06:27Z Saw new header hash=3D627434e2e29fb3409aa9bca6b27b261210b3adf274e6e091da889ece9142901b height=3D2850 2025-04-28T18:06:27Z UpdateTip: new best=3D627434e2e29fb3409aa9bca6b27b261210b3adf274e6e091da889ece9142901b height=3D2850 version=3D0x20000000 log2_work=3D12.477252 tx=3D2851 date=3D'2025-04-28T17:50:13Z' progress=3D1.000000 cache=3D0.5MiB(2850txo) Which means, that after reaching 21 million coins, that kind of UTXOs will be produced forever. And I guess it won't be even possible to send more coins than that in a single transaction, which means, that we are quite safe from any kinds of overflows, but we are not safe from flooding the UTXO set with max coin amounts. pon., 28 kwi 2025 o 14:47 Sjors Provoost 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/= CACgYNOL3gH6zhmNyiKLenqoiM9mydsxs3XExxJX1ZSVvOmX2bA%40mail.gmail.com. --000000000000404a9c0633daac4f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
> Which means that in practice, instea= d 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.

Now I = applied "doubling" patch in my local regtest, and I can confirm i= t. After 2849 blocks, when trying to mine block number 2850, the UTXO amoun= t exceeded 21 million coins, and then it failed.

```
2025-04-28T1= 7:45:39Z CreateNewBlock(): block weight: 820 txs: 0 fees: 0 sigops 400
2= 025-04-28T17:45:39Z Saw new header hash=3D16d1899aba71f27e7e527f559db7472cb= f18f80c2da7e26acb3c2b8476651c54 height=3D2847
2025-04-28T17:45:39Z Updat= eTip: new best=3D16d1899aba71f27e7e527f559db7472cbf18f80c2da7e26acb3c2b8476= 651c54 height=3D2847 version=3D0x20000000 log2_work=3D12.475733 tx=3D2848 d= ate=3D'2025-04-28T17:50:11Z' progress=3D1.000000 cache=3D0.5MiB(284= 7txo)
2025-04-28T17:45:39Z CreateNewBlock(): block weight: 820 txs: 0 fe= es: 0 sigops 400
2025-04-28T17:45:39Z Saw new header hash=3D1c639e9656dc= ea7c2c8c694d27bc9dd82bd327bc8c95c4be1d5ec576c99638fe height=3D2848
2025-= 04-28T17:45:39Z UpdateTip: new best=3D1c639e9656dcea7c2c8c694d27bc9dd82bd32= 7bc8c95c4be1d5ec576c99638fe height=3D2848 version=3D0x20000000 log2_work=3D= 12.476240 tx=3D2849 date=3D'2025-04-28T17:50:11Z' progress=3D1.0000= 00 cache=3D0.5MiB(2848txo)
2025-04-28T17:45:39Z CreateNewBlock(): block = weight: 820 txs: 0 fees: 0 sigops 400
2025-04-28T17:45:39Z Saw new heade= r hash=3D1e119d36bcd683d4ff2d10c63b60d33431fd141be5cd20d3b0fd074f036b409a h= eight=3D2849
2025-04-28T17:45:39Z UpdateTip: new best=3D1e119d36bcd683d4= ff2d10c63b60d33431fd141be5cd20d3b0fd074f036b409a height=3D2849 version=3D0x= 20000000 log2_work=3D12.476746 tx=3D2850 date=3D'2025-04-28T17:50:11Z&#= 39; progress=3D1.000000 cache=3D0.5MiB(2849txo)
2025-04-28T17:45:39Z Cre= ateNewBlock(): block weight: 820 txs: 0 fees: 0 sigops 400
2025-04-28T17= :45:39Z [error] TestBlockValidity: Consensus::CheckBlock: bad-txns-vout-too= large, Transaction check failed (tx hash 5802b7370153f8c415fcf689bda204adeb= e4483c306110ae33a35a88a593d495)
2025-04-28T17:49:41Z CreateNewBlock(): b= lock weight: 808 txs: 0 fees: 0 sigops 400
2025-04-28T17:49:41Z [error] = TestBlockValidity: Consensus::CheckBlock: bad-txns-vout-toolarge, Transacti= on check failed (tx hash f9a54543470144efc33e975d02f44188a7a0d88c16fb997018= e33b4e66244f37)
```

And it also failed immediately, after calling= "getblocktemplate".

However, after manually crafting a bl= ock with 21 million coins, it succeeded:

$ ./bitcoin-cli -regtest ge= tblock 627434e2e29fb3409aa9bca6b27b261210b3adf274e6e091da889ece9142901b 0000000209a406b034f07fdb0d320cde51b14fd3134d3603bc6102dffd483d6bc369d111e9= d347f2c3a7114151cdc93c9cccc2f6ce64cf7c1b71bb454d005202c9140d413d5bf0f68ffff= 7f2002000000010200000000010100000000000000000000000000000000000000000000000= 00000000000000000ffffffff0402220b00ffffffff020040075af07507000451024e730000= 000000000000266a24aa21a9ede2f61c3f71d1defd3fa999dfa36953755c690689799962b48= bebd836974e8cf9012000000000000000000000000000000000000000000000000000000000= 0000000000000000

2025-04-28T18:06:27Z Saw new header hash=3D627434e2= e29fb3409aa9bca6b27b261210b3adf274e6e091da889ece9142901b height=3D2850
2= 025-04-28T18:06:27Z UpdateTip: new best=3D627434e2e29fb3409aa9bca6b27b26121= 0b3adf274e6e091da889ece9142901b height=3D2850 version=3D0x20000000 log2_wor= k=3D12.477252 tx=3D2851 date=3D'2025-04-28T17:50:13Z' progress=3D1.= 000000 cache=3D0.5MiB(2850txo)

Which means, that after reaching 21 m= illion coins, that kind of UTXOs will be produced forever. And I guess it w= on't be even possible to send more coins than that in a single transact= ion, which means, that we are quite safe from any kinds of overflows, but w= e are not safe from flooding the UTXO set with max coin amounts.

<= div class=3D"gmail_quote">
pon., 28 kw= i 2025 o 14:47=C2=A0Sjors 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 b= een done before on any network.

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.

Unless and until coin expiration is something we're seriously consideri= ng for mainnet, we'd rather not implement it for testnet.

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't expire.


Something I'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>
CAmount nSubsidy =3D 50 * COIN;
// Subsidy is cut in half every 210,000 blocks which will occur approximate= ly every 4 years.
If (consensusParams.inflation) {
=C2=A0 =C2=A0 // Except on testnet5
=C2=A0 =C2=A0 nSubsidy <<=3D halvings;
} else {
=C2=A0 nSubsidy >>=3D halvings;
}

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.

Rust Bitcoin [0] currently refuses amounts above 21 million BTC, but they w= ould 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-bit= coin/issues/4273

--
You received this message because you are subscribed to the Google Groups &= quot;Bitcoin Development Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to bitcoind= ev+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/ms= gid/bitcoindev/CACgYNOL3gH6zhmNyiKLenqoiM9mydsxs3XExxJX1ZSVvOmX2bA%40mail.g= mail.com.
--000000000000404a9c0633daac4f--