Repository navigation
docs: make README, AGENTS.md and the Docker docs true (SNB-674) - #63
Closed
setavenger wants to merge 2 commits into
Closed
setavenger wants to merge 2 commits into
setavenger wants to merge 2 commits into
Conversation
Correct what the docs say about integration as it is now; no code changes. - README: blindbit-cli needs --end-height, takes only ip:port for the P2P node, keeps its state in ./scanner_state.json by default and has --log-level; friglet's --log-level is documented; console logs go to stdout, not stderr; the tray build needs no appindicator/rsvg packages. - HTTP /height and /subscribe do not answer while scanning is enabled, so status checks use the control socket's GetStatus or an Electrum server.version call instead of curl /height. The HTTP docs stay. - Docker: the scanner state is not in /data by default (SNB-635); the docs and the Dockerfile comment say so and give the workaround, an absolute state_file under /data. - AGENTS.md: Rust >= 1.90 (Tauri crates declare it; let-chains need 1.88), the packages a build actually needs vs. release bundling, blindbit-lib has tests, the Settings tab saves with ApplySettings, GetStatus reads a background poller, the default state file is per wallet, an HTTP bind failure panics. Past-fix narrative and repeated sections removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Use the Linux data-directory socket when XDG_RUNTIME_DIR is unset, and prefer the explicit environment override. Document the fallback paths and how to use a configured socket override. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
Merged into |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements SNB-674. Part of the friglet cleanup (SNB-661).
Docs only: README.md, AGENTS.md, docs/docker.md and a comment in the Dockerfile. No code changes. Everything describes
integrationas it is now (a9ff4d6). Facts that open PRs will change are listed at the end.What was false, and what the docs say now
README
--end-height.--p2p-node-addrwas documented ashost:port, but onlyip:portparses. The--state-filedefault was wrong: it isscanner_state.jsonin the working directory, not<config dir>/friglet/....--log-levelwas missing. The example is now the signet range from AGENTS.md.--log-leveladded to the flag table./heightand/subscribedo not answer while scanning is enabled, and that they answer only while scanning is stopped. Status checks useGetStatuson the control socket or an Electrumserver.versioncall. The HTTP API docs stay; whether to remove the API is still open (SNB-668)./databy default (SNB-635). Thecurl /heightcheck is replaced byserver.version.docs/docker.md and Dockerfile
/data(via WORKDIR). It does not: friglet rewrites the bare default name to its config-dir path, so the state goes to/home/friglet/.config/friglet/scanner_state-<network>-<id>.jsonand is lost when the container is recreated. Both now say this and give the workaround: an absolutestate_file = "/data/scanner_state.json". That line is now in the minimalconfig.toml.curl /heightcheck is replaced byserver.versionandGetStatus(over the bind-mounted socket). The caveat says the endpoints stay silent even while the daemon is caught up and waiting for blocks, not only "while a scan is actively running".AGENTS.md (432 → 421 lines)
>= 1.85→>= 1.90. friglet-tray's Tauri crates declarerust-version = "1.90", and friglet uses let-chains (1.88).release.ymladditionally installs for bundling.libxdo-devis dropped: no crate links it.serde, whichcargo test --workspaceturns on). blindbit-cli is fmt- and clippy-clean now, so only blindbit-lib is called out as not clean.ApplySettings, notSetConfig/SetScanKey./data(same as above).GetStatus,server.versionand timeout advice.Verification
Each command written or corrected was run once, with debug binaries from this branch.
blindbit-cli scan --helplists--end-height <END_HEIGHT>as required,--state-file … [default: scanner_state.json]and--log-level … [default: info].friglet scan --helplists--log-level … [default: info].--end-height:error: the following required arguments were not provided: --end-height <END_HEIGHT>.--p2p-node-addr:Error: Invalid p2p_node_addr: invalid socket address syntax.signet.oracle.setor.dev, peer152.53.151.148:38333, 274010..274060) exits 0:scanning blocks start=274010 end=274060…balance after scan total=0 BTC…scan completed successfully, in 0.8 s with the built binary. The state file holdslast_scanned_block_height: 274060, so--end-heightis inclusive. A second run logsscanner state loaded last_scanned_height=274060, thenscanning blocks start=274010 end=274060again, which is why the docs say "the given range is scanned either way".printf '"GetStatus"\n' | nc -U -w 2 friglet.sock→{"Status":{"scanning":true,"scanned_height":324759,"tip_height":324759,…}}server.versionvianc -w 2→{"jsonrpc":"2.0","id":1,"result":["Friglet","1.4"]}curl -m 10 /heightwith scanning enabled →curl: (28) Operation timed out after 10002 milliseconds with 0 bytes received"Stop"→{"height":324759}in 0.05 s. After"Start", it timed out again.xvfb-run(spawning a stub daemon) wrote 73 lines to stdout, including the forwardedfriglet-daemonlines, and 0 to stderr.state_file,docker logsshowsstate_file=/home/friglet/.config/friglet/scanner_state-signet-fe70a2fd.json, andls /datalists onlyconfig.toml friglet.log friglet.sock scan.key.state_file = "/data/scanner_state.json":state_file=/data/scanner_state.json, andscanner_state.jsonandscanner_state.birthday.jsonappear in the volume.GetStatusover the bind-mounted socket andserver.versionon the published port both answered.curl -m 5 /heighttimed out.friglet/src/main.rs:400(Failed to bind HTTP server … AddrInUse, exit 101). With the Electrum port taken:friglet exited with an error: Electrum server stopped, exit 1.cargo metadatagives the highestrust-versionin each crate's normal dependency graph. It is1.90for friglet-tray (tauri, tauri-runtime-wry, tray-icon, …) and1.85for the other crates.libssl-dev,librsvg2-dev,libayatana-appindicator3-devandpatchelf(checktestpassed).Cargo.lockhas no openssl, rsvg or xdo crate.cargo check --workspace --all-targets --all-features0 warnings;cargo clippy --no-deps -p friglet -p friglet-ipc -p friglet-tray --all-targets -- -D warningsclean;cargo fmt -p friglet -p friglet-ipc -p friglet-tray -- --checkclean;cargo test --workspace254 passed, 1 ignored, 0 failed.To update when open PRs merge
AGENTS.md:324-325says "the daemon colours it when stderr is a terminal". After friglet: colour the console log by stdout, the stream it is written to (SNB-682) #56 it is "when stdout is a terminal". Output stays on stdout before and after, so the README lines are already right.AGENTS.md:46says "tests use the gitignoredblindbit-test/dir". After blindbit-lib tests: one shared fixture module, drop duplicate tests (SNB-666) #57 no test uses it (test_support.rswritesblindbit-test-*.jsontemp files instead). Drop that clause. The--state-file blindbit-test/cli-state.jsonexample atAGENTS.md:42still works, because blindbit-cli creates the directory.deb.dependsfromtauri.conf.json.README.md:399-400says the .deb declareslibwebkit2gtk-4.1-0andlibayatana-appindicator3-1, which stays true only if the Tauri CLI adds them itself; check the .deb from friglet-tray: remove dead commands, lifecycle API and UI leftovers (SNB-667) #48's release run.control_socketconfig key.AGENTS.md:64lists onlyFRIGLET_CONTROL_SOCKET, which stays true but could name the key too.is_configured,get_setup_state,save_local_config,supervise_tick,spawn_daemon, the fake daemon'sGetConfig/SetConfig/SetScanKey/ApplySettingshandlers, …) still exists on each branch of the chain.release.ymlinstalls, notci.yml's package list.git grep).Left out
rust:1.97-slimbuilder,cargo build --release) was not built. Only the runtime stage was, with a debug binary copied in, to keep release builds off a shared disk. The builder stage is unchanged apart from the comment..cursor/skillsnot touched.Independent review follow-up: the Linux GetStatus example now selects the data-directory socket when XDG_RUNTIME_DIR is unset, and honors FRIGLET_CONTROL_SOCKET. README also names the fallback paths. The exact documented command was run against the real daemon with a temporary XDG_DATA_HOME and no XDG_RUNTIME_DIR: GetStatus answered at scanned height 300, and the daemon shut down cleanly. Runtime-directory and explicit-override path selection were checked separately. Workspace check (all targets/features, zero warnings), CI clippy, scoped fmt, and full workspace tests passed again (254 passed, 1 ignored). Independent source review cleared the final docs diff.
The first CI run for this follow-up hit the existing lifecycle fixture race (
Text file busyinspawn_failure_surfaces_captured_stderr); PR #45 addresses that race. The CI rerun passed.