-
Notifications
You must be signed in to change notification settings - Fork 132
*: builder reg redesign #4060
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
*: builder reg redesign #4060
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4060 +/- ##
==========================================
+ Coverage 54.84% 56.24% +1.40%
==========================================
Files 242 241 -1
Lines 31038 30861 -177
==========================================
+ Hits 17023 17359 +336
+ Misses 11776 11230 -546
- Partials 2239 2272 +33 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR redesigns the builder registration flow in Charon. Previously, validator clients submitted registrations through the validator API which went through consensus. Now, the Scheduler component directly submits pre-generated builder registrations to the beacon node at startup and at the first slot of every epoch, bypassing the consensus workflow entirely.
Key changes:
- Builder registrations are now submitted directly by the Scheduler instead of going through the validator API and consensus workflow
- The
/eth/v1/validator/register_validatorendpoint now returns 200 OK without processing - Removed the Recaster component which previously handled registration rebroadcasting
Reviewed Changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| core/scheduler/scheduler.go | Added submitValidatorRegistrations() method that submits builder registrations at epoch boundaries |
| core/validatorapi/validatorapi.go | SubmitValidatorRegistrations() now returns immediately without processing |
| core/validatorapi/router.go | Registration endpoint handler simplified to return success without processing |
| testutil/validatormock/component.go | Added case for DutyBuilderRegistration with no action needed |
| testutil/integration/simnet_test.go | Commented out builder registration tests pending redesign |
| core/bcast/recast.go | Removed entire Recaster component |
| core/bcast/bcast.go | Removed registration broadcasting logic |
| app/app.go | Removed wireRecaster() and updated to use builderRegistrations instead of corePubkeys |
| core/scheduler/metrics.go | Added new metrics for registration submission |
| docs/metrics.md | Updated metrics documentation |
| docs/architecture.md | Documented the redesign and migration considerations |
| testutil/beaconmock/options.go | Added BuilderRegistrationSetA test data and MustBytesFromHex() helper |
| core/scheduler/scheduler_test.go | Updated tests to use builder registrations and added TestSubmitValidatorRegistrations() |
| core/validatorapi/validatorapi_test.go | Removed tests for registration submission |
| core/validatorapi/eth2types.go | Removed signedValidatorRegistrations type and unmarshal methods |
| core/bcast/metrics.go | Removed recast-related metrics |
| core/bcast/bcast_test.go | Removed registration broadcasting test |
| app/health/checks.go | Updated health check to use new metric name |
| app/health/checks_internal_test.go | Updated test to use new metric name |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if err != nil { | ||
| submitRegistrationErrors.Add(1) | ||
|
|
||
| log.Error(ctx, "Failed to submit validator registrations", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, something interesting to keep in mind and we have no influence on:
MEV-boost will report success on registrations to the BN (and hence to us) if at least 1 succeeds. This is weird behaviour IMO as it should result in failure if at least 1 fails.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should start talking to MEV directly...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It won't solve our issue here though. As it's the aggregator (MEV-boost) that is returning an OK response.
And I really don't fancy signing up for doing MEV-boost's job ourselves and talking directly to the relays.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 19 out of 19 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|



New builder registration mechanism. Check CoPilot's summary for details.
category: refactor
ticket: none