-
Notifications
You must be signed in to change notification settings - Fork 2.1k
feat(anvil): bypass authorization signatures for testing #11178
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
base: master
Are you sure you want to change the base?
feat(anvil): bypass authorization signatures for testing #11178
Conversation
a5930b4
to
158fb0d
Compare
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.
thank you! I am not sure we want to add a new endpoint to handle that but rather validate or do not panic when is empty? @zerosnacks @mattsse pls chime in
This comment has been minimized.
This comment has been minimized.
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, this doesnt make too much sense just yet because this doesnt really allow bypassing the 7702 auths yet
how this should behave is, this should take a signature and a corresponding address that we use as the recovered address of the auth
this is quite similar to
but we need a way to match the signature to an address
@Soubhik-10 is currently working on #5381 which has a lot of synergies with this task here, so my recommendation is we wait for this task first
but for this pr, we'd then need to "recover" the auths when we're transacting the 7702 tx
Got it. Thanks for the explanation. Will wait that issue to be solved. |
will provide more pointers once we have #5381 should be straight forward then |
@shiyasmohd this is now unblocked, and we now have access to the cheatsmanager directly in the executor do you need additional pointers to continue this? lmk ref #11308 |
Thanks @mattsse ! Small additional pointers/hints would help. Just to make sure that I'm going in the right direction. |
so we now already have an anvil_impersonateSignature so we can undo the additional ones in this pr and then we need to check if the txs are 7702 then we need to check if we have the signatures impersonated foundry/crates/anvil/src/eth/backend/executor.rs Lines 269 to 273 in 575bf62
via
|
158fb0d
to
7ced0d2
Compare
7ced0d2
to
15adbe4
Compare
@mattsse Could you review the PR and check if this is the approach you mentioned? |
Motivation
As mentioned in #11170, We could also provide a way to bypass signature verification for authorization list checks in transactions, enabling simulation without requiring actual signatures.
Solution
anvil_setBypassAuthorizationChecks(bool)
that allows developers to bypass authorization signature.Closes #11170