The first parameter of `eth_callBundle` is wrong
System information
Erigon version: 2022.02.02-beta
OS & Version: Linux
Commit hash :
Expected behaviour
The first parameter of eth_callBundle should be a list of raw txs, according to https://docs.flashbots.net/flashbots-auction/miners/mev-geth-spec/v04-rpc
Actual behaviour
The first parameter of eth_callBundle is a list of tx hashes
Steps to reproduce the behaviour
Backtrace
[backtrace]
I confirm that erigon's implementation of eth_callBundle is not compatible with the flashbots specification.
@kushalbabel is that on purpose?
FTR, a draft fix is
func (api *APIImpl) CallBundle(ctx context.Context, rawTxs []hexutil.Bytes, stateBlockNumberOrHash rpc.BlockNumberOrHash, timeoutMilliSecondsPtr *int64) (map[string]interface{}, error) {
...
var txs types.Transactions
for _, encodedTx := range rawTxs {
txn, err := types.DecodeTransaction(rlp.NewStream(bytes.NewReader(encodedTx), uint64(len(encodedTx))))
if err != nil {
return nil, err
}
txs2 = append(txs2, txn)
}
However, the request cannot be unmarshalled to []hexutil.Bytes, there is more work to be done on a unmarshable input datatype.
Hey @monperrus
It is indeed on purpose back then, as I was using this call to simulate transactions (by their hashes) at a historical state (different state than what they were actually executed on).
The call was never intended to be compatible with the flashbots specification.
Now that flashbots has grown in popularity, I agree that indeed this can cause confusion.
I propose to rename the current eth_callBundle to eth_simulate and have another implementation for eth_callBundle
I propose to rename the current eth_callBundle to eth_simulate and have another implementation for eth_callBundle
excellent idea @kushalbabel!
This issue is stale because it has been open for 40 days with no activity. Remove stale label or comment, or this will be closed in 7 days.
This issue was closed because it has been stalled for 7 days with no activity.
Any updates on this?
Is current eth_callBundle compatible with Flashbots RPC?