Skip to content

feat(governance): Store snapshot ID in TakeCanisterSnapshot proposals.#9998

Merged
daniel-wong-dfinity-org merged 7 commits intomasterfrom
store-snapshot-id-in-proposal-daniel-wong
Apr 24, 2026
Merged

feat(governance): Store snapshot ID in TakeCanisterSnapshot proposals.#9998
daniel-wong-dfinity-org merged 7 commits intomasterfrom
store-snapshot-id-in-proposal-daniel-wong

Conversation

@daniel-wong-dfinity-org
Copy link
Copy Markdown
Contributor

@daniel-wong-dfinity-org daniel-wong-dfinity-org commented Apr 23, 2026

This makes use of a field that was introduced recently: successful_value. Prior to this, there was no good way of knowing the ID of the snapshot.

Limitation: this does not work when Governance is being snapshotted. This is because snapshotting is executed asynchronously in this case; the proposal is marked as "Successful" once snapshottting is LAUNCHED, not when it has completed successfully. The reason for async is to avoid deadlock.

References

Closes NNS1-4339.

@github-actions github-actions Bot added the feat label Apr 23, 2026
@daniel-wong-dfinity-org daniel-wong-dfinity-org marked this pull request as ready for review April 23, 2026 12:23
@daniel-wong-dfinity-org daniel-wong-dfinity-org requested a review from a team as a code owner April 23, 2026 12:23
github-actions[bot]

This comment was marked as resolved.

@daniel-wong-dfinity-org daniel-wong-dfinity-org dismissed github-actions[bot]’s stale review April 23, 2026 12:27
  1. Done.
  2. Not breaking: new variant arm, and the one field that use the variant use opt.
  3. Existing proposals and neurons are fine. No backfill.
  4. Seems low risk.
Comment thread rs/nns/governance/api/src/types.rs
Comment thread rs/nns/governance/src/proposals/take_canister_snapshot.rs Outdated
Comment thread rs/nns/governance/src/pb/conversions/mod.rs Outdated
@daniel-wong-dfinity-org daniel-wong-dfinity-org force-pushed the store-snapshot-id-in-proposal-daniel-wong branch from cafb776 to 6676694 Compare April 24, 2026 09:58
…tead, the destination type is Option<api::...>.
@daniel-wong-dfinity-org daniel-wong-dfinity-org added this pull request to the merge queue Apr 24, 2026
Merged via the queue into master with commit 0108b1b Apr 24, 2026
37 checks passed
@daniel-wong-dfinity-org daniel-wong-dfinity-org deleted the store-snapshot-id-in-proposal-daniel-wong branch April 24, 2026 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants