Skip to content
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

Merged
merged 29 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
7842808
Create hip-0000-registry-contract-for-naming-services.md
som-web23 Jul 29, 2022
980397f
Update hip-0000-registry-contract-for-naming-services.md
som-web23 Jul 29, 2022
ddb50a3
Update hip-0000-registry-contract-for-naming-services.md
som-web23 Jul 29, 2022
882e199
Update hip-0000-registry-contract-for-naming-services.md
som-web23 Jul 29, 2022
34d5cab
Update hip-0000-registry-contract-for-naming-services.md
som-web23 Jul 29, 2022
7f4e12b
Update hip-0000-registry-contract-for-naming-services.md
som-web23 Jul 29, 2022
8afe0b0
Update hip-0000-registry-contract-for-naming-services.md
som-web23 Jul 29, 2022
b1d03b4
Update hip-0000-registry-contract-for-naming-services.md
som-web23 Jul 29, 2022
e14c60a
Update hip-0000-registry-contract-for-naming-services.md
som-web23 Jul 29, 2022
b825b42
Update hip-0000-registry-contract-for-naming-services.md
som-web23 Jul 29, 2022
f4da0e5
Update hip-0000-registry-contract-for-naming-services.md
som-web23 Jul 29, 2022
19dfe69
Update hip-0000-registry-contract-for-naming-services.md
som-web23 Jul 29, 2022
443228e
Update hip-0000-registry-contract-for-naming-services.md
som-web23 Jul 29, 2022
c67a627
Update hip-0000-registry-contract-for-naming-services.md
som-web23 Jul 29, 2022
7f61baf
Update hip-0000-registry-contract-for-naming-services.md
som-web23 Jul 29, 2022
ede2e0d
Update hip-0000-registry-contract-for-naming-services.md
som-web23 Jul 29, 2022
9f35a2d
Update hip-0000-registry-contract-for-naming-services.md
som-web23 Jul 29, 2022
7281489
Update hip-0000-registry-contract-for-naming-services.md
som-web23 Jul 29, 2022
48752ad
Update hip-0000-registry-contract-for-naming-services.md
som-web23 Jul 29, 2022
b115f85
Update hip-0000-registry-contract-for-naming-services.md
som-web23 Jul 29, 2022
0e85439
Updating Description Signed-off-by: Som Kirann <[email protected]>
som-web23 Jul 29, 2022
0dbe809
Update hip-0000-registry-contract-for-naming-services.md
som-web23 Jul 29, 2022
f5c8731
Pushing Suggestive Changes
som-web23 Mar 21, 2023
6465611
Fixing Headers
som-web23 Mar 27, 2023
2fc5c5e
Fixing Headers
som-web23 Mar 27, 2023
36bf81c
Fixing Headers
som-web23 Mar 27, 2023
24aeb29
Fixing Headers
som-web23 Mar 27, 2023
89f833d
Update and rename hip-0000-registry-contract-for-naming-services.md t…
mgarbs Mar 28, 2024
10c9749
Update hip-534.md add discussions
mgarbs Mar 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
156 changes: 156 additions & 0 deletions hip-0000-registry-contract-for-naming-services.md
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

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.


## Motivation
Copy link
Collaborator

Choose a reason for hiding this comment

The 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 HTLDs and SLDs.
Your summarized history of TLD growth and the need for naming standards


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:

![RegistryContract](https://user-images.githubusercontent.com/97507177/181780608-e6bc217b-ee21-4b6d-a9a4-a28916a5ec87.png)


(Image source: https://drive.google.com/file/d/1e3yxtaY8glEiptSXlrNxznxfzTfk1SKr/view)
Copy link

@nostradaomus nostradaomus Jul 29, 2022

Choose a reason for hiding this comment

The 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 />

Choose a reason for hiding this comment

The 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 />

Choose a reason for hiding this comment

The 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 />
Copy link
Contributor

Choose a reason for hiding this comment

The 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.

Copy link

@nostradaomus nostradaomus Jul 29, 2022

Choose a reason for hiding this comment

The 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.

Copy link

@hashpool-network hashpool-network Apr 20, 2023

Choose a reason for hiding this comment

The 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.

Choose a reason for hiding this comment

The 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)
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"dependencies": {
"simple-jekyll-search": "^1.10.0"
}
}