Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please use valid ipfs:// URLs (which use non-case sensitive CID encoding) #1305

Open
Gozala opened this issue Oct 18, 2021 · 2 comments
Open
Labels
bug Something isn't working

Comments

@Gozala
Copy link

Gozala commented Oct 18, 2021

Describe the bug

nft.storage users are running into 53 char limit with HEN as per nftstorage/nft.storage#571. Looking into this issue we also identified that HEN uses ipfs://Qm...hash style URLs are invalid as described here nftstorage/nft.storage#571 (comment)

Problem is that URL spec defined hostname section as case insensitive and many programs (including browsers) would normalize hostname segment to lower case resulting in an incorrect CIDs. This was primary reason why IPFS transitioned to base32 encoded CIDv1 representation which is bit longer (59 chars) but is less problematic.

Please consider switching to the same representation in HEN so that:

  1. So that tools looking at NFT tokenURIs aren't encountering wrong CID due to URL parse normalization.
  2. Users can provide non dag-pb encoded content (which can only be represented by CIDv1 which is would not fit 53 char limit)

Expected behavior

  • HEN minting smart contract accepts valid IPFS urls which are (CIDv1 in base32 encoding).
  • HEN minting smart contract uses valid IPFS urls in tokenURIs. That is ipfs://Qm..hash URLs are either rejected or transcoded to ipfs://bafy...hash style URLs to appear correct on chain.

Additional context
Please see related issues
nftstorage/nft.storage#571
nftstorage/nft.storage#387

Please note while nft.storage could support CIDv0 it would still be bad if that lead to bad ipfs:// urls on chain.

@Gozala Gozala added the bug Something isn't working label Oct 18, 2021
@crzypatchwork
Copy link
Contributor

appreciate the support we can use other CID versions still for media though.

@Gozala
Copy link
Author

Gozala commented Oct 26, 2021

@crzypatchwork thank you for getting back to us. Can you please help me understand what the plan is ? We really want to figure out a way to fix this so users like @NoRulesJustFeels aren’t left without workable solution.

If this is something that will get fixed on HEN side we can refer users to this issue. If there is no plan to address this by allowing proper ipfs URL maybe we can have conversation what a solution might look like so we can enable our users to use both our products.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants