Repository navigation
core/scheduler: refactor builder registration - #4271
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4271 +/- ##
==========================================
+ Coverage 56.64% 56.65% +0.01%
==========================================
Files 237 237
Lines 31332 31357 +25
==========================================
+ Hits 17748 17766 +18
- Misses 11311 11316 +5
- Partials 2273 2275 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR refactors builder registration to be asynchronous, decoupling it from the proposer duty flow to avoid blocking duty triggering. The changes implement the requirements from issue #4254 to improve performance and reduce load on the beacon node.
Changes:
- Builder registrations are now submitted asynchronously in separate goroutines instead of blocking the duty scheduling flow
- Registrations are submitted once on Charon startup to ensure they're available before the first proposal opportunity
- Epoch registrations are delayed to 75% through slot 0 to reduce beacon node load during the high-activity epoch boundary
- Thread-safe access to submittedRegistrationEpoch is implemented using a mutex with getter/setter methods
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| core/scheduler/scheduler.go | Adds async builder registration with mutex-protected state tracking, startup submission, and delayed slot 0 submissions |
| core/scheduler/scheduler_test.go | Updates test synchronization to handle async registration submissions with a signal channel |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
| // Fall back to immediate submission | ||
| s.submitValidatorRegistrations(ctx, slot.Epoch()) |
Refactor builder registration to be asynchronous. category: feature ticket: #4254



Refactor builder registration to be asynchronous.
category: feature
ticket: #4254