Skip to content

fix(node-lib): reuse existing fileStore in snapshot sync instead of recreating#22375

Open
danielntmd wants to merge 1 commit intomerge-train/spartanfrom
danielntmd/a-726-reuse-filestore-in-snapshot-sync
Open

fix(node-lib): reuse existing fileStore in snapshot sync instead of recreating#22375
danielntmd wants to merge 1 commit intomerge-train/spartanfrom
danielntmd/a-726-reuse-filestore-in-snapshot-sync

Conversation

@danielntmd
Copy link
Copy Markdown
Contributor

Summary

snapshotSync accepted a URL string and created a new ReadOnlyFileStore internally, discarding the instance already created by the caller. This resulted in redundant object instantiation during snapshot downloads.

Changes

  • Changed snapshotSync to accept a fileStore: ReadOnlyFileStore instead of snapshotsUrl: string, removing the redundant createReadOnlyFileStore call inside the function.
  • Updated trySnapshotSync to pass the pre-created fileStore from each snapshot candidate.
  • Updated downloadEpochProvingJob to pass its already-created fileStore through to snapshotSync.

…ecreating

snapshotSync received a URL string and created a new ReadOnlyFileStore
internally, discarding the one already created by the caller. Changed
the function to accept a fileStore directly, so both trySnapshotSync
and downloadEpochProvingJob pass their pre-created instances through.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@PhilWindle PhilWindle enabled auto-merge (squash) April 8, 2026 09:44
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.

2 participants