sui
sui copied to clipboard
move: automated address mgmt for pkg upgrades
Description
This PR adds automated address management support for sui client upgrade. I'm building this out iteratively so that it's easier to reason about and ensure backwards-compatibility during the transition when a package does not yet have info tracking in Move.lock (i.e., supporting package publish will come next).
High-level:
-
If a package contains a
Move.lockthat contains info to support a package upgrade, then that is used, and a user does not have to (nor should they) maintain apublished-ataddress in theirMove.toml. -
If a package does not have any
Move.lockinformation to support a package upgrade, we will still fallback toMove.tomlas we do today. Nothing changes. -
If a package has both a
Move.lockandMove.toml, then theMove.lockwill be used (the user is free to deletepublished-atin theirMove.toml). Caveat: If a published address is in both of these files, they must be the same (we will raise aConflicterror message otherwise). -
Note after this PR it is still required to set
[addresses]to0x0inMove.toml. This requirement will be removed afterpublishsupport is added (which also requires setting to0x0still). I didn't want to meddle with that logic all at once.
Test plan
How did you test the new or updated feature?
We cover three cases:
- Upgrade with
Move.tomlonly (existing package upgrade test) - Upgrade with
Move.lockonly (extension of existing package management test) - Upgrade with
Move.lockandMove.tomlwith conflicting addresses error condition (new test)
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:
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 26, 2024 11:38pm |
3 Ignored Deployments
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| multisig-toolkit | ⬜️ Ignored (Inspect) | Visit Preview | May 26, 2024 11:38pm | |
| sui-kiosk | ⬜️ Ignored (Inspect) | Visit Preview | May 26, 2024 11:38pm | |
| sui-typescript-docs | ⬜️ Ignored (Inspect) | Visit Preview | May 26, 2024 11:38pm |
thanks for your enthusiasm @stefan-mysten! There is a snag and I need to update some things in this PR, but we are indeed close!!
thanks for your enthusiasm @stefan-mysten! There is a snag and I need to update some things in this PR, but we are indeed close!!
Cool, let me know when that's fixed and I will get a review in!