-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit e9e5e80
Showing
11 changed files
with
145 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"coin_name": "Regtest", | ||
"coin_shortcut": "rBTC", | ||
"coin_label": "Bitcoin Regtest", | ||
"rpc_url": "http://bitcoin:18443", | ||
"rpc_user": "btc", | ||
"rpc_pass": "btc", | ||
"message_queue_binding": "tcp://bitcoin-blockbook:48321" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"coin_name": "Regtest", | ||
"coin_shortcut": "rBTC", | ||
"coin_label": "Bitcoin Regtest", | ||
"rpc_url": "http://bitcoin2:18443", | ||
"rpc_user": "btc", | ||
"rpc_pass": "btc", | ||
"message_queue_binding": "tcp://bitcoin-blockbook2:48321" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
version: "3" | ||
|
||
services: | ||
|
||
bitcoin: | ||
image: ruimarinho/bitcoin-core:alpine | ||
ports: | ||
- "18443:18443" | ||
command: | ||
-printtoconsole | ||
-regtest | ||
-rpcauth='btc:9cd88b070f00d57a0bdbfbcc31cb0008$$7d80d4fca52cfc293b2311933b8a9d83dbdbc773a228c6dcf0b34743d9efb146' | ||
-fallbackfee=0.00001 | ||
-rpcallowip=0.0.0.0/0 | ||
-rpcbind=0.0.0.0 | ||
|
||
bitcoin2: | ||
image: ruimarinho/bitcoin-core:alpine | ||
ports: | ||
- "28443:18443" | ||
command: | ||
-printtoconsole | ||
-regtest | ||
-rpcauth='btc:9cd88b070f00d57a0bdbfbcc31cb0008$$7d80d4fca52cfc293b2311933b8a9d83dbdbc773a228c6dcf0b34743d9efb146' | ||
-fallbackfee=0.00001 | ||
-rpcallowip=0.0.0.0/0 | ||
-rpcbind=0.0.0.0 | ||
|
||
bitcoin-explorer: | ||
image: getumbrel/btc-rpc-explorer:v3.1.1 | ||
ports: | ||
- "3001:3002" | ||
environment: | ||
- BTCEXP_HOST=0.0.0.0 | ||
- BTCEXP_BITCOIND_HOST=bitcoin | ||
- BTCEXP_BITCOIND_PORT=18443 | ||
- BTCEXP_BITCOIND_USER=btc | ||
- BTCEXP_BITCOIND_PASS=btc | ||
- BTCEXP_BITCOIND_RPC_TIMEOUT=5000 | ||
- BTCEXP_BASIC_AUTH_PASSWORD=btc | ||
|
||
|
||
bitcoin-explorer2: | ||
image: getumbrel/btc-rpc-explorer:v3.1.1 | ||
ports: | ||
- "3002:3002" | ||
environment: | ||
- BTCEXP_HOST=0.0.0.0 | ||
- BTCEXP_BITCOIND_HOST=bitcoin2 | ||
- BTCEXP_BITCOIND_PORT=18443 | ||
- BTCEXP_BITCOIND_USER=btc | ||
- BTCEXP_BITCOIND_PASS=btc | ||
- BTCEXP_BITCOIND_RPC_TIMEOUT=5000 | ||
- BTCEXP_BASIC_AUTH_PASSWORD=btc | ||
|
||
bitcoin-blockbook: | ||
image: kochetkov/blockbook:dev | ||
restart: always | ||
depends_on: | ||
- bitcoin | ||
ports: | ||
- "9130:9130" | ||
volumes: | ||
- ./blockbook.json:/opt/blockbook/blockchaincfg.json | ||
|
||
bitcoin-blockbook2: | ||
image: kochetkov/blockbook:dev | ||
restart: always | ||
depends_on: | ||
- bitcoin | ||
ports: | ||
- "9131:9130" | ||
volumes: | ||
- ./blockbook2.json:/opt/blockbook/blockchaincfg.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Init 3 wallets, generate 2 addresses | ||
|
||
curl -d '{"jsonrpc":"2.0","id":"1","method":"createwallet", "params": ["w1"]}' -u btc:btc localhost:18443 | ||
curl -d '{"jsonrpc":"2.0","id":"1","method":"createwallet", "params": ["w2"]}' -u btc:btc localhost:18443 | ||
curl -d '{"jsonrpc":"2.0","id":"1","method":"createwallet", "params": ["w3"]}' -u btc:btc localhost:28443 | ||
|
||
btc=$(curl -d '{"jsonrpc":"2.0","id":"1","method":"getnewaddress", "params": []}' -u btc:btc localhost:18443/wallet/w1 | jq .result) | ||
btc2=$(curl -d '{"jsonrpc":"2.0","id":"1","method":"getnewaddress", "params": []}' -u btc:btc localhost:18443/wallet/w2 | jq .result) | ||
|
||
echo "BTC mining: ${btc}" | ||
echo "BTC second: ${btc2}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Create first 110 blocks | ||
|
||
curl -d '{"jsonrpc":"2.0","id":"1","method":"generatetoaddress", "params":[110, "ADDRESS_HERE"]}' -u btc:btc localhost:18443/wallet/w1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# sendtoaddress | ||
|
||
curl -d '{"jsonrpc":"2.0","id":"1","method":"sendtoaddress", "params":["ADDRESS2_HERE", 0.123]}' -u btc:btc localhost:18443/wallet/w1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# connect nodes and sync | ||
|
||
curl -d '{"jsonrpc":"2.0","id":"1","method":"addnode", "params":["bitcoin:18444", "add"]}' -u btc:btc localhost:28443 | ||
|
||
curl -d '{"jsonrpc":"2.0","id":"1","method":"getaddednodeinfo", "params":[]}' -u btc:btc localhost:28443 | jq | ||
|
||
curl -d '{"jsonrpc":"2.0","id":"1","method":"getpeerinfo", "params":[]}' -u btc:btc localhost:28443 | jq | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# disconnect and sendtoaddress (this will be forked in next steps) | ||
|
||
curl -d '{"jsonrpc":"2.0","id":"1","method":"addnode", "params":["bitcoin:18444", "remove"]}' -u btc:btc localhost:28443 | ||
|
||
curl -d '{"jsonrpc":"2.0","id":"1","method":"getaddednodeinfo", "params":[]}' -u btc:btc localhost:28443 | jq | ||
|
||
curl -d '{"jsonrpc":"2.0","id":"1","method":"disconnectnode", "params":["bitcoin:18444"]}' -u btc:btc localhost:28443 | ||
|
||
curl -d '{"jsonrpc":"2.0","id":"1","method":"getpeerinfo", "params":[]}' -u btc:btc localhost:28443 | jq | ||
|
||
curl -d '{"jsonrpc":"2.0","id":"1","method":"sendtoaddress", "params":["ADDRESS2_HERE", 0.345]}' -u btc:btc localhost:18443/wallet/w1 | ||
curl -d '{"jsonrpc":"2.0","id":"1","method":"sendtoaddress", "params":["ADDRESS2_HERE", 0.245]}' -u btc:btc localhost:18443/wallet/w1 | ||
curl -d '{"jsonrpc":"2.0","id":"1","method":"sendtoaddress", "params":["ADDRESS2_HERE", 0.445]}' -u btc:btc localhost:18443/wallet/w1 | ||
|
||
curl -d '{"jsonrpc":"2.0","id":"1","method":"generatetoaddress", "params":[1, "ADDRESS_HERE"]}' -u btc:btc localhost:18443/wallet/w1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# mine fork on node2 | ||
|
||
curl -d '{"jsonrpc":"2.0","id":"1","method":"generatetoaddress", "params":[10, "ADDRESS_HERE"]}' -u btc:btc localhost:28443/wallet/w1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# and connect again | ||
|
||
curl -d '{"jsonrpc":"2.0","id":"1","method":"addnode", "params":["bitcoin:18444", "add"]}' -u btc:btc localhost:28443 | ||
|
||
curl -d '{"jsonrpc":"2.0","id":"1","method":"getaddednodeinfo", "params":[]}' -u btc:btc localhost:28443 | jq | ||
|
||
curl -d '{"jsonrpc":"2.0","id":"1","method":"getpeerinfo", "params":[]}' -u btc:btc localhost:28443 | jq | ||
|