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(contracts): add rate limiter #712

Merged
merged 17 commits into from Aug 18, 2023
Merged

feat(contracts): add rate limiter #712

merged 17 commits into from Aug 18, 2023

Conversation

zimpha
Copy link
Member

@zimpha zimpha commented Aug 3, 2023

Purpose or design rationale of this PR

This PR add a rate limiter for deposit/withdraw ETH and ERC20 tokens in scroll messengers and gateways.

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

@zimpha zimpha self-assigned this Aug 3, 2023
@zimpha zimpha marked this pull request as ready for review August 15, 2023 05:34
@github-actions
Copy link

github-actions bot commented Aug 15, 2023

LCOV of commit e3fc62c during Contracts #1294

Summary coverage rate:
  lines......: 54.0% (969 of 1793 lines)
  functions..: 71.0% (215 of 303 functions)
  branches...: no data found

Files changed coverage rate: n/a

Thegaram
Thegaram previously approved these changes Aug 16, 2023
@codecov
Copy link

codecov bot commented Aug 16, 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

@iczc
Copy link
Contributor

iczc commented Aug 17, 2023

Would it be better to add the rate limiter only for L2->L1 withdrawals?

@zimpha
Copy link
Member Author

zimpha commented Aug 17, 2023

Would it be better to add the rate limiter only for L2->L1 withdrawals?

If the address of the rate limiter is not set, then there will be no limit. So, we can controll to add or not during initialization.

Copy link
Contributor

@iczc iczc left a comment

Choose a reason for hiding this comment

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

iczc
iczc previously approved these changes Aug 17, 2023
@icemelon icemelon merged commit ae2e010 into develop Aug 18, 2023
@icemelon icemelon deleted the feat/rate_limiter branch August 18, 2023 13:43
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.

None yet

4 participants