Support IPLD Contenthash

Yes & Yes, give us 1+ week :pray:
IPLD contenthash use same contenthash field as IPFS. ipfs:// is prefixed with 0xe3 namespace while ipld:// is 0xe2 prefixed namespace according to multiformats/multicodec. I’ve checked latest go-ipfs “kubo” codes and test files for IPFS and IPLD published under IPNS, all works with IPNS+IPLD.

We’ll write more about that in draft ENSIP soon. it’s not so different from ipfs/ipns contenthash at surface. This is our short list of solutions and problems for now…

IPLD is data container format so Dapps are free to use their own IPLD schemas and decide how they read/write IPLD hash pointing to their *.domain.eth. We’re still exploring more ideas for how clients/services could handle basic plaintext/data uris, and different contenthash pointers linked deep inside IPLD, while also allowing public eth gateways to always fallback to plaintext/json.

There’s plaintextv2. -- multiaddr -- 0x706c61--- draft in multicodec for plaintext, but we could simplify that for ENS contenthash by using ERC721’s tokenuri like string as bytes(…data).

Plaintext/data uris specs are required for clients/ENS apps to resolve deeply linked json/data, so it’d be good idea to work on ENSIP for "plaintext/data URIs in contenthash" before IPLD related ENSIP to recursively use same specs under IPLD. Tbh, that’s one feature stopping our deeper ENS+ETH integration.

  • example :
    <0xaddr>.balanceof.dai.uniswap.eth API could read that balance from on-chain dai contract and return contenthash as bytes("data:application/json;...balance" ).

We already have that token data and ENS resolver on-chain but we use off-chain contenthash and then connect to another service provider/wallet APIs to read that balance. I’m bit surprised by unnecessary +2x loop in core ENS feature.

Here’s some IPLD examples/test files to explore.

One more bit old half-baked idea around namehash+ipld to store preimage.eth in IPLD using namehash as hashing algo. Add ENS Namehash by 0xc0de4c0ffee · Pull Request #184 · multiformats/multicodec · GitHub

&& sorry for bit late reply, I was buidling an IPFS gateway using ENS+CCIP only *.ipfs2.eth, before ens small grants deadline… It’s using all of our CCIP tricks that we’re trying to mix with IPNS+IPLD.

  • updated link
3 Likes