-
Notifications
You must be signed in to change notification settings - Fork 134
core/scheduler: fix builder registration unmarshalling #4183
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
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4183 +/- ##
==========================================
+ Coverage 56.27% 56.30% +0.02%
==========================================
Files 245 245
Lines 31288 31286 -2
==========================================
+ Hits 17607 17615 +8
+ Misses 11364 11356 -8
+ Partials 2317 2315 -2 ☔ 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 fixes a critical bug in builder registration unmarshalling. The builder registrations stored in the cluster manifest are serialized as eth2api.VersionedSignedValidatorRegistration JSON, but the code was incorrectly attempting to unmarshal them into cluster.BuilderRegistration and then convert them. This fix removes the unnecessary conversion layer and uses the correct type throughout the scheduler and testing code.
Key changes:
- Changed scheduler to accept
*eth2api.VersionedSignedValidatorRegistrationdirectly instead ofcluster.BuilderRegistration - Removed conversion logic from
scheduler.New()that was translating between incompatible types - Updated test data and helper functions to use proper eth2 API types with fixed-size byte arrays
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| testutil/beaconmock/options.go | Updated BuilderRegistrationSetA to use *eth2api.VersionedSignedValidatorRegistration and added helper functions for creating fixed-size byte arrays |
| core/scheduler/scheduler_test.go | Updated test to use new type and corrected field access paths (.V1.Message instead of .Message) |
| core/scheduler/scheduler.go | Changed function signatures to accept *eth2api.VersionedSignedValidatorRegistration and removed incorrect type conversion logic |
| app/app.go | Updated to unmarshal directly into eth2api.VersionedSignedValidatorRegistration instead of cluster.BuilderRegistration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Fix builder registration unmarshalling category: bug ticket: none
Cherry pick of #4183 category: misc ticket: none



Fix builder registration unmarshalling
category: bug
ticket: none