Skip to content
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

Add method for optionally disabling EIP-3607 for eth_call and eth_estimateGas #1959

Closed
Rjected opened this issue Mar 24, 2023 · 1 comment · Fixed by #1961
Closed

Add method for optionally disabling EIP-3607 for eth_call and eth_estimateGas #1959

Rjected opened this issue Mar 24, 2023 · 1 comment · Fixed by #1961
Labels
A-execution Related to the Execution and EVM A-rpc Related to the RPC implementation C-enhancement New feature or request

Comments

@Rjected
Copy link
Member

Rjected commented Mar 24, 2023

Describe the feature

The hive test eth_call/call-simple-transfer sends an eth_call RPC with a from parameter of an account that has deployed code.

The call:

{"jsonrpc":"2.0","id":1,"method":"eth_call","params":[{"from":"0xaa00000000000000000000000000000000000000","gas":"0x186a0","to":"0x0100000000000000000000000000000000000000"},"latest"]}

The account (0xaa00000000000000000000000000000000000000):
https://github.com/ethereum/execution-apis/blob/main/tests/genesis.json#L34-L44

This motivates a way to optionally disable EIP-3607.

EIP-3607 notes:

Clients might choose to disable this rule for RPC calls like eth_call and eth_estimateGas as some Multi-Sig contracts use these calls to create transactions as if they originated from the multisig contract itself.

Additional context

Once #1958 is in, it should be easy to test support by running the hive test:

./hive --client reth --sim ethereum/rpc-compat --sim.limit "/eth_call/call-simple-transfer"

Output:

>>  {"jsonrpc":"2.0","id":1,"method":"eth_call","params":[{"from":"0xaa00000000000000000000000000000000000000","gas":"0x186a0","to":"0x0100000000000000000000000000000000000000"},"latest"]}
<<  {"jsonrpc":"2.0","error":{"code":-32003,"message":"sender not an eoa"},"id":1}
response differs from expected:
 {
-  "error": {
-    "code": -32003,
-    "message": "sender not an eoa"
-  },
   "id": 1,
   "jsonrpc": "2.0"
+  "result": "0x"
 }
@Rjected Rjected added C-enhancement New feature or request S-needs-triage This issue needs to be labelled A-rpc Related to the RPC implementation A-execution Related to the Execution and EVM and removed S-needs-triage This issue needs to be labelled labels Mar 24, 2023
@gakonst
Copy link
Member

gakonst commented Mar 24, 2023

Here's how we did it in foundry https://github.com/search?q=repo%3Afoundry-rs%2Ffoundry%20eip-3607&type=code

Revm has an option called disable_eip3607 behind an optional_eip3607 feature flag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-execution Related to the Execution and EVM A-rpc Related to the RPC implementation C-enhancement New feature or request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants