blockchain/docker/docker-compose.nodes.yml
Claude a6773abaca
Some checks are pending
Build & Release / Linux x86_64 (push) Waiting to run
Build & Release / macOS ARM64 (push) Waiting to run
Build & Release / Create Release (push) Blocked by required conditions
fix(pos): add --rpc-ignore-offline to all daemon configs
PoS mining requires this flag when the daemon has no peers. Without it,
the daemon's get_pos_mining_details RPC returns DISCONNECTED status and
the wallet refuses to mint.

First PoS blocks minted on testnet at height 12,382.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-03 13:53:07 +01:00

114 lines
2.8 KiB
YAML

# Lethean Chain Nodes Only — minimal network simulation
# 3 nodes + miner, no explorer/trade (for testing consensus, HF activation, reorgs)
#
# Usage:
# docker compose -f docker-compose.nodes.yml up -d
# # Start mining on node1:
# docker exec lthn-node1 curl -X POST http://127.0.0.1:36941/start_mining \
# -H 'Content-Type: application/json' \
# -d '{"miner_address":"YOUR_iTHN_ADDRESS","threads_count":2}'
# # Check sync status:
# for n in 1 2 3; do
# echo -n "node$n: "; docker exec lthn-node$n curl -s http://127.0.0.1:36941/json_rpc \
# -H 'Content-Type: application/json' \
# -d '{"jsonrpc":"2.0","id":"0","method":"getinfo"}' | python3 -c "import sys,json; print(json.load(sys.stdin)['result']['height'])"
# done
services:
node1:
build:
context: ..
dockerfile: utils/docker/lthn-chain/Dockerfile
target: chain-service
args:
BUILD_TESTNET: 1
BUILD_THREADS: 4
container_name: lthn-node1
ports:
- "46941:36941"
- "46942:36942"
volumes:
- node1-data:/data
command: >
lethean-chain-node
--data-dir /data
--rpc-bind-ip 0.0.0.0
--rpc-bind-port 36941
--p2p-bind-port 36942
--rpc-enable-admin-api
--allow-local-ip
--log-level 1
--disable-upnp
networks:
lthn-net:
ipv4_address: 172.29.0.10
node2:
build:
context: ..
dockerfile: utils/docker/lthn-chain/Dockerfile
target: chain-service
args:
BUILD_TESTNET: 1
BUILD_THREADS: 4
container_name: lthn-node2
ports:
- "46951:36941"
volumes:
- node2-data:/data
command: >
lethean-chain-node
--data-dir /data
--rpc-bind-ip 0.0.0.0
--rpc-bind-port 36941
--p2p-bind-port 36942
--add-exclusive-node 172.29.0.10:36942
--allow-local-ip
--log-level 1
--disable-upnp
depends_on:
- node1
networks:
lthn-net:
ipv4_address: 172.29.0.11
node3:
build:
context: ..
dockerfile: utils/docker/lthn-chain/Dockerfile
target: chain-service
args:
BUILD_TESTNET: 1
BUILD_THREADS: 4
container_name: lthn-node3
ports:
- "46961:36941"
volumes:
- node3-data:/data
command: >
lethean-chain-node
--data-dir /data
--rpc-bind-ip 0.0.0.0
--rpc-bind-port 36941
--p2p-bind-port 36942
--add-exclusive-node 172.29.0.10:36942
--allow-local-ip
--log-level 1
--disable-upnp
depends_on:
- node1
networks:
lthn-net:
ipv4_address: 172.29.0.12
networks:
lthn-net:
driver: bridge
ipam:
config:
- subnet: 172.29.0.0/16
volumes:
node1-data:
node2-data:
node3-data: