What are the BNS Components?
Portal Network BNS Architecture
Last updated
Was this helpful?
Portal Network BNS Architecture
Last updated
Was this helpful?
A BNS registrar is responsible for allocating decentralized domain names to system users, and is the only entity capable of updating the BNS. The owner of a domain name (node) in the BNS registry is its registrar. BNS operates on a system of dot-separated hierarchical names called domains, with the owner of a domain having full control over the allocation of subdomains. Top-level domains, like ‘.eth’, ‘.wan’, and ‘.icon’, are owned by the registrar smart contracts, which specify rules governing the allocation of their subdomains. There is one unique registrar smart contract for each top-level domain on each protocol. For instance, there is one .eth registrar on the Ethereum blockchain, and one .icon registrar on the ICON blockchain. The TLD .bnb (Binance domain name) on top of Ethereum will be managed by another registrar smart contract on top of the Ethereum blockchain.
A registry is a single contract that provides mapping from any registered name to the resolver responsible for it. The registry maintains a list of all domains and subdomains, and it stores three critical parts of information about each: (1) owner of the domain, (2) resolver of the domain, and (3) time-to-live (TTL) for all records under the domain. It also permits the owner of a name to set the resolver address, and to create subdomains potentially with different owners to the parent domain. For BNS, the client sends a request to the blockchain node, and the node will look up the smart contract and respond with the related mapping address. Only one request is needed – regardless of how many subdomains there are.
A resolvers are responsible for performing resource lookups for a name. For instance, returning a contract address, a content hash, or an IP address(es), as appropriate. The resolver contract defines what methods a resolver may implement to support resolving different types of records.