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-relayer): better handle commit batch revert #981

Merged
merged 4 commits into from
Oct 8, 2023

Conversation

colinlyguo
Copy link
Member

@colinlyguo colinlyguo commented Oct 8, 2023

Purpose or design rationale of this PR

Problem:
When rollup-relayer encounters a batch commit failure, it continues to commit subsequent batches, which would fail.

Solutions:

  1. Before committing a new batch, check If the parent batch has failed, if so, stop.
  2. Use estimateGas for batches that have been committed failed.

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:

  • fix: A bug fix

Deployment tag versioning

Has tag in common/version.go been updated or have you added bump-version label to this PR?

  • No, this PR doesn't involve a new deployment, git tag, docker image tag
  • Yes

Breaking change label

Does this PR have the breaking-change label?

  • No, this PR is not a breaking change
  • Yes

@colinlyguo colinlyguo self-assigned this Oct 8, 2023
@colinlyguo colinlyguo added the bump-version Bump the version tag for deployment label Oct 8, 2023
@codecov
Copy link

codecov bot commented Oct 8, 2023

Codecov Report

Merging #981 (27b57af) into develop (caa16e1) will decrease coverage by 0.05%.
The diff coverage is 26.66%.

@@             Coverage Diff             @@
##           develop     #981      +/-   ##
===========================================
- Coverage    48.19%   48.14%   -0.05%     
===========================================
  Files          100      100              
  Lines        10580    10590      +10     
===========================================
  Hits          5099     5099              
- Misses        5060     5069       +9     
- Partials       421      422       +1     
Flag Coverage Δ
rollup 66.33% <26.66%> (-0.22%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
rollup/internal/orm/batch.go 56.80% <66.66%> (ø)
rollup/internal/controller/relayer/l2_relayer.go 40.72% <16.66%> (-0.84%) ⬇️

@colinlyguo colinlyguo requested review from Thegaram and zimpha October 8, 2023 05:43
Thegaram
Thegaram previously approved these changes Oct 8, 2023
rollup/internal/controller/relayer/l2_relayer.go Outdated Show resolved Hide resolved
Thegaram
Thegaram previously approved these changes Oct 8, 2023
0xmountaintop
0xmountaintop previously approved these changes Oct 8, 2023
Copy link
Contributor

@0xmountaintop 0xmountaintop left a comment

Choose a reason for hiding this comment

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

just a nickpit

@colinlyguo colinlyguo dismissed stale reviews from 0xmountaintop and Thegaram via 27b57af October 8, 2023 09:35
@Thegaram Thegaram merged commit badde3c into develop Oct 8, 2023
11 checks passed
@Thegaram Thegaram deleted the fix-rollup-relayer-commit-batch branch October 8, 2023 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bump-version Bump the version tag for deployment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants