GithubHelp home page GithubHelp logo

fwilhelmi / batch_service_queue_simulator Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 261 KB

This repository contains the code of a blockchain-oriented batch service queue simulator. The implementation is provided in C/C++.

License: GNU General Public License v3.0

C 1.66% C++ 95.62% Shell 2.73%

batch_service_queue_simulator's Introduction

README

This repository contains a batch service queue simulator written in C/C++, which has been used to validate the blockchain delay model proposed in Wilhelmi, F., & Giupponi, L. (2021). Discrete-Time Analysis of Wireless Blockchain Networks. arXiv preprint arXiv:2104.05586.

Authors

How to use?

  1. Set permissions to the folder where the repository is allocated:
$ chmod -R 777 <dirname>
  1. Build the project in the "main" folder
$ ./build_local
  1. Run the queue simulator
$ ./queue_main -simulation_time -logs_enabled -queue_size -batch_size -lambda -mu -timeout_mining -seed

The input parameters are described next:

  • simulation_time: total simulation time

  • logs_enabled: flag to enable logs (discouraged for large simulations)

  • queue_size: size of the queue in number of packets

  • batch_size: size of the batch whereby packets are served together

  • lambda: system arrivals in transactions per second

  • mu: service rate at which the queue processes batches

  • timeout_mining: timeout that forces a batch to be served, even if it is not full

  • seed: random seed

Optionally, the user can simulate the effect of forks by including extra input parameters:

$ ./queue_main -simulation_time -logs_enabled -queue_size -batch_size -lambda -mu -timeout_mining -n_miners -capacity_p2p -seed

The additional parameters are described next:

  • n_miners: total number of miners participating in the consensus protocol

  • capacity_p2p: capacity of the P2P links in bits per second

  1. Simulation example
$ ./queue_main 1000000 0 10 8 7.5 15 10 123456

Output:

picture

Want to contribute?

If you want to contribute, please contact to [email protected]

batch_service_queue_simulator's People

Contributors

fwilhelmi avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.