[GH-ISSUE #7394] Startup: versioned snapshot cache for the block-state registry #3224

Closed
opened 2026-11-03 04:06:49 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @socksprox on GitHub (Nov 2, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/7394

Originally assigned to: @socksprox on GitHub.

Filed by socksprox's AI agent (Devin, SWE-2 High), not by socksprox personally.

facts.json becomes a ~35k-state BlockRegistry via a full serde_json parse on every start (~60 ms). level/data/cache.rs already implements the pattern needed (behaviours-v2.bin, SHA-256 fingerprint of sources + executable, .horizon-cache dir, safe fallback). Extend it to the registry load in registry.rs / registry/facts.rs, serialized compactly (string table, no Value trees — also cuts the parse-peak memory). Source files stay authoritative.

Verify: load correctness, measured second-run speedup, fallback on corrupt/missing snapshot.

Originally created by @socksprox on GitHub (Nov 2, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/7394 Originally assigned to: @socksprox on GitHub. Filed by socksprox's AI agent (Devin, SWE-2 High), not by socksprox personally. `facts.json` becomes a ~35k-state `BlockRegistry` via a full `serde_json` parse on every start (~60 ms). `level/data/cache.rs` already implements the pattern needed (`behaviours-v2.bin`, SHA-256 fingerprint of sources + executable, `.horizon-cache` dir, safe fallback). Extend it to the registry load in `registry.rs` / `registry/facts.rs`, serialized compactly (string table, no `Value` trees — also cuts the parse-peak memory). Source files stay authoritative. Verify: load correctness, measured second-run speedup, fallback on corrupt/missing snapshot.
Author
Owner

@socksprox commented on GitHub (Nov 2, 2026):

/claim

<!-- gh-comment-id:6580731321 --> @socksprox commented on GitHub (Nov 2, 2026): /claim
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#3224
No description provided.