-
Notifications
You must be signed in to change notification settings - Fork 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
Add proposer gRPC suppot for Electra #13984
Conversation
184dbda
to
9c5e532
Compare
9c5e532
to
af15381
Compare
sBlk, err = blocks.NewSignedBeaconBlock(ðpb.SignedBeaconBlockElectra{Block: ðpb.BeaconBlockElectra{Body: ðpb.BeaconBlockBodyElectra{}}}) | ||
if err != nil { | ||
return nil, status.Errorf(codes.Internal, "Could not initialize block for proposal: %v", 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.
I know this is just repeating the existing pattern, but this switch feels upside down. Typically we write this kind of type switch where the inequality is the other way:
bEpoch := slots.ToEpoch(slot)
if bEpoch >= params.BeaconConfig().ElectraForkEpoch {
... // do electra thing
}
if bEpoch >= params.BeaconConfig().DenebForkEpoch {
... // do deneb thing
}
// do phase 0 thing
@@ -18,6 +18,7 @@ func Test_getEmptyBlock(t *testing.T) { | |||
config.BellatrixForkEpoch = 2 | |||
config.CapellaForkEpoch = 3 | |||
config.DenebForkEpoch = 4 | |||
config.ElectraForkEpoch = 5 |
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.
Can you document the effect of setting these fork epoch values? I assume the point here is just to set the highest epoch to something that won't overflow (when it is set to max uint) and making sure these epochs don't conflict with each other.
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 just so we can test the conditions. Here is how it's used in the test case:
slot: primitives.Slot(params.BeaconConfig().ElectraForkEpoch) * params.BeaconConfig().SlotsPerEpoch,
which gets passed to getEmptyBlock(tt.slot)
, then reached under case epoch >= params.BeaconConfig().ElectraForkEpoch:
* Add proposer RPC suppot for Electra * Kasey's feedback
* Add proposer RPC suppot for Electra * Kasey's feedback
This PR adds Electra support for proposer RPC. Mainly
GetBlock
can be used to retrieve electra version block to signProposeBlock
can be used to submit electra blockNote to the reviewer:
ProcessOperationsNoVerifyAttsSigs
is updated with version.Electra or else unit test will failStreamBlocksResponse