Trinity Q&A Series: The difference between Trinity and Celer routing mode

TrinityProtocol
Trinity Protocol
Published in
3 min readSep 17, 2018

As Trinity is using the shortest path model for routing transactions, what is Trinity’s response to the network congestion and imbalance caused by this model as suggested by Celer Network in their Whitepaper?

Trinity’s routing algorithm is implemented on the basis of the Graph Theory. Graph can well express the connection state of the distributed network and the visualization of the path.

Trinity’s shortest path is determined by the principle of the minimum cost based on the full path. Indeed, this method is likely to increase network imbalance and congestion. Trinity will add a path rebalancing algorithm to ensure a smooth and balanced network.

Compared with the routing mode of Celer, Trinity’s mode is pre-selected. Once the path is determined, next routing nodes do not require a complicated routing process. By doing so, Trinity’s routing mode greatly improves network efficiency. Whereas every routing node in Celer network has to do the same path selection algorithms when the packet goes from one to another.

In Trinity network, only 2 elements are considered to do the path selection algorithms, namely, time between paths and the node stress.

Strictly speaking, Celer’s routing mode is similar to the existing router pathfinding mode. Trinity’s routing mode is like optimization of big data.

We can design a model for Celer network:

We have message to send from A to G. Suppose that P connects with C when A sends out the message and that RTT between C and P is the shortest. When C receives the message, C does not know where G is in this model. According to the algorithms, P is likely to be the next hop and P will send the message back to C after receiving the message.

In this model, there is a great possibility that the data individual nodes carry increase suddenly, resulting in network congestion. See the figure below:

Certain parameters are required in the mathematical model. Suppose that the nodes in the above figure have proper parameters required by the model (except RTT), RTT is the only parameter to be referenced. If C wants to send 100 messages to G, then the 100 messages will arrive at G along C->A->B->D. The balance of the network is broken. If C sends more data, then A, B, D, G will form a processing bottleneck.

In the Trinty network, based on the current routing principle, suppose that fees of all nodes are the same, we will get the same path: C->A->B->D->G. As C knows all the paths to G, all we need to do is to change the routing principle (e.g., add the prediction of the node stress) so that some data will be rerouted through other nodes to restore the network balance.

Regarding the visual representations on the state channel, the Trinity team currently has a number of improvement proposals from inside and outside, and these will be released on Github. We will listen to the community’s opinions with an open mind. However, there is a gap between the state channel at this stage and the ideal one. Many details require adjustment. Therefore, visual representations on the state channel will be made later at a proper time.

Routing in Celer: each node in the network only needs to communicate with its neighbors and calculate the best next routing node according to the mathematical model. In addition, the channel rebalancing process is naturally embedded in the routing process without any additional coordination. (Extracted from the Internet)

Trinity Core Dev Team

Trinity Telegram Channel: https://t.me/TrinityStateChannels

Official Website: https://trinity.tech/#/

Trinity Github: https://github.com/trinity-project

--

--