-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Beacon api: fix get blind block #11304
Conversation
// - The current time is before bellatrix fork epoch. | ||
// - The requested slot is before bellatrix fork epoch. |
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.
This is against the spec: https://ethereum.github.io/beacon-APIs/?urls.primaryName=dev#/Beacon/publishBlindedBlock
Pre-Bellatrix, this endpoint will accept a SignedBeaconBlock.
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.
That's publish, not produce. but i see it's the same with produce, that's annoying, I'll have to add the original code back:
https://ethereum.github.io/beacon-APIs/?urls.primaryName=dev#/Validator/produceBlindedBlock
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 makes no sense to produce a non-blind block IMO
if optimistic { | ||
return nil, status.Errorf(codes.Unavailable, "The node is currently optimistic and cannot serve validators") | ||
} | ||
altairBlk, err := vs.V1Alpha1Server.BuildAltairBeaconBlock(ctx, v1alpha1req) |
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.
Why do we build an Altair block here, not Bellatrix?
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.
Build Altair block as the base, then insert header to turn that into a blind Bellatrix block.
Similar workflow for the non-blind block as well
Fixes #11293
The current beacon API for getting blind blocks has many incorrect assumptions:
Instead, we should simplify the get blind block endpoint to return an error if any of these is true
In the happy path, the endpoint will return a block with a header that's through the relay/builder network