-
Notifications
You must be signed in to change notification settings - Fork 287
feat: add mempool-bridge service integration #1222
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
Open
barnabasbusa
wants to merge
20
commits into
main
Choose a base branch
from
barnabasbusa/add-mempool-bridge
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.
Open
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 mempool-bridge service to bridge mempool transactions between execution layer nodes. Changes: - Created mempool_bridge_launcher.star module - Added config template for dynamic node configuration - Integrated service into additional_services workflow - Exposes HTTP API on port 9090 Usage: Add 'mempool_bridge' to additional_services list to enable. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- Fix config template to use source/target nodeRecords structure - Add mempool_bridge to allowed additional services - Add test configuration for mempool-bridge with 3 node setup - Verified service starts successfully with corrected config 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Add mempool_bridge_params configuration: - Auto-detects shadowfork networks and sets source URL - Uses ethpandaops RPC endpoint for shadowforks (e.g. rpc.hoodi.ethpandaops.io) - Allows custom source_url override via params - Updates config template to conditionally include source section Changes: - Added mempool_bridge_params to input_parser with get_default_mempool_bridge_params() - Updated launcher to accept and use mempool_bridge_params - Modified config template to support optional source endpoints - Added sanity check validation for mempool_bridge_params - Updated test config to demonstrate shadowfork usage Example shadowfork usage: ```yaml network_params: network: hoodi-shadowfork additional_services: - mempool_bridge ``` 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Critical fix: mempool-bridge uses devp2p protocol (ENR/enode), not HTTP RPC. Changes: - Updated launcher to extract enode/enr from EL contexts instead of HTTP URLs - Added fallback: uses first node as source if no source_url specified - Updated config template to match mempool-bridge example format - Added logging and metricsAddr fields - Added retryInterval to source/target sections - Fixed source_url param comments to clarify ENR/enode requirement For shadowforks, users must provide enode/enr of source network: ```yaml mempool_bridge_params: source_url: "enode://[email protected]:30303" ``` Resolves connection issues where peers were disconnected due to incorrect HTTP URL format. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Change mempool_bridge_params from single source_url to source_enodes list to support multiple bootnode enodes for shadowfork networks. Changes: - Renamed source_url to source_enodes (list of enode strings) - Updated launcher to iterate over source_enodes list - Added example hoodi shadowfork test config with enodes from eth-clients repo - Updated sanity check and struct definitions Usage for shadowforks: ```yaml network_params: network: hoodi-shadowfork mempool_bridge_params: source_enodes: - "enode://pubkey1@ip1:30303" - "enode://pubkey2@ip2:30303" ``` Enode sources: - mainnet: https://github.com/eth-clients/mainnet/blob/main/metadata/enodes.yaml - sepolia: https://github.com/eth-clients/sepolia/blob/main/metadata/enodes.yaml - hoodi: https://github.com/eth-clients/hoodi/blob/main/metadata/enodes.yaml - holesky: https://github.com/eth-clients/holesky/blob/main/metadata/enodes.yaml 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Remove get_default_mempool_bridge_params function and initialize params with empty list by default. This avoids unnecessary processing when mempool_bridge service is not enabled. Changes: - Initialize mempool_bridge_params as {"source_enodes": []} directly - Remove unused get_default_mempool_bridge_params function - Add documentation comment pointing to eth-clients repos - No functional changes, params work same as before This ensures we only process mempool bridge configuration when the service is actually requested by the user. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Automatically fetch source enodes from eth-clients GitHub repos at runtime when launching mempool-bridge for shadowfork networks. No hardcoding needed. Changes: - Added fetch_enodes_from_url() function that uses curl to fetch YAML - Auto-detects shadowfork network and fetches from appropriate repo: * mainnet, sepolia, hoodi, holesky supported - Uses first EL service to run curl command - Parses YAML to extract enode lines and strip comments - Falls back to first local node if fetch fails or not shadowfork - Updated test config to rely on auto-fetch (no hardcoded enodes) Usage for shadowforks: ```yaml network_params: network: hoodi-shadowfork additional_services: - mempool_bridge ``` Enodes are fetched fresh each time from: https://github.com/eth-clients/{network}/blob/main/metadata/enodes.yaml 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Simplified fetch_enodes_from_url to trust the shell command output and use list comprehension for cleaner parsing. The shell command (curl | grep | sed) does all the heavy lifting: - Fetches YAML from URL - Extracts lines starting with '- enode:' - Strips '- ' prefix and '# comment' suffix No need for extra validation loops - just split and filter empty lines. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Signed-off-by: Barnabas Busa <[email protected]>
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 the mempool-bridge service to bridge mempool transactions between execution layer nodes in the network.
Changes
New module:
src/mempool_bridge/mempool_bridge_launcher.star
ethpandaops/mempool-bridge:latest
Configuration template:
static_files/mempool-bridge-config/config.yaml.tmpl
Integration: Updated
main.star
andsrc/static_files/static_files.star
Usage
Add
mempool_bridge
to theadditional_services
list in your network configuration:The service will automatically:
Test plan
🤖 Generated with Claude Code