TBDD: A New Trust-based, DRL-driven Framework for Blockchain Sharding in IoT

Zixu Zhang, Guangsheng Yu, Caijun Sun, Xu Wang, Ying Wang, Ming Zhang, Wei Ni, Ren Ping Liu, Andrew Reeves, Nektarios GeorgalasSSRN 2023 · DOI

Abstract

Integrating sharded blockchain with IoT presents a solution for trust issues and optimized data flow. Sharding boosts blockchain scalability by dividing its nodes into parallel shards, yet it's vulnerable to the 1% attacks where dishonest nodes target a shard to corrupt the entire blockchain. Balancing security with scalability is pivotal for such systems. Deep Reinforcement Learning (DRL) adeptly handles dynamic, complex systems and multi-dimensional optimization. This paper introduces a Trust-based and DRL-driven (TBDD) framework, crafted to counter shard collusion risks and dynamically adjust node allocation, enhancing throughput while maintaining network security. With a comprehensive trust evaluation mechanism, TBDD discerns node types and performs targeted resharding against potential threats. The model maximizes tolerance for dishonest nodes, optimizes node movement frequency, ensures even node distribution in shards, and balances sharding risks. Rigorous evaluations prove TBDD's superiority over conventional random-, community-, and trust-based sharding methods in shard risk equilibrium and reducing cross-shard transactions.

Introduction

As the Internet of Things (IoT) continues to expand, blockchain technology is increasingly leveraged to ensure data integrity and security. However, standard blockchain architectures face significant scalability hurdles. Sharding—the process of partitioning the network into smaller, parallel groups—offers a path to high throughput but introduces a critical vulnerability: the "1% attack" or adaptive collusion attack. In such scenarios, a small fraction of dishonest nodes can concentrate within a single shard to compromise the entire network. Balancing security against scalability remains a pivotal challenge for modern decentralized systems.

System Architecture

To address these vulnerabilities, we propose the Trust-based and DRL-driven (TBDD) framework. This framework integrates a multi-dimensional trust evaluation mechanism with Deep Reinforcement Learning (DRL) to dynamically manage node allocation and mitigate collusion risks.

The TBDD system architecture spanning IoT devices, edge servers, and the blockchain layer.

The architecture consists of four primary layers: the IoT device layer generating data, the edge server/miner layer for processing, the blockchain layer implementing sharding, and the TBDD community which oversees the trust and resharding logic. By offloading complex computations to edge servers, the system maintains high performance even in resource-constrained IoT environments.

Multi-Dimensional Trust Scheme

TBDD employs a sophisticated trust evaluation system that distinguishes between honest and malicious actors using Local Trust Tables (LTT) and Global Trust Tables (GTT). Trust scores are derived from three key dimensions:

  • Direct Feedback: Performance metrics of nodes acting as shard leaders.
  • Indirect Feedback: Peer observations during consensus and voting processes.
  • Historical Behavior: Long-term consistency in honest participation.

DRL-Driven Optimization

The core of TBDD's decision-making is a DRL agent (utilizing DQN or PPO algorithms) that treats node allocation as a dynamic optimization problem.

The DRL-driven resharding process, illustrating the interaction between the environment and the coordinator.

The DRL agent's reward function is designed to maximize shard load balance, minimize computationally expensive Cross-Shard Transactions (CSTs), and ensure that high-risk node concentrations remain below safety thresholds. By reducing node movement frequency, the system also minimizes synchronization overhead, which is crucial for real-time IoT applications.

Evaluation and Results

The TBDD framework was evaluated in a simulated IoT/Mobile Edge Computing (MEC) environment using Python and PyTorch. Simulations involved up to 16 nodes with varying proportions of dishonest participants to mimic real-world traffic and strategic attacks.

Key Performance Insights

  • Throughput and Efficiency: TBDD demonstrated a 10-13% throughput improvement over traditional random- and trust-based sharding methods. The PPO-based implementation proved particularly stable, achieving the highest rewards with minimal node movements.
  • Security Resilience: The framework successfully maintained the proportion of dishonest nodes in any single shard below the critical fault-tolerance threshold, effectively neutralizing 1% attack attempts.
  • CST Reduction: By intelligently grouping nodes that frequently interact, TBDD significantly reduced the CST ratio, leading to lower overall latency compared to baseline approaches.

Discussion and Conclusion

While TBDD offers a robust defense against localized collusion, it is subject to the global limit of blockchain security: if dishonest nodes exceed 1/3 of the total network, absolute security cannot be guaranteed. Furthermore, the computational demands of DRL training are best handled by edge servers rather than low-power IoT sensors.

Future work will focus on integrating state channels to move more transactions off-chain, further enhancing the scalability and responsiveness of the mainnet for latency-sensitive IoT applications.

Summary updated

BibTeX
@misc{zhang2023tbdd,
  author = {Zixu Zhang and Guangsheng Yu and Caijun Sun and Xu Wang and Ying Wang and Ming Zhang and Wei Ni and Ren Ping Liu and Andrew Reeves and Nektarios Georgalas},
  title = {{TBDD: A New Trust-based, DRL-driven Framework for Blockchain Sharding in IoT}},
  year = {2023},
  eprint = {2401.00632},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2401.00632},
  howpublished = {SSRN},
}
Figure