Open ross-weir opened 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:
label
register of resolver box becomes a Coll[Coll[Byte]]
and can contain multiple labelsRegistry
AVLTree alongside regular domainsAnother 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)
I think each resolver should be responsible for subresolvers for the following reasons:
Pros:
Cons:
pay.me.example.erg
I would need to first replay all avl tree actions in example.erg
to ensure the me.example.erg
exists with a valid nft, then replay all avl tree actions in me.example.erg
to validate pay.me.example.erg
exists with a valid nft and so on.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.
Support subresolvers, something like:
Add flag toProbably no need for this, would still need to manually verify ids off-chainResolver
box includingparent nft id
For a root resolver the parent will be theRegistry
nft idFor subresolvers the parent will be the parentResolver
nft idResolver
should maintain a avl tree of subresolvers similar toRegistry
Resolver
label
&tld
registers into single collection oflabels
(and update contracts accordingly) why did I want to do this? xDResolver
contract for subresolversmintSubResolver
action toResolver
contractResolver
subresolvers AVL tree whenResolver
is sold