Skip to content

Conversation

meta-duck
Copy link

Description:

Currently, the timeout value for BUILDER_PROPOSAL_DELAY_TOLERANCE is hardcoded to 1500.milliseconds in beacon_chain/spec/mev/electra_mev.nim. Allowing this value to be configurable would enable operators to adjust the timeout as needed for different environments or use cases.

Motivation:

In some scenarios, increasing the timeout would allow the builder extra time to gather more transactions or MEV value, potentially improving block value and network efficiency. Making this value configurable allows for experimentation and optimization based on network conditions or operator needs.

Proposed Solution:

  • Expose BUILDER_PROPOSAL_DELAY_TOLERANCE as a configurable parameter, e.g., via a config file, environment variable, or command-line flag.
  • Retain the current 1500.milliseconds as the default if not explicitly set.
  • Document the new configuration option for users.

Benefits:

  • Increase validator's yield
  • Greater flexibility for node operators.
  • Ability to tune performance for different conditions.
  • Supports experimentation and research on the effects of timeout adjustments.

ref. #7380

Copy link

github-actions bot commented Aug 13, 2025

Unit Test Results

       15 files  ±0    2 650 suites  ±0   1h 24m 30s ⏱️ + 9m 27s
  6 636 tests ±0    6 078 ✔️ ±0  558 💤 ±0  0 ±0 
45 686 runs  ±0  44 904 ✔️ ±0  782 💤 ±0  0 ±0 

Results for commit e34f69a. ± Comparison against base commit c15ad82.

♻️ This comment has been updated with latest results.

@tersec
Copy link
Contributor

tersec commented Aug 13, 2025

Well, I'm a bit skeptical this is the best way to achieve most of those goals.

I'd ask some questions: is this, in practice, timing out for you?

If it's not, none of:

  • Increase validator's yield
  • Greater flexibility for node operators.
  • Ability to tune performance for different conditions.
  • Supports experimentation and research on the effects of timeout adjustments.

apply.

If it is timing out, that's interesting, though generally speaking, I'd say one would have to coordinate this with mev-boost or commit-boost as well typically timeout-wise.

It won't reliably increase the yield with a well-functioning relay, in particular, because a well-functioning relay will typically respond somewhat quickly whenever they're queried, and similarly in general if it's not timing out then increasing the timeout is a no-op on the rest.

If one wants to look at way to increase yield, the traditional thing is to push the entire bid request later in the slot; one can find analysis showing (at least a couple years ago, last time I saw them) near-linear increases in MEV at slot start + 0 seconds, to slot start + 1s, to slot start +2s, etc. Risking going past 4s for when they're received, though, does backfire/become a much riskier game.

Either way, I don't see how this PR achieves what it states it achieves.

@tersec
Copy link
Contributor

tersec commented Aug 13, 2025

2025-08-13T06:07:56.1206932Z /github-runner/github-runner-node-01/workspace/nimbus-eth2/nimbus-eth2/beacon_chain/spec/mev/electra_mev.nim(102, 3) Error: identifier expected, but got 'keyword import'
2025-08-13T06:07:56.1424448Z make: *** [Makefile:442: wss_sim] Error 1
2025-08-13T06:07:56.1442402Z make: *** Waiting for unfinished jobs....
2025-08-13T06:07:56.4883124Z /github-runner/github-runner-node-01/workspace/nimbus-eth2/nimbus-eth2/beacon_chain/spec/mev/electra_mev.nim(102, 3) Error: identifier expected, but got 'keyword import'
2025-08-13T06:07:56.5147964Z make: *** [Makefile:442: validator_db_aggregator] Error 1
2025-08-13T06:07:56.9896148Z /github-runner/github-runner-node-01/workspace/nimbus-eth2/nimbus-eth2/vendor/nim-ssz-serialization/ssz_serialization/digest.nim(35, 9) Hint: BLST SHA256 backend enabled [User]
2025-08-13T06:07:56.9905558Z /github-runner/github-runner-node-01/workspace/nimbus-eth2/nimbus-eth2/vendor/nim-ssz-serialization/ssz_serialization/digest.nim(49, 9) Hint: Hashtree SHA256 backend enabled [User]
2025-08-13T06:07:57.0473412Z /github-runner/github-runner-node-01/workspace/nimbus-eth2/nimbus-eth2/beacon_chain/spec/mev/electra_mev.nim(102, 3) Error: identifier expected, but got 'keyword import'
2025-08-13T06:07:57.0722272Z make: *** [Makefile:442: ncli_db] Error 1
2025-08-13T06:07:57.4409606Z /github-runner/github-runner-node-01/workspace/nimbus-eth2/nimbus-eth2/vendor/nim-ssz-serialization/ssz_serialization/digest.nim(35, 9) Hint: BLST SHA256 backend enabled [User]
2025-08-13T06:07:57.4441617Z /github-runner/github-runner-node-01/workspace/nimbus-eth2/nimbus-eth2/vendor/nim-ssz-serialization/ssz_serialization/digest.nim(49, 9) Hint: Hashtree SHA256 backend enabled [User]
2025-08-13T06:07:58.6070924Z /github-runner/github-runner-node-01/workspace/nimbus-eth2/nimbus-eth2/beacon_chain/spec/mev/electra_mev.nim(102, 3) Error: identifier expected, but got 'keyword import'
2025-08-13T06:07:58.6391664Z make: *** [Makefile:442: nimbus_signing_node] Error 1
2025-08-13T06:07:58.6421069Z /github-runner/github-runner-node-01/workspace/nimbus-eth2/nimbus-eth2/beacon_chain/spec/mev/electra_mev.nim(102, 3) Error: identifier expected, but got 'keyword import'
2025-08-13T06:07:58.6709482Z make: *** [Makefile:442: ncli] Error 1
2025-08-13T06:07:58.9346104Z /github-runner/github-runner-node-01/workspace/nimbus-eth2/nimbus-eth2/vendor/nim-ssz-serialization/ssz_serialization/digest.nim(35, 9) Hint: BLST SHA256 backend enabled [User]
2025-08-13T06:07:58.9357156Z /github-runner/github-runner-node-01/workspace/nimbus-eth2/nimbus-eth2/vendor/nim-ssz-serialization/ssz_serialization/digest.nim(49, 9) Hint: Hashtree SHA256 backend enabled [User]
2025-08-13T06:07:59.3755147Z Build completed successfully: build/stack_sizes
2025-08-13T06:07:59.4829958Z /github-runner/github-runner-node-01/workspace/nimbus-eth2/nimbus-eth2/beacon_chain/spec/mev/electra_mev.nim(102, 3) Error: identifier expected, but got 'keyword import'
2025-08-13T06:07:59.5132934Z /github-runner/github-runner-node-01/workspace/nimbus-eth2/nimbus-eth2/beacon_chain/spec/mev/electra_mev.nim(102, 3) Error: identifier expected, but got 'keyword import'
2025-08-13T06:07:59.5178978Z make: *** [Makefile:442: ncli_split_keystore] Error 1
2025-08-13T06:07:59.5461262Z make: *** [Makefile:442: mev_mock] Error 1
2025-08-13T06:08:00.0089999Z Hint: mm: refc; threads: on; opt: none (DEBUG BUILD, `-d:release` generates faster code)
2025-08-13T06:08:00.0091916Z 155400 lines; 8.937s; 424.352MiB peakmem; proj: /github-runner/github-runner-node-01/workspace/nimbus-eth2/nimbus-eth2/research/fakeee.nim; out: /github-runner/github-runner-node-01/workspace/nimbus-eth2/nimbus-eth2/nimcache/release/fakeee/fakeee.json [SuccessX]
2025-08-13T06:08:00.5047444Z /github-runner/github-runner-node-01/workspace/nimbus-eth2/nimbus-eth2/beacon_chain/spec/mev/electra_mev.nim(102, 3) Error: identifier expected, but got 'keyword import'
2025-08-13T06:08:00.5440755Z make: *** [Makefile:442: nimbus_validator_client] Error 1
2025-08-13T06:08:03.8178897Z /github-runner/github-runner-node-01/workspace/nimbus-eth2/nimbus-eth2/vendor/nim-ssz-serialization/ssz_serialization/digest.nim(35, 9) Hint: BLST SHA256 backend enabled [User]
2025-08-13T06:08:03.8206636Z /github-runner/github-runner-node-01/workspace/nimbus-eth2/nimbus-eth2/vendor/nim-ssz-serialization/ssz_serialization/digest.nim(49, 9) Hint: Hashtree SHA256 backend enabled [User]
2025-08-13T06:08:05.4940863Z /github-runner/github-runner-node-01/workspace/nimbus-eth2/nimbus-eth2/beacon_chain/spec/mev/electra_mev.nim(102, 3) Error: identifier expected, but got 'keyword import'
2025-08-13T06:08:05.5448085Z make: *** [Makefile:442: nimbus_light_client] Error 1

@meta-duck
Copy link
Author

Well, I'm a bit skeptical this is the best way to achieve most of those goals.

I'd ask some questions: is this, in practice, timing out for you?

If it's not, none of:

  • Increase validator's yield
  • Greater flexibility for node operators.
  • Ability to tune performance for different conditions.
  • Supports experimentation and research on the effects of timeout adjustments.

apply.

If it is timing out, that's interesting, though generally speaking, I'd say one would have to coordinate this with mev-boost or commit-boost as well typically timeout-wise.

It won't reliably increase the yield with a well-functioning relay, in particular, because a well-functioning relay will typically respond somewhat quickly whenever they're queried, and similarly in general if it's not timing out then increasing the timeout is a no-op on the rest.

If one wants to look at way to increase yield, the traditional thing is to push the entire bid request later in the slot; one can find analysis showing (at least a couple years ago, last time I saw them) near-linear increases in MEV at slot start + 0 seconds, to slot start + 1s, to slot start +2s, etc. Risking going past 4s for when they're received, though, does backfire/become a much riskier game.

Either way, I don't see how this PR achieves what it states it achieves.

There is no timeout issue.
Yes, I am using CommitBoost with the timing game config enabled.

As you menioned, pushing the bid request from T+1 to T+2 or even T+2.5 could allow gathers an extra 1 to 1.5 sec for the builder to submit a valueable bid (From more MEV opportunities or more transactions for fees)

Since my average signing time is always below T+2, this indicates that there is a buffer to push for a later response to boost the yield.

For the error, I will take a look.

@tersec
Copy link
Contributor

tersec commented Aug 13, 2025

2025-08-13T07:35:53.0989040Z /github-runner/github-runner-node-01/workspace/nimbus-eth2/nimbus-eth2/beacon_chain/spec/mev/electra_mev.nim(11, 8) Error: cannot open file: ../conf
2025-08-13T07:35:53.1168707Z make: *** [Makefile:442: validator_db_aggregator] Error 1
2025-08-13T07:35:53.1185131Z make: *** Waiting for unfinished jobs....
2025-08-13T07:35:53.2069589Z /github-runner/github-runner-node-01/workspace/nimbus-eth2/nimbus-eth2/vendor/nim-ssz-serialization/ssz_serialization/digest.nim(35, 9) Hint: BLST SHA256 backend enabled [User]
2025-08-13T07:35:53.2080115Z /github-runner/github-runner-node-01/workspace/nimbus-eth2/nimbus-eth2/vendor/nim-ssz-serialization/ssz_serialization/digest.nim(49, 9) Hint: Hashtree SHA256 backend enabled [User]
2025-08-13T07:35:53.4200600Z /github-runner/github-runner-node-01/workspace/nimbus-eth2/nimbus-eth2/beacon_chain/spec/mev/electra_mev.nim(11, 8) Error: cannot open file: ../conf
2025-08-13T07:35:53.4469993Z make: *** [Makefile:442: nimbus_signing_node] Error 1
2025-08-13T07:35:54.2757152Z /github-runner/github-runner-node-01/workspace/nimbus-eth2/nimbus-eth2/vendor/nim-ssz-serialization/ssz_serialization/digest.nim(35, 9) Hint: BLST SHA256 backend enabled [User]
2025-08-13T07:35:54.2767341Z /github-runner/github-runner-node-01/workspace/nimbus-eth2/nimbus-eth2/vendor/nim-ssz-serialization/ssz_serialization/digest.nim(49, 9) Hint: Hashtree SHA256 backend enabled [User]
2025-08-13T07:35:54.4664857Z /github-runner/github-runner-node-01/workspace/nimbus-eth2/nimbus-eth2/beacon_chain/spec/mev/electra_mev.nim(11, 8) Error: cannot open file: ../conf
2025-08-13T07:35:54.4923045Z make: *** [Makefile:442: ncli_split_keystore] Error 1
2025-08-13T07:35:54.7707304Z /github-runner/github-runner-node-01/workspace/nimbus-eth2/nimbus-eth2/beacon_chain/spec/mev/electra_mev.nim(11, 8) Error: cannot open file: ../conf
2025-08-13T07:35:54.7944814Z make: *** [Makefile:442: wss_sim] Error 1
2025-08-13T07:35:54.8467622Z /github-runner/github-runner-node-01/workspace/nimbus-eth2/nimbus-eth2/vendor/nim-ssz-serialization/ssz_serialization/digest.nim(35, 9) Hint: BLST SHA256 backend enabled [User]
2025-08-13T07:35:54.8478330Z /github-runner/github-runner-node-01/workspace/nimbus-eth2/nimbus-eth2/vendor/nim-ssz-serialization/ssz_serialization/digest.nim(49, 9) Hint: Hashtree SHA256 backend enabled [User]
2025-08-13T07:35:54.9198665Z /github-runner/github-runner-node-01/workspace/nimbus-eth2/nimbus-eth2/vendor/nim-ssz-serialization/ssz_serialization/digest.nim(35, 9) Hint: BLST SHA256 backend enabled [User]
2025-08-13T07:35:54.9209806Z /github-runner/github-runner-node-01/workspace/nimbus-eth2/nimbus-eth2/vendor/nim-ssz-serialization/ssz_serialization/digest.nim(49, 9) Hint: Hashtree SHA256 backend enabled [User]
2025-08-13T07:35:55.4974225Z Hint: mm: refc; threads: on; opt: none (DEBUG BUILD, `-d:release` generates faster code)
2025-08-13T07:35:55.4975909Z 155400 lines; 9.337s; 424.352MiB peakmem; proj: /github-runner/github-runner-node-01/workspace/nimbus-eth2/nimbus-eth2/research/fakeee.nim; out: /github-runner/github-runner-node-01/workspace/nimbus-eth2/nimbus-eth2/nimcache/release/fakeee/fakeee.json [SuccessX]
2025-08-13T07:35:56.1189917Z /github-runner/github-runner-node-01/workspace/nimbus-eth2/nimbus-eth2/beacon_chain/spec/mev/electra_mev.nim(11, 8) Error: cannot open file: ../conf
2025-08-13T07:35:56.1436196Z make: *** [Makefile:442: ncli_db] Error 1
2025-08-13T07:35:56.2324181Z /github-runner/github-runner-node-01/workspace/nimbus-eth2/nimbus-eth2/beacon_chain/spec/mev/electra_mev.nim(11, 8) Error: cannot open file: ../conf
2025-08-13T07:35:56.2585899Z make: *** [Makefile:442: ncli] Error 1
2025-08-13T07:35:56.8912478Z /github-runner/github-runner-node-01/workspace/nimbus-eth2/nimbus-eth2/vendor/nim-ssz-serialization/ssz_serialization/digest.nim(35, 9) Hint: BLST SHA256 backend enabled [User]
2025-08-13T07:35:56.8915179Z /github-runner/github-runner-node-01/workspace/nimbus-eth2/nimbus-eth2/vendor/nim-ssz-serialization/ssz_serialization/digest.nim(49, 9) Hint: Hashtree SHA256 backend enabled [User]
2025-08-13T07:35:57.1388838Z Build completed successfully: build/stack_sizes
2025-08-13T07:35:58.3335640Z /github-runner/github-runner-node-01/workspace/nimbus-eth2/nimbus-eth2/beacon_chain/spec/mev/electra_mev.nim(11, 8) Error: cannot open file: ../conf
2025-08-13T07:35:58.3589239Z make: *** [Makefile:442: mev_mock] Error 1
2025-08-13T07:35:58.5331650Z /github-runner/github-runner-node-01/workspace/nimbus-eth2/nimbus-eth2/beacon_chain/spec/mev/electra_mev.nim(11, 8) Error: cannot open file: ../conf
2025-08-13T07:35:58.5628292Z make: *** [Makefile:442: nimbus_validator_client] Error 1
2025-08-13T07:36:01.2374825Z /github-runner/github-runner-node-01/workspace/nimbus-eth2/nimbus-eth2/vendor/nim-ssz-serialization/ssz_serialization/digest.nim(35, 9) Hint: BLST SHA256 backend enabled [User]
2025-08-13T07:36:01.2390758Z /github-runner/github-runner-node-01/workspace/nimbus-eth2/nimbus-eth2/vendor/nim-ssz-serialization/ssz_serialization/digest.nim(49, 9) Hint: Hashtree SHA256 backend enabled [User]
2025-08-13T07:36:02.8315138Z /github-runner/github-runner-node-01/workspace/nimbus-eth2/nimbus-eth2/beacon_chain/spec/mev/electra_mev.nim(11, 8) Error: cannot open file: ../conf
2025-08-13T07:36:02.8773024Z make: *** [Makefile:442: nimbus_light_client] Error 1
2025-08-13T07:36:06.6145691Z Build completed successfully: build/resttest
2025-08-13T07:36:10.2985516Z Build completed successfully: build/fakeee

@tersec
Copy link
Contributor

tersec commented Aug 14, 2025

The overall approach here is to be able to ensure Nimbus's timeout is long enough to accommodate both the fairly short timeout intrinsic to fetching the bid, plus whatever delay (T+1, T+2, T+2.5, etc) that the timing game strategy requires?

@meta-duck
Copy link
Author

Yes, that's correct.

@@ -0,0 +1,18 @@
## Builder Proposal Delay Tolerance

You can now configure the builder proposal delay tolerance (MEV block builder timeout) via the following flag:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regarding now: By the time this would appear in the documentation, it will simply be the case.

It's true that some programming language documentation, or e.g., the curl docs, explicitly say some option appeared in $SOFTWARE version x.y.z. I'm not sure that's that useful here, since due to the hardfork mechanism, essentially no one is running a Nimbus version older than a year at any given time, and typically less.

The release notes do document this the appearance of such features, for people who need a timeline.

Similarly, whether or not this is combined with https://github.com/status-im/nimbus-eth2/blob/stable/docs/the_nimbus_book/src/external-block-builder.md it's worth ensuring both use consistent terminology.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants