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

Idea: Bitcoin.conf created by default #3902

Closed
i-rme opened this issue Mar 19, 2014 · 6 comments
Closed

Idea: Bitcoin.conf created by default #3902

i-rme opened this issue Mar 19, 2014 · 6 comments

Comments

@i-rme
Copy link
Contributor

i-rme commented Mar 19, 2014

If you want to change the default settings of Bitcoin Core you have to:

  1. Go to %appdata%/Bitcoin
  2. Copy "Sample Bitcoin.conf" from https://en.bitcoin.it/wiki/Running_Bitcoin
  3. Search about the newer configuration options (ie. disablewallet is not listed in the wiki)
  4. Finally edit the file with your settings

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.

@gmaxwell
Copy link
Contributor

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.

@gmaxwell
Copy link
Contributor

@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.

@laanwj
Copy link
Member

laanwj commented May 2, 2014

Yes, ideally it would write an example configuration file with every option, except for rpcuser/rpcpassword, commented out like

# (description of option from --help message)
# option=(some default value for option)

@paveljanik
Copy link
Contributor

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.

@rebroad
Copy link
Contributor

rebroad commented Jun 12, 2015

I think this is a great idea.

@laanwj
Copy link
Member

laanwj commented Jul 27, 2015

Indirectly implemented by #6388

@laanwj laanwj closed this as completed Jul 27, 2015
sidhujag pushed a commit to syscoin/syscoin that referenced this issue Dec 28, 2020
Rename `sigSharesToAnnounce` class member in `CSigSharesManager` to `sigSharesQueuedToAnnounce` to avoid confusion with local variables/function args with the same name
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants