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

👷 enable the --ir-minimum flag for forge coverage #49

Merged
merged 4 commits into from
Dec 15, 2023

Conversation

qd-qd
Copy link
Member

@qd-qd qd-qd commented Dec 15, 2023

The coverage commands do not run the optimizer, meaning it is more
sensible to the stack depth error. We have reached a point where our stack
management can't do without the optimizer, that's why we have to enable
this flag for the coverage command.

qd-qd and others added 3 commits December 15, 2023 16:34
In the FCL repository, @nlordell pointed out the mulmuladd function had a
bug revealed by the edge cases committed by @rdubois-crypto.
This PR fixes that bug like @nlordell did and add the relevant edge cases.
Link of the initial PR: rdubois-crypto/FreshCryptoLib#5

Co-authored-by: Nicholas Rodrigues Lordello <[email protected]>
Co-authored-by: rdubois-crypto <[email protected]>
By moving the assignment of variable `T3` further down the function, our
stack management is now more efficient. This gives us greater flexibility.
The coverage commands do not run the optimizer, meaning it is more
sensible to the stack depth error. We have reached a point where our stack
management can't do without the optimizer, that's why we have to enable
this flag for the coverage command.
@qd-qd qd-qd self-assigned this Dec 15, 2023
Copy link

github-actions bot commented Dec 15, 2023

LCOV of commit 6ee85af during Tests #208

Summary coverage rate:
  lines......: 41.6% (32 of 77 lines)
  functions..: 100.0% (7 of 7 functions)
  branches...: no data found

Files changed coverage rate:
                     |Lines       |Functions  |Branches    
  Filename           |Rate     Num|Rate    Num|Rate     Num
  =========================================================
  src/ECDSA256r1.sol |51.4%     35| 100%     2|    -      0

@qd-qd qd-qd changed the title 👷 enable --ir-minimum flag for forge coverage 👷 enable the --ir-minimum flag for forge coverage Dec 15, 2023
It seems the new configuration of the tests return now a different code
coverage. This is probably due to the fact that the tests are now run
with the `--ir-minimum` flag. In waiting for an investigation, I remove
the treshold for the code coverage.
Base automatically changed from fix/edge-cases to main December 15, 2023 16:12
@qd-qd qd-qd merged commit d44c4a8 into main Dec 15, 2023
6 checks passed
@qd-qd qd-qd deleted the fix/coverage-stack-too-deep branch December 15, 2023 16:12
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.

1 participant