-
Notifications
You must be signed in to change notification settings - Fork 341
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: feed wrapping #4677
feat: feed wrapping #4677
Conversation
2e082ee
to
abe6896
Compare
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 must go through a SWIP
is direct resolutiion into content really needed? wouldnt it be much simpler if this was done in 2 steps on cllient side?
extensive documentation, examples should accompany release of this feature
thorough test of backward compatibility
Wrote SWIP and created PR for that
This is desired to eliminate; the content can be resolved by only 1 request. |
@@ -64,6 +64,14 @@ func (s *Service) feedGetHandler(w http.ResponseWriter, r *http.Request) { | |||
queries.At = time.Now().Unix() | |||
} | |||
|
|||
headers := struct { |
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.
Should we keep the queries above with At
and After
? Also bellow there is a lookup using this queries.
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.
it may be needed for epoch based feeds.
I created an issue about that #4830
Please add the new headers to |
This feature drops the JSON structure with CAC reference and timestamp in feed payload in order to be capable of wrapping a whole content addressed chunk instead. The feed payload resolution is backward compatible by checking the
span + ts + swarmHash
size in content and trying to retrieve the content under swarmHash.Because the SOC content needs to be resolved in one request and there is no
ts
attribute of a feed anymore, the Feed API must be updated and it has breaking change on its GET endpoint. Additionally,at
parameter is no longer in use at sequential feeds.Since now feed endpoint can return content bigger than one chunk and that can be erasure coded, erasure-code related request headers have been added.
Some application may use this endpoint to simply get the latest index of a sequential feed, for that new header is introduced
swarm-only-root-chunk
which is a boolean type and if it is true then Bee does not retrieve the whole chunk tree.GET /soc/{owner}/{id}
method is introduced with required path parametersowner
andid
which are hex encoded strings.This new method handles root chunk as a Single Owner Chunk by default and resolves and returns content similarly as
GET /feed
. Both endpoints return newly introduced headerswarm-soc-signature
which encodes the signature of the Single Owner Chunk in question.Checklist
Description
Open API Spec Version Changes (if applicable)
Motivation and Context (Optional)
Related Issue (Optional)
Screenshots (if appropriate):