Skip to content

Commit c76bf13

Browse files
committed
feat(pbs): default proposer_deadline_buffer_ms to 20 and leave it out of setup
Commit-Boost's own share of the buffer is a few milliseconds on a release build, so 20 suits a beacon node on the same host. The setting stays for setups where the beacon node runs on another host, where the response's trip back and any clock difference between the hosts come out of the buffer. Setup no longer asks for it; the Timing section says when to raise it.
1 parent b619b99 commit c76bf13

3 files changed

Lines changed: 12 additions & 11 deletions

File tree

‎config.example.toml‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,11 @@ wait_all_registrations = true
3131
# this should be lower than that, leaving some margin for overhead
3232
# OPTIONAL, DEFAULT: 950
3333
timeout_get_header_ms = 950
34-
# (unreleased, from v0.12.0-rc1) ePBS bids only: ms kept back from the beacon node's X-Timeout-Ms deadline, must be above 0 and under one slot, 12000 on mainnet (https://commit-boost.github.io/commit-boost-client/get_started/epbs#timing)
35-
# OPTIONAL, DEFAULT: 50
36-
# proposer_deadline_buffer_ms = 50
34+
# (unreleased, from v0.12.0-rc1) ePBS bids only: ms kept back from the beacon node's X-Timeout-Ms deadline for
35+
# Commit-Boost's answer to reach the beacon node. The default suits a beacon node on the same host; raise it when they
36+
# run on different hosts. Must be above 0 and under one slot, 12000 on mainnet (https://commit-boost.github.io/commit-boost-client/get_started/epbs#timing)
37+
# OPTIONAL, DEFAULT: 20
38+
# proposer_deadline_buffer_ms = 20
3739
# (unreleased, from v0.12.0-rc1) ePBS only: whether to dial a builder the auth data names when none of the key's relay entries match it, else answer 400 (https://commit-boost.github.io/commit-boost-client/get_started/epbs#builders-outside-your-config)
3840
# OPTIONAL, DEFAULT: true
3941
# dial_unconfigured_builders = true

‎crates/common/src/pbs/constants.rs‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,9 @@ impl DefaultTimeout {
4242
pub const LATE_IN_SLOT_TIME_MS: u64 = 2000;
4343

4444
/// ePBS bid path: ms reserved before the proposer's own deadline
45-
/// (Date-Milliseconds + X-Timeout-Ms) for the winning bid's return trip to the
46-
/// beacon node and the beacon node's own selection/assembly. CB asks the
47-
/// builder for `proposer_deadline - this`.
48-
pub const PROPOSER_DEADLINE_BUFFER_MS: u64 = 50;
45+
/// (Date-Milliseconds + X-Timeout-Ms) for CB's answer to reach the beacon node.
46+
/// CB asks the builder for `proposer_deadline - this`.
47+
pub const PROPOSER_DEADLINE_BUFFER_MS: u64 = 20;
4948

5049
// Maximum number of retries for validator registration request per relay
5150
pub const REGISTER_VALIDATOR_RETRY_LIMIT: u32 = 3;

‎docs/docs/get_started/epbs.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ To go through Commit-Boost, every entry's `url` is Commit-Boost's own URL, and i
3939

4040
### 1. Add the builders to Commit-Boost
4141

42-
List each builder as a relay entry, as for PBS: in `[[relays]]`, or in the `[[mux.relays]]` of the mux that lists the proposer's key. ePBS adds two `[pbs]` options. `proposer_deadline_buffer_ms` (default `50`) is the time kept back from the beacon node's deadline (see [Timing](#timing)). It must be above `0` and under one slot, `12000` on mainnet. `dial_unconfigured_builders` (default `true`) turns [dialing builders outside your config](#builders-outside-your-config) on or off.
42+
List each builder as a relay entry, as for PBS: in `[[relays]]`, or in the `[[mux.relays]]` of the mux that lists the proposer's key. A key can still reach a builder you do not list, unless you set `[pbs] dial_unconfigured_builders = false` (see [Builders outside your config](#builders-outside-your-config)).
4343

4444
### 2. Point each validator key at Commit-Boost {#validator-builder-config}
4545

@@ -88,9 +88,9 @@ On a validator client whose builder URL is Commit-Boost, a key without builder c
8888

8989
## Timing
9090

91-
The builder specs require each bid request to carry `Date-Milliseconds` and `X-Timeout-Ms`, which together say how long the beacon node will wait for a bid. Commit-Boost subtracts your `proposer_deadline_buffer_ms` from the time remaining and sends the result to the builder as its `X-Timeout-Ms`, so the builder knows how long it has to answer. For a builder outside your config, the time its lookup took is subtracted too.
91+
The builder specs require each bid request to carry `Date-Milliseconds` and `X-Timeout-Ms`, which together say how long the beacon node will wait for a bid. Commit-Boost subtracts `[pbs] proposer_deadline_buffer_ms` (default `20`) from the time remaining and sends the result to the builder as its `X-Timeout-Ms`, so the builder knows how long it has to answer. For a builder outside your config, the time its lookup took is subtracted too.
9292

93-
Think of `proposer_deadline_buffer_ms` as the slack you keep from the beacon node's remaining time: enough for the bid to get back from Commit-Boost to the beacon node and for the beacon node to process it. If no time is left, Commit-Boost does not ask the builder. With `0`, Commit-Boost refuses to start or reload: the builder gets the whole deadline, so a bid it sends at the deadline reaches the beacon node late.
93+
The buffer is the time Commit-Boost's answer needs to reach the beacon node, which discards answers that arrive after its deadline. Commit-Boost's own share is a few milliseconds, so the default suits a beacon node on the same host. When Commit-Boost and the beacon node run on different hosts, raise it by the time a response takes to travel from Commit-Boost to the beacon node, plus any difference between the two hosts' clocks, since Commit-Boost reads the beacon node's `Date-Milliseconds` against its own clock. It must be above `0` and under one slot, `12000` on mainnet. If no time is left, Commit-Boost does not ask the builder. With `0`, Commit-Boost refuses to start or reload: the builder gets the whole deadline, so a bid it sends at the deadline reaches the beacon node late.
9494

9595
Builder preferences use `timeout_register_validator_ms`, and the signed block `timeout_get_payload_ms`.
9696

@@ -112,5 +112,5 @@ With [metrics](./running/metrics.md) enabled, the ePBS endpoints use the `endpoi
112112
| Bid requests get `400` "auth.message.data does not match any configured builder" | The auth data is neither a lowercase hostname without a port nor an `http(s)` URL, names the host the request was sent to (a key without builder config), the request came from another Commit-Boost and matches none of this one's relay entries, or `dial_unconfigured_builders` is `false` | Correct the `auth_data` in the key's [builder config](#validator-builder-config), or add the builder as a relay entry for the key on the Commit-Boost the request reaches |
113113
| Bid requests get `400` "the addressed builder's host does not resolve or resolves to a disallowed address" | The auth data names a builder outside your config whose host does not resolve or resolves to an [internal address](#builders-outside-your-config) | Add the builder as a relay entry for the key, or write or correct the key's [builder config](#validator-builder-config) |
114114
| A builder answers bid requests with `400` (`cb_pbs_relay_status_code_total{endpoint="get_execution_payload_bid",http_status_code="400"}`) | The builder compares auth data byte for byte and expects something other than what the key sends, such as its hostname without `?` parameters | Send the auth data the builder expects: its hostname or its URL, the forms Commit-Boost [routes by](#routing-by-auth-data), with `?` parameters only if it accepts them |
115-
| Commit-Boost does not start or reload, or `commit-boost init` fails, with "proposer_deadline_buffer_ms must be greater than 0 and less than one slot" | `proposer_deadline_buffer_ms` is `0`, or one slot or more | Set it above `0` and under one slot, or remove it to use the default `50` |
115+
| Commit-Boost does not start or reload, or `commit-boost init` fails, with "proposer_deadline_buffer_ms must be greater than 0 and less than one slot" | `proposer_deadline_buffer_ms` is `0`, or one slot or more | Set it above `0` and under one slot, or remove it to use the default `20` |
116116
| Commit-Boost returns `200` but the beacon node builds locally | The beacon node rejected the bid, or valued its local block higher after `builder_boost_factor` | Compare the bid with the key's `min_bid` and `builder_boost_factor` |

0 commit comments

Comments
 (0)