ChainSafe / forest

🌲 Rust Filecoin Node Implementation
https://forest.chainsafe.io
Apache License 2.0
623 stars 149 forks source link

Use `trustless-gateway.link` in lieu of `proofs.filecoin.io` #4587

Open LesnyRumcajs opened 1 month ago

LesnyRumcajs commented 1 month ago

Issue summary

From @BigLep

From talking with some of the Kubo maintainers (IPFS implementation) and operators of IPFS public utilities like ipfs.io (which proofs.filecoin.io is using behind the scenes), you may want to default to using https://trustless-gateway.link/ (from https://docs.ipfs.tech/concepts/public-utilities/#public-ipfs-gateways). Reasons:

  • That domain only serves trustless responses and so is far less likely to get blocked.
  • Using proofs.filecoin.io looks like a config mistake waiting to happen for that team as its legacy that they even are hosting an HTTP gateway under that domain.
  • Hardware-wise they are partitioning the fleet so that the trustless fleet gives better responses than folks relying on hosts that can serve trusted responses.

Sample usage: https://trustless-gateway.link/ipfs/QmS7ye6Ri2MfFzCkcUJ7FQ6zxDKuJ6J6B8k5PN7wzSR9sX?format=car

Note that we need to extract the file from a CAR file encoding a UnixFS file. Hopefully, this is already feasible with the tooling at hand.

Other information and links

hanabi1224 commented 1 month ago

We have switched to the trustless approach in #3244

LesnyRumcajs commented 1 month ago

Weren't there some issues that caused us to switch to proofs.filecoin.io? https://github.com/ChainSafe/forest/blob/f05854462f5be9721de2ef868aadcce97a039cdb/src/utils/proofs_api/paramfetch.rs#L37

hanabi1224 commented 1 month ago

Weren't there some issues that caused us to switch to proofs.filecoin.io?

I believe that's irrelevant to the trustless approach. proofs.filecoin.io gateway has all parameter files preloaded while a general public gateway needs to find and download them in the network before they can serve the download request

LesnyRumcajs commented 1 month ago

Are you saying we should not do this? See this comment as well on the reasoning behind the (potential) switch https://github.com/filecoin-project/lotus/issues/12273#issuecomment-2243936155

ribasushi commented 1 month ago

proofs.filecoin.io gateway has all parameter files preloaded

@hanabi1224 it's even simpler than that: proofs.filecoin.io does not run an IPFS node at all. It serves the files from a plain directory with a plain http server, in a manner that matches the ipfs http gateway. But no IPFS running there at all.