Highroller.btc

Oct 234 min read

What Is the Blockchain Naming System (BNS)?

The Blockchain Naming System (BNS) or Blockchain name system is a decentralized domain naming structure, similar to DNS, resolved on the Stacks Blockchain.

Links in this article may lead to affiliate/referral commissions if you make any purchases. Although I recommend products, I encourage you to please read and invest responsibly!

BNS or the Blockchain Naming System is a smart contract application running on the Stacks blockchain. Binding and resolving a unique username to the off chain state.

In this blog, we'll review what BNS is and how it works.

Please keep in mind that there are a lot more technical and useful bits left out of this article that dive deeper into BTC.us and the Stacks blockchain.

Blockchain Naming System (BNS)

With the release of Stacks 1.0, the Blockchain Naming System (BNS) enabled the generation of Stacks usernames decentralized from any central authority. As a result, both users and application developers can refer to Stacks accounts using distinctive, user-owned, and legible usernames.

BNS was implemented using first-order name operations on the Stacks V1 blockchain. Now, BNS is implemented using a smart-contract loaded during the genesis block in Stacks V2.

In BNS, names have three characteristics:

  1. Names are unique worldwide. Name collisions are not allowed by the protocol.

  2. Names are human-understandable. The unique name is chosen by the creator.

  3. Names are intensely owned. Only the owner of the name is able to change the state it is resolved to.

Because the Stacks blockchain ensures that each node's BNS view is synchronized with all other nodes worldwide, queries made on one node will be accepted by all nodes.

The owner of a name can use Stacks of blockchain nodes to bind up to 40Kb of off-chain state to their name. This state will be replicated via a peer-to-peer network to all other Stacks blockchain nodes.

Create a unique name on the Stacks blockchain

BNS allows Stacks users to register unique names.

Like top-level domains in the conventional DNS, name registrars can add new namespaces using the contract.

Making transactions on the Stacks blockchain for names like highroller.btc require STX as payment. You can purchase STX on many large exchanges like Coinbase.

Sign up to Coinbase with my link for a free $10 when you deposit funds and start trading!

Using the API

Developers can access or register usernames for a particular namespace using the API and the BNS package.

Other key API available requests are:

  • Access all user information (such as Stacks address or expiration date)

  • Access the name operations history for a certain username.

  • Access subdomains. Developers can incorporate comprehensive naming features into their programs using BNS tools.

With BNS and the mentioned API, applications can utilize this unique naming protocol.

Architecture of BNS

A global name hierarchy is used to arrange BNS names. The three levels of this naming hierarchy are as follows:

  • Namespaces: These are the domain extensions or spaces for your name, and are at the top of the hierarchy.

  • BNS Names: These are people whose names are stored, through transactions, on the Stacks blockchain, in a namespace.

  • Subdomains of BNS: Subdomains act as a tertiary name space, where the user who owns the BNS name can broadcast transactions to indicate new subdomain names for their BNS name. These subdomains are stored off chain, but are broadcasted on initialization and changes, therefore anchoring it to the blockchain.

Conclusion:

From my brief understanding of BNS through Stacks' documentation and Hiro's blog on BNS, the BNS system on Stacks is a versatile and robust implementation of a decentralized structure for domains.

It's a close race to watch as ENS and BNS both get built out over the next few years. With the recently released BTC.us, I'm ever more excited for Stacks and Bitcoin.

Share this story