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(contracts): OZ-L10 maxReplayTimes is Not Initialized in L1ScrollMessenger #852

Merged

Conversation

zimpha
Copy link
Member

@zimpha zimpha commented Aug 22, 2023

Purpose or design rationale of this PR

This PR partially fixed the issue reported by Openzepplin (L-10 maxReplayTimes is Not Initialized in L1ScrollMessenger). The following are the details:

Currently maxReplayTimes is not being set in the initialize function of L1ScrollMessenger. In addition, the deployment script for L1ScrollMessenger does not call updateMaxReplayTimes to set maxReplayTimes to an appropriate value. An uninitialized value of maxReplyTimes would have the value of 0, which would prevent any user from calling replayMessage due to the max reply check reverting. Therefore, this will happen until updateMaxReplayTimes is called to set maxReplayTimes.

Consider setting maxReplayTimes to an appropriate value during the initialization of the L1ScrollMessenger contract.

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?

  • 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 added the bug Something isn't working label Aug 22, 2023
@zimpha zimpha self-assigned this Aug 22, 2023
HAOYUatHZ
HAOYUatHZ previously approved these changes Aug 22, 2023
iczc
iczc previously approved these changes Aug 22, 2023
@HAOYUatHZ HAOYUatHZ dismissed stale reviews from iczc and themself via 929b3e5 August 22, 2023 20:57
@codecov
Copy link

codecov bot commented Aug 25, 2023

Codecov Report

Merging #852 (402be64) into develop (24a0fd0) will increase coverage by 0.00%.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop     #852   +/-   ##
========================================
  Coverage    51.28%   51.28%           
========================================
  Files           60       60           
  Lines         5567     5588   +21     
========================================
+ Hits          2855     2866   +11     
- Misses        2473     2483   +10     
  Partials       239      239           
Flag Coverage Δ
bridge 63.51% <ø> (-0.08%) ⬇️
common 55.43% <ø> (ø)
coordinator 19.15% <ø> (ø)
database 42.85% <ø> (ø)

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

see 2 files with indirect coverage changes

@github-actions
Copy link

LCOV of commit 402be64 during Contracts #1310

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

Files changed coverage rate: n/a

@HAOYUatHZ HAOYUatHZ merged commit 6139ca0 into develop Aug 25, 2023
22 checks passed
@HAOYUatHZ HAOYUatHZ deleted the fix/maxReplayTimes_is_not_initialized_in_L1ScrollMessenger branch August 25, 2023 02:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants