Merged
Conversation
rkapka
reviewed
Jul 11, 2023
|
|
||
| func sszRequested(req *http.Request) (bool, error) { | ||
| // SszRequested returns a bool value if the ssz type is requested. | ||
| func SszRequested(req *http.Request) (bool, error) { |
Contributor
There was a problem hiding this comment.
Let's maybe move this function to /network (how about a reader.go file?) because it doesn't make sense to import the middleware package in the HTTP handler. We shouldn't need the middleware at all when writing HTTP handlers.
| network.WriteError(w, errJson) | ||
| return | ||
| } | ||
| network.WriteSsz(w, sszResp, "sidecar_response.ssz") |
Contributor
There was a problem hiding this comment.
The spec defines the return object as "blob sidecars", so blob_sidecars.ssz could be more appropriate
| network.WriteError(w, errJson) | ||
| return | ||
| } | ||
| sidecarResp := ðpb.SidecarsResponse{ |
Contributor
There was a problem hiding this comment.
You don't need to define SidecarsResponse. You can use BlobSidecars because SSZ does not preserve field names. It only stores offsets and binary data.
1115fee to
460833e
Compare
460833e to
d46ed74
Compare
terencechain
approved these changes
Jul 11, 2023
kasey
pushed a commit
that referenced
this pull request
Jul 20, 2023
james-prysm
added a commit
that referenced
this pull request
Aug 4, 2023
terencechain
pushed a commit
that referenced
this pull request
Aug 4, 2023
james-prysm
added a commit
that referenced
this pull request
Aug 8, 2023
james-prysm
added a commit
that referenced
this pull request
Aug 9, 2023
james-prysm
added a commit
that referenced
this pull request
Aug 14, 2023
terencechain
pushed a commit
that referenced
this pull request
Aug 16, 2023
kasey
pushed a commit
that referenced
this pull request
Aug 21, 2023
kasey
pushed a commit
that referenced
this pull request
Aug 22, 2023
kasey
pushed a commit
that referenced
this pull request
Aug 22, 2023
kasey
pushed a commit
that referenced
this pull request
Aug 22, 2023
kasey
pushed a commit
that referenced
this pull request
Aug 23, 2023
kasey
pushed a commit
that referenced
this pull request
Aug 23, 2023
kasey
pushed a commit
that referenced
this pull request
Aug 23, 2023
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.
What type of PR is this?
Feature
What does this PR do? Why is it needed?
Adds ssz to the get blob sidecars beacon API endpoint
https://ethereum.github.io/beacon-APIs/?urls.primaryName=dev#/Beacon/getBlobSidecars
Which issues(s) does this PR fix?
part of #12248
Other notes for review