Skip to content

Commit c41b372

Browse files
Merge #6615: feat: bury fork withdrawals
77dd259 feat: bury WITHDRAWALS deployment (Konstantin Akimov) a39d381 tests: improve logging for feature asset locks functional test (Konstantin Akimov) Pull request description: ## Issue being fixed or feature implemented Fork `withdrawals` is activated on testnet and mainnet long time ago, no more need to keep it signalling. ## What was done? Bury fork `withdrawal`. ## How Has This Been Tested? See changes in functional test. ## Breaking Changes N/A, it's activated already on testnet and mainnet. ## Checklist: - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [x] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone ACKs for top commit: PastaPastaPasta: utACK 77dd259 UdjinM6: utACK 77dd259 Tree-SHA512: b6c44c1103e9f119acd0383c5602c78f6424e00fd02bfc411333a94e9d4e3d2e716dbda3bdb909c024f60a4d4797c227c1090d1773baf3cf5ce9f39466b65879
2 parents 470cb9d + 77dd259 commit c41b372

File tree

6 files changed

+20
-59
lines changed

6 files changed

+20
-59
lines changed

src/chainparams.cpp

Lines changed: 7 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,8 @@ class CMainParams : public CChainParams {
193193
consensus.V19Height = 1899072; // 0000000000000015e32e73052d663626327004c81c5c22cb8b42c361015c0eae
194194
consensus.V20Height = 1987776; // 000000000000001bf41cff06b76780050682ca29e61a91c391893d4745579777
195195
consensus.MN_RRHeight = 2128896; // 0000000000000009a9696da93d3807eb14eb00a4ff449206d689156a21b27f26
196-
consensus.MinBIP9WarningHeight = 2128896 + 2016; // mn_rr activation height + miner confirmation window
196+
consensus.WithdrawalsHeight = 2201472; // 00000000000000210518749e17c00b035a2a4982c906236c28c41ea2231bf7ef
197+
consensus.MinBIP9WarningHeight = 2201472 + 2016; // withdrawals activation height + miner confirmation window
197198
consensus.powLimit = uint256S("00000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); // ~uint256(0) >> 20
198199
consensus.nPowTargetTimespan = 24 * 60 * 60; // Dash: 1 day
199200
consensus.nPowTargetSpacing = 2.5 * 60; // Dash: 2.5 minutes
@@ -208,15 +209,6 @@ class CMainParams : public CChainParams {
208209
consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nTimeout = Consensus::BIP9Deployment::NO_TIMEOUT;
209210
consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].min_activation_height = 0; // No activation delay
210211

211-
consensus.vDeployments[Consensus::DEPLOYMENT_WITHDRAWALS].bit = 11;
212-
consensus.vDeployments[Consensus::DEPLOYMENT_WITHDRAWALS].nStartTime = 1728864000; // October 14, 2024
213-
consensus.vDeployments[Consensus::DEPLOYMENT_WITHDRAWALS].nTimeout = 1760400000; // October 14, 2025
214-
consensus.vDeployments[Consensus::DEPLOYMENT_WITHDRAWALS].nWindowSize = 4032;
215-
consensus.vDeployments[Consensus::DEPLOYMENT_WITHDRAWALS].nThresholdStart = 3226; // 80% of 4032
216-
consensus.vDeployments[Consensus::DEPLOYMENT_WITHDRAWALS].nThresholdMin = 2420; // 60% of 4032
217-
consensus.vDeployments[Consensus::DEPLOYMENT_WITHDRAWALS].nFalloffCoeff = 5; // this corresponds to 10 periods
218-
consensus.vDeployments[Consensus::DEPLOYMENT_WITHDRAWALS].useEHF = true;
219-
220212
consensus.vDeployments[Consensus::DEPLOYMENT_V23].bit = 12;
221213
consensus.vDeployments[Consensus::DEPLOYMENT_V23].nStartTime = 1751328000; // July 1, 2025
222214
consensus.vDeployments[Consensus::DEPLOYMENT_V23].nTimeout = 1782864000; // July 1, 2026
@@ -399,7 +391,8 @@ class CTestNetParams : public CChainParams {
399391
consensus.V19Height = 850100; // 000004728b8ff2a16b9d4eebb0fd61eeffadc9c7fe4b0ec0b5a739869401ab5b
400392
consensus.V20Height = 905100; // 0000020c5e0f86f385cbf8e90210de9a9fd63633f01433bf47a6b3227a2851fd
401393
consensus.MN_RRHeight = 1066900; // 000000d05d445958a9a4ad6bdc0f4bfb25af124b2326060703373ff2d3b397e9
402-
consensus.MinBIP9WarningHeight = 1066900 + 2016; // mn_rr activation height + miner confirmation window
394+
consensus.WithdrawalsHeight = 1148500; // 000000212a6fec2ee2af040c6d7a176360b154cbaa998888170cfd9ae7dd632d
395+
consensus.MinBIP9WarningHeight = 1148500 + 2016; // withdrawals activation height + miner confirmation window
403396
consensus.powLimit = uint256S("00000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); // ~uint256(0) >> 20
404397
consensus.nPowTargetTimespan = 24 * 60 * 60; // Dash: 1 day
405398
consensus.nPowTargetSpacing = 2.5 * 60; // Dash: 2.5 minutes
@@ -414,15 +407,6 @@ class CTestNetParams : public CChainParams {
414407
consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nTimeout = Consensus::BIP9Deployment::NO_TIMEOUT;
415408
consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].min_activation_height = 0; // No activation delay
416409

417-
consensus.vDeployments[Consensus::DEPLOYMENT_WITHDRAWALS].bit = 11;
418-
consensus.vDeployments[Consensus::DEPLOYMENT_WITHDRAWALS].nStartTime = 1728864000; // October 14, 2024
419-
consensus.vDeployments[Consensus::DEPLOYMENT_WITHDRAWALS].nTimeout = Consensus::BIP9Deployment::NO_TIMEOUT;
420-
consensus.vDeployments[Consensus::DEPLOYMENT_WITHDRAWALS].nWindowSize = 100;
421-
consensus.vDeployments[Consensus::DEPLOYMENT_WITHDRAWALS].nThresholdStart = 80; // 80% of 100
422-
consensus.vDeployments[Consensus::DEPLOYMENT_WITHDRAWALS].nThresholdMin = 60; // 60% of 100
423-
consensus.vDeployments[Consensus::DEPLOYMENT_WITHDRAWALS].nFalloffCoeff = 5; // this corresponds to 10 periods
424-
consensus.vDeployments[Consensus::DEPLOYMENT_WITHDRAWALS].useEHF = true;
425-
426410
consensus.vDeployments[Consensus::DEPLOYMENT_V23].bit = 12;
427411
consensus.vDeployments[Consensus::DEPLOYMENT_V23].nStartTime = 1751328000; // July 1, 2025
428412
consensus.vDeployments[Consensus::DEPLOYMENT_V23].nTimeout = Consensus::BIP9Deployment::NO_TIMEOUT;
@@ -580,7 +564,8 @@ class CDevNetParams : public CChainParams {
580564
consensus.V19Height = 2; // V19 activated immediately on devnet
581565
consensus.V20Height = 2; // V20 activated immediately on devnet
582566
consensus.MN_RRHeight = 2; // MN_RR activated immediately on devnet
583-
consensus.MinBIP9WarningHeight = 2 + 2016; // v19 activation height + miner confirmation window
567+
consensus.WithdrawalsHeight = 2; // withdrawals activated immediately on devnet
568+
consensus.MinBIP9WarningHeight = 2 + 2016; // withdrawals activation height + miner confirmation window
584569
consensus.powLimit = uint256S("7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); // ~uint256(0) >> 1
585570
consensus.nPowTargetTimespan = 24 * 60 * 60; // Dash: 1 day
586571
consensus.nPowTargetSpacing = 2.5 * 60; // Dash: 2.5 minutes
@@ -595,15 +580,6 @@ class CDevNetParams : public CChainParams {
595580
consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nTimeout = Consensus::BIP9Deployment::NO_TIMEOUT;
596581
consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].min_activation_height = 0; // No activation delay
597582

598-
consensus.vDeployments[Consensus::DEPLOYMENT_WITHDRAWALS].bit = 11;
599-
consensus.vDeployments[Consensus::DEPLOYMENT_WITHDRAWALS].nStartTime = 1704067200; // January 1, 2024
600-
consensus.vDeployments[Consensus::DEPLOYMENT_WITHDRAWALS].nTimeout = Consensus::BIP9Deployment::NO_TIMEOUT;
601-
consensus.vDeployments[Consensus::DEPLOYMENT_WITHDRAWALS].nWindowSize = 120;
602-
consensus.vDeployments[Consensus::DEPLOYMENT_WITHDRAWALS].nThresholdStart = 80; // 80% of 100
603-
consensus.vDeployments[Consensus::DEPLOYMENT_WITHDRAWALS].nThresholdMin = 60; // 60% of 100
604-
consensus.vDeployments[Consensus::DEPLOYMENT_WITHDRAWALS].nFalloffCoeff = 5; // this corresponds to 10 periods
605-
consensus.vDeployments[Consensus::DEPLOYMENT_WITHDRAWALS].useEHF = true;
606-
607583
consensus.vDeployments[Consensus::DEPLOYMENT_V23].bit = 12;
608584
consensus.vDeployments[Consensus::DEPLOYMENT_V23].nStartTime = 1751328000; // July 1, 2025
609585
consensus.vDeployments[Consensus::DEPLOYMENT_V23].nTimeout = Consensus::BIP9Deployment::NO_TIMEOUT;
@@ -824,6 +800,7 @@ class CRegTestParams : public CChainParams {
824800
consensus.V19Height = 1; // Always active unless overriden
825801
consensus.V20Height = consensus.DIP0003Height; // Active not earlier than dip0003. Functional tests (DashTestFramework) uses height 100 (same as coinbase maturity)
826802
consensus.MN_RRHeight = consensus.V20Height; // MN_RR does not really have effect before v20 activation
803+
consensus.WithdrawalsHeight = 600;
827804
consensus.MinBIP9WarningHeight = 0;
828805
consensus.powLimit = uint256S("7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); // ~uint256(0) >> 1
829806
consensus.nPowTargetTimespan = 24 * 60 * 60; // Dash: 1 day
@@ -840,15 +817,6 @@ class CRegTestParams : public CChainParams {
840817
consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nTimeout = Consensus::BIP9Deployment::NO_TIMEOUT;
841818
consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].min_activation_height = 0; // No activation delay
842819

843-
consensus.vDeployments[Consensus::DEPLOYMENT_WITHDRAWALS].bit = 11;
844-
consensus.vDeployments[Consensus::DEPLOYMENT_WITHDRAWALS].nStartTime = 0;
845-
consensus.vDeployments[Consensus::DEPLOYMENT_WITHDRAWALS].nTimeout = Consensus::BIP9Deployment::NO_TIMEOUT;
846-
consensus.vDeployments[Consensus::DEPLOYMENT_WITHDRAWALS].nWindowSize = 200;
847-
consensus.vDeployments[Consensus::DEPLOYMENT_WITHDRAWALS].nThresholdStart = 200 / 5 * 4; // 80% of window size
848-
consensus.vDeployments[Consensus::DEPLOYMENT_WITHDRAWALS].nThresholdMin = 200 / 5 * 3; // 60% of window size
849-
consensus.vDeployments[Consensus::DEPLOYMENT_WITHDRAWALS].nFalloffCoeff = 5; // this corresponds to 10 periods
850-
consensus.vDeployments[Consensus::DEPLOYMENT_WITHDRAWALS].useEHF = true;
851-
852820
consensus.vDeployments[Consensus::DEPLOYMENT_V23].bit = 12;
853821
consensus.vDeployments[Consensus::DEPLOYMENT_V23].nStartTime = 0;
854822
consensus.vDeployments[Consensus::DEPLOYMENT_V23].nTimeout = Consensus::BIP9Deployment::NO_TIMEOUT;

src/consensus/params.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ enum BuriedDeployment : int16_t {
3434
DEPLOYMENT_V19,
3535
DEPLOYMENT_V20,
3636
DEPLOYMENT_MN_RR,
37+
DEPLOYMENT_WITHDRAWALS,
3738
};
38-
constexpr bool ValidDeployment(BuriedDeployment dep) { return dep <= DEPLOYMENT_MN_RR; }
39+
constexpr bool ValidDeployment(BuriedDeployment dep) { return dep <= DEPLOYMENT_WITHDRAWALS; }
3940

4041
enum DeploymentPos : uint16_t {
4142
DEPLOYMENT_TESTDUMMY,
42-
DEPLOYMENT_WITHDRAWALS, // Deployment of Fix for quorum selection for withdrawals
4343
DEPLOYMENT_V23, // Deployment of doubling withdrawal limit, extended addresses
4444
// NOTE: Also add new deployments to VersionBitsDeploymentInfo in deploymentinfo.cpp
4545
MAX_VERSION_BITS_DEPLOYMENTS
@@ -147,6 +147,8 @@ struct Params {
147147
int V20Height;
148148
/** Block height at which MN_RR (Deployment of Masternode Reward Location Reallocation) becomes active */
149149
int MN_RRHeight;
150+
/** Block height at which WITHDRAWALS (Deployment of quorum fix and higher limits for withdrawals) becomes active */
151+
int WithdrawalsHeight;
150152
/** Don't warn about unknown BIP 9 activations below this height.
151153
* This prevents us from warning about the CSV and DIP activations. */
152154
int MinBIP9WarningHeight;
@@ -214,6 +216,8 @@ struct Params {
214216
return V20Height;
215217
case DEPLOYMENT_MN_RR:
216218
return MN_RRHeight;
219+
case DEPLOYMENT_WITHDRAWALS:
220+
return WithdrawalsHeight;
217221
} // no default case, so the compiler can warn about missing cases
218222
return std::numeric_limits<int>::max();
219223
}

src/deploymentinfo.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ const struct VBDeploymentInfo VersionBitsDeploymentInfo[Consensus::MAX_VERSION_B
1111
/*.name =*/ "testdummy",
1212
/*.gbt_force =*/ true,
1313
},
14-
{
15-
/*.name =*/"withdrawals",
16-
/*.gbt_force =*/true,
17-
},
1814
{
1915
/*.name =*/"v23",
2016
/*.gbt_force =*/true,
@@ -53,6 +49,8 @@ std::string DeploymentName(Consensus::BuriedDeployment dep)
5349
return "v20";
5450
case Consensus::DEPLOYMENT_MN_RR:
5551
return "mn_rr";
52+
case Consensus::DEPLOYMENT_WITHDRAWALS:
53+
return "withdrawals";
5654
} // no default case, so the compiler can warn about missing cases
5755
return "";
5856
}

src/rpc/blockchain.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1536,11 +1536,12 @@ RPCHelpMan getblockchaininfo()
15361536
Consensus::DEPLOYMENT_BRR,
15371537
Consensus::DEPLOYMENT_V19,
15381538
Consensus::DEPLOYMENT_V20,
1539-
Consensus::DEPLOYMENT_MN_RR }) {
1539+
Consensus::DEPLOYMENT_MN_RR,
1540+
Consensus::DEPLOYMENT_WITHDRAWALS,
1541+
}) {
15401542
SoftForkDescPushBack(&tip, softforks, consensusParams, deploy);
15411543
}
15421544
for (auto ehf_deploy : { /* sorted by activation block */
1543-
Consensus::DEPLOYMENT_WITHDRAWALS,
15441545
Consensus::DEPLOYMENT_V23,
15451546
Consensus::DEPLOYMENT_TESTDUMMY }) {
15461547
SoftForkDescPushBack(&tip, ehfSignals, softforks, consensusParams, ehf_deploy);

test/functional/feature_asset_locks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def create_assetunlock(self, index, withdrawal, pubkey=None, fee=tiny_amount):
102102
request_id = hash256(request_id_buf)[::-1].hex()
103103

104104
height = node_wallet.getblockcount()
105-
self.log.info(f"Creating asset unlock: {llmq_type_test} {request_id}")
105+
self.log.info(f"Creating asset unlock: index={index} {request_id}")
106106
quorumHash = mninfo[0].node.quorum("selectquorum", llmq_type_test, request_id)["quorumHash"]
107107
self.log.info(f"Used quorum hash: {quorumHash}")
108108
unlockTx_payload = CAssetUnlockTx(

test/functional/rpc_blockchain.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -214,17 +214,7 @@ def _test_getblockchaininfo(self):
214214
'v19': { 'type': 'buried', 'active': True, 'height': 15},
215215
'v20': { 'type': 'buried', 'active': False, 'height': 412},
216216
'mn_rr': { 'type': 'buried', 'active': False, 'height': 413},
217-
'withdrawals': {
218-
'type': 'bip9',
219-
'bip9': {
220-
'status': 'defined',
221-
'start_time': 0,
222-
'timeout': 9223372036854775807, # "withdrawals" does not have a timeout so is set to the max int64 value
223-
'since': 0,
224-
'min_activation_height': 0,
225-
'ehf': True
226-
},
227-
'active': False},
217+
'withdrawals': { 'type': 'buried', 'active': False, 'height': 600},
228218
'v23': {
229219
'type': 'bip9',
230220
'bip9': {

0 commit comments

Comments
 (0)