-
Notifications
You must be signed in to change notification settings - Fork 266
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
support DNSLink for encoding/decoding IPNS contenthash values #849
Comments
i traced this as far as the |
oh, i realized that the issue is probably specifically with contenthashes that use UTF-8 encoding of DNSLink IPNS names, as opposed to ones that use (base58?) identifiers as in https://docs.ipfs.io/concepts/ipns/#example-ipns-setup |
DNSLink
for encoding/decoding IPNS contenthash values
DNSLink
for encoding/decoding IPNS contenthash values
where can I find that ipns://noahzinsmeister.com is a IPNS URL? When I understand https://docs.ipfs.io/how-to/address-ipfs-on-web/ correctly ipns:// must be followed by a cidv1b32 and as far as I see noahzinsmeister.com is not a valid cidv1b32 |
details are here! https://docs.ipfs.io/concepts/dnslink/ |
Thanks for the info - but cidv1 is still enforced by EIP-1577 as far as I see - how does this fit together? https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1577.md |
Thank you for reporting @NoahZinsmeister. Looks like I created PR below and will merge into master. I don't know the exact protocol of IPNS so I am tagging @pldespaigne who is the author of |
@ligi i don't think that's the case, and if it is then it's a failing of EIP-1577 i believe that specifying |
AFAIR the second 0x01 you see there is coming from the VarUInt encoding. Was also wondering about this at first but realized it when implementing the decoding in KEthereum
How can I determine it is DNSLink from the contenthash to know If I need to treat it as utf-8 or base58 without the need to use heuristics? |
oh, good to know, thanks!
the for example, using |
Contenthash.prefix for ipfs/Qm.. hash is Uint8[1, 112, 18, 32] for DNSlink it's [1, 112, 0, length] |
@app.uniswap.org @0xc0de4c0ffee thanks for the clarification! |
Hi folks, apologies for late reply (OoO/afk for the weekend). On parsing inlined libp2p-keys
We've seen various tools naively expect CID everywhere and fail to properly read To avoid this problem we plan to switch default text output of libp2p-keys in IPFS to CIDv1 in Base36, but until that happens you may need to special-case multihash identifiers starting with Please avoid mixing cryptographic identifiers with arbitrary text. Future proofing by defaulting to CIDv1 with explicit
|
FYI, ensdomains/content-hash#3 change now this allows the user of dnslink. While it won't stop resolving .eth.link, our app will no longer decode more encode dnslink based contenthash. |
Refusing plain text DNS names in ENS records is a good decision 👍 |
I feel we have too many layers here, so I'll try to provide context why only DNSlink is an interop layer based on DNS protocol that enables us to
In other words, DNSLink is useful as resolution layer in contexts where ENS can't be used natively, but should not be used beyond the ENS border:
If one wants to set ENS record once, and avoid paying for updates every time their website content changes, they should use pubkey IPNS paths like |
hi, as a follow up to #358, i'm reporting what seems to be an issue in the decoding of IPNS contenthash values.
to give an example, my ENS domain
noahzinsmeister.eth
has an IPNS contenthash of0xe501017000136e6f61687a696e736d6569737465722e636f6d
, which should decode to/ipns/noahzinsmeister.com
(i verified this viaethereal ens contenthash get --domain=noahzinsmeister.eth
). however, the ENS app incorrectly reports this value asipns://1Ghg8vPvQZaVn2UkkRqBiXyKCpJY
(see screenshot)The text was updated successfully, but these errors were encountered: