From 4dad36fa710c9ae1f0b7c34e04f2058f55d11755 Mon Sep 17 00:00:00 2001 From: Matt Yang Date: Tue, 19 Sep 2023 16:51:46 -0400 Subject: [PATCH] adding comments on hashing --- contracts/src/v0.8/ccip/libraries/Internal.sol | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contracts/src/v0.8/ccip/libraries/Internal.sol b/contracts/src/v0.8/ccip/libraries/Internal.sol index a56ed32559..a8988c8a6d 100644 --- a/contracts/src/v0.8/ccip/libraries/Internal.sol +++ b/contracts/src/v0.8/ccip/libraries/Internal.sol @@ -84,6 +84,8 @@ library Internal { bytes32 internal constant EVM_2_EVM_MESSAGE_HASH = keccak256("EVM2EVMMessageHash"); function _hash(EVM2EVMMessage memory original, bytes32 metadataHash) internal pure returns (bytes32) { + // Fixed-size message fields are included in nested hash to reduce stack pressure. + // This hashing scheme is also used by RMN. If changing it, please notify RMN. return keccak256( abi.encode(