Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ListSnapshots and LoadSnapshotChunk methods #3386

Merged
merged 11 commits into from
Jul 5, 2024

Conversation

batconjurer
Copy link
Member

Describe your changes

Addresses the third point and part of the fourth point of Issue #3307

  • Adds chunking logic to snapshots
  • Implements the ListSnapshots ABCI call
  • Implements the LoadSnapshotChunk ABCI call

Indicate on which release or other PRs this topic is based on

Built on top of #3383

Checklist before merging to draft

  • I have added a changelog
  • Git history is in acceptable state

Copy link

codecov bot commented Jun 7, 2024

Codecov Report

Attention: Patch coverage is 67.83784% with 119 lines in your changes missing coverage. Please review.

Project coverage is 53.96%. Comparing base (879a326) to head (f79afd1).
Report is 4 commits behind head on main.

Files Patch % Lines
crates/node/src/shims/abcipp_shim.rs 0.00% 56 Missing ⚠️
crates/node/src/shell/snapshots.rs 0.00% 35 Missing ⚠️
crates/node/src/storage/rocksdb.rs 94.80% 12 Missing ⚠️
crates/node/src/shims/abcipp_shim_types.rs 0.00% 6 Missing ⚠️
crates/node/src/lib.rs 0.00% 5 Missing ⚠️
crates/storage/src/db.rs 0.00% 3 Missing ⚠️
crates/node/src/shell/mod.rs 91.30% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3386      +/-   ##
==========================================
+ Coverage   53.92%   53.96%   +0.03%     
==========================================
  Files         317      318       +1     
  Lines      107575   107912     +337     
==========================================
+ Hits        58011    58230     +219     
- Misses      49564    49682     +118     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

tzemanovic
tzemanovic previously approved these changes Jun 7, 2024
tzemanovic
tzemanovic previously approved these changes Jun 10, 2024
sug0
sug0 previously approved these changes Jun 11, 2024
let chunk_start = if chunk == 0 {
0usize
} else {
let prev = checked!(usize::try_from(chunk).unwrap() - 1).unwrap();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should be careful with these checked arithmetic unwraps. in theory cometbft won't provide bogus values, but they could crash the ledger

batconjurer and others added 3 commits June 12, 2024 10:01
Co-authored-by: Tiago Carvalho <sugoiuguu@tfwno.gf>
Co-authored-by: Tiago Carvalho <sugoiuguu@tfwno.gf>
@batconjurer batconjurer dismissed stale reviews from sug0 and tzemanovic via dbf48a2 June 12, 2024 08:26
@batconjurer batconjurer force-pushed the bat/feat/list-and-offer-snapshots branch from b35b659 to dbf48a2 Compare June 12, 2024 08:26
@batconjurer batconjurer force-pushed the bat/feat/list-and-offer-snapshots branch from dbf48a2 to f79afd1 Compare June 13, 2024 08:29
brentstone added a commit that referenced this pull request Jun 28, 2024
* bat/feat/list-and-offer-snapshots:
  rebasing
  tinies
  Added changelog
brentstone added a commit that referenced this pull request Jul 4, 2024
* origin/bat/feat/list-and-offer-snapshots:
  rebasing
  tinies
  Added changelog
@brentstone brentstone merged commit 46308cb into main Jul 5, 2024
17 of 19 checks passed
@brentstone brentstone deleted the bat/feat/list-and-offer-snapshots branch July 5, 2024 21:16
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.

4 participants