-
Notifications
You must be signed in to change notification settings - Fork 52
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
Entry Point v0.7 Support Feature Branch #694
Conversation
Correctly deserialize the `entryPoint` field, and display a more descriptive error when deserialization fails.
Factors out the verification gas estimation logic, which performs a binary search by making many `eth_call`s in a row, into a new trait, `VerificationGasEstimator`, then provide implementations for v0.6 and v0.7. Some notable fixes along the way: * Change the Rundler settings options around gas limits. There are now separate gas limits for all four things requiring gas in v0.7. * Fixed some logic around v0.7's `simulateHandleOp`, which, unlike its counterpart in v0.6, returns its results normally rather than by reverting. * Add some more functionality in and around `UserOperationBuilder` to facilitate updating fields in an existing `UserOperation`.
When validation fails in 0.7 in either simulation or gas estimation, the entry point now surfaces the inner revert which caused validation to fail. Surface this in the error response in the rpc, using the `data` field to return an object with the fields: - `entry_point_reason`: the entry point string like "AA99 some failure". This is the only field populated in v0.6. - `inner_revert_bytes`: the raw bytes of the inner revert message. - `inner_revert_reason`: if the inner revert is caused by a Solidity `require` or `assert`, then the string message provided to it.
Factors out the call gas estimation logic, which performs a binary search using the `target` and `targetData` arguments to `simulateHandleOp` along with some state override trickery, into a new trait, `CallGasEstimator`, then provides implementations for v0.6 and v0.7.
Rather than hardcoding v0.6 entry point bytecode in two places, one with the init code and one with the deployed code, use abigen to generate Rust code for the v0.6 `EntryPoint.sol` and use the bytecode that was generated. This makes v0.6 `IEntryPoint.sol` unnecessary, to remove it and convert all occurrences of `v0_6::i_entry_point::IEntryPoint` to `v0_6::entry_point::EntryPoint`.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files
... and 1 file with indirect coverage changes
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
Send it
Proposed Changes