Skip to content

Commit 3003861

Browse files
committed
Merge bitcoin#28591: kernel: chainparams updates for 26.x
bd71f03 doc: update example pulls in release-process.md (fanquake) b2ede22 headerssync: update params for 26.x (fanquake) f12f92b kernel: update m_assumed_* chain params for 26.x (fanquake) a8c2e5e kernel: update chainTxData for 26.x (fanquake) a9d070a kernel: update nMinimumChainWork & defaultAssumeValid for 26.x (fanquake) Pull request description: Update chainparams pre `26.x` branch off. Note: Remember that some variance is expected in the m_assumed_* sizes. Closes bitcoin#28572. ACKs for top commit: Sjors: re-ACK bd71f03 ajtowns: reACK bd71f03 darosior: re-ACK bd71f03 for assumevalid and minchainwork params. Tree-SHA512: c586b82711477bfc1fd9ac4c9c1130ccde29f75d652492c66ef5730f4a49b7da822a3ad2d9090468ea0c9f0e77d00c25f6a800600c81878d8141ce2ffb3724af
2 parents f467444 + bd71f03 commit 3003861

File tree

4 files changed

+27
-27
lines changed

4 files changed

+27
-27
lines changed

contrib/devtools/headerssync-params.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
# Parameters:
1313

1414
# Aim for still working fine at some point in the future. [datetime]
15-
TIME = datetime(2026, 5, 25)
15+
TIME = datetime(2026, 10, 5)
1616

1717
# Expected block interval. [timedelta]
1818
BLOCK_INTERVAL = timedelta(seconds=600)
1919

2020
# The number of headers corresponding to the minchainwork parameter. [headers]
21-
MINCHAINWORK_HEADERS = 784000
21+
MINCHAINWORK_HEADERS = 804000
2222

2323
# Combined processing bandwidth from all attackers to one victim. [bit/s]
2424
# 6 Gbit/s is approximately the speed at which a single thread of a Ryzen 5950X CPU thread can hash

doc/release-process.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ Release Process
2828

2929
#### Before branch-off
3030

31-
* Update hardcoded [seeds](/contrib/seeds/README.md), see [this pull request](https://github.com/bitcoin/bitcoin/pull/7415) for an example.
31+
* Update hardcoded [seeds](/contrib/seeds/README.md), see [this pull request](https://github.com/bitcoin/bitcoin/pull/27488) for an example.
3232
* Update the following variables in [`src/kernel/chainparams.cpp`](/src/kernel/chainparams.cpp) for mainnet, testnet, and signet:
3333
- `m_assumed_blockchain_size` and `m_assumed_chain_state_size` with the current size plus some overhead (see
3434
[this](#how-to-calculate-assumed-blockchain-and-chain-state-size) for information on how to calculate them).
3535
- The following updates should be reviewed with `reindex-chainstate` and `assumevalid=0` to catch any defect
3636
that causes rejection of blocks in the past history.
3737
- `chainTxData` with statistics about the transaction count and rate. Use the output of the `getchaintxstats` RPC with an
3838
`nBlocks` of 4096 (28 days) and a `bestblockhash` of RPC `getbestblockhash`; see
39-
[this pull request](https://github.com/bitcoin/bitcoin/pull/20263) for an example. Reviewers can verify the results by running
39+
[this pull request](https://github.com/bitcoin/bitcoin/pull/28591) for an example. Reviewers can verify the results by running
4040
`getchaintxstats <window_block_count> <window_final_block_hash>` with the `window_block_count` and `window_final_block_hash` from your output.
4141
- `defaultAssumeValid` with the output of RPC `getblockhash` using the `height` of `window_final_block_height` above
4242
(and update the block height comment with that height), taking into account the following:
@@ -45,7 +45,7 @@ Release Process
4545
- `nMinimumChainWork` with the "chainwork" value of RPC `getblockheader` using the same height as that selected for the previous step.
4646
* Consider updating the headers synchronization tuning parameters to account for the chainparams updates.
4747
The optimal values change very slowly, so this isn't strictly necessary every release, but doing so doesn't hurt.
48-
- Update configuration variables in [`contrib/devtools/headerssync-params.py`](contrib/devtools/headerssync-params.py):
48+
- Update configuration variables in [`contrib/devtools/headerssync-params.py`](/contrib/devtools/headerssync-params.py):
4949
- Set `TIME` to the software's expected supported lifetime -- after this time, its ability to defend against a high bandwidth timewarp attacker will begin to degrade.
5050
- Set `MINCHAINWORK_HEADERS` to the height used for the `nMinimumChainWork` calculation above.
5151
- Check that the other variables still look reasonable.

src/headerssync.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
// contrib/devtools/headerssync-params.py.
1414

1515
//! Store one header commitment per HEADER_COMMITMENT_PERIOD blocks.
16-
constexpr size_t HEADER_COMMITMENT_PERIOD{600};
16+
constexpr size_t HEADER_COMMITMENT_PERIOD{606};
1717

1818
//! Only feed headers to validation once this many headers on top have been
1919
//! received and validated against commitments.
20-
constexpr size_t REDOWNLOAD_BUFFER_SIZE{14308}; // 14308/600 = ~23.8 commitments
20+
constexpr size_t REDOWNLOAD_BUFFER_SIZE{14441}; // 14441/606 = ~23.8 commitments
2121

2222
// Our memory analysis assumes 48 bytes for a CompressedHeader (so we should
2323
// re-calculate parameters if we compress further)

src/kernel/chainparams.cpp

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ class CMainParams : public CChainParams {
104104
consensus.vDeployments[Consensus::DEPLOYMENT_TAPROOT].nTimeout = 1628640000; // August 11th, 2021
105105
consensus.vDeployments[Consensus::DEPLOYMENT_TAPROOT].min_activation_height = 709632; // Approximately November 12th, 2021
106106

107-
consensus.nMinimumChainWork = uint256S("0x000000000000000000000000000000000000000044a50fe819c39ad624021859");
108-
consensus.defaultAssumeValid = uint256S("0x000000000000000000035c3f0d31e71a5ee24c5aaf3354689f65bd7b07dee632"); // 784000
107+
consensus.nMinimumChainWork = uint256S("0x000000000000000000000000000000000000000052b2559353df4117b7348b64");
108+
consensus.defaultAssumeValid = uint256S("0x00000000000000000001a0a448d6cf2546b06801389cc030b2b18c6491266815"); // 804000
109109

110110
/**
111111
* The message start string is designed to be unlikely to occur in normal data.
@@ -118,8 +118,8 @@ class CMainParams : public CChainParams {
118118
pchMessageStart[3] = 0xd9;
119119
nDefaultPort = 8333;
120120
nPruneAfterHeight = 100000;
121-
m_assumed_blockchain_size = 540;
122-
m_assumed_chain_state_size = 7;
121+
m_assumed_blockchain_size = 590;
122+
m_assumed_chain_state_size = 9;
123123

124124
genesis = CreateGenesisBlock(1231006505, 2083236893, 0x1d00ffff, 1, 50 * COIN);
125125
consensus.hashGenesisBlock = genesis.GetHash();
@@ -177,10 +177,10 @@ class CMainParams : public CChainParams {
177177
};
178178

179179
chainTxData = ChainTxData{
180-
// Data from RPC: getchaintxstats 4096 000000000000000000035c3f0d31e71a5ee24c5aaf3354689f65bd7b07dee632
181-
.nTime = 1680665245,
182-
.nTxCount = 820876044,
183-
.dTxRate = 3.672283614033389,
180+
// Data from RPC: getchaintxstats 4096 00000000000000000001a0a448d6cf2546b06801389cc030b2b18c6491266815
181+
.nTime = 1692502494,
182+
.nTxCount = 881818374,
183+
.dTxRate = 5.521964628130412,
184184
};
185185
}
186186
};
@@ -222,8 +222,8 @@ class CTestNetParams : public CChainParams {
222222
consensus.vDeployments[Consensus::DEPLOYMENT_TAPROOT].nTimeout = 1628640000; // August 11th, 2021
223223
consensus.vDeployments[Consensus::DEPLOYMENT_TAPROOT].min_activation_height = 0; // No activation delay
224224

225-
consensus.nMinimumChainWork = uint256S("0x000000000000000000000000000000000000000000000977edb0244170858d07");
226-
consensus.defaultAssumeValid = uint256S("0x0000000000000021bc50a89cde4870d4a81ffe0153b3c8de77b435a2fd3f6761"); // 2429000
225+
consensus.nMinimumChainWork = uint256S("0x000000000000000000000000000000000000000000000b6a51f415a67c0da307");
226+
consensus.defaultAssumeValid = uint256S("0x0000000000000093bcb68c03a9a168ae252572d348a2eaeba2cdf9231d73206f"); // 2500000
227227

228228
pchMessageStart[0] = 0x0b;
229229
pchMessageStart[1] = 0x11;
@@ -276,10 +276,10 @@ class CTestNetParams : public CChainParams {
276276
};
277277

278278
chainTxData = ChainTxData{
279-
// Data from RPC: getchaintxstats 4096 0000000000000021bc50a89cde4870d4a81ffe0153b3c8de77b435a2fd3f6761
280-
.nTime = 1681542696,
281-
.nTxCount = 65345929,
282-
.dTxRate = 0.09855282814711661,
279+
// Data from RPC: getchaintxstats 4096 0000000000000093bcb68c03a9a168ae252572d348a2eaeba2cdf9231d73206f
280+
.nTime = 1694733634,
281+
.nTxCount = 66484552,
282+
.dTxRate = 0.1804908356632494,
283283
};
284284
}
285285
};
@@ -302,15 +302,15 @@ class SigNetParams : public CChainParams {
302302
vSeeds.emplace_back("178.128.221.177");
303303
vSeeds.emplace_back("v7ajjeirttkbnt32wpy3c6w3emwnfr3fkla7hpxcfokr3ysd3kqtzmqd.onion:38333");
304304

305-
consensus.nMinimumChainWork = uint256S("0x000000000000000000000000000000000000000000000000000001899d8142b0");
306-
consensus.defaultAssumeValid = uint256S("0x0000004429ef154f7e00b4f6b46bfbe2d2678ecd351d95bbfca437ab9a5b84ec"); // 138000
305+
consensus.nMinimumChainWork = uint256S("0x000000000000000000000000000000000000000000000000000001ad46be4862");
306+
consensus.defaultAssumeValid = uint256S("0x0000013d778ba3f914530f11f6b69869c9fab54acff85acd7b8201d111f19b7f"); // 150000
307307
m_assumed_blockchain_size = 1;
308308
m_assumed_chain_state_size = 0;
309309
chainTxData = ChainTxData{
310-
// Data from RPC: getchaintxstats 4096 0000004429ef154f7e00b4f6b46bfbe2d2678ecd351d95bbfca437ab9a5b84ec
311-
.nTime = 1681127428,
312-
.nTxCount = 2226359,
313-
.dTxRate = 0.006424463050600656,
310+
// Data from RPC: getchaintxstats 4096 0000013d778ba3f914530f11f6b69869c9fab54acff85acd7b8201d111f19b7f
311+
.nTime = 1688366339,
312+
.nTxCount = 2262750,
313+
.dTxRate = 0.003414084572046456,
314314
};
315315
} else {
316316
bin = *options.challenge;

0 commit comments

Comments
 (0)