-
Notifications
You must be signed in to change notification settings - Fork 271
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
[contract-deploy] Ensure there are no private functions with duplicate selectors #4433
Comments
What is the usecase for partial registration? How could you trust something you've only seen part of? |
True, I don't see any real use case for that. |
After discussion with @nventuro and @spalladino, it seems like we will want this check in three places.
With this in mind, I have made three sub-issues for this issue. |
We want to ensure there are no two private functions in the same contract with the same selector. However, it's unclear where we can verify this. A malicious user could register a class with a function tree that contains duplicates, and we have no way to catch it. We could reject this at the pxe, so that when it receives a contract artifact, it checks for duplicates. Note that, if we allow a dapp to register partial artifacts (ie not all private functions) it may still be possible for an attacker to squeeze in duplicate selectors. In Mike's words:
The text was updated successfully, but these errors were encountered: