In the latest iteration of our technical design for the organizational metadata project, we are thinking there should be two kinds of metadata that can be attached to an ENS name/subname:
- A required classification, which explains the node’s role in the organizational structure. Values could include things like
wallet,person, orcontract. - Optional attributes that belong to this entity, which would be situational. For example, a basic
walletclassification would not have any additional attributes, but apersonentity could have attributes such as name, email address, etc.
We want adoption of this system to be as frictionless as possible, so the current plan is to add the classification as a text record. This would allow users with existing registrations on the public resolver to simply add a text record to each entry to classify all the nodes in the data tree that is their ENS name. This could even be done by hand through the current ENS UI.
However, attributes can be quite numerous, and adding them as text records would get complicated quite quickly. For one, the key of each would need to be standardized based on the classification of the node. This would require implementers to know which key names are valid and to name them correctly.
Additionally, a node can have its class changed by simply updating the classification text record to a different type. However if the entry still had a bunch of text records containing attributes of the old type, that would be very confusing and could be hard to clean up.
Therefore, a much more elegant solution would be to introduce a metadata resolver which enforces data structures for this system. It could, for example, store validated structs of attributes based on the classification of the node, and if the classification were to change those structs could be deleted/updated automatically.
My question for this thread is about frictionless onboarding to promote adoption.
If we were to introduce a new resolver, it could have a class(node) method which returns the classification, instead of relying on text(node, metadata-key) from the current resolver. However, I feel we would not see much adoption from existing users if they were required to switch resolver and repopulate their records for every node they already have registered.
I think the best solution could be thus:
- The spec will specify that consumers should first query the interface of the resolver, and if it is a metadata resolver they should call
class(node)to get the classification. Otherwise, they should calltext(node, metadata-key)to see if a classification is set, as a fallback. - If users want to set a classification, they can either use the current resolver with a text record or use the new resolver.
- If users want to add attributes to a node, they must use the new resolver (and not even support adding attributes as regular text records)
This would allow people to start using the system frictionlessly with the existing setups, and allow them to upgrade for better functionality when they are ready.
Does this sound like the right approach? And looking further forward, would this perhaps be a good way to introduce new resolvers in the future? We could establish a precedent where new functionality uses text records to start, and then migrates to a custom resolver when adoption grows (but the names of the text records would probably need to be reserved permanently for legacy support).