eth_sendRawTransactionConditional
, allows callers to conditionally include a transaction based on a set of provided options.
This feature is meant to unblock use cases that require atomic inclusion, otherwise possible on Ethereum through specialized block builders like Flashbots. Some examples:
- 4337 Bundlers utilizing a shared mempool of UserOperations. Reverted transactions due to conflicting UserOperations would make it too costly for bundlers to operate on L2, forcing the use of private mempools.
Specification
This endpoint is an extension ofeth_sendRawTransaction
, with an extra parameter of “options” with the following structure:
1000
that is allowed to prevent DoS.
Since the sequencer is not compensated for the additional state checks, otherwise through the GAS of the transaction, a configured rate limit is applied to this cost.To also discourage the use of this endpoint for MEV in comparison to
eth_sendRawTransaction
, the conditional is checked against the parent of the latest block.- error code
-32003
(transaction rejected) with a reason string as to the specific failed check - error code
-32005
(conditional cost) with a reason string if the conditional cost exceeded the maximum OR the cost was rate limited due to network conditions.
Conditional transactions are tied to the block builder they are submitted to. This means that these transactions are not gossiped between configured peers!!!If you are running an active/passive setup with replicas that gossip txs to an active sequencer, this endpoint should be fronted by a proxy that can broadcast the request to all replicas.
How to enable
This feature can be enabled with the addition of a flag to op-geth.--rollup.sequencertxconditionalenabled
(default: false) a boolean flag which enables the rpc.--rollup.sequencertxconditionalcostratelimit
(default: 5000) an integer flag that sets the rate limit for cost observable per second.
It is not advised to publicly expose this sequencer endpoint due to DoS concerns. This supplemental proxy, op-txproxy, should be used to apply additional constraints on this endpoint prior to passing through to the sequencer.