TheEthereumNameService(ENS)isadistributed,open,andextensiblenamingsystembasedontheEthereumblockchain.
ENS’sjobistomaphuman-readablenameslike‘alice.eth’tomachine-readableidentifierssuchasEthereumaddresses,othercryptocurrencyaddresses,contenthashes,andmetadata.ENSalsosupports‘reverseresolution’,makingitpossibletoassociatemetadatasuchascanonicalnamesorinterfacedescriptionswithEthereumaddresses.
ENShassimilargoalstoDNS,theInternet’sDomainNameService,buthassignificantlydifferentarchitectureduetothecapabilitiesandconstraintsprovidedbytheEthereumblockchain.LikeDNS,ENSoperatesonasystemofdot-separatedhierarchicalnamescalleddomains,withtheownerofadomainhavingfullcontroloversubdomains.
Top-leveldomains,like‘.eth’and‘.test’,areownedbysmartcontractscalledregistrars,whichspecifyrulesgoverningtheallocationoftheirsubdomains.Anyonemay,byfollowingtherulesimposedbytheseregistrarcontracts,obtainownershipofadomainfortheirownuse.ENSalsosupportsimportinginDNSnamesalreadyownedbytheuserforuseonENS.
BecauseofthehierarchalnatureofENS,anyonewhoownsadomainatanylevelmayconfiguresubdomains-forthemselvesorothers-asdesired.Forinstance,ifAliceowns'alice.eth',shecancreate'pay.alice.eth'andconfigureitasshewishes.
ENSisdeployedontheEthereummainnetworkandonseveraltestnetworks.IfyouusealibrarysuchastheensjsJavascriptlibrary,oranend-userapplication,itwillautomaticallydetectthenetworkyouareinteractingwithandusetheENSdeploymentonthatnetwork.47f知币网