<p>So the whole point of a name reg contract is not to send transactions, rather its sole purpose is to build up a database which other nodes can then query.</p>

<p>Ethereum smart contracts have immutable storage. This means that you can prove your primacy to a specific name, and other people can then reference that as part of a database. </p>

<p>What it comes down to is the credence other entities hold towards a specific name reg Dapp (Network effect, utility, what service it is registering names for etc). In some situations people would want a name reg for a specific purpose, say a list of Escrow contracts for one company, this could then be used internally, or shared. In others as you mention in your question, people would rather look towards a singular name reg which controls a DNS service.</p>

<p>You can have a look at an example name registration smart contract here: <a href="https://github.com/ethereum/dapp-bin/blob/master/namereg/namereg.html">https://github.com/ethereum/dapp-bin/blob/master/namereg/namereg.html</a></p>

<p>Hope you find this useful!</p>

CC BY-SA 3.0
2014-11-21T13:50:03.707Z
2014-11-21T13:50:03.707Z
George Hallam
<p>The Ethereum network recently introduced a <em>global registrar object</em> which is basicly a public smart contract on the chain.</p>

<p>Here is a snippet of an ethereum client command line output:</p>

<pre><code>namereg: {
    address: "0xc6d9d2cd449a754c494264e1809c50e34d64562b",
    AuctionEnded: function(),
    Changed: function(),
    NewBid: function(),
    PrimaryChanged: function(),
    Registrar: function(),
    addr: function(),
    allEvents: function(),
    content: function(),
    disown: function(),
    name: function(),
    owner: function(),
    reserve: function(),
    setAddress: function(),
    setContent: function(),
    setSubRegistrar: function(),
    subRegistrar: function(),
    transfer: function()
}
</code></pre>

<p>The namereg contract allows associating human-comprehensible names with human-incomprehensible data. One of the use cases is creating a global address book for Ethereum addresses. Using a namereg contract, one may send ether to "5chdn" instead of "0x&lt;some hex value&gt;". One may also register things like IPFS hashes, allowing one to use it as a decentralized DNS for a decentralized Web.</p>

<p>To test that, type in your geth console:</p>

<pre><code>registrar = GlobalRegistrar.at('0xc6d9d2cd449a754c494264e1809c50e34d64562b');
</code></pre>

<p>To set up your own name and give it a test: </p>

<pre><code>registrar.reserve.sendTransaction('thepiachu', {from: eth.accounts[0]});
registrar.setAddress.sendTransaction('thepiachu', eth.accounts[0], true, {from: eth.accounts[0]});
</code></pre>

<p>To test, see if you can resolve "thepiachu" to your ethereum address:</p>

<pre><code>registrar.addr('thepiachu');
</code></pre>

<p>Now, whenever anyone want to send you some ether, you only need to do this:</p>

<pre><code>eth.sendTransaction({from: eth.accounts[0], to: registrar.addr('thepiachu'), value: web3.toWei(1, 'ether'), gas: 21000});
</code></pre>

<p>You'll need to run the <code>GlobalRegistrar.at()</code> line every time you start geth until this gets hard coded.</p>

<p>You can also replace the second parameter of <code>.setAddress()</code> above with a contract's address to "call it by name".</p>

CC BY-SA 3.0
2016-03-29T07:50:27.520Z
2016-03-29T07:50:27.520Z
q9f
<p>I am wondering how does the Ethereum domain registration works? From <a href="https://github.com/ethereum/wiki/wiki/%5BEnglish%5D-White-Paper#ethereum-accounts">what I can see in the whitepaper</a>, I know there is account-specific data storage, but I don't know if that would be the ideal way to register domains. Generally, one would need some shared data storage between all accounts to have globally unique domains.</p>

<p>How does data registration in Ethereum work?</p>

<namecoin><domain-registering><ethereum>
How does Ethereum domain registration works?
ThePiachu
# How does Ethereum domain registration works?

(Asked by: username_0 on 2014-04-16)

I am wondering how does the Ethereum domain registration works? From [what I can see in the whitepaper](https://github.com/ethereum/wiki/wiki/%5BEnglish%5D-White-Paper#ethereum-accounts), I know there is account-specific data storage, but I don't know if that would be the ideal way to register domains. Generally, one would need some shared data storage between all accounts to have globally unique domains.

How does data registration in Ethereum work?

**Tags:** namecoin, domain-registering, ethereum


---

## 2 answers

### Answer by username_1 on 2014-11-21. Score: 5

So the whole point of a name reg contract is not to send transactions, rather its sole purpose is to build up a database which other nodes can then query.

Ethereum smart contracts have immutable storage. This means that you can prove your primacy to a specific name, and other people can then reference that as part of a database.

What it comes down to is the credence other entities hold towards a specific name reg Dapp (Network effect, utility, what service it is registering names for etc). In some situations people would want a name reg for a specific purpose, say a list of Escrow contracts for one company, this could then be used internally, or shared. In others as you mention in your question, people would rather look towards a singular name reg which controls a DNS service.

You can have a look at an example name registration smart contract here: <https://github.com/ethereum/dapp-bin/blob/master/namereg/namereg.html>

Hope you find this useful!


---

### Answer by username_2 on 2016-03-29. Score: 0

The Ethereum network recently introduced a global registrar object which is basicly a public smart contract on the chain.
Here is a snippet of an ethereum client command line output:
namereg: {
    address: "0xc6d9d2cd449a754c494264e1809c50e34d64562b",
    AuctionEnded: function(),
    Changed: function(),
    NewBid: function(),
    PrimaryChanged: function(),
    Registrar: function(),
    addr: function(),
    allEvents: function(),
    content: function(),
    disown: function(),
    name: function(),
    owner: function(),
    reserve: function(),
    setAddress: function(),
    setContent: function(),
    setSubRegistrar: function(),
    subRegistrar: function(),
    transfer: function()
}

The namereg contract allows associating human-comprehensible names with human-incomprehensible data. One of the use cases is creating a global address book for Ethereum addresses. Using a namereg contract, one may send ether to "5chdn" instead of "0x". One may also register things like IPFS hashes, allowing one to use it as a decentralized DNS for a decentralized Web.
To test that, type in your geth console:
registrar = GlobalRegistrar.at('0xc6d9d2cd449a754c494264e1809c50e34d64562b');

To set up your own name and give it a test: 
registrar.reserve.sendTransaction('thepiachu', {from: eth.accounts[0]});
registrar.setAddress.sendTransaction('thepiachu', eth.accounts[0], true, {from: eth.accounts[0]});

To test, see if you can resolve "thepiachu" to your ethereum address:
registrar.addr('thepiachu');

Now, whenever anyone want to send you some ether, you only need to do this:
eth.sendTransaction({from: eth.accounts[0], to: registrar.addr('thepiachu'), value: web3.toWei(1, 'ether'), gas: 21000});

You'll need to run the GlobalRegistrar.at() line every time you start geth until this gets hard coded.
You can also replace the second parameter of .setAddress() above with a contract's address to "call it by name".


---

