Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contribute back from boltz fork #12

Open
wants to merge 68 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
a9976bc
feat: add Liquid regtest chain
michael1011 May 8, 2023
5ebb5d3
feat: configure Boltz liquid
michael1011 May 8, 2023
d5d8d29
fix: elements ZMQ
michael1011 May 8, 2023
11bdc6d
change lbtc fees
dni May 8, 2023
8607b12
feat: add mempool.space for liquid
michael1011 May 8, 2023
a33b188
remove eclair and uneeded node duplications
dni Jun 22, 2023
eb2e307
rename tests to regtest, remove lnbits make it more generic
dni Jun 24, 2023
199316b
remove sleeps
dni Jun 24, 2023
14b2bbd
electrs50002
dni Jun 24, 2023
3d151b4
add electrs config back
dni Jun 24, 2023
e8e7223
latest
dni Jun 24, 2023
cf47940
fix esplora url
dni Jun 25, 2023
6915aa2
add esplora
dni Jun 25, 2023
cee4548
remove unneeded if
dni Jun 26, 2023
9e084cc
add dependency checks on starting
dni Jun 26, 2023
19b7930
updates
dni Jul 29, 2023
f5f300b
liquid mempool
dni Aug 3, 2023
4300075
add redis env to mempool
dni Aug 4, 2023
0696c48
use mempool/electrs
dni Aug 4, 2023
19ef194
add sockets for esplora
dni Aug 4, 2023
df9ffca
fix boltz conf
jackstar12 Sep 24, 2023
7eb8f3b
expose lnd-1 ports to localhost
jackstar12 Sep 24, 2023
73840f9
add cln grpc
jackstar12 Oct 1, 2023
494664b
bump cln version
jackstar12 Oct 8, 2023
ea8333b
fix: amount in cln channel tests
jackstar12 Oct 12, 2023
9642c4c
add sleep to boltz startup
jackstar12 Oct 12, 2023
7b84deb
dump existing electrs
jackstar12 Oct 11, 2023
f3c4012
boltz: increase max swap amount, decrease timeouts
jackstar12 Oct 8, 2023
6d0a608
new electrs
jackstar12 Oct 11, 2023
b575b56
use cookie authentication for boltz liquid
jackstar12 Oct 12, 2023
9d8f853
adjust sleep time
jackstar12 Oct 13, 2023
2a6b182
add boltz logs
jackstar12 Oct 13, 2023
84ff625
add elements and bitcoind dependency to boltz
jackstar12 Oct 13, 2023
e692a4b
remove -it from elements-cli-sim
jackstar12 Oct 13, 2023
19a4de2
elements logs
jackstar12 Oct 13, 2023
78de235
remove sleep
jackstar12 Oct 13, 2023
4ddcb3a
use fake cookie
jackstar12 Oct 13, 2023
ed3dc45
only mount conf in elements
jackstar12 Oct 13, 2023
a9dc6db
fake cookie
jackstar12 Oct 14, 2023
52e1273
adjust boltz config
jackstar12 Oct 17, 2023
49c46e5
Merge pull request #1 from BoltzExchange/electrum
jackstar12 Nov 2, 2023
8c719bd
update to electrs v1
dni Nov 2, 2023
6856a75
dont use electrs for mempool
dni Nov 6, 2023
3a6938d
add anvil and contract deployments
michael1011 Nov 8, 2023
b66108b
remove bitcoind datadir on restart
dni Nov 13, 2023
a7847ff
add anvil to depends on boltz
dni Nov 25, 2023
938e9e0
refactors
dni Dec 4, 2023
0c4111f
add electrs
dni Dec 4, 2023
050785b
fixup!
dni Dec 4, 2023
b0913b5
Fix mempool (#2)
dni Dec 5, 2023
5abf8f3
electrum logs (#3)
jackstar12 Jan 22, 2024
586e46e
electrum logs
jackstar12 Jan 22, 2024
f525e73
pin esplora image version
jackstar12 Jan 22, 2024
41b6b3f
update conf to taproot
dni Jan 22, 2024
d8e534e
remove mempool (#4)
jackstar12 Feb 1, 2024
ddc7157
update evm contracts
jackstar12 Feb 8, 2024
4b32702
lower taproot swap timeouts
jackstar12 Feb 9, 2024
0502f2e
feat: add boltz-client (#5)
dni Mar 25, 2024
4a8a548
chore: deploy contracts earlier
dni Mar 27, 2024
e2cd50d
chore: tag foundry image to older version
jackstar12 May 3, 2024
de7daed
chore: use latest docker image for boltz backend
dni May 28, 2024
df9b614
fix: lower min swap amounts
jackstar12 Jul 12, 2024
2ba8711
use cookieauth for bitcoind (#6)
maybeast Jul 25, 2024
3dacd6e
feat: add postgres and pin tag on boltz-backend (#7)
dni Jul 26, 2024
b9fbcbf
Merge branch 'main_boltz'
dni Jul 26, 2024
905811c
fixup merge
dni Jul 26, 2024
6ecea76
Merge branch 'main' into contribute-back-from-boltz-fork
dni Jul 31, 2024
69875f6
clnrest version
dni Jul 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
- uses: actions/checkout@v2
- name: Run tests
run: |
git clone https://github.com/lnbits/lnbits-legend.git
docker build -t lnbitsdocker/lnbits-legend lnbits-legend
chmod +x ./tests
./tests
git clone https://github.com/lnbits/lnbits
docker build -t lnbits/lnbits lnbits
chmod +x ./start-regtest
./start-regtest
18 changes: 14 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
data
data/*
!data/elements
data/elements/*
!data/elements/elements.conf
!data/elements/liquid.cookie

!data/boltz
data/boltz/*
!data/boltz/boltz.conf
!data/electrs
data/electrs/*
!data/electrs/config.toml
!data/boltz/seed.dat

!data/boltz-client
data/boltz-client/*
!data/boltz-client/boltz.toml

# Editor config
.idea/
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 LNbits
Copyright (c) 2022 LNbits, Boltz

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ lncli-sim 2 listpeers
```

# urls
* mempool: http://localhost:8080/
* boltz api: http://localhost:9001/
* lnd-1 rest: http://localhost:8081/
* lnbits: http://localhost:5001/
Expand Down
61 changes: 61 additions & 0 deletions data/boltz-client/boltz.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Path the the log file
logfile = ""

electrumUrl = "electrs:19001"
electrumLiquidUrl = "electrs-liquid:19002"

[BOLTZ]
# By default the daemon automatically connects to the official Boltz instance for the network LND is on
# This value is used to override that
url = "http://boltz:9001"

[DATABASE]
# Path to the SQLite database file
# path = "/home/michael/test.db"

[CLN]
host = "clightning-2"
port = 9736

rootcert = "/root/.lightning/regtest/ca.pem"
privatekey = "/root/.lightning/regtest/client-key.pem"
certchain = "/root/.lightning/regtest/client.pem"


[RPC]
# Host of
host = "boltz-client"

# Port of the gRPC interface
port = 9002

# Whether the REST proxy for the gRPC interface should be disabled
restDisabled = false

# Host of the REST proxy
restHost = "boltz-client"

# Port of the REST proxy
restPort = 9003

# Path to the TLS cert for the gRPC and REST interface
tlsCert = ""

# Path to the TLS private key for the gRPC and REST interface
tlsKey = ""
noTls = true

# Whether the macaroon authentication for the gRPC and REST interface should be disabled
noMacaroons = true

# Path to the admin macaroon for the gRPC and REST interface
adminMacaroonPath = ""

# Path to the read only macaroon for the gRPC and REST interface
readOnlyMacaroonPath = ""

[SWAP]
#autoSwap = true
#channelImbalanceThreshhold = 1
#acceptZeroConf = true
#liquidAddress = "el1qq2490pg57wqtnh3ttmp2d9uxs3wg5aa3usjxv2nrvcycz2utscm69e652lwjcrynemeds7v5ltnwgq4hwrv6q65dnqkf9fayn"
85 changes: 85 additions & 0 deletions data/boltz/boltz.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
[postgres]
host = "postgres"
port = 5432
database = "boltz"
username = "boltz"
password = "boltz"

[swap]
[swap.minSwapSizeMultipliers]
submarine = 2
reverse = 2
chain = 2

[grpc]
host = "boltz"

[api]
host = "boltz"
port = 9_001

[[pairs]]
base = "BTC"
quote = "BTC"
rate = 1
fee = 0.5
maxSwapAmount = 40_294_967
minSwapAmount = 10_000

[pairs.timeoutDelta]
reverse = 1440
swapMinimal = 1000
swapMaximal = 1050
swapTaproot = 300

[[pairs]]
base = "L-BTC"
quote = "BTC"
fee = 0.1
rate = 1
maxSwapAmount = 40_294_967
minSwapAmount = 10_000

[pairs.timeoutDelta]
reverse = 1440
swapMinimal = 1000
swapMaximal = 1050
swapTaproot = 300

[[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"

[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/liquid.cookie"
zmqpubrawtx = "tcp://elementsd:31000"
zmqpubhashblock = "tcp://elementsd:31002"
1 change: 1 addition & 0 deletions data/boltz/seed.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test test test test test test test test test test test junk
32 changes: 32 additions & 0 deletions data/elements/elements.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
chain=liquidregtest
txindex=1

rpcuser=regtest
rpcpassword=regtest

# server
rest=1
server=1
rpcallowip=0.0.0.0/0

# liquid stuff
validatepegin=0
initialfreecoins=2100000000000000
fallbackfee=0.000001

[liquidregtest]
rpcbind=0.0.0.0
rpcport=18884

## Dynafed
con_dyna_deploy_start=0
con_dyna_deploy_signal=1
con_nminerconfirmationwindow=1
con_nrulechangeactivationthreshold=1

## Taproot signaling
con_taproot_signal_start=0

zmqpubrawtx=tcp://0.0.0.0:31000
zmqpubrawblock=tcp://0.0.0.0:31001
zmqpubhashblock=tcp://0.0.0.0:31002
1 change: 1 addition & 0 deletions data/elements/liquid.cookie
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
regtest:regtest
32 changes: 32 additions & 0 deletions data/nginx/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
server {
listen 8190;
server_name mempool;

location /api/v1/ {
proxy_pass http://mempool-api:8999/api/v1/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}

location /api/ {
rewrite ^/api/(.*) /$1 break;
proxy_pass http://unix:/data/.electrs/esplora-regtest;
}
}

server {
listen 8191;
server_name mempool-liquid;

location /api/v1/ {
proxy_pass http://mempool-api-liquid:8998/api/v1/;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}

location /api/ {
rewrite ^/api/(.*) /$1 break;
proxy_pass http://unix:/data/.electrs-liquid/esplora-liquid-regtest;
}
}
Loading
Loading