-
Notifications
You must be signed in to change notification settings - Fork 345
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
Merge Protocol Defense Tasks into Dev #518
Conversation
…LOWED_FAIR_L2_GAS_PRICE for base tokens (#513)
l1-contracts/contracts/state-transition/chain-deps/facets/Executor.sol
Outdated
Show resolved
Hide resolved
l1-contracts/contracts/state-transition/chain-deps/facets/Admin.sol
Outdated
Show resolved
Hide resolved
@@ -147,7 +169,7 @@ contract ExecutorFacet is ZkSyncHyperchainBase, IExecutor { | |||
|
|||
// Used as bitmap to set/check log processing happens exactly once. | |||
// See SystemLogKey enum in Constants.sol for ordering. | |||
uint256 processedLogs; | |||
uint256 processedLogs = 0; |
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.
Why change this line?
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.
for all these OZ suggested adding in the default values. i dont have a strong opinion on keeping or removing
l1-contracts/contracts/state-transition/chain-interfaces/IMailbox.sol
Outdated
Show resolved
Hide resolved
l1-contracts/test/foundry/integration/deploy-scripts/script-out/output-deploy-l1.toml
Outdated
Show resolved
Hide resolved
@@ -209,7 +209,7 @@ contract L1Messenger is IL1Messenger, ISystemContract { | |||
calldataPtr += 4; | |||
|
|||
bytes32[] memory l2ToL1LogsTreeArray = new bytes32[](L2_TO_L1_LOGS_MERKLE_TREE_LEAVES); | |||
bytes32 reconstructedChainedLogsHash; | |||
bytes32 reconstructedChainedLogsHash = bytes32(0); |
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.
Why?
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.
for all these OZ suggested adding in the default values. i dont have a strong opinion on keeping or removing
@@ -238,7 +238,7 @@ contract L1Messenger is IL1Messenger, ISystemContract { | |||
/// Check messages | |||
uint32 numberOfMessages = uint32(bytes4(_totalL2ToL1PubdataAndStateDiffs[calldataPtr:calldataPtr + 4])); | |||
calldataPtr += 4; | |||
bytes32 reconstructedChainedMessagesHash; | |||
bytes32 reconstructedChainedMessagesHash = bytes32(0); |
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.
Why?
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.
for all these OZ suggested adding in the default values. i dont have a strong opinion on keeping or removing
@@ -255,7 +255,7 @@ contract L1Messenger is IL1Messenger, ISystemContract { | |||
/// Check bytecodes | |||
uint32 numberOfBytecodes = uint32(bytes4(_totalL2ToL1PubdataAndStateDiffs[calldataPtr:calldataPtr + 4])); | |||
calldataPtr += 4; | |||
bytes32 reconstructedChainedL1BytecodesRevealDataHash; | |||
bytes32 reconstructedChainedL1BytecodesRevealDataHash = bytes32(0); |
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.
Why?
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.
for all these OZ suggested adding in the default values. i dont have a strong opinion on keeping or removing
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.
Please fix merge conflicts
l1-contracts/contracts/dev-contracts/test/DummySharedBridge.sol
Outdated
Show resolved
Hide resolved
@@ -1,4 +1,5 @@ | |||
// SPDX-License-Identifier: MIT |
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.
ProxyAdmin
and ITransparentUpgradeableProxy
imports are not updated to use the v4 alias:
import {ProxyAdmin} from "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol";
import {ITransparentUpgradeableProxy} from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";
It should be changed to:
import {ProxyAdmin} from "@openzeppelin/contracts-v4/proxy/transparent/ProxyAdmin.sol";
import {ITransparentUpgradeableProxy} from "@openzeppelin/contracts-v4/proxy/transparent/TransparentUpgradeableProxy.sol";
Nothing is depending on the OZ v5 contracts packages yet, I would remove them from |
What ❔
The purpose of these tasks is to make the protocol more resilient while increasing the quality of life when it comes to development, interop, and having a correct running system.
Why ❔
Checklist