Human Readable User Addresses in IOTA #64
Replies: 5 comments 11 replies
-
My initial take on the questions:
We could hardcode to generate the initial name registry outputs in a global snapshot file or at a specific milestone where the protocol version increases.
Split the name registry by 256 different name registry outputs and use the first byte of the hash as the "prefix" to find the correct name registry.
State transitions should only be valid if you put enough "dust deposit" into the updated name registry output.
We could require an additional nonce (PoW over hash of the name to register and the pubkey that gets registered) inside the transaction that updates the name registry output. This way no one can frontrun the registration a specific hash when he sees a new "registration transaction" on the tangle so easily.
Maybe the name outputs have their own off-protocol local-state as well?
In my opinion it should be rather expensive. 1-10 Mi for example. Maybe even more if the name is shorter? Maybe we could also come up with an auction system instead of a "first-come first-served"? After the 24h state changes are not allowed anymore for that specific entry, but the highest bidder is able to claim the name. To prevent spamming attacks on the name output by biding we require the additional PoW nonce or we could also offload that auction to a "auction output", which can be used to claim the name at the end of the auction itself.
I don't see a reason why, and imagine your name output expires but you still have a lot of funds on it 🤯
It would be nice to have a "governor" field in the name outputs, so that you could delegate the sub-name to someone else.
I have no clue yet :D
A route in an indexer plugin, that points to the latest valid name registration transaction that is issued on-tangle would be nice. |
Beta Was this translation helpful? Give feedback.
-
What's the issue with an indexer to do the name resolution before sending a transaction, so the final output would just get the Ed25519 address of the owner in the unlock condition instead of the name? That way the outputs couldn't get lost even if the name expires and it would also reduce the required logic in the protocol |
Beta Was this translation helpful? Give feedback.
-
Good work. I only have one suggestion that I would call "extensive": this proposal can be described as a method for mapping an off-tangle resource to an on-tangle resource. I would take the opportunity to generalize this method to create a mapping between a generic URI and an address in the tangle (or an index). There are multiple use cases for this type of mapping. For example, chunks of an IPFS resource can be stored in IOTA messages. Mapping the chunk's url representation to an IOTA index or address can allow access to the chunck stored and retrieved from the tangle. This opens up the possibility of storing NFT content on tangle. The same approach allows web pages to be stored on the tangle, making the association between address and content static. etc. etc. |
Beta Was this translation helpful? Give feedback.
-
Great work, thanks for putting this together @lzpap! At Disentangle we have thought about some of the questions listed here, mostly on how to best ensure a fair & sustainable distribution of domains. Here are some features that may (or may not) be used to counter domain squatting, scams, impersonations and potential permalocks (i.e. domains locked forever due to lost private keys):
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Introduction
User accounts in a DLT are controlled via public-key cryptography. The public key of the user's key-pair is hashed to arrive at the public address under which funds are locked in the ledger.
Since an address is technically a hash, even if it is prepended with human readable parts as in the case of bech32 encoding, it is long stream of seemingly random characters to the human eye.
To prevent the user from having to manually enter such random characters, UX solutions try to work around the problem by encoding addresses into QR codes or simply always providing the copy-paste functionality.
A more native approach are name resolvers, like ENS, which are pretty similar to the DNS system of the Internet: they associate human readable names to machine readable objects.
In this document we will discuss a protocol native name service for IOTA.
Goals
A DLT name service solution has to provide at least the following features:
Additionally there may be more supported features such as time-based name renting, sub-domains and so on. We will examine these nice-to have features later, let's focus on the basics first.
Why not take ENS?
The Ethereum Name Service seems to work well for the Ethereum blockchain and satisfies the requirements we defined above, however, it relies on the execution of native smart contracts. Such contracts take care of name registration, but also of name resolution, as they can be called on-chain to return the public key(s) mapped to a name.
The need for smart contracts is simple: there has to be a single object that defines the name mapping, which is a shared global state. Transactions on the Ethereum blockchain have access to this global shared state, therefore any transaction can just reference a user account by name and leave the resolution up to the smart contracts.
In UTXO based ledgers such as IOTA, there is no such shared global state available in the transaction context, and as a result, there are no smart contracts that could provide the name resolution. We need a different mechanism to implement a name service on IOTA.
Global Shared State in UTXOs
Our goal is to implement a mapping table in the ledger that maps human readable names to addresses. How can we define and maintain such a global shared state available to all transactions while still respecting the parallel, asynchronous nature of UTXOs?
For starters, let's divide and conquer the problem into two parts:
Name Registry in UTXO
A name registry is simply a mapping table between human readable names and address.
The ledger state of a UTXO comprises of all current unspent transaction outputs. The name registry must be part of the ledger state as it needs to be verified and maintained by the network.
We can't put the mapping table directly into an output, as it has unbounded size and at couple hundred entries we already wouldn't be able to fit it into a transaction.
The name registry has to be kept off-chain, but a commitment to its current state has to be stored in an output.
Notice, that off-chain doesn't mean that network nodes are blind to it: it only means, that the actual data is not put into the protocol. The data still has to reside in the snapshot file, so that new nodes joining the network can fetch it from neighbors and verify its content based on the on-chain events.
So we have a registry stored in network nodes and verifiable on the ledger, but how do users interact with it? By posting transactions in the ledger.
A transaction consumes previously created outputs and creates new outputs while respecting the ledger transition rules. We can leverage transactions to post commands to the name registry, for example, insert a new entry in it:
When the network processes this transaction, it applies the command in the white UTXO to the off-chain stored name registry (yellow), and checks whether the commitment of the updated name registry in the blue UTXO is valid. If not, the transaction is deemed invalid.
The name registry is referenced in the ledger by its own UTXO state machine, as described in draft TIP-18.
We designed a simple system which maintains a global shared state off-chain, but verifiable and modifiable on-chain.
Name Resolution in UTXO
Our end goal with a name service is to be able to resolve names to addresses on-chain. Since the registry is referenced via a single UTXO, it becomes a bottleneck, because only one user at a time can include it in a transaction to:
The reason for exclusivity of these two operations is to ensure consistency of the registry, that is, no one can reference a no-longer valid state of the registry for resolution.
While we could live with the fact that name registration must happen in series as it is a one-time and rather rare operation for a user, it is unacceptable to rely on sequential name resolution.
We need a clever trick to make this work: What if we could reason about the content of the registry without having to explicitly look at it?
That is exactly what we aim to do by minting NFT-like proof outputs in the ledger that certify that whoever owns this proof owns the given entry in the off-chain name registry:
Note, that once the proof has been minted, we don't even need to hold the owner address in the registry, it is enough to say that the proof has been minted.
The white UTXO with the name proof then becomes a UTXO state machine as well which has to carry the proof at all times. Among others, this proof output can be:
bar.iota
in our example), hence unlocking them.foo.bar.iota
and go over the same process again recursively.And since each proof output is independent of other proof outputs, name resolution of different names happens in parallel, exploiting the UTXO ledger model to its full extent.
With such a powerful functionality, it becomes possible to simply send funds to
bar.iota
and leave the name resolution to the owner of the name who wants to consume it:Use of Name Service on L2 Smart Contracts
The concept described above is implemented purely on layer 1, without the need for smart contracts. But what if we wanted to use these name in let's say an layer 2 smart contract chain?
ISC already has concepts of
NFT accounts
in its core account contract, which are really similar to named accounts. The only problem is that such accounts can only send on-ledger (L1) requests to smart contract chains, since it is impossible to verify the ownership of the account off-ledger.However, we could modify the core accounts contract of ISC to support registering a public key to named accounts which can sign requests off-ledger.
Challenges
This document only gives a high level summary of the protocol native IOTA Name Service, and it deliberately omits implementation details and challenges, such as:
These questions will be answered in a follow-up TIP that defines the IOTA Name Service.
Conclusion
It is possible to design IOTA Name Service as a protocol feature on layer 1, which has several benefits:
foo.iota
).Implementing such a system would greatly enhance user experience of IOTA, especially that of non-technical and non-crypto native people.
What do you think? Let's share ideas and discuss what is the best way to make IOTA appealing to everyday people.
Beta Was this translation helpful? Give feedback.
All reactions