From 66481ddc07d34da3a94fba85520bde5f8efa0540 Mon Sep 17 00:00:00 2001 From: Stanislav Breadless Date: Thu, 21 Dec 2023 15:19:15 +0100 Subject: [PATCH 1/2] fix misleading comment --- contracts/L1Messenger.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contracts/L1Messenger.sol b/contracts/L1Messenger.sol index 47ee3265..8948e204 100644 --- a/contracts/L1Messenger.sol +++ b/contracts/L1Messenger.sol @@ -272,8 +272,8 @@ contract L1Messenger is IL1Messenger, ISystemContract { /// Check State Diffs /// encoding is as follows: - /// header (1 byte version, 3 bytes total len of compressed, 1 byte enumeration index size, 2 bytes number of initial writes) - /// body (N bytes of initial writes [32 byte derived key || compressed value], M bytes repeated writes [enumeration index || compressed value]) + /// header (1 byte version, 3 bytes total len of compressed, 1 byte enumeration index size) + /// body (`compressedStateDiffSize` bytes, 4 bytes number of state diffs, `numberOfStateDiffs` * `STATE_DIFF_ENTRY_SIZE` bytes for the uncompressed state diffs) /// encoded state diffs: [20bytes address][32bytes key][32bytes derived key][8bytes enum index][32bytes initial value][32bytes final value] require( uint256(uint8(bytes1(_totalL2ToL1PubdataAndStateDiffs[calldataPtr]))) == From 2ca0397090ee9df50f889a529047ea5b37e04f24 Mon Sep 17 00:00:00 2001 From: Stanislav Breadless Date: Thu, 21 Dec 2023 21:59:25 +0100 Subject: [PATCH 2/2] fix lint --- contracts/L1Messenger.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/L1Messenger.sol b/contracts/L1Messenger.sol index 8948e204..30160164 100644 --- a/contracts/L1Messenger.sol +++ b/contracts/L1Messenger.sol @@ -273,7 +273,7 @@ contract L1Messenger is IL1Messenger, ISystemContract { /// Check State Diffs /// encoding is as follows: /// header (1 byte version, 3 bytes total len of compressed, 1 byte enumeration index size) - /// body (`compressedStateDiffSize` bytes, 4 bytes number of state diffs, `numberOfStateDiffs` * `STATE_DIFF_ENTRY_SIZE` bytes for the uncompressed state diffs) + /// body (`compressedStateDiffSize` bytes, 4 bytes number of state diffs, `numberOfStateDiffs` * `STATE_DIFF_ENTRY_SIZE` bytes for the uncompressed state diffs) /// encoded state diffs: [20bytes address][32bytes key][32bytes derived key][8bytes enum index][32bytes initial value][32bytes final value] require( uint256(uint8(bytes1(_totalL2ToL1PubdataAndStateDiffs[calldataPtr]))) ==