Abstract
In the past few years, blockchains have been one of the most attractive emerging technologies. Many researchers and institutions have devoted their resources to the development of more effective blockchain technologies and innovative applications. However, with the limitation of computing power and financial resources, it is hard for researchers to deploy and test their blockchain innovations in a large-scape physical network. In this paper, we design a peer to peer blockchain simulation framework to address this challenge, called ChainSim. ChainSim provides a foundation and skeleton to argument and simulate as large as thousand-nodes P2P blockchain network with a single computer. This paper presents ChainSim basic structure and simulation mechanism; and showcase ChainSim capabilities and usefulness. With ChainSim, researchers can test their new consensus protocols, reproduce a subtle security attack and evaluate its risks with a large number of nodes under heavily transaction loads.