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(ctb): finalizeWithdrawalTransaction gas limit dos (v2) #5017

Merged
merged 5 commits into from
Mar 8, 2023

Conversation

clabby
Copy link
Member

@clabby clabby commented Feb 28, 2023

Overview

V2 of #4954, see that PR for the full explanation of the changes. This one implements @smartcontracts' proposed method of breaking out the callWithMinGas function into SafeCall and testing it independently, which is a good bit cleaner.

Will be followed up with a PR to use the new callWithMinGas function in the CrossDomainMessenger.

Metadata
Fixes CLI-3387
Fixes CLI-3386

@changeset-bot
Copy link

changeset-bot bot commented Feb 28, 2023

⚠️ No Changeset found

Latest commit: aabf6fc

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@codecov
Copy link

codecov bot commented Feb 28, 2023

Codecov Report

Merging #5017 (aabf6fc) into develop (83b6312) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #5017      +/-   ##
===========================================
+ Coverage    40.98%   41.00%   +0.01%     
===========================================
  Files          339      339              
  Lines        20787    20790       +3     
  Branches       771      771              
===========================================
+ Hits          8520     8524       +4     
- Misses       11609    11611       +2     
+ Partials       658      655       -3     
Flag Coverage Δ
bedrock-go-tests 36.66% <ø> (+0.02%) ⬆️
contracts-bedrock-tests 49.74% <100.00%> (-0.20%) ⬇️
contracts-tests 98.86% <ø> (ø)
core-utils-tests 60.41% <ø> (ø)
dtl-tests 47.15% <ø> (ø)
fault-detector-tests 33.88% <ø> (ø)
sdk-tests 38.74% <ø> (ø)

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

Impacted Files Coverage Δ
.../contracts-bedrock/contracts/L1/OptimismPortal.sol 86.95% <100.00%> (-0.28%) ⬇️
...contracts-bedrock/contracts/libraries/SafeCall.sol 57.14% <100.00%> (-42.86%) ⬇️
op-node/heartbeat/service.go 57.89% <0.00%> (+2.63%) ⬆️
op-node/sources/batching.go 85.71% <0.00%> (+3.06%) ⬆️

@clabby clabby marked this pull request as ready for review March 1, 2023 01:47
@clabby clabby requested a review from a team as a code owner March 1, 2023 01:47
@clabby clabby marked this pull request as draft March 1, 2023 02:55
@clabby
Copy link
Member Author

clabby commented Mar 1, 2023

Moving back into draft- docs could use some rewording + tests should preferably account for fluctuating dynamic gas in the external call.

@mergify
Copy link
Contributor

mergify bot commented Mar 1, 2023

Hey @clabby! This PR has merge conflicts. Please fix them before continuing review.

@mergify mergify bot added the conflict label Mar 1, 2023
@clabby
Copy link
Member Author

clabby commented Mar 1, 2023

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@mergify mergify bot added sdk and removed conflict labels Mar 1, 2023
@mergify mergify bot requested a review from roninjin10 March 1, 2023 15:11
@clabby clabby force-pushed the clabby/ctb/safecall-min-gas branch from cd10ca1 to 87e0f66 Compare March 1, 2023 15:11
@clabby clabby marked this pull request as ready for review March 1, 2023 15:25
@clabby clabby requested a review from maurelian March 1, 2023 17:00
@maurelian
Copy link
Contributor

Applied the do-not-merge label because I'd like this to get 2 code owner reviews.

@clabby
Copy link
Member Author

clabby commented Mar 3, 2023

Applied the do-not-merge label because I'd like this to get 2 code owner reviews.

Agree- Will poke Kelvin or Mark about this one if I come across them today 😄

Copy link
Contributor

@tynes tynes left a comment

Choose a reason for hiding this comment

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

This is definitely the best solution yet

@clabby clabby force-pushed the clabby/ctb/safecall-min-gas branch from 2a66300 to 77eaeab Compare March 6, 2023 17:41
John's nits pt. 3
@clabby clabby force-pushed the clabby/ctb/safecall-min-gas branch from 77eaeab to 8be97a4 Compare March 7, 2023 20:23
@mergify
Copy link
Contributor

mergify bot commented Mar 8, 2023

This PR has been added to the merge queue, and will be merged soon.

@mergify
Copy link
Contributor

mergify bot commented Mar 8, 2023

This PR is next in line to be merged, and will be merged as soon as checks pass.

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.

4 participants