BlockEmulator: An Emulator Enabling to Test Blockchain Sharding Protocols
Huawei Huang, Guang Ye, Qinglin Yang, Qinde Chen, Zhaokang Yin, Xiaofei Luo, Jianru Lin, Jian Zheng, Taotao Li, Zibin Zheng
TL;DR
BlockEmulator addresses the lack of practical tools for testing blockchain sharding protocols by providing a lightweight, modular emulator with layered architecture, extensible interfaces, and built-in cross-shard and intra-shard mechanisms. It enables rapid prototyping of sharding protocols (e.g., CLPA, BrokerChain) and supports evaluating key metrics such as TPS, TCL, CTX ratio, and TX pool dynamics, with empirical results shown to align with theoretical analyses. The platform offers PBFT- and PoW-based intra-shard consensus, inter-shard communication interfaces, and configurable supervisor roles to reflect realistic blockchain operations, while illustrating account redistribution and migration workflows. Open-sourced at blockemulator, it serves as a practical, extensible tool for researchers and developers to validate new consensus algorithms and sharding protocols with reproducible measurements and scalable experiments.
Abstract
Numerous blockchain simulators have been proposed to allow researchers to simulate mainstream blockchains. However, we have not yet found a testbed that enables researchers to develop and evaluate their new consensus algorithms or new protocols for blockchain sharding systems. To fill this gap, we developed BlockEmulator, which is designed as an experimental platform, particularly for emulating blockchain sharding mechanisms. BlockEmulator adopts a lightweight blockchain architecture so developers can only focus on implementing their new protocols or mechanisms. Using layered modules and useful programming interfaces offered by BlockEmulator, researchers can implement a new protocol with minimum effort. Through experiments, we test various functionalities of BlockEmulator in two steps. Firstly, we prove the correctness of the emulation results yielded by BlockEmulator by comparing the theoretical analysis with the observed experiment results. Secondly, other experimental results demonstrate that BlockEmulator can facilitate measuring a series of metrics, including throughput, transaction confirmation latency, cross-shard transaction ratio, the queuing status of transaction pools, workload distribution across blockchain shards, etc. We have made BlockEmulator open-source in Github.
