fix(lore-0521): the seed writes signers only for accounts newer than ours - #568
Merged
Merged
Conversation
…ours Pass 4 of snapshot-seed emitted every live account on every run. Right before the live signers writer existed, wrong since it deployed (2026-08-24): the second production pass re-emitted 10,872,072 rows identical to what we held, so its summary line was a constant. The pass is now its own module, `snapshot::entry_state`, beside the balances, claimable and pools passes task 0210 split out. It reads our newest `last_updated_ledger` per account (sliced on account_id, RMT duplicates grouped) and writes a row only when the snapshot's entry is newer — `pools::need`, the rule the classic-pool pass already applies to its snapshots. The summary reports new, changed and unchanged; they sum to the live accounts. Replaces #446, whose gate was built on the seed.rs layout 0210 changed; the logic is the same, and #446's production dry run (0 written, 10,909,433 unchanged at checkpoint 64,237,951) is the expectation for a re-run.
karolko9
added a commit
that referenced
this pull request
Sep 30, 2026
… 11,004,932 signers rows written
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.
Logic, ops tool (
backfill-runner snapshot-seed) — task 0521. The seed writes signers only for accounts newer than ours. Replaces #446.Why
Pass 4 of
snapshot-seedemitted every live account intoaccount_entry_stateon every run. That was right before the live signers writer existed and wrong since it deployed (2026-08-24): the second production pass re-emitted 10,872,072 rows identical to what we held. The data was never at risk (same version, RMT collapses them), but the summary line was a constant and could not show the live writer stopping.#446 fixed this on the old
seed.rslayout; task 0210 has since split the seed passes into modules, so the gate is rebuilt on the new structure.What changes
snapshot/entry_state.rs(new, besidebalances/claimable/pools): reads our newestlast_updated_ledgerper account (sliced onaccount_id, RMT duplicates grouped) and writes a row only when the snapshot's entry is newer —pools::need, the rule the classic-pool pass already applies.seed.rs: pass 4 calls the module (−15 lines);summary.txtreportsaccount_entry_state N (a new, b changed; c unchanged), the three summing to the live accounts.docs/backfills.md: how to read that line — a later pass that writes millions again means the live signers writer stopped stamping.Verified
backfill-runnertests: 84 pass, incl. newonly_accounts_newer_than_ours_are_written(new, behind, same version, ours ahead, merged-away account); with the gate removed it fails ([1, 2, 3, 4]written instead of[1, 2])-D warnings, fmt cleanaccount_entry_state 0 (0 new, 0 changed; 11004932 unchanged)— the three sum to the snapshot's 11,004,932 live accounts exactly; we hold 11,130,680. Every other correction as expected: 17 balance ghosts (16 classic, 1 native, 0.0061841 XLM), no stubs, no unresolved references.divergent SAME ledger16,511 (18,363 on 2026-09-02) — task 0514, not touched here.Deploy
None — an operator tool run by hand.
Refs task 0521.