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

Add new bitcoin_rw.conf file that is used for settings modified by this software itself #11082

Open
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
5 participants
@luke-jr
Member

luke-jr commented Aug 17, 2017

This is part of #7510, without the new GUI settings (ie, just the minimal framework for the RW conf file).

@Sjors

This comment has been minimized.

Show comment
Hide comment
@Sjors

Sjors Mar 17, 2018

Member

I'm not a big fan of multiple config files. I would prefer if QT just edited bitcoin.conf and tells the user to do so manually if things gets too complicated. See also #6461.

Member

Sjors commented Mar 17, 2018

I'm not a big fan of multiple config files. I would prefer if QT just edited bitcoin.conf and tells the user to do so manually if things gets too complicated. See also #6461.

Sjors added a commit to Sjors/bitcoin that referenced this pull request Mar 29, 2018

[qt] move QSettings to bitcoin.conf where possible
When QT launches, move the following QSettings to
bitcoin.conf:

-lang (language)
-dbcache (nDatabaseCache)
-par (nThreadsScriptVerif)
-spendzeroconfchange (bSpendZeroConfChange)
-upnp (fUseUPnP)
-listen (fListen)
-proxy (fUseProxy)
-onion (fUseSeparateProxyTor)

Based on @luke-jr's #11082 and #7510

@Sjors Sjors referenced this pull request Mar 29, 2018

Open

[qt] move QSettings to bitcoin.conf where possible #12833

5 of 5 tasks complete
@Sjors

This comment has been minimized.

Show comment
Hide comment
@Sjors

Sjors Mar 30, 2018

Member

I tried just making bitcoin.conf writeable instead of having two files in #12833, but that seems to raise some objections. So in that case: Concept ACK.

Can you rebase this? From my experience with the other PR that should be easy and it worked quite well.

Member

Sjors commented Mar 30, 2018

I tried just making bitcoin.conf writeable instead of having two files in #12833, but that seems to raise some objections. So in that case: Concept ACK.

Can you rebase this? From my experience with the other PR that should be easy and it worked quite well.

@luke-jr

This comment has been minimized.

Show comment
Hide comment
@luke-jr

luke-jr Mar 31, 2018

Member

Rebased

Member

luke-jr commented Mar 31, 2018

Rebased

@Sjors

This comment has been minimized.

Show comment
Hide comment
@Sjors

Sjors Apr 3, 2018

Member

tACK aac0501 (tested through #12833)

Member

Sjors commented Apr 3, 2018

tACK aac0501 (tested through #12833)

@Sjors

This comment has been minimized.

Show comment
Hide comment
@Sjors

Sjors May 15, 2018

Member

Needs another rebase due to #11862. Perhaps not worth the effort without more Concept ACKs.

Member

Sjors commented May 15, 2018

Needs another rebase due to #11862. Perhaps not worth the effort without more Concept ACKs.

@laanwj laanwj added this to Blockers in High-priority for review May 31, 2018

@ajtowns

ConceptACK. This approach isn't any worse than QSettings, and seems more consistent, and discoverable when anything weird is happening due to conflicting/unexpected settings.

try {
gArgs.ReadRWConfigFile(gArgs.GetArg("-confrw", BITCOIN_RW_CONF_FILENAME));
} catch (const std::exception& e) {
// Ignore problems here, since we are responsible for this file

This comment has been minimized.

@ajtowns

ajtowns Jun 2, 2018

Contributor

Wouldn't it be better for ReadRWConfigFile not to throw exceptions in any normal case? If there's a weird setting, that's fine it will just get over-written later; if the file is read-only though that error should at least be reported to the user; and if there's some other unexpected sort of error that throws an exception, then that shouldn't be ignored?

@ajtowns

ajtowns Jun 2, 2018

Contributor

Wouldn't it be better for ReadRWConfigFile not to throw exceptions in any normal case? If there's a weird setting, that's fine it will just get over-written later; if the file is read-only though that error should at least be reported to the user; and if there's some other unexpected sort of error that throws an exception, then that shouldn't be ignored?

@@ -332,6 +332,7 @@ std::string HelpMessage(HelpMessageMode mode)
if (showDebug)
strUsage += HelpMessageOpt("-blocksonly", strprintf(_("Whether to operate in a blocks only mode (default: %u)"), DEFAULT_BLOCKSONLY));
strUsage += HelpMessageOpt("-conf=<file>", strprintf(_("Specify configuration file. Relative paths will be prefixed by datadir location. (default: %s)"), BITCOIN_CONF_FILENAME));
strUsage += HelpMessageOpt("-confrw=<file>", strprintf(_("Specify read/write configuration file. Relative paths will be prefixed by the network-specific datadir location. (default: %s)"), BITCOIN_RW_CONF_FILENAME));

This comment has been minimized.

@ajtowns

ajtowns Jun 2, 2018

Contributor

"rwconfig" is an implementation detail; it might be better to describe it via it's purpose instead. "confui -- Specify configuration file that stores settings set in the UI" or something?

@ajtowns

ajtowns Jun 2, 2018

Contributor

"rwconfig" is an implementation detail; it might be better to describe it via it's purpose instead. "confui -- Specify configuration file that stores settings set in the UI" or something?

This comment has been minimized.

@ryanofsky

ryanofsky Jun 4, 2018

Contributor

"rwconfig" is an implementation detail; it might be better to describe it via it's purpose instead. "confui -- Specify configuration file that stores settings set in the UI" or something?

IMO, rwconf is nice because it would let us an add an RPC interface for updating settings and persisting them.

@ryanofsky

ryanofsky Jun 4, 2018

Contributor

"rwconfig" is an implementation detail; it might be better to describe it via it's purpose instead. "confui -- Specify configuration file that stores settings set in the UI" or something?

IMO, rwconf is nice because it would let us an add an RPC interface for updating settings and persisting them.

@MarcoFalke MarcoFalke removed this from Blockers in High-priority for review Jun 13, 2018

@MarcoFalke

This comment has been minimized.

Show comment
Hide comment
@MarcoFalke

MarcoFalke Jun 13, 2018

Member

Let me know when I can add this back to project 8, i.e. when it is ready for review.

Member

MarcoFalke commented Jun 13, 2018

Let me know when I can add this back to project 8, i.e. when it is ready for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment