ENS: Your dapp isn't finished without ENS with Brantly Millegan
ETH Warsaw·Thu, Oct 7, 2021, 12:00 AM
Bonus bounty from ENS: https://gitcoin.co/issue/EthWorks/hackathons/4/100025749
Transcript
hi guys welcome back uh i have uh bronte miligan with me director of operations at ethereum name service hi bronte hello um apparently we'll tell you more about the bounty that we just added today to uh the bounty pool at xerox hack and he also teach you how to implement ens into your project so without further ado the stage is your spreadsheet great well thank you very much um great yeah so i'm gonna be talking about the ethereum name service today uh yeah so my name is brantley milligan i actually uh don't work for ens i mean we often say that as a shorthand i work for a non-profit called true names limited which is the de facto manager of the open source project ens ethereum name service there's our github our website is ens.domains and this was created by nick johnson um so i'm gonna first talk about what is ens let me talk about how ens works and then talk about how to integrate ens so enos you know through name service so i'm gonna first talk about how is it a name service like what is a name service or a name system so a naming service is a lookup system a lot of people overly complicate this um with ens and dns the domain name system the internet you just you provide a name and it provides you information back that's all it does it's not forwarding on information it's not forwarding on a transaction or anything like that you know you provide a name it provides you with information your computer might then do something with that information that that is separate from the naming service so why do we even have naming services well so we have computer identifiers you know which can be automatically generated they can be numbers and letters software can easily you know distinguish these things um but humans like to read and remember words of a particular language to have social context and things like this um so basically identifiers that work well that work well for computers don't necessarily work well for humans and vice versa right so we can't just uh humans don't want to have to look at the automatically generated you know computer identifiers but computers would be really bad at assigning the proper word of a language so let's say something like automatically that requires like social context and maybe the person to choose so this bridges the gap so ens has names it has owners of names and records that can store any arbitrary information so if you have a name you can look up and retrieve its records and then do something with that name so for example ens provides your wallet with the cryptocurrency address and the wallet sends the transactions let's say i'm saying dogecoin to britney.exe so i type in brantley.eth into my wallet the wallet looks up rightly.eve on ens on ethereum grabs the dogecoin address which is stored there comes back to the wallet and then it sends the dogecoin transaction on the dogecoin network with that information so yes not like forwarding the transaction or something so why is it the ethereum name service it's not because it's a naming service only for the ethereum ecosystem it's because it's a naming service built on ethereum the logic and records are stored on ethereum but it can store information relevant to anything so ens uses ethereum to serve the internet including and beyond the ethereum ecosystem our goal is to make ens and therefore ethereum a basic piece of internet infrastructure used widely by people whether they are part of the blockchain community or not that is our goal we don't want ens just to be some like niche thing here you know and it's doing this by complementing the dns tech stack in parallel expanding the capabilities of the existing dns name space focusing on use cases not served by dns in some cases not possible on dns so now i'm going to talk about how ens works so ens has no servers this confuses some people they say okay how do i where's you know your ap how do i get permission to use ens or something ens proper is just smart contracts on the ethereum blockchain that's it you don't run anything they self-run uh if we all died it would keep running you just need access to the ethereum blockchain there are three main parts to ens there is the registry so the registry is a smart contract that holds the names the owners of those names and the resolvers and also ttl which we don't really use but it's technically there the resolvers are basically here's where you can find the records for this name so then we have result resolvers and these are separate from the registry resolvers a resolver is a smart contract that stores and serves records so this is key we don't just have one smart contract that says here's the names the owners and the records i mean we technically could do that but that would mean that if we ever wanted to upgrade let's say the record set or something we have to upgrade the smart contract that has everything right this would be bad and so no we separate these things out and then we can upgrade you know the contracts like there are record set contracts without having to touch the registry which is like you know who owns what which is like super important right the third part are uh you have registrars a registrar is a smart contract that creates and distributes names based on certain criteria for example payment so you've probably seen dot eth names um dot eth itself is owned by a smart contract a registrar smart contract that basically says if you submit these transactions to this contract that meets certain criteria then it will give you your desired name so that whole process of registration can be automated with smart contracts so resolutions though like lookups of records right or whether a name is available or something do not cost anything because you're simply looking up information on the public ethereum blockchain and that again you just have to have to have access to an ethereum full node so this can be done locally you know like an ethereum node on your local machine um or with an ethereum gateway service like infura or cloudflare or something um you just have to have access to the ethereum blockchain but lookups you're just reading so it doesn't there's no like gas fee or something so let's talk about ens records so i remember a resolver contract is a contract that stores your records and like maybe has um certain record types and things like this because the registry contract or stores the names of the and the owners just points to where the records are you can decide to have that point to your own custom resolver contracts with your own custom record set you can do that if you want um our team though we manage a record set that we call the public resolver because it's one that we manage that like basically everyone uses it has all these standardized records that we've standardized like eips and things like this so let's talk about these standard records so we have addresses so you can store any cryptocurrency address and ethereum address the bitcoin address the document address um any arbitrary cryptocurrency address there's a content record so this supports ipfs hashes swarm hashes skynet you know sia hashes and also toward unending addresses you then have text records uh which allows for any kind of arbitrary information so text records actually two parts you have a text record key and then text record data so the key is something really short that you can have anything you want but it's like identifies what the data is and you have the data so you could be like the key could be email and then the data is your email address or something like this all right so if you want to see an example of records for yourself you can go to our manager app which is at app.
ens domains and search for brainly.xyz that's a name that i have on ens and i have tons of records there set up so you can see what's possible so let's talk about the namespace on ens so you've probably seen dot eth names and dot eth is what's called a top level domain and it is native to ens so this does not exist on dns it's only on ens um and you can have like brantley dot ether or you know wallet.eth or something but we're also integrating the dns namespace what this means is that if a name exists on dns we are allowing that to be imported into ens with the same owner you have to like own it on dns first and then you prove ownership and then you could also have the name on dns right now uh that um we have the topicable domains.xyz.cred.
co.rt.com integrated in various ways they work different ways and the rest of the dns name space will be available for importing very soon in fact that that feature of the entire dns name space made available is already on the rops intestine if you wanted to test out and we'll be on mainnet like recently so just some words about ens versus dns dns is very good at what it does um but ens has uh some advantages so simpler infrastructure so you replace servers with smart contracts you know ens of course has zero there now i'm time by definition because it's on the internet blockchain and your blockchain has zero downtime now it's decentralized and you know therefore censorship resistant you have built in cryptography and individual ownership or self-custody which i i think leads to better security um of course uh once if you're in the ethereum ecosystem anything in the ecosystem you have programmability things will be owned by smart contracts you can fit into that ecosystem and of course interactivity or composability with other ethereum smart contracts this is very very powerful okay so how to integrate so the goal here is that every time a user might otherwise see a cryptocurrency address or a content hash or some sort of computer identifier okay they should instead see an e s name or be interacting with an e s name and similar as the goal these computer identifiers should be hidden away so the first use case is cryptocurrency address for resolution basically let's say you want to send somebody like i said dogecoin or you know link or something like this well you don't have to get their dogecoin address or their theme address with the current address they can have it already set up in the us name all you do is you just type in their ens name and the wallet grabs the appropriate cryptocurrency address based on context you know you know and sends the transaction super simple the second use case is ethereum address reverse resolution so the forward resolution is you have a name and it points to data reverse resolution is the opposite you already have some sort of data in this case ethereum address and that points back to a name so let's say i log in with a with my ethereum um account into a doc let's say unispot okay when you do that you're giving the dap your ethereum address your public address and uh that sort of serves as your identifier in the dac and often they will even like show an abbreviated form of your theme address as like showing what you're logged in with this of course is like bad ui because you know who wants to look at this this is not easy to read what that dap could do is do a reverse resolution look up and check okay do they have a roof does it have a reverse record an ens name associated with it if it does then you know show that instead you can still show maybe the the ethereum address like below it or something like this smaller font people want to verify but the name is much better and there's a number of dabs to do this i mean like uniswap does cryptovoxels open c avogachi i mean a bunch um you know usernames is like another type of use case you know reverse resolution is a key part of that you could also like give all your users like sub domains or something like this there's a lot of um interesting things you could do then of course if that swarm toward any address addresses also i mentioned it's kind of see the hashes we just recently added support for um so let's say i'm in metamask mobile or i'm in the brave browser or opera there's there's a number of browsers that support um ipfs websites with ens names you can look at our on our website unesco domains for a full list so let's say i type in you know your dap dot eth and it just resolves it like a normal website shows it shows the ipad ipfs website you know if you don't have brave or opera or uh meta mask in your in your browser also makes it so your browser accepts enas and ipfs websites if you don't have any of these things you can still access these websites um we have a dns bridge to ens and ipfs with ethe.link so let's say i want to go to brainly.ef but uh i don't have the appropriate browser so i just add that link to it so now it's brilliantly.
8.link and that resolves like a normal website in any browser for anybody we actually created this bridge with uh protocol labs a couple years ago and we recently passed uh management that over to cloudflare manages that if you want to see a list of ipfs and ens websites i recommend going to almond east.link and there's like tons and tons of websites that people have created so um another ens use case you can store just traditional dns records if you want this is not widely used but there has been some experimentation with this the dot cred top level domain from dns is using ens and ipfs to store dns records you can look to them and then everything we haven't thought of so because we you can have a custom resolver contract so you can have your own custom record types or because you can have custom text record types in the normal public resolver you can store any arbitrary information so like if your project has identifier where it would make sense storing that in an ems name for a better you know a better user experience then great do it there you go that's the presentation here's some useful links and way to contact me if you would like so that is my presentation um i don't know if there's like a way to do questions or something um thanks a little brunch yeah um it doesn't look like there's any questions yeah we don't have any questions at the moment um yeah we can help uh answer any questions but people might have on our discord okay great well so are we done then uh yep we are thanks a lot bronte thank you for your time great have a nice day
Automatic transcript — names and jargon may be misspelled.