-
Notifications
You must be signed in to change notification settings - Fork 964
Fix eth_simulateV1 after Jovian fork
#732
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
…in the CalcDAFootprint() function.
…ovian fork based on parent.Time.
|
Could you comment about your use case here? In what context are you running these simulations? |
|
+1 |
|
@geoknee apologies for the delayed reply, was AFK. As @RealJohnnyTime mentioned, any transaction simulation currently fails (my specific use case is tx bundle simulation). Below is an example payload that reproduces the issue, in case it helps with diagnosing and resolving it. For now, I'm using a quick workaround with an artificial Jovian transaction until we settle on a proper solution. curl -X POST \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_simulateV1",
"params": [
{
"blockStateCalls": [
{
"stateOverrides": {
"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045": {
"balance": "0x21e19e0c9bab2400000"
}
},
"calls": [
{
"from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"to": "0x4200000000000000000000000000000000000015",
"value": "0x0"
}
]
}
],
"validation": false
},
"latest"
]
}' \
<YOUR_OP_STACK_RPC_URL> |
|
Thanks for the context @kustrun. I'll take another quick look and may push some commits to your branch. |
Remove exported JovianDepositTx from core/types and add a local jovianDepositTx helper in miner tests. Also remove the unused encoding/binary import from the core/types file and add it to the test files where needed.
|
/ci authorize f2b3a69 |
|
Adding an acceptance test to the monorepo here ethereum-optimism/optimism#18724. |
Co-authored-by: kustrun <[email protected]>
kustrun
left a comment
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.
Tested the fix on the live node, and it’s resolving the bug. I really like the clean, minimal solution we arrived at!
After the Jovian fork, all
eth_simulateV1calls fail with the error:"error calculating DA footprint: missing deposit transaction".The root cause is in
CalcDAFootprint(), which assumes that a deposit transaction exists attxs[0]and that it contains thedaFootprintGasScalardata. This value is required to calculate the rollup gas costs.The proposed solution modifies ONLY
eth_simulateV1by injecting a synthetic Jovian deposit transaction before the user-provided simulation transactions. This allowsCalcDAFootprint()to succeed while keeping the core block-processing logic unchanged, ensuring that simulations work without affecting normal execution.