ChainSafe / ChainSafe/lodestar
Builder api clients are never evicted, removed builders keep being pinged
- Dominant language
- TypeScript
- Stars
- 1.4k
- Forks
- 483
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 156
Description
`BuilderApiClient.clients` is keyed by builder url and populated by `getOrCreateClient`, which runs on every preference submission and bid request. Nothing ever removes an entry.
`checkStatus()` added in #9947 iterates the whole map before each proposal, so a builder dropped from the validator client config keeps being pinged until the beacon node restarts, and logs `Builder status check failed` every proposal if it is offline.
The bid fan-out is unaffected, it only requests bids from the entries the validator client sends with `produceBlockV4`.
Bounded in practice by how many distinct builder urls an operator runs and cleared by a restart, so this is only about avoiding pointless requests and a misleading warn. Tracking last use per client and dropping entries not seen for a few epochs would be enough.
Contributor guide
Research direction
Start by tracing BuilderApiClient.clients, getOrCreateClient, and checkStatus(), then compare their use with the produceBlockV4 bid fan-out and the behavior introduced in #9947. Define and implement the stale-client lifetime described in the issue, and verify that builders removed from validator configuration are no longer status-pinged while active builders still are.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend, blockchain
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100