Repository navigation
feat(client): spawn the builder preferences service - #1285
Conversation
|
@claude, please take a look |
|
Claude finished @shane-moore's task in 3m 0s —— View job Review: PR #1285 — spawn builder preferences service
Scope note: This is a stacked PR. The only commit owned here is Head commit (
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## epbs #1285 +/- ##
=======================================
Coverage ? 80.34%
=======================================
Files ? 180
Lines ? 41011
Branches ? 0
=======================================
Hits ? 32952
Misses ? 8059
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Reviewed only the top commit, 89d01ca5, against its direct parent, d1a56cdd.
The Anchor wiring itself is correct: the block service and builder-preferences service share one Arc-backed store and request-auth cache, and the new service starts under the existing Gloas gate. I found one upstream behavior worth noting during soak:
- The pinned service derives one
current_fork, gathers duties from both the current and next epochs, then submits every entry with that current fork. In epochgloas_fork_epoch - 1, it skips the current Fulu duties, gathers next-epoch Gloas duties, and sends their Gloas-only bodies withEth-Consensus-Version: fulu. The merged validator API says the header names the version the submitted preferences belong to, while the builder spec defines a Gloas request body and says the header names the fork of the body's type. A builder that dispatches decoding by this required header can reject every pre-fork attempt, so the first Gloas epoch loses its intended ahead-of-time publication window. This behavior is in the pinned dependency, not the Anchor wiring reviewed here.
All CI checks, including run-local-testnet, pass at this head. The existing draft and soak gates remain.
Reviewed by gpt-5.6-sol max.
Bump the Lighthouse pin to the Gloas builder-API stack head (sigp/lighthouse#9807) and implement the one new required trait method, sign_request_auth_v1, as a distributed threshold signing round: kind 9 (RequestAuth) riding Role::ProposerPreferences under the fixed builder-specs sigp#165 application domain, with a slot-aware collection bound (future slots 2 slots, current slot 1s fail-fast, elapsed slots declined without broadcast). Wire the BuilderStore and RequestAuthCache the new BlockServiceBuilder requires at startup, decline elapsed-slot proposer-preferences signing after restarts, and migrate the one test broken by the pin (private attestation-due fields).
Review follow-ups: apply the nightly rustfmt reflow check-fmt requires on the request_auth_collection_bound doc comment, and carry the blst 0.3.16 -> 0.3.17 lockfile hardening (Pippenger divide-by-zero, blst sigp#283) that Lighthouse #9869 took upstream but Anchor's lock did not inherit.
Spawn Lighthouse's BuilderPreferencesService inside the Gloas-scheduled gate so builder preferences publish ahead of time for current- and next-epoch proposal duties, and hoist a single RequestAuthCache shared via Arc-backed clones with the block service; the service's per-slot tick is the cache's only prune caller at the Lighthouse pin.
89d01ca to
f9827d8
Compare
…der-preferences # Conflicts: # anchor/client/src/lib.rs
…efinitions Resolve the client wiring, manifest, and lockfile conflicts on the PR side (the epbs squash of sigp#1285 carries the store open this PR hoists earlier). Also fold in three review fixes: - client: keep the parser line/column and io ErrorKind in redacted startup errors; they are structural and cannot echo input - logging: add builder_store to the Lighthouse log allowlist so a builder omitted at proposal time is logged, and drop the docs caveat about it - client: remove the redundant bls dev-dependency Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Closes #1280. Stacked on #1282; followed by #1283. GitHub's base remains
epbs, so the full diff includes #1282. Review this service-wiring change against #1282 head508d64714fe36ff876c622583b86d4a24bb99249. No release or deployment from an intermediate head.Problem, Evidence, and Context
Produce-time builder authentication is too late to supply preferences reliably ahead of proposals. Without the builder-preferences service, the request-auth cache also lacks its pruning owner.
Change Overview
Start Lighthouse's
BuilderPreferencesServiceunder Anchor's existing Gloas-scheduled gate. Share the same Arc-backed BuilderStore and RequestAuthCache with block production. This keeps ahead-of-time signing, produce-time reuse and cache lifetime consistent without adding an Anchor-specific scheduler or cache.The merged Lighthouse pin now skips elapsed duties, uses the target epoch's fork header, resolves per-validator configuration and signs builders within a proposer concurrently. Proposers are still sequential and publication follows collection. Therefore a below-quorum auth can delay other preferences; Anchor's two-slot future collection bound remains necessary. Successful-only marking and chunk retries are retained. Builders must tolerate replay, including after restart.
Validation
cargo check --workspace --all-targets --locked: passed at this local stack boundary.fdcc8658. Initial runs observed ahead-of-time preferences across the Gloas boundary and reuse of reconstructed auths.The receiver was a threaded HTTP stub. It proves receipt timing but does not verify BLS signatures, identify individual sending operators or return bids. Whole-chunk retries produced extra receipt records during transient forwarding timeouts. The runtime image preceded final diagnostic, inactive-URL, test and documentation changes; the exercised signing, service and populated valid-config paths are unchanged. The interrupted run did not establish post-sleep finality recovery. August's old-pin run remains historical evidence only.
Risks, Trade-offs, and Mitigations
The fixed pin can echo a locally produced candidate's builder URL after Anchor selects another candidate. SIP section 4 treats forwarding as a latency optimization with gossip fallback, not a liveness prerequisite. This refresh does not add a new publication subsystem. Real-builder signature acceptance and bid selection remain separate runtime evidence gaps. Hosted CI must pass on this refreshed head. These runs did not include go-ssv, so mixed-client readiness remains unproven.
Rollback
Reverting this service alone removes ahead-of-time publication and the auth cache's pruning owner. Do not deploy that state with direct builders enabled. Roll back the complete builder stack to a validated build and compatible configuration; no new database or wire format is introduced by this PR.
Blockers / Dependencies
Depends on #1282 and must be followed by #1283 before deployment. The merged Lighthouse pin clears the old upstream-stack blocker. #1302's batch receiver and the future stateless/envelope-fold integration remain separate.