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
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 marked this pull request as ready for review August 15, 2024 03:28
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
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
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