Specify SSZ framing for GET /eth/v1/debug/beacon/data_column_sidecars/{block_id} - #633
Merged
Merged
Conversation
4 tasks
Member
there is the following container defined in the spec class DataColumnSidecars(List[DataColumnSidecar, compute_max_request_data_column_sidecars()]):
"""
Data column sidecars returned in a ``DataColumnSidecarsByRange`` or
``DataColumnSidecarsByRoot`` response.
"""where def compute_max_request_data_column_sidecars() -> Uint64:
"""
Return the maximum number of data column sidecars in a single request.
"""
return Uint64(MAX_REQUEST_BLOCKS_DENEB * NUMBER_OF_COLUMNS)but this type is used by we do have the schema defined here beacon-APIs/types/fulu/data_column_sidecar.yaml Lines 2 to 7 in 95b9faf but I do think the change in this PR makes sense to avoid potential confusing about the response type |
nflaig
approved these changes
Aug 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GET /eth/v1/debug/beacon/data_column_sidecars/{block_id}declares its SSZ response as:DataColumnSidecarsis not an SSZ type, so it might be confusing for encoding the response. Here's a research conducted by Claude:Listbeacon_node/http_api/src/lib.rs→data_columns.as_ssz_bytes()onDataColumnSidecarList = Vec<Arc<DataColumnSidecar<E>>>(offset-framed for variable-sizeT)Listbeacon_chain/rpc/rest_debug_api.nim→handleDataSidecarRequest[..., List[fulu.DataColumnSidecar, NUMBER_OF_COLUMNS]],sszResponseon theListListpackages/api/src/beacon/routes/debug.ts→sszTypesFor(fork).DataColumnSidecars, i.e.new ListCompositeType(DataColumnSidecar, NUMBER_OF_COLUMNS)Listhttp_api/src/standard.rs::debug_beacon_data_column_sidecars→DynamicList<Arc<DataColumnSidecar<P>>>, whoseSszWriteisshared::write_list.../v1/debug/GetDataColumnSidecars.java→data.forEach(s -> s.sszSerialize(out))beacon-chain/rpc/eth/debug/handlers.go::buildDataColumnSidecarsSSZResponse→ loopsMarshalSSZand appendsI can tell Prysm is just concatenating it, so about to fix this.
This PR clarifies and specifies that we are gonna use SSZ List for the response, so the clients can prepend offset bytes before marshalling the items.