Skip to content

feat(validation): refresh facts per batch and prioritize recently active accounts - #18

Open
flox1an wants to merge 3 commits into
ContextVM:masterfrom
flox1an:upstream/validation-scheduling
Open

flox1an wants to merge 3 commits into
ContextVM:masterfrom
flox1an:upstream/validation-scheduling

Conversation

@flox1an

@flox1an flox1an commented Oct 12, 2026 •

Copy link
Copy Markdown

Why

Scoring currently waits for metadata/NIP-05 refresh across the entire graph. Arbitrary ordering also leaves active users waiting behind inactive accounts.

Change

Refresh and score per batch; validate recently active accounts first without dropping anyone. Only the initial activity scan blocks: later due scans stay in the background, including after an empty scan or restart.

Verification

  • Lint/build pass; full suite: 213 pass, 5 skip, 0 fail.
  • Empty-scan regression fails before the fix and passes after. Real local relay and DuckDB smoke confirms validation proceeds while the next scan is pending.

Bun 1.3.14/macOS; temporary test SERVER_SECRET_KEY. Existing manager and duplicate-DuckDB type errors remain. Independent PR; shared helper/import additions need additive merges with relay and follow-list PRs.

Related: #15, #16, #17, #19. All branches are independent; combined suite: 221 pass, 5 skip, 0 fail.

Florian added 3 commits October 12, 2026 09:29
…ph upfront

Metadata and NIP-05 facts were refreshed for every pubkey in the graph
before the first batch was scored. With 144k pubkeys, an expired NIP-05
cache blocked scoring for hours, and because all entries were written in
the same pass they expired together again two days later.

Refresh facts right before each batch is validated instead. Remove the
bootstrap metadata tracker, which matched only the full pubkey list and
cannot apply per batch.
Look up which graph pubkeys published any event on the configured relays
in the last 30 days, at most once per sync interval, and validate them
first. Activity only decides the order: every graph pubkey is still
validated in the same run, and the run falls back to graph order if
activity cannot be fetched.

Authors are queried in batches; authors already found are dropped from
the next round so prolific posters cannot hide quieter ones behind the
relay result limit.
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