bitdomains / contracts

Creative Commons Zero v1.0 Universal
0 stars 0 forks source link

Support subresolvers #12

Open ross-weir opened 1 year ago

ross-weir commented 1 year ago

Support subresolvers, something like:

ross-weir commented 1 year ago

Traditionally I think subresolvers would be added via the Registry, consider adding subresolver minting as a registry action instead of a resolver action

Some random ideas:

ross-weir commented 1 year ago

Another potential benefit of using the registry to store sub resolvers is offchain code would only need to track one avl tree instead of one avl tree per resolver

Not sure how big a deal this is though

Downside: It would require txns to be submitted by bots since we are interacting with the Registry (with current design)

ross-weir commented 1 year ago

I think each resolver should be responsible for subresolvers for the following reasons:

Pros:

Cons:

ross-weir commented 1 year ago

2 difficult questions depending on which approach we take. Still lean towards Resolver managing subresolvers but we could explore more solutions.

Registry tracking subresolvers

How do we ensure subresolvers of a domain are removed from the registry when a resolver is traded/sold?

Resolver tracking subresolvers

How do we efficiently resolve a chain of subresolvers? It requires processing all AVL trees for ALL resolvers and their subresolvers, not sure if this is practical. May need some specialised indexing.