mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-02 09:46:52 -05:00
Merge bitcoin/bitcoin#28591: kernel: chainparams updates for 26.x
bd71f03df7
doc: update example pulls in release-process.md (fanquake)b2ede22395
headerssync: update params for 26.x (fanquake)f12f92b813
kernel: update m_assumed_* chain params for 26.x (fanquake)a8c2e5e556
kernel: update chainTxData for 26.x (fanquake)a9d070a6f8
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 #28572. ACKs for top commit: Sjors: re-ACKbd71f03df7
ajtowns: reACKbd71f03df7
darosior: re-ACKbd71f03df7
for assumevalid and minchainwork params. Tree-SHA512: c586b82711477bfc1fd9ac4c9c1130ccde29f75d652492c66ef5730f4a49b7da822a3ad2d9090468ea0c9f0e77d00c25f6a800600c81878d8141ce2ffb3724af
This commit is contained in:
commit
3003861e78
4 changed files with 27 additions and 27 deletions
|
@ -12,13 +12,13 @@ import random
|
|||
# Parameters:
|
||||
|
||||
# Aim for still working fine at some point in the future. [datetime]
|
||||
TIME = datetime(2026, 5, 25)
|
||||
TIME = datetime(2026, 10, 5)
|
||||
|
||||
# Expected block interval. [timedelta]
|
||||
BLOCK_INTERVAL = timedelta(seconds=600)
|
||||
|
||||
# The number of headers corresponding to the minchainwork parameter. [headers]
|
||||
MINCHAINWORK_HEADERS = 784000
|
||||
MINCHAINWORK_HEADERS = 804000
|
||||
|
||||
# Combined processing bandwidth from all attackers to one victim. [bit/s]
|
||||
# 6 Gbit/s is approximately the speed at which a single thread of a Ryzen 5950X CPU thread can hash
|
||||
|
|
|
@ -28,7 +28,7 @@ Release Process
|
|||
|
||||
#### Before branch-off
|
||||
|
||||
* Update hardcoded [seeds](/contrib/seeds/README.md), see [this pull request](https://github.com/bitcoin/bitcoin/pull/7415) for an example.
|
||||
* Update hardcoded [seeds](/contrib/seeds/README.md), see [this pull request](https://github.com/bitcoin/bitcoin/pull/27488) for an example.
|
||||
* Update the following variables in [`src/kernel/chainparams.cpp`](/src/kernel/chainparams.cpp) for mainnet, testnet, and signet:
|
||||
- `m_assumed_blockchain_size` and `m_assumed_chain_state_size` with the current size plus some overhead (see
|
||||
[this](#how-to-calculate-assumed-blockchain-and-chain-state-size) for information on how to calculate them).
|
||||
|
@ -36,7 +36,7 @@ Release Process
|
|||
that causes rejection of blocks in the past history.
|
||||
- `chainTxData` with statistics about the transaction count and rate. Use the output of the `getchaintxstats` RPC with an
|
||||
`nBlocks` of 4096 (28 days) and a `bestblockhash` of RPC `getbestblockhash`; see
|
||||
[this pull request](https://github.com/bitcoin/bitcoin/pull/20263) for an example. Reviewers can verify the results by running
|
||||
[this pull request](https://github.com/bitcoin/bitcoin/pull/28591) for an example. Reviewers can verify the results by running
|
||||
`getchaintxstats <window_block_count> <window_final_block_hash>` with the `window_block_count` and `window_final_block_hash` from your output.
|
||||
- `defaultAssumeValid` with the output of RPC `getblockhash` using the `height` of `window_final_block_height` above
|
||||
(and update the block height comment with that height), taking into account the following:
|
||||
|
@ -45,7 +45,7 @@ Release Process
|
|||
- `nMinimumChainWork` with the "chainwork" value of RPC `getblockheader` using the same height as that selected for the previous step.
|
||||
* Consider updating the headers synchronization tuning parameters to account for the chainparams updates.
|
||||
The optimal values change very slowly, so this isn't strictly necessary every release, but doing so doesn't hurt.
|
||||
- Update configuration variables in [`contrib/devtools/headerssync-params.py`](contrib/devtools/headerssync-params.py):
|
||||
- Update configuration variables in [`contrib/devtools/headerssync-params.py`](/contrib/devtools/headerssync-params.py):
|
||||
- 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.
|
||||
- Set `MINCHAINWORK_HEADERS` to the height used for the `nMinimumChainWork` calculation above.
|
||||
- Check that the other variables still look reasonable.
|
||||
|
|
|
@ -13,11 +13,11 @@
|
|||
// contrib/devtools/headerssync-params.py.
|
||||
|
||||
//! Store one header commitment per HEADER_COMMITMENT_PERIOD blocks.
|
||||
constexpr size_t HEADER_COMMITMENT_PERIOD{600};
|
||||
constexpr size_t HEADER_COMMITMENT_PERIOD{606};
|
||||
|
||||
//! Only feed headers to validation once this many headers on top have been
|
||||
//! received and validated against commitments.
|
||||
constexpr size_t REDOWNLOAD_BUFFER_SIZE{14308}; // 14308/600 = ~23.8 commitments
|
||||
constexpr size_t REDOWNLOAD_BUFFER_SIZE{14441}; // 14441/606 = ~23.8 commitments
|
||||
|
||||
// Our memory analysis assumes 48 bytes for a CompressedHeader (so we should
|
||||
// re-calculate parameters if we compress further)
|
||||
|
|
|
@ -104,8 +104,8 @@ public:
|
|||
consensus.vDeployments[Consensus::DEPLOYMENT_TAPROOT].nTimeout = 1628640000; // August 11th, 2021
|
||||
consensus.vDeployments[Consensus::DEPLOYMENT_TAPROOT].min_activation_height = 709632; // Approximately November 12th, 2021
|
||||
|
||||
consensus.nMinimumChainWork = uint256S("0x000000000000000000000000000000000000000044a50fe819c39ad624021859");
|
||||
consensus.defaultAssumeValid = uint256S("0x000000000000000000035c3f0d31e71a5ee24c5aaf3354689f65bd7b07dee632"); // 784000
|
||||
consensus.nMinimumChainWork = uint256S("0x000000000000000000000000000000000000000052b2559353df4117b7348b64");
|
||||
consensus.defaultAssumeValid = uint256S("0x00000000000000000001a0a448d6cf2546b06801389cc030b2b18c6491266815"); // 804000
|
||||
|
||||
/**
|
||||
* The message start string is designed to be unlikely to occur in normal data.
|
||||
|
@ -118,8 +118,8 @@ public:
|
|||
pchMessageStart[3] = 0xd9;
|
||||
nDefaultPort = 8333;
|
||||
nPruneAfterHeight = 100000;
|
||||
m_assumed_blockchain_size = 540;
|
||||
m_assumed_chain_state_size = 7;
|
||||
m_assumed_blockchain_size = 590;
|
||||
m_assumed_chain_state_size = 9;
|
||||
|
||||
genesis = CreateGenesisBlock(1231006505, 2083236893, 0x1d00ffff, 1, 50 * COIN);
|
||||
consensus.hashGenesisBlock = genesis.GetHash();
|
||||
|
@ -177,10 +177,10 @@ public:
|
|||
};
|
||||
|
||||
chainTxData = ChainTxData{
|
||||
// Data from RPC: getchaintxstats 4096 000000000000000000035c3f0d31e71a5ee24c5aaf3354689f65bd7b07dee632
|
||||
.nTime = 1680665245,
|
||||
.nTxCount = 820876044,
|
||||
.dTxRate = 3.672283614033389,
|
||||
// Data from RPC: getchaintxstats 4096 00000000000000000001a0a448d6cf2546b06801389cc030b2b18c6491266815
|
||||
.nTime = 1692502494,
|
||||
.nTxCount = 881818374,
|
||||
.dTxRate = 5.521964628130412,
|
||||
};
|
||||
}
|
||||
};
|
||||
|
@ -222,8 +222,8 @@ public:
|
|||
consensus.vDeployments[Consensus::DEPLOYMENT_TAPROOT].nTimeout = 1628640000; // August 11th, 2021
|
||||
consensus.vDeployments[Consensus::DEPLOYMENT_TAPROOT].min_activation_height = 0; // No activation delay
|
||||
|
||||
consensus.nMinimumChainWork = uint256S("0x000000000000000000000000000000000000000000000977edb0244170858d07");
|
||||
consensus.defaultAssumeValid = uint256S("0x0000000000000021bc50a89cde4870d4a81ffe0153b3c8de77b435a2fd3f6761"); // 2429000
|
||||
consensus.nMinimumChainWork = uint256S("0x000000000000000000000000000000000000000000000b6a51f415a67c0da307");
|
||||
consensus.defaultAssumeValid = uint256S("0x0000000000000093bcb68c03a9a168ae252572d348a2eaeba2cdf9231d73206f"); // 2500000
|
||||
|
||||
pchMessageStart[0] = 0x0b;
|
||||
pchMessageStart[1] = 0x11;
|
||||
|
@ -276,10 +276,10 @@ public:
|
|||
};
|
||||
|
||||
chainTxData = ChainTxData{
|
||||
// Data from RPC: getchaintxstats 4096 0000000000000021bc50a89cde4870d4a81ffe0153b3c8de77b435a2fd3f6761
|
||||
.nTime = 1681542696,
|
||||
.nTxCount = 65345929,
|
||||
.dTxRate = 0.09855282814711661,
|
||||
// Data from RPC: getchaintxstats 4096 0000000000000093bcb68c03a9a168ae252572d348a2eaeba2cdf9231d73206f
|
||||
.nTime = 1694733634,
|
||||
.nTxCount = 66484552,
|
||||
.dTxRate = 0.1804908356632494,
|
||||
};
|
||||
}
|
||||
};
|
||||
|
@ -302,15 +302,15 @@ public:
|
|||
vSeeds.emplace_back("178.128.221.177");
|
||||
vSeeds.emplace_back("v7ajjeirttkbnt32wpy3c6w3emwnfr3fkla7hpxcfokr3ysd3kqtzmqd.onion:38333");
|
||||
|
||||
consensus.nMinimumChainWork = uint256S("0x000000000000000000000000000000000000000000000000000001899d8142b0");
|
||||
consensus.defaultAssumeValid = uint256S("0x0000004429ef154f7e00b4f6b46bfbe2d2678ecd351d95bbfca437ab9a5b84ec"); // 138000
|
||||
consensus.nMinimumChainWork = uint256S("0x000000000000000000000000000000000000000000000000000001ad46be4862");
|
||||
consensus.defaultAssumeValid = uint256S("0x0000013d778ba3f914530f11f6b69869c9fab54acff85acd7b8201d111f19b7f"); // 150000
|
||||
m_assumed_blockchain_size = 1;
|
||||
m_assumed_chain_state_size = 0;
|
||||
chainTxData = ChainTxData{
|
||||
// Data from RPC: getchaintxstats 4096 0000004429ef154f7e00b4f6b46bfbe2d2678ecd351d95bbfca437ab9a5b84ec
|
||||
.nTime = 1681127428,
|
||||
.nTxCount = 2226359,
|
||||
.dTxRate = 0.006424463050600656,
|
||||
// Data from RPC: getchaintxstats 4096 0000013d778ba3f914530f11f6b69869c9fab54acff85acd7b8201d111f19b7f
|
||||
.nTime = 1688366339,
|
||||
.nTxCount = 2262750,
|
||||
.dTxRate = 0.003414084572046456,
|
||||
};
|
||||
} else {
|
||||
bin = *options.challenge;
|
||||
|
|
Loading…
Add table
Reference in a new issue