Skip to content

Conversation

@DiogoSantoss
Copy link
Contributor

Fix builder registration unmarshalling

category: bug
ticket: none

@codecov
Copy link

codecov bot commented Dec 16, 2025

Codecov Report

❌ Patch coverage is 40.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.30%. Comparing base (403a664) to head (23d12ba).
⚠️ Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
app/app.go 0.00% 3 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

Copilot AI left a 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.VersionedSignedValidatorRegistration directly instead of cluster.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.

@sonarqubecloud
Copy link

@DiogoSantoss DiogoSantoss added the merge when ready Indicates bulldozer bot may merge when all checks pass label Dec 16, 2025
@obol-bulldozer obol-bulldozer bot merged commit b3ed856 into main Dec 16, 2025
11 of 12 checks passed
@obol-bulldozer obol-bulldozer bot deleted the diogo/fix-builder-registration branch December 16, 2025 14:56
DiogoSantoss added a commit that referenced this pull request Dec 16, 2025
Fix builder registration unmarshalling

category: bug
ticket: none
obol-bulldozer bot pushed a commit that referenced this pull request Dec 16, 2025
Cherry pick of #4183 

category: misc
ticket: none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge when ready Indicates bulldozer bot may merge when all checks pass

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants