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

Add allow-contract-caller command #4589

Conversation

BowTiedRadone
Copy link
Contributor

This PR adds the allow-contract-caller command to the stateful property testing environment. It is part of #4548 and targets feat/pox-4-stateful-property-testing (#4550).

@BowTiedRadone BowTiedRadone changed the base branch from master to feat/pox-4-stateful-property-testing March 25, 2024 15:40
Copy link

codecov bot commented Mar 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.53%. Comparing base (1166268) to head (51a3181).

Additional details and impacted files
@@                           Coverage Diff                            @@
##           feat/pox-4-stateful-property-testing    #4589      +/-   ##
========================================================================
+ Coverage                                 83.38%   83.53%   +0.14%     
========================================================================
  Files                                       471      448      -23     
  Lines                                    337958   327197   -10761     
  Branches                                    317        0     -317     
========================================================================
- Hits                                     281809   273317    -8492     
+ Misses                                    56141    53880    -2261     
+ Partials                                      8        0       -8     

see 125 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1166268...51a3181. Read the comment docs.

BowTiedRadone and others added 5 commits March 25, 2024 23:48
This change optimizes the generation of Clarity values for the
allowUntilBurnHt property in the AllowContractCallerCommand tests. By
directly creating Clarity optional values (none or some(uint)) within the
fast-check generator, we remove the need for conditional post-processing.
This approach simplifies the test setup and aligns more closely with
the intended usage patterns of the Clarity and fast-check libraries.
- Moved `network` from `Stub` (Model) to `Real`, streamlining state management.
- `unlockBurnHt` now dynamically calculated, passed via constructor, ensuring
  alignment with generated `period`.
- Utilized `fast-check`'s `chain` for dynamic `unlockBurnHt` calculation,
  improving test accuracy.
- Enforces discipline in constructor use and `check` method validation,
  highlighting the importance of explicit state and parameter handling for
  reliable testing.
@moodmosaic moodmosaic force-pushed the feat/pox-4-stateful-allow-contract-caller branch from 3e54c0c to 51a3181 Compare March 25, 2024 22:51
Copy link
Member

@moodmosaic moodmosaic left a comment

Choose a reason for hiding this comment

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

LGTM

@moodmosaic
Copy link
Member

Merging into feat/pox-4-stateful-property-testing.

@moodmosaic moodmosaic merged commit d55fc62 into feat/pox-4-stateful-property-testing Mar 26, 2024
2 checks passed
@moodmosaic moodmosaic deleted the feat/pox-4-stateful-allow-contract-caller branch March 26, 2024 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants