Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: fire up test chains by first block: bitcoin#22818, dip1, dip8, dip20, brr - 3/n #6214

Merged
merged 5 commits into from
Aug 20, 2024

Conversation

knst
Copy link
Collaborator

@knst knst commented Aug 14, 2024

Issue being fixed or feature implemented

What was done?

Backport bitcoin#22818 which helped to activate all forks from block-1 at regtest.
Activate next dash's softforks at block 1:

  • DIP-0001 (blocksize 2mb)
  • DIP-0020 (opcodes)
  • DIP-0008 (chainlocks)
  • BRR (block reward reallocation)

How Has This Been Tested?

Breaking Changes

All changes are relevant to RegTest only

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation
  • I have assigned this pull request to a milestone

@knst knst added this to the 21.2 milestone Aug 14, 2024
@knst knst marked this pull request as draft August 14, 2024 06:59
@knst knst force-pushed the forks-speedup-p2 branch from ddaa779 to 84b6eea Compare August 14, 2024 09:30
merge-script and others added 2 commits August 14, 2024 16:58
…, unless overridden

fa4db86 test: Activate all regtest softforks at height 1, unless overridden (MarcoFalke)
faad1e5 Introduce -testactivationheight=name@height setting (MarcoFalke)
fadb2ef test: Add extra_args argument to TestChain100Setup constructor (MarcoFalke)
faa4698 test: Remove version argument from build_next_block in p2p_segwit test (MarcoFalke)
fa086ef test: Remove unused ~TestChain100Setup (MarcoFalke)

Pull request description:

  All softforks that are active at the tip of mainnet, should also be active from genesis in regtest. Otherwise their rules might not be enforced in user testing, thus making their testing less useful.

  To still allow tests to check pre-softfork rules, a runtime argument can change the activation height.

ACKs for top commit:
  laanwj:
    Code review ACK fa4db86
  theStack:
    re-ACK fa4db86

Tree-SHA512: 6397d46ff56ebc48c007a4cda633904d6ac085bc76b4ecf83097c546c7eec93ac0c44b88083b2611b9091c8d1fb8ee1e314065de078ef15e922c015de7ade8bf
@knst knst force-pushed the forks-speedup-p2 branch from 84b6eea to d9fef89 Compare August 14, 2024 10:04
@knst knst marked this pull request as ready for review August 15, 2024 03:28
@knst knst force-pushed the forks-speedup-p2 branch from d9fef89 to c01226e Compare August 15, 2024 04:27
Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls see fde8ed1 and 55aa14e

@knst
Copy link
Collaborator Author

knst commented Aug 15, 2024

@UdjinM6 , I would disagree with both patches.

55aa14e:

There are both values bad-txns-oversize and tx-size used in our (and bitcoin's) implementation.

bad-txns-oversize: https://github.com/dashpay/dash/blob/develop/src/consensus/tx_check.cpp#L34
tx-size: https://github.com/dashpay/dash/blob/develop/src/policy/policy.cpp#L73

I'd say inside ContextualCheckTransaction just has been used a wrong id for failure - let's correct it better rather than wrap it in numerous of exceptions to make it disappear in just particular 2 tests


fde8ed1

That remove existing command line argument, I'd like to keep it for v21.2 just in case if anyone uses it.
I am going to create a new PR with removing bip147, dip3param, dip8param, etc when v22 will be branched-out.

@knst knst requested a review from UdjinM6 August 15, 2024 08:26
@UdjinM6
Copy link

UdjinM6 commented Aug 15, 2024

@UdjinM6 , I would disagree with both patches.

55aa14e:

There are both values bad-txns-oversize and tx-size used in our (and bitcoin's) implementation.

bad-txns-oversize: https://github.com/dashpay/dash/blob/develop/src/consensus/tx_check.cpp#L34 tx-size: https://github.com/dashpay/dash/blob/develop/src/policy/policy.cpp#L73

I'd say inside ContextualCheckTransaction just has been used a wrong id for failure - let's correct it better rather than wrap it in numerous of exceptions to make it disappear in just particular 2 tests

bad-txns-oversize is a consensus level error and tx-size is a mempool policy error, the one you are changing is consensus level one, it was picked intentionally that way.

fde8ed1

That remove existing command line argument, I'd like to keep it for v21.2 just in case if anyone uses it. I am going to create a new PR with removing bip147, dip3param, dip8param, etc when v22 will be branched-out.

Sounds good

…tiveAtTip

The flag fDIP0001ActiveAtTip shows a status of activation of DIP0001

This flag is used currently only in net.cpp for setup block buffer size.
Assume the bigger by default so far as DIP0001 is activated years ago
@knst knst force-pushed the forks-speedup-p2 branch from c01226e to f4ba2bb Compare August 16, 2024 04:14
@knst
Copy link
Collaborator Author

knst commented Aug 16, 2024

bad-txns-oversize is a consensus level error and tx-size is a mempool policy error, the one you are changing is consensus level one, it was picked intentionally that way.

Indeed, it makes sense.

Please check my force-push: I applied your changes and also dropped a global flag fDIP0001ActiveAtTip which is no need anymore

Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

side note: thinking more about -bip147height and -dip8params.. they are regtest-only and replacing them with corresponding -testactivationheight cmd-line options is trivial. Dropping them would also prevent confusion when new and old options are used together accidentally. But I won't insist :)

Copy link
Member

@PastaPastaPasta PastaPastaPasta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK f4ba2bb

@PastaPastaPasta PastaPastaPasta merged commit f1e8452 into dashpay:develop Aug 20, 2024
25 checks passed
@knst knst deleted the forks-speedup-p2 branch August 21, 2024 11:47
@UdjinM6 UdjinM6 modified the milestones: 21.2, 22 Oct 29, 2024
PastaPastaPasta added a commit that referenced this pull request Dec 10, 2024
…y first block - 7/n

906c2d7 refactor: add annotation gsl::not_null for ConstructCreditPool (Konstantin Akimov)
f1905ca fix: intermittent missing of PoSe ban in feature_llmq_simplepose.py (Konstantin Akimov)
cf84dff fix: bump time for all nodes during mine_quorum in feature_llmq_rotation.py test (Konstantin Akimov)
efd4701 fix: intermittent error for feature_llmq_simplepose due to rotating quorums (Konstantin Akimov)
2bafadf feat: put DIP0024 activation to block 1 on RegTest (Konstantin Akimov)
632c4c4 feat: re-bury DIP0024 with new height when quorums actually appeared (Konstantin Akimov)
343c74b fix: intermittent error in feature_index_prune due to DKG influence (Konstantin Akimov)
de821b9 refactor: remove command line argument -bip147height, -dip8params (Konstantin Akimov)
d8ce0a7 docs: updated comment for DIP0003 activation on RegTest (Konstantin Akimov)
4dafec8 fix: add check that DIP0003 activated before retrieving CbTx for CreditPool (Konstantin Akimov)
26e9813 fix: assertion in Credit Pool validation during connecting blocks (Konstantin Akimov)

Pull request description:

  ## Issue being fixed or feature implemented
  This PR is 7th in the achieving ultimate goal to activate old forks from block 1.
  It helps to run unit and functional tests faster; it helps for platform's dev-environment to start faster.

  ## What was done?
  Prior work: #6187, #6189, #6214, #6225, #6269, #6275

  This PR:
   - simplify DIP0024 activation and activate it from block 1 at RegTest
   - removes command lines arguments: -bip147height, -dip8params
   - fixed intermittent errors in feature_index_prune.py and feature_llmq_simplepose.py
   - fix assertion crash on Regtest if using strange combination of -testactivationheight and -dip3params

  ## How Has This Been Tested?
  Run unit, functional tests.

  ## Breaking Changes
  [regtest only] -dip8params, -bip147height are removed.

  ## 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
  - [x] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone

ACKs for top commit:
  UdjinM6:
    utACK 906c2d7
  PastaPastaPasta:
    utACK 906c2d7

Tree-SHA512: fab8a9bc03bb7f220c19dd952a03f8fec0b6ef1362d7308eb77c90e0ba814a241bb2bf36beccf78bb285ede1b6d85ec52fa19b3729ac9b643b420d13fbb63b47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants