-
Notifications
You must be signed in to change notification settings - Fork 37.8k
create bitcoin.conf on first run with template #23931
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
Conversation
I tried compiling and running this locally. Weird this had no errors when compiling on Fedora but there was no bitcoin.conf created on running bitcoind. I will try testing on other OS tomorrow. |
You can fetch his branch from the PR by running |
Thanks @meshcollider I was able to find the email address and added as co-author. Changes in last commit:
Tried testing and it works as expected. Config file was created on first run. It works when there is no data directory present in default location which was not the case when I tried earlier in #23931 (comment) |
I have marked the pull request ready for review. Will figure out a way to add test if it is required. |
This approach doesn't seem as good to me as the other proposed changes. Why only show a subset of config options as comments? Doesn't really matter if it is a template provided by a third party. |
We will have to decide and mention only some options in template. It's not possible to add all options. For other options users can do research. This file can also be left blank but one template will help users understand basic options. As mentioned in OP options can be added/removed based on feedback. |
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
I don't see why that's true. Look at this PR for example #22235 |
Sorry I don't agree with that approach to solve the problem. I would prefer a template in bitcoin.conf with basic things that a new user could understand and file created on first run. |
# Add a node IP address to connect to and attempt to keep the connection open. This option can be set multiple times. | ||
#addnode=randomchars.onion | ||
# Bind to given address and always listen on it. (default: 0.0.0.0). Use [host]:port notation for IPv6. Append =onion to tag any incoming connections to that address and port as incoming Tor connections | ||
#bind=127.0.0.1:8333 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you explain the binding suggested here?
EDIT: I was referring to L16 #bind=127.0.0.1:8333
, on re-reading perhaps it's my bad assumption that this was a suggestion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was referring to L16 #bind=127.0.0.1:8333
Its an example for using bind
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mention the default binding is 0.0.0.0; which I understand to mean the server will listen on all network interfaces.
And we know listening on 127.0.0.1 would instruct the server not to listen on any interface; not to receive remote connections, but even a technical user might not realize this.
Maybe swapping the default with the example would reduce user error?
#bind=127.0.0.1:8333 | |
# Bind to given address and always listen on it. Use [host]:port notation for IPv6. Eg 192.249.249.1:10333. | |
# Append =onion to tag any incoming connections to that address and port as incoming Tor connections | |
#bind=0.0.0.0 |
Co-authored-by: Alexander Leishman <leishman3@gmail.com>
🐙 This pull request conflicts with the target branch and needs rebase. Want to unsubscribe from rebase notifications on this pull request? Just convert this pull request to a "draft". |
Fixes #10746 and #19641
What?
Create bitcoin.conf on first run with a template added as comments. Can add/remove things based on feedback.
Why?
bitcoind
can already create bitcoin.conf if a user runs below command on first startup:bitcoin-qt
can already create blank bitcoin.conf if a user can find this option after starting Bitcoin Core for the first time:This pull request improves UX when using
bitcoind
.How?
Used most of the code from #13761 (will add Alexander Leishman as co-author if I could get the email address)
Template is changed and I have used bitcoin.conf (privacy) template from https://github.com/jlopp/bitcoin-core-config-generator/