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 estimate commit batch gas limit #982

Merged
merged 5 commits into from
Oct 9, 2023

Conversation

colinlyguo
Copy link
Member

@colinlyguo colinlyguo commented Oct 8, 2023

Purpose or design rationale of this PR

  1. Add GetMemoryExpansionCost.
  2. Consider the memory expansion costs in GetKeccak256Gas.
  3. Consider proxy => delegate costs for each message:
total += GetMemoryExpansionCost(36) * numL1Messages // staticcall to proxy
total += 100 * numL1Messages // read admin in proxy
total += 100 * numL1Messages // read impl in proxy
total += 100 * numL1Messages // access impl
total += GetMemoryExpansionCost(36) * numL1Messages // delegatecall to impl
  1. Add GetMemoryExpansionCost(totalL1CommitCalldataSize).

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 #982 (763e9d4) into develop (badde3c) will increase coverage by 0.05%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop     #982      +/-   ##
===========================================
+ Coverage    48.14%   48.20%   +0.05%     
===========================================
  Files          100      100              
  Lines        10590    10602      +12     
===========================================
+ Hits          5099     5111      +12     
  Misses        5069     5069              
  Partials       422      422              
Flag Coverage Δ
common 54.94% <100.00%> (+0.37%) ⬆️
coordinator 18.94% <ø> (ø)
database 42.85% <ø> (ø)
rollup 66.36% <100.00%> (+0.02%) ⬆️

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

Files Coverage Δ
common/types/block.go 94.11% <100.00%> (+0.53%) ⬆️
...llup/internal/controller/watcher/batch_proposer.go 83.48% <100.00%> (+0.14%) ⬆️

@Thegaram Thegaram merged commit e843419 into develop Oct 9, 2023
@Thegaram Thegaram deleted the fix-rollup-relayer-better-estimate-gas-limit branch October 9, 2023 06:31
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.

3 participants