ARC-0137: Aleo Domain Name Service (ANS) - Specification #45
snowtigersoft
started this conversation in
ARCs
Replies: 6 comments
-
It looks great. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Nice work, looks great. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Looking forward to this. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
arc: 137
title: Aleo Domain Name Service (ANS) - Specification
authors: snowtigersoft
topic: Application
status: Draft
created: 2023-11-12
Abstract
This ARC proposes the Aleo Name Service (ANS), a protocol and program definition designed to resolve short, human-readable names to service and resource identifiers on the Aleo network.
ANS aims to simplify the interaction with Aleo's resources by allowing memorable and updatable human-readable identifiers.
It supports public and private domain names, each serving distinct use cases and privacy needs.
The goal of public domain names is to provide stable, human-readable identifiers that can be used to specify network resources. In this way, users can enter a memorable string, such as ‘snowtiger.ans’ or ‘wallet.leo’, and be directed to the appropriate resource.
For a private domain name, users can transfer Aleo Credits(ACs) to a ANS domain, and the holder can claim the ACs without let others know the real aleo address.
Specification
Overview
The ANS protocol comprises three primary components:
ANS Registry
register_tld
method to assign TLDs to registrars.ANS Resolvers
ANS Registrars
Name Syntax
ANS names adhere to the following syntax:
Namehash Algorithm
The
namehash
algorithm is implemented in the Leo programming language as follows:Registry Specification
The ANS Registry is the central component of the Aleo Name Service (ANS) that maps human-readable names to resource identifiers. It allows for the registration, transfer, and management of domain names.
Structs
Mappings
Functions
Below are detailed descriptions for each function within the registry specification:
Registrar Specification
Registrar only needs to implement a register_fld function.
Resolver Specification
The Resolver is a critical component of the Aleo Name Service (ANS) that translates human-readable names into machine-readable identifiers. The resolver allows domain owners to set various records, including but not limited to external blockchain addresses and content links, thereby extending the utility and flexibility of domain name usage within the ANS system.
Structs
Mappings
Functions
Below are detailed descriptions for each function within the resolver specification:
Privacy Credit Transfer Scheme
The Privacy Credit Transfer Scheme is an innovative feature built upon the Aleo Name Service (ANS) that facilitates the private transfer of credits. This scheme ensures that neither party in the transaction is required to disclose their Aleo address, thereby enhancing privacy while maintaining ease of use.
Mappings
Transfer Credits
This function enables the transfer of credits to an ANS domain without revealing the recipient's real Aleo address. It involves a secret that allows the domain holder to claim the transferred credits privately.
Claim Credits
These functions allow domain holders to claim the transferred credits. Depending on whether the domain is public or private, the appropriate claim function is used.
Claim Credits Private
Claim Credits Public
Compatibility with ARC-0721
The Aleo Name Service (ANS) aims to be as compatible as possible with the ARC-0721 standard (AleoHQ/ARCs/discussions/36), which establishes a framework for non-fungible tokens on the Aleo platform. However, there are some irreconcilable differences between the two, primarily due to the unique requirements of the ANS.
Divergence in NFT Structure
One of the key differences lies in the structure of the NFT used within ANS. While ARC-0721 defines a standard structure for NFTs, ANS requires a dynamic approach to the
data
field within the NFT record. This is due to the nature of domain name registration, where each NFT must reflect a unique identifier (name_hash) that is only determined at the time of domain registration by the user. Below is the ANS-specific NFT structure:Embracing Differences for Enhanced Functionality
The modifications to the NFT structure within ANS are necessary to support the protocol's functionality and objectives. While ANS strives to align with existing standards like ARC-0721, it also recognizes the need to innovate and adapt its NFT representation to serve its unique purpose effectively. This approach ensures that ANS can provide a robust and privacy-centric naming service that complements the broader Aleo ecosystem.
It is important for the community and developers to be aware of these differences for a seamless integration and to leverage the strengths of both standards where they apply.
Reference Implementations
Dependencies
As this is an application ARC, there are no dependencies other than what is currently available in Aleo.
Backwards Compatibility
Not necessary.
Security & Compliance
This is an application ARC standard, so this only affects the security of managing assets on-chain.
References
Beta Was this translation helpful? Give feedback.
All reactions