-
Notifications
You must be signed in to change notification settings - Fork 626
feat(l2 relayer): enhance batch submission strategy based on backlog size #1745
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
base: develop
Are you sure you want to change the base?
Conversation
WalkthroughUpdates version tag to v4.5.48. Modifies Layer2Relayer to compute backlog-aware batch submission limits by fetching failed/pending backlog count, recording a metric, and passing backlogCount to a revised getEffectiveBatchLimits method. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant R as Layer2Relayer
participant O as BatchOrm
participant M as Metrics
participant S as Submitter
rect rgba(230,245,255,0.4)
note over R: ProcessPendingBatches
R->>O: GetFailedAndPendingBatchesCount()
O-->>R: backlogCount
R->>M: Record backlogCount metric
R->>R: getEffectiveBatchLimits(backlogCount)
R-->>R: (minBatches, maxBatches)
end
alt ValidiumMode
note right of R: Limits forced to (1,1)
else Backlog >= BacklogMax
note right of R: Limits -> (MinBatches, MinBatches)
else Backlog < BacklogMax
note right of R: Limits -> (MaxBatches, MaxBatches)
end
R->>S: Select & submit batches within limits
S-->>R: Result (success/failure)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🧰 Additional context used🧬 Code graph analysis (1)rollup/internal/controller/relayer/l2_relayer.go (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Purpose or design rationale of this PR
Adds more dynamic blob submission.
PR title
Your PR title must follow conventional commits (as we are doing squash merge for each PR), so it must start with one of the following types:
Deployment tag versioning
Has
tag
incommon/version.go
been updated or have you addedbump-version
label to this PR?Breaking change label
Does this PR have the
breaking-change
label?Summary by CodeRabbit
Bug Fixes
Chores