-
Notifications
You must be signed in to change notification settings - Fork 94
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
Support freeze package upgrading #1808
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
object::transfer_extend(package, tx_context::sender()); | ||
// TODO: should we transfer the Package object to tx sender or package id address? | ||
create_package(module_object, package_id, tx_context::sender()); | ||
is_upgrade = false; | ||
}; | ||
let package = borrow_mut_package(module_object, package_id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check if the Package
is frozen and abort the transaction with an error code from the module_store.
if (!exists_package(module_object, package_id)) { | ||
let package = object::add_object_field_with_id(module_object, package_id, Package {}); | ||
object::transfer_extend(package, tx_context::sender()); | ||
// TODO: should we transfer the Package object to tx sender or package id address? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The package id address must equal the tx sender?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not always the same. For example, sequencer publish the framework modules, the tx_sender should be sequencer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The sequencer can only upgrade the framework modules and can not publish a new package with the framework address.
Summary
Part of #704
Add Upgrade policy of package, and support freezeing package.