Миди/MIDI¶
Overview¶
- Sex: Male
- Born: 1985
- City: Sofia [BUL]
- Duty: Studio Tehnologies - Service: Picker/Accoustic
- Duty: DevOps / CI|CD / System Administrator
System administrator with a wide breadth of experience in various OS, networking, datacenters, microservices and there orchestrations. I look forward and learning and working with last technologys in diffrent teams to help end customers to meet and exceed their needs. ENS is the Ethereum Name Service, a distributed, open, and extensible naming system based on the Ethereum blockchain.
Architecture¶
ENS has two principal components: the registry, and resolvers.
- The time-to-live for all records under the domain
Owners of domains in the ENS registry may:
- Change the ownership of subdomains
TEST¶
Terminology¶
- domain - the complete, human-readable form of a name; eg, ‘vitalik.wallet.eth’.
- label - a single component of a domain; eg, ‘vitalik’, ‘wallet’, or ‘eth’. A label may not contain a period (‘.’).
- label hash - the output of the keccak-256 function applied to a label; eg, keccak256(‘eth’) = 0x4f5b812789fc606be1b3b16908db13fc7a9adf7ca72641f84d75b47069d3d7f0.
- node - the output of the namehash function, used to uniquely identify a name in ENS.
Algorithm¶
First, a domain is divided into labels by splitting on periods (‘.’). So, ‘vitalik.wallet.eth’ becomes the list [‘vitalik’, ‘wallet’, ‘eth’].
The namehash function is then defined recursively as follows:
namehash([]) = 0x0000000000000000000000000000000000000000000000000000000000000000
namehash([label, …]) = keccak256(namehash(…), keccak256(label))
A sample implementation in Python is provided below.
def namehash(name):
if name == '':
return '\0' * 32
else:
label, _, remainder = name.partition('.')
return sha3(namehash(remainder) + sha3(label))
ENS on Ethereum¶
ENS is deployed on mainnet at 0x314159265dd8dbb310642f98f50c066173c1259b, where users may register names under the eth TLD, which uses an auction based registrar.
ENS is also deployed on the Ropsten testnet at 0x112234455c3a32fd11230c42e7bccd4a84e02010. Users may register names under two top level domains:
- .eth, which uses an auction based registrar with the same functionality as the main network, and allows users to keep names indefinitely; see Registering a name with the auction registrar.
- .test, which allows anyone to claim an unused name for test purposes, which expires after 28 days; see Registering a name with the FIFS registrar.
Resources¶
- EIP137 - Ethereum Name Service
- EIP162 - Initial ENS Registrar Specification
- ethereum-ens Javascript library
- Nick’s talk on ENS at DevCon 2: https://www.youtube.com/watch?v=pLDDbCZXvTE
- DevCon 2 talk slides: https://arachnid.github.io/devcon2/#/title