Skip to main content

A high-fidelity blockchain discrete event simulator for research and education

Project description

BlockSimPy

Python PyPI version License

A discrete event simulator for blockchain networks that models mining competition, block propagation, difficulty adjustment, and economic incentives. The simulator enables controlled experimentation with blockchain protocols without operating live cryptocurrency nodes. Configurations for Bitcoin, Bitcoin Cash, Litecoin, and Dogecoin are provided.

Installation

pip install blocksimpy

Quick Start

Run a Bitcoin simulation for 100 blocks:

blocksimpy --chain btc --blocks 100

or

bsim --chain btc --blocks 100

Run a custom blockchain:

blocksimpy --blocktime 30 --blocks 50 --miners 5

See all options:

blocksimpy --help

Testing

Validate the simulator works correctly:

python tests/test_validation.py

This runs simulations for Bitcoin, Litecoin, Dogecoin, and Bitcoin Cash, validating that metrics match expected values.

Documentation

Architecture

Configuration guide

License

Apache License 2.0 - see LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

blocksimpy-1.1.0.tar.gz (35.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

blocksimpy-1.1.0-py3-none-any.whl (35.9 kB view details)

Uploaded Python 3

File details

Details for the file blocksimpy-1.1.0.tar.gz.

File metadata

  • Download URL: blocksimpy-1.1.0.tar.gz
  • Upload date:
  • Size: 35.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for blocksimpy-1.1.0.tar.gz
Algorithm Hash digest
SHA256 041d7d86741e0d9e4ea6114b1a4d5917d34bd7417e4bc652143a673d8bf927e3
MD5 dac923456e81793d2a4679c5dbc6ffdb
BLAKE2b-256 9c6d16931bc04832ddb65f2717113359908613ac2a06c99d2f27e283eded585a

See more details on using hashes here.

File details

Details for the file blocksimpy-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: blocksimpy-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 35.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for blocksimpy-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c81a094ce63b47153ea9845e37649e1b14eb10bef57fc5461ba0e39305d72b5c
MD5 bfbfa6ee4e372556a21e8e4d05878eee
BLAKE2b-256 c19f7d82b6e9d99b8269621efdd7fe371400855e5094678ad5dc14868fc29b2d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page