Skip to main content

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

Project description

BlockSimPy

CI 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.2.0.tar.gz (36.7 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.2.0-py3-none-any.whl (36.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for blocksimpy-1.2.0.tar.gz
Algorithm Hash digest
SHA256 636be7e950931117c5943a989c9b97bc56e38de3da15b7d5a985a0adfc328a9a
MD5 22c0cea211a801464a40b179b27132bb
BLAKE2b-256 5a233c6bc6df809b4dca2523cf3bc5237c71c8a0fbedab51c08647dbf7bde68c

See more details on using hashes here.

Provenance

The following attestation bundles were made for blocksimpy-1.2.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.2.0-py3-none-any.whl.

File metadata

  • Download URL: blocksimpy-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 36.9 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 11ada720bf01b726ad6eb95d16fe1d7d5976a6e8ec790c632441c1afe64776c3
MD5 1d99ae87e78c2a3b57e25525c7a37d43
BLAKE2b-256 d8c3dc4b18bc74d7c3165c1250fec590f60cd7bfb11893b7d7db62b738f63aba

See more details on using hashes here.

Provenance

The following attestation bundles were made for blocksimpy-1.2.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