Skip to content

fix: unset claims max log range (0.8)#1526

Merged
arnaubennassar merged 1 commit intorelease/0.8from
hotfix/unset-claims-max-log-range-0.8
Mar 5, 2026
Merged

fix: unset claims max log range (0.8)#1526
arnaubennassar merged 1 commit intorelease/0.8from
hotfix/unset-claims-max-log-range-0.8

Conversation

@arnaubennassar
Copy link
Collaborator

@arnaubennassar arnaubennassar commented Mar 5, 2026

Summary

Cherry-pick of #1520 (feat: unset claims max log range) onto release/0.8.

  • Adds configurable UnsetClaimsMaxLogBlockRange to [AggSender] and [Validator] config sections
  • Proactively chunks eth_getLogs queries for unset-claims fetching to avoid block range errors
  • Default is 0 (disabled), preserving existing reactive fallback behavior

Changes

Conflict resolution: BlockFinalityForL1InfoTree, TriggerCertMode, TriggerEpochBased, and TriggerASAP fields/config don't exist in release/0.8, so only UnsetClaimsMaxLogBlockRange was added from the cherry-pick.

🤖 Generated with Claude Code

🔄 Changes Summary
- Added a configurable UnsetClaimsMaxLogBlockRange setting that
proactively chunks eth_getLogs queries for unset-claims fetching,
  avoiding block range errors before they occur
- Refactored AgglayerBridgeL2Reader to support proactive chunking via a
new constructor NewAgglayerBridgeL2ReaderWithMaxLogBlockRange,
  while preserving existing reactive fallback chunking behavior
- Added a new regex to ParseMaxRangeFromError to handle the "eth_getLogs
is limited to a 10,000 range" error format (with comma-formatted
   numbers)

  ⚠️  Breaking Changes

  - None

  📋 Config Updates

  - 🧾 New field added to [AggSender] and [Validator] sections:
```toml
  # Max block range per eth_getLogs call for unset-claims queries. 0 disables proactive chunking.
  UnsetClaimsMaxLogBlockRange = 0
```
Default is 0 (disabled), preserving existing reactive fallback behavior.

  ✅ Testing

- 🤖 Automatic: Unit tests added in
bridgesync/agglayer_bridge_l2_reader_test.go covering proactive
chunking, fallback chunking, and the new error regex in
common/errors_test.go

  🐞 Issues

  - Closes #1517

  🔗 Related PRs

  - N/A

  📝 Notes

- When UnsetClaimsMaxLogBlockRange > 0, proactive chunking kicks in if
toBlock - fromBlock >= maxRange. Each chunk still falls back to reactive
chunking if the RPC returns a smaller limit.
- The new eth_getLogs is limited to a N,000 range regex handles
comma-formatted numbers (e.g., 10,000) by stripping commas before
parsing.

---------

Co-authored-by: Luke Thorne <luke@conduit.xyz>
@arnaubennassar arnaubennassar self-assigned this Mar 5, 2026
@arnaubennassar arnaubennassar changed the title hotfix: unset claims max log range (0.8) fix: unset claims max log range (0.8) Mar 5, 2026
@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 5, 2026

@arnaubennassar arnaubennassar merged commit eb4df91 into release/0.8 Mar 5, 2026
22 of 24 checks passed
@arnaubennassar arnaubennassar deleted the hotfix/unset-claims-max-log-range-0.8 branch March 5, 2026 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants