-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
fix code coverage - stack too deep issues #12843
Conversation
Note: forge coverage works if lib-keccak merges this ethereum-optimism/lib-keccak#6 and we update the dependency |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #12843 +/- ##
===========================================
- Coverage 44.44% 44.30% -0.14%
===========================================
Files 801 801
Lines 72001 72001
===========================================
- Hits 31999 31900 -99
- Misses 37393 37494 +101
+ Partials 2609 2607 -2
Flags with carried forward coverage won't be shown. Click here to find out more. |
Also, for |
It will take some time to get this PR merged as it changes prod contracts but it's a valuable reference because it allows us to generate coverage reports either way. |
this is now implemented. |
This is now updated |
/// @custom:semver 1.1.3-beta.7 | ||
string public constant version = "1.1.3-beta.7"; |
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.
accidental semver bump?
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.
Nope, lib-keccak was updated
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.
That makes sense, but do we normally bump semvers when a dependency bump happens? I'm supportive of it because it changes the bytecode, but I suspect historically we've been bad at this and need a way to better automate semver bumps (cc @smartcontracts)
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.
Yeah it's actually on the to-do @smartcontracts
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.
CI will at least force you to semver bump when dependencies are changed
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.
We are planning to simplify things and remove contract-specific semvers as part of the OPCM Upgrades work in ethereum-optimism/design-docs#159. That design review is today (at 1030am PT)
/// @custom:field _l2ChainId Chain ID of the L2 network this contract argues about. | ||
/// @custom:field _proposer Address that is allowed to create instances of this contract. | ||
/// @custom:field _challenger Address that is allowed to challenge instances of this contract. | ||
struct PDGConstructorParams { |
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.
Does it still solve stack too deep if we remove proposer and challenger from this struct and have those as individual inputs? The rationale being we can then keep the interface between the PDG and regular FDG more similar, and have them both take the same FDGConstructorParams
arg, then PDF just takes two extra args
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.
@mds1 yeah I was thinking the same, would be nicer that way imo.
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.
It compiles with forge coverage this way but would need to be excluded from interfaces check. Couldn't find a way to use this struct for both contracts without breaking the interfaces check for IPermissionedDisputeGame.sol. The only option is verbose and probably unneccesarily more costly gas-wise.
constructor (DGConstructorParams memory _params) FaultDisputeGame(FaultDisputeGame.DGConstructorParams({
_gameType: _params._gameType,
_absolutePrestate: _params._absolutePrestate,
...
})) {
...
}
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.
Hmm, ok, I'll take a look at this and see if I can get it to pass the checks
Overall pretty small diff to fix stack too deep. This is awesome, nice work! |
… into sc/fix-code-coverage
… into sc/fix-code-coverage
… into sc/fix-code-coverage
… into sc/fix-code-coverage
… into sc/fix-code-coverage
… into sc/fix-code-coverage
This PR was broken down into multiple PRs and merged into develop. |
No description provided.