Skip to content

Conversation

@squadgazzz
Copy link
Contributor

Description

The following function uses unbuffered legacy web3 transport, while for Alloy it uses a regular provider. This PR fixes that.

/// Creates unbuffered Web3 transport.
async fn unbuffered_ethrpc(url: &Url) -> infra::blockchain::Rpc {
ethrpc(
url,
&shared::ethrpc::Arguments {
ethrpc_max_batch_size: 0,
ethrpc_max_concurrent_requests: 0,
ethrpc_batch_delay: Default::default(),
},
)
.await
}

How to test

N/A

@squadgazzz squadgazzz requested a review from a team as a code owner October 29, 2025 18:22
Copilot AI review requested due to automatic review settings October 29, 2025 18:22
Copy link
Contributor

Copilot AI left a comment

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 modifies the web3() function to conditionally choose between buffered and unbuffered Alloy providers based on the configuration. The key change is moving the Alloy provider creation inside the match statement to align with the legacy transport's buffering configuration.

  • Restructured provider initialization to use different Alloy providers based on buffering configuration
  • Moved Alloy provider creation from after the transport setup to inside the buffering match statement
  • Updated variable naming from transport to legacy for clarity

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

@squadgazzz squadgazzz changed the title [EASY] Migrate CurrentBlockWatcher to alloy [EASY] Use unbuffered alloy provider Oct 30, 2025
Base automatically changed from alloy/current-block-watcher to main October 30, 2025 13:34
@squadgazzz squadgazzz enabled auto-merge (squash) October 30, 2025 13:36
@squadgazzz squadgazzz merged commit f6ba583 into main Oct 30, 2025
27 of 28 checks passed
@squadgazzz squadgazzz deleted the use-unbuffered-alloy-provider branch October 30, 2025 14:22
@github-actions github-actions bot locked and limited conversation to collaborators Oct 30, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants