Skip to content
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

[move] Split bytecode's absint into its own crate #17459

Merged
merged 4 commits into from
May 8, 2024

Conversation

tnowacki
Copy link
Contributor

@tnowacki tnowacki commented May 1, 2024

Description

  • Moved the absint and control_flow_graph modules into their own crate, move-abstract-interpreter
  • Added the crate to the execution cut. The absint module was in the bytecode verifier, so this was already versioned for the existing cuts. However control_flow_graph was in the binary format, so this version cut is new. As a result, I have just made one cut for v2 and used it for v0 and v1. I think this is a bit un-orthodox, but preserves the existing behavior just fine (which is the intention of the execution cuts)

Test plan

  • Ran the execution cut script

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.

  • Protocol:
  • Nodes (Validators and Full nodes):
  • Indexer:
  • JSON-RPC:
  • GraphQL:
  • CLI:
  • Rust SDK:

Copy link

vercel bot commented May 1, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sui-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 7, 2024 11:18pm
3 Ignored Deployments
Name Status Preview Comments Updated (UTC)
multisig-toolkit ⬜️ Ignored (Inspect) Visit Preview May 7, 2024 11:18pm
sui-kiosk ⬜️ Ignored (Inspect) Visit Preview May 7, 2024 11:18pm
sui-typescript-docs ⬜️ Ignored (Inspect) Visit Preview May 7, 2024 11:18pm

Copy link
Contributor

@dariorussi dariorussi left a comment

Choose a reason for hiding this comment

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

others should take a look but overall this is great and the direction we want to go.
I am less clear of the convenience, if any, of pointing previous versions to v2.
Also there are failures you want to fix, obviously

Copy link
Contributor

@amnn amnn left a comment

Choose a reason for hiding this comment

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

Looks good to me! The trick to re-use v2's version for v0 and v1 is a bit maverick but should work -- generally you can set-up all legacy snapshots however you like, it's just the latest snapshot that needs to be set-up in such a way that you could create a new cut from it (so it has to be uniform).

I spotted a place where we need to add a template string for the new crate, and had a question about whether we needed to tweak dependencies for legacy cuts of sui-verifier but that's it.

@@ -31,6 +31,8 @@ sui-verifier-v1 = { path = "v1/sui-verifier" }
sui-verifier-v2 = { path = "v2/sui-verifier" }
# sui-verifier-$CUT = { path = "$CUT/sui-verifier" }

move-abstract-interpreter-latest = { path = "../external-crates/move/crates/move-abstract-interpreter", package = "move-abstract-interpreter" }
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you need to put a -$CUT template here for move-abstract-interpreter.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch.. A bit strange that nothing broke without it. Maybe just that the APIs don't change in the test?

Copy link
Contributor

Choose a reason for hiding this comment

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

I suppose if we have no uses of the abstract interpreter from Sui, it won't complain? That might imply that you don't need to add it here at all (until it gets used from the Sui side).

@@ -15,6 +15,7 @@ move-core-types.workspace = true
move-vm-config.workspace = true
move-abstract-stack.workspace = true

move-abstract-interpreter = { path = "../../../external-crates/move/crates/move-abstract-interpreter" }
Copy link
Contributor

Choose a reason for hiding this comment

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

I would expect something similar in the legacy cuts, no?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Only the new/latest cuts have this crate. The previous ones have it already through the versioned bytecode verifier

@amnn
Copy link
Contributor

amnn commented May 4, 2024

The fact that the "cutting a new execution layer" job works despite us not having the CUT template for this new crate is interesting though ... maybe I'm missing something and everything's fine with how things are now?

@tnowacki tnowacki merged commit 15cb9c7 into MystenLabs:main May 8, 2024
44 checks passed
@tnowacki tnowacki deleted the vabs branch May 8, 2024 18:11
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.

3 participants