Update chainparams for 24.0 release #25946

pull ux3257 wants to merge 1 commits into bitcoin:master from ux3257:chainparams24 changing 1 files +20 −20
  1. ux3257 commented at 5:34 pm on August 28, 2022: contributor

    Update chain parameters for upcoming major release. See doc/release-process.md and #24418 for review instructions.

    fixes #25921

  2. in src/chainparams.cpp:172 in 0d3f35de42 outdated
    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,
    


    MarcoFalke commented at 6:42 am on August 29, 2022:
    0            . nTime    = 1661697692,
    

    nit: I think you can use designated initializers now


    ux3257 commented at 12:21 pm on August 31, 2022:
    done
  3. MarcoFalke added this to the milestone 24.0 on Aug 29, 2022
  4. DrahtBot commented at 7:29 am on August 29, 2022: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #24737 (Remove taproot chain param by MarcoFalke)

    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.

  5. ekzyis commented at 4:50 pm on August 30, 2022: none

    Approach ACK 0d3f35de4211287efb8e547fd32f74ea5d41fcfe

    Compared chain params with my local chains:

    main

    Compared m_assumed_blockchain_size and m_assumed_chain_state_size: ?

     0$ du -sh *
     14,0K	banlist.dat
     24,0K	banlist.json
     34,0K	bitcoin.conf
     44,0K	bitcoind.pid
     5450G	blocks
     64,8G	chainstate
     711M	debug.log
     8244K	fee_estimates.dat
     97,0M	mempool.dat
    104,0K	onion_v3_private_key
    113,0M	peers.dat
    124,0K	settings.json
    13$ python -c "print(450 * 1.1)"
    14495.00000000000006
    15$ python -c "print(4.8 * 1.1)"
    165.28
    

    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

     0$ bitcoin-cli getchaintxstats 4096 00000000000000000009c97098b5295f7e5f183ac811fb5d1534040adb93cabd
     1{
     2  "time": 1661697692,
     3  "txcount": 760120522,
     4  "window_final_block_hash": "00000000000000000009c97098b5295f7e5f183ac811fb5d1534040adb93cabd",
     5  "window_final_block_height": 751565,
     6  "window_block_count": 4096,
     7  "window_tx_count": 6886667,
     8  "window_interval": 2353770,
     9  "txrate": 2.925802860942233
    10}
    

    Compared nMinimumChainWork: OK

     0$ bitcoin-cli getblockheader 00000000000000000009c97098b5295f7e5f183ac811fb5d1534040adb93cabd
     1{
     2  "hash": "00000000000000000009c97098b5295f7e5f183ac811fb5d1534040adb93cabd",
     3  "confirmations": 310,
     4  "height": 751565,
     5  "version": 541065216,
     6  "versionHex": "20400000",
     7  "merkleroot": "d221de9319a48dc8556d7df26a4904fe187606c79609264bd66acbbbef1b94bf",
     8  "time": 1661697692,
     9  "mediantime": 1661693980,
    10  "nonce": 1083113272,
    11  "bits": "1709ed88",
    12  "difficulty": 28351606743493.77,
    13  "chainwork": "00000000000000000000000000000000000000003404ba0801921119f903495e",
    14  "nTx": 1404,
    15  "previousblockhash": "00000000000000000000f88dbf90c562b384e38b2df2b75c53f47d6abfd74781",
    16  "nextblockhash": "00000000000000000008ae3601b900bf442c108ccee05e8ddacb1c2fcc3f2928"
    17}
    

    testnet3

    Compared m_assumed_blockchain_size and m_assumed_chain_state_size: ?

    0$ du -sh testnet3/
    132G	testnet3/
    2$ python -c "print(32 * 1.1)"
    335.2
    4$ du -sh testnet3/chainstate/
    51,5G	testnet3/chainstate/
    6$ python -c "print(1.5 * 1.1)"
    71.6500000000000001
    

    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

     0$ bitcoin-cli getchaintxstats 4096 0000000000000004877fa2d36316398528de4f347df2f8a96f76613a298ce060
     1{
     2  "time": 1661705221,
     3  "txcount": 63531852,
     4  "window_final_block_hash": "0000000000000004877fa2d36316398528de4f347df2f8a96f76613a298ce060",
     5  "window_final_block_height": 2344474,
     6  "window_block_count": 4096,
     7  "window_tx_count": 122163,
     8  "window_interval": 1132062,
     9  "txrate": 0.1079119341520164
    10}
    

    Compared nMinimumChainWork: OK

     0$ bitcoin-cli getblockheader 0000000000000004877fa2d36316398528de4f347df2f8a96f76613a298ce060
     1{
     2  "hash": "0000000000000004877fa2d36316398528de4f347df2f8a96f76613a298ce060",
     3  "confirmations": 306,
     4  "height": 2344474,
     5  "version": 754475008,
     6  "versionHex": "2cf86000",
     7  "merkleroot": "3455093eee84e11b115e724df0eb032fe7c50bf21c95a0b294cbac93713632d3",
     8  "time": 1661705221,
     9  "mediantime": 1661701618,
    10  "nonce": 773522042,
    11  "bits": "1939f2c0",
    12  "difficulty": 74116169.84175669,
    13  "chainwork": "00000000000000000000000000000000000000000000076f6e7cbd0beade5d20",
    14  "nTx": 73,
    15  "previousblockhash": "000000000000002dd614890d5ef76b5b9c43dda7b1b7689325545bf768f55a08",
    16  "nextblockhash": "0000000000000032370212d9daeafb6e6db7728716e53b2e273421b68240bf09"
    17}
    
  6. ux3257 force-pushed on Aug 31, 2022
  7. jonatack commented at 12:23 pm on August 31, 2022: contributor
    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 ;)
  8. Update chainparams for 24.0 release 767d825e27
  9. ux3257 force-pushed on Aug 31, 2022
  10. in src/chainparams.cpp:110 in 767d825e27
    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;
    


    Sjors commented at 2:41 pm on August 31, 2022:

    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.

  11. in src/chainparams.cpp:172 in 767d825e27
    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,
    


    Sjors commented at 2:46 pm on August 31, 2022:
    That’s indeed a nicer way to format this.
  12. Sjors approved
  13. Sjors commented at 3:43 pm on August 31, 2022: member

    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.

  14. in src/chainparams.cpp:225 in 767d825e27
    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;
    


    achow101 commented at 8:24 pm on August 31, 2022:

    On my node, it’s only 32 GB. With 10% buffer, that’s only 35.2, so this probably doesn’t need to updated?

    0$ du -h --exclude=wallets --exclude=indexes testnet3/                                                                                                  04:23:29 PM
    1188K	testnet3/database
    2335M	testnet3/blocks/index
    330G	testnet3/blocks
    41.5G	testnet3/chainstate
    532G	testnet3/
    

    Sjors commented at 8:16 am on September 1, 2022:
    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.
  15. achow101 commented at 8:29 pm on August 31, 2022: member
    utACK 767d825e27b452d6e846280256e5932e906da44d
  16. MarcoFalke merged this on Sep 6, 2022
  17. MarcoFalke closed this on Sep 6, 2022

  18. bitcoin locked this on Sep 6, 2023

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-21 18:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me