From 8979a4f8f5596ae4fc3741aba1118091f4d35145 Mon Sep 17 00:00:00 2001 From: Stanislav Bezkorovainyi Date: Tue, 9 Jan 2024 09:50:54 +0100 Subject: [PATCH 1/2] Fix typographical errors (#91) fix typos --- bootloader/bootloader.yul | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bootloader/bootloader.yul b/bootloader/bootloader.yul index 18c47e1..358c11f 100644 --- a/bootloader/bootloader.yul +++ b/bootloader/bootloader.yul @@ -65,7 +65,7 @@ object "Bootloader" { /// @dev The computational overhead for a batch. /// It includes the combined price for 1 instance of all the circuits /// (since they might be partially filled), the price for running - /// the common parts of the bootloader as well as general maintainance of the system. + /// the common parts of the bootloader as well as general maintenance of the system. function BATCH_OVERHEAD_L2_GAS() -> ret { ret := {{BATCH_OVERHEAD_L2_GAS}} } @@ -108,7 +108,7 @@ object "Bootloader" { } /// @dev The slot from which the scratch space starts. - /// Scatch space is used for various temporary values + /// Scratch space is used for various temporary values function SCRATCH_SPACE_BEGIN_SLOT() -> ret { ret := 8 } @@ -343,7 +343,7 @@ object "Bootloader" { /// @dev Slots needed to store L1 Messenger pubdata. /// @dev Note that are many more these than the maximal pubdata in batch, since - /// it needs to also accomodate uncompressed state diffs that are required for the state diff + /// it needs to also accommodate uncompressed state diffs that are required for the state diff /// compression verification. function OPERATOR_PROVIDED_L1_MESSENGER_PUBDATA_SLOTS() -> ret { ret := {{OPERATOR_PROVIDED_L1_MESSENGER_PUBDATA_SLOTS}} @@ -2764,7 +2764,7 @@ object "Bootloader" { ) } default { - // For L2 transactions, we use near call panic, it will triger the validation + // For L2 transactions, we use near call panic, it will trigger the validation // step of the transaction to fail, returning a consistent error message. nearCallPanic() } @@ -3881,7 +3881,7 @@ object "Bootloader" { setTxOrigin(0) setGasPrice(0) - // Transfering all the ETH received in the block to the operator + // Transferring all the ETH received in the block to the operator directETHTransfer( selfbalance(), OPERATOR_ADDRESS @@ -3894,7 +3894,7 @@ object "Bootloader" { // So we need to have this method to reflect it in the system contracts too. // // The reason is that as of now our node requires that each storage write (event, etc) belongs to a particular - // L2 block. In case a batch is sealed by timeout (i.e. the resources of the batch have not been exhaused, but we need + // L2 block. In case a batch is sealed by timeout (i.e. the resources of the batch have not been exhausted, but we need // to seal it to assure timely finality), we need to process sending funds to the operator *after* the last // non-empty L2 block has been already sealed. We can not override old L2 blocks, so we need to create a new empty "fictive" block for it. // From 51f5f0a4901216b5d7080ff4461f626956b9b397 Mon Sep 17 00:00:00 2001 From: Stanislav Bezkorovainyi Date: Tue, 9 Jan 2024 09:53:01 +0100 Subject: [PATCH 2/2] Fix misleading comment (#92) * fix misleading comment * fix lint --- contracts/L1Messenger.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contracts/L1Messenger.sol b/contracts/L1Messenger.sol index 47ee326..3016016 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]))) ==