Testing Bitcoin is difficult because block times are slow, and there are not many testnet transactions.
Bitcoin simulated network allows spinning up a Dockerized Bitcoin regtest network consisting of many connected nodes. The nodes have funded wallets, and periodically send Bitcoin between each other. A random node is selected every 5 seconds to mine a block.
This allows for much more rapid development compared to using the Bitcoin testnet, expecially when testing logic related to new blocks.
- Docker
- Nodejs
- NPM
Install dependencies
npm installRun nodes (first time running this will take some time because Docker needs to build the container)
node index.jsRPC exposed on port 1999
- user: rpcuser
- pw: rpcpassword
ZMQ exposed on port 29000
docker build --pull --no-cache --tag bitcoin-simulated-network-image:latest ../s/stop
Credit to Alexey Lunacharsky for the foundation this project was built on