iblock: Accurate and Scalable Bitcoin Simulations with OMNeT++ Conference: ; ;
Niccolò Scatena, Pericle Perazzo, Giovanni Nardini · 2025
Read iblock: Accurate and Scalable Bitcoin Simulations with OMNeT++ Conference: ; ; by Niccolò Scatena, Pericle Perazzo, Giovanni Nardini (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2512-20402.txt.
Introduction
Niccolò Scatena, Pericle Perazzo, and Giovanni Nardini built iblock, a Bitcoin simulator written in C++ for the OMNeT++ approach. Most existing blockchain simulators use high-level languages, which limits their speed and scale. A native library promises detailed, large simulations that still finish in reasonable time.
Head-to-head tests against a leading simulator show iblock is more efficient at the same level of detail. The library also plugs into other OMNeT++ tools, opening the door to richer network modelling. Validation runs cover normal Bitcoin operation and the selfish mining attack, where a miner withholds blocks for advantage. In both scenarios the simulated behaviour matches theoretical expectations, supporting iblock as a research platform.
Catalog record
| CREATOR | Niccolò Scatena, Pericle Perazzo, Giovanni Nardini |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 37 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2512-20402
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
iblock: Accurate and Scalable Bitcoin Simulations with OMNeT++ Conference: ; ; Niccolò Scatena, Pericle Perazzo, Giovanni Nardini Abstract . This paper proposes iblock, a comprehensive C++ library for Bitcoin simulation, designed for OMNeT++. iblock offers superior efficiency and scalability with respect to state-of-the-art simulators, which are typically written in high-level languages. Moreover, the possible integration with other OMNeT++ libraries allows highly detailed simulations. We measure iblock’s performance against a state-of-the-art blockchain simulator, proving that it is more efficient at the same level of simulation detail. We also validate iblock by using it to simulate different scenarios such as the normal Bitcoin operation and the selfish mine attack, showing that simulation results are coherent with theoretical expectations. 1. Introduction Bitcoin ( Nakamoto 2008 ; Antonopoulos and Harding 2023 ) , introduced in 2008 by an anonymous entity known as Satoshi Nakamoto, is a decentralized digital currency that operates without a central authority or intermediary. It relies on a peer-to-peer network, cryptography, and proof-of-work consensus to ensure transactions security and to maintain the integrity of the blockchain, which is a public ledger recording all transactions. Simulating the Bitcoin system is crucial for understanding its dynamics, scalability, and security. Through simulation, researchers can analyze the impact of various factors such as transaction volume, network latency, and mining difficulty on the overall performance and stability of the system. This helps in identifying potential vulnerabilities, optimizing protocols, and ensuring the robustness of Bitcoin against malicious attacks and systemic risks. Despite significant advancements, current state-of-the-art Bitcoin simulators ( Paulavičius et al. 2021 ; Androulaki et al. 2013 ; Miller and Jansen 2015 ; Gervais et al. 2016 ; Alharby and van Moorsel 2019 ; Faria and Correia 2019 ; Basile et al. 2022 ; Stoykov et al. 2017 ; Aoki et al. 2019 ) still face notable inefficiencies. These simulators often fail in accurately modeling the complex and dynamic nature of the Bitcoin system, particularly with many nodes and under high transaction volumes. Many simulators lack the ability to replicate aspects of real-world scenarios, such as variable transaction fees, transaction sizes, block sizes, and block intervals, which are important parameters for assessing the efficiency and resilience of the network. Additionally, due to the high-level languages in which Bitcoin simulators are written (Python, Java, Scala), the computational resources required for detailed simulations can be prohibitively high, thus limiting their scalability. These inefficiencies limit the possibility of conducting comprehensive analyses of the Bitcoin system. This paper proposes iblock, a comprehensive C++ library and simulation model for the Bitcoin system, which enables simulations across various layers, i.e. network, consensus, incentives, data. Written in C++ and designed for OMNeT++ ( Varga 2001 ) , iblock offers superior efficiency and scalability with respect to state-of-the-art simulators written in high-level languages. iblock provides in-depth representation of Bitcoin’s data structures and algorithms, which facilitates experiments across consensus, incentive mechanisms and data management. Moreover, since OMNeT++ is a general-purpose simulator, the possible integration with other OMNeT++ libraries allows highly detailed simulations. iblock’s modular and extensible architecture allows for the seamless addition of new features and behaviors, providing a valuable framework for studying their effects on the Bitcoin system. We measure iblock’s performance against BlockSim ( Alharby and van Moorsel 2019 ) , which is a state-of-the-art blockchain simulator, proving that iblock is more efficient at the same level of simulation detail. We also validate iblock’s accuracy by comparing simulation results with theoretical models and related studies, and showcase iblock’s capability to simulate different scenarios such as the selfish mine attack ( Eyal and Sirer 2018 ) . We make the iblock’s code publicly available through github 1 1 1 https://github.com/SpeedJack/iblock The rest of the paper is organized as follows. Section 2 presents related work and compares with it. Section 3 introduces some necessary background about Bitcoin and OMNeT++. Section 4 describes iblock and its internal structure. Section 5 validates iblock with some proof-of-concept simulations, namely the Bitcoin normal operation and a selfish mine attack. Section 6 experimentally analyzes its scalability and compares its performance against the BlockSim simulator. Finally, Section 7 concludes the paper. 2. Related Work Several blockchain simulators have been proposed in the literature ( Paulavičius et al. 2021 ) . The first Bitcoin simulator, to the best of our knowledge, has been the ‘Bitcoin privacy simulator’ by Androulaki et al. ( Androulaki et al. 2013 ) , which however simulated only few aspects of the Bitcoin ecosystem, namely those related to addresses. Shadow-Bitcoin ( Miller and Jansen 2015 ) is not strictly speaking a simulator but rather a process-level virtualization system capable of running directly the reference Bitcoin implementation over a virtual OS and a virtual network. Consequently, it achieves extreme realism at the cost of inefficiency and usage complexity. At the time of its publication, Shadow-Bitcoin did not support the SegWit upgrade. Bitcoin-Simulator ( Gervais et al. 2016 ) , built upon NS-3, is maybe the most similar proposal to ours, and it reaches comparable efficiency. It simulates variable transaction and block size, variable block interval, and peer-to-peer communication. However, it still fails to simulate many aspects like transaction fees and difficulty adjustments. It does not support the SegWit upgrade, which was not yet deployed on the Bitcoin network at the time. BlockSim by Alharby et al. ( Alharby and van Moorsel 2019 ) and the homonymous BlockSim by Faria et al. ( Faria and Correia 2019 ) are both realized in the Python language. The latter is built upon the SimPy library, while the former is built from scratch. None of them originally supported SegWit, although the BlockSim by Alharby et al. has been extended in that sense ( Basile et al. 2022 ) . Since they are written with a high-level language, they do not achieve the same efficiency of C++-based simulators as the one proposed by the present paper. Both BlockSims fail to simulate the variable transaction and block sizes, the dynamic difficulty adjustments, and the UTXOs. In Section 6 we quantitatively compare the efficiency of iBlock with BlockSim by Alharby et al., showing that we achieve both better performance and higher realism. BlockPerf ( Polge et al. 2021 ) by Polge et al. extends the Faria et al.’s BlockSim by adding a real network level implemented in C/C++, but it offers performances even worse than the baseline BlockSim. VIBES ( Stoykov et al. 2017 ) and SimBlock ( Aoki et al. 2019 ) simulators are among the first to support the SegWit upgrade, but they still miss some important aspects like variable transaction and block sizes and UTXOs. Moreover, they still use inefficient high-level language, namely Scala and Java respectively. BSELA by Cui and Hu ( Cui and Hu 2024 ) simulates Bitcoin with an event-based architecture, which adopts a mix between queues and min-heaps as data structures to maintain intra- and inter-block events. This may improve efficiency if applied to OMNeT++, which has its own built-in mechanism to maintain simulated events. Such an optimization is orthogonal to ours, and we leave this integration as a possible future work. Table 1 summarizes the comparison of our proposed simulator with relevant others in the literature. Table 1. Feature comparison with relevant other Bitcoin simulators Var. tx fee