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

Simplify hard fork logic #597

Merged
merged 2 commits into from
Jul 8, 2024
Merged

Simplify hard fork logic #597

merged 2 commits into from
Jul 8, 2024

Conversation

arvidn
Copy link
Contributor

@arvidn arvidn commented Jul 8, 2024

This PR is best reviewed one commit at a time, as the flags are fairly independent.

Now that the hard fork has activated, some feature flags are no longer necessary (as they are always enabled).

ENABLE_SOFTFORK_CONDITION, AGG_SIG_ARGS and COND_ARGS_NIL - these features are always-on now.

The change around AGG_SIG_ARGS and COND_ARGS_NIL is probably the least obvious. Before the hard fork, AGG_SIG_ME and AGG_SIG_UNSAFE required exactly two arguments (as opposed to all other conditions, that allow unknown arguments). When AGG_SIG_ARGS is set (as it is after the hard fork activation), the AGG_SIG_ME and AGG_SIG_UNSAFE conditions behave like the others. This is why the special cases can be removed in conditions.rs, here.

arvidn added 2 commits July 8, 2024 10:19
…ork has activated). Also remove COND_ARGS_NIL, as it's also only used in mempool mode and is a subset of STRICT_ARGS_COUNT (which is also a mempool feature).
@arvidn arvidn force-pushed the simplify-hard-fork branch from 2bb29c2 to dc4494e Compare July 8, 2024 08:36
Copy link

Pull Request Test Coverage Report for Build 9836286700

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 6 of 6 (100.0%) changed or added relevant lines in 2 files are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+1.9%) to 82.688%

Files with Coverage Reduction New Missed Lines %
crates/chia-consensus/src/gen/conditions.rs 2 99.45%
Totals Coverage Status
Change from base Build 9785517758: 1.9%
Covered Lines: 11554
Relevant Lines: 13973

💛 - Coveralls

@arvidn arvidn marked this pull request as ready for review July 8, 2024 09:17
@arvidn arvidn requested a review from AmineKhaldi July 8, 2024 09:45
@arvidn arvidn requested a review from Rigidity July 8, 2024 14:19
@arvidn arvidn requested a review from AmineKhaldi July 8, 2024 15:05
@arvidn arvidn merged commit 920f2b0 into main Jul 8, 2024
64 checks passed
@arvidn arvidn deleted the simplify-hard-fork branch July 8, 2024 15:06
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