Skip to content

Comments

update SUI CLI to sui 1.65.2#328

Open
FelixFan1992 wants to merge 92 commits intodevelopfrom
upgrade-to-1.63
Open

update SUI CLI to sui 1.65.2#328
FelixFan1992 wants to merge 92 commits intodevelopfrom
upgrade-to-1.63

Conversation

@FelixFan1992
Copy link
Collaborator

No description provided.

@FelixFan1992 FelixFan1992 requested a review from a team as a code owner January 16, 2026 21:54
@FelixFan1992 FelixFan1992 marked this pull request as draft January 16, 2026 21:54
@github-actions
Copy link

👋 FelixFan1992, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

}
}

#[test]
Copy link
Collaborator Author

@FelixFan1992 FelixFan1992 Jan 19, 2026

Choose a reason for hiding this comment

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

currently, we can use a hack:

[published.testnet]
chain-id = "4c78adac"
published-at = "0x0000000000000000000000000000000000000000000000000000000000000000"
original-id = "0x0000000000000000000000000000000000000000000000000000000000000000"
version = 1

but this is not ideal. waiting for Sui team to release a new approach

@faisal-chainlink
Copy link
Collaborator

Seems like the primary remaining item in this PR is the insufficient gas error. Likely due to account selection in the CLI.

@faisal-chainlink
Copy link
Collaborator

faisal-chainlink commented Feb 2, 2026

@FelixFan1992 Currently all tests should pass with the exception of the upgrades via MCMS. The issue with MCMS upgrades is that we are still using the CLI the build the compiled package.

Note: I'm running the relaying and binding tests with go test ./... -v -tags=integration -count=1 -p=1 from the main directory. For the /integration-tests directory, it's the same command but needs to be run within the subdirectory since it's a separate module. This is slightly different from how CI is running them but we can handle that afterwards.

When using the --with-unpublished-dependencies, I'm seeing an "incompatible upgrade" error. However, if we use the regular publishing flow to generate the byte code of a package, we must also fill in all the addresses of the dependencies which isn't currently done.

That should be the last missing piece.


The summary is that we are now creating the Published.toml file or pub.[env].toml file whenever we want to handle a given contract deployment. We start by traversing all the deps for that contract and build their toml files one by one to enable publishing / compiling.

@faisal-chainlink
Copy link
Collaborator

Was able to get TokenPool upgrades via MCMS working. The remaining errors are the same in most test suites and are likely related to the setup of the test itself.

@faisal-chainlink faisal-chainlink marked this pull request as ready for review February 18, 2026 03:15
@faisal-chainlink
Copy link
Collaborator

Note: There is one test in the onramp integration suite that I disabled in favor of using E2E tests because I think that test is missing a couple items causing runs to be flakey. In particular, the expected event isn't being captured.

# This file contains metadata about published versions of this package
# This file is auto-generated for dependency resolution

[published.%s]
Copy link
Member

Choose a reason for hiding this comment

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

This file is a bit difficult to follow and it'll be harder to maintain over time. Let's please switch to a TOML library to handle the TOML parsing/serialization (e.g., go-toml: https://github.com/pelletier/go-toml) now that we have context on what it does 🙏


[published.testnet]
chain-id = "4c78adac"
published-at = "0x5ef4b483da6644c84aa78eae4f51a9bfb1fb4554d5134ac98892e931fcbdd6bf"
Copy link
Member

Choose a reason for hiding this comment

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

Are these real testnet addresses? If not, I'd avoid committing them or the file

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this was a hack to make sure tests are passing here

we can try to remove this OR remove those test cases.

treasury = "_"
mcms = "_"
mcms_owner = "_"
# [addresses]
Copy link
Member

Choose a reason for hiding this comment

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

We can clean all these commented part


// UpdatePublishedTOMLForUpgrade updates an existing Published.toml file for a package upgrade.
// This updates the published-at address and increments the version.
func UpdatePublishedTOMLForUpgrade(packageDir, environment, chainID, newPublishedAt, originalID string, newVersion int, upgradeCap string) error {
Copy link
Member

Choose a reason for hiding this comment

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

Are UpdatePublishedTOMLForUpgrade, RemovePublishedTOML, WriteEphemeralPubFile and removePublishedEntry used? If not, we can remove them

if !isZeroAddress(mcmsAddr) {
mcmsDir := filepath.Join(dstRoot, "mcms", "mcms")
if err := managePackage(mcmsDir, 1, rpcURL, env, mcmsAddr, mcmsAddr); err != nil {
if err := managePackage(mcmsDir, 1, rpcURL, env, mcmsAddr, mcmsAddr, pubfilePath); err != nil {
Copy link
Member

Choose a reason for hiding this comment

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

originalPkgId and latestPkgId seem to be always the same for every contract. I can't recall why we had it different. Could we just unify them?

Copy link
Collaborator

Choose a reason for hiding this comment

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

We can probably unify those. I think we have a test for an upgrade to an already upgraded package in please. IIRC that might have been the reason we had it there but not entirely sure.

@FelixFan1992 FelixFan1992 changed the title update SUI CLI to sui 1.63.3 update SUI CLI to sui 1.65.2 Feb 18, 2026
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