Transformers Chain Network Explained (2)

in LeoFinance5 months ago

Screenshot_2023-12-18-11-19-58-739-edit_com.medium.reader.jpg

Network communication process

Transformers uses relatively stable TCP point-to-point communication.When using TCP communication, messages are first stored in the cache, then distributed by the transaction distributor, and finally processed by various processing functions.

Communication implementation

Node list: In other P2P networks, each node saves the information about other nodes.

When requesting one of the nodes, you only need to quickly find the corresponding node in your own node list. The current problem shared by some blockchain projects is that when the number of network nodes continues to expand, it is impossible to store the information about all other nodes on each node.

With the increase of the number of digits, the number of layers is also increasing, and the higher the layer, the more information will be stored. This will cause great difficulty in quickly reading subsequent data and will reduce the timeliness of network data. Transformers is designed to solve this problem.

At the application level, Transformers network sacrifices the number of nodes to improve network node, and can quickly complete full network communication within the service quantity level. Which can quickly complete the whole network communication within the service quantity level. If the quantity exceeds the tolerance value, it will slow down transactions, and Transformers chain will kick out some unstaked nodes to solve this problem.

When a node receives a request message, the sender's node information is used to update the corresponding node list.The specific steps are as follows:

Record the IP, block height and other information of the sending node.
• If Sender B already exists in the node list, update the node list information.
• If node B is not in the node list, add node B information to the node list.
• Broadcast this node information to other nodes.
• The node list is the node

The node list is the node information recorded by the current node, mainly used to view node information, judge whether the communication method between nodes is direct sending or forwarding and exercising routing functions, and the node information includes Base58 address, IP, name, identification, etc. Nodes will save information about all connected nodes.

Network Function Module

TCP registration steps

• The sending node sends a registration request to other registered node. If two nodes are not connected, they will establish a connection first. If the connection fails, the registration request will be resent.

• The registered node processes the registration request and returns specific node information.

• The sending node processes the registration response from the registered node and records the corresponding node information.

That's all for part two, stay tuned for part three
Join us:
OS: https://www.tfsc.io/
X (Twitter): https://twitter.com/TFSCChain
Discord: https://discord.com/invite/transfomerschain
Telegram: https://t.me/transformerschain