kernel: pre-29.x chainparams and headerssync update #31978

pull glozow wants to merge 4 commits into bitcoin:master from glozow:2025-03-v29-chainparams changing 3 files +34 −34
  1. glozow commented at 9:13 pm on March 3, 2025: member
    Update chainparams and headerssync config for v29.0 (see release process).
  2. glozow added the label Validation on Mar 3, 2025
  3. glozow added this to the milestone 29.0 on Mar 3, 2025
  4. DrahtBot commented at 9:13 pm on March 3, 2025: contributor

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

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/31978.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK achow101, Sjors

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #26201 (Remove Taproot activation height by Sjors)

    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. glozow commented at 9:17 pm on March 3, 2025: member
    These are from my nodes except for the mainnet m_assumed_blockchain_size which is from @sr-gi (thanks!)
  6. in src/kernel/chainparams.cpp:134 in 13f2815f4c outdated
    130@@ -131,7 +131,7 @@ class CMainParams : public CChainParams {
    131         pchMessageStart[3] = 0xd9;
    132         nDefaultPort = 8333;
    133         nPruneAfterHeight = 100000;
    134-        m_assumed_blockchain_size = 620;
    135+        m_assumed_blockchain_size = 700;
    


    achow101 commented at 11:28 pm on March 3, 2025:

    In 13f2815f4caca68a3ab0d0b865f370956308cad6 “[kernel] update assumed blockchain and chainstate sizes for v29”

    700 seems a little high, although not too big of a deal I suppose.

    One one node, I have 618 GiB, and on 2 others its 626, so I’d expect 680 or 690 here.


    sr-gi commented at 0:17 am on March 4, 2025:
    I think the exact number was 694, but I’m happy to double check it if needed

    Sjors commented at 10:04 am on March 4, 2025:
    On my existing node du -h returns 681G for the blocks and 12G for the chainstate.

    willcl-ark commented at 11:34 am on March 4, 2025:

    On my existing node du -h returns 681G for the blocks and 12G for the chainstate.

    I also have numbers matching these on my nodes too.

    0bitcoin in ~/.bitcoin ➜ du -h | rg chainstate
    177M     ./signet/chainstate
    212G     ./chainstate
    3bitcoin in ~/.bitcoin ➜ cd /mnt/data/bitcoin/.bitcoin/
    4bitcoin in data/bitcoin/.bitcoin ➜ du -h | rg blocks
    5469M    ./signet/blocks
    6681G    ./blocks
    

    fanquake commented at 2:51 pm on March 4, 2025:
    Yea, 700 or even more here, seems fine here.

    glozow commented at 7:25 pm on March 4, 2025:
    bumped to 720, roughly 5% more than 680
  7. in src/kernel/chainparams.cpp:253 in 13f2815f4c outdated
    249@@ -250,7 +250,7 @@ class CTestNetParams : public CChainParams {
    250         pchMessageStart[3] = 0x07;
    251         nDefaultPort = 18333;
    252         nPruneAfterHeight = 1000;
    253-        m_assumed_blockchain_size = 93;
    254+        m_assumed_blockchain_size = 181;
    


    achow101 commented at 11:29 pm on March 3, 2025:

    In 13f2815f4caca68a3ab0d0b865f370956308cad6 “[kernel] update assumed blockchain and chainstate sizes for v29”

    This seems excessively high, I’d be surprised if testnet3’s datadir size doubled in the past 6 months.

    Across my 3 nodes, I see 111 GiB, 112 GiB, and 116 GiB, so I’d expect this to be 127.


    glozow commented at 2:54 pm on March 4, 2025:
    It is a big jump, but du .bitcoin/testnet3 -h gives me 181G. Let’s see what other people have?

    fanquake commented at 2:55 pm on March 4, 2025:
    I have atleast 154GB, and assume it’s going to end up around the 180GB mark. Given that, it seems this should be something closer to 200?

    achow101 commented at 4:06 pm on March 4, 2025:

    It is a big jump, but du .bitcoin/testnet3 -h gives me 181G. Let’s see what other people have?

    In the past, I’ve done du -csh chainstate/ blocks/ so that indexes, debug.log, and wallets, are not included in the size.

    0du -csh ~/.bitcoin/testnet3/chainstate/ ~/.bitcoin/testnet3/blocks/
    111G	/home/ava/.bitcoin/testnet3/chainstate/
    2101G	/home/ava/.bitcoin/testnet3/blocks/
    3111G	total
    

    fanquake commented at 4:27 pm on March 4, 2025:
    0du -csh testnet3/blocks/ testnet3/chainstate/        
    1167G	testnet3/blocks/
    2 13G	testnet3/chainstate/
    3180G	total
    

    Christewart commented at 6:00 pm on March 4, 2025:
    0du -csh ~/.bitcoin/testnet3/blocks/ ~/.bitcoin/testnet3/chainstate/
    1167G    /home/chris/.bitcoin/testnet3/blocks/
    213G     /home/chris/.bitcoin/testnet3/chainstate/
    3179G    total
    

    glozow commented at 7:24 pm on March 4, 2025:
    bumped to 200, roughly 10% more than 180

    mzumsande commented at 8:36 pm on March 4, 2025:
    0168G	/home/martin/.bitcoin/testnet3/blocks/
    113G	/home/martin/.bitcoin/testnet3/chainstate/
    2181G	total
    

    with a node that is offline 99% of the time and therefore did not experience many of the reorg shenanigans.


    darosior commented at 9:19 pm on March 4, 2025:
    Got 180GiB across blocks and chainstate for testnet3 too.
  8. in src/kernel/chainparams.cpp:352 in 13f2815f4c outdated
    348@@ -349,8 +349,8 @@ class CTestNet4Params : public CChainParams {
    349         pchMessageStart[3] = 0x28;
    350         nDefaultPort = 48333;
    351         nPruneAfterHeight = 1000;
    352-        m_assumed_blockchain_size = 1;
    353-        m_assumed_chain_state_size = 0;
    354+        m_assumed_blockchain_size = 6;
    


    achow101 commented at 11:31 pm on March 3, 2025:

    In 13f2815f4caca68a3ab0d0b865f370956308cad6 “[kernel] update assumed blockchain and chainstate sizes for v29”

    I think this is a bit low.

    Across my 3 nodes, I have 7.8 GiB, 6.2 GiB, and 9.2 GiB, so I’d expect this to be 11.


    glozow commented at 3:04 pm on March 4, 2025:

    Hm, I have 5.9G. IIRC I did a fresh run yesterday, so maybe I don’t have as many reorged blocks?

    But why do you expect 11 and not 9?


    achow101 commented at 4:07 pm on March 4, 2025:
    10% buffer, as stated in the release process doc. 9.2 * 1.1 = 10.12 ~= 11

    glozow commented at 7:24 pm on March 4, 2025:
    bumped to 11
  9. in src/kernel/chainparams.cpp:344 in 92a6f7b238 outdated
    339@@ -340,8 +340,8 @@ class CTestNet4Params : public CChainParams {
    340         consensus.vDeployments[Consensus::DEPLOYMENT_TAPROOT].nTimeout = Consensus::BIP9Deployment::NO_TIMEOUT;
    341         consensus.vDeployments[Consensus::DEPLOYMENT_TAPROOT].min_activation_height = 0; // No activation delay
    342 
    343-        consensus.nMinimumChainWork = uint256{"00000000000000000000000000000000000000000000005faa15d02e6202f3ba"};
    344-        consensus.defaultAssumeValid = uint256{"000000005be348057db991fa5d89fe7c4695b667cfb311391a8db374b6f681fd"}; // 39550
    345+        consensus.nMinimumChainWork = uint256{"0000000000000000000000000000000000000000000001d455d7eda6382f7054"};
    346+        consensus.defaultAssumeValid = uint256{"00000000798bd720800263b69bee01aae57ea376596415a04423da29f000c367"}; // 72513
    


    achow101 commented at 11:34 pm on March 3, 2025:

    In 92a6f7b238cd8ff015e242d6a515452c401133a7 “[kernel] update assumevalid and minimumChainWork for v29”

    This block appears to have been reorged out. Perhaps we should choose a block with actual work for testnet4.


    glozow commented at 3:05 pm on March 4, 2025:
    Oops I shouldn’t have just picked the tip. Now using 72600 which was mined 8 hours ago.
  10. in src/kernel/chainparams.cpp:398 in 70e294c093 outdated
    394@@ -395,10 +395,10 @@ class CTestNet4Params : public CChainParams {
    395         };
    396 
    397         chainTxData = ChainTxData{
    398-            // Data from RPC: getchaintxstats 4096 000000005be348057db991fa5d89fe7c4695b667cfb311391a8db374b6f681fd
    399-            .nTime    = 1723651702,
    400-            .tx_count = 757229,
    401-            .dTxRate  = 0.01570402633472492,
    402+            // Data from RPC: getchaintxstats 4096 00000000798bd720800263b69bee01aae57ea376596415a04423da29f000c367
    


    achow101 commented at 11:37 pm on March 3, 2025:

    In 70e294c0930a412fb6945eb753d1a39ef52fb324 “[kernel] update chainTxData for v29”

    0$ bitcoin-cli -testnet4 getchaintxstats 4096 00000000798bd720800263b69bee01aae57ea376596415a04423da29f000c367
    1error code: -8
    2error message:
    3Block is not in main chain
    

    glozow commented at 3:05 pm on March 4, 2025:
    fixed

    achow101 commented at 6:01 pm on March 4, 2025:

    In 570191a758bc326ae0f0a479b72759f962c0db12 “[kernel] update chainTxData for v29”

    Comment needs to be updated for the block that these stats are for.


    glozow commented at 7:24 pm on March 4, 2025:
    fixed
  11. Sjors commented at 10:18 am on March 4, 2025: member
    I did a mainnet sync using 4475d0babc070a19f3a0ac472304a8c9b87b87d7 and -assumevalid=0 which worked. I verified the chain work for the new assume valid block, as well as the getchaintxstats result and headerssync-params.py.
  12. glozow force-pushed on Mar 4, 2025
  13. [kernel] update assumed blockchain and chainstate sizes for v29 0683b8ebf3
  14. [kernel] update assumevalid and minimumChainWork for v29 80926af8c2
  15. [kernel] update chainTxData for v29 dd23c53258
  16. [headerssync] update headerssync config for v29 11a2d3a63e
  17. glozow force-pushed on Mar 4, 2025
  18. achow101 commented at 7:33 pm on March 4, 2025: member
    ACK 11a2d3a63e90cdc1920ede3c67d52a9c72860e6b
  19. glozow requested review from Sjors on Mar 4, 2025
  20. sipa commented at 8:27 pm on March 4, 2025: member

    EDIT: disregard, my filesystem is compressed, so the numbers are lower than would be expected on a normal system.

    Synced from scratch, on dev-mode build of master on Feb 21, 2025, using du -h --si (note that --si to produce powers-of-1000 based units):

  21. sr-gi commented at 10:29 pm on March 4, 2025: member

    I checked the provided hashes and reported sizes for mainnet, which matches my node’s.

    0du -csh ~/.bitcoin/blocks/ ~/.bitcoin/chainstate/
    1682G	/home/sergi/.bitcoin/blocks/
    212G	/home/sergi/.bitcoin/chainstate/
    3694G	total
    
  22. marcofleon commented at 12:06 pm on March 5, 2025: contributor

    Verified all the values for mainnet after syncing with -assumevalid=0. Also ran the headers sync script and got the same results.

    0du -csh ./blocks ./chainstate 
    1681G	./blocks
    2 11G	./chainstate
    3692G	total
    
  23. sipa commented at 3:01 pm on March 5, 2025: member
    Note that du -h produces 1024-based units, while m_assumed_blockchain_size and m_assumed_chain_state_size expect multiples of 10^9 bytes, which means adding 4.8% to M results, and 7.4% to G results.
  24. Sjors commented at 5:55 pm on March 5, 2025: member

    ACK 11a2d3a63e90cdc1920ede3c67d52a9c72860e6b

    Mainnet params same as my last review except a size bump

    For the test networks, I resynced all of them with -assumevalid=0 and verifed the chain work for the new assume valid block and the getchaintxstats result. I didn’t check the sizes.

  25. fanquake merged this on Mar 6, 2025
  26. fanquake closed this on Mar 6, 2025

  27. darosior commented at 4:50 pm on March 7, 2025: member

    post-merge ACK 11a2d3a63e90cdc1920ede3c67d52a9c72860e6b

    Checked all the parameters but the headersync. Performed an -assumevalid=0 sync on mainnet.


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: 2025-03-31 09:12 UTC

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