Skip to content

pluggable ipns resolvers #3942

@whyrusleeping

Description

@whyrusleeping

I've been thinking about how to make it easy to add in new ipns resolvers to ipfs.

@llopv implemented a namecoin resolver here: ipfs/notes#41 (comment) and i'm thinking we can make it easier than hacking the namesys code.

My proposal is to have a config section for the resolver that could look something like:

"Ipns": {
  "Plugins": [
    {
      "name": "namecoin",
      "match": "^*.bit$",
    }
  ]
}

This would register a new ipns resolve called 'namecoin', and upon trying to resolve a name that matches the regex in 'match', would look for a binary at $IPFS_PATH/resolvers/ipns-namecoin and execute it with the argument of the name being resolved. The binary could return either just the resolved value, or maybe the value along with some extra information like a ttl

This way, users could write a (for example) namecoin resolver as a simple binary, and ipfs would require no modifications to be able to use it.

A lot of things for this need to be thought through, primarily security, and the implications of having different resolvers all over, people might end up passing ipns paths that others cant actually resolve.

Metadata

Metadata

Assignees

No one assigned

    Labels

    need/analysisNeeds further analysis before proceedingneed/community-inputNeeds input from the wider communitytopic/ipnsTopic ipns

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions