-
Notifications
You must be signed in to change notification settings - Fork 16
feat: lockdown bundles before execution #24
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
Conversation
src/Hub.sol
Outdated
| function multicallFromBundler(Call[] calldata bundle) external payable { | ||
| require(msg.sender == currentBundler(), ErrorsLib.UnauthorizedSender(msg.sender)); | ||
| _multicall(calls); | ||
| require(useBundleHash() == keccak256(callDataArgs()), ErrorsLib.InvalidBundle()); |
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.
This only checks that the stored bundle hash matches msg.data[4:].
It is technically possible to send extra calldata after the bundle argument such that bundle does not hash correctly and msg.data does hash correctly, but that would mean a hash collision was found.
|
Closing because the main usecase is a module that interacts with changing / upgradeable contracts. In this scenario the module can do the bundle integrity check itself. |
Lock down bundle content and ordering. See issue #61.
multicallhas a 2nd argument:bytes32[] callbackBundlesHashes. The argument of the nth call tomulticallFromBundleris hashed and checked against the nthcallbackBundlesHashes.edit: compared to #165 / #167: