Skip to content

nonevm-5256: potentially simpler fix#411

Draft
FelixFan1992 wants to merge 4 commits into
developfrom
nonevm-5256-smart
Draft

nonevm-5256: potentially simpler fix#411
FelixFan1992 wants to merge 4 commits into
developfrom
nonevm-5256-smart

Conversation

@FelixFan1992

Copy link
Copy Markdown
Collaborator

Describe your changes

..

Issue ticket number and link

..

Describe highly relevant files or code snippets that are critical in the review

..

Are there other PRs that should be merged first?

..

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the MCMS deployer contract to support reliably releasing an UpgradeCap after any number of package upgrades by introducing a stable “original publish address → cap ID (+ proof type)” mapping stored as a dynamic field on DeployerState. It also adds a one-time backfill entrypoint for legacy DeployerState objects created before this indirection existed, and expands Move tests to cover the new behaviors and regression cases.

Changes:

  • Add OriginalToCapKey/OriginalToCapRecord dynamic-field mapping written during register_upgrade_cap, and update release_upgrade_cap to resolve caps via that mapping (no longer consulting Registry).
  • Add backfill_upgrade_cap_records (gated by &OwnerCap) to migrate legacy deployer state by populating the dynamic-field mapping.
  • Expand Move tests (for both mcms and fast_mcms) to cover release success across upgrades, legacy failure cases, and backfill success/failure scenarios; regenerate Go bindings to expose the new entrypoint/types.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
contracts/mcms/mcms/sources/mcms_deployer.move Introduces stable original→cap mapping via dynamic fields; updates release logic; adds legacy backfill entrypoint.
contracts/mcms/fast_mcms/sources/mcms_deployer.move Same deployer changes mirrored for fast_mcms.
contracts/mcms/mcms/tests/mcms_deployer_test.move Refactors setup helpers and adds comprehensive tests for release/backfill/upgrade scenarios.
contracts/mcms/fast_mcms/tests/mcms_deployer_test.move Same test expansions mirrored for fast_mcms.
bindings/generated/mcms/mcms_deployer/mcms_deployer.go Regenerates bindings to include backfill_upgrade_cap_records and new structs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 5 changed files in this pull request and generated no new comments.

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