Greetings BlockDAG Community!
Surely you had the weekend of your life and I hope you had a lot of fun.
In consideration to our roadmap in May, we integrate the LibP2P engine in blockDAG . The libp2p framework is highly flexible, users to expand this library to support other protocols.
Node identities and addresses
In a network without a center, every node takes a network private key and a network public key.
Starting with the node’s public key, the process of identifying the node is begun. Libp2p, the communication method employed by Sia, relies on the [PeerId] struct to identify each node. These make it impossible for both ends in the communication of networks to create a fake identity, as their keys are the keys to encryption that are used by all nodes.
A node’s identity always sets off as a unique identifier on the network and it is merely to distinguish different machine. If we simultaneously diversify network key data, there is a higher chance to encounter large interferences
Discovery mechanisms
In order to join certain peer-to-peer network our node is required to know a list of nodes that are already included in that network. In this regard, it is pertinent to mention node’s details and their address (how to be connected them). Formation of such a list can be referred to as the discovery approach.
There are three mechanisms that will be used in blockDAG:
- Bootstrap nodes. The are bootstrap nodes in which node identities and addresses are specified in the netcode in seated next to the configuration of the network.
- mDNS. Here we do a UDP broadcast on the tracts network Nodes exhibiting this characteristic will authenticate themselves by identifying themselves to the authority. mDNS can be disabled at Network configuration settings.
- Kademlia random walk. Afterwards, we execute the Kademlia FIND_NODE requests that are random on our stack of Kademlia DHTs (one request using a DHT for each chain-specific protocol) to help other nodes broadcast their view of the network to us.
Connection establishment
When node Alice indices node Bob’s identity and address, it means she can build a connection with node Bob. Each link must necessarily employ multilevel encryption and meet high standards of security. Similarly, although (eg. addresses using /quic) represents the encryption, and /multiplex addresses of which encryption and/or multiplexing to use, the multistream-select protocol is used to negotiate a choice for /encrypt and/or /multiplex.
The process used to set up the connection is the transport and is usually referred to as the transport layer.
As of the writing of this documentation, the following base-layer protocols are supported by BlockDAG:
- The IP/TCP model, a path of the format /ip4/1.2.3.4/tcp/5, is more commonly used now for this type of work. Upon the opening of TCP highway, there are handshakes concluding with an SSL session and multiplexing arranged.
- WebSockets with /ip4/1.2.3.4/tcp/5/ws being the designated address. An open TCP/IP connection is now running with WebSockets protocol performed on top. Message communication between the components (Sender and the Asynchronous Server) happens through those WebSocket data frames. Despite all the progress in previous channels encryption and multiplexing get negotiated again in this channel.
- DNS for the /dns/example.com/tcp/5 or /dns/example.com/tcp/5/ws. address pattern is one of the services supported by the resource. A node address can use a domain name.
(This being the case, the IPv6 will be used instead of IPv4 for all the above stated.)
Most notable is the usage of Noise protocol which is negotiated between the base-layer protocol and the application level. In the final version, we intend to carry out an observation-based study of the handshake protocols which dynamics can greatly vary even from population to population and thus the experimental setup will be likely changed.
The following multiplexing protocols are supported: Yamux.
Next steps
We are going to integrate Substreams request-response protocols with core bank-wallet communications. Such technical frameworks give the adopted “LibP2P engine” a foundational structure for working with blockDAG securely transmitting information amongst the network peers.