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

Generate default config file during build #67

Open
theborakompanioni opened this issue Oct 5, 2022 · 2 comments
Open

Generate default config file during build #67

theborakompanioni opened this issue Oct 5, 2022 · 2 comments
Labels
build concept help wanted Extra attention is needed

Comments

@theborakompanioni
Copy link
Collaborator

Shipping a default config file is cumbersome and effectively unnecessary.
You have to track JM releases closely and make sure to ship the "right" default values.
With #66 merged, there is no real need anymore to ship this file.
JM will create a standard config file on first start, which can be done during the docker build process.
The current behaviour of env var RESTORE_DEFAULT_CONFIG can stay the same, if this file is copied to different directory immediately afterwards.

Users will still be able to include their own config file. Also, all env variables prefixed with JM_ will overwrite corresponding config variables.

Info: The mechanism of applying env vars to the JM config must be able to handle commented out variables.

@theborakompanioni
Copy link
Collaborator Author

wallet-tool.py will generate the default config and then exit:

user@host:/src/scripts# ./wallet-tool.py 
User data location: /root/.joinmarket/
Created a new `joinmarket.cfg`. Please review and adopt the settings and restart joinmarket.

Make sure to uncomment and replace the values for and:

# Maximum absolute coinjoin fee in satoshi to pay to a single
# market maker for a transaction. Both the limits given in
# max_cj_fee_abs and max_cj_fee_rel must be exceeded in order
# to not consider a certain offer.
#max_cj_fee_abs = x

# Maximum relative coinjoin fee, in fractions of the coinjoin value
# e.g. if your coinjoin amount is 2 btc (200 million satoshi) and
# max_cj_fee_rel = 0.001 (0.1%), the maximum fee allowed would
# be 0.002 btc (200 thousand satoshi)
#max_cj_fee_rel = x

e.g.

# Maximum absolute coinjoin fee in satoshi to pay to a single
# market maker for a transaction. Both the limits given in
# max_cj_fee_abs and max_cj_fee_rel must be exceeded in order
# to not consider a certain offer.
max_cj_fee_abs = 10000

# Maximum relative coinjoin fee, in fractions of the coinjoin value
# e.g. if your coinjoin amount is 2 btc (200 million satoshi) and
# max_cj_fee_rel = 0.001 (0.1%), the maximum fee allowed would
# be 0.002 btc (200 thousand satoshi)
max_cj_fee_rel = 0.0003

This is needed for them to be replaceable by the entrypoint script (which randomizes these values).

@theborakompanioni
Copy link
Collaborator Author

Also, some directory nodes have been added in #112
(At some point in time, they might find their way into the default config.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build concept help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant