Skip to content

Prompt user after upgrading to RDTS-enabled version#256

Open
luke-jr wants to merge 4 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 4 commits intobitcoinknots:29.x-knotsfrom
luke-jr:rdts_consent_prompt

Conversation

@luke-jr
Copy link
Copy Markdown
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_20260218_195807

@luke-jr luke-jr force-pushed the rdts_consent_prompt branch 2 times, most recently from 9cb51e9 to c6ac662 Compare February 9, 2026 09:05
@jlopp
Copy link
Copy Markdown

jlopp commented Feb 10, 2026

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

Comment thread src/init.cpp
Comment thread src/init.cpp Outdated
} else {
setting = CONSENSUSRULES_REQUIRED;
}
});
Copy link
Copy Markdown

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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

WriteSettingsFile itself logs already?

Comment thread src/node/interfaces.cpp
@luke-jr luke-jr force-pushed the rdts_consent_prompt branch from c6ac662 to dcaa85a Compare February 19, 2026 00:47
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a user consent mechanism for the "Reduced Data Temporary Softfork" (RDTS) protocol change in Bitcoin Knots. On mainnet, the software requires the user to explicitly acknowledge the consensus rule change via the -consensusrules=rdts config option or an interactive GUI prompt before the node will start. This is designed to work alongside PR #238 which implements the actual RDTS deployment.

Changes:

  • Added UserProtocolRulesConsent() in init.cpp that checks for consensusrules=rdts config, prompts GUI users interactively, and persists consent to settings.json
  • Added rich-text URL linkification to all GUI ThreadSafeMessageBox/ThreadSafeQuestion messages using a new regex-based MakeHtmlLink overload, plus a <qt> prefix convention for rich text rendering
  • Updated resetSettings() to preserve the consensus rules consent setting across GUI settings resets, and added the -consensusrules argument to available CLI options

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/init.cpp Core consent logic: UserProtocolRulesConsent() function and its invocation during AppInitMain (skipped for test chains)
src/chainparamsbase.h Defines CONSENSUSRULES_CONFIG_NAME and CONSENSUSRULES_REQUIRED constants
src/chainparamsbase.cpp Registers -consensusrules CLI argument
src/qt/bitcoingui.cpp Adds <qt> prefix-based rich text rendering and auto-linking of HTTPS URLs in all message boxes
src/qt/guiutil.h Declares new MakeHtmlLink(const QString&) overload
src/qt/guiutil.cpp Implements regex-based URL-to-HTML-link conversion for HTTPS URLs
src/node/interfaces.cpp Preserves consensusrules setting during resetSettings() and adds chainparamsbase.h include
test/functional/mining_mainnet.py Adds -consensusrules=rdts to mainnet test args
test/functional/rpc_validateaddress.py Adds -consensusrules=rdts to mainnet test args

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@luke-jr luke-jr force-pushed the rdts_consent_prompt branch from de3ef29 to bc826d7 Compare March 27, 2026 15:20
@luke-jr luke-jr added this to the 29.3 (2nd) milestone Apr 3, 2026
luke-jr added a commit that referenced this pull request Apr 15, 2026
luke-jr added a commit that referenced this pull request Apr 15, 2026
luke-jr added a commit that referenced this pull request Apr 15, 2026
luke-jr added a commit that referenced this pull request Apr 15, 2026
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.

5 participants