Loopring / loopring-wallet-feedback

钱包产品需求汇总(包括安卓和iOS)
10 stars 3 forks source link

ipfs.io endpoint used in Mint UI fails under heavy load #186

Open sk33z3r opened 2 years ago

sk33z3r commented 2 years ago

I don't have a specific repro for this, as it is intermittent behavior and seems to be reliant on how much traffic is hitting the explorer and the Mint UI.

Quick Observations:

The Issue: During high traffic periods, users report difficulty in viewing, loading, or even minting NFTs in the Mint UI. The behavior is a bit erratic, but generally the issues result in some images loading, others not loading, or a "Couldn't Fetch NFT Details" graphic.

When I experience these issues, I notice that we see a lot of 504 and CORS errors appear in the browser console relating to ipfs.io. If I copy the ipfs.io gateway URL for whatever NFT I'm trying to view, and go directly to it in a browser, I will receive an error that the gateway failed to fetch the data. It seems that ipfs.io has a very low rate limit and after a short amount of time it causes a lot of backend problems for minters.

The pinata and infura gateways appear to be much smoother, and don't have these rate limits. Is it possible to have the Mint UI use the same gateways, or is there some development reason why ipfs.io is being used?

fudgebucket27 commented 2 years ago

I would suggest for the fix is to stop using the public ipfs.io gateway entirely. Use the infura ipfs API which has a 100 requests per second rate limit instead, the ipfs api is much faster too.

fudgebucket27 commented 2 years ago

Another solution could be to append the minted CID to your already established dedicated ipfs gateway at https://loopring.mypinata.cloud/ipfs/MintCIDHere as the majority of the files will be pinned to pinata. You could take this a step further, pin these files to your pinata account as they come in and stop using the ipfs.io public gateway in the my-nft route in loopring.io and just use your dedicated gateway instead.