diff --git a/contrib/devtools/chainparams/README.md b/contrib/devtools/chainparams/README.md new file mode 100644 --- /dev/null +++ b/contrib/devtools/chainparams/README.md @@ -0,0 +1,32 @@ +# Chainparams Constants + +Utilities to generate chainparams constants that are compiled into the client +(see [src/chainparamsconstants.h](/src/chainparamsconstants.h). + +The chainparams constants are fetched from bitcoind, dumped to intermediate +files, and then compiled into [src/chainparamsconstants.h](/src/chainparamsconstants.h). +If you're running bitcoind locally, the following instructions will work +out-of-the-box: + +## Mainnet +``` +bitcoind +make_chainparams > chainparams_main.txt +``` + +## Testnet +``` +bitcoind --testnet +make_chainparams --testnet -a 127.0.0.1:18332 > chainparams_test.txt +``` + +## Build C++ Header File +``` +generate_chainparams_constants.py . > ../../../src/chainparamsconstants.h +``` + +## Testing + +Updating these constants should be reviewed carefully, with a +reindex-chainstate, checkpoints=0, and assumevalid=0 to catch any defect that +causes rejection of blocks in the past history. diff --git a/doc/release-process.md b/doc/release-process.md --- a/doc/release-process.md +++ b/doc/release-process.md @@ -21,13 +21,7 @@ - Update [bips.md](/doc/bips.md) to account for changes since the last release. - (major releases) Update [`BLOCK_CHAIN_SIZE`](/src/qt/intro.cpp) to the current size plus some overhead. - - Update `src/chainparams.cpp` defaultAssumeValid and nMinimumChainWork with information from - the getblockhash rpc. - - The selected value must not be orphaned so it may be useful to set the value two blocks back - from the tip. - - Testnet should be set some tens of thousands back from the tip due to reorgs there. - - This update should be reviewed with a reindex-chainstate with assumevalid=0 to catch any defect - that causes rejection of blocks in the past history. + - Update `src/chainparamsconstants.h` per [contrib/devtools/chainparams/README.md](contrib/devtools/chainparams/README.md) - Regenerate manpages (run `contrib/devtools/gen-manpages.sh`, or for out-of-tree builds run `BUILDDIR=$PWD/build contrib/devtools/gen-manpages.sh`). - Update seeds as per [contrib/seeds/README.md](/contrib/seeds/README.md).