proxyd as an ingress router supports the mapping of specific methods to unique backends.
Methods
eth_sendRawTransactionConditional
To safely expose this endpoint publicly, additional stateless constraints are applied. These constraints help scale validation rules horizontally and preemptively reject conditional transactions before they reach the sequencer. Various metrics are emitted to guide necessary adjustments.Runtime shutoff
This service can be configured with a flag or environment variable to reject conditional transactions without needing to interrupt the execution engine. This feature is useful for diagnosing issues.--sendRawTxConditional.enabled (default: true) ($OP_TXPROXY_SENDRAWTXCONDITIONAL_ENABLED)
When disabled, requests will fail with the -32003
(transaction rejected) json rpc error code with a message stating that the method is disabled.
Rate limits
Even though the op-geth implementation of this endpoint includes rate limits, it is instead applied here to terminate these requests early.--sendRawTxConditional.ratelimit (default: 5000) ($OP_TXPROXY_SENDRAWTXCONDITIONAL_RATELIMIT)
Stateless validation
- Conditional cost is below the max
- Conditional values are valid (i.e min < max)
- Transaction targets are only 4337 Entrypoint contracts
The motivating factor for this endpoint is to enable permissionless 4337 mempools, hence the restricted usage of this method to just Entrypoint transactions.Please open up an issue if you’d like this restriction to be optional via configuration to broaden usage of this endpoint.
--sendRawTxConditional.backend ($OP_TXPROXY_SENDRAWTXCONDITIONAL_BACKENDS)
Per the specification, conditional transactions are not gossiped between peers. Thus, if you use replicas in an active/passive sequencer setup, this request must be broadcasted to all replicas.proxyd as an egress router for this method supports this broadcasting functionality.
How it works
To start usingop-txproxy
, follow these steps:
1
Build the binary or pull the Docker image
- Run the following command to build the binary
- This will build and output the binary under
/bin/op-txproxy
.
2
Configure
The binary accepts configuration through CLI flags, which also settable via environment variables. Either set the flags explicitly when starting the binary or set the environment variables of the host starting the proxy.See methods on the configuration options available for each method.
3
Start
start the service with the following command