chainparams: Update with data from assumed valid chain #13794

pull MarcoFalke wants to merge 2 commits into bitcoin:master from MarcoFalke:Mf1808-chainDataAssumedValid changing 2 files +15 −16
  1. MarcoFalke commented at 5:32 PM on July 29, 2018: member

    Can be reviewed by using the getblock and getchaintxstats rpcs of a synced node. Reviewers get extra points when their full node has checkpoints and assumevalid disabled.

  2. chainparams: Update with data from assumed valid chain fa6094f152
  3. MarcoFalke added the label Validation on Jul 29, 2018
  4. MarcoFalke added this to the milestone 0.17.0 on Jul 29, 2018
  5. gmaxwell commented at 7:02 PM on July 29, 2018: contributor

    ACK mainnet work and assumevalid. Didn't check txdata or testnet.

  6. laanwj commented at 6:05 PM on July 30, 2018: member

    utACK fa6094f1529ccb8068db06c63a0fecebb3f82583

    mainnet

    user@medea:~ % cli getchaintxstats null "0000000000000000002e63058c023a9a1de233554f28c7b21380b6c9003f36a8"
    {
      "time": 1532884444,  // matches chainTxData
      "txcount": 331282217, // matches chainTxData
      "window_final_block_hash": "0000000000000000002e63058c023a9a1de233554f28c7b21380b6c9003f36a8",
      "window_block_count": 4320,
      "window_tx_count": 5864112,
      "window_interval": 2477828,
      "txrate": 2.366634003651585 // matches chainTxData
    }
    user@medea:~ % cli getblock 0000000000000000002e63058c023a9a1de233554f28c7b21380b6c9003f36a8
    {
    …
      // matches consensus.nMinimumChainWork
      "chainwork": "0000000000000000000000000000000000000000028822fef1c230963535a90d", 
    …
    }
    

    testnet

    $ src/bitcoin-cli -testnet getchaintxstats 4096 "0000000000000037
    a8cd3e06cd5edbfe9dd1dbcc5dacab279376ef7cfc2b4c75"
    {
      "time": 1531929919, // matches chainTxData.nTime
      "txcount": 19438708, // matches chainTxData.nTxCount
      "window_final_block_hash": "0000000000000037a8cd3e06cd5edbfe9dd1dbcc5dacab279376ef7cfc2b4c75",
      "window_block_count": 4096,
      "window_tx_count": 748540,
      "window_interval": 1195539,
      "txrate": 0.6261109006063373 // matches chainTxData.dTxRate
    }
    $ src/bitcoin-cli -testnet getblock 0000000000000037a8cd3e06cd5ed
    bfe9dd1dbcc5dacab279376ef7cfc2b4c75
    {
    …
      // mismatches nMinimumChainWork (which is 00000000000000000000000000000000000000000000007dbe94253893cbd463)
     "chainwork": "00000000000000000000000000000000000000000000006b4a51a422c1537821",
    …
    }
    
  7. in src/chainparams.cpp:173 in fa6094f152 outdated
     169 | @@ -170,11 +170,10 @@ class CMainParams : public CChainParams {
     170 |          };
     171 |  
     172 |          chainTxData = ChainTxData{
     173 | -            // Data as of block 0000000000000000002d6cca6761c99b3c2e936f9a0e304b7c7651a993f461de (height 506081).
     174 | -            1516903077, // * UNIX timestamp of last known number of transactions
     175 | -            295363220,  // * total number of transactions between genesis and that timestamp
     176 | -                        //   (the tx=... number in the ChainStateFlushed debug.log lines)
     177 | -            3.5         // * estimated number of transactions per second after that timestamp
     178 | +            // Data from rpc: getchaintxstats 4096 0000000000000037a8cd3e06cd5edbfe9dd1dbcc5dacab279376ef7cfc2b4c75
    


    achow101 commented at 6:57 PM on July 30, 2018:

    The blockhash in the comment is wrong. It should be 0000000000000000002e63058c023a9a1de233554f28c7b21380b6c9003f36a8

  8. in src/chainparams.cpp:219 in fa6094f152 outdated
     215 | @@ -217,10 +216,10 @@ class CTestNetParams : public CChainParams {
     216 |          consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nTimeout = 1493596800; // May 1st 2017
     217 |  
     218 |          // The best chain should have at least this much work.
     219 | -        consensus.nMinimumChainWork = uint256S("0x00000000000000000000000000000000000000000000002830dab7f76dbb7d63");
     220 | +        consensus.nMinimumChainWork = uint256S("0x00000000000000000000000000000000000000000000007dbe94253893cbd463");
    


    achow101 commented at 7:01 PM on July 30, 2018:

    The chainwork I get at block 1354312 is 00000000000000000000000000000000000000000000006b4a51a422c1537821. However getblockchaininfo reports a higher chainwork (currently at block 1356214) so I guess this is fine.

  9. achow101 commented at 7:03 PM on July 30, 2018: member

    ACK fa6094f1529ccb8068db06c63a0fecebb3f82583

    I have verified that the mainnet parameters match the expected values.

    The testnet ones mostly match, except for the chainwork. However I think that is find as getblockchaininfo has a higher value for chainwork anyways. I assume that the chainwork value was taken from getblockchaininfo at the time of the commit rather than the chainwork of the assumevalid block.

  10. doc: Fix chainTxData comment fa8f2d826c
  11. MarcoFalke commented at 7:51 PM on July 30, 2018: member

    Fixed the block hash in the comment pointed out by @achow101 and pushed as a new "doc" commit to not touch the previous commit/review.

  12. laanwj commented at 4:50 AM on July 31, 2018: member

    Checked testnet, found only the same mismatch for nMinimumChainWork that @achow101 did, but yes I think that's ok.

  13. laanwj merged this on Jul 31, 2018
  14. laanwj closed this on Jul 31, 2018

  15. laanwj referenced this in commit 8ce55df70d on Jul 31, 2018
  16. MarcoFalke deleted the branch on Jul 31, 2018
  17. Sjors commented at 2:10 PM on August 2, 2018: member
    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA256
    
    Post merge ACK fa8f2d826c7ed90c164cfc039d97ce2fa95d1914 for main chain, no bonus points:
    
    bitcoin-cli getchaintxstats null "0000000000000000002e63058c023a9a1de233554f28c7b21380b6c9003f36a8"
    {
      "time": 1532884444,
      "txcount": 331282217,
      "window_final_block_hash": "0000000000000000002e63058c023a9a1de233554f28c7b21380b6c9003f36a8",
      "window_block_count": 4320,
      "window_tx_count": 5864112,
      "window_interval": 2477828,
      "txrate": 2.366634003651585
    }
    
    bitcoin-cli getblock 0000000000000000002e63058c023a9a1de233554f28c7b21380b6c9003f36a8
    ...
      "chainwork": "0000000000000000000000000000000000000000028822fef1c230963535a90d",
    ...
    -----BEGIN PGP SIGNATURE-----
    
    iQIzBAEBCAAdFiEE7ZvfetalXiMuhFJCV/+b28wwEAkFAltjEKUACgkQV/+b28ww
    EAkXJBAAhUSEBUx8AZfOssrKmQJEAemAsfEbWkQEgg0Uf9h9MtD9rPjXMuyGA/UG
    AJKGDo6Dkn9/7db8YojyB+2o47wHOXyhRKqlZDZp3vm5yYWiluBVYw3oN1erN3sh
    3M2VxV/VQPahEb93n1QgAsielwHa35sL5UblJnMV2osDk3C/7DHuh2igJHblb2bZ
    Wqn//cPyQc4sAjbIxwgAd58M6hvDgMlmkP2d0fwsvuwlQ9H4G22YcN3ev1amAChG
    1Fvtw2bbyS9VJewf866gPXFnTqlCWTbkFmKn8Mfr5hFo8jALc7Y0WMW3NgQHs7i/
    rDowOJFZbKSQzsfSjgGlUojO68GUQc5P3ZMvT0VcUIi2Y7P8U+HxLfoKef2dXPnH
    VXY5n6oysxBzGoKaHWyLvLzftAY43fjzQeXbZ4bsp6cvODKRZWpd0sM2we9d5tru
    pSr/PJajP10WOn4C5qPLUCWiTk1A5uTAAgQUkp+vMuiJwgT01DIrFnVbqRKROH5p
    Pp3fzsDaVd2tCtsaO7H4wdSgY4PC6D+LnCI02//CEY8TafRiaRm1Kb4wR6lX+stO
    /PpbpxJRICjO0Pa64U8RtZ/1Q3lejGzu4FIuYMVUz3485EgFE41v4B0tls+UJTJe
    OVh7quUiP8JHeSgjTnX0dLWu9HtiOTxB76QzINHONaStPUbILzE=
    =wzx0
    -----END PGP SIGNATURE-----
    
  18. MarcoFalke locked this on Sep 8, 2021

Milestone
0.17.0


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-17 06:15 UTC

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