Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Fix typos #567

Merged
merged 2 commits into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/lib/multivm/src/tracers/validator/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ impl<H> ValidationTracer<H> {
return true;
}

// The pair of MSG_VALUE_SIMULATOR_ADDRESS & L2_ETH_TOKEN_ADDRESS simulates the behavior of transfering ETH
// The pair of MSG_VALUE_SIMULATOR_ADDRESS & L2_ETH_TOKEN_ADDRESS simulates the behavior of transferring ETH
// that is safe for the DDoS protection rules.
if valid_eth_token_call(address, msg_sender) {
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ pub(crate) fn get_debug_log<H: HistoryMode>(
let msg = String::from_utf8(msg).expect("Invalid debug message");
let data = U256::from_big_endian(&data);

// For long data, it is better to use hex-encoding for greater readibility
// For long data, it is better to use hex-encoding for greater readability
let data_str = if data > U256::from(u64::max_value()) {
let mut bytes = [0u8; 32];
data.to_big_endian(&mut bytes);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ impl<S: WriteStorage, H: HistoryMode> ValidationTracer<S, H> {
return true;
}

// The pair of MSG_VALUE_SIMULATOR_ADDRESS & L2_ETH_TOKEN_ADDRESS simulates the behavior of transfering ETH
// The pair of MSG_VALUE_SIMULATOR_ADDRESS & L2_ETH_TOKEN_ADDRESS simulates the behavior of transferring ETH
// that is safe for the DDoS protection rules.
if valid_eth_token_call(address, msg_sender) {
return true;
Expand Down
2 changes: 1 addition & 1 deletion core/lib/multivm/src/versions/vm_1_3_2/tests/bootloader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2087,7 +2087,7 @@
// vm_test_env.get_eth_balance(&beneficiary),
// U256::from(888000088)
// );
// // Make sure that the tokens were transfered from the AA account.
// // Make sure that the tokens were transferred from the AA account.
// assert_eq!(
// private_account_balance,
// vm_test_env.get_eth_balance(&private_address)
Expand Down
2 changes: 1 addition & 1 deletion core/lib/multivm/src/versions/vm_1_3_2/transaction_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ pub fn derive_overhead(
let gas_limit = U256::from(gas_limit);
let encoded_len = U256::from(encoded_len);

// The MAX_TX_ERGS_LIMIT is formed in a way that may fullfills a single-instance circuits
// The MAX_TX_ERGS_LIMIT is formed in a way that may fulfills a single-instance circuits
// if used in full. That is, within MAX_TX_ERGS_LIMIT it is possible to fully saturate all the single-instance
// circuits.
let overhead_for_single_instance_circuits =
Expand Down
2 changes: 1 addition & 1 deletion core/lib/multivm/src/versions/vm_1_3_2/vm_instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ pub struct VmExecutionResult {
pub l2_to_l1_logs: Vec<L2ToL1Log>,
pub return_data: Vec<u8>,

/// Value denoting the amount of gas spent withing VM invocation.
/// Value denoting the amount of gas spent within VM invocation.
/// Note that return value represents the difference between the amount of gas
/// available to VM before and after execution.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ pub(crate) fn get_bootloader_memory_for_encoded_tx(
let encoding_length = encoded_tx.len();
memory.extend((tx_description_offset..tx_description_offset + encoding_length).zip(encoded_tx));

// Note, +1 is moving for poitner
// Note, +1 is moving for pointer
let compressed_bytecodes_offset =
COMPRESSED_BYTECODES_OFFSET + 1 + previous_compressed_bytecode_size;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ pub(super) fn apply_tx_to_memory(
};
apply_l2_block(memory, &bootloader_l2_block, tx_index);

// Note, +1 is moving for poitner
// Note, +1 is moving for pointer
let compressed_bytecodes_offset = COMPRESSED_BYTECODES_OFFSET + 1 + compressed_bytecodes_size;

let encoded_compressed_bytecodes =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ async fn test_require_eip712() {
vm.get_eth_balance(beneficiary.address),
U256::from(888000088)
);
// Make sure that the tokens were transfered from the AA account.
// Make sure that the tokens were transferred from the AA account.
assert_eq!(
private_account_balance,
vm.get_eth_balance(private_account.address)
Expand Down
2 changes: 1 addition & 1 deletion core/lib/multivm/src/versions/vm_latest/tracers/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ pub(crate) fn get_debug_log<H: HistoryMode>(
let msg = String::from_utf8(msg).expect("Invalid debug message");
let data = U256::from_big_endian(&data);

// For long data, it is better to use hex-encoding for greater readibility
// For long data, it is better to use hex-encoding for greater readability
let data_str = if data > U256::from(u64::max_value()) {
let mut bytes = [0u8; 32];
data.to_big_endian(&mut bytes);
Expand Down
2 changes: 1 addition & 1 deletion core/lib/multivm/src/versions/vm_latest/utils/overhead.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pub fn derive_overhead(
let gas_limit = U256::from(gas_limit);
let encoded_len = U256::from(encoded_len);

// The MAX_TX_ERGS_LIMIT is formed in a way that may fullfills a single-instance circuits
// The MAX_TX_ERGS_LIMIT is formed in a way that may fulfills a single-instance circuits
// if used in full. That is, within MAX_TX_ERGS_LIMIT it is possible to fully saturate all the single-instance
// circuits.
let overhead_for_single_instance_circuits =
Expand Down
4 changes: 2 additions & 2 deletions core/lib/multivm/src/versions/vm_m5/oracles/tracer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ impl<S: Storage> ValidationTracer<S> {
return true;
}

// The pair of MSG_VALUE_SIMULATOR_ADDRESS & L2_ETH_TOKEN_ADDRESS simulates the behavior of transfering ETH
// The pair of MSG_VALUE_SIMULATOR_ADDRESS & L2_ETH_TOKEN_ADDRESS simulates the behavior of transferring ETH
// that is safe for the DDoS protection rules.
if valid_eth_token_call(address, msg_sender) {
return true;
Expand Down Expand Up @@ -801,7 +801,7 @@ fn get_debug_log(state: &VmLocalStateData<'_>, memory: &SimpleMemory) -> String
let msg = String::from_utf8(msg).expect("Invalid debug message");
let data = U256::from_big_endian(&data);

// For long data, it is better to use hex-encoding for greater readibility
// For long data, it is better to use hex-encoding for greater readability
let data_str = if data > U256::from(u64::max_value()) {
let mut bytes = [0u8; 32];
data.to_big_endian(&mut bytes);
Expand Down
2 changes: 1 addition & 1 deletion core/lib/multivm/src/versions/vm_m5/transaction_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ pub fn derive_overhead(gas_limit: u32, gas_price_per_pubdata: u32, encoded_len:
let gas_price_per_pubdata = U256::from(gas_price_per_pubdata);
let encoded_len = U256::from(encoded_len);

// The MAX_TX_ERGS_LIMIT is formed in a way that may fullfills a single-instance circuits
// The MAX_TX_ERGS_LIMIT is formed in a way that may fulfills a single-instance circuits
// if used in full. That is, within MAX_TX_ERGS_LIMIT it is possible to fully saturate all the single-instance
// circuits.
let overhead_for_single_instance_circuits =
Expand Down
2 changes: 1 addition & 1 deletion core/lib/multivm/src/versions/vm_m5/vm_instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ pub struct VmExecutionResult {
pub l2_to_l1_logs: Vec<L2ToL1Log>,
pub return_data: Vec<u8>,

/// Value denoting the amount of gas spent withing VM invocation.
/// Value denoting the amount of gas spent within VM invocation.
/// Note that return value represents the difference between the amount of gas
/// available to VM before and after execution.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ pub(crate) fn get_debug_log<H: HistoryMode>(
let msg = String::from_utf8(msg).expect("Invalid debug message");
let data = U256::from_big_endian(&data);

// For long data, it is better to use hex-encoding for greater readibility
// For long data, it is better to use hex-encoding for greater readability
let data_str = if data > U256::from(u64::max_value()) {
let mut bytes = [0u8; 32];
data.to_big_endian(&mut bytes);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ impl<S: Storage, H: HistoryMode> ValidationTracer<S, H> {
return true;
}

// The pair of MSG_VALUE_SIMULATOR_ADDRESS & L2_ETH_TOKEN_ADDRESS simulates the behavior of transfering ETH
// The pair of MSG_VALUE_SIMULATOR_ADDRESS & L2_ETH_TOKEN_ADDRESS simulates the behavior of transferring ETH
// that is safe for the DDoS protection rules.
if valid_eth_token_call(address, msg_sender) {
return true;
Expand Down
2 changes: 1 addition & 1 deletion core/lib/multivm/src/versions/vm_m6/transaction_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ pub fn derive_overhead(
let gas_limit = U256::from(gas_limit);
let encoded_len = U256::from(encoded_len);

// The MAX_TX_ERGS_LIMIT is formed in a way that may fullfills a single-instance circuits
// The MAX_TX_ERGS_LIMIT is formed in a way that may fulfills a single-instance circuits
// if used in full. That is, within MAX_TX_ERGS_LIMIT it is possible to fully saturate all the single-instance
// circuits.
let overhead_for_single_instance_circuits =
Expand Down
2 changes: 1 addition & 1 deletion core/lib/multivm/src/versions/vm_m6/vm_instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ pub struct VmExecutionResult {
pub l2_to_l1_logs: Vec<L2ToL1Log>,
pub return_data: Vec<u8>,

/// Value denoting the amount of gas spent withing VM invocation.
/// Value denoting the amount of gas spent within VM invocation.
/// Note that return value represents the difference between the amount of gas
/// available to VM before and after execution.
///
Expand Down
2 changes: 1 addition & 1 deletion core/lib/multivm/src/versions/vm_m6/vm_with_bootloader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,7 @@ pub(crate) fn get_bootloader_memory_for_encoded_tx(
let encoding_length = encoded_tx.len();
memory.extend((tx_description_offset..tx_description_offset + encoding_length).zip(encoded_tx));

// Note, +1 is moving for poitner
// Note, +1 is moving for pointer
let compressed_bytecodes_offset =
COMPRESSED_BYTECODES_OFFSET + 1 + previous_compressed_bytecode_size;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ pub(super) fn apply_tx_to_memory(
};
apply_l2_block(memory, &bootloader_l2_block, tx_index);

// Note, +1 is moving for poitner
// Note, +1 is moving for pointer
let compressed_bytecodes_offset = COMPRESSED_BYTECODES_OFFSET + 1 + compressed_bytecodes_size;

let encoded_compressed_bytecodes =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ async fn test_require_eip712() {
vm.get_eth_balance(beneficiary.address),
U256::from(888000088)
);
// Make sure that the tokens were transfered from the AA account.
// Make sure that the tokens were transferred from the AA account.
assert_eq!(
private_account_balance,
vm.get_eth_balance(private_account.address)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ pub(crate) fn get_debug_log<H: HistoryMode>(
let msg = String::from_utf8(msg).expect("Invalid debug message");
let data = U256::from_big_endian(&data);

// For long data, it is better to use hex-encoding for greater readibility
// For long data, it is better to use hex-encoding for greater readability
let data_str = if data > U256::from(u64::max_value()) {
let mut bytes = [0u8; 32];
data.to_big_endian(&mut bytes);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pub fn derive_overhead(
let gas_limit = U256::from(gas_limit);
let encoded_len = U256::from(encoded_len);

// The MAX_TX_ERGS_LIMIT is formed in a way that may fullfills a single-instance circuits
// The MAX_TX_ERGS_LIMIT is formed in a way that may fulfills a single-instance circuits
// if used in full. That is, within MAX_TX_ERGS_LIMIT it is possible to fully saturate all the single-instance
// circuits.
let overhead_for_single_instance_circuits =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ pub(super) fn apply_tx_to_memory(
};
apply_l2_block(memory, &bootloader_l2_block, tx_index);

// Note, +1 is moving for poitner
// Note, +1 is moving for pointer
let compressed_bytecodes_offset = COMPRESSED_BYTECODES_OFFSET + 1 + compressed_bytecodes_size;

let encoded_compressed_bytecodes =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ async fn test_require_eip712() {
vm.get_eth_balance(beneficiary.address),
U256::from(888000088)
);
// Make sure that the tokens were transfered from the AA account.
// Make sure that the tokens were transferred from the AA account.
assert_eq!(
private_account_balance,
vm.get_eth_balance(private_account.address)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ pub(crate) fn get_debug_log<H: HistoryMode>(
let msg = String::from_utf8(msg).expect("Invalid debug message");
let data = U256::from_big_endian(&data);

// For long data, it is better to use hex-encoding for greater readibility
// For long data, it is better to use hex-encoding for greater readability
let data_str = if data > U256::from(u64::max_value()) {
let mut bytes = [0u8; 32];
data.to_big_endian(&mut bytes);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pub fn derive_overhead(
let gas_limit = U256::from(gas_limit);
let encoded_len = U256::from(encoded_len);

// The MAX_TX_ERGS_LIMIT is formed in a way that may fullfills a single-instance circuits
// The MAX_TX_ERGS_LIMIT is formed in a way that may fulfills a single-instance circuits
// if used in full. That is, within MAX_TX_ERGS_LIMIT it is possible to fully saturate all the single-instance
// circuits.
let overhead_for_single_instance_circuits =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ contract CustomPaymaster is IPaymaster {
bool success = _transaction.payToTheBootloader();
require(success, "Failed to transfer funds to the bootloader");

// For now, refunds are not supported, so we just test the fact that the transfered context is correct
// For now, refunds are not supported, so we just test the fact that the transferred context is correct
txCounter += 1;
context = abi.encode(txCounter);
} else {
Expand Down
2 changes: 1 addition & 1 deletion etc/env/base/rust.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# We don't provide the group name like `[rust]` here, because we don't want
# these variables to be prefixed during the compiling.

# `RUST_LOG` environmnet variable for `env_logger`
# `RUST_LOG` environment variable for `env_logger`
# Here we use TOML multiline strings: newlines will be trimmed.
RUST_LOG="""\
zksync_core=debug,\
Expand Down
2 changes: 1 addition & 1 deletion etc/env/ext-node-docker.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ bootloader_hash="0x0100038581be3d0e201b3cc45d151ef5cc59eb3a0f146ad44f0f72abf00b5
default_aa_hash="0x0100038dc66b69be75ec31653c64cb931678299b9b659472772b2550b703f41c"

[rust]
# `RUST_LOG` environmnet variable for `env_logger`
# `RUST_LOG` environment variable for `env_logger`
# Here we use TOML multiline strings: newlines will be trimmed.
log="""\
warn,\
Expand Down
2 changes: 1 addition & 1 deletion etc/env/ext-node.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ bootloader_hash="0x0100038581be3d0e201b3cc45d151ef5cc59eb3a0f146ad44f0f72abf00b5
default_aa_hash="0x0100038dc66b69be75ec31653c64cb931678299b9b659472772b2550b703f41c"

[rust]
# `RUST_LOG` environmnet variable for `env_logger`
# `RUST_LOG` environment variable for `env_logger`
# Here we use TOML multiline strings: newlines will be trimmed.
log="""\
warn,\
Expand Down