Models and Simulation of Blockchain Systems
In the literature, there are a variety of proposed blockchain systems (e.g., Bitcoin and Ethereum), each of which with its own design decisions. Both in the design and the deployment of blockchain systems, many configuration choices and design decisions need to be made. Investigating different implementation and design choices is neither feasible nor practical on real blockchain systems. Simulation models emerge as an excellent technique to study blockchains without either implementing a new system or interrupting an existing one. Despite some attempts in the literature to utilise simulation models to evaluate specific aspects of blockchain systems, there is a lack of a general-purpose, flexible, extensible and widely usable simulation tool for blockchains. In this thesis, we contribute to the field of blockchain analysis by proposing BlockSim as a generic framework to build discrete-event dynamic system models for blockchain systems. BlockSim aims to provide flexible and extensible simulation constructs to study a variety of blockchains and a set of design and deployment questions. BlockSim is implemented as a publicly available simulation tool and thoroughly validated against reallife systems and measurement studies. Another contribution of this thesis is an extensive analysis to estimate the distributions for Ethereum smart contract using data for over 300,000 real transactions. To run realistic simulation studies, we integrate these distributions into the simulator to generate representative transactions. Furthermore, this thesis offers two extensive data-driven simulation studies related to Ethereum smart contracts that demonstrate the applicability and usefulness of BlockSim. The first study is the analysis of the Ethereum Verifier’s Dilemma and the proposal of two approaches (parallelisation and active insertion of invalid blocks) to mitigate its implications. The second study is the analysis of the uncertainty that miners face about the fee and cost of transactions and its impact on the received profits.