You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge #6667: feat: fire up 🏃 test chains by first block (v20, mn_rr) - 9/9
ef5cde5 feat: enforce mn_rr activation after v20 on regtest (UdjinM6)
1ac1628 test: simplify calculation of num payees (Konstantin Akimov)
5c3b284 doc: edit commentary about Credit Pool existance (Konstantin Akimov)
96e9cef fix: adjust rpc_blockchin.py functional test (Konstantin Akimov)
fd32e57 fix: update number of blocks before pruning for feature_index_prune.py (Konstantin Akimov)
2127f99 test: adjust activation heights on rpc_blockchain.py for v20 and mn_rr (Konstantin Akimov)
046d5ee feat: activate mn_rr fork from block 1 on RegTest (Konstantin Akimov)
080207e test: speed-up feature_asset_locks.py functional test by generating less blocks (Konstantin Akimov)
3d67e7d fix: require v20 fork activated for reallocation block reward to credit pool (Konstantin Akimov)
641f889 feat: start v20 from the same block as DIP0003 on regtest (Konstantin Akimov)
Pull request description:
## Issue being fixed or feature implemented
This PR is the final PR that activates all currently buried soft-forks on earlier block as possible.
This series of PR chased 3 ultimate goals:
- improve performance of functional tests: no need to generate many blocks just waiting until some feature is activated
- it helps for unit & functional tests to test actual code that works on mainnet currently with all features enabled. Not some pre-feature status
- it helps platform's dev environment to start faster (some final integration is expected after this PR).
Prior work: #6511 and other PRs
## What was done?
Changes are related to 2 forks that has been activated on high height on regtest:
- v20 which set subsidy of each block to fixed value 5, increases governance share of reward (10% to 20%), introduces EHF forks and add to coinbase transaction ChainLocks and Credit Pool, also changes behavior in build SML lists.
- mn_rr: part of reward of each block is actually goes to credit pool, triggers platform chain genesis blocks
Functional test `rpc_masternode.py` is compatible now with MN_RR fork (expected 3 or 4 outputs of coinbase tx: miner, credit pool, masternode reward, optional operator reward)
### V20
V20 must not be active before fork dip0003 so far as all features depends on DIP0003.
For BitcoinTestFramework v20's activation is delayed to block 500 same as DIP0003 because unit tests and functional tests that are backported from bitcoin expects certains behaviour: manually constructed blocks do not have CbTx transaction of version 2 (dip003) or version 3 (v20 with CL) and may not be accepted after DIP3 or v20 activation.
For DashTestFramework v20's activation is delayed to block 100 because wallet should have enough coins to create masternodes / evonodes; but with fixed subsidy equaled to 2 it takes thousands of blocks before masternodes can be created. 100 blocks is chosen to match with coinbase maturity. Higher height may cause v20 to be activated too late for some functional tests. Height can be lower than 100 blocks, maybe low as just 50 blocks, but 50 * 500 = 25000 tDash which is not enough to create more than 8 evo nodes.
### MN_RR
Part of block reward is not coming to credit pool before it is actually exist (v20 activated).
## How Has This Been Tested?
Run unit / functional tests that possible affected by this PR.
Time is slightly reduced for `feature_asset_locks.py`, `feature_mnehf.py`, `feature_llmq_chainlocks.py` as expected.
Time is unexpectedly increased for `feature_llmq_rotation.py` (should not be changed).
Disk usage is significantly reduced as expected (less blocks means less storage for blocks; less logs for each node).
PR:
```
feature_asset_locks.py | ✓ Passed | 110 s
feature_dip4_coinbasemerkleroots.py | ✓ Passed | 97 s
feature_governance.py --descriptors | ✓ Passed | 186 s
feature_governance.py --legacy-wallet | ✓ Passed | 184 s
feature_llmq_chainlocks.py | ✓ Passed | 105 s
feature_llmq_rotation.py | ✓ Passed | 133 s
feature_mnehf.py | ✓ Passed | 71 s
rpc_blockchain.py --v1transport | ✓ Passed | 13 s
rpc_blockchain.py --v2transport | ✓ Passed | 12 s
rpc_masternode.py | ✓ Passed | 8 s
ALL | ✓ Passed | 919 s (accumulated)
Runtime: 186 s
```
Disk usage:
```
1396020 /tmp/test_runner_∋_🏃_20250512_115202
```
develop:
```
feature_asset_locks.py | ✓ Passed | 131 s
feature_dip4_coinbasemerkleroots.py | ✓ Passed | 90 s
feature_governance.py --descriptors | ✓ Passed | 181 s
feature_governance.py --legacy-wallet | ✓ Passed | 186 s
feature_llmq_chainlocks.py | ✓ Passed | 120 s
feature_llmq_rotation.py | ✓ Passed | 92 s
feature_mnehf.py | ✓ Passed | 92 s
rpc_blockchain.py --v1transport | ✓ Passed | 12 s
rpc_blockchain.py --v2transport | ✓ Passed | 12 s
rpc_masternode.py | ✓ Passed | 8 s
ALL | ✓ Passed | 924 s (accumulated)
```
Disk usage:
```
1633584 /tmp/test_runner_∋_🏃_20250512_121826/
```
## Breaking Changes
On Regtest fork `v20` is activated on block 1 if not specified otherwise.
Use `-testactivationheight=v20@100` to activate v20 from block 100 and increase subsidy of first blocks, if you want to register any masternode.
On Regtest fork `MN_RR` is activated on block 1 if not speicifed otherwise.
Use `-testactivationheight=mn_rr@{HEIGHT}` to activate mn_rr from block `{HEIGHT}` to trigger platform activation. `{HEIGHT}` may be less than v20, but actual reward reallocation will happens only since v20 (credit pool in CbTx) is activated.
No changes for devnets, testnet3, 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:
UdjinM6:
utACK ef5cde5
PastaPastaPasta:
utACK ef5cde5
Tree-SHA512: f11f61bb5685c67f916d3151a4d6b0a42492bc09b54d97a7150381351da50fafd8d624f5ebb1cab843c6f9fa48fcb6f21c3f8a922079524afdc481aeb45edee8
Copy file name to clipboardExpand all lines: src/chainparams.cpp
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -822,8 +822,8 @@ class CRegTestParams : public CChainParams {
822
822
consensus.DIP0024Height = 1; // Always have dip0024 quorums unless overridden
823
823
consensus.DIP0024QuorumsHeight = 1; // Always have dip0024 quorums unless overridden
824
824
consensus.V19Height = 1; // Always active unless overriden
825
-
consensus.V20Height = 900;
826
-
consensus.MN_RRHeight = 900;
825
+
consensus.V20Height = consensus.DIP0003Height; // Active not earlier than dip0003. Functional tests (DashTestFramework) uses height 100 (same as coinbase maturity)
826
+
consensus.MN_RRHeight = consensus.V20Height; // MN_RR does not really have effect before v20 activation
0 commit comments