You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+34-2
Original file line number
Diff line number
Diff line change
@@ -11,8 +11,40 @@ TNS is the Tron Name Service, a distributed, open, and extensible naming system
11
11
12
12
## 📚 Documents
13
13
14
-
#### Table of Contents
15
-
-[Introduction](./docs/INTRODUCTION.md)
14
+
-[Introduction](./docs/INTRODUCTION.md)
15
+
-[Implementation](./docs/IMPLEMENTATION.md)
16
+
-[Integration](./docs/INTEGRATION.md)
17
+
18
+
## Tron Technical Stack
19
+

20
+
21
+
### State Layer
22
+
State layer is where Tron's user “state”, or user information and behavior, is stored. It is where users have the ability to control their own state.
23
+

24
+
25
+
### Computation Layer
26
+
Tron uses EVM (Ethereum Virtual Machine) in its computation layer, which is responsible for executing complicated calculations. It is in charge of managing, checking the code of smart contract on Tron. For instance, when a transaction occurs, the logic designed in EVM will determine its path that cannot be altered, making the smart contracts on Tron immutable and temper-proof. Portal Network will be deploying TNS (Smart Contract Standard) on this layer that consists 3 major components.
27
+

28
+
29
+
### Component Layer
30
+
The design of digital assets can have more functions through combing the State Layer and Computation Layer, such as : crypto assets, and identities. Those programmable assets has many more potential usages and sub-economies within. TNS includes three major component: a `registry`, a `registrar`, and a `resolver`.
31
+
32
+
A `registry` component stores all the information relative to a domain, and can operate the set of logics to map between the Tron domains and its owners.
33
+
A `registrar` component governs the domain purchase through the customized auction or trading rules.
34
+
A `resolver` component processes the corresponding resources from wallet address to decentralized application or website on Tron.
35
+

36
+
37
+
### Protocol Layer
38
+
On the Protocol Layer, we will be presenting our BNS (Blockchain Name Service) standards that can make the TNS more efficient and applicable. This layer integrate the logic behind TNS (computation layer and component layer), and presents a gateway for users and developers to use and interact.
39
+

40
+
41
+
### User Control Layer
42
+
User control layer is in charge of managing private keys to communicate with the state layer. TNS is completely decentralized, and governed by smart contracts, which allows users to have full control over their domains. Users can control, set up, and manage their digital asset with an easier and readable text.
43
+

44
+
45
+
### Application Layer
46
+
TNS can be easily implemented into any of the services or application on Tron who wish to make decentralized user experience better. For instance, wallet that can resolve TNS will allow users to easily send or receive Tron Token (TRX); dApp that utilize TNS will enable users to have their own digital identity that are more meaningful and valuable. We believe that TNS is an essential components to provide a better environment for both technical and non-technical users.
47
+

16
48
17
49
## 📣 Contributing
18
50
See [CONTRIBUTING.md](./CONTRIBUTING.md) for how to help out.
- http: The TNS and protocol will be passed separately when the service requests.
18
+
-www.portal.trx: The content of the TNS is used when user requests to the browser.
19
+
- path: The path is not processed at the DNS level, the same as TNS, if there is a path, it is handled by other way or method.
20
+
21
+
## Resolving Names
22
+
Resolving names in TNS is a three step process:
23
+
1. Normalise and hash the name you want to resolve (see [Namehash](#namehash)).
24
+
2. Query the TNS registry for the address of the resolver responsible for the name.
25
+
3. Query the resolver for the resource you want to look up.
26
+
27
+
## Updating TNS Records
28
+
Your application may wish to provide users with a means of updating names they own to point to resources your application provides or manages. Doing so follows a similar process to [Resolving Names](#resolving-names):
29
+
30
+
- Normalise and hash the name you want to resolve (see [Namehash](#namehash)).
31
+
- Query the TNS registry for the address of the resolver responsible for the name.
32
+
- Call the appropriate update method on the resolver.
33
+
34
+
## Namehash
35
+
Names in TNS are represented as 32 byte hashes, rather than as plain text. This simplifies processing and storage, while permitting arbitrary length domain names, and preserves the privacy of names onchain. The algorithm used to translate domain names into hashes is called namehash. The Namehash algorithm is defined in [EIP137](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-137.md).
36
+
37
+
In order to preserve the hierarchal nature of names, namehash is defined recursively, making it possible to derive the hash of a subdomain from the namehash of the parent domain and the name or hash of the subdomain label.
38
+
39
+
### Terminology
40
+
- domain - the complete, human-readable form of a name; eg, `wallet.portal.trx`.
41
+
- label - a single component of a domain; eg, `portal`, `wallet`, or `trx`. A label may not contain a period ('.').
42
+
- label hash - the output of the keccak-256 function applied to a label.
43
+
- node - the output of the namehash function, used to uniquely identify a name in TNS.
TNS extends ability to integration with other decentralized file storage or decentralized database.
4
+
5
+
## Decentralized Website
6
+
The same TNS could be also applied in decentralized website's url. After setting up the TNS resolver to the content of the decentralized website, users can directly view decntralized website through `portal.trx`.
7
+
8
+
## Decentralized file storage
9
+
Decentralized file storage store data in more efficient and secure way. To make TNS more comprehensive by intergrat TNS with decentralized file storage.
10
+
11
+
## Decentralized database
12
+
Decentralized database collection of information or data distributedly. To make TNS more comprehensive by intergrat TNS with decentralized database.
0 commit comments