tui: the wallet-rpc binary is a path the app resolves, not a bare name #171
1 changed files with 71 additions and 0 deletions
commit
7330be1581
|
|
@ -100,6 +100,7 @@ the screen that picks the chain source:
|
|||
| `Enter` | Save the endpoint and chain source without dialling or starting anything. |
|
||||
| `chain` row + `space` | Receive-only / local `monerod` / remote daemon / in-process Cuprate. In a build without `cuprate-daemon` the row carries the `rebuild with --features cuprate-daemon` wording; the pick is still offered. |
|
||||
| `network` row + `space` | In-process network: mainnet (unvalidated) or testnet. |
|
||||
| `binary` row | The `monero-wallet-rpc` the app will spawn: the path you typed, else the copy it resolved, else the "not found" wording. `Ctrl-U` clears it back to the resolved answer. |
|
||||
|
||||
State shown: `off` / `connecting` / `syncing` / `ready` / `exited`, plus a
|
||||
chain-source label, plus `wallet locked` while a catalogue wallet is configured
|
||||
|
|
@ -130,6 +131,76 @@ generates its own RPC creds and picks its own port, and
|
|||
typed endpoint with no login is still refused (`Wallet::from_config`), and the
|
||||
screen reports both halves of a save on one line. See `docs/TUI.md`.
|
||||
|
||||
### Which `monero-wallet-rpc` the child runs
|
||||
|
||||
The spawn never guesses through `PATH` alone. `wallet_child::resolve_wallet_rpc_bin`
|
||||
looks in this order, and the F7 `binary` row prints the answer:
|
||||
|
||||
1. the path typed on the `binary` row — an explicit choice is never
|
||||
second-guessed and is not existence-checked (a wrapper script is a legitimate
|
||||
answer, and a bad path is named by the spawn error);
|
||||
2. `<directory of the onionwire executable>/monero-wallet-rpc` — where the release
|
||||
tarball puts it, so an unpacked release needs nothing configured;
|
||||
3. `<exe dir>/share/onionwire/monero-wallet-rpc` — the packaged-install layout;
|
||||
4. the first executable `monero-wallet-rpc` on `PATH`.
|
||||
|
||||
Finding nothing at any step is never reported as a path that works: the row says
|
||||
`monero-wallet-rpc not found — put it beside this binary, in share/onionwire/, or
|
||||
on PATH` (`wallet_child::NO_WALLET_RPC_MESSAGE` — the desktop twin of Android's
|
||||
constant of the same name). The empty field still stores a value
|
||||
(`default_wallet_rpc_bin`: the resolved path, else the bare name, so a save is
|
||||
never refused by the validator) and the row shows what that value actually is.
|
||||
|
||||
#### Provenance of the bundled binary
|
||||
|
||||
On the desktop the binary is **the official Monero release**, downloaded at
|
||||
release-build time. Monero's C++ tree is never built here — Android is the
|
||||
exception, because Monero ships no Android build (see
|
||||
`android/MONERO_BINARIES.md`).
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| Source | `https://downloads.getmonero.org/cli/monero-linux-x64-v0.18.5.1.tar.bz2`, `…/monero-linux-armv8-v0.18.5.1.tar.bz2` |
|
||||
| Version | `v0.18.5.1` (`Monero 'Fluorine Fermi' (v0.18.5.1-release)`) |
|
||||
| Tarball sha256 (x86_64) | `22a7dda7b0cb699fdd6b7674c3b4a4465b337cc98a54983523b759e1e7cc9958` |
|
||||
| Tarball sha256 (aarch64) | `c0caf042cb7c7b760f5ad6be188084b59352440b32990a78b8051497b9398dbc` |
|
||||
| Extracted `monero-wallet-rpc` sha256 (x86_64) | `c1e3aff7c72837e6f29045c439b772a82b5cd7324c8b831fa825a6ce2019a656`, 29 026 368 bytes |
|
||||
| Extracted `monero-wallet-rpc` sha256 (aarch64) | `75e254b8ebd94d1af4a3df1661135347ee61854efec73c197e8aca0ba7a48dbf`, 27 968 752 bytes |
|
||||
| Release assets | `monero-wallet-rpc-x86_64-unknown-linux-gnu`, `monero-wallet-rpc-aarch64-unknown-linux-gnu`, each with a `.sha256` |
|
||||
| Verified by | `.forgejo/workflows/release.yml` (both build jobs) and `scripts/build-release-local.sh` |
|
||||
|
||||
The extracted file is **not stripped** and not rewritten: its sha256 is the record
|
||||
of the bytes that ship, and stripping would make it a different file from the one
|
||||
getmonero published.
|
||||
|
||||
Every release build re-checks, in this order, inside the build container
|
||||
(`set -eux`, so a failure is the container's exit code):
|
||||
|
||||
1. `https://www.getmonero.org/downloads/hashes.txt` is fetched and the pinned
|
||||
tarball line must appear in it — the hash is confirmed against the list
|
||||
getmonero publishes, not only against the copy pinned in this repo;
|
||||
2. the downloaded tarball must match its pinned sha256;
|
||||
3. the extracted `monero-wallet-rpc` must match its pinned sha256 — this catches a
|
||||
tarball whose *contents* changed while its own hash still looked plausible;
|
||||
4. a `.sha256` is written beside each asset, and the publish job refuses a
|
||||
zero-byte file. The asset allow-list in `release.yml` names all eight files
|
||||
explicitly, so a missing one fails the release instead of quietly shipping
|
||||
without it.
|
||||
|
||||
Bumping the Monero version means updating all four hashes here, the four
|
||||
`MONERO_*` env values in `.forgejo/workflows/release.yml`, and the four in
|
||||
`scripts/build-release-local.sh` in one commit.
|
||||
|
||||
The aarch64 target takes the **`armv8`** tarball: Monero publishes no
|
||||
`monero-linux-arm64-*.tar.bz2`. The binary inside is aarch64 — only the file name
|
||||
uses the other spelling.
|
||||
|
||||
Not verified: the aarch64 binary is hashed and identified with `file(1)`, but it
|
||||
is **not executed** — neither the x86_64 build host nor CI can run it. On x86_64
|
||||
the extracted binary is run once here: `monero-wallet-rpc --version` prints
|
||||
`Monero 'Fluorine Fermi' (v0.18.5.1-release)`, and `ldd` shows only
|
||||
`libm`/`libpthread`/`libc` (everything else is static).
|
||||
|
||||
## Chain source
|
||||
|
||||
You pick one. OnionWire does not pick a public remote node for you.
|
||||
|
|
|
|||
Loading…
Reference in a new issue