Skip to content
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

feat: add GET header to return raw blob #222

Closed
wants to merge 1 commit into from
Closed

Conversation

bxue-l2
Copy link
Collaborator

@bxue-l2 bxue-l2 commented Dec 21, 2024

This is a POC for returning raw codec-ed blob.

This POC is only tested against raw blob and other store getRaw isn't tested.

This POC relies on http header on the http GET method to indicate if it wants the raw blob.

Recall suppose our blob is called A, the final output is IFFT(codec(A)).

The raw blob return you codec(A). An alternative way to reconstruct the header again inside the client code, which looks more verbose.

This is only used for internal testing, the final approach is yet to be decided.

@samlaf samlaf changed the title raw blob feat: add GET header to return raw blob Dec 21, 2024
Copy link
Collaborator

@samlaf samlaf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't think we should duplicate code like this. Most of the code in GetRaw everywhere is exactly the same as Get. If all it's doing is not taking the IFFT at the end or something, then right way is prob just to add a bool argument to the Get methods.

Comment on lines +70 to +71
// ToDo still not correct impl
func (e Store) GetRaw(ctx context.Context, key []byte) ([]byte, error) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused, what is this supposed to do? It's doing the exact same thing as Get() right now.

@bxue-l2
Copy link
Collaborator Author

bxue-l2 commented Dec 22, 2024

Close in favor of this PR, Layr-Labs/hokulea#19

Can re-open if needed

@bxue-l2 bxue-l2 closed this Dec 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants