-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Subdomains!!!: Addressability!!! Addressable Contracts!!! And Excited by Nothing!!!!!!! #29
Comments
It might be worth adding a field for EDIT: this is #30 |
cc @elsehow for this discussion |
my concept is something i've been thinking of as "RAD" (recursive, agnostic, decentralized) DNS. while the idea is a smart contract running on the Juno testnet, it's best introduced by its client-side logic. here's some psuedocode for the client:
imagine the client wants to query the nested path: they'd first query the root DNS (our contract) for now, you may think: won't that cause lots of lookups - one for each step in the heirarchy? not necessarily! it depends how the for example, given the route
that's only two queries to the chain! this DNS is recursive because you can nest resolves inside one another. it's agnostic because our "root TLD" (and indeed, any TLD beneath it) only cares about the head of the list. it doesn't care this DNS is decentralized in that the root DNS - and every child DNS - can be governable by the NFT holders. that governance can do things like revoke routes, grant names, describe what names are legal, etc... it's a more flexible and equitable system than the traditional root DNS model, which relies on ICANN etc etc etc... and owners of TLDs (like .net) have no say over the governance of those domains. cc @ezekiiel |
Right, except that the i.e. Although, as I type this, I realise the transferring issue is somewhat intractable, because either you have the token id as the full path, which contains the meta in it, i.e. HMMMMMM 🤔 |
in this example, there doesn't need to be any token other than let's stick with the
there is no token for do you see? |
Right, so the domain ownership is a token, and there's just a 1-to-many relationship to sub paths that use the token as the root? |
I think that would literally only require an indexed map and a single query handler on this contract to implement if so |
effectively.
exactly. PS - in practice, we would imagine that some subpaths could be their own root. i imagine that top-level domains will be most likely to be roots. for example, i might register |
also, to the issue: "couldn't some people run their TLD in a sketchy way?" yes. of course. that happens already. the goal is to make each TLD maximally self-governing and autonomous. |
Okay, but subpaths-as-tokens feels like a complexity that maybe we can sidestep for now. Propose then that v1 of this (probably won't be ready for MVP, as I need to test hella stuff atm and wire it into the UI) is:
ResolverThis could be something like QueryMsg::Resolve {
path: "elsehow/meta/juno/validator",
} which would return something like: PathInfo<T> {
root_token_id: String, // i.e "elsehow",
root_meta: Option<Metadata>, // i.e. root meta rather than root nft_info
payload: T, // the type of data found at the leaf (serialised JSON)†
}
|
Incidentally, the
is almost solved by default. Since the TLDs are NFTs, they can just be purchased by a multisig or DAO. |
yep, exactly!
we don't have to think about it - we never have to think about it. it's a feature that can emerge naturally from the design. |
Thoughts on #29 (comment)? |
I think that looks good. @ezekiiel ? |
I think this is great. This reminds me of an iterative DNS query as opposed to a recursive one.
Any particular advantage to even having root and non-root level tokens? From the way that this is being suggested I'd imagine that this change could literally be:
All responses then become: Response {
metadata: Metadata,
unresolved: option<string>
} This saves the hastle too of needing to provide an upgrade process for upgrading a non-root token to a root-token. |
@elsehow something re: moderation / subdomain independence to consider: Should the TLD be able to revoke specific subdomains as well? For example: in the RIR system a RIR can currently revoke part of an issued ip block without revoking the whole thing. Ex: issue If we want to prevent that we'd need to make this look a little more like a DNS query where the querier needs to split the query and then ask each TLD iteratively for its respective section. |
of course with this design a client could always lie and find it anyhow 🤷♂️ something else to consider. |
It's funny that you say:
I hadn't read that, but slept on this, woke up and went "hang on, isn't the general case for this entire shebang simply that you can have NFTs that result in a tree (that is a set of subdomains... and the only missing part is that all (de)NS NFTs need to have a meta field saying if they're a contract or not?" So I think we're circling around the same idea, that addressing contracts is worth figuring out (see also #33 and the IBC stuff) Default it to Imagine most people will simply want a root (de)NS NFT that maps onto a single contract but you could envisage a scenario:
if I list the tokens owned by that address, I get:
|
I think there may be a fundamental primitive we're missing here, in the sense that a smart contract isn't quite a lambda. That said, by at least making SCs referenceable like any other entity in the system, we can create arbitrarily composable behaviour via deref/redirect in a way we couldn't if we enforced a specific interface for the leaf smart contracts and made them tie into a request/reply cycle. That complects together the name service (data) and the contracts (functions) and that's generally not the most flexible approach. |
Changed the title of this issue to be higher energy as well, cos it's nearly the solstice and I was listening to this. |
Actually, a boolean for if something is a contract doesn't make sense. It should be |
Interesting to see the approach of the Terra Name Service https://agora.terra.money/t/tip-terra-name-service-spec/193 Lots of time spent on auction mechanics, very little on ergonomics or addressability. |
Closed by #60 but suspect the saga continues |
How to implement this? Relates to #1
Spiking has been done already, and the base impl is probably as simple as tokens having a parent:
where only the owner of
base
can mint subtokensthen there's a lookup path for
The text was updated successfully, but these errors were encountered: