BlockSim-Its Development and Architecture

BlockSim-Its Development and Architecture

In the past few years we have observed that Blockchain technology is gaining its pace and has find its way in various sectors. Let’s know the how the blockchain works through an image so that we can know why a simulation tool is required to estimate a new or existing blockchains.

No alt text provided for this image

What does a Simulation tool do?

A simulation tool allows architects and developers to help design and develop resilient and secure applications. For a given scenario it accurately shows us time required for each transaction to performing simulation. Simulation tool gives us a better idea of our blockchain network.

What is BlockSim?

BlockSIM is an open-source simulation tool,which helps architects estimate the performance of their intended blockchain network and assists in deciding the basic parameters required for new or existing blockchain.

 How was BlockSim Developed?

BlockSIM was developed using Python 3 programming language and SimPy 3.0 library. The simulation tool runs without the need for any blockchain platform setup - i.e. it is an object-oriented program developed using SimPy which simulates Ethereum and Hyperledger blockchain platforms; Being object-oriented, we were able to faithfully model several relevant properties of blockchain in granular detail.

 Lets know about some Components in BlockSim Architecture

·       Simulation World: It handles input configuration parameters of the simulations.These parameters are combination of files like configuration file(name of blockchain being simulated),Delays file( probability distribution for time to validate transactions,time between blocks etc).The user needs to assign these files to the simulation worldand also specify the simulation start time and duration.

·       Discrete Event Stimulation Engine: The core of a discrete event simulator is a Discrete Event Simulation Engine (DESE). The basic functionality of a DESE is similar in most discrete event simulators, so we did not design DESE from scratch, but leveraged an existing framework called SimPy.

·       Transaction and Node Factory: The transaction factory is responsible for creating batches of transactions, which are again modelled as a random phenomena. The node factory creates nodes that are used during the simulation. The users can specify the location, number of nodes and identifier.

·        Programmatic interface :The programmatic interface is the main interface available to the user. Using Python language and SimPy , users can write their own models, use the existing ones to define their own blockchain system, or modify aspects of models already implemented. This interface is also responsible for starting the simulation.

·       Monitor and Reports: The goal of the monitor is to capture metrics during the simulation. Examples are: number of transactions each node broadcasts or receives; transactions added to the queue; blocks processed; time to propagate transactions and blocks. It should be easy for the user to update metrics wherever needed, and have them automatically collected and stored in the Reports component.

Overall, BlockSim is a simulation framework which has an ultimate aim of providing help in the implementation, design of new or existing Blockchain. It keeps track of thousands of nodes and events that only change states. Users can extend these models to evaluate their own design and implementation decisions.

References:

https://hyperledger-fabric.readthedocs.io/en/release-2.2/network/network.html

https://mlsdev.com/blog/156-how-to-build-your-own-blockchain-architecture

https://simpy.readthedocs.io/en/latest/


要查看或添加评论,请登录

Nitisha Shukla的更多文章

社区洞察

其他会员也浏览了