Skip to main content

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

Project description

BlockSimPy

Python 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.0.0.tar.gz (32.3 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.0.0-py3-none-any.whl (30.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: blocksimpy-1.0.0.tar.gz
  • Upload date:
  • Size: 32.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for blocksimpy-1.0.0.tar.gz
Algorithm Hash digest
SHA256 5e81397b24d318fc0343cbb24d8233446e3a7720ed331a08a75f5cda5485b0c0
MD5 ed6c284f2c92bafa3e07552a7d18ab2d
BLAKE2b-256 6ab20fcbc379bd62e7cafcab8246c05ce4d0f41dce15596a8e1bce876cb46a11

See more details on using hashes here.

Provenance

The following attestation bundles were made for blocksimpy-1.0.0.tar.gz:

Publisher: ci.yml on btursunbayev/blocksimpy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: blocksimpy-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 30.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for blocksimpy-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f102449df4e983f34337aceaa1a7e38e3292dac7b47abff3cf0ff31e7b9e1463
MD5 8e434479f61317baa2109d58b9891725
BLAKE2b-256 cd056e48ae1acaaa5772199abfd3baa12e6ecd5217cc6959b7cbcf93744ba8cb

See more details on using hashes here.

Provenance

The following attestation bundles were made for blocksimpy-1.0.0-py3-none-any.whl:

Publisher: ci.yml on btursunbayev/blocksimpy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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