-
Notifications
You must be signed in to change notification settings - Fork 48
/
Copy pathconfig.example.toml
290 lines (275 loc) · 13.1 KB
/
config.example.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
# The main configuration file for the Commit-Boost sidecar.
# Some fields are optional and can be omitted, in which case the default value, if present, will be used.
# Chain spec ID. Supported values:
# A network ID. Supported values: Mainnet, Holesky, Sepolia, Helder, Hoodi.
# A custom object, e.g., chain = { genesis_time_secs = 1695902400, path = "/path/to/spec.json" }, with a path to a chain spec file, either in .json format (e.g., as returned by the beacon endpoint /eth/v1/config/spec), or in .yml format (see examples in tests/data).
# A custom object, e.g., chain = { genesis_time_secs = 1695902400, slot_time_secs = 12, genesis_fork_version = "0x01017000" }.
chain = "Holesky"
# Configuration for the PBS module
[pbs]
# Docker image to use for the PBS module.
# OPTIONAL, DEFAULT: ghcr.io/commit-boost/pbs:latest
docker_image = "ghcr.io/commit-boost/pbs:latest"
# Whether to enable the PBS module to request signatures from the Signer module (not used in the default PBS image)
# OPTIONAL, DEFAULT: false
with_signer = false
# Host to receive BuilderAPI calls from beacon node
# OPTIONAL, DEFAULT: 127.0.0.1
host = "127.0.0.1"
# Port to receive BuilderAPI calls from beacon node
# OPTIONAL, DEFAULT: 18550
port = 18550
# Whether to forward `status` calls to relays or skip and return 200
# OPTIONAL, DEFAULT: true
relay_check = true
# Whether to return after the first successful registration, or wait for all relays to respond
# OPTIONAL, DEFAULT: true
wait_all_registrations = true
# Timeout in milliseconds for the `get_header` call to relays. Note that the CL has also a timeout (e.g. 1 second) so
# this should be lower than that, leaving some margin for overhead
# OPTIONAL, DEFAULT: 950
timeout_get_header_ms = 950
# Timeout in milliseconds for the `submit_blinded_block` call to relays.
# OPTIONAL, DEFAULT: 4000
timeout_get_payload_ms = 4000
# Timeout in milliseconds for the `register_validator` call to relays.
# OPTIONAL, DEFAULT: 3000
timeout_register_validator_ms = 3000
# Whether to skip signature verification of headers and pubkey matching against the relay pubkey
# OPTIONAL, DEFAULT: false
skip_sigverify = false
# Minimum bid in ETH that will be accepted from `get_header`
# Can be specified as a float or a string for extra precision (e.g. "0.01")
# OPTIONAL, DEFAULT: 0.0
min_bid_eth = 0.0
# How late in milliseconds in the slot is "late". This impacts the `get_header` requests, by shortening timeouts for `get_header` calls to
# relays and make sure a header is returned within this deadline. If the request from the CL comes later in the slot, then fetching headers is skipped
# to force local building and miniminzing the risk of missed slots. See also the timing games section below
# OPTIONAL, DEFAULT: 2000
late_in_slot_time_ms = 2000
# Whether to enable extra validation of get_header responses, if this is enabled you need to set `rpc_url`
# OPTIONAL, DEFAULT: false
extra_validation_enabled = false
# Execution Layer RPC url to use for extra validation
# OPTIONAL
rpc_url = "https://ethereum-holesky-rpc.publicnode.com"
# The PBS module needs one or more [[relays]] as defined below.
[[relays]]
# Relay ID to use in telemetry
# OPTIONAL, DEFAULT: URL hostname
id = "example-relay"
# Relay URL in the format scheme://pubkey@host
url = "http://0xa1cec75a3f0661e99299274182938151e8433c61a19222347ea1313d839229cb4ce4e3e5aa2bdeb71c8fcf1b084963c2@abc.xyz"
# Headers to send with each request for this relay
# OPTIONAL
headers = { X-MyCustomHeader = "MyCustomValue" }
# GET parameters to add to each request URL for this relay
# OPTIONAL
get_params = { param1 = "value1", param2 = "value2" }
# Whether to enable timing games, as tuned by `target_first_request_ms` and `frequency_get_header_ms`.
# These values should be carefully chosen for each relay, as each relay has different latency and timing games setups.
# They should only be used by advanced users, and if mis-configured can result in unforeseen effects, e.g. fetching a lower header value,
# or getting a temporary IP ban.
#
# EXAMPLES
# Assuming: timeout_get_header_ms = 950, frequency_get_header_ms = 300, target_first_request_ms = 200, late_in_slot_time_ms = 2000
#
# 1) CL request comes at 100ms in the slot (max timeout 1050ms in the slot), then:
# - sleep for 100ms
# - send request at 200ms with 850ms timeout
# - send request at 500ms with 550ms timeout
# - send request at 800ms with 250ms timeout
# 2) CL request comes at 1500ms in the slot (max timeout 2000ms in the slot), then:
# - send request at 1500ms with 500ms timeout
# - send request at 1800ms with 200ms timeout
# 3) CL request comes 2500ms in the slot then:
# - return 204 and force local build
#
# OPTIONAL, DEFAULT: false
enable_timing_games = false
# Target time in slot when to send the first header request
# OPTIONAL
target_first_request_ms = 200
# Frequency in ms to send get_header requests
# OPTIONAL
frequency_get_header_ms = 300
# Maximum number of validators to register in a single request.
# OPTIONAL, DEFAULT: "" (unlimited)
validator_registration_batch_size = ""
# Configuration for the PBS multiplexers, which enable different configs to be used for get header requests, depending on validator pubkey
# Note that:
# - multiple sets of keys can be defined by adding multiple [[mux]] sections. The validator pubkey sets need to be disjoint
# - the mux is only used for get header requests
# - if any value is missing from the mux config, the default value from the main config will be used
[[mux]]
# Unique ID for the mux config
id = "test_mux"
# Which validator pubkeys to match against this mux config. This can be empty or omitted if a loader is specified.
# Any keys loaded via the loader will be added to this list.
validator_pubkeys = [
"0x80c7f782b2467c5898c5516a8b6595d75623960b4afc4f71ee07d40985d20e117ba35e7cd352a3e75fb85a8668a3b745",
"0xa119589bb33ef52acbb8116832bec2b58fca590fe5c85eac5d3230b44d5bc09fe73ccd21f88eab31d6de16194d17782e",
]
# Path to a file containing a list of validator pubkeys or details of a registry to load keys from.
# Supported registries:
# - Lido: NodeOperatorsRegistry
# - SSV: SSV API
# OPTIONAL
loader = "./tests/data/mux_keys.example.json"
# URL to HTTP endpoint returning JSON list of validator pubkeys
# Example response:
# [
# "0x80c7f782b2467c5898c5516a8b6595d75623960b4afc4f71ee07d40985d20e117ba35e7cd352a3e75fb85a8668a3b745",
# "0xa119589bb33ef52acbb8116832bec2b58fca590fe5c85eac5d3230b44d5bc09fe73ccd21f88eab31d6de16194d17782e"
#]
# loader = { url = "http://localhost:8000/keys" }
# loader = { registry = "lido", node_operator_id = 8 }
# loader = { registry = "ssv", node_operator_id = 8 }
timeout_get_header_ms = 900
late_in_slot_time_ms = 1500
# For each mux, one or more [[mux.relays]] can be defined, which will be used for the matching validator pubkeys
# Only the relays defined here will be used, and the relays defined in the main [[relays]] config will be ignored
# The fields specified here are the same as in [[relays]] (headers, get_params, enable_timing_games, target_first_request_ms, frequency_get_header_ms)
[[mux.relays]]
id = "mux-relay-1"
url = "http://0xa119589bb33ef52acbb8116832bec2b58fca590fe5c85eac5d3230b44d5bc09fe73ccd21f88eab31d6de16194d17782e@def.xyz"
# Configuration for the Signer Module, only required if any `commit` module is present, or if `pbs.with_signer = true`
# Currently three types of Signer modules are supported (only one can be used at a time):
# - Remote: a remote Web3Signer instance
# - Dirk: a remote Dirk instance
# - Local: a local Signer module
# More details on the docs (https://commit-boost.github.io/commit-boost-client/get_started/configuration/#signer-module)
# [signer]
# Docker image to use for the Signer module.
# OPTIONAL, DEFAULT: ghcr.io/commit-boost/signer:latest
# docker_image = "ghcr.io/commit-boost/signer:latest"
# For Remote signer:
# [signer.remote]
# URL of the Web3Signer instance
# url = "https://remote.signer.url"
# For Dirk signer:
# [signer.dirk]
# Path to the client certificate to authenticate with Dirk
# cert_path = "/path/to/client.crt"
# Path to the client key
# key_path = "/path/to/client.key"
# Path to the secrets directory where the accounts passwords are stored
# secrets_path = "/path/to/secrets"
# Path to the CA certificate that signed the Dirk server certificate
# OPTIONAL
# ca_cert_path = "/path/to/ca.crt"
# Add one entry like this for each Dirk host
# [[signer.dirk.hosts]]
# Domain name of the server to use in TLS verification, if different from the URL
# OPTIONAL
# server_name = "localhost-1"
# Complete URL of a Dirk gateway
# url = "https://localhost:8881"
# Accounts to use as consensus keys
# accounts = ["Wallet1/Account1", "DistributedWallet/Account1"]
# [[signer.dirk.hosts]]
# server_name = "localhost-2"
# url = "https://localhost:8882"
# accounts = ["Wallet2/Account2", "DistributedWallet/Account1"]
# Configuration for how the Signer module should store proxy delegations.
# OPTIONAL
# [signer.dirk.store]
# proxy_dir = "/path/to/proxies"
# For Local signer:
# Configuration for how the Signer module should load validator keys. Currently two types of loaders are supported:
# - File: load keys from a plain text file (unsafe, use only for testing purposes)
# - ValidatorsDir: load keys from a `keys` and `secrets` file/folder (ERC-2335 style keystores). More details can be found in the docs (https://commit-boost.github.io/commit-boost-client/get_started/configuration/)
[signer.local.loader]
# File: path to the keys file
key_path = "./tests/data/keys.example.json"
# ValidatorsDir: format of the keystore (lighthouse, prysm, teku or lodestar)
# format = "lighthouse"
# ValidatorsDir: full path to the keys directory
# For lighthouse, it's de path to the directory where the `<pubkey>/voting-keystore.json` directories are located.
# For prysm, it's the path to the `all-accounts.keystore.json` file.
# For teku, it's the path to the directory where all `<pubkey>.json` files are located.
# For lodestar, it's the path to the directory where all `<pubkey>.json` files are located.
# keys_path = ""
# ValidatorsDir: full path to the secrets file/directory
# For lighthouse, it's de path to the directory where the `<pubkey>.json` files are located.
# For prysm, it's the path to the file containing the wallet decryption password.
# For teku, it's the path to the directory where all `<pubkey>.txt` files are located.
# For lodestar, it's the path to the file containing the decryption password.
# secrets_path = ""
# Configuration for how the Signer module should store proxy delegations. Supported types of store are:
# - File: store keys and delegations from a plain text file (unsafe, use only for testing purposes)
# - ERC2335: store keys and delegations safely using ERC-2335 style keystores. More details can be found in the docs (https://commit-boost.github.io/commit-boost-client/get_started/configuration#proxy-keys-store)
# OPTIONAL, if missing proxies are lost on restart
[signer.local.store]
# File: path to the keys file
proxy_dir = "./proxies"
# ERC2335: path to the keys directory
# keys_path = "./tests/data/proxy/keys"
# ERC2335: path to the secrets directory
# secrets_path = "./tests/data/proxy/secrets"
# Commit-Boost can optionally run "modules" which extend the capabilities of the sidecar.
# Currently, two types of modules are supported:
# - "commit": modules which request commitment signatures from the validator keys
# - "events": modules which callback to BuilderAPI events as triggered from the PBS modules, used e.g. for monitoring
# If any "commit" module is present, then the [signer] section should also be configured
# OPTIONAL
[[modules]]
# Unique ID of the module
id = "DA_COMMIT"
# Type of the module. Supported values: commit, events
type = "commit"
# Docker image of the module
docker_image = "test_da_commit"
# Environment file for the module
env_file = ".cb.env"
# Additional config needed by the business logic of the module should also be set here.
# See also `examples/da_commit/src/main.rs` for more information
sleep_secs = 5
# Other environment variables for the module
[modules.env]
SOME_ENV_VAR = "some_value"
# Configuration for how metrics should be collected and scraped
# OPTIONAL, skip metrics collection if missing
[metrics]
# Whether to collect metrics
# OPTIONAL, DEFAULT: true
enabled = true
# Host to listen on for metrics
# OPTIONAL, DEFAULT: 127.0.0.1
host = "127.0.0.1"
# Services will listen for Prometheus scrapes on this port, port + 1, +2, etc.
# OPTIONAL, DEFAULT: 10000
start_port = 10000
# Configuration stdout logs
# OPTIONAL, DEFAULT: enabled
[logs.stdout]
# Whether to enable stdout logging
# OPTIONAL, DEFAULT: true
enabled = true
# Log level. Supported values: trace, debug, info, warn, error
# OPTIONAL, DEFAULT: info
level = "info"
# Log in JSON format
# OPTIONAL, DEFAULT: false
use_json = false
# Whether to enable ANSI color codes
# OPTIONAL, DEFAULT: true
color = true
# Configuration file logs
# OPTIONAL, DEFAULT: disabled
[logs.file]
# Whether to enable file logging
# OPTIONAL, DEFAULT: false
enabled = true
# Log level. Supported values: trace, debug, info, warn, error
# OPTIONAL, DEFAULT: info
level = "debug"
# Log in JSON format
# OPTIONAL, DEFAULT: true
use_json = true
# Path to the log directory
# OPTIONAL, DEFAULT: /var/logs/commit-boost
dir_path = "./logs"
# Maximum number of log files to keep
# OPTIONAL
max_files = 30