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

fix(rollup): fallback HTTP polling without filtering #89

Merged
merged 4 commits into from
Sep 11, 2024

Conversation

merklefruit
Copy link
Collaborator

@merklefruit merklefruit commented Sep 8, 2024

Introduces a second method of polling via HTTP that doesn't rely on the eth_filter feature.
This will be auto-detected and triggered as fallback. It's mostly useful for test purposes.

Stack

@merklefruit merklefruit added C-enhancement New feature or request A-rollup Area: rollup crate labels Sep 8, 2024
@merklefruit merklefruit requested a review from refcell September 8, 2024 22:16
@merklefruit merklefruit self-assigned this Sep 8, 2024
@merklefruit merklefruit changed the base branch from main to nico/feat/init-pipeline-fix September 8, 2024 22:17
@merklefruit merklefruit changed the title fix(rollup): init pipeline based on real l2 tip fix(rollup): fallback HTTP polling without filtering Sep 9, 2024
@merklefruit merklefruit added the D-stacked Desc: Stacked ontop of another PR label Sep 9, 2024
Base automatically changed from nico/feat/init-pipeline-fix to main September 9, 2024 22:34
Comment on lines +94 to +101
if err
.as_error_resp()
.is_some_and(|resp| !resp.message.to_lowercase().contains("not supported"))
{
// On any error other than "not supported", return the error and fail.
error!("Failed to watch new blocks via HTTP");
return Err(err);
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this is fine, but we should also then allow the user to pass an --http flag that uses http polling explicitly instead of subscriptions in order to not get caught in this block.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't fully get what the flag would mean, could you elaborate?
If the URL scheme is HTTP we are forced to poll

@merklefruit merklefruit merged commit 35f48ac into main Sep 11, 2024
11 checks passed
@merklefruit merklefruit deleted the nico/fix/polling branch September 11, 2024 06:59
merklefruit added a commit that referenced this pull request Sep 11, 2024
This PR introduces a new wrapper struct: `ExExHeraContext`. 

This struct wraps `ExExContext` with a copy of `InMemoryChainProvider`,
such that every newly committed chain gets automatically injected into
the same L1 provider cache that's used by the rollup pipeline when
running as ExEx.

This abstraction allows us to stop worrying about caching L1 blocks
(which was previously marked as TODO in the derivation loop) and also
makes full use of the data inside `Arc<Chain>`, such as receipts.

### Stack

- main
  - #88 
    - #89 
      - 👉 #91
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rollup Area: rollup crate C-enhancement New feature or request D-stacked Desc: Stacked ontop of another PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

chore(rollup): support http polling without eth_newBlockFilter and eth_getFilterChanges
2 participants