-
Notifications
You must be signed in to change notification settings - Fork 357
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
Set of fixes for boojum integration #73
Merged
StanislavBreadless
merged 21 commits into
release-v18-boojum
from
sb-boojum-integration-patch
Nov 1, 2023
Merged
Changes from 20 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
122c33f
enforce one batch to be proved
StanislavBreadless 8c4fbb8
correct event for pending admin
StanislavBreadless d6af6cf
max fee per gas validation
StanislavBreadless 6297bc4
charge correctly for the memory overhead
StanislavBreadless 90a8473
make governance execution payable
StanislavBreadless ea87fe3
disallow cancelling upgrades by security council
StanislavBreadless 892f7b3
correct L1->L2 tx gas comparison
StanislavBreadless 7b8c3b1
fix compilation
StanislavBreadless d95e42e
ergs->gas nit
StanislavBreadless a4052f0
some nits
StanislavBreadless 6a1ca44
add info on l2GasPrice
StanislavBreadless 3d873ea
remove unneeded import
StanislavBreadless 54d8eff
limit protocol version delta
StanislavBreadless ff76d21
Merge branch 'dev' into sb-boojum-integration-patch
StanislavBreadless da356fc
formatting
StanislavBreadless 0b46a11
update solhint
StanislavBreadless 68ec5ac
facet with 0 code can not be added
StanislavBreadless e6ca9bd
increase gas limit for upgrade tx
StanislavBreadless aca8f41
change revert msg in test
koloz193 b244b9f
fix foundry tests
StanislavBreadless 3615960
add some new tests
StanislavBreadless File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ import "../zksync/interfaces/IMailbox.sol"; | |
import "../zksync/interfaces/IVerifier.sol"; | ||
import "../common/libraries/L2ContractHelper.sol"; | ||
import "../zksync/libraries/TransactionValidator.sol"; | ||
import {SYSTEM_UPGRADE_L2_TX_TYPE, MAX_NEW_FACTORY_DEPS} from "../zksync/Config.sol"; | ||
import {SYSTEM_UPGRADE_L2_TX_TYPE, MAX_NEW_FACTORY_DEPS, MAX_ALLOWED_PROTOCOL_VERSION_DELTA} from "../zksync/Config.sol"; | ||
|
||
/// @author Matter Labs | ||
/// @custom:security-contact [email protected] | ||
|
@@ -217,6 +217,10 @@ abstract contract BaseZkSyncUpgrade is Base { | |
_newProtocolVersion > previousProtocolVersion, | ||
"New protocol version is not greater than the current one" | ||
); | ||
require( | ||
_newProtocolVersion - previousProtocolVersion <= MAX_ALLOWED_PROTOCOL_VERSION_DELTA, | ||
StanislavBreadless marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"Too big protocol version difference" | ||
); | ||
|
||
// If the previous upgrade had an L2 system upgrade transaction, we require that it is finalized. | ||
require(s.l2SystemContractsUpgradeTxHash == bytes32(0), "Previous upgrade has not been finalized"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,8 +6,6 @@ import "../Storage.sol"; | |
import "../../common/ReentrancyGuard.sol"; | ||
import "../../common/AllowListed.sol"; | ||
|
||
import "@openzeppelin/contracts/access/Ownable.sol"; | ||
|
||
/// @title Base contract containing functions accessible to the other facets. | ||
/// @author Matter Labs | ||
/// @custom:security-contact [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Should we add test?
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.
I think for this function we may skip it, since it would be basically testing that
payable
works