-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Naming system in the form of registry contract within Hedera #534
Changes from 27 commits
7842808
980397f
ddb50a3
882e199
34d5cab
7f4e12b
8afe0b0
b1d03b4
e14c60a
b825b42
f4da0e5
19dfe69
443228e
c67a627
7f61baf
ede2e0d
9f35a2d
7281489
48752ad
b115f85
0e85439
0dbe809
f5c8731
6465611
2fc5c5e
36bf81c
24aeb29
89f833d
10c9749
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,156 @@ | ||
--- | ||
hip: <HIP number (this is determined by the HIP editor)> | ||
title: REGISTRY CONTRACT for naming structure | ||
author: Som Kirann([email protected]), Rahul Pandey([email protected]) | ||
working-group: Som Kirann([email protected]), Rahul Pandey([email protected]), Delfin Iglesia([email protected]) | ||
type: Process | ||
category: Service | ||
needs-council-approval: No | ||
status: Draft | ||
created: 2022-07-29 | ||
updated: 2023-03-22 | ||
--- | ||
|
||
## Table of Contents | ||
|
||
1. Abstract | ||
2. Motivation | ||
3. Rationale | ||
4. Specification | ||
5. Detailed note on the flow | ||
6. Reference Implementation | ||
7. Rejected Ideas | ||
8. Open Issues | ||
9. References | ||
10. Copyright/license | ||
|
||
|
||
## Abstract | ||
|
||
Fostering overall growth of Hedera, minting of HTLDs (Hedera based -Top-Level-Domains) & SLDs (Second-Level-Domains) within Hedera are open. Any entity, person could mint of the HTLDs & SLDs which could eventually create issues like: | ||
a. Duplication of TLDs; .hbar (for example) by one contract & .hbarby the other contract | ||
b. Duplication of SLDs; for example, minted SLD user.tld by one contract & user.tld by the other contract | ||
c. Inconvenience amongst the community owing to the duplication of names | ||
d. Challenges for the wallets providers to choose one contract over the other | ||
|
||
## Motivation | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's bring these great thoughts into more concise points. Motivation: |
||
|
||
To develop a naming standard in registry contracts to prohibit duplicate Hedera specific TLDs and their corresponding Second-Level-Domains, thus allowing multiple parties to mint the routes without worrying of duplicates leading to a healthier ecosystem and new use cases. | ||
|
||
## Rationale | ||
|
||
Taking the motivation, a further step ahead, it is proposed to allow multiple parties who could be resellers, companies to exist within the ecosystem of Hedera and allow community/users to mint/book domains ending in .hbar or any other TLD without the fear of duplication or phishing attempts. | ||
Proposed Hedera centric registry contract that would also be extended to other inter-operable chains in the future would be able to accommodate multiple parties. Same registry contract would contain the real truth of mappings between Account IDs on the Mainnet & the corresponding human readable user-names. For example, john.hbar tied to 0.0.XXXXXXX | ||
|
||
## Specification | ||
|
||
Architecture of the proposed registry contract over Hedera would be, as follows: | ||
|
||
 | ||
|
||
|
||
(Image source: https://drive.google.com/file/d/1e3yxtaY8glEiptSXlrNxznxfzTfk1SKr/view) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As an abstraction this graphic is helpful, but the exact architecture in the document isn't currently viable as a contract based solution on Hedera, would be good to have a more complex rendering of what is actually going on. |
||
|
||
## Detailed note on the flow | ||
|
||
**1. What is Registry Contract Suite?**<br /> | ||
Registry Contract Suite is a group of smart Contracts developed over Solidity. These smart contracts are intended to register HTLDs (Hedera Top-Level-Domains) and Second-Level-Domains (SLDs) in a hierarchical manner. SLDs and HTLDs once registered could be queried and looked up to avoid duplication.<br /> | ||
**2. How does Registry Contract Suite Works?**<br /> | ||
Registry Contract Suite is a well structured group of smart contract that maintains an alphabetical hierarchy to register HTLDs and is structured to create and store HTLDs in their respective Alphabetical Registry Component.<br /> | ||
Once a HTLD is registered by the provider, an entry in respective alphabetical hierarchy smart contract is made. All further domains and subdomains under that hierarchy would be stored in that structure. So that for future, queries for that registered domain names or HTLD/s could be appropriately handled.<br /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure that an alphabetical hierarchy of smart contracts is necessary, can there be a subsection defining this? |
||
**3. Who are providers and how could someone become a provider of domains/HTLDs?**<br /> | ||
Providers for Registry Contracts are the account addresses of Mainnet of entities who have access to register and update HTLD/s and domains. These providers could do a handful of operations and are provisioned to register a domain/HTLD. All these would be handled by Swirlds Lab or Hbar Foundation.(So that no Provider controls or gate keeps the process) <br /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "All these..." refers to what? The meaning of this is unclear. |
||
To become a provider, entities need to raise a request to the admin of Registry Contracts, who have the privilege to add addresses as providers for the Registry Smart Contract Suite. Initially this would be done through a form accessible via the website of Web23 at web23.io with a goal of moving to a fully decentralized approach.<br /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I do not think that this would be the right process, even if it is easier initially. This type of process can lead to gate keeping and bias and should be handled by a third-party right from the start. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Again, privilege and centralized authorities imbued with the power to give privilege aren't necessary in web3 and remove value from the system. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This revision still leaves Web23 as a centralized gatekeeper with purview over who can become a name provider. There is no discussion of the requirements for becoming a name provider or the policies a name provider must follow. Without HNS-level policies, the incentives for a bad actor are high. A new name provider could set $0 registration fees and hoard domains for its own or an affiliates account. Likewise, policies need to be in place that provide certainty on renewal fees. Without HNS-level policies on this topic, a name provider has the discretion to set and change renewal fees; a name provider, as a bad actor would be free to target and extort exorbitant renewal fees from successful domain projects. The HNS needs ecosystem-wide policies and a community-based governance model that establishes a process for setting policies and changing them when required. It's antithetical to Web3 to have Web23 be the gatekeeper to HNS or require builders/investors to "trust" in the future behavior of a name provider. |
||
**4. Structure of Smart Contracts**<br /> | ||
The structure of smart contracts are as follows: | ||
|
||
a. **AlphaInterface:** This solidity file is an interface and it enables functions and abstract logic for the AToZRegistry Solidity Smart Contract. It enables functionalities such as register HTLD, activate TLD, etc. | ||
|
||
b. **AlphaRegistry:** This solidity file is responsible for doing all the jobs and is exposed for providers. It would internally call different smart contracts from the suite to get the job done. | ||
|
||
c. **UTools:** This smart contract empowers the suite with a handful of utility functions like substring and all. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. string manipulation methods shouldn't be on chain, they aren't gas friendly and would cause undo burden on the network, at least for the near and mid future. |
||
|
||
d. **AToZRegistry:** This solidity file is responsible for creating an alphabetical order of smart contracts | ||
|
||
e. **Exposed Functionalities and Functions** (may not be in the order) | ||
|
||
i). isTLDAvailable method is used to check whether a particular TLD is available or not.<br /> | ||
**Inputs**:- TLDName<br /> | ||
**Output**:- True or False<br /> | ||
**Scenario** :- This method is an external view function and will return Boolean and is used to Check whether a TLD is available or not<br /> | ||
|
||
ii). isDomainAvailable method is used to check whether a particular Domain under a TLD is available or not.<br /> | ||
**Inputs**:- DomainName, TLDName<br /> | ||
**Output**:- True or False<br /> | ||
**Scenario** :- This method is an external view function and is used to check whether a particular Domain under a TLD is available or not.<br /> | ||
|
||
iii). registerTLD method is used to register TLD, only providers who are registered would be able to register a TLD<br /> | ||
**Inputs**:- TldOwnerAddress, TLDName, ChainId, Expiry<br /> | ||
**Output**:- True or False<br /> | ||
**Scenario** :- This method is an external view function and is used to register TLD, only providers who are registered would be able to register a TLD<br /> | ||
|
||
iv). registerDomain method is used to register domain, only providers who are registered would be able to register a domain<br /> | ||
**Inputs**:- DomainOwnerAdress,TldOwnerAddress,TLDName,DomainName,ChainId,Expiry<br /> | ||
**Output**:- True or False<br /> | ||
**Scenario** :- This method is an external view function and is used to register Domain, only providers who are registered would be able to register a domain<br /> | ||
|
||
v). activateDomain method is used to activate Domain<br /> | ||
**Inputs**:- DomainName, TLDName<br /> | ||
**Output**:- True or False<br /> | ||
**Scenario** :- This method is an external view function and is used to activate a Domain, only providers who are registered would be able to activate a domain.<br /> | ||
|
||
vi). deactivateDomain method is used to deactivate a domain<br /> | ||
**Inputs**:- DomainName, TLDName <br /> | ||
**Output**:- True or False<br /> | ||
**Scenario** :- This method is an external view function and is used to deactivate a Domain, only providers who are registered would be able to deactivate a domain.<br /> | ||
|
||
vii). updateDomainExpiry method is used to update the Domain Expiry <br /> | ||
**Inputs**:- DomainName, TLDName, expiry<br /> | ||
**Output**:- True or False<br /> | ||
**Scenario** :- This method is an external view function and is used to update the Domain Expiry. The expiry should be a greater than the current date.<br /> | ||
|
||
viii). deactivateTLD method is used to deactivate TLD<br /> | ||
**Inputs**:- TLDName<br /> | ||
**Output**:- True or False<br /> | ||
**Scenario** :- This method is an external view function and is used to deactivate TLD so that no domain under that TLD could be booked.<br /> | ||
|
||
ix). activateTLD method is used to activate TLD<br /> | ||
**Inputs**:- TLDName<br /> | ||
**Output**:- True or False<br /> | ||
**Scenario** :- This method is an external view function and is used to activate TLD so that domain under that TLD could be booked.<br /> | ||
|
||
x). updateTLDExpiry method is used to update the TLD Expiry<br /> | ||
**Inputs**:- TLDName,Expiry<br /> | ||
**Output**:- True or False<br /> | ||
**Scenario** :- This method is an external view function and is used to update TLD Expiry<br /> | ||
|
||
xi). addProvider method is used to add Provider to the Registry, so that they could add TLDs and domains to the Registry.<br /> | ||
**Inputs**:- ProviderWalletAddress<br /> | ||
**Output**:- True or False<br /> | ||
**Scenario** :- This method is an external view function and can be only executed by the administrator/Super Admin of the Smart Contract Suite and is used to add Provider to the Registry , so that they can add TLDs and Domains to the Registry.<br /> | ||
|
||
xii). getProvider method is used to get Provider by passing their provider ID<br /> | ||
**Inputs**:- ProviderID<br /> | ||
**Output**:- ProviderWalletAddress<br /> | ||
**Scenario** :- Each time a provider is registered , a Provider ID would be allocated by the smart Contract suite and the provider Wallet Address will be mapped/associated with that Provider ID. This method on passing that provider ID, would return the Provider Wallet address of Mainnet.<br /> | ||
|
||
|
||
## Reference Implementation | ||
|
||
N/A | ||
|
||
## Rejected Ideas | ||
|
||
N/A | ||
|
||
## Open Issues | ||
|
||
N/A | ||
|
||
## References | ||
|
||
N/A | ||
|
||
## Copyright/license | ||
|
||
This document is licensed under the Apache License, Version 2.0 – see, https://www.apache.org/licenses/LICENSE-2.0) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"dependencies": { | ||
"simple-jekyll-search": "^1.10.0" | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are solutions of definable standards on chain that would allow for multiple naming services to exist and not mint duplicate names.