Introduction
In Distributed Ledger Technology (DLT), the efficiency of the network is determined not just by computational power, but by the speed of information dissemination. A significant delay in block propagation can lead to fundamental unfairness, where nodes with superior network positioning gain an undue advantage. This paper presents "Contract-connection," a novel communication protocol designed to balance network speed and efficiency through on-chain records and reinforcement learning.
Problem Statement: The Gossip Protocol Gap
Traditional DLTs rely on "gossip" protocols for data propagation. However, these networks often exhibit extreme imbalances. Research indicates that while the fastest nodes can reach 50% of the network in approximately 2.3 seconds, the slowest nodes may take upwards of 1,800 seconds. This disparity creates a "rich get richer" dynamic, where well-positioned nodes receive new blocks earlier, allowing them to begin mining subsequent blocks sooner. This is particularly detrimental in Internet of Things (IoT) contexts, where devices often face bandwidth constraints and limited peer connectivity.
Proposed Methodology
The Contract-connection protocol addresses these issues through four primary mechanisms:
1. On-Chain Connection Contracts
To ensure transparency and prevent nodes from misrepresenting their connectivity, the protocol requires nodes to co-sign "contracts" upon connecting. These contracts, containing identity and network information, are published to the blockchain, creating a tamper-resistant record of the network topology.
2. Parallel Data Slicing
Efficiency is further enhanced by splitting data into 500-byte chunks. Instead of sequential transmission, these chunks are sent to multiple peers simultaneously. This allows nodes to begin re-transmitting data segments before the entire file has been received.
3. Peer Scoring and Outlier Detection
Nodes maintain a "peer score" based on communication performance and the "Index of Peer Coincidence." The protocol utilizes the Grubbs criterion to statistically identify and prune underperforming or "lazy" nodes from a node's peer list.
4. Dual Reinforcement Learning Agents
Every node operates two Q-learning agents:
- Alice: Optimizes the node's own data-hearing speed by deciding when to add or replace peers.
- Bob: Manages incoming connection requests based on the historical reliability of terminated connections.
Experimental Evaluation
The protocol was evaluated using an emulated environment consisting of 2,000 Nakamoto blockchain nodes. The performance was compared against Bitswap, a standard P2P data exchange protocol.
Dataset and Parameters
To simulate a realistic, heterogeneous network, nodes were assigned varying upload speeds and network delays. The distribution of upload bandwidth across the nodes was a key factor in testing the protocol's robustness in diverse environments.
Key Results
Experimental data demonstrated that Contract-connection significantly outperforms Bitswap:
- Propagation Speed: The time required for a 1MB file to reach all 2,000 nodes was substantially reduced.
- Network Stability: Unlike the volatile propagation times observed with Bitswap, Contract-connection showed increasing stability as the simulation progressed.
- Fairness: The performance gap between the fastest and slowest nodes narrowed, fostering a more equitable environment for decentralized validation.
Conclusion and Future Work
Contract-connection demonstrates that local optimization by individual nodes can lead to a globally balanced and efficient network. However, challenges remain regarding "ledger bloat" caused by frequent connection records and the scalability of RL agents in networks with tens of thousands of nodes. Future research will also address potential adversarial behavior where Byzantine nodes might attempt to manipulate the reinforcement learning rewards.
Summary updated