Skip to content

fix: cap receipt backfill batch range to 10 blocks#116

Merged
kamsz merged 1 commit intomainfrom
kamil/fix-receipt-backfill-batch-size
Mar 18, 2026
Merged

fix: cap receipt backfill batch range to 10 blocks#116
kamsz merged 1 commit intomainfrom
kamil/fix-receipt-backfill-batch-size

Conversation

@decofe
Copy link
Copy Markdown
Member

@decofe decofe commented Mar 18, 2026

Summary

Fixes RPC batch error: The batch response was too large during receipt backfill by capping group_consecutive_blocks() to max 10 blocks per range.

Changes

  • Added MAX_RANGE_SIZE = 10 constant in engine.rs
  • group_consecutive_blocks() now splits consecutive runs that exceed the limit into smaller chunks
  • Added test_group_consecutive_blocks_splits_large_ranges test

Testing

cargo test group_consecutive -- 7 passed

Prompted by: kamil

Prevents 'batch response was too large' RPC errors by splitting
consecutive block ranges into chunks of at most 10 blocks in
group_consecutive_blocks().

Co-authored-by: Kamil Szczygieł <2961450+kamsz@users.noreply.github.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019d02a5-f319-770a-9abd-8df430c8fec4
@kamsz kamsz merged commit 90d6301 into main Mar 18, 2026
1 check passed
o-az pushed a commit that referenced this pull request Apr 27, 2026
Prevents 'batch response was too large' RPC errors by splitting
consecutive block ranges into chunks of at most 10 blocks in
group_consecutive_blocks().


Amp-Thread-ID: https://ampcode.com/threads/T-019d02a5-f319-770a-9abd-8df430c8fec4

Co-authored-by: Kamil Szczygieł <2961450+kamsz@users.noreply.github.com>
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.

2 participants