mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-13 12:33:42 +02:00
Merge 3003861e78 into merged_master (Bitcoin PR bitcoin/bitcoin#28591)
This commit is contained in:
commit
d01090d0df
4 changed files with 27 additions and 33 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)
|
||||
|
|
|
|||
|
|
@ -228,17 +228,14 @@ 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
|
||||
// Simplicity
|
||||
consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].bit = 21;
|
||||
consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].nStartTime = Consensus::BIP9Deployment::NEVER_ACTIVE;
|
||||
consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].nTimeout = Consensus::BIP9Deployment::NO_TIMEOUT;
|
||||
consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].min_activation_height = 0; // No activation delay
|
||||
|
||||
consensus.nMinimumChainWork = uint256S("0x00000000000000000000000000000000000000002927cdceccbd5209e81e80db");
|
||||
consensus.defaultAssumeValid = uint256S("0x000000000000000000052d314a259755ca65944e68df6b12a067ea8f1f5a7091"); // 724466
|
||||
|
||||
consensus.genesis_subsidy = 50*COIN;
|
||||
consensus.connect_genesis_outputs = false;
|
||||
consensus.subsidy_asset = CAsset();
|
||||
|
|
@ -265,8 +262,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);
|
||||
consensus.hashGenesisBlock = genesis.GetHash();
|
||||
|
|
@ -325,10 +322,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,
|
||||
};
|
||||
}
|
||||
};
|
||||
|
|
@ -375,17 +372,14 @@ 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
|
||||
// Simplicity
|
||||
consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].bit = 21;
|
||||
consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].nStartTime = Consensus::BIP9Deployment::NEVER_ACTIVE;
|
||||
consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].nTimeout = Consensus::BIP9Deployment::NO_TIMEOUT;
|
||||
consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].min_activation_height = 0; // No activation delay
|
||||
|
||||
consensus.nMinimumChainWork = uint256S("0x00000000000000000000000000000000000000000000064728c7be6fe4b2f961");
|
||||
consensus.defaultAssumeValid = uint256S("0x00000000000163cfb1f97c4e4098a3692c8053ad9cab5ad9c86b338b5c00b8b7"); // 2143398
|
||||
|
||||
consensus.genesis_subsidy = 50*COIN;
|
||||
consensus.connect_genesis_outputs = false;
|
||||
consensus.subsidy_asset = CAsset();
|
||||
|
|
@ -453,10 +447,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,
|
||||
};
|
||||
}
|
||||
};
|
||||
|
|
@ -479,15 +473,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
Add a link
Reference in a new issue