Skip to content

Prompt user after upgrading to RDTS-enabled version#256

Open
luke-jr wants to merge 3 commits intobitcoinknots:29.x-knotsfrom
luke-jr:rdts_consent_prompt
Open

Prompt user after upgrading to RDTS-enabled version#256
luke-jr wants to merge 3 commits intobitcoinknots:29.x-knotsfrom
luke-jr:rdts_consent_prompt

Conversation

@luke-jr
Copy link
Collaborator

@luke-jr luke-jr commented Feb 9, 2026

Require consensusrules=rdts in config to start; if missing, give a brief explanation and let the GUI user consent on the spot.

Intended to only be merged together with #238

Screenshot_20260209_024336

@luke-jr luke-jr force-pushed the rdts_consent_prompt branch from 9f3c7e7 to 9cb51e9 Compare February 9, 2026 07:54
@luke-jr luke-jr force-pushed the rdts_consent_prompt branch from 9cb51e9 to c6ac662 Compare February 9, 2026 09:05
@jlopp
Copy link

jlopp commented Feb 10, 2026

Concept ACK; it's very important to get explicit agreement from users regarding consensus changes.

"\n"
"This release adds enforcement of the one-year \"reduced data\" protocol change to the Bitcoin rules, beginning no later than September."
"This upgrade fixes an existential threat to the Bitcoin network.\n"
"\n"
Copy link

@kwsantiago kwsantiago Feb 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing whitespace between concatenated string literals — "September." is immediately followed by "This upgrade fixes...", producing "September.This upgrade" in the displayed message.

Needs a \n or space.

} else {
setting = CONSENSUSRULES_REQUIRED;
}
});

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Return value of WriteSettingsFile() is silently discarded. If writing fails (disk full, permissions), the user's consent is lost and they'll be re-prompted on every startup despite having already consented. Should at least log a warning on failure.

std::map<std::string, common::SettingsValue> new_rw_settings;
if (auto it = settings.rw_settings.find("consensusrules"); it != settings.rw_settings.end()) {
new_rw_settings.emplace(it->first, std::move(it->second));
}
Copy link

@kwsantiago kwsantiago Feb 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This hardcodes "consensusrules" instead of using CONSENSUSRULES_CONFIG_NAME from chainparamsbase.h. If the constant changes, this preservation logic in resetSettings silently breaks and users lose their consent on settings reset.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments