rpcconsole: display signet challenge #896
pull RandyMcMillan wants to merge 2 commits into bitcoin-core:master from bitcoincore-dev:pr/1919/916101/674094/b4aa9f5f7b1/eb918d0c31d-rpcconsole-signet-challenge changing 8 files +113 −14-
RandyMcMillan commented at 0:13 am on September 24, 2025: contributor
-
DrahtBot commented at 0:13 am on September 24, 2025: contributor
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Reviews
See the guideline for information on the review process. A summary of reviews will appear here.
Conflicts
Reviewers, this pull request conflicts with the following ones:
- #bitcoin/bitcoin/33562 (DRAFT: add a freebsd job using systemlibs by willcl-ark)
- #bitcoin/bitcoin/33514 (Clear out space on GHA jobs by willcl-ark)
- #bitcoin/bitcoin/33480 (ci: Turn CentOS config into Alpine musl config by maflcko)
- #bitcoin/bitcoin/31349 (ci: detect outbound internet traffic generated while running tests by vasild)
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
-
RandyMcMillan commented at 0:15 am on September 24, 2025: contributor
display an elided signet challenge
-
in src/qt/rpcconsole.cpp:744 in 6d15f90d04
739+ std::string challengeString = challengeToString(vChallenge); 740+ std::string challenge_start = challengeString.substr(0, 8); 741+ std::string challenge_end = challengeString.substr(challengeString.length() - 8); 742+ 743+ ui->networkName->setText( 744+ tr("Signet: (%1...%2)").arg(
luke-jr commented at 10:42 am on September 25, 2025:Might be a better way to elide the middle so that a copy/paste gets the full string?
RandyMcMillan commented at 8:42 pm on September 25, 2025:Testing a proper Qt interface for better formatting now.in src/util/strencodings.cpp:386 in 357f7d423a outdated
382@@ -383,6 +383,25 @@ std::string Capitalize(std::string str) 383 return str; 384 } 385 386+std::string ChallengeToStdString(const std::vector<uint8_t>& v)
RandyMcMillan commented at 8:49 pm on September 25, 2025:move ChallengeToStdString to src/util/strencodings.cpp for later availability in main window.in src/qt/rpcconsole.cpp:615 in a87484caef outdated
611@@ -612,22 +612,6 @@ bool RPCConsole::eventFilter(QObject* obj, QEvent *event) 612 return QWidget::eventFilter(obj, event); 613 } 614 615-std::string RPCConsole::challengeToString(const std::vector<uint8_t>& v)
RandyMcMillan commented at 8:50 pm on September 25, 2025:removed std::string RPCConsole::challengeToString(const std::vector<uint8_t>& v)
RandyMcMillan commented at 11:46 pm on September 25, 2025:squash laterRandyMcMillan commented at 8:51 pm on September 25, 2025: contributoradded “trivial challenge” support per signet implementation.
RandyMcMillan commented at 8:54 pm on September 25, 2025: contributorhandle long challenges with proper elision and text flow.
RandyMcMillan commented at 8:55 pm on September 25, 2025: contributorcommon length challenges elide and flow correctly.pablomartin4btc commented at 9:13 pm on September 25, 2025: contributorIt would be good to put the label “challenge:” in both the info tab and the title, and also differentiate between the default challenge and the custom one (specified by
-signetchallenge=
). With this in mind perhaps when there’s no custom challenge specified we don’t update the window title but only the info tab ("
Name: Signet (challenge: 512103ad…e6c452ae, default)
" or something like that).For the conversion you can use
HexStr()
instead ofChallengeToStdString()
.RandyMcMillan commented at 9:17 pm on September 25, 2025: contributorIt would be good to put the label “challenge:” in both the info tab and the title, and also differentiate between the default challenge and the custom one (specified by
-signet_challenge
). With this in mind perhaps when there’s no custom challenge specified we don’t update the window title but only the info tab ("
Name: Signet (challenge: 512103ad…e6c452ae, default)
" or something like that).For the conversion you can use
HexStr()
instead ofChallengeToStdString()
.i was thinking a long the same lines.
I will test against https://github.com/bitcoin/bitcoin/pull/29838
and make a decision - trying to avoid a conflict. :)
RandyMcMillan commented at 9:21 pm on September 25, 2025: contributoralso trying to treat the challenge as a fingerprint - avoiding clutter in the title but the rcpconsole formatting ought to look ok.RandyMcMillan force-pushed on Sep 25, 2025RandyMcMillan commented at 11:36 pm on September 25, 2025: contributorfixed typo and commit scope add Network Name with Challenge on new line per @pablomartin4btc feed back Challenge Copy&Paste-able from gui per @luke-jr feed back Detect Default signet_challenge and display “Default” Removed parenthesis in rpcconsole panel, keep in titleRandyMcMillan commented at 11:37 pm on September 25, 2025: contributortooltip displays challenge (even if obfuscated in rpcconsole)RandyMcMillan commented at 11:38 pm on September 25, 2025: contributorwhen default signet_challenge detected:RandyMcMillan commented at 11:39 pm on September 25, 2025: contributorwhen common length signet_challenge:
in src/qt/rpcconsole.h:87 in cf15f7cc3c outdated
83@@ -84,7 +84,6 @@ class RPCConsole: public QWidget 84 virtual bool eventFilter(QObject* obj, QEvent *event) override; 85 void keyPressEvent(QKeyEvent *) override; 86 void changeEvent(QEvent* e) override; 87- std::string challengeToString(const std::vector<uint8_t>& v);
RandyMcMillan commented at 11:46 pm on September 25, 2025:squash laterin src/qt/rpcconsole.cpp:61 in 5f06fbbcb2 outdated
56@@ -57,6 +57,9 @@ const int INITIAL_TRAFFIC_GRAPH_MINS = 30; 57 const QSize FONT_RANGE(4, 40); 58 const char fontSizeSettingsKey[] = "consoleFontSize"; 59 60+const std::string DEFAULT_CHALLENGE_STRING = 61+ "512103AD5E0EDAD18CB1F0FC0D28A3D4F1F3E445640337489ABB10404F2D1E086BE430210359EF5021964FE22D6F8E05B2463C9540CE96883FE3B278760F048F5189F2E6C452AE";
RandyMcMillan commented at 11:48 pm on September 25, 2025:maybe a global constant?in src/qt/rpcconsole.h:239 in 5f06fbbcb2 outdated
234+ QLabel::resizeEvent(event); 235+ recalculateElidedText(); 236+ } 237+ 238+ // Provide the full challenge when Copy&Paste 239+ QMimeData* createMimeDataFromSelection() const {
RandyMcMillan commented at 11:56 pm on September 25, 2025:the full challenge should be copy and pasted - please test cc: @luke-jr @pablomartin4btcRandyMcMillan force-pushed on Sep 26, 2025RandyMcMillan force-pushed on Sep 26, 2025RandyMcMillan commented at 4:13 pm on September 26, 2025: contributoruse HexStr() per pablomartin4btc suggestion use lower case DEFAULT_CHALLENGE_STRING for comparisonRandyMcMillan force-pushed on Sep 26, 2025RandyMcMillan force-pushed on Sep 27, 2025ci: Turn centos config into alpine musl config a7646e12c4rpcconsole:display signet_challenge 0496ce5dbeRandyMcMillan force-pushed on Sep 28, 2025RandyMcMillan commented at 4:09 pm on September 28, 2025: contributorrebase on top of gui/master
temporarily cherry-pick PR https://github.com/bitcoin/bitcoin/pull/33480 to fix an issue.
DrahtBot added the label Needs rebase on Oct 15, 2025DrahtBot commented at 11:51 am on October 15, 2025: contributor🐙 This pull request conflicts with the target branch and needs rebase.
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin-core/gui. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-10-18 14:20 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me