Feat/regtest network (#11)

Feat/regtest network
This commit is contained in:
Thomas Shufps
2023-12-03 20:45:21 -05:00
committed by GitHub
parent 8075c83fe2
commit f7303d73af
7 changed files with 141 additions and 9 deletions
+13 -1
View File
@@ -63,4 +63,16 @@ To stop the setup use:
```
docker compose -f docker-compose-mainnet.yml down
```
```
# Regtest
After running the `regtest` setup a couple of blocks need to be generated:
```bash
# create wallet
$ docker exec -it bitcoin-regtest /app/bin/bitcoin-cli -conf=/app/data/bitcoin.conf -regtest createwallet "regtestwallet"
# generate 101 blocks
$ docker exec -it bitcoin-regtest /app/bin/bitcoin-cli -conf=/app/data/bitcoin.conf -regtest -generate 101
```
+22
View File
@@ -0,0 +1,22 @@
[main]
[test]
[signet]
[regtest]
# allow all IPs
rpcallowip=0.0.0.0/0
# start RPC server
server=1
# bind to 0.0.0.0
rpcbind=0.0.0.0
# RPC Port 28332
rpcport=28332
# RPC username and password
rpcpassword=bitcoin
rpcuser=bitcoin
# set pruning
prune=550
+44
View File
@@ -0,0 +1,44 @@
version: '3.8'
services:
bitcoin-regtest:
container_name: bitcoin-regtest
build:
context: ./docker/bitcoin
dockerfile: Dockerfile
restart: unless-stopped
stop_grace_period: 30s
networks:
- bitcoin-regtest
ports:
- "127.0.0.1:28332:28332/tcp"
- "0.0.0.0:28333:28333/tcp"
command: >
-printtoconsole
-datadir=/app/data
-regtest
-blockversion=536870912
volumes:
- "./data/regtest/bitcoin:/app/data"
- "./bitcoin-regtest.conf:/app/data/bitcoin.conf:ro"
public-pool-regtest:
container_name: public-pool-regtest
build:
context: ..
dockerfile: Dockerfile
restart: unless-stopped
stop_grace_period: 30s
networks:
- bitcoin-regtest
ports:
- "0.0.0.0:23333:23333/tcp"
- "127.0.0.1:23334:23334/tcp"
volumes:
- "./data/regtest/public-pool:/public-pool/DB"
- "./public-pool-regtest.env:/public-pool/.env:ro"
environment:
- NODE_ENV=production
networks:
bitcoin-regtest:
+34
View File
@@ -0,0 +1,34 @@
BITCOIN_RPC_URL=http://bitcoin-regtest
BITCOIN_RPC_USER=bitcoin
BITCOIN_RPC_PASSWORD=bitcoin
BITCOIN_RPC_PORT=28332
BITCOIN_RPC_TIMEOUT=10000
# Enable in bitcoin.conf with
# zmqpubrawblock=tcp://*:3000
# BITCOIN_ZMQ_HOST="tcp://192.168.1.100:3000"
API_PORT=23334
STRATUM_PORT=23333
#optional telegram bot
#TELEGRAM_BOT_TOKEN=
#optional discord bot
#DISCORD_BOT_CLIENTID=
#DISCORD_BOT_GUILD_ID=
#DISCORD_BOT_CHANNEL_ID=
#optional
DEV_FEE_ADDRESS=
# mainnet | testnet
NETWORK=regtest
API_SECURE=false
ENABLE_SOLO=true
ENABLE_PROXY=false
BRAIINS_ACCESS_TOKEN=
PROXY_PORT=3333