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

refactor(conductor): fetch missing blocks as necessary #1054

Merged
merged 1 commit into from
May 8, 2024

Conversation

SuperFluffy
Copy link
Member

Summary

Conductor fetches blocks from the rollup node if they are not in its cache.

Background

During initialization and when set to firm-and-soft commitment mode, Conductor issued a BatchGetBlocks RPC to the rollup. When the delta between firm and soft commitments was too large, this could be a request for 50k and more elements, putting a lot of pressure on the rollup node or failing outright because the request exceeded the default 4MB limit for gRPC requests.

This patch replaces this pre-fetch in favor of an already existing fallback logic: if conductor finds a Celestia block with the next desired firm-number, it either looks up the corresponding rollup block in its cache, or requests it from the rollup. It then updates the rollup's commitment state.

Changes

  • Remove BatchGetBlocks logic from conductor

Testing

Update the conductor test for fetching missing rollup blocks.

@github-actions github-actions bot added the conductor pertaining to the astria-conductor crate label May 8, 2024
@SuperFluffy SuperFluffy force-pushed the superfluffy/no-betching-just-fetching branch from 3b1220c to 0c069a1 Compare May 8, 2024 12:56
@SuperFluffy SuperFluffy marked this pull request as ready for review May 8, 2024 12:57
@SuperFluffy SuperFluffy requested a review from a team as a code owner May 8, 2024 12:57
@SuperFluffy SuperFluffy requested review from Fraser999 and joroshiba and removed request for Fraser999 May 8, 2024 12:57
@SuperFluffy SuperFluffy enabled auto-merge May 8, 2024 15:38
@SuperFluffy SuperFluffy added this pull request to the merge queue May 8, 2024
Merged via the queue into main with commit 8523def May 8, 2024
36 checks passed
@SuperFluffy SuperFluffy deleted the superfluffy/no-betching-just-fetching branch May 8, 2024 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conductor pertaining to the astria-conductor crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants