Skip to content

[Chore] Sui gRPC client migration#1028

Merged
faisal-chainlink merged 20 commits into
mainfrom
chore/sui-grpc-client-migration
Jun 12, 2026
Merged

[Chore] Sui gRPC client migration#1028
faisal-chainlink merged 20 commits into
mainfrom
chore/sui-grpc-client-migration

Conversation

@faisal-chainlink

@faisal-chainlink faisal-chainlink commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

This PR includes the following changes:

  • Updates the Sui SDK references to correspond to the gRPC migration changes in chainlink-sui. This primarily includes dropping the ISuiAPI reference (old version of the Sui SDK) in favor of using a client interface exported by chainlink-sui/relayer/client.
  • Update the mocked interface for Sui in this repo.
  • General lint and deps version bumps (e.g., MCMS dep).

@changeset-bot

changeset-bot Bot commented Jun 4, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 0865474

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@FelixFan1992

Copy link
Copy Markdown
Contributor

can you fix the tests? and we will need a changeset for a new version.

@faisal-chainlink

Copy link
Copy Markdown
Contributor Author

can you fix the tests? and we will need a changeset for a new version.

Rebasing from main resolved the test issues; there was an unrelated blocker.

@faisal-chainlink faisal-chainlink force-pushed the chore/sui-grpc-client-migration branch from adc8557 to d2a5c25 Compare June 11, 2026 16:15
@faisal-chainlink faisal-chainlink marked this pull request as ready for review June 11, 2026 16:20
@faisal-chainlink faisal-chainlink requested a review from a team as a code owner June 11, 2026 16:20
Copilot AI review requested due to automatic review settings June 11, 2026 16:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR migrates the Sui integration from the block-vision HTTP RPC client interface to the chainlink-sui gRPC-backed PTB client, updating providers, adapters, and tests to use the new client and generating new mocks for the updated interfaces.

Changes:

  • Switch Sui Chain.Client and providers to use chainlink-sui/relayer/client (SuiPTBClient) and add a helper to derive a gRPC target from an HTTP RPC URL.
  • Update MCMS chain-access adapter and Sui tests to work with the new client interfaces.
  • Regenerate Sui mocks via mockery and update Go module dependencies accordingly.

Reviewed changes

Copilot reviewed 10 out of 15 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
go.mod Adds go-cache, bumps/adjusts deps for the new Sui client + related modules.
go.sum Updates checksums for dependency changes.
datastore/catalog/remote/main_test.go Adjusts catalog testcontainer setup/cleanup usage.
chain/sui/sui_chain.go Changes Sui chain client type to the new PTB client.
chain/sui/sui_chain_test.go Updates balance read test to use the new PTB client API/return types.
chain/sui/provider/rpc_provider.go Creates the PTB client (gRPC) instead of the old HTTP RPC client.
chain/sui/provider/ctf_provider.go Creates the PTB client for CTF-based Sui nodes.
chain/sui/client.go Adds NewPTBClientFromNodeURL + URL→gRPC-target conversion helper.
chain/mcms/adapters/chain_access.go Updates SuiClient return type to BindingsClient.
chain/mcms/adapters/chain_access_test.go Updates tests to use the new Sui mocks (and removes one assertion).
chain/sui/mocks/sui_signer.go New generated mock for Sui signer.
chain/sui/mocks/sui_ptb_client.go New generated mock for the PTB client (adds go-cache dep).
chain/sui/mocks/bindings_client.go New generated mock for bindings client interface.
.mockery.yml Updates mockery targets from block-vision interfaces to chainlink-sui interfaces.
Files not reviewed (3)
  • chain/sui/mocks/bindings_client.go: Language not supported
  • chain/sui/mocks/sui_ptb_client.go: Language not supported
  • chain/sui/mocks/sui_signer.go: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread datastore/catalog/remote/main_test.go Outdated
Comment thread chain/mcms/adapters/chain_access_test.go
Comment thread chain/sui/client.go
Comment thread chain/sui/client.go
faisal-chainlink and others added 2 commits June 11, 2026 20:34
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 11, 2026 16:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 11 out of 16 changed files in this pull request and generated 3 comments.

Files not reviewed (3)
  • chain/sui/mocks/bindings_client.go: Language not supported
  • chain/sui/mocks/sui_ptb_client.go: Language not supported
  • chain/sui/mocks/sui_signer.go: Language not supported

Comment thread chain/sui/client.go
Comment thread chain/sui/provider/rpc_provider.go
Comment thread chain/mcms/adapters/chain_access_test.go
@@ -223,7 +224,11 @@ func (p *CTFChainProvider) startContainer(
url = result.url
fauceturl = fmt.Sprintf("http://%s:%s", "127.0.0.1", result.faucetPort)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

will this kind of faucet URL still work after RPC shuts down?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

the faucet runs as a separate service which isn't the same as the RPC node, they don't mention it in their migration guide: https://sdk.mystenlabs.com/sui/migrations/sui-2.0

Copilot AI review requested due to automatic review settings June 12, 2026 13:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 11 out of 16 changed files in this pull request and generated 1 comment.

Files not reviewed (3)
  • chain/sui/mocks/bindings_client.go: Generated file
  • chain/sui/mocks/sui_ptb_client.go: Generated file
  • chain/sui/mocks/sui_signer.go: Generated file

Comment on lines 57 to 59
suiClient, ok := a.SuiClient(999)
require.False(t, ok)
require.Nil(t, suiClient)
@cl-sonarqube-production

Copy link
Copy Markdown

@faisal-chainlink faisal-chainlink added this pull request to the merge queue Jun 12, 2026
Merged via the queue into main with commit e31c0ae Jun 12, 2026
30 checks passed
@faisal-chainlink faisal-chainlink deleted the chore/sui-grpc-client-migration branch June 12, 2026 19:20
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.

4 participants