You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 18, 2023. It is now read-only.
So, this is fun.
When fetching from an iroh gateway, you always get the data and just the data.
On ipfs.io for example if you do a ?format=raw which we use for racing gateways, the data seems prefixed with:
\n\xcb\x08\x08\x02\x12\xc3\x08 for QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB in stringy form
0A, CB, 08, 08, 02, 12, C3, 08 for QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB
Unable to reproduce, gateway returns exactly the same bytes as getting raw block:
$ ipfs block get bafybeifffvqarrkavsdg664bluuci3ojmmda6st73icfjgzqbb7ffhlkwi > expected
$ curl "http://127.0.0.1:8080/ipfs/bafybeifffvqarrkavsdg664bluuci3ojmmda6st73icfjgzqbb7ffhlkwi?format=raw"> local_curl
$ curl "https://ipfs.io/ipfs/bafybeifffvqarrkavsdg664bluuci3ojmmda6st73icfjgzqbb7ffhlkwi?format=raw"> ipfs.io_curl
$ diff -s expected local_curlFiles expected and local_curl are identical
$ diff -s expected ipfs.io_curlFiles expected and ipfs.io_curl are identical
@Arqu perhaps you are comparing different things, such as dag-pb[Data].Data field with the entire dag-pb block? ?format=raw will return the entire block as opaque bytes, and for dag-pb block it means entire outer protobuf.
ps. You may want to look at ipfs/specs#331 which explains internals of dag-pb blocks, but ?format=raw does not care about codec, it does not parse the block, it only return bytes that will hash to the multihash in the requested CID and that is all.
When running as a racing gateway iroh fails the the block hash verification for raw.
bafybeifffvqarrkavsdg664bluuci3ojmmda6st73icfjgzqbb7ffhlkwi
The text was updated successfully, but these errors were encountered: