Ethereum Name Service


well welcome back to the Block Talk and
in this session we’re gonna talk a little bit about the Ethereum Naming
Service and specifically we’re going to talk about the details behind the scenes
of how the naming service works why it’s important why you should care about it
and we’ll give a quick little demo about how you could take advantage of this and
some pointers to some documentation for that so to get started the name service
if you think about it is really kind of similar to what we understand today as a
domain naming service and when you think about a domain naming service you
essentially have what becomes a centralized system because we have these
root level naming servers who are going to own these domains and then
essentially there’s a price set for specific domains in those subdomains so
the top-level domains are controlled by a secure group and then beyond that is
people would purchase the ownership to own the names for certain ones and then
basically those get distributed it is a kind of distributed database that gets
synced across the world to a bunch of different database servers and so
basically in our traditional DNS when we think about where are the the points of
inflection where blockchain might be able to help at and what ENS is kind of
set out to do is basically disrupt out a little bit from a couple different
stances so if we look at the screen now the core components that make this up
are the ENS registry which essentially is a smart contract where you’re gonna
basically register these different domains whether it’s a top-level domain
or something that’s a little further down the domain and a subtree and an
essence nested kind of name and these will just resolve to various addresses
that will exist as part of this contract the CNS registry contract these
obviously can have an owner so you would have to have a set of keys and you know
you can digitally sign any transaction for I’m going to register a new name I’m
going to transfer ownership of one and then various things like that there’s
also you notice that the resolver is kind of decoupled so a long way
the names you can also specify resolver now the resolver essentially right now
you could be a smart contract right so inside the smart contract you could
essentially pick from multiple different resolvers that exist out there depending
on which ones you trust so basically if someone were to hijack this they would
have to you know modify each one of those so that’s kind of the resiliency
built into the system where we have a solution coming between the ENS
resolvers and the actual ENS registry of the names to click down on that just a
little bit more and look at what makes up the anatomy of one of these records
very similar to a DNS type record so we have an owner which could be an external
account or smart contract so a valid address that exists on the etherium
blockchain there would be the resolver so again an address to a contract that’s
going to do the resolution for the name and that really is mapping a human
readable name to an address so we don’t have to remember that dresses very much
like IP addresses – domain names we have today and there will also be a TTL so
the TTL is the time to live for the record these have a finite lifetime and
the way these work is the bidding system is not controlled by any kind of central
service so essentially if you go in right now actually to resolve one of
these names you could say or start a bidding auction actually so you can go
check to see if a name exists so if I wanted to check for blockchain teeth if
I went and looked I can query the system first off I can query the blockchain and
ask it does anybody own this if they don’t own it and it hasn’t been it’s not
in an active auction I could start an auction for it the auctions have
parameters built around them so there’s a little bit of time there for other
people to be fair to allow them to bid on it as well and essentially you’re
staking eath so you’re using some aetherium to basically stake and say oh
this is my stake in the game that I’m not going to be manipulating the system
to make it detrimental if I’m trying to mess with the system and I’m gonna stake
this and say I’ll bid this much now there could be a bidding process where
someone else bids more and then that that process goes on until the time runs
out whoever’s the bidder the highest bidder then receives the record
ownership and at any point they can transfer
ownership to anyone else or they can just hang on to it and use it you can
also tag other things along with this we’re just going to touch on the basics
here but you could essentially tag into like a swarm address where you can
basically have other content so when someone hits this thing from a
decentralized application you can have it resolved two things on IP FS or swarm
or something like that in a storage system where you can store much more
data but in this one we’re gonna just show kind of the basics and I’m gonna
switch over to my screen here right now and show you what we’re looking at here so what you’ll see on my screen here now
is essentially two panes at the top here we have basically running against public
etherium we just have a you know little death node running there in light mode
and what I’m gonna do is just attach to this so I’m just gonna run I’ve guest
installed here so I’ll just do a get the attach and I have our PC open on this
box so we can get into it and you see we’re attached there and basically we’ve
already synced up because I had this running in the background here there’s a
script that you can download that will put a link to so that you can basically
take advantage of like some library functions there’s much more advanced
libraries in nodejs and things like that but we’re just going to use a simple
script here today to do some functions so I just call it Ian s utils and again
we’ll put the link to this this is not for production work the script by any
means this is more for something interactive so you can kind of work with
with DNS so we’ll give it a second you see it loaded the script and the first
thing we can do is basically do a get adder which is get address and I have
one registered already that I purchased it’s my handle on Twitter and registered
this about a year ago and if you do a get adder on it you can see we’re
basically what’s happening there was a making call if you go look at the code
in the script we’re gonna go ahead and make a call into a smart contract
they’re there to get the resolver so we’ll figure out what the resolver is
for Windows or death and then we’ll basically query that resolved or who has
implemented an interface it allows us to see that this is the address of the
owner of Windows or DS so pretty pretty simple stuff otherwise we can do things
like ens owner where we can basically and we’ll have to convert the name to a
hash so there’s a convenience function built in there that script guys and
basically from here we can see that’s the owner of it and get out of there is
kind of the same thing what’s cool is you can actually do things like the ens
resolver so you can go see who’s actually been registered to resolve this
name and you can see that address so it’s a 0 1 da a really long address I
went ahead and copy down over here so we can take a look at what we got there
gonna be one second here and I’m just a nice can this is a public etherium and
basically I just do a query for that and you can see all these transactions you
can see these are public resolvers that are basically calling in here so
whenever we registered this you can see a little bit eat a transaction fee is
applied in order to do those and you can basically even look because they do have
the code uploaded you can see how they’ve implemented the resolving
function so there’s the like I mentioned there’s a specific interface that you
need to implement in order to satisfy the bouncer that you can use these
things to do queries and people can figure out whenever they go to query for
your name or your address that you could have a reverse resolver you can see both
of those so this is just a really high-level look at what’s going on with
ENS and you know the reality is is we’re trying to build these more resilient
systems so that we don’t have any kind of centralization or a single point that
could be attacked you can look on the internet at kind of DNS DDoS attacks
that have happened and trying to kind of spread that out and blockchain so that
it’s a much harder thing to pull off to kind of DDoS and attack someone’s name
and so that’s why I think it’s important for people to understand some of this
technology that’s being built here on the ethereum system so thanks for
watching again on Block Talk and follow us on @MSFTblockchain we have lots of other episodes out here and thanks for
watching you

One thought on “Ethereum Name Service”

Leave a Reply

Your email address will not be published. Required fields are marked *