-
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
Eth2api: GetBlockSSZ
supports bellatrix block
#10077
Conversation
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.
@@ -312,6 +317,14 @@ func serializeV2Block(response interface{}) (apimiddleware.RunDefault, []byte, a | |||
Signature: respContainer.Data.Signature, | |||
}, | |||
} | |||
} else if strings.EqualFold(respContainer.Version, strings.ToLower(ethpbv2.Version_MERGE.String())) { |
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.
what's the status of Version_MERGE
vs Version_Bellatrix
?
return ðpbv2.BlockResponseV2{ | ||
Version: ethpbv2.Version_MERGE, | ||
Data: ðpbv2.SignedBeaconBlockContainerV2{ | ||
Message: ðpbv2.SignedBeaconBlockContainerV2_MergeBlock{MergeBlock: v2Blk}, |
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.
Same here
@@ -108,6 +108,50 @@ func fillDBTestBlocksAltair(ctx context.Context, t *testing.T, beaconDB db.Datab | |||
return genBlk, blkContainers | |||
} | |||
|
|||
func fillDBTestBlocksBellatrix(ctx context.Context, t *testing.T, beaconDB db.Database) (*ethpbalpha.SignedBeaconBlockMerge, []*ethpbalpha.BeaconBlockContainer) { |
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.
Same here
b.Block.Body.Attestations = []*ethpbalpha.Attestation{att1, att2} | ||
root, err := b.Block.HashTreeRoot() | ||
require.NoError(t, err) | ||
signedB, err := wrapper.WrappedMergeSignedBeaconBlock(b) |
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.
Same in lines 113, 117, 126, 138
Copy from Discord: #10036 is still open. For now, review and approve with this disparity in mind. A simple renaming should not block off the rest of the progress. Regarding this PR, as long as CI/CD is green, we should have complete confidence that it is good to go. I will bump the priority for #10036, if there's no other attempt by the end of next week, I will personally take care of it |
There will be conflics between this and the stuff I am doing for the name change. In my opinion I would merge this after we change the name for Bellatrix everywhere, untless this is more important to get merge ASAP. |
This PR adds support for Bellatrix block to
GetBlockSSZ
eth2api implementation.The addition is from the
kintsugi
branch. The original author is @potuz, and I added the tests