Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(l1): Migrate to Alloy #240

Merged
merged 3 commits into from
May 1, 2024
Merged

chore(l1): Migrate to Alloy #240

merged 3 commits into from
May 1, 2024

Conversation

refcell
Copy link
Collaborator

@refcell refcell commented Apr 30, 2024

Description

Migrates the l1 module to Alloy.

Two main concerns with this pr as it stands. Currently removed retrying from the l1 chain watcher provider since the RetryClient previously used is from ethers and I'm not seeing a good alternative. It also seems that the reqwest::ClientBuilder does not offer a retry policy.

The second concern is that the rpc Log type returned from the alloy provider does not hydrate the block information needed to construct the user deposit information. As in, it is missing the l1 block number, l1 block hash, and log index (within the block). As a work around, I've modified the log fetching to query each block's log set at a time so we can hydrate this information ourselves (assuming logs are returned in their canonical block ordering from the provider). It would be much more efficient for the provider to hydrate this data such that we can batch rpc requests. Especially since we currently set the range to be 1000 blocks starting at the provided block number.

Metadata

Fixes #233

@refcell refcell added A-l1 Area: L1 chain watcher K-chore Kind: general fixes not relating to a bug M-port Meta: Ports code to new implementations labels Apr 30, 2024
@refcell refcell requested a review from ncitron April 30, 2024 16:40
@refcell refcell self-assigned this Apr 30, 2024
Copy link
Contributor

@ncitron ncitron left a comment

Choose a reason for hiding this comment

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

LGTM

@ncitron ncitron merged commit 89e8e2c into alloy May 1, 2024
5 checks passed
@ncitron ncitron deleted the refcell/chore/l1-alloy-port branch May 1, 2024 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-l1 Area: L1 chain watcher K-chore Kind: general fixes not relating to a bug M-port Meta: Ports code to new implementations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants