Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a governance-controlled allowlist that restricts who can publish or upgrade Move packages during the transition period. The change is framework-only (no VM or node changes) and ships through a regular framework upgrade proposal.
0x1::publish_allowliststoringPublishAllowlist { enabled, approved_addresses }at@aptos_framework.code::publish_packagechecks the publisher address before publishing. Every publish path goes through it:publish_package_txn, scripts, upgrades,large_packageschunked publish, andresource_account.object_code_deployment::publish/upgradecheck the publishing account instead of the newly created code object address, then call a new friend-onlycode::publish_package_txn_for_code_object.Behavior
enabled = falseenabled = trueRejected publishes abort with
publish_allowlist::EPUBLISHER_NOT_APPROVED(0x50006).Notes:
Governance API
All mutators require the
@aptos_frameworksigner:initialize(aptos_framework, enabled, approved_addresses)set_enabled(aptos_framework, enabled)add_approved_addresses(aptos_framework, addresses)(aborts if an address is already approved)remove_approved_addresses(aptos_framework, addresses)(aborts if an address is not approved)Views:
is_enabled(),approved_addresses(),is_publisher_allowed(address).Suggested rollout: framework upgrade, then
initialize(..., false, list), thenset_enabled(true).Test plan
publish_allowlistMove unit tests (7): lifecycle, duplicate / already-approved / not-approved errors, non-framework signer rejected, unapproved publisher rejectedaptos-frameworkMove unit test suite: 673/673 passe2e-move-tests/src/tests/publish_allowlist.rs, 4): disabled path, account publish + upgrade, object code deployment + upgrade, resource accountcode_publishing,object_code_deployment,large_package_publishingpasspublish_package/publish_package_txnpattern)🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.