Skip to content

Conversation

@hieblmi
Copy link
Collaborator

@hieblmi hieblmi commented Sep 14, 2023

Addresses #528

This PR introduces a sample configuration file for loopd. The configuration pattern follows the style which was introduced for lnd's sample configuration file in lightningnetwork/lnd#7770.

This PR was tested in regtest by outsourcing the following command line flags to the configuration file:

--network=regtest
--debuglevel=debug
--server.host=localhost:11009
--server.notls
--lnd.host=localhost:10011
--lnd.macaroonpath=.../docker/mounts/regtest/alice/admin.macaroon
--lnd.tlspath=.../docker/mounts/regtest/alice/tls.cert

Copy link
Member

@GeorgeTsagk GeorgeTsagk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm, thanks for putting all this together! 🔬
I commented on some "LSAT" occurrences to be converted to "L402", but lsat also appears a lot in variables and codebase. Perhaps we could do an all-around renaming in a future iteration

@@ -0,0 +1,171 @@
; Example configuration for loopd.
;
; The default location for this file is in ~/.loop/mainnet/loopd.conf on POSIX
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
; The default location for this file is in ~/.loop/mainnet/loopd.conf on POSIX
; The default location for this file is in ~/.loop/{mainnet, testnet, regtest}/loopd.conf on POSIX

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a suggestion

; maxlsatcost=1000

; Maximum routing fee in satoshis that we are willing to pay while paying for an
; LSAT token.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
; LSAT token.
; L402 token.

; -- You may also specify <subsystem>=<level>,<subsystem2>=<level>,... to set.
; debuglevel=

; Maximum cost in satoshis that loopd is going to pay for an LSAT token
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
; Maximum cost in satoshis that loopd is going to pay for an LSAT token
; Maximum cost in satoshis that loopd is going to pay for an L402 token

; The maximum number of times an off-chain payment may be retried.
; maxpaymentretries=3

; Enable experimental features: taproot HTLCs and MuSig2 loop out sweeps.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

taproot/Musig2 are the default now right?

Copy link
Member

@bhandras bhandras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice, thanks! :)

; maxpaymentretries=3

; Enable experimental features: taproot HTLCs and MuSig2 loop out sweeps.
; experimental=false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd leave out the taproot HTLCs and MuSig2 from the doc here, since these are now the default.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also remove that flag from the loop app? Can do that in a follow-up if needed.


[sqlite]

; Skip applying migrations on startup.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a comment that this is for development and debugging purposes and should not be played with.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👀

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would just remove them. I don't think the postgres and sqlite fields need to be exposed in the sample conf

[postgres]

; Skip applying migrations on startup.
; postgres.skipmigrations=false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

; Skip applying migrations on startup.
; postgres.skipmigrations=false

; Database server hostname.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps fill with some defaults for a locally running postgres instance.

[server]

; Loop server address host:port
; server.host=
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd fill the defaults for mainnet here too.

@lightninglabs-deploy
Copy link

@bhandras: review reminder
@sputn1ck: review reminder
@hieblmi, remember to re-request review from reviewers when ready

Copy link
Member

@sputn1ck sputn1ck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@hieblmi hieblmi merged commit 58b7400 into lightninglabs:master Sep 27, 2023
@hieblmi hieblmi deleted the sample-conf-file branch September 15, 2025 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants