Prompt user after upgrading to RDTS-enabled version#256
Conversation
9cb51e9 to
c6ac662
Compare
|
Concept ACK; it's very important to get explicit agreement from users regarding consensus changes. |
| } else { | ||
| setting = CONSENSUSRULES_REQUIRED; | ||
| } | ||
| }); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
WriteSettingsFile itself logs already?
dcaa85a to
197b098
Compare
There was a problem hiding this comment.
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()ininit.cppthat checks forconsensusrules=rdtsconfig, prompts GUI users interactively, and persists consent tosettings.json - Added rich-text URL linkification to all GUI
ThreadSafeMessageBox/ThreadSafeQuestionmessages using a new regex-basedMakeHtmlLinkoverload, 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-consensusrulesargument 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.
de3ef29 to
bc826d7
Compare
Github-Pull: #256 Rebased-From: bc826d784998414563ece8e51078599ae66637fd
ec6aefa to
0acc0bc
Compare
0acc0bc to
d476b43
Compare
There was a problem hiding this comment.
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.
…ules=rdts missing GUI fallback to RUNTIME_CHECK requires migrating g_rdts_consent from constexpr in init.cpp to variable in kernel/chainparams
d476b43 to
ff453e5
Compare
ff453e5 to
28187c4
Compare
Require a CMake define to express RDTS_CONSENT as one of:
consensusrules=rdtsin configconsensusrules=rdtsmissing from configIn both RUNTIME_* cases, gives a brief explanation and lets the GUI user consent on the spot.
Intended to only be merged together with #238