-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
make l1.beacon-archiver
work
#10269
make l1.beacon-archiver
work
#10269
Conversation
WalkthroughWalkthroughThe recent updates across the codebase enhance the functionality of the Changes
Recent Review DetailsConfiguration used: .coderabbit.yml Files selected for processing (1)
Files skipped from review as they are similar to previous changes (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Actionable comments posted: 0
Out of diff range and nitpick comments (1)
op-service/sources/l1_beacon_client.go (1)
212-212
: Add a comment explaining the new condition for checking if the response data length is zero.Adding a comment here will help maintain the code's readability and make it easier for future developers to understand the reason behind this condition.
How about other CL clients? The spec doesn't seem to mention this behaviour https://ethereum.github.io/beacon-APIs/#/Beacon/getBlobSidecars |
I would also expect a 404 on an expired blob? |
Prysm does seem to be returning 200 ok with an empty list. What do other clients do / can we have them become spec compliant? |
It seems both Prysm and Lighthouse do the same currently. Before the change happens, we'll need this PR to make it work as expected. |
391b223
to
4e9ea01
Compare
This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
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.
Actionable comments posted: 1
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.
Per spec, a valid Beacon API should return a 404 error if a blob is not found. What beacon api service shows behavior that is fixed by this PR?
Also note that we cannot make this check here in general, because if we use the fetchAllSidecars
option, at this point there will in general be more sidecars than the number of hashes. The filtering is then happening in L1BeaconClient.GetBlobSidecars
, which should also eventually return an error if no sidecars were returned, because it makes a length check after the filtering.
Asked in a lighthouse issue if this behavior is intentional. |
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 looks good! Suggesting a few minor improvements. Please also add a test for this case.
I tried to add a new testcase for the change of |
@zhiqiangxu I see... I think it would be a new unit test for There are (implicit) tests of the |
Done, and there's unfortunately no such a mock for |
7ef1bcf
* make l1.beacon-archiver work * check #blobs inside BeaconBlobSideCars * compatible with fetchAllSidecars * also check inside BeaconBlobSideCars * check index set inclusion in BeaconBlobSideCars * preallocate * add test for BeaconBlobSideCars * assert error string
CL will return empty array if blob expired. (source)
This PR makes
l1.beacon-archiver
actually work.