-
Notifications
You must be signed in to change notification settings - Fork 74
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
Signature length check #453
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
akshay-ap
requested review from
nlordell,
mmv08 and
remedcu
and removed request for
a team
July 1, 2024 13:01
Pull Request Test Coverage Report for Build 9792273303Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9792380947Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9793821539Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9793865859Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9794610805Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9794652252Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9794710699Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9794912233Details
💛 - Coveralls |
akshay-ap
force-pushed
the
fix-754-signature-length-check
branch
from
July 4, 2024 13:23
1ac5075
to
c72d37f
Compare
Pull Request Test Coverage Report for Build 9795158553Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9795443863Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9795720515Details
💛 - Coveralls |
akshay-ap
force-pushed
the
fix-754-signature-length-check
branch
from
July 4, 2024 14:06
5d87857
to
2754975
Compare
Pull Request Test Coverage Report for Build 9795764381Details
💛 - Coveralls |
nlordell
reviewed
Jul 10, 2024
nlordell
reviewed
Jul 10, 2024
nlordell
reviewed
Jul 10, 2024
nlordell
reviewed
Jul 10, 2024
Co-authored-by: Nicholas Rodrigues Lordello <[email protected]>
akshay-ap
force-pushed
the
fix-754-signature-length-check
branch
from
July 11, 2024 10:57
f3807d2
to
c54c89d
Compare
nlordell
reviewed
Jul 11, 2024
nlordell
reviewed
Jul 11, 2024
nlordell
reviewed
Jul 11, 2024
nlordell
reviewed
Jul 11, 2024
nlordell
reviewed
Jul 11, 2024
nlordell
reviewed
Jul 11, 2024
nlordell
reviewed
Jul 11, 2024
Co-authored-by: Nicholas Rodrigues Lordello <[email protected]>
Co-authored-by: Nicholas Rodrigues Lordello <[email protected]>
Co-authored-by: Nicholas Rodrigues Lordello <[email protected]>
Here, we refactor the length check to not use assembly (as we didn't have a compelling argument to do so). Additionally, we added an escape hatch on the length check validation in order to allow empty signature (a reasonable "default" value) to not revert on `validateUserOp` for better developer experience with 4337, which required an additional test for full coverage.
nlordell
approved these changes
Jul 11, 2024
akshay-ap
force-pushed
the
fix-754-signature-length-check
branch
from
July 12, 2024 09:56
ab38827
to
09c4000
Compare
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related to safe-global/safe-smart-account#754
Changes in PR
_checkSignatureLength
function inSafe4437Module
contract . This function retrieves threshold from Safe and iterates over signature data._checkSignatureLength
in FV specs. The prover was reporting error without giving call traces.package.json
Open for discussion
Should
_checkSignatureLength
also do more stricter checks that are already there incheckNSignature
function ofSafe
? IfSafe4337Module
does not perform below mentioned checks then it will be implicitly assumed to be done inSafe
contract and this creates a requirement that all futureSafe
versions to have these checks if used with thisSafe4337Module
.if (signatures.length < offset)
this check is currently done twice.Other potential check that can be repeated: https://github.com/safe-global/safe-smart-account/blob/8f80a8372d193be121dcdb52e869a258824e5c0f/contracts/Safe.sol#L233
Code size change
This PR
Main branch
Impact on gas usage
This PR
Main branch