-
Notifications
You must be signed in to change notification settings - Fork 708
feat: add macros for contract consensus tests #6562
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: add macros for contract consensus tests #6562
Conversation
Codecov Report❌ Patch coverage is
❌ Your project status has failed because the head coverage (68.48%) is below the target coverage (80.00%). You can increase the head coverage or adjust the target coverage.
Additional details and impacted files@@ Coverage Diff @@
## develop #6562 +/- ##
============================================
- Coverage 79.96% 68.48% -11.48%
============================================
Files 571 571
Lines 351591 351613 +22
============================================
- Hits 281135 240813 -40322
- Misses 70456 110800 +40344
... and 296 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
…-consensus-test-api
consensus_test
macro
...ack_lib__chainstate__tests__consensus__chainstate_error_expression_stack_depth_too_deep.snap
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! I think this will be a great help when we start flushing out the tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
heads-up: the are some conflicts to manage
67e6805
Description
This PR introduces an overhaul to the smart contract consensus testing suite, replacing manual test setups with a declarative framework. The goal is to make it significantly easier to write robust, multi-epoch, and multi-Clarity-version consensus tests.
We focus on ensuring we don't break consensus for state transitions that already happened, can happen now, or will happen in the future.
Past Events: For consensus-breaking changes in past epochs (e.g., 2.0, 3.1):
Current and Future Events:
New Macros:
contract_call_consensus_test!
: Allows defining a full contract deployment and function call test scenario that automatically implements the strategy described above.contract_deploy_consensus_test!
: A specialized version for testing only the contract deployment phase, focusing on current and future epochs.Applicable issues
Additional info (benefits, drawbacks, caveats)
Checklist
docs/rpc/openapi.yaml
andrpc-endpoints.md
for v2 endpoints,event-dispatcher.md
for new events)clarity-benchmarking
repobitcoin-tests.yml