Skip to content

Commit 7302972

Browse files
authored
doc updates (#875)
## πŸ“ Summary - rbuilder cfg - Reth command line ## πŸ’‘ Motivation and Context Got in a fight with my wife so I would rather do this boring stuff than face her. ## βœ… I have completed the following steps: * [X] Run `make lint` * [X] Run `make test` * [ ] Added tests (if applicable)
1 parent 5722eb5 commit 7302972

2 files changed

Lines changed: 55 additions & 28 deletions

File tree

β€ŽREADME.mdβ€Ž

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ For more details on how to use rbuilder for backtesting, see https://github.com/
3636
To run rbuilder you need:
3737
* Reth node for state. (`reth_datadir`)
3838
* Reth node must expose ipc interface for mempool tx subscription (`el_node_ipc_path`).
39+
* Reth node must be configured to flush every block (--engine.persistence-threshold "0" --engine.memory-block-buffer-target "0")
3940
* CL node that triggers new payload events (it must be additionally configured to trigger payload event every single time).
4041
* Source of bundles that sends `eth_sendBundle`, `mev_sendBundle`, `eth_sendRawTransaction` as JSON rpc calls. (`jsonrpc_server_port`)
4142
(by default rbuilder will take raw txs from the reth node mempool)
@@ -55,7 +56,22 @@ A sample configuration for running Lighthouse and triggering payload events woul
5556
--prepare-payload-lookahead 8000 \
5657
--suggested-fee-recipient 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045
5758
```
58-
59+
and for reth:
60+
```
61+
/usr/local/bin/reth node \
62+
--datadir /mnt/md0/rethdata \
63+
--authrpc.jwtsecret /secrets/jwt.hex \
64+
--authrpc.addr 127.0.0.1 \
65+
--authrpc.port 8551 \
66+
--http \
67+
--ws \
68+
--ws.addr 127.0.0.1 \
69+
--ws.port 8545 \
70+
--rpc-max-connections 429496729 \
71+
--http.api trace,web3,eth,debug \
72+
--ws.api trace,web3,eth,debug \
73+
--engine.persistence-threshold "0" --engine.memory-block-buffer-target "0"
74+
```
5975
Additionally, you can:
6076
* configure block processor API as a sink for submitted blocks (`blocks_processor_url`)
6177
* setup Prometheus / Grafana for metrics (served on `telemetry_port` + `/debug/metrics/prometheus`)

β€Ždocs/CONFIG.mdβ€Ž

Lines changed: 38 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -5,51 +5,56 @@ Every field has a default if omitted.
55

66
| Name | Type | Comments | Default |
77
|------|------|-------------|---------|
8-
|full_telemetry_server_port|string| |"0.0.0.0"|
9-
|full_telemetry_server_ip|int || 6069|
10-
|redacted_telemetry_server_port|string| |"0.0.0.0"|
11-
|redacted_telemetry_server_ip|int || 6070|
8+
|full_telemetry_server_port|int| |6069|
9+
|full_telemetry_server_ip|string| |"0.0.0.0"|
10+
|redacted_telemetry_server_port|int| |6070|
11+
|redacted_telemetry_server_ip|string| |"0.0.0.0"|
1212
|log_json|bool|JSON vs Raw|false|
1313
|log_level|env/string| Defines the log level (EnvFilter) for each mod. See https://docs.rs/tracing-subscriber/latest/tracing_subscriber/index.html for more info on this.|"info"
1414
|log_color|bool||false|
15+
|otlp_env_name|optional string|Name of the OTEL environment (e.g. production, staging).|None|
1516
|error_storage_path|optional string| Path to a sqlite file that will store info for some critical errors|None|
1617
|coinbase_secret_key|optional env/string|If no key is provided a random one is generated. Format is "0x121232432...."|None|
1718
|el_node_ipc_path|optional string| Path for Ipc communication with reth's mempool, Usually something like "/tmp/reth.ipc". If not set mempool will not be used as a source of txs|None|
18-
|jsonrpc_server_port| int| |8645|
19+
|jsonrpc_server_port|int| |8645|
1920
|jsonrpc_server_ip|string||"0.0.0.0"|
20-
|jsonrpc_server_max_connections|int|The maximum number of connections|4096|
21+
|jsonrpc_server_max_connections|optional int|Max connections for JSON-RPC server. If omitted, 4096 is used.|None (effective 4096)|
2122
|ignore_cancellable_orders|bool|If true any order with replacement id will be dropped|true|
2223
|ignore_blobs|bool|If true txs with blobs will be ignored|false|
2324
|chain|string| |"mainnet"|
2425
|reth_datadir|optional string|It will assume default child dirs "db"/"static_files".<br> **It's mandatory to set reth_datadir or reth_db_path+reth_static_files_path or ipc_provider**|"/mnt/data/reth"|
2526
|reth_db_path|optional string|**It's mandatory to set reth_datadir or reth_db_path+reth_static_files_path or ipc_provider**|None|
2627
|reth_static_files_path|optional string|**It's mandatory to set reth_datadir or reth_db_path+reth_static_files_path or ipc_provider**|None|
27-
|ipc_provider|optional | If configured it will use IPC provider for EVM state (instead of accessing a local reth db). More doc pending.|None|
28+
|ipc_provider|optional object| If set, use IPC for EVM state instead of local reth db. Fields: **ipc_path** (path), **request_timeout_ms** (u64, default 100), **mempool_server_url** (string).|None|
2829
|blocklist_file_path|optional string| Backwards compatibility. Downloads blocklist from a file. Same as setting a file name on blocklist.|None|
2930
|blocklist|optional string| Can contain an url or a file name.<br> If it's a url download blocklist from url and updates periodically.<br>If it's a filename just loads the file (no updates).|None|
3031
|blocklist_url_max_age_hours|optional int|If the downloaded file get older than this we abort.|None|
3132
|blocklist_url_max_age_secs|optional int|If the downloaded file get older than this we abort. Used for debugging only|None|
32-
|require_non_empty_blocklist|bool|if true will not allow to start without a blocklist or with an empty blocklist.|false|
33+
|require_non_empty_blocklist|optional bool| If true, will not allow start without a blocklist or with an empty blocklist.|false|
3334
|extra_data|string|Extra data for generated blocks|"extra_data_change_me"|
3435
|simulation_threads|int| Number of threads used for incoming order simulation|1|
3536
|simulation_use_random_coinbase|bool| |true|
3637
|root_hash_use_sparse_trie|bool| Uses cached sparse trie for root hash (much faster)|false|
38+
|root_hash_sparse_trie_version|string| Sparse trie version: "v1" or "v2".|"v1"|
3739
|root_hash_compare_sparse_trie|bool| If using sparse trie also computes against reth's native version to check the hash is ok|false|
38-
|root_hash_threads| int|Threads used when using reth's native root hash calculation. If 0 global rayon pool is used| 0
39-
| watchdog_timeout_sec| optional int| If now block building is started in this period rbuilder exits.|None|
40+
|root_hash_threads|int|Threads used when using reth's native root hash calculation. If 0 global rayon pool is used|0|
41+
|adjust_finalized_blocks|bool| Use pipelined finalization (blocks prefinalized first, payment tx inserted later for faster bidding).|false|
42+
|watchdog_timeout_sec|optional int| If no block building is started in this period rbuilder exits.|None|
4043
|live_builders|vec[string]| List of `builders` to be used for live building.<br>Notice that you can define on **builders** some builders and select only a few here.|["mgp-ordering","mp-ordering"]|
4144
|evm_caching_enable|bool|If enabled per block EVM execution will be enabled|false|
4245
|faster_finalize|bool| If enabled improves block finalization by catching proofs|false|
43-
|time_to_keep_mempool_txs_secs|u64| /// After this time a mempool tx is dropped.|1|
46+
|time_to_keep_mempool_txs_secs|u64| After this time a mempool tx is dropped.|60|
47+
|system_recipient_allowlist|vec[Address]| Senders from which incoming tx profit is not counted towards coinbase profit.|[]|
4448
|backtest_fetch_mempool_data_dir|env/string|Dir used to store mempool data used in backtesting|"/mnt/data/mempool"|
4549
|backtest_fetch_eth_rpc_url|string|url to EL node RPC used in backtesting|"http://127.0.0.1:8545"|
46-
|backtest_fetch_eth_rpc_parallel| int|Number of parallel connections allowed on backtest_fetch_eth_rpc_url|1|
50+
|backtest_fetch_eth_rpc_parallel|int|Number of parallel connections allowed on backtest_fetch_eth_rpc_url|1|
4751
|backtest_fetch_output_file|string | Path to a sqlite containing block information for backtesting. This file is filled with backtest-fetch|"/tmp/rbuilder-backtest.sqlite"|
4852
|backtest_results_store_path|string|Path to a sqlite containing backtest results|"/tmp/rbuilder-backtest-results.sqlite"|
4953
|backtest_builders|vec[string]| List of `builders` to be used for backtesting.<br>Notice that you can define on **builders** some builders and select only a few here.|[]|
5054
|backtest_protect_bundle_signers|vec[string]|Doc pending.|[]|
51-
|orderflow_tracing_store_path|Optional string|We will store a file per block in this path.|None|
52-
|orderflow_tracing_max_blocks|Optional int|Max number of blocks to keep in disk.<br>Remember to also set this if you enable orderflow_tracing_store_path.|None|
55+
|orderflow_tracing_store_path|optional string|We will store a file per block in this path.|None|
56+
|orderflow_tracing_max_blocks|int|Max number of blocks to keep on disk. Set &gt; 0 if you enable orderflow_tracing_store_path.|0|
57+
|max_order_execution_duration_warning_us|optional u64| If set, log a warning when an order execution exceeds this duration (microseconds).|None|
5358

5459
## L1 related fields
5560
| Name | Type | Comments | Default |
@@ -68,20 +73,25 @@ Every field has a default if omitted.
6873
|RelayConfig.optimistic|optional bool||false|
6974
|RelayConfig.interval_between_submissions_ms|optional int| Caps the submission rate to the relay|None|
7075
|RelayConfig.max_bid_eth|optional string| Max bid we can submit to this relay. Any bid above this will be skipped.<br>None -> No limit.|None|
76+
|RelayConfig.adjustment_fee_payer|optional string| Address that pays bid adjustment fees for this relay.|None|
77+
|RelayConfig.submit_config.optimistic_v3|bool| Use optimistic V3 submissions for this relay.|false|
78+
|RelayConfig.submit_config.optimistic_v3_bid_adjustment_required|bool| Whether bid adjustments are required for optimistic V3.|false|
7179
|RelayConfig.is_bloxroute|bool|Set to `true` for bloxroute relays to add extra headers.|false|
80+
|RelayConfig.bloxroute_rproxy_regions|vec[string]| Bloxroute rproxy regions to try, in order of preference.|[]|
81+
|RelayConfig.bloxroute_rproxy_only|bool| If true, only submit to bloxroute rproxy endpoints when available.|false|
7282
|RelayConfig.ask_for_filtering_validators|optional bool| Adds "filtering=true" as query to the call relay/v1/builder/validators to get all validators (including those filtering OFAC).<br>On 2025/06/24 only supported by ultrasound.|false|
7383
|RelayConfig.can_ignore_gas_limit|optional bool| If we submit a block with a different gas than the one the validator registered with in this relay the relay does not mind. Useful for gas limit conflicts. On 2025/08/20 only ultrasound confirmed that is ok with this. (we didn't asked the rest yet)|false|
74-
|enabled_relays| vec["string"]| Extra hardcoded relays to add (see DEFAULT_RELAYS in [config.rs](../crates/rbuilder/src/live_builder/config.rs))|[]|
75-
|relay_secret_key|optional env/string|Secret key that will be used to sign normal submissions to the relay.|None|
76-
|optimistic_relay_secret_key|optional env/string|Secret key that will be used to sign optimistic submissions to the relay.|None|
77-
|optimistic_enabled|bool|When enabled builder will make optimistic submissions to optimistic relays|false|
78-
|optimistic_max_bid_value_eth|string| Bids above this value will always be submitted in non-optimistic mode.|"0.0"|
79-
|cl_node_url|vec[env/stirng]| Array if urls to CL clients to get the new payload events|["http://127.0.0.1:3500"]
84+
|enabled_relays|vec[string]| Extra hardcoded relays to add (see DEFAULT_RELAYS in [config.rs](../crates/rbuilder/src/live_builder/config.rs))|[]|
85+
|relay_secret_key|optional env/string|Secret key that will be used to sign submissions to the relay.|None|
86+
|cl_node_url|vec[env/string]| Array of urls to CL clients to get the new payload events.|["http://127.0.0.1:3500"]
8087
|genesis_fork_version|optional string|Genesis fork version for the chain. If not provided it will be fetched from the beacon client.|None|
8188
|relay_bid_scrapers||See [bid scraper publishers](../crates/bid-scraper/README.md) |Empty|
82-
|max_order_execution_duration_warning_us|optional u64| If set, while building a block if an order execution duration is greater than this, we will log a warning with some info about the order.|None|
89+
|optimistic_v3_server_ip|string| Optimistic V3 server bind IP.|"0.0.0.0"|
90+
|optimistic_v3_server_port|int| Optimistic V3 server port.|6071|
91+
|optimistic_v3_public_url|string| Public URL where relays can fetch blocks (for optimistic V3).|""|
92+
|optimistic_v3_relay_pubkeys|set[string]| BLS public keys of relays that may use optimistic V3.|[]|
8393
## Building algorithms
84-
rbuilder can multiple building algorithms and each algorithm can be instantiated multiple times with it's own set of parameters each time.
94+
rbuilder can use multiple building algorithms and each algorithm can be instantiated multiple times with it's own set of parameters each time.
8595
Each instantiated algorithm starts with:
8696
| Name | Type | Comments | Default |
8797
|------|------|-------------|---------|
@@ -101,16 +111,17 @@ Each instantiated algorithm starts with:
101111

102112
### Fields for algo="parallel-builder"
103113

104-
105114
| Name | Type | Comments | Default |
106115
|------|------|-------------|---------|
107-
|discard_txs|mandatory bool| If a tx inside a bundle fails with TransactionErr (don't confuse this with reverting which is TransactionOk with !.receipt.success) and it's configured as allowed to revert (for bundles tx in reverting_tx_hashes or dropping_tx_hashes) we continue the execution of the bundle. The most typical value is true.||
108-
|num_threads| mandatory int| Number of threads to use for merging.||
116+
|discard_txs|mandatory bool| If a tx inside a bundle fails with TransactionErr (don't confuse this with reverting which is TransactionOk with !.receipt.success) and it's configured as allowed to revert (for bundles tx in reverting_tx_hashes or dropping_tx_hashes) we continue the execution of the bundle. The most typical value is true.||
117+
|num_threads|mandatory int| Number of threads to use for merging.||
118+
|safe_sorting_only|bool| Only use sort modes that don't risk breaking "best refund for user" (avoids putting worst kickback first).|true|
109119

110120
## Bidding fields
111121
| Name | Type | Comments | Default |
112122
|------|------|-------------|---------|
113-
|slot_delta_to_start_bidding_ms| optional int| When the sample bidder (see TrueBlockValueBiddingService) will start bidding relative to the slot start.<br>Usually a negative number.|None|
114-
|subsidy|optional string|Value added to the bids (see TrueBlockValueBiddingService).<br>The builder address must have enough balance for the subsidy.<br>Example:"1.23" for 1.23 ETH|None|
123+
|slot_delta_to_start_bidding_ms|optional int| When the sample bidder (see TrueBlockValueBiddingService) will start bidding relative to the slot start.<br>Usually a negative number.|None|
124+
|subsidy|optional string|Value added to the bids (see TrueBlockValueBiddingService).<br>The builder address must have enough balance for the subsidy.<br>Example: "1.23" for 1.23 ETH|None|
125+
|subsidy_overrides|vec[{relay, value}]| Per-relay subsidy override. Example: `[[subsidy_overrides]] relay = "flashbots_test2" value = "0.05"`|[]|
115126

116127

0 commit comments

Comments
Β (0)