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

[framework-snaps] Update snapshot loading #21193

Merged
merged 2 commits into from
Feb 13, 2025
Merged

[framework-snaps] Update snapshot loading #21193

merged 2 commits into from
Feb 13, 2025

Conversation

tzakian
Copy link
Contributor

@tzakian tzakian commented Feb 12, 2025

Since deployed protocol versions are not guaranteed to be sequential, snapshots are not guaranteed to be sequential (e.g., 45 may exist, 46 may not, but 47 may).

Previously when trying to load a snapshot for a protocol version we would only load a snapshot if there was one for that exact version, otherwise we'd default to the newest version of the framework. This is incorrect, and @dariorussi has run into problems with this.

This updates snapshot loading so if a snapshot for a particular version v is not found, the least version greater than the given version is returned.

Test plan

CI


Release notes

Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.

For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.

  • Protocol:
  • Nodes (Validators and Full nodes):
  • gRPC:
  • JSON-RPC:
  • GraphQL:
  • CLI:
  • Rust SDK:

Since deployed protocol versions are not guaranteed to be sequential,
snapshots are not guaranteed to be sequential (e.g., 45 may exist, 46
may not, but 47 may).

Previously when trying to load a snapshot for a protocol version we
would only load a snapshot if there was one for that exact version,
otherwise we'd default to the newest version of the framework. This is
incorrect, and @Dario has run into problems with this.

This updates snapshot loading so if a snapshot for a particular version
`v` is not found, the least version greater than the given version is
returned.
@tzakian tzakian requested review from dariorussi and a team February 12, 2025 22:03
Copy link

vercel bot commented Feb 12, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sui-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 13, 2025 0:37am
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
multisig-toolkit ⬜️ Ignored (Inspect) Visit Preview Feb 13, 2025 0:37am
sui-kiosk ⬜️ Ignored (Inspect) Visit Preview Feb 13, 2025 0:37am

Copy link
Contributor

@dariorussi dariorussi left a comment

Choose a reason for hiding this comment

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

assuming all tests pass, this is fine by me as we extensively talked about offline.
Would be great if @bmwill could take a look as well

crates/sui-framework-snapshot/src/lib.rs Outdated Show resolved Hide resolved
crates/sui-framework-snapshot/src/lib.rs Outdated Show resolved Hide resolved
crates/sui-framework-snapshot/src/lib.rs Outdated Show resolved Hide resolved
crates/sui-framework-snapshot/src/lib.rs Outdated Show resolved Hide resolved
@tzakian tzakian temporarily deployed to sui-typescript-aws-kms-test-env February 13, 2025 00:36 — with GitHub Actions Inactive
@tzakian tzakian enabled auto-merge (squash) February 13, 2025 00:36
@tzakian tzakian merged commit e491c96 into main Feb 13, 2025
47 checks passed
@tzakian tzakian deleted the tzakian/snapshots-fix branch February 13, 2025 01:07
@amnn
Copy link
Contributor

amnn commented Feb 13, 2025

cc @mdgeorge4153 (no action, but changes in an area you're working in, related to our earlier discussion about gaps in the snapshot manifest)

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.

5 participants