Skip to content

Commit

Permalink
Update default assume valid and minimum chain work params
Browse files Browse the repository at this point in the history
These have been updated according to contrib/devtools/chainparams/README.md.

The assumed valid block for scalenet is left unchanged (9,999 - just below the
planned re-org height of 10,000).

For all other *test* networks, the assumed valid block is still 2,000
below the chain tip at the time of running the make_chainparams script.

For mainnet, it's 10 blocks below chain tip.
Here: mainnet block : 699484

Test plan:
- review (confirm assume hashes using block explorer)
  - note that the minchainwork is +10 (for main) or +2000 blocks from
    that given hash.
- `ninja check`
  • Loading branch information
cculianu committed Aug 5, 2021
1 parent 42aca99 commit 6a358cc
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions contrib/devtools/chainparams/chainparams_main.txt
@@ -1,2 +1,2 @@
000000000000000000673d4febaa98e967d9f1df911f3665e2495285e9c3a82d
0000000000000000000000000000000000000000016480e5f464ea2e12e68a38
0000000000000000030192242425926218184a609a63efee615b7586d7f3972b
000000000000000000000000000000000000000001768829963ed323dbfcc190
4 changes: 2 additions & 2 deletions contrib/devtools/chainparams/chainparams_test.txt
@@ -1,2 +1,2 @@
00000000005b186499815695637db45afa07d3227fff5614be8bd969e8351846
000000000000000000000000000000000000000000000071855a176dfa32d62e
000000000075b31cf81de7986358fca0d007309232e779eaef3ca479825a8664
0000000000000000000000000000000000000000000000735672b6c8d71e440f
4 changes: 2 additions & 2 deletions contrib/devtools/chainparams/chainparams_testnet4.txt
@@ -1,2 +1,2 @@
000000000031fca3b085008f5c8c7b195e293632f11f7ea2fe512744a5aca8cd
00000000000000000000000000000000000000000000000000b957a9d5efce1f
000000000042458f9dd6b5ebae4574ed157c89e4c7126e1eb53263fe71c09786
00000000000000000000000000000000000000000000000000fe5e402a2d2364
12 changes: 6 additions & 6 deletions src/chainparamsconstants.h
Expand Up @@ -9,14 +9,14 @@
#include <uint256.h>

namespace ChainParamsConstants {
const BlockHash MAINNET_DEFAULT_ASSUME_VALID = BlockHash::fromHex("000000000000000000673d4febaa98e967d9f1df911f3665e2495285e9c3a82d");
const uint256 MAINNET_MINIMUM_CHAIN_WORK = uint256S("0000000000000000000000000000000000000000016480e5f464ea2e12e68a38");
const BlockHash MAINNET_DEFAULT_ASSUME_VALID = BlockHash::fromHex("000000000000000000e7f24c197edd6de599d77fc837f630b6f4c6259dfeb4dd");
const uint256 MAINNET_MINIMUM_CHAIN_WORK = uint256S("000000000000000000000000000000000000000001765b047f3c2b0e03d74000");

const BlockHash TESTNET_DEFAULT_ASSUME_VALID = BlockHash::fromHex("00000000005b186499815695637db45afa07d3227fff5614be8bd969e8351846");
const uint256 TESTNET_MINIMUM_CHAIN_WORK = uint256S("000000000000000000000000000000000000000000000071855a176dfa32d62e");
const BlockHash TESTNET_DEFAULT_ASSUME_VALID = BlockHash::fromHex("00000000002e38a0fb71cba3698b4787c9755156668e86dbf495fcd2489b6c62");
const uint256 TESTNET_MINIMUM_CHAIN_WORK = uint256S("000000000000000000000000000000000000000000000073552e09a3b8e92bd5");

const BlockHash TESTNET4_DEFAULT_ASSUME_VALID = BlockHash::fromHex("000000000031fca3b085008f5c8c7b195e293632f11f7ea2fe512744a5aca8cd");
const uint256 TESTNET4_MINIMUM_CHAIN_WORK = uint256S("00000000000000000000000000000000000000000000000000b957a9d5efce1f");
const BlockHash TESTNET4_DEFAULT_ASSUME_VALID = BlockHash::fromHex("00000000000b80e19dfd5e1fe093aa03b7e9d6cb8ce7637de1f2ecbd882bdfeb");
const uint256 TESTNET4_MINIMUM_CHAIN_WORK = uint256S("00000000000000000000000000000000000000000000000000fd01607cbee7e6");

// Scalenet re-organizes above height 10,000 - use block 9,999 hash here.
const BlockHash SCALENET_DEFAULT_ASSUME_VALID = BlockHash::fromHex("000000007fb3362740efd1435aa414f54171993483799782f83c61bc7bf1b1be");
Expand Down

0 comments on commit 6a358cc

Please sign in to comment.