Closed nugaon closed 1 week ago
This must go through a SWIP
Wrote SWIP and created PR for that
is direct resolutiion into content really needed? wouldnt it be much simpler if this was done in 2 steps on cllient side?
This is desired to eliminate; the content can be resolved by only 1 request. Moreover, with bigger content there is no API functionality to pass a whole chunk to resolve (and that way would be more complex)
Please add the new headers to corsHandler
allowedHeaders
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 asGET /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):