Closed jomagalo closed 10 months ago
Like this https://docs.boltz.exchange/v/api/deployment ?
Yes, I've looked at it carefully but I can't get it to work. I get a concatenated error for the btc lnd pair. I thought it was a bitcoin version error that I updated from 23 to 26, but I haven't solved the problem.
./boltzd --datadir /home/jomagalo/.boltz
31/01/2024 15:38:52:782 warn: Disabled loki logger because of invalid configuration
31/01/2024 15:38:52:787 info: Starting Boltz 3.4.0
31/01/2024 15:38:52:981 warn: Disabled Ethereum integration because: missing swap contracts
31/01/2024 15:38:52:982 warn: Disabled RSK integration because: missing swap contracts
31/01/2024 15:38:52:987 info: Enabling MempoolSpace fee estimations for BTC: [
"https://mempool.space/api"
]
31/01/2024 15:38:52:990 error: Could not initialize currency BTC: could not find required files for BTC LND
31/01/2024 15:38:53:120 debug: Prepay miner fee for Reverse Swaps is disabled
31/01/2024 15:38:53:122 debug: Using routing offset exceptions for BTC: {}
31/01/2024 15:38:53:126 debug: Using P2SH nested P2WSH addresses for legacy Bitcoin Submarine Swaps
31/01/2024 15:38:53:131 info: Setting Swap retry interval to 15 seconds
31/01/2024 15:38:53:139 warn: Disabled backups because no provider was specified
31/01/2024 15:38:53:190 info: Loaded existing OTP secret
31/01/2024 15:38:53:194 warn: Disabling metrics server because of missing configuration
31/01/2024 15:38:53:333 verbose: Database has latest schema version 8
31/01/2024 15:38:53:337 info: Connected to database: /home/jomagalo/.boltz/boltz.db
31/01/2024 15:38:53:380 error: Could not initialize Boltz: could not find currency: BTC
{ message: 'could not find currency: BTC', code: '2.0' }
31/01/2024 15:38:53:388 error: Application shutting down with code:
configpath = "/home/jomagalo/.boltz/boltz.conf"
dbpath = "/home/jomagalo/.boltz/boltz.db"
logpath = "/home/jomagalo/.boltz/boltz.log"
datadir = "/home/jomagaglo/.boltz"
# This mnemonic is not for the wallet that holds the onchain coins
# but the claim and refund keys are derived from it
mnemonicpath = "/home/jomagalo/.boltz/seed.dat"
# Possible values are: error, warning, info, verbose, debug, silly
loglevel = "debug"
# Logs can be sent to a Loki log aggregator
# lokiHost = "http://127.0.0.1:3100"
# lokiNetwork = "regtest"
# This value configures the type of the lockup address of normal Submarine Swaps:
# - false: P2SH nested P2WSH
# - true: P2WSH
swapwitnessaddress = false
# Enables the prepay minerfee Reverse Submarine Swap procotol
# If this value is "true", an invoice for the miner fee has to be paid
# before hold invoice of the Revese Swap
prepayminerfee = false
# This is the REST API that should be exposed to the public
# It does not support HTTPS but only plaintext HTTP. A reverse
# proxy should be setup with a web server like Nginx
[api]
host = "127.0.0.1"
port = 9001
# The backend can expose a metrics endpoint about swap count, volume, etc
# [prometheus]
# host = "127.0.0.1"
# port = 9_092
# And this the gRPC API that is used by the boltz-cli executable
[grpc]
host = "127.0.0.1"
port = 9000
certpath = "/home/jomagalo/.boltz/tls.cert"
keypath = "/home/jomagalo/.boltz/tls.key"
# The interval in seconds at which new rates for pairs that
# do not have a hardcoded rate should be updates
[rates]
interval = 1
# Boltz Backend allows for backing up LND channel backups and
# the database to a Google Cloud Storage Bucket
[backup]
email = ""
privatekeypath = ""
bucketname = ""
# Cron interval at which a new backup should be uploaded. The default value is daily
interval = "0 0 * * *"
# Boltz backend supports sending messages to Discord after successful and failed
# Swaps and if the wallet or channel balance is below a configurable threshold
[notification]
token = ""
channel = ""
# Optionally, important alerts can be sent to a different channel
# channelAlerts = ""
prefix = ""
# Interval in minutes at which the wallet and channel balances should be checked
interval = 1
# Some Discord commands (like withdraw) require a TOTP token
# This is the path to the secret of that TOTP token
otpsecretpath = "/home/jomagalo/.boltz/otpSecret.dat"
# The array "pairs" configures the trading pairs that Boltz should support
# A pair can have the following options:
# - "base" (required): base currency
# - "quote" (required): quote currency
# - "timeoutDelta": after how many minutes a Swap of that pair should timeout
# - "rate": the rate for a pair can be hardcoded (only sensible for same currency pairs);
# if the rate is not hardcoded the mean value from these exchanges will be used:
# - Binance
# - Bitfinex
# - Coinbase Pro
# - Kraken
# - Poloniex
# - "fee": percentage of the swapped amount that should be charged as fee
# - "swapInFee" (optional): same as "fee" but for swaps from onchain to lightning; defaults to "fee" if not set
[[pairs]]
base = "BTC"
quote = "BTC"
rate = 1
maxSwapAmount = 10000000
minSwapAmount = 10000
# Expiry of the invoices generated for reverse swaps of this pair
# If not set, half of the expiry time of the reverse swap will be used
invoiceExpiry = 7200
timeoutDelta = 400
# Alternatively, the timeouts of swaps of a pair can be set like this
# [pairs.timeoutDelta]
# reverse = 1440
# swapMinimal = 1440
# swapMaximal = 2880
[[pairs]]
base = "L-BTC"
quote = "BTC"
rate = 1
fee = 0.5
swapInFee = 0.2
timeoutDelta = 300
maxSwapAmount = 1000000000
minSwapAmount = 100000
# The array "currencies" configures the chain and LND clients for the "pairs"
# Not configuring the LND client is possible but will cause that chain not to support Lightning
# The values are pretty self explainatory apart from: "minWalletBalance" and "minChannelBalance" which trigger
# a Discord notification
[[currencies]]
symbol = "BTC"
network = "bitcoinTestnet"
minWalletBalance = 10000000
minChannelBalance = 10000000
maxZeroConfAmount = 10000000
# Can be set to alert about the balance of an unused wallet being more than a certain threshold
# maxUnusedWalletBalance = 100_000
[currencies.chain]
host = "127.0.0.1"
port = 18332
# The requests to Bitcoin Core like clients can be authenticated with cookie files or user/password
# If both are configured, cookie files are preferred
cookie ="/media/bitcoin/data/testnet3/.cookie"
#user = "bitcoin"
#password = "bitcoin"
# Optional API endpoint of a MempoolSpace instance running on the chain of the configured client
mempoolSpace = "https://mempool.space/api"
# The ZMQ endpoints for a chain can be configured here
# If they are not set, those endpoints are fetched via the "getzmqnotifications" RPC method of the node
zmqpubrawtx ="tcp://0.0.0.0:28333"
zmqpubrawblock ="tcp://0.0.0.0:28332"
# hashblock is not required and should only be used as fallback in case rawblock is not available
#zmqpubhashblock = "tcp://0.0.0.0:29002"
[currencies.lnd]
host = "127.0.0.1"
port = 10009
certpath = "/home/jomagalo/.lnd/bitcoin/tls.cert"
macaroonpath = "/home/jomagalo/.lnd/bitcoin/admin.macaroon"
maxPaymentFeeRatio = 0.03
#[liquid]
#symbol = "L-BTC"
#network = "liquidTestnet"
#minWalletBalance = 10000000
# [liquid.chain]
# host = "127.0.0.1"
# port = 18891
# cookie = "/media/elements/data/liquidtestnet/.cookie"
Could not initialize currency BTC: could not find required files for BTC LND
[currencies.lnd]
host = "127.0.0.1"
port = 10009
certpath = "/home/jomagalo/.lnd/bitcoin/tls.cert"
macaroonpath = "/home/jomagalo/.lnd/bitcoin/admin.macaroon"
maxPaymentFeeRatio = 0.03
Check if certpath
and macaroonpath
are correct
Yes, there was the error and it was going to drive me crazy. Thank you so much
They can expand a bit information on how to run Boltz Backend in Testnet mode (No Regtest). Or how to launch Boltzd without Docker?
Thank