Skip to content

Commit 4e3a514

Browse files
committedJul 11, 2019
Update TNS README.md
1 parent d55bfd2 commit 4e3a514

10 files changed

+89
-2
lines changed
 

‎README.md

+34-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,40 @@ TNS is the Tron Name Service, a distributed, open, and extensible naming system
1111

1212
## 📚 Documents
1313

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+
![Tron Tech Stack](./assets/Tron-layer.png)
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+
![Tron Tech Stack](./assets/Tron-state.png)
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+
![Tron Tech Stack](./assets/Tron-computation.png)
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+
![Tron Tech Stack](./assets/Tron-component.png)
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+
![Tron Tech Stack](./assets/Tron-protocol.png)
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+
![Tron Tech Stack](./assets/Tron-user.png)
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+
![Tron Tech Stack](./assets/Tron-app.png)
1648

1749
## 📣 Contributing
1850
See [CONTRIBUTING.md](./CONTRIBUTING.md) for how to help out.

‎assets/Tron-app.png

128 KB
Loading

‎assets/Tron-component.png

117 KB
Loading

‎assets/Tron-computation.png

55 KB
Loading

‎assets/Tron-layer.png

271 KB
Loading

‎assets/Tron-protocol.png

53.3 KB
Loading

‎assets/Tron-state.png

40.5 KB
Loading

‎assets/Tron-user.png

142 KB
Loading

‎docs/IMPLEMENTATION.md

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Implementation
2+
3+
## TNS Spec
4+
5+
The internet HTTP protocol is using the URL below:
6+
7+
```
8+
<protocol>://<subdomain>.<domain>.<top-level domain>/<path>
9+
```
10+
11+
Example:
12+
```
13+
https://www.portal.trx/path
14+
```
15+
16+
#### Spec
17+
- 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.

‎docs/INTERGRATION.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Integration
2+
3+
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

Comments
 (0)
Please sign in to comment.