diff --git a/bootloader/bootloader.yul b/bootloader/bootloader.yul index e0a0ae8..8356a23 100644 --- a/bootloader/bootloader.yul +++ b/bootloader/bootloader.yul @@ -124,7 +124,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 } @@ -359,7 +359,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}} @@ -2728,7 +2728,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() } @@ -3852,7 +3852,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 @@ -3865,7 +3865,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. // 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]))) ==