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.1.tar.gz (36.0 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.1-py3-none-any.whl (35.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: blocksimpy-1.1.1.tar.gz
  • Upload date:
  • Size: 36.0 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.1.tar.gz
Algorithm Hash digest
SHA256 512eff5383624e727fb8536d5bf362a4b9ac12508172d4015c94cfa4c4ba2682
MD5 a4b3aa3fe19133f9fd9f1a773fd3c011
BLAKE2b-256 72a84111e0cba469b86c631d8caaab4dadb3e010af4354b03abe8be02c9f45e1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: blocksimpy-1.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 498cefdb2834cda97f1a25f84159fcbdcc8a0adc4073a33af11df8b7e2d3efa2
MD5 1926e79c3bae7d6e918c925ca76fb0df
BLAKE2b-256 ca5a74e92a60c7a1f0f1bd55adc35c89f0b7338ead928a5ae8a556b4b14c79e7

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