pkgx icon indicating copy to clipboard operation
pkgx copied to clipboard

IPFS Fetch with S3 as backup

Open kunalgoyal9 opened this issue 3 years ago • 4 comments
trafficstars

kunalgoyal9 avatar Oct 25 '22 11:10 kunalgoyal9

  • Added a new type to the Type enum
  • Changed the return value of useOffLicense() to include both s3 and ipfs urls/keys
  • Added two functions: ipfsUrl, which returns an IPFS url if it exists or falls back on S3; and ipfsKey, which gets the CID from S3 (if available) or just uses the key as is.
  • In install(), changed useOffLicense('s3') to await useOffLicense('s3').url(stowage), since we're now returning a promise instead of just a URL object in that function call.

what-the-diff[bot] avatar Oct 25 '22 11:10 what-the-diff[bot]

Agree with @jhheider that returning the s3 url when you call the off-license with ipfs is a coding smell.

Cannot merge this until everything in s3 is in ipfs, and that we trust it works reliably and that the stuff in ipfs is available either instantly or very quickly. What's our status on that?

What's our plan for being properly decentralized in how we access the ipfs?

mxcl avatar Oct 26 '22 12:10 mxcl

Agree with @jhheider that returning the s3 url when you call the off-license with ipfs is a coding smell.

Sure working on it.

Cannot merge this until everything in s3 is in ipfs, and that we trust it works reliably and that the stuff in ipfs is available either instantly or very quickly. What's our status on that?

I will be creating a script to upload all s3 package to ipfs and its respective cid to s3. For reliability check, I will be researching on public IPFS network providers like infura nodes and will implement stuff for our network.

What's our plan for being properly decentralized in how we access the ipfs?

Need some time to understand the proper policies execution for the nodes.

kunalgoyal9 avatar Oct 26 '22 16:10 kunalgoyal9

@jhheider @mxcl Can you please review this PR again?

Upgrades in IPFS network:

  1. m6a.xlarge from t2.medium
  2. Restriction with the nodes network(now only gateway ports are open to download a file)
  3. All packages are uploaded to IPFS network

kunalgoyal9 avatar Oct 28 '22 13:10 kunalgoyal9