filecoin-saturn / L1-node

Filecoin Saturn L1 Node • The edge cache layer of Filecoin's decentralized CDN 🪐
Other
140 stars 50 forks source link

RAW format handling doesn't work for path requests, should fail anyway for trustless #401

Closed hannahhoward closed 1 year ago

hannahhoward commented 1 year ago

What

Reading the code for getRequestedBlockFromCar it looks in cases where a path is passed for a RAW request, the returned block is root block, rather than block at the end of the path (which is what is supposed to happen for a RAW request in the Path gateway spec). However, this would be a trustful request anyway, because you don't have the blocks to verify the raw block at the end. so I think the proper behavior is to 400 any request in format=RAW where a path is present.

guanzo commented 1 year ago

I think the proper behavior is to 400 any request in format=RAW where a path is present.

sgtm, will fix soon

guanzo commented 1 year ago

Closed by https://github.com/filecoin-saturn/L1-node/pull/411