Skip to content

core: build Welcome text from Core's Intro strings - #307

Closed
BenWestgate wants to merge 2 commits into
207-authenticated-pruning-datafrom
core-welcome-from-source
Closed

BenWestgate wants to merge 2 commits into
207-authenticated-pruning-datafrom
core-welcome-from-source

Conversation

@BenWestgate

@BenWestgate BenWestgate commented Oct 2, 2026 •

Copy link
Copy Markdown
Owner

Stacked on #224, which downloads the Bitcoin Core release source and authenticates it against the signed SHA256SUMS.

The first-install Welcome dialog repeats Bitcoin Core's own first-run Intro dialog, but as a hand-kept copy. This builds it from Core's strings in that authenticated source instead, so it follows the release CipherStick installs.

What changes

  • install-core extracts src/qt/forms/intro.ui and src/qt/intro.cpp from the verified tarball, next to the files core: Authenticate pruning metadata #224 already extracts.
  • New core-welcome-text reads Core's Intro strings, fills in Core's placeholders (client name, sizes, 2009), and keeps CipherStick's wording in three places:
    • "When you click OK, Bitcoin Core will begin to download" becomes "Bitcoin Core has begun to download";
    • "in this directory" becomes "in your Persistent Storage";
    • "If you have chosen to limit block chain storage (pruning)," becomes "CipherStick has chosen to limit block chain storage (pruning) to N GB (sufficient to restore backups N days old),".
  • Every paragraph is kept; the text is not shortened. With today's Core strings the generated dialog is identical to the built-in one.
  • Fallback: if a file is missing or any string was reworded upstream, the helper prints nothing and install-core shows its existing built-in text unchanged.

Resulting text (pruned)

Welcome to Bitcoin Core.

Bitcoin Core will download and store a copy of the Bitcoin block chain. Approximately 16 GB of data will be stored in your Persistent Storage.

Bitcoin Core has begun to download and process the full Bitcoin block chain (897 GB) starting with the earliest transactions in 2009 when Bitcoin initially launched.

This initial synchronisation is very demanding, and may expose hardware problems with your computer that had previously gone unnoticed. Each time you run Bitcoin Core, it will continue downloading where it left off.

CipherStick has chosen to limit block chain storage (pruning) to 2 GB (sufficient to restore backups 6 days old), the historical data must still be downloaded and processed, but will be deleted afterward to keep your disk usage low.

Not included: translations. Core's .ts files are only partly translated, which would give a mixed-language dialog.

Testing

  • tests/core-welcome-text.sh (new) passes. It uses small excerpts of Core's Intro strings as fixtures and covers pruned and unpruned text, singular "1 day", reworded upstream strings, missing files and bad input.
  • Same output from Core's intro.ui/intro.cpp at master, v28.0 and v26.0.
  • Extraction paths checked against the real bitcoin-28.0.tar.gz, verified with its SHA256SUMS.
  • shellcheck with CI's flags and bash -n are clean.

Refs #302

🤖 Generated with Claude Code

https://claude.ai/code/session_01LvEHMDeHvYQYDEkpJn95X8

The first-install Welcome dialog repeats Bitcoin Core's own first-run
Intro dialog, but as a hand-kept copy that can drift from the Core
release CipherStick installs.

Read those strings from intro.ui and intro.cpp in the release source
that is already authenticated against the signed SHA256SUMS, fill in
Core's placeholders, and adapt only the two phrases that differ on
Tails: the data stays in Persistent Storage, and CipherStick chooses
the prune target. Every paragraph is kept.

If a file is missing or any string has been reworded upstream,
core-welcome-text prints nothing and install-core shows its existing
built-in text, so a Core upgrade cannot produce a broken dialog.

Refs #302
@chatgpt-codex-connector

This comment has been minimized.

Copy link
Copy Markdown
Owner Author

github-advanced-security fails here because of a repository setting, not because of this change. It fails the same way on every open PR, including ones that touch none of these files, and the run reports no title, summary or findings. Nothing in this PR can fix it, so I'm ignoring it as instructed.


Generated by Claude Code

Core's Intro phrases this sentence as "When you click OK, Bitcoin
Core will begin to download". Keep CipherStick's existing "has begun
to download" wording instead, so the generated dialog reads exactly
like the built-in one, and fall back to the built-in text if Core
rewords that sentence.
@BenWestgate
BenWestgate force-pushed the core-welcome-from-source branch from 92ec061 to ab9b3f7 Compare October 2, 2026 08:47
@BenWestgate

Copy link
Copy Markdown
Owner Author

cACK

@BenWestgate

Copy link
Copy Markdown
Owner Author

aNACK, this should not add LOC of to the project to grab the Core text. Prefer our own dialog and not building it from Core if it can't be done in fewer normal length readable LOC than presently.

@BenWestgate
BenWestgate marked this pull request as draft October 2, 2026 08:59

Copy link
Copy Markdown
Owner Author

Understood. It can't be done in fewer lines than now.

The built-in text is about 10 lines in install-core. Building it from Core needs, at minimum:

  • extracting intro.ui and intro.cpp from the tarball;
  • one lookup per string (six of them);
  • the three wording swaps CipherStick needs;
  • a fallback to the built-in text, which has to stay anyway.

Even trimmed to the bone that's more lines than the text it replaces. This PR adds about 70 lines plus a test.

Closing this in favour of keeping CipherStick's own dialog. #301 already does that and only adds the width fix.


Generated by Claude Code

@BenWestgate BenWestgate closed this Oct 2, 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.

2 participants