go-ethereum icon indicating copy to clipboard operation
go-ethereum copied to clipboard

Batch eth_call

Open fjl opened this issue 3 years ago • 5 comments

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.

fjl avatar Dec 09 '21 10:12 fjl

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

jwasinger avatar May 26 '22 23:05 jwasinger

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?

slawomir-pryczek avatar Jun 29 '22 11:06 slawomir-pryczek

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

This link is broken.

mteam88 avatar Sep 27 '22 14:09 mteam88

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!

pokrovskyy avatar Jan 21 '23 10:01 pokrovskyy

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.

fjl avatar Jan 21 '23 22:01 fjl

For the record, see add support for rpc endpoint eth_callBundle

monperrus avatar May 28 '24 08:05 monperrus