Recently, blockchain becomes a disruptive technology of building distributed applications (DApps). 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. Hence, in this dissertation, we proposed a peer-to-peer (P2P) networking simulation framework, which allows to deploy and test (simulate) a large-scale blockchain system with thousands of nodes in one single computer. We systematically reviewed existing research and techniques of blockchain simulator and evaluated their advantages and disadvantages. To achieve generality and flexibility, our simulation framework lays the foundation for simulating blockchain network with different scales and protocols. We verified our simulation framework by deploying the most famous three blockchain systems (Bitcoin, Ethereum and IOTA) in our simulation framework. We demonstrated the effectiveness of our simulation framework with the following three case studies: (a) Improve the performance of blockchain by changing key parameters or deploying new directed acyclic graph (DAG) structure protocol; (b) Test and analyze the attack response of Tangle-based blockchain (IOTA) (c) Establish and deploy a new smart grid bidding system for demand side in our simulation framework. This dissertation also points out a series of open issues for future research.