Add DataColumnSidecarSelectorFactory test#10333
Add DataColumnSidecarSelectorFactory test#10333zilm13 wants to merge 3 commits intoConsensys:masterfrom
Conversation
...test/java/tech/pegasys/teku/api/datacolumnselector/DataColumnSidecarSelectorFactoryTest.java
Outdated
Show resolved
Hide resolved
...src/main/java/tech/pegasys/teku/api/datacolumnselector/DataColumnSidecarSelectorFactory.java
Outdated
Show resolved
Hide resolved
...src/main/java/tech/pegasys/teku/api/datacolumnselector/DataColumnSidecarSelectorFactory.java
Show resolved
Hide resolved
| final DataColumnSidecarSelectorFactory dataColumnSidecarSelectorFactory = | ||
| new DataColumnSidecarSelectorFactory(ctx.getSpec(), client); | ||
|
|
||
| final SignedBlockAndState blockAndState = data.randomSignedBlockAndState(100); |
There was a problem hiding this comment.
Test uses wrong DataStructureUtil for cross-milestone template
Low Severity
In shouldLookForDataColumnSidecarsByHeadOnlyAfterFulu, blockAndState is created via the class-level data field (which uses a FULU spec), while the factory is correctly constructed with ctx.getSpec(). This creates a spec mismatch when running with non-FULU milestones (e.g., Phase0 factory holding a FULU-structured ChainHead). The sibling test shouldLookForDataColumnSidecarsBySlotOnlyAfterFulu correctly uses new DataStructureUtil(ctx.getSpec()) to generate context-appropriate data — this test needs the same treatment.
Additional Locations (1)
tbenr
left a comment
There was a problem hiding this comment.
I'm not a fan of these if(fulu)s
end returning empty the API will return a 404 even if the request is invalid, so we should trigger a 400 at API level, imo.
|
@tbenr It depends on selector if we know this info at the certain phase: |


PR Description
Fixed Issue(s)
Documentation
doc-change-requiredlabel to this PR if updates are required.Changelog
Note
Low Risk
Mostly adds tests plus straightforward milestone gating that reduces when storage is queried; low blast radius but changes API behavior for pre-Fulu slots/blocks (now returns empty).
Overview
Adds a comprehensive unit test suite for
DataColumnSidecarSelectorFactory, coveringhead,finalized,genesis,slot, andblockRootselector behaviors plus metadata assertions and error/unsupported selector cases.Updates selector fetching to only query data column sidecars starting at the
FULUmilestone, and to return an empty list (without calling storage) for valid FULU Deneb blocks that contain no blob KZG commitments.Written by Cursor Bugbot for commit 55e6c20. This will update automatically on new commits. Configure here.