From f4a906eb5b2de7e35a547d236d727d916641af29 Mon Sep 17 00:00:00 2001 From: Stanislav Breadless Date: Mon, 8 Jan 2024 00:10:24 +0100 Subject: [PATCH] add security contact --- contracts/interfaces/IComplexUpgrader.sol | 5 +++++ contracts/interfaces/ICompressor.sol | 6 ++++++ contracts/interfaces/IKnownCodesStorage.sol | 6 ++++++ contracts/interfaces/IL1Messenger.sol | 5 +++++ contracts/interfaces/ISystemContext.sol | 1 + contracts/interfaces/ISystemContextDeprecated.sol | 1 + contracts/interfaces/ISystemContract.sol | 15 +++++++++++---- 7 files changed, 35 insertions(+), 4 deletions(-) diff --git a/contracts/interfaces/IComplexUpgrader.sol b/contracts/interfaces/IComplexUpgrader.sol index ebc26dd2..1b5e1518 100644 --- a/contracts/interfaces/IComplexUpgrader.sol +++ b/contracts/interfaces/IComplexUpgrader.sol @@ -2,6 +2,11 @@ pragma solidity 0.8.20; +/** + * @author Matter Labs + * @custom:security-contact security@matterlabs.dev + * @notice The interface for the ComplexUpgrader contract. + */ interface IComplexUpgrader { function upgrade(address _delegateTo, bytes calldata _calldata) external payable; } diff --git a/contracts/interfaces/ICompressor.sol b/contracts/interfaces/ICompressor.sol index 16e02d97..901e020c 100644 --- a/contracts/interfaces/ICompressor.sol +++ b/contracts/interfaces/ICompressor.sol @@ -9,6 +9,12 @@ uint8 constant LENGTH_BITS_OFFSET = 3; // The maximal length in bytes that an enumeration index can have. uint8 constant MAX_ENUMERATION_INDEX_SIZE = 8; +/** + * @author Matter Labs + * @custom:security-contact security@matterlabs.dev + * @notice The interface for the Compressor contract, responsible for verifying the correctness of + * the compression of the state diffs and bytecodes. + */ interface ICompressor { function publishCompressedBytecode( bytes calldata _bytecode, diff --git a/contracts/interfaces/IKnownCodesStorage.sol b/contracts/interfaces/IKnownCodesStorage.sol index b5a783ba..98a1277d 100644 --- a/contracts/interfaces/IKnownCodesStorage.sol +++ b/contracts/interfaces/IKnownCodesStorage.sol @@ -2,6 +2,12 @@ pragma solidity 0.8.20; +/** + * @author Matter Labs + * @custom:security-contact security@matterlabs.dev + * @notice The interface for the KnownCodesStorage contract, which is responsible + * for storing the hashes of the bytecodes that have been published to the network. + */ interface IKnownCodesStorage { event MarkedAsKnown(bytes32 indexed bytecodeHash, bool indexed sendBytecodeToL1); diff --git a/contracts/interfaces/IL1Messenger.sol b/contracts/interfaces/IL1Messenger.sol index ab6a670f..cd0cc90f 100644 --- a/contracts/interfaces/IL1Messenger.sol +++ b/contracts/interfaces/IL1Messenger.sol @@ -32,6 +32,11 @@ bytes32 constant L2_L1_LOGS_TREE_DEFAULT_LEAF_HASH = 0x72abee45b59e344af8a6e5202 /// @dev The current version of state diff compression being used. uint256 constant STATE_DIFF_COMPRESSION_VERSION_NUMBER = 1; +/** + * @author Matter Labs + * @custom:security-contact security@matterlabs.dev + * @notice The interface of the L1 Messenger contract, responsible for sending messages to L1. + */ interface IL1Messenger { // Possibly in the future we will be able to track the messages sent to L1 with // some hooks in the VM. For now, it is much easier to track them with L2 events. diff --git a/contracts/interfaces/ISystemContext.sol b/contracts/interfaces/ISystemContext.sol index d8a98292..1089ab1f 100644 --- a/contracts/interfaces/ISystemContext.sol +++ b/contracts/interfaces/ISystemContext.sol @@ -4,6 +4,7 @@ pragma solidity 0.8.20; /** * @author Matter Labs + * @custom:security-contact security@matterlabs.dev * @notice Contract that stores some of the context variables, that may be either * block-scoped, tx-scoped or system-wide. */ diff --git a/contracts/interfaces/ISystemContextDeprecated.sol b/contracts/interfaces/ISystemContextDeprecated.sol index b51faeed..a44b61b2 100644 --- a/contracts/interfaces/ISystemContextDeprecated.sol +++ b/contracts/interfaces/ISystemContextDeprecated.sol @@ -4,6 +4,7 @@ pragma solidity 0.8.20; /** * @author Matter Labs + * @custom:security-contact security@matterlabs.dev * @notice The interface with deprecated functions of the SystemContext contract. It is aimed for backward compatibility. */ interface ISystemContextDeprecated { diff --git a/contracts/interfaces/ISystemContract.sol b/contracts/interfaces/ISystemContract.sol index c486abc9..8a554561 100644 --- a/contracts/interfaces/ISystemContract.sol +++ b/contracts/interfaces/ISystemContract.sol @@ -5,10 +5,17 @@ pragma solidity 0.8.20; import {SystemContractHelper} from "../libraries/SystemContractHelper.sol"; import {BOOTLOADER_FORMAL_ADDRESS} from "../Constants.sol"; -/// @dev Solidity does not allow exporting modifiers via libraries, so -/// the only way to do reuse modifiers is to have a base contract -/// @dev Never add storage variables into this contract as some -/// system contracts rely on this abstract contract as on interface! + + +/** + * @author Matter Labs + * @custom:security-contact security@matterlabs.dev + * @notice An abstract contract that is used to reuse modifiers across the system contracts. + * @dev Solidity does not allow exporting modifiers via libraries, so + * the only way to do reuse modifiers is to have a base contract + * @dev Never add storage variables into this contract as some + * system contracts rely on this abstract contract as on interface! + */ abstract contract ISystemContract { /// @notice Modifier that makes sure that the method /// can only be called via a system call.