Skip to content

Surface events_lost, and gitignore the installer's credential backups - #34

Merged
rsantacroce merged 1 commit into
mainfrom
2026-08-06-loose-ends
Aug 6, 2026
Merged

Surface events_lost, and gitignore the installer's credential backups#34
rsantacroce merged 1 commit into
mainfrom
2026-08-06-loose-ends

Conversation

@rsantacroce

Copy link
Copy Markdown
Collaborator

Two small loose ends, both verified rather than assumed.

events_lost was a dead counter

PR #32 added it, but nothing reads it. store_get_stats() has exactly one caller — at shutdown — and that log line didn't include the field:

LOG_INFO("final stats: ... sqlite_errs=%llu", ..., stats.pg_errors);

So the counter existed and was invisible. Now it's printed, and when non-zero it also gets its own line saying what it actually means: miners are owed work the ledger has no record of.

The LOST ERROR at the moment of loss is still the primary signal — this just stops the run total being dead weight.

The installer's credential backups still weren't ignored

.gitignore has /proxy.conf, which does not match proxy.conf.bak.<timestamp> — the files the installer writes beside it on every run. They contain the bitcoind RPC password, this repo is public, and four had already accumulated in the working tree, one git add -A from being committed.

The runbook has listed a .gitignore line as "the proper fix" since that was found. This is it. Verified:

$ git check-ignore -v proxy.conf.bak.20260806-test
.gitignore:12:/proxy.conf.bak.*	proxy.conf.bak.20260806-test

make clean under -Werror.

Two loose ends.

events_lost was added in PR #32 but nothing ever read it: store_get_stats()
has exactly one caller, at shutdown, and that log line did not include the
field. The counter existed and was invisible. Print it, and when it is
non-zero say separately what it means — it is the one number there that
says miners are owed work the ledger has no record of.

The ERROR at the moment of loss remains the primary signal; this makes the
run total visible rather than dead weight.

Second: .gitignore has /proxy.conf, which does not match the
proxy.conf.bak.<timestamp> files the installer writes beside it on every
run. Those carry bitcoind RPC credentials, this repo is public, and four
had already accumulated in the working tree. The runbook has flagged the
missing .gitignore line as "the proper fix" since the incident; this is it.
@rsantacroce
rsantacroce merged commit 6ffb323 into main Aug 6, 2026
3 of 7 checks passed
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.

1 participant