Update chain parameters for upcoming major release. See doc/release-process.md and #24418 for review instructions.
fixes #25921
Update chain parameters for upcoming major release. See doc/release-process.md and #24418 for review instructions.
fixes #25921
167 | @@ -168,10 +168,10 @@ class CMainParams : public CChainParams { 168 | }; 169 | 170 | chainTxData = ChainTxData{ 171 | - // Data from RPC: getchaintxstats 4096 000000000000000000052d314a259755ca65944e68df6b12a067ea8f1f5a7091 172 | - /* nTime */ 1645542140, 173 | - /* nTxCount */ 712531200, 174 | - /* dTxRate */ 2.891036496010309, 175 | + // Data from RPC: getchaintxstats 4096 00000000000000000009c97098b5295f7e5f183ac811fb5d1534040adb93cabd 176 | + /* nTime */ 1661697692,
. nTime = 1661697692,
nit: I think you can use designated initializers now
done
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--174a7506f384e20aa4161008e828411d-->
Reviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
Approach ACK 0d3f35de4211287efb8e547fd32f74ea5d41fcfe
Compared chain params with my local chains:
Compared m_assumed_blockchain_size and m_assumed_chain_state_size: ?
<details>
$ du -sh *
4,0K banlist.dat
4,0K banlist.json
4,0K bitcoin.conf
4,0K bitcoind.pid
450G blocks
4,8G chainstate
11M debug.log
244K fee_estimates.dat
7,0M mempool.dat
4,0K onion_v3_private_key
3,0M peers.dat
4,0K settings.json
$ python -c "print(450 * 1.1)"
495.00000000000006
$ python -c "print(4.8 * 1.1)"
5.28
</details>
Not sure where the difference of 1 to 496 for m_assumed_blockchain_size comes from but close, I guess.
Rounding 5.28 up would lead to 6 for m_assumed_chain_state_size.
Compared ChainTxData: OK
<details>
$ bitcoin-cli getchaintxstats 4096 00000000000000000009c97098b5295f7e5f183ac811fb5d1534040adb93cabd
{
"time": 1661697692,
"txcount": 760120522,
"window_final_block_hash": "00000000000000000009c97098b5295f7e5f183ac811fb5d1534040adb93cabd",
"window_final_block_height": 751565,
"window_block_count": 4096,
"window_tx_count": 6886667,
"window_interval": 2353770,
"txrate": 2.925802860942233
}
</details>
Compared nMinimumChainWork: OK
<details>
$ bitcoin-cli getblockheader 00000000000000000009c97098b5295f7e5f183ac811fb5d1534040adb93cabd
{
"hash": "00000000000000000009c97098b5295f7e5f183ac811fb5d1534040adb93cabd",
"confirmations": 310,
"height": 751565,
"version": 541065216,
"versionHex": "20400000",
"merkleroot": "d221de9319a48dc8556d7df26a4904fe187606c79609264bd66acbbbef1b94bf",
"time": 1661697692,
"mediantime": 1661693980,
"nonce": 1083113272,
"bits": "1709ed88",
"difficulty": 28351606743493.77,
"chainwork": "00000000000000000000000000000000000000003404ba0801921119f903495e",
"nTx": 1404,
"previousblockhash": "00000000000000000000f88dbf90c562b384e38b2df2b75c53f47d6abfd74781",
"nextblockhash": "00000000000000000008ae3601b900bf442c108ccee05e8ddacb1c2fcc3f2928"
}
</details>
Compared m_assumed_blockchain_size and m_assumed_chain_state_size: ?
<details>
$ du -sh testnet3/
32G testnet3/
$ python -c "print(32 * 1.1)"
35.2
$ du -sh testnet3/chainstate/
1,5G testnet3/chainstate/
$ python -c "print(1.5 * 1.1)"
1.6500000000000001
</details>
Why 42 for m_assumed_blockchain_size? I would have set it to 35 or 36. But maybe there is something wrong with my node, since the previous value was already 40. I did IBD from test net yesterday.
2 for m_assumed_chain_state_size is okay due to rounding up.
Compared ChainTxData: OK
<details>
$ bitcoin-cli getchaintxstats 4096 0000000000000004877fa2d36316398528de4f347df2f8a96f76613a298ce060
{
"time": 1661705221,
"txcount": 63531852,
"window_final_block_hash": "0000000000000004877fa2d36316398528de4f347df2f8a96f76613a298ce060",
"window_final_block_height": 2344474,
"window_block_count": 4096,
"window_tx_count": 122163,
"window_interval": 1132062,
"txrate": 0.1079119341520164
}
</details>
Compared nMinimumChainWork: OK
<details>
$ bitcoin-cli getblockheader 0000000000000004877fa2d36316398528de4f347df2f8a96f76613a298ce060
{
"hash": "0000000000000004877fa2d36316398528de4f347df2f8a96f76613a298ce060",
"confirmations": 306,
"height": 2344474,
"version": 754475008,
"versionHex": "2cf86000",
"merkleroot": "3455093eee84e11b115e724df0eb032fe7c50bf21c95a0b294cbac93713632d3",
"time": 1661705221,
"mediantime": 1661701618,
"nonce": 773522042,
"bits": "1939f2c0",
"difficulty": 74116169.84175669,
"chainwork": "00000000000000000000000000000000000000000000076f6e7cbd0beade5d20",
"nTx": 73,
"previousblockhash": "000000000000002dd614890d5ef76b5b9c43dda7b1b7689325545bf768f55a08",
"nextblockhash": "0000000000000032370212d9daeafb6e6db7728716e53b2e273421b68240bf09"
}
Don't forget that this update should be reviewed with reindex-chainstate and assumevalid=0 to catch any issue causing rejection of blocks in the past history. I did it that for the last release and it took around 10 days on my laptop (2 x 2500 GHz), so if anyone plans to do it, don't hesitate to get started ;)
106 | @@ -107,7 +107,7 @@ class CMainParams : public CChainParams { 107 | pchMessageStart[3] = 0xd9; 108 | nDefaultPort = 8333; 109 | nPruneAfterHeight = 100000; 110 | - m_assumed_blockchain_size = 460; 111 | + m_assumed_blockchain_size = 496;
Between three machine I get 449, 451 and 459 GB for the blocks dir, using du -h (blocks + chainstate dir). Multiplied by 1.1 that would make between 494 and 505 GB. So based on the methodology used in 23.0 your pick of 496 looks correct to me.
The instructions are outdated compared to what @laanwj did last time.
167 | @@ -168,10 +168,10 @@ class CMainParams : public CChainParams { 168 | }; 169 | 170 | chainTxData = ChainTxData{ 171 | - // Data from RPC: getchaintxstats 4096 000000000000000000052d314a259755ca65944e68df6b12a067ea8f1f5a7091 172 | - /* nTime */ 1645542140, 173 | - /* nTxCount */ 712531200, 174 | - /* dTxRate */ 2.891036496010309, 175 | + // Data from RPC: getchaintxstats 4096 00000000000000000009c97098b5295f7e5f183ac811fb5d1534040adb93cabd 176 | + .nTime = 1661697692,
That's indeed a nicer way to format this.
tACK 767d825e27b452d6e846280256e5932e906da44d
Verified data using existing nodes and ran a full sync with -assumevalid=0 -minimumchainwork=00000000000000000000000000000000000000003404ba0801921119f903495e on a recent version of master now (and without checkpoints, for good measure, see #25725). Update, note to self: don't forget to set -dbcache to some big number if you don't want to wait forever.
Also ran a full sync on signet and testnet.
223 | pchMessageStart[2] = 0x09; 224 | pchMessageStart[3] = 0x07; 225 | nDefaultPort = 18333; 226 | nPruneAfterHeight = 1000; 227 | - m_assumed_blockchain_size = 40; 228 | + m_assumed_blockchain_size = 42;
On my node, it's only 32 GB. With 10% buffer, that's only 35.2, so this probably doesn't need to updated?
$ du -h --exclude=wallets --exclude=indexes testnet3/ 04:23:29 PM
188K testnet3/database
335M testnet3/blocks/index
30G testnet3/blocks
1.5G testnet3/chainstate
32G testnet3/
I also get 29G for the blocks, plus 0.5 for blocks/index. That's on a freshly synced node. Perhaps a node that went through many reorgs uses a bit more.
utACK 767d825e27b452d6e846280256e5932e906da44d