-
Notifications
You must be signed in to change notification settings - Fork 11.5k
[3/n][object runtime type tags] Add type tags to object runtime update adapter to handle them #22092
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Skipped Deployments
|
@@ -910,6 +929,13 @@ mod checked { | |||
written_objects.insert(id, object); | |||
} | |||
|
|||
for package in new_packages { |
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 got moved down as we need to use new_package
up above when loading the type. This shouldn't have any effect, but double check me 🙏🏻
protocol_config: &ProtocolConfig, | ||
ty: Result<Type, ExecutionError>, | ||
) -> Result<Type, ExecutionError> { | ||
if ty.is_err() && !protocol_config.type_tags_in_object_runtime() { |
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 should never happen, but just to be paranoid, panic in case it does and we're before this feature is enabled
// they were published in the current transaction). Note that this needs to load `MovePackage`s and | ||
// not `MovePackageObject`s. | ||
pub trait PackageStore { | ||
fn get_package(&self, id: &ObjectID) -> SuiResult<Option<Rc<MovePackage>>>; |
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 will be used in future PRs as well. This will be quite useful for e.g., caching layers and a lot more ;)
6ea7e45
to
34db4dc
Compare
0f6c369
to
6e2ed2f
Compare
34db4dc
to
f229416
Compare
f229416
to
4da3d3b
Compare
external-crates/move/crates/move-vm-runtime/src/native_functions.rs
Outdated
Show resolved
Hide resolved
external-crates/move/crates/move-vm-runtime/src/native_functions.rs
Outdated
Show resolved
Hide resolved
sui-execution/latest/sui-adapter/src/programmable_transactions/context.rs
Show resolved
Hide resolved
4da3d3b
to
f454c3a
Compare
…e adapter to handle them.
f454c3a
to
2053106
Compare
2053106
to
9b50333
Compare
Description
This updates the object runtime to only hold
TypeTag
s (orMoveObjecType
s where appropriate) instead of VM runtimeType
s.It's generally a pretty straightforward change, however there are a couple places worth calling out specifically and I've done so in-line.
Test plan
CI + adding new tests to make sure type tags coming from the object runtime are correctly resolved in newly-published packages.
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.