-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
migration: update migrated withdrawal gas limit #4911
Conversation
🦋 Changeset detectedLatest commit: 43c4158 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #4911 +/- ##
===========================================
- Coverage 41.00% 37.65% -3.35%
===========================================
Files 339 233 -106
Lines 20789 17696 -3093
Branches 771 169 -602
===========================================
- Hits 8524 6664 -1860
+ Misses 11610 10412 -1198
+ Partials 655 620 -35
Flags with carried forward coverage won't be shown. Click here to find out more. |
Addressed the review comment by @smartcontracts, this should be good to merge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This all looks about right to me, but I think its worthwhile to update the tests to check:
- the gas calculation for a string with some mix of 0 and non-zero bytes
- the gasLimit respects the
25_000_000
boundary
This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
More accurately computes the gas limit for a migrated withdrawal. This is useful to prevent the gaslimit for large transactions from going over the consensus level block gas limit. It is unlikely for a transaction to go over the block gas limit, but this is a preventative fix just in case.
@maurelian There are now tests in both go and js - ready for review again |
Clean up the script that is used to migrate legacy withdrawals. This script is very important for testing the legacy withdrawal migration. A bug was introduced with #4911 which was a sherlock audit fix. This was a bug because the change resulted in the withdrawal hashes changing, meaning that the storage slots computed client side also changed. This resulted in breaking the script. This commit reverts this change. The changes landing in #5470 will cause the buffer in the gas limit for the migrated withdrawals to be too small, so we can reintroduce this code behind a switch with the network. Its not ideal that the migration code isn't going to match 1:1 with goerli but thats ok because we will be able to thoroughly test it.
Clean up the script that is used to migrate legacy withdrawals. This script is very important for testing the legacy withdrawal migration. A bug was introduced with #4911 which was a sherlock audit fix. This was a bug because the change resulted in the withdrawal hashes changing, meaning that the storage slots computed client side also changed. This resulted in breaking the script. This commit reverts this change. The changes landing in #5470 will cause the buffer in the gas limit for the migrated withdrawals to be too small, so we can reintroduce this code behind a switch with the network. Its not ideal that the migration code isn't going to match 1:1 with goerli but thats ok because we will be able to thoroughly test it.
Description
More accurately computes the gas limit for a migrated withdrawal. This is useful to prevent the gaslimit for large transactions from going over the consensus level block gas limit. It is unlikely for a transaction to go over the block gas limit, but this is a preventative fix just in case.
Closes CLI-3336