Skip to content

Commit

Permalink
Port 1 4 1 fixes (#105)
Browse files Browse the repository at this point in the history
* Fix typographical errors (#91)

fix typos

* Fix misleading comment (#92)

* fix misleading comment

* fix lint
  • Loading branch information
StanislavBreadless authored Jan 9, 2024
1 parent 0b238cd commit b49cfc6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions bootloader/bootloader.yul
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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}}
Expand Down Expand Up @@ -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()
}
Expand Down Expand Up @@ -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
Expand All @@ -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.
//
Expand Down
4 changes: 2 additions & 2 deletions contracts/L1Messenger.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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]))) ==
Expand Down

0 comments on commit b49cfc6

Please sign in to comment.