From 40d31d52481577526a75ddcda54149c0f1cb13a9 Mon Sep 17 00:00:00 2001 From: vladbochok Date: Fri, 3 Nov 2023 16:13:39 +0400 Subject: [PATCH] Fix N-01 --- bootloader/bootloader.yul | 2 ++ contracts/ContractDeployer.sol | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/bootloader/bootloader.yul b/bootloader/bootloader.yul index e3272c4e..811a8fa3 100644 --- a/bootloader/bootloader.yul +++ b/bootloader/bootloader.yul @@ -638,6 +638,8 @@ object "Bootloader" { } } + /// @dev The function that is temporarily needed to upgrade the Keccak256 precompile. This function and `ContractDeployer:forceDeployKeccak256` + /// are to be removed once the upgrade is complete. /// @dev Checks whether the code hash of the Keccak256 precompile contract is correct and updates it if needed. /// @dev When we upgrade to the new version of the Keccak256 precompile contract, the keccak precompile will not work correctly /// and so the upgrade it should be done before any `keccak` calls. diff --git a/contracts/ContractDeployer.sol b/contracts/ContractDeployer.sol index 962aade3..9f2da959 100644 --- a/contracts/ContractDeployer.sol +++ b/contracts/ContractDeployer.sol @@ -230,11 +230,11 @@ contract ContractDeployer is IContractDeployer, ISystemContract { ); } - /// @notice The method that is temporarily needed to upgrade the Keccak256 precompile. It is to be removed in the - /// future. Unlike a normal forced deployment, it does not update account information as it requires updating a - /// mapping, and so requires Keccak256 precompile to work already. - /// @dev This method expects the sender (FORCE_DEPLOYER) to provide the correct bytecode hash for the Keccak256 - /// precompile. + /// @notice The method that is temporarily needed to upgrade the Keccak256 precompile. This function and `Bootloader:upgradeKeccakIfNeeded` + /// are to be removed once the upgrade is complete. Unlike a normal forced deployment, it does not update account information as it requires + /// updating a mapping, and so requires Keccak256 precompile to work already. + /// @dev This method expects the sender (FORCE_DEPLOYER) to provide the correct bytecode hash for the Keccak256 + /// precompile. function forceDeployKeccak256(bytes32 _keccak256BytecodeHash) external payable onlyCallFrom(FORCE_DEPLOYER) { _ensureBytecodeIsKnown(_keccak256BytecodeHash);