This issue is about auto-generating a sample-xud.conf file in the repo (e.g. root folder) with all available options (on every build). This sample config file is NOT used by XUD in any way. We can link to it from the Configuration wiki and from any other place. The reason we want this is, because like this we can keep the sample config option always up-to-date.
The users don't have to copy paste the config from the readme, any options left blank use default values. Also, the behavior in bitcoind, btcd, and lnd does not create a config file for you, so I think it's good to be in line with that.
One consideration either way is that if we create such a file on install, it won't be there should the users launch xud with a non-default xud directory.
I'd lean against creating a config file automatically. However, I think it would make sense to provide a sample config file in this repo (maybe we link to it from our readme), and maybe an npm script to copy the file to the default directory (or we could bundle that into an existing script).
bitcoind, btcd, and lnd does not create a config file for you
Well well that's a strong argument. Until I come up with sth better, I'll do the proposed sample config and link to it in the readme
https://github.com/btcsuite/btcd/blob/master/sample-btcd.conf
https://github.com/lightningnetwork/lnd/blob/master/sample-lnd.conf
-style.
2 sats:
Yes I'll open a PR to auto populate the BTC/LTC pair for now the same way we do the seed peers. But do you think the default config should disable lnd?
@offerm
actually I'm ok with setting lnd & raiden to disable = true by default, it indeed is a on-boarding problem at the moment and we might change the default back to disable = false once the swaps are actually working. Or leave it and have another way to enable it as a protection for novice users. @sangaman
https://github.com/ExchangeUnion/xud/issues/331, as discussed in the call
If you do change to disable=true, please update the readme or tell me to do it @sangaman
Agree.
Since the config file changes every now and then, this issue is about automatically creating a sample-xud.conf and put it into the root folder. Once that's done, we link to it from the readme/other places.
Hello, I see that issue has no assignee, have you guys concluded anything on this, is what-to-do clear ? @kilrau
@rsercano This issue is about:
Since the config file changes every now and then, this issue is about automatically creating a sample-xud.conf and put it into the root folder.
I will take over adjusting existing readme & co:
Once that's done, we link to it from the readme/other places.
I still think creating a sample config file for the user is not the best idea, considering it is not the behavior of bitcoind, btcd, lnd, etc...
I think it might be best to just have sample configuration on our Configuration wiki page, or maybe a sample config file that we provide in the repo.
sample config file that we provide in the repo.
That's exactly what this task is about! Sorry if this was still not clear. In other words: This issue is about auto-generating a sample config file in the repo with all available options (on every build). This sample config file is NOT used by XUD in any way. We can link to it from the Configuration wiki and from any other place. The reason we want this is, because like this we can keep the sample config always up-to-date.
Oh ok, I hadn't considered automatically generating the file we keep in the repo. I suppose it can be done with an npm script and converting the default Config object you get from calling its constructor from JSON into TOML.
Updated description
I'll check that, seems like a simple issue, will try to generate from inside of code somehow as @sangaman described, and will put a link to the readme as sample configuration file.
Most helpful comment
Oh ok, I hadn't considered automatically generating the file we keep in the repo. I suppose it can be done with an npm script and converting the default
Configobject you get from calling its constructor from JSON into TOML.