-
Notifications
You must be signed in to change notification settings - Fork 1.1k
beacon-api: add data column sidecars debug endpoint #15402
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
base: develop
Are you sure you want to change the base?
Conversation
3dd0a68
to
f3e3415
Compare
f3e3415
to
a16f16b
Compare
cc @nalepae |
@@ -0,0 +1,143 @@ | |||
package column |
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 about using "data column" instead of "column"?
(Ideally, we should use blob sidecar and data column sidecar, since corresponding endpoints are for sidecars and not directly for blobs and data columns.)
// parseIndices filters out invalid and duplicate blob indices | ||
func parseIndices(url *url.URL, s primitives.Slot) ([]int, error) { | ||
// ParseIndices filters out invalid and duplicate blob indices | ||
func ParseIndices(url *url.URL, s primitives.Slot) ([]int, error) { |
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.
Is it working correctly with data columns?
This function has:
maxBlobsPerBlock := params.BeaconConfig().MaxBlobsPerBlock(s)
...
if !(0 <= ix && ix < maxBlobsPerBlock) {
invalidIndices = append(invalidIndices, raw)
continue
}
What about data columns with index higher than MaxBlobsPerBlock
?
(I guess reusing the function here is not something we should do.)
@@ -41,6 +41,7 @@ func (e BlockIdParseError) Error() string { | |||
type Blocker interface { | |||
Block(ctx context.Context, id []byte) (interfaces.ReadOnlySignedBeaconBlock, error) | |||
Blobs(ctx context.Context, id string, indices []int) ([]*blocks.VerifiedROBlob, *core.RpcError) | |||
DataColumnSidecars(ctx context.Context, id string, indices []int) ([]blocks.VerifiedRODataColumn, *core.RpcError) |
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.
Here we have a discrepancy without Blobs
and DataColumnSidecars
.
Ideally, it should be BlobSidecars
as well.
This PR implements the addition proposed in: ethereum/beacon-APIs#537
Note to reviewer: I haven’t tested this on devnet1 yet, so please expect potential bugs. I’ll report back here once I get a chance to try it in production. Feel free to push directly to this branch if needed.