Transformer Chain Network

in SteemitCryptoAcademy9 months ago (edited)

2707d918-0f9c-4ce1-aed6-4e3db11ee968.jfif
TFSC adopts a fully connected decentralized and distributed P2P network structure. TFSC is connected to the blockchain network through P2P. In the blockchain network, all nodes are equal, acting as both clients and servers.

Network Structure
In TFSC, all nodes are equal and possess all the characteristics of a node.

Archiving Preserve the historical state of all blocks, with the world state corresponding to any block in history saved on the node.

Validation Directly validate the validity of the transaction data locally.

Broadcast Participate in the whole network broadcast of block information and transaction information.

Synchronization Node After the new node joins the block, it will be discovered and connected to broadcast other nodes.

Heartbeat Verify the robustness of the connection status of nodes in the network.

Interface Open query interface to provide accurate basic current information.

How to identify and authenticate each node
Each verification node is marked with a unique ID through the node list to ensure the authenticity of the verification node in the network. By validating the node list data, the verification nodes meeting the conditions are gathered into the verification pool. A discrete random function is used for the random selection of block verification nodes to ensure the smoothness and fairness of node selection,thus avoiding the unfairness caused by continuous functions due to network speed and other reasons. The core purpose is to ensure the randomness and security of the verification nodes and block generation, thereby confirming the tolerance interval for malicious nodes. All nodes participating in the validation of block legality can get the corresponding reward.

Why Use Fully Connected & Quantity Limit
Why Use Fully Connected & Quantity Limit
TFSC uses a fully connected approach in its design, which has the characteristics of high throughput, high reliability and low latency. To maintain these advantages, TFSC can maintain the best performance and security when the number of network nodes is kept between500-1000. According to its unique mechanism, the computational capacity of a single node in the network will be designed. If the high pressure causes the performance bottleneck of public network nodes, the network nodes that cannot participate in transactions will be temporarily unavailable. Due to the strong liquidity of the process in which nodes participate in the network, the availability of the TFSC network layer is stable in the long term.

graph TD
A (Node A)
B(NodeB)
C(NodeC)
D(NodeD)
E(NodeE)
F(NodeF)

A-->B
B-->A

A---->C
C-->A

A--->D
D--->A

B-->E
E-->B

B-->F
F-->B
Network communication process
TFSC 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. TFSC is designed to solve this problem. At the application level, TFSC 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 TFSC 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 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.
Heartbeat mechanism
If a node goes offline and does not reconnect within the specified time , the heartbeat number will change to 0, and the node information will be deleted

Steps:
The node reduces the heartbeat countof all known nodes by 1 and sends a ping request.

When the receiving node successfully receives the ping request, it resets the heartbeat of the sending node’s heartbeat count and sends a pong request.

When the sending node successfully receives the pong request, it resets the receiving node's heartbeat count and updates its node information.

Block height change notification
Step:
When the node height changes, it sends its own node height to other connected nodes. The receiving node processes the change request and updates the block height of the corresponding node.

TFSC uses the various mechanisms introduced above to ensure that the network status of each node in the network is good, ensuring the consistency of the data status of each node, and providing guarantee for the security and success rate of TFSC's continuous and rapid transactions.

TFSC Website: https://www.tfsc.io/#/pc/Index

TFSC Twitter: https://twitter.com/TFSCChain

TFSC Discord: https://discord.com/invite/W4YsQduNrf

TFSC Telegram: https://t.me/transformerschain

Coin Marketplace

STEEM 0.19
TRX 0.13
JST 0.028
BTC 65178.97
ETH 3261.27
USDT 1.00
SBD 2.68