Skip to content

[alloy][sui-bridge] Integrate Alloy multiprovider in sui bridge#25257

Merged
0xsiddharthks merged 3 commits intomainfrom
siddharth/alloy-multiprovider
Feb 5, 2026
Merged

[alloy][sui-bridge] Integrate Alloy multiprovider in sui bridge#25257
0xsiddharthks merged 3 commits intomainfrom
siddharth/alloy-multiprovider

Conversation

@0xsiddharthks
Copy link
Copy Markdown
Contributor

@0xsiddharthks 0xsiddharthks commented Feb 3, 2026

Description

This PR builds on top of #24575 and replaces the native Alloy provider with the multiprovider implementation.

I have added the following fields to the sui bridge config:

  • eth_rpc_url (deprecated. kept for backward compatibility)
  • eth_rpc_urls
  • eth_rpc_quorum
  • eth_health_check_interval_secs

This change is backwords compatible with the existing config, but we will deprecate the eth_rpc_url field in the future once all node operators have migrated to using the new config fields.

Test plan

I have thoroughly tested the alloy-multiprovider-strategy crate via various test scripts.

Also all the CI tests are passing on the sui repo.


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): Added multi-provider Ethereum RPC support to the bridge node.

Operators can now configure multiple Ethereum RPC endpoints with quorum-based consensus for improved redundancy and fault tolerance.

New optional YAML config fields (in sui bridge config):

  • eth-rpc-urls (list of RPC URLs),
  • eth-rpc-quorum (quorum size, defaults to 1)
  • eth-health-check-interval-secs (health check interval, defaults to 300s).

The existing eth-rpc-url field continues to work for backward compatibility. When a single URL is configured, the multi-provider layer operates as a zero-overhead passthrough with no quorum, health-check, or locking machinery.

  • gRPC:
  • JSON-RPC:
  • GraphQL:
  • CLI:
  • Rust SDK:
  • Indexing Framework:

@vercel
Copy link
Copy Markdown

vercel bot commented Feb 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sui-docs Ready Ready Preview, Comment Feb 4, 2026 0:25am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
multisig-toolkit Ignored Ignored Preview Feb 4, 2026 0:25am
sui-kiosk Ignored Ignored Preview Feb 4, 2026 0:25am

Request Review

@0xsiddharthks 0xsiddharthks force-pushed the siddharth/alloy-multiprovider branch from d6e5e9d to ce66671 Compare February 4, 2026 12:21
@0xsiddharthks 0xsiddharthks temporarily deployed to sui-typescript-aws-kms-test-env February 4, 2026 12:21 — with GitHub Actions Inactive
@0xsiddharthks 0xsiddharthks marked this pull request as ready for review February 4, 2026 12:21
@0xsiddharthks 0xsiddharthks temporarily deployed to sui-typescript-aws-kms-test-env February 4, 2026 12:21 — with GitHub Actions Inactive

[dependencies]
alloy = { version = "1.1.3", features = ["rand", "sol-types", "json-rpc", "provider-ws"] }
alloy-multiprovider-strategy = { git = "https://github.com/0xsiddharthks/alloy-multiprovider-strategy", rev = "0f8d034e679631a715f9eed104089430ae57283a" }
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.

Should we move this somewhere within the MystenLabs org?

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.

Yeah, I had talked to Brandon about it.
As of now, it's a fairly common pattern in the monorepo to have links to repositories / forks owned by personal accounts.

But I'm totally open to transferring the repo ownership to the MystenLabs org if thats recommended.

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.

Cool, sounds good to me I just wanted to check

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.

Yeah this is ok for the time being.

/// Quorum-based consensus is used across providers for redundancy.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub eth_rpc_urls: Option<Vec<String>>,
/// Quorum size for multi-provider consensus. Must be <= number of URLs.
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.

I don't think we're validating that the quorum is <= the number of URLs?

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.

we have this validation in the multiprovider itself, when it initializes.

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.

You can probably have this just be Vec and change the skip serialize to Vec::is_empty

pub struct EthConfig {
/// Rpc url for Eth fullnode, used for query stuff.
pub eth_rpc_url: String,
/// @deprecated (use eth_rpc_urls instead)
Copy link
Copy Markdown
Contributor

@dlukegordon dlukegordon Feb 4, 2026

Choose a reason for hiding this comment

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

Does @deprecated in a comment actually trigger any deprecation warnings? Maybe we should use #[deprecated]?

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.

So this is more a note, we are not deprecating the actual rust field itself. And i wouldn't be surprised if ever after we role this out most folks won't update configs

@0xsiddharthks 0xsiddharthks merged commit c38edb6 into main Feb 5, 2026
79 of 82 checks passed
@0xsiddharthks 0xsiddharthks deleted the siddharth/alloy-multiprovider branch February 5, 2026 18:17
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