-
Notifications
You must be signed in to change notification settings - Fork 47
Add proxyd support for routing transactions to ingress RPC #334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
niran
wants to merge
8
commits into
flashbots:main
Choose a base branch
from
niran:proxyd
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add support for the proxyd component from Base's infra-routing repository, enabling transparent routing of transaction submission methods to an ingress RPC endpoint while routing all other RPC methods to the standard execution layer. Key changes: - Add Proxyd component that uses Base's proxyd Docker image - Generate proxyd TOML configuration with method-based routing - Add --proxyd and --ingress-rpc flags to OpStack recipe - Route transaction submission methods to ingress endpoint - Route all other methods to standard EL (op-geth or rollup-boost) - Expose proxyd on port 8545 (mapped to dynamic host port) - Update documentation with new flags The proxyd configuration routes the following methods to ingress: - eth_sendRawTransaction (standard transaction submission) - eth_sendBundle (bundle submission) - eth_sendBackrunBundle (backrun bundle submission) - eth_cancelBundle (bundle cancellation) - eth_sendUserOperation (ERC-4337 user operation submission) All other RPC methods are routed to the standard execution layer node.
Use us-docker.pkg.dev/oplabs-tools-artifacts/images/proxyd which is the publicly available proxyd image from OP Labs, instead of the non-existent docker.io/base/proxyd image.
proxyd requires explicit method mappings - there is no default fallback. Add mappings for all standard Ethereum JSON-RPC methods to route them to the standard backend, while keeping transaction submission methods routed to ingress: - Transaction submission to ingress: eth_sendRawTransaction, eth_sendBundle, eth_sendBackrunBundle, eth_cancelBundle, eth_sendUserOperation - All other methods to standard: eth_chainId, eth_call, eth_getBalance, eth_blockNumber, and all other standard Ethereum RPC methods
When --flashblocks is enabled, use flashblocks-rpc as standard backend (handles both standard RPC methods and base_meter* methods). Add --proxyd-ingress-methods and --proxyd-standard-methods flags for custom method routing.
Add unit and integration tests covering: - Proxyd TOML config generation with correct backend routing - Flashblocks-rpc as standard backend when enabled - Custom method routing via CLI flags - Recipe integration with various flag combinations - Proxyd service in manifest and output Tests verify: - Transaction submission methods route to ingress - Standard Ethereum methods route to standard backend - Base-specific methods (base_meter*) route correctly - Custom methods can be added via flags - Proxyd endpoint is accessible and functional All unit tests pass without requiring INTEGRATION_TESTS=true.
Collaborator
|
Thank you for the contribution. Could you write the proxyd config in the component itself? This is something I am iterating on to avoid having to go through the artifacts for specific per component configurations. This is an example. |
The flag was wrapping the value with http:// and :8080, causing malformed URLs when users passed a full URL. Now mirrors --external-builder behavior.
Add comments documenting that proxyd and websocket-proxy images are amd64-only, with instructions for building from source on other architectures and using --override flags.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Add support for proxyd from OP Labs to enable transparent routing of RPC methods:
Key Features
us-docker.pkg.dev/oplabs-tools-artifacts/images/proxydimage--flashblocksflagUsage
Implementation Details
Two-Backend Architecture
Ingress backend: Routes transaction submission methods
Standard backend: Routes everything else
--flashblocksdisabled: op-geth--flashblocksenabled: flashblocks-rpc (handles standard methods + base_meter*)Default Method Mappings
Includes all standard Ethereum RPC methods (eth_call, eth_blockNumber, etc.) and Base-specific methods (base_transactionStatus, base_meterBundle, etc.)
Custom Method Routing
--proxyd-ingress-methods: Route additional methods to ingress--proxyd-standard-methods: Route additional methods to standard backendTesting
Tested with: