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

feat(relayer): estimate l1 batch commit gas #659

Merged
merged 31 commits into from
Jul 31, 2023

Conversation

colinlyguo
Copy link
Member

@colinlyguo colinlyguo commented Jul 19, 2023

Purpose or design rationale of this PR

Describe your change. Make sure to answer these three questions: What does this PR do? Why does it do it? How does it do it?

What does this PR do?
Improving gas estimation for the relayer's batchCommit transactions to prevent exceeding the gas limit of the L1 block.

Why does it do it?
Previous gas estimation is very trivial and only acts as a placeholder.

How does it do it?
Summing gas usage of SLOAD, SSTORE, STATICCALL, keccak within batchCommit function of the contract. These operations represent the major components of gas consumption.

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:

  • feat: A new feature

Deployment tag versioning

Has tag in common/version.go been updated?

  • 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 force-pushed the feat-estimate-l1-batch-commit-gas branch 6 times, most recently from 3fe2276 to 801f109 Compare July 20, 2023 05:42
@colinlyguo colinlyguo marked this pull request as ready for review July 20, 2023 05:44
zimpha
zimpha previously approved these changes Jul 22, 2023
common/types/block.go Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jul 24, 2023

Codecov upload limit reached ⚠️

This org is currently on the free Basic Plan; which includes 250 free private repo uploads each rolling month. This limit has been reached and additional reports cannot be generated. For unlimited uploads, upgrade to our pro plan.

Do you have questions or need help? Connect with our sales team today at sales@codecov.io

@colinlyguo colinlyguo requested a review from Thegaram July 24, 2023 10:23
common/types/block.go Show resolved Hide resolved
bridge/internal/orm/chunk.go Outdated Show resolved Hide resolved
bridge/internal/controller/watcher/chunk_proposer.go Outdated Show resolved Hide resolved
bridge/internal/controller/watcher/chunk_proposer.go Outdated Show resolved Hide resolved
bridge/internal/controller/watcher/chunk_proposer.go Outdated Show resolved Hide resolved
bridge/internal/controller/watcher/batch_proposer.go Outdated Show resolved Hide resolved
bridge/internal/controller/watcher/chunk_proposer.go Outdated Show resolved Hide resolved
@colinlyguo colinlyguo requested a review from zimpha July 28, 2023 10:38
zimpha
zimpha previously approved these changes Jul 28, 2023
zimpha
zimpha previously approved these changes Jul 31, 2023
Thegaram
Thegaram previously approved these changes Jul 31, 2023
@colinlyguo colinlyguo dismissed stale reviews from Thegaram and zimpha via 1c76fd0 July 31, 2023 11:56
@Thegaram Thegaram merged commit eb9070e into develop Jul 31, 2023
13 checks passed
@Thegaram Thegaram deleted the feat-estimate-l1-batch-commit-gas branch July 31, 2023 12:03
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.

None yet

4 participants