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

[vm-rewrite] Rootless linkage #20916

Open
wants to merge 3 commits into
base: cgswords/vm-tracing
Choose a base branch
from

Conversation

tzakian
Copy link
Contributor

@tzakian tzakian commented Jan 17, 2025

Description

Two commits:

  • Lower commit switches the inner HashMap for linkage to a BTreeMap (for determinism purposes/paranoia). This transformation is pretty mechanical.
  • The top commit removes the root_package from the linkage context, as in the new linkage story this does not make much sense.

Test plan

Make sure existing tests pass.


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):
  • gRPC:
  • JSON-RPC:
  • GraphQL:
  • CLI:
  • Rust SDK:

@tzakian tzakian requested a review from cgswords January 17, 2025 19:11
Copy link

vercel bot commented Jan 17, 2025

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 Jan 18, 2025 0:08am
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
multisig-toolkit ⬜️ Ignored (Inspect) Visit Preview Jan 18, 2025 0:08am
sui-kiosk ⬜️ Ignored (Inspect) Visit Preview Jan 18, 2025 0:08am

@tzakian tzakian temporarily deployed to sui-typescript-aws-kms-test-env January 17, 2025 19:11 — with GitHub Actions Inactive
@tzakian tzakian changed the title Tzakian/rootless linkage [vm-rewrite] Rootless linkage Jan 17, 2025
@@ -411,7 +411,6 @@ impl OnDiskStateView {
"Found circular dependencies during dependency generation."
);
let linkage_context = LinkageContext::new(
*package_address,
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't we need to add this to all_dependencies?

.get(&sender)
.copied()
.unwrap_or(sender),
)
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems dubious: if this package is not in the linkage, shouldn't it be an error?

Comment on lines +177 to +186
.iter()
.find_map(|(k, v)| {
if *v == self.package_id {
Some(*k)
} else {
None
}
})
.expect("address not found in linkage table")
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Copliot, nooooo!

Copy link
Contributor

@cgswords cgswords left a comment

Choose a reason for hiding this comment

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

I have a few real questions, plus a few small suggestions. LMK if you want a re-review or something later.

## Description 

Update how we handle deserialization errors so they maintain their
specificity. Also updates a bad merge.

## Test plan 

CI

---

## 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): 
- [ ] gRPC:
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
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