Skip to content

Prompt user after upgrading to RDTS-enabled version#256

Closed
luke-jr wants to merge 10 commits into
bitcoinknots:__base_29_rdts_consent_promptfrom
luke-jr:rdts_consent_prompt
Closed

Prompt user after upgrading to RDTS-enabled version#256
luke-jr wants to merge 10 commits into
bitcoinknots:__base_29_rdts_consent_promptfrom
luke-jr:rdts_consent_prompt

Conversation

@luke-jr

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

Copy link
Copy Markdown
Collaborator

Require a CMake define to express RDTS_CONSENT as one of:

  • IMPLICIT: No runtime action needed to confirm again
  • RUNTIME_CHECK: Fail to start without consensusrules=rdts in config
  • RUNTIME_WARN: Warn at startup and ever hour if consensusrules=rdts missing from config

In both RUNTIME_* cases, gives a brief explanation and lets the GUI user consent on the spot.

Intended to only be merged together with #238

Screenshot_20260502_021354

@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

jlopp commented Feb 10, 2026

Copy link
Copy Markdown

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 2 times, most recently from dcaa85a to 197b098 Compare February 19, 2026 00:57
@luke-jr
luke-jr requested a review from Copilot March 9, 2026 21:21

Copilot AI left a comment

Copy link
Copy Markdown

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 3 times, most recently 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
Github-Pull: #256
Rebased-From: bc826d784998414563ece8e51078599ae66637fd
@luke-jr
luke-jr changed the base branch from 29.x-knots to __base_29_rdts_consent_prompt May 2, 2026 02:01
@luke-jr
luke-jr force-pushed the rdts_consent_prompt branch 2 times, most recently from ec6aefa to 0acc0bc Compare May 2, 2026 06:13
@luke-jr
luke-jr requested a review from Copilot May 2, 2026 06:17
@luke-jr
luke-jr force-pushed the rdts_consent_prompt branch from 0acc0bc to d476b43 Compare May 2, 2026 06:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 20 out of 20 changed files in this pull request and generated 3 comments.


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

Comment thread src/init.cpp
Comment thread src/qt/guiutil.cpp Outdated
Comment thread src/init.cpp
luke-jr added 3 commits May 2, 2026 22:50
…ules=rdts missing

GUI fallback to RUNTIME_CHECK requires migrating g_rdts_consent from constexpr in init.cpp to variable in kernel/chainparams
@luke-jr
luke-jr force-pushed the rdts_consent_prompt branch from d476b43 to ff453e5 Compare May 2, 2026 22:51
@luke-jr
luke-jr force-pushed the rdts_consent_prompt branch from ff453e5 to 28187c4 Compare May 3, 2026 04:31
luke-jr added a commit that referenced this pull request May 3, 2026
luke-jr added a commit that referenced this pull request May 3, 2026
luke-jr added a commit that referenced this pull request May 3, 2026
luke-jr added a commit that referenced this pull request May 3, 2026
luke-jr added a commit that referenced this pull request May 3, 2026
luke-jr added a commit that referenced this pull request May 3, 2026
luke-jr added a commit that referenced this pull request May 3, 2026
…ules=rdts missing

GUI fallback to RUNTIME_CHECK requires migrating g_rdts_consent from constexpr in init.cpp to variable in kernel/chainparams

Github-Pull: #256
Rebased-From: 3c00bbc
luke-jr added a commit that referenced this pull request May 3, 2026
…ly disable RDTS enforcement

Github-Pull: #256
Rebased-From: 82bf470
luke-jr added a commit that referenced this pull request May 3, 2026
luke-jr added a commit that referenced this pull request May 3, 2026
@luke-jr luke-jr added the merged label May 11, 2026
@luke-jr luke-jr closed this May 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants