Skip to content

add testing vs production execution model documentation (GTM-2310)#177

Merged
czepluch merged 5 commits intomainfrom
feat/gtm2310-testing-mental-models
Dec 30, 2025
Merged

add testing vs production execution model documentation (GTM-2310)#177
czepluch merged 5 commits intomainfrom
feat/gtm2310-testing-mental-models

Conversation

@czepluch
Copy link
Contributor

  • Add credible/execution-model.mdx explaining how cl.assertion() differs from production behavior (reverts vs dropped transactions, trigger evaluation)
  • Add "Trigger Behavior in Production" section to triggers.mdx clarifying all matching assertions run
  • Add "Gas Limits" section to testing-assertions.mdx covering the happy path problem
  • Enhance troubleshooting.mdx gas limit section with happy path insight
  • Update phylax-assertions-rules.mdx snippet with testing vs production context
  • Update docs.json navigation

@linear
Copy link

linear bot commented Dec 24, 2025

Copy link
Contributor

@odyslam odyslam left a comment

Choose a reason for hiding this comment

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

Very good improvements. Added some comments for some nits, we can address them in this PR on in a following.


- Use `cl.assertion()` for testing
- State changes from non-reverting transactions are persisted
When an assertion **fails** (reverts), the transaction is rolled back as with any Solidity revert.
Copy link
Contributor

Choose a reason for hiding this comment

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

You probably mean the call or perhaps the mocked transaction as I name it in phoundry


## Gas Limits

Assertions have a 300k gas limit per assertion function. This limit exists to ensure assertion validation doesn't slow down block production.
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it clear here that Assertions here mean individual Assertion functions?

Co-authored-by: odysseas.eth <odyslam@gmail.com>
Signed-off-by: jstcz <j.czepluch@proton.me>
@czepluch czepluch merged commit 0f78ba0 into main Dec 30, 2025
3 checks passed
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.

2 participants