Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Rename snapshot.tar.bz2 to snapshot-<slot>-<hash>.tar.bz2 #8482

Merged
merged 4 commits into from
Feb 27, 2020

Conversation

mvines
Copy link
Contributor

@mvines mvines commented Feb 26, 2020

Fetching snapshot.tar.bz2 over RPC doesn't allow the caller to be explicit about the snapshot hash they want to fetch. This was a problem for TdS where nodes were advertising newer snapshots over gossip but then serving older snapshots over RPC.

Now snapshot archives are stored on disk as snapshot-<slot>-<hash>.tar.bz2 and referenced over RPC in the same way. The two latest snapshot-<slot>-<hash>.tar.bz2 files are now stored, and as an added bonus if the desired snapshot-<slot>-<hash>.tar.bz2 is already present on disk then a validator at boot will no longer needlessly re-download it.

Fixes #8168

This PR also works towards #8432 but does not yet fully resolve it, as a node could still respond to the request for a snapshot for slot X with a snapshot for slot Y.

@mvines mvines requested a review from sakridge February 26, 2020 21:31
@mvines mvines force-pushed the fe branch 3 times, most recently from 488e138 to a60dbf9 Compare February 26, 2020 22:20
@mvines mvines added the work in progress This isn't quite right yet label Feb 26, 2020
@mvines
Copy link
Contributor Author

mvines commented Feb 26, 2020

ci/localnet-sanity.sh is failing, will get that fixed up later today....

@codecov
Copy link

codecov bot commented Feb 27, 2020

Codecov Report

❗ No coverage uploaded for pull request base (master@5f766cd). Click here to learn what that means.
The diff coverage is 51.7%.

@@           Coverage Diff            @@
##             master   #8482   +/-   ##
========================================
  Coverage          ?   80.3%           
========================================
  Files             ?     256           
  Lines             ?   56548           
  Branches          ?       0           
========================================
  Hits              ?   45410           
  Misses            ?   11138           
  Partials          ?       0

@mvines mvines removed the work in progress This isn't quite right yet label Feb 27, 2020
@shivesh1999
Copy link

Hello @mvines, slot of my RPC node is behind the cluster and difference is increasing with time, as you mention the name change in snapshot can solve the issue, but i am not able to see any snapshot file in my repo. I have a snapshot directory which is empty. can you help me with what should be done next to solve the issue in #8406.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The number of accounts/ files in TdS and SLP snapshots is too high
2 participants