Update assumed chain params #20263

pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:2010-21assumed changing 1 files +20 −20
  1. MarcoFalke commented at 6:49 PM on October 29, 2020: member

    Oh, by the way, the same procedure as last year, Miss Sophie? Same procedure as every year, James.

    See https://github.com/bitcoin/bitcoin/blob/master/doc/release-process.md#before-branch-off

  2. MarcoFalke force-pushed on Oct 29, 2020
  3. MarcoFalke added this to the milestone 0.21.0 on Oct 29, 2020
  4. DrahtBot added the label Validation on Oct 29, 2020
  5. in src/chainparams.cpp:109 in fa0c1b5820 outdated
     104 | @@ -105,8 +105,8 @@ class CMainParams : public CChainParams {
     105 |          pchMessageStart[3] = 0xd9;
     106 |          nDefaultPort = 8333;
     107 |          nPruneAfterHeight = 100000;
     108 | -        m_assumed_blockchain_size = 320;
     109 | -        m_assumed_chain_state_size = 4;
     110 | +        m_assumed_blockchain_size = 350;
     111 | +        m_assumed_chain_state_size = 6;
    


    fanquake commented at 1:34 AM on October 31, 2020:

    6 seems a bit aggressive (my chainstate is 3.9), but it doesn't matter that much, as this is only used for the intro dialog.


    MarcoFalke commented at 8:08 AM on October 31, 2020:

    Mine is almost 5 :man_shrugging:

    $ du -sh ./chainstate/
    4.8G	./chainstate/
    

    darosior commented at 1:00 PM on October 31, 2020:

    Mine is 4, fwiw.


    jonatack commented at 3:03 PM on October 31, 2020:

    3.9 here like @fanquake


    theStack commented at 7:24 PM on November 1, 2020:

    Having 4.0G here for chainstate.


    sipa commented at 8:26 AM on November 2, 2020:

    $ du -sh .bitcoin/chainstate/ 4.0G .bitcoin/chainstate/


    dergoegge commented at 11:43 AM on November 2, 2020:

    Mine is 5.2G

  6. fanquake approved
  7. fanquake commented at 2:03 AM on October 31, 2020: member

    ACK fa0c1b5820d12354d1e31bb561e73165b0adfbac - mainnet, testnet and signet output matches my node.

    mainnet blocks & chainstate size:

    du -sh /Users/michael/Library/Application\ Support/Bitcoin/blocks
    325G	/Users/michael/Library/Application Support/Bitcoin/blocks
    du -sh /Users/michael/Library/Application\ Support/Bitcoin/chainstate 
    3.9G	/Users/michael/Library/Application Support/Bitcoin/chainstate
    

    notes: https://github.com/fanquake/core-review/blob/master/update-assumevalid.md

  8. darosior approved
  9. darosior commented at 1:01 PM on October 31, 2020: member

    ACK fa0c1b5820d12354d1e31bb561e73165b0adfbac mainnet and testnet params.

  10. in src/chainparams.cpp:168 in fa0c1b5820 outdated
     167 | -            /* nTxCount */ 517186863,
     168 | -            /* dTxRate  */ 3.305709665792344,
     169 | +            // Data from RPC: getchaintxstats 4096 0000000000000000000b9d2ec5a352ecba0592946514a92f14319dc2b367fc72
     170 | +            /* nTime    */ 1603995752,
     171 | +            /* nTxCount */ 582083445,
     172 | +            /* dTxRate  */ 3.508976121410527,
    


    jonatack commented at 9:48 AM on November 1, 2020:

    Mainnet chaintxdata seem good:

    $ ./src/bitcoin-cli getchaintxstats 4096 0000000000000000000b9d2ec5a352ecba0592946514a92f14319dc2b367fc72
    {
      "time": 1603995752,
      "txcount": 582083445,
      "window_final_block_hash": "0000000000000000000b9d2ec5a352ecba0592946514a92f14319dc2b367fc72",
      "window_final_block_height": 654683,
      "window_block_count": 4096,
      "window_tx_count": 8995148,
      "window_interval": 2563468,
      "txrate": 3.508976121410527
    }
    
  11. in src/chainparams.cpp:257 in fa0c1b5820 outdated
     256 | -            /* nTxCount */ 13483,
     257 | -            /* dTxRate  */ 0.08523187013249722,
     258 | +            // Data from RPC: getchaintxstats 4096 000000000000006433d1efec504c53ca332b64963c425395515b01977bd7b3b0
     259 | +            /* nTime    */ 1603359686,
     260 | +            /* nTxCount */ 58090238,
     261 | +            /* dTxRate  */ 0.1232886622799463,
    


    jonatack commented at 9:50 AM on November 1, 2020:

    Testnet3 chaintxdata seem good:

    $ ./src/bitcoin-cli -testnet getchaintxstats 4096 000000000000006433d1efec504c53ca332b64963c425395515b01977bd7b3b0
    {
      "time": 1603359686,
      "txcount": 58090238,
      "window_final_block_hash": "000000000000006433d1efec504c53ca332b64963c425395515b01977bd7b3b0",
      "window_final_block_height": 1864000,
      "window_block_count": 4096,
      "window_tx_count": 143148,
      "window_interval": 1161080,
      "txrate": 0.1232886622799463
    }
    
  12. in src/chainparams.cpp:286 in fa0c1b5820 outdated
     286 | -                /* nTxCount */ 5435,
     287 | -                /* dTxRate  */ 0.001898346323372538,
     288 | +                /* nTime    */ 1603986000,
     289 | +                /* nTxCount */ 9582,
     290 | +                /* dTxRate  */ 0.00159272030651341,
     291 |              };
    


    jonatack commented at 9:53 AM on November 1, 2020:

    I have different Signet chaintxdata:

    $ ./src/bitcoin-cli -signet getchaintxstats 4096 00000128807d9175c494e24d805fc7854f7d79aa965cbb128342ad8b70cecfa5
    {
      "time": 1601382000,
      "txcount": 5435,
      "window_final_block_hash": "00000128807d9175c494e24d805fc7854f7d79aa965cbb128342ad8b70cecfa5",
      "window_final_block_height": 5348,
      "window_block_count": 4096,
      "window_tx_count": 4182,
      "window_interval": 2202970,
      "txrate": 0.001898346323372538
    }
    

    (and so different getblockheader data as well)

    $ ./src/bitcoin-cli -signet getblockheader "00000128807d9175c494e24d805fc7854f7d79aa965cbb128342ad8b70cecfa5"
    {
      "hash": "00000128807d9175c494e24d805fc7854f7d79aa965cbb128342ad8b70cecfa5",
      "height": 5348,
      "chainwork": "0000000000000000000000000000000000000000000000000000000d145533ce",
    }
    

    MarcoFalke commented at 1:06 PM on November 1, 2020:

    The comment has not been updated https://github.com/bitcoin/bitcoin/pull/20263/files#r515620099 . Nice find.

  13. jonatack commented at 9:59 AM on November 1, 2020: member

    On mainnet, I see a blockchain size of 326.2 and a chainstate size of 3.9.

    The chaintxdata for me are the same as this PR, except for signet.

  14. in src/chainparams.cpp:95 in fa0c1b5820 outdated
      90 | @@ -91,8 +91,8 @@ class CMainParams : public CChainParams {
      91 |          consensus.vDeployments[Consensus::DEPLOYMENT_TAPROOT].nStartTime = 1199145601; // January 1, 2008
      92 |          consensus.vDeployments[Consensus::DEPLOYMENT_TAPROOT].nTimeout = 1230767999; // December 31, 2008
      93 |  
      94 | -        consensus.nMinimumChainWork = uint256S("0x00000000000000000000000000000000000000000e1ab5ec9348e9f4b8eb8154");
      95 | -        consensus.defaultAssumeValid = uint256S("0x0000000000000000000f2adce67e49b0b6bdeb9de8b7c3d7e93b21e7fc1e819d"); // 623950
      96 | +        consensus.nMinimumChainWork = uint256S("0x00000000000000000000000000000000000000001533efd8d716a517fe2c5008");
      97 | +        consensus.defaultAssumeValid = uint256S("0x0000000000000000000b9d2ec5a352ecba0592946514a92f14319dc2b367fc72"); // 654683
    


    jonatack commented at 11:18 AM on November 1, 2020:

    The mainnet nMinimumChainWork and defaultAssumeValid consensus params match up for me

    $ ./src/bitcoin-cli getblockheader 0000000000000000000b9d2ec5a352ecba0592946514a92f14319dc2b367fc72
    {
     "hash": "0000000000000000000b9d2ec5a352ecba0592946514a92f14319dc2b367fc72",
     "height": 654683,
     "chainwork": "00000000000000000000000000000000000000001533efd8d716a517fe2c5008",
    }
    
  15. in src/chainparams.cpp:208 in fa0c1b5820 outdated
     203 | @@ -204,8 +204,8 @@ class CTestNetParams : public CChainParams {
     204 |          consensus.vDeployments[Consensus::DEPLOYMENT_TAPROOT].nStartTime = 1199145601; // January 1, 2008
     205 |          consensus.vDeployments[Consensus::DEPLOYMENT_TAPROOT].nTimeout = 1230767999; // December 31, 2008
     206 |  
     207 | -        consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000000001495c1d5a01e2af8a23");
     208 | -        consensus.defaultAssumeValid = uint256S("0x000000000000056c49030c174179b52a928c870e6e8a822c75973b7970cfbd01"); // 1692000
     209 | +        consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000000001db6ec4ac88cf2272c6");
     210 | +        consensus.defaultAssumeValid = uint256S("0x000000000000006433d1efec504c53ca332b64963c425395515b01977bd7b3b0"); // 1864000
    


    jonatack commented at 11:22 AM on November 1, 2020:

    Testnet nMinimumChainWork and defaultAssumeValid consensus params match up for me

    $ ./src/bitcoin-cli -testnet getblockheader 000000000000006433d1efec504c53ca332b64963c425395515b01977bd7b3b0
    {
      "hash": "000000000000006433d1efec504c53ca332b64963c425395515b01977bd7b3b0",
      "height": 1864000,
      "chainwork": "0000000000000000000000000000000000000000000001db6ec4ac88cf2272c6",
    }
    
  16. jonatack commented at 11:25 AM on November 1, 2020: member

    ACK for mainnet and testnet, not sure why I have different data for signet.

  17. in src/chainparams.cpp:282 in fa0c1b5820 outdated
     279 | +            consensus.nMinimumChainWork = uint256S("0x00000000000000000000000000000000000000000000000000000019fd16269a");
     280 | +            consensus.defaultAssumeValid = uint256S("0x0000002a1de0f46379358c1fd09906f7ac59adf3712323ed90eb59e4c183c020"); // 9434
     281 |              m_assumed_blockchain_size = 1;
     282 |              m_assumed_chain_state_size = 0;
     283 |              chainTxData = ChainTxData{
     284 |                  // Data from RPC: getchaintxstats 4096 00000128807d9175c494e24d805fc7854f7d79aa965cbb128342ad8b70cecfa5
    


    MarcoFalke commented at 1:05 PM on November 1, 2020:
                    // Data from RPC: getchaintxstats 4096 0000002a1de0f46379358c1fd09906f7ac59adf3712323ed90eb59e4c183c020
    

    The signet comment was not updated

  18. theStack commented at 7:18 PM on November 1, 2020: member

    Verified mainnet, testnet3, signet params via the following commands (starting with block height as first input feels most natural to me):

    $ bitcoin-cli getblockheader $(bitcoin-cli getblockhash 654683) | grep "\"chainwork\|\"hash"
    $ bitcoin-cli getchaintxstats 4096 0000000000000000000b9d2ec5a352ecba0592946514a92f14319dc2b367fc72
    
    $ bitcoin-cli -testnet getblockheader $(bitcoin-cli -testnet getblockhash 1864000) | grep "\"chainwork\|\"hash"
    $ bitcoin-cli -testnet getchaintxstats 4096 000000000000006433d1efec504c53ca332b64963c425395515b01977bd7b3b0
    
    $ bitcoin-cli -signet getblockheader $(bitcoin-cli -signet getblockhash 9434) | grep "\"chainwork\|\"hash"
    $ bitcoin-cli -signet getchaintxstats 4096 0000002a1de0f46379358c1fd09906f7ac59adf3712323ed90eb59e4c183c020
    

    ACK (modulo the getchaintxstats signet comment that has not been updated yet (https://github.com/bitcoin/bitcoin/pull/20263#discussion_r515620099).

  19. Update assumed chain params fa90ba36d3
  20. MarcoFalke force-pushed on Nov 2, 2020
  21. MarcoFalke commented at 9:15 AM on November 2, 2020: member

    I force pushed to fixup the signet comment. Should be easy to re-ACK for those that already ACKed

  22. dergoegge approved
  23. dergoegge commented at 11:41 AM on November 2, 2020: member
  24. jonatack commented at 12:24 PM on November 2, 2020: member

    ACK fa90ba36d3f640ef2d559b69ae1ea99a73da6ac8 per git diff fa0c1b5 fa90ba3 and re-running getblockheader/getblockhash/getchaintxstats on the signet chain

  25. theStack approved
  26. theStack commented at 12:43 PM on November 2, 2020: member

    re-ACK fa90ba36d3f640ef2d559b69ae1ea99a73da6ac8 ✔️

  27. darosior approved
  28. darosior commented at 12:56 PM on November 2, 2020: member

    re-ACK fa90ba36d3f640ef2d559b69ae1ea99a73da6ac8 for mainnet and testnet.

  29. laanwj merged this on Nov 2, 2020
  30. laanwj closed this on Nov 2, 2020

  31. MarcoFalke deleted the branch on Nov 2, 2020
  32. DrahtBot locked this on Feb 15, 2022

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: 2026-04-14 21:14 UTC

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