-
Notifications
You must be signed in to change notification settings - Fork 35.7k
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
Idea: Bitcoin.conf created by default #3902
Comments
Eerk. Copying that "sample bitcoin.conf" is a really bad idea. If that is what users think they need to do then we should certantly do something. |
@Drak I disagree strongly. The only thing the file should have by default should be rpcuser/rpcpassword, and they should not be generated by the user but generated by a secure RNG. |
Yes, ideally it would write an example configuration file with every option, except for rpcuser/rpcpassword, commented out like
|
I have the same opinion. But I'll write it from the beginning. Let's describe what happens now with the current master. When the user first starts bitcoind, ~/.bitcoin is created and this is filled in: pavel@linux-hshf:~/.bitcoin> l
total 4
drwxr-xr-x 1 pavel users 88 Nov 6 11:15 ./
drwxr-xr-x 1 pavel users 172 Nov 6 11:15 ../
drwx------ 1 pavel users 58 Nov 6 11:15 blocks/
drwx------ 1 pavel users 78 Nov 6 11:15 chainstate/
drwx------ 1 pavel users 28 Nov 6 11:15 database/
-rw------- 1 pavel users 0 Nov 6 11:15 db.log
-rw------- 1 pavel users 2059 Nov 6 11:15 debug.log
-rw------- 1 pavel users 0 Nov 6 11:15 .lock
pavel@linux-hshf:~/.bitcoin> bitcoind prints this at the first run: pavel@linux-hshf:~/bitcoin/src> ./bitcoind
Error: To use the "-server" option, you must set a rpcpassword in the configuration file:
/home/pavel/.bitcoin/bitcoin.conf
It is recommended you use the following random password:
rpcuser=bitcoinrpc
rpcpassword=EwJeV3fZTyTVozdECF627BkBMnNDwQaVLakG3A4wXYyk
(you do not need to remember this password)
The username and password MUST NOT be the same.
If the file does not exist, create it with owner-readable-only file permissions.
It is also recommended to set alertnotify so you are notified of problems;
for example: alertnotify=echo %s | mail -s "Bitcoin Alert" admin@foo.com
pavel@linux-hshf:~/bitcoin/src> So we are pre-filling the user directory and print him texts he could (we even recommend that) fill in the bitcoind.conf. This is quite good, but it would me more user friendly to pre-fill also these infos to the newly created bitcoind.conf. He still have to do something, but we could make it a lot easier for him if we pre-fill the file with this info, e.g. in this particular run of bitcoind, the bitcoin.conf file would end up with this: # Generated rpcuser and rpcpassword
rpcuser=bitcoinrpc
rpcpassword=EwJeV3fZTyTVozdECF627BkBMnNDwQaVLakG3A4wXYyk I also think that the rest of the start message (alertnotify example) could go to this file (with maybe even more comments and samples) instead of printing it to the user. He is trying to run bitcoind for the first time (without arguments as I did above), doesn't have rpcuser/password set up, so why bother him with the alertnotify at all? So in the future, it could work as follows: $ ./bitcoind
Warning: rpcuser and rpcpassword were generated for your convenience (you can change it in ~/.bitcoin/bitcoind.conf). ... and bitcoind is running. |
I think this is a great idea. |
Indirectly implemented by #6388 |
Rename `sigSharesToAnnounce` class member in `CSigSharesManager` to `sigSharesQueuedToAnnounce` to avoid confusion with local variables/function args with the same name
If you want to change the default settings of Bitcoin Core you have to:
I believe that on installing Bitcoin Core, if no bitcoin.conf exists in %appdata%/Bitcoin a new one should be created with all options available in that release and some comments about every setting (like the wiki sample file).
I dont know how to make a pull request for this idea.
The text was updated successfully, but these errors were encountered: