paint-brush
How Archethic Blockchain's Algorithm Enables Fast Interactions Between Nodes Across the Globe!by@archethic
371 reads
371 reads

How Archethic Blockchain's Algorithm Enables Fast Interactions Between Nodes Across the Globe!

by Archethic Public BlockchainSeptember 30th, 2022
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

The internet is moving from a centralized network towards a decentralized network. This “Decentralized Web” should have nodes or servers that are distributed across the globe, instead of all the nodes being in the cloud or in one country. Due to geo-political risks and natural disaster risks, the best for any. decentralized network is to have nodes across the. globe with a very high data availability so that no external threat can compromise the network! The algorithm was inspired by the distribution of stars in the galaxy. Astrophysicists and Researchers have studied in a very profound way the distribution. of stars and have deduced a mechanism to calculate the exact 3-dimensional position of a star by just using the distance between stars and center of.

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - How Archethic Blockchain's Algorithm Enables Fast Interactions Between Nodes Across the Globe!
Archethic Public Blockchain HackerNoon profile picture

The internet is moving from a centralized network towards a decentralized network, the reason being “The Decentralized Web will enable users and creators to interact and exchange value directly in a peer-to-peer fashion, removing the role of centralized platforms as middlemen that extract value from these interactions."


This “Decentralized Web” should have nodes or servers that are distributed across the globe, instead of all the nodes being in the cloud or in one country. Due to geo-political risks and natural disaster risks, the best for any decentralized network is to have nodes across the globe with a very high data availability so that no external threat can compromise the network!


Due to the globality of the nodes, the time taken for interactions between nodes should be minimal, and the energy consumed (across the globe) due to these interactions should be minimal as well. Below we provide a brief description of the mathematical algorithm developed by the Archethic blockchain team inspired by the distribution of stars in the galaxy. Astrophysicists and Researchers have studied in a very profound way the distribution of stars in the galaxy and have deduced a mechanism to calculate the exact 3-dimensional position of a star by just using the distance between stars and center of mass of the stars. Archethic adopts a similar mechanism to calculate the node positions by just having the latency between nodes and the center of mass of the nodes in the P2P network!

The Algorithm:

Step 1: Retrieving the Latencies from Beacons ChainsFrom the Beacons Chains, every node in the P2P network will have the Latencies Matrix (dij) of shape (n×n)


(latency between two nodes is the minimum time taken to respond when a transaction is sent from one node to another).


Where,

  • n is the number of nodes in the network.
  • [N1, N2, N3.... ] are nodes in the network.
  • Latency between nodes i and j is represented by dij where 1<= i <=n, 1<= j <=n.
  • dii = 0 (there is no latency between the node i (Ni) and itself)

For Example d23 = Latency between node N2 and N3.


Step 2: Calculation of Distance of a Node from Center of Mass.

  • In physics, the center of mass 'c' of a distribution of mass in space is the unique point where the weighted relative position of the distributed mass sums to zero. In this case, the sum of vectors (Vjc) to all nodes from the center of mass is zero.


    (Note: Let all nodes be of unit mass)

Hence,

Equation from Center of Mass

  • The traditional 'Law of Cosines' is used to calculate the distance between any two points, but here we are interested in calculating the distance between node and center of mass. To do this, the equation from 'Law of Cosines' and 'The Center of Mass' has to be combined, as shown below.


    Distance between Unit distance and Center of Mass (c)Hence, the distance between a node and center of mass is given by,


Distance between a Node (i) and Center of Mass (c)

Step 3: Calculation of Gram Matrix (G)

Derived from the Law of Cosines, Gram Matrix or 'G' or 'gij' is the dot product of the two vectors from the center of mass 'c' to points i and j respectively. G is calculated from the Latencies Matrix (dij) and Center of Mass (dic).

Step 4: Plotting the Nodes from Gram Matrix

  • Factorizing the Gram Matrix G using any factorization methods like Singular Value Decomposition, the Eigen Values [λ1,λ2,λ3,......λn] and their corresponding Eigen Vectors [E1, E2......En] can be obtained.
  • The first 2 Eigen Values and Eigen Vectors yields the 2D plot for nodes.                                       [Xn,Y n] = [√λ1∗E1,√λ2∗E2].
  • The nodes are then plotted in 2D plane with all the points obtained from [Xn,Yn]

Step 5: Assigning Network Coordinates to plotted Nodes

  • The 2D plotted nodes are then drawn in a rectangle whose boundaries are maximum +X, +Y, minimum -X,-Y  (from [Xn, Yn]).

  • Then the rectangle is divided into 15 Big Patches (in red) and each Big Patch is in turn divided into 16 small patches (in green).

  • The Network Coordinates of a node are represented by 3 digits. For example, the Network Coordinates of Node 1 are 1BD, '1' represents the Big Patch, 'B' represents the Small Patch and 'D' represents the throughput. The representation of the throughput of a node can vary between 0 to F


    (Throughput Data is obtained from the Beacons Chains just like Latency)

Network Coordinates of N1, N2 & N3

Position of Nodes and Interaction between Nodes

Once the position of nodes (network coordinates) is determined taking into account only the latency, the network will also take into account the geo-coordinates of the nodes (obtained through IP) in the form of geolocation patches (as shown below) and divide the nodes in patches so that any data in the blockchain is geo-locally well replicated.


The network then knows the best nodes to replicate the data so that the data is geo-locally well spread to achieve the highest data availability.

To Conclude:

This mathematical algorithm will enable the fastest interactions between nodes in a decentralized P2P network with the minimal time taken and least energy consumed for data to travel across the globe and yet maintain the highest data availability and also be able to counter or sustain any geo-political risk or natural calamity risk.


Archethic Public Blockchain

Archethic is a Layer 1 aiming to create a new Decentralized Internet.

Its blockchain infrastructure is the most scalable, secure & energy-efficient solution on the market thanks to the implementation of a new consensus: "ARCH".

Archethic smart contracts expand developers' boundaries by introducing internal oracle, time-triggers, editable content & interpreted language.

Through native integration for DeFi, NFTs & decentralized identity; Archethic offers an inclusive and interoperable ecosystem for all blockchains.

In order to achieve the long-term vision of an autonomous network in the hands of the world population, we developed a biometric device respecting personal data privacy (GDPR compliant).

Making the blockchain world accessible with the tip of a finger. Be the only key! https://www.archethic.net/


Archethic Foundation Non-profit in order to manage decentralized governance of the public blockchain.