feat: reintroduce boltz (#19)
* feat: reintroduce boltz * use latest boltz * fixup lnd version * enable legacy api
This commit is contained in:
parent
bfd4515f9c
commit
a99ef09bb9
5 changed files with 153 additions and 4 deletions
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
|
|
@ -4,10 +4,10 @@ jobs:
|
||||||
regtest:
|
regtest:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: |
|
run: |
|
||||||
git clone https://github.com/lnbits/lnbits-legend.git
|
git clone https://github.com/lnbits/lnbits.git
|
||||||
docker build -t lnbitsdocker/lnbits-legend lnbits-legend
|
docker build -t lnbits/lnbits lnbits
|
||||||
chmod +x ./tests
|
chmod +x ./tests
|
||||||
./tests
|
./tests
|
||||||
|
|
|
||||||
111
data/boltz/boltz.conf
Normal file
111
data/boltz/boltz.conf
Normal file
|
|
@ -0,0 +1,111 @@
|
||||||
|
[api]
|
||||||
|
host = "boltz"
|
||||||
|
port = 9_001
|
||||||
|
|
||||||
|
[grpc]
|
||||||
|
host = "0.0.0.0"
|
||||||
|
port = 9_000
|
||||||
|
|
||||||
|
[postgres]
|
||||||
|
host = "boltz-postgres"
|
||||||
|
port = 5432
|
||||||
|
database = "boltz"
|
||||||
|
username = "boltz"
|
||||||
|
password = "boltz"
|
||||||
|
|
||||||
|
[sidecar]
|
||||||
|
[sidecar.grpc]
|
||||||
|
host = "127.0.0.1"
|
||||||
|
port = 9003
|
||||||
|
|
||||||
|
[sidecar.ws]
|
||||||
|
host = "0.0.0.0"
|
||||||
|
port = 9004
|
||||||
|
|
||||||
|
[sidecar.api]
|
||||||
|
host = "0.0.0.0"
|
||||||
|
port = 9005
|
||||||
|
|
||||||
|
[[pairs]]
|
||||||
|
isLegacy = true
|
||||||
|
base = "BTC"
|
||||||
|
quote = "BTC"
|
||||||
|
rate = 1
|
||||||
|
fee = 0.5
|
||||||
|
swapInFee = 0.1
|
||||||
|
maxSwapAmount = 40_294_967
|
||||||
|
minSwapAmount = 50_000
|
||||||
|
|
||||||
|
[pairs.timeoutDelta]
|
||||||
|
chain = 1440
|
||||||
|
reverse = 1440
|
||||||
|
swapMinimal = 1440
|
||||||
|
swapMaximal = 2880
|
||||||
|
swapTaproot = 10080
|
||||||
|
|
||||||
|
[[pairs]]
|
||||||
|
isLegacy = true
|
||||||
|
base = "L-BTC"
|
||||||
|
quote = "BTC"
|
||||||
|
fee = 0.25
|
||||||
|
swapInFee = 0.1
|
||||||
|
rate = 1
|
||||||
|
maxSwapAmount = 40_294_967
|
||||||
|
minSwapAmount = 100
|
||||||
|
|
||||||
|
[pairs.submarineSwap]
|
||||||
|
minSwapAmount = 1_000
|
||||||
|
minBatchedAmount = 21
|
||||||
|
|
||||||
|
[pairs.chainSwap]
|
||||||
|
minSwapAmount = 25_000
|
||||||
|
|
||||||
|
[pairs.timeoutDelta]
|
||||||
|
chain = 1440
|
||||||
|
reverse = 1440
|
||||||
|
swapMinimal = 1440
|
||||||
|
swapMaximal = 2880
|
||||||
|
swapTaproot = 10080
|
||||||
|
|
||||||
|
[[currencies]]
|
||||||
|
symbol = "BTC"
|
||||||
|
network = "bitcoinRegtest"
|
||||||
|
minWalletBalance = 10_000_000
|
||||||
|
minChannelBalance = 10_000_000
|
||||||
|
maxSwapAmount = 40_294_967
|
||||||
|
minSwapAmount = 10_000
|
||||||
|
maxZeroConfAmount = 0
|
||||||
|
|
||||||
|
[currencies.chain]
|
||||||
|
# mempoolSpace = "http://mempool-web:8090/api"
|
||||||
|
host = "bitcoind"
|
||||||
|
zmqpubrawtx = "tcp://bitcoind:29000"
|
||||||
|
zmqpubrawblock = "tcp://bitcoind:29001"
|
||||||
|
port = 18_443
|
||||||
|
cookie = "/root/.bitcoin/regtest/.cookie"
|
||||||
|
|
||||||
|
wallet = "lnbits"
|
||||||
|
|
||||||
|
[currencies.lnd]
|
||||||
|
host = "lnd-2"
|
||||||
|
port = 10_009
|
||||||
|
certpath = "/data/lnd/tls.cert"
|
||||||
|
macaroonpath = "/data/lnd/data/chain/bitcoin/regtest/admin.macaroon"
|
||||||
|
|
||||||
|
|
||||||
|
[liquid]
|
||||||
|
symbol = "L-BTC"
|
||||||
|
network = "liquidRegtest"
|
||||||
|
|
||||||
|
maxSwapAmount = 40_294_967
|
||||||
|
minSwapAmount = 10_000
|
||||||
|
maxZeroConfAmount = 40_294_967
|
||||||
|
|
||||||
|
[liquid.chain]
|
||||||
|
host = "elementsd"
|
||||||
|
port = 18884
|
||||||
|
cookie = "/root/.elements/liquidregtest/.cookie"
|
||||||
|
zmqpubrawtx = "tcp://elementsd:31000"
|
||||||
|
zmqpubhashblock = "tcp://elementsd:31002"
|
||||||
|
|
||||||
|
wallet = "lnbits"
|
||||||
|
|
@ -22,6 +22,42 @@ services:
|
||||||
- lnbits-data:/app/data
|
- lnbits-data:/app/data
|
||||||
- ./data/lnd-3:/app/lnd:uid=1000,gid=1000
|
- ./data/lnd-3:/app/lnd:uid=1000,gid=1000
|
||||||
|
|
||||||
|
boltz:
|
||||||
|
hostname: boltz
|
||||||
|
depends_on:
|
||||||
|
- lnd-2
|
||||||
|
- boltz-postgres
|
||||||
|
restart: always
|
||||||
|
image: boltz/boltz:latest
|
||||||
|
ports:
|
||||||
|
- 9000:9000
|
||||||
|
- 9001:9001
|
||||||
|
entrypoint: "sh -c 'sleep 30; /boltz-backend/bin/boltzd'"
|
||||||
|
volumes:
|
||||||
|
- ./data/lnd-2:/data/lnd/
|
||||||
|
- ./data/boltz/:/root/.boltz/
|
||||||
|
- elements-data:/root/.elements
|
||||||
|
- bitcoin-data:/root/.bitcoin
|
||||||
|
|
||||||
|
boltz-postgres:
|
||||||
|
hostname: boltz-postgres
|
||||||
|
restart: always
|
||||||
|
image: postgres:14-alpine
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "pg_isready --dbname boltz --username boltz"]
|
||||||
|
interval: 5s
|
||||||
|
timeout: 30s
|
||||||
|
retries: 10
|
||||||
|
start_period: 5s
|
||||||
|
environment:
|
||||||
|
- POSTGRES_DB=boltz
|
||||||
|
- POSTGRES_USER=boltz
|
||||||
|
- POSTGRES_PASSWORD=boltz
|
||||||
|
ports:
|
||||||
|
- 5432:5432
|
||||||
|
expose:
|
||||||
|
- 5432
|
||||||
|
|
||||||
bitcoind:
|
bitcoind:
|
||||||
hostname: bitcoind
|
hostname: bitcoind
|
||||||
image: boltz/bitcoin-core:25.0
|
image: boltz/bitcoin-core:25.0
|
||||||
|
|
@ -169,7 +205,7 @@ services:
|
||||||
hostname: lnd-2
|
hostname: lnd-2
|
||||||
depends_on:
|
depends_on:
|
||||||
- bitcoind
|
- bitcoind
|
||||||
image: boltz/lnd:0.18.4-beta
|
image: boltz/lnd:0.19.3-beta
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
command:
|
command:
|
||||||
- --listen=lnd-2:9735
|
- --listen=lnd-2:9735
|
||||||
|
|
|
||||||
|
|
@ -120,6 +120,7 @@ lnbits-elements-init(){
|
||||||
elements-cli-sim createwallet lnbits || elements-cli-sim loadwallet lnbits
|
elements-cli-sim createwallet lnbits || elements-cli-sim loadwallet lnbits
|
||||||
echo "mining 150 blocks..."
|
echo "mining 150 blocks..."
|
||||||
elements-cli-sim -generate 150 > /dev/null
|
elements-cli-sim -generate 150 > /dev/null
|
||||||
|
elements-cli-sim rescanblockchain
|
||||||
}
|
}
|
||||||
|
|
||||||
lnbits-init(){
|
lnbits-init(){
|
||||||
|
|
|
||||||
1
tests
1
tests
|
|
@ -57,6 +57,7 @@ done
|
||||||
run "eclair-1 openchannels" 2 $(docker exec lnbits-eclair-1 curl -s http://localhost:8080/channels -X POST -u :lnbits| jq '. | length')
|
run "eclair-1 openchannels" 2 $(docker exec lnbits-eclair-1 curl -s http://localhost:8080/channels -X POST -u :lnbits| jq '. | length')
|
||||||
run "eclair-1 blockHeight" $blockheight $(docker exec lnbits-eclair-1 curl -s http://localhost:8080/getinfo -X POST -u :lnbits| jq '.blockHeight')
|
run "eclair-1 blockHeight" $blockheight $(docker exec lnbits-eclair-1 curl -s http://localhost:8080/getinfo -X POST -u :lnbits| jq '.blockHeight')
|
||||||
run "lnbits service status" "200" $(curl -s -o /dev/null -w "%{http_code}" "http://localhost:5001/")
|
run "lnbits service status" "200" $(curl -s -o /dev/null -w "%{http_code}" "http://localhost:5001/")
|
||||||
|
run "boltz service status" "200" $(curl -s -o /dev/null --head -w "%{http_code}" "http://localhost:9001/version")
|
||||||
|
|
||||||
# return non-zero exit code if a test fails
|
# return non-zero exit code if a test fails
|
||||||
if [[ "$failed" == "true" ]]; then
|
if [[ "$failed" == "true" ]]; then
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue