FISCO BCOS P2P model, with basic functions for efficient, commonly-used and safe internet communication, supports unicast, multicast and broadcast of blockchain messages, synchronizes nodes status and adapts multiple protocols.
P2P main functions¶
Blockchain node identification
The nodes on blockchain are uniquely identified by node ID, which is used for addressing nodes.
Network connection management
It maintains TCP persistent connection between nodes, automatically disconnect and reconnect when connection exceptions occur.
Messages can be unicasted, multi-casted and broadcasted among nodes on blockchain.
Node status can be synchronized on blockchain.
Blockchain node ID¶
Node ID is generated by the public key of ECC algorithm. Each node owns one and unique ECC key pair, as each node is identified by one and only node ID.
Usually, there files are needed when adding a node to blockchain network:
node.key key of node in ECC format
node.crt node certificate issued by CA
ca.crt CA certificate provided by CA
Besides a unique node ID, nodes can follow Topic for addressing.
Addressing by node ID
To locate a node by its node ID.
Addressing by Topic
To locate a group of nodes that follows some Topic.
Network Connection Management¶
Blockchain nodes will automatically start and maintain TCP permanent connection, or reconnect when there is exception in system and network.
CA certificate will be used to verify nodes during connection.
Messaging among nodes supports unicast, multicast and broadcast.
Unicast, one node sends messages to another node, addressing through node ID.
Multicast, one node sends messages to a group of nodes, addressing through Topic.
Broadcast, one node sends messages to all nodes.
Every node maintains its own status and broadcasts the Seq regularly to synchronize all nodes.