go-ethereum
go-ethereum copied to clipboard
Batch eth_call
Multiple people have requested a variant of eth_call where multiple calls can be made in sequence, building up state.
Previous requests:
https://github.com/ethereum/go-ethereum/issues/24025#issuecomment-986377057 https://github.com/ethereum/go-ethereum/issues/22810
Implementation
If this is to be implemented, it should be a new RPC method. It could be named eth_multiCall or eth_batchCall, for example.
Any implementation of this feature needs to pay attention to the global gas cap: the combined gas usage of all chained calls should not be above this limit.
It's also an interesting question whether state overrides should be allowed per-call or just once.
It seems like it would make sense to upstream eth_callBundle from mev-geth for this: https://docs.flashbots.net/flashbots-auction/miners/mev-geth-spec/v06-rpc#eth_callbundle
Hello, I created feature request for it in 2021 AFAIR. Will try to do it using recent geth and mev code. Will you include it?
It seems like it would make sense to upstream
eth_callBundlefrom mev-geth for this: https://docs.flashbots.net/flashbots-auction/miners/mev-geth-spec/v06-rpc#eth_callbundle
This link is broken.
This is up-to-date Flashbots docs link (as of today)
And here is the mev-geth repo. Look at the CallBundle API implementation starting this line
It would indeed have been great to have the eth_callBundle ported, or reimplement something relatively similar (the callBundle logic may be a bit involved with the Flashbots "bundles" concept etc.) HTH!
We are still waiting for the spec change to be made before shipping anything in geth. It is likely that a spec change requires a champion who will defend the change in an allcoredevs call. This is to allow other Ethereum client teams to comment on the proposed API.
For the record, see add support for rpc endpoint eth_callBundle