diff --git a/bin/mpt-test/src/circuit/state_update.rs b/bin/mpt-test/src/circuit/state_update.rs index 8060959e34..a9271e6339 100644 --- a/bin/mpt-test/src/circuit/state_update.rs +++ b/bin/mpt-test/src/circuit/state_update.rs @@ -57,13 +57,13 @@ pub struct StateUpdateCircuitConfig { /// The MPT table, where the state updates are stored pub pi_mpt: MptTable, - /// Intance column, used to check public inputs + /// Instance column, used to check public inputs pub instance: Column, /// ONE if the first row, ZERO otherwise pub is_first: Column, - /// ONE if row is paddding, ZERO otherwise + /// ONE if row is padding, ZERO otherwise pub is_padding: IsZeroConfig, /// ONE is the last used row, ZERO otherwise @@ -465,7 +465,7 @@ impl Circuit for StateUpdateCircuit { ).unwrap() ); - // at beggining, set the old root and number of proofs + // at beginning, set the old root and number of proofs if offset == 0 { pi.push(Some(old_root_lo)); diff --git a/bus-mapping/README.md b/bus-mapping/README.md index e0cbea24da..de664a1bc7 100644 --- a/bus-mapping/README.md +++ b/bus-mapping/README.md @@ -158,7 +158,7 @@ On that way, we would get something like this for the Memory ops: | `key` | `val` | `rw` | `gc` | Note | |:------:| ------------- | ------- | ---- | ---------------------------------------- | | `0x40` | `0` | `Write` | | Init | -| `0x40` | `0x80` | `Write` | 0 | Assume written at the begining of `code` | +| `0x40` | `0x80` | `Write` | 0 | Assume written at the beginning of `code`| | `0x40` | `0x80` | `Read` | 4 | `56 MLOAD` | | - | | | | | | `0x80` | `0` | `Write` | | Init | diff --git a/bus-mapping/src/circuit_input_builder.rs b/bus-mapping/src/circuit_input_builder.rs index b8ea23f419..bfa77d1811 100644 --- a/bus-mapping/src/circuit_input_builder.rs +++ b/bus-mapping/src/circuit_input_builder.rs @@ -84,7 +84,7 @@ impl FeatureConfig { #[derive(Debug, Clone, Copy)] pub struct FixedCParams { /// Maximum number of rw operations in the state circuit (RwTable length / - /// nummber of rows). This must be at least the number of rw operations + /// number of rows). This must be at least the number of rw operations /// + 1, in order to allocate at least a Start row. pub max_rws: usize, // TODO: evm_rows: Maximum number of rows in the EVM Circuit @@ -190,7 +190,7 @@ pub struct CircuitInputBuilder { pub code_db: CodeDB, /// Block pub block: Block, - /// Circuits Setup Paramteres + /// Circuits Setup Parameters pub circuits_params: C, /// Block Context pub block_ctx: BlockContext, @@ -544,7 +544,7 @@ pub fn keccak_inputs(block: &Block, code_db: &CodeDB) -> Result>, Er } /// Generate the keccak inputs required by the SignVerify Chip from the -/// signature datas. +/// signature data. pub fn keccak_inputs_sign_verify(sigs: &[SignData]) -> Vec> { let mut inputs = Vec::new(); for sig in sigs { diff --git a/bus-mapping/src/circuit_input_builder/block.rs b/bus-mapping/src/circuit_input_builder/block.rs index 655eb8c073..fa0abc6f41 100644 --- a/bus-mapping/src/circuit_input_builder/block.rs +++ b/bus-mapping/src/circuit_input_builder/block.rs @@ -60,7 +60,7 @@ pub struct Block { /// chain id pub chain_id: Word, /// history hashes contains most recent 256 block hashes in history, where - /// the lastest one is at history_hashes[history_hashes.len() - 1]. + /// the latest one is at history_hashes[history_hashes.len() - 1]. pub history_hashes: Vec, /// coinbase pub coinbase: Address, diff --git a/bus-mapping/src/circuit_input_builder/call.rs b/bus-mapping/src/circuit_input_builder/call.rs index 564444d536..0f16847b36 100644 --- a/bus-mapping/src/circuit_input_builder/call.rs +++ b/bus-mapping/src/circuit_input_builder/call.rs @@ -63,7 +63,7 @@ pub struct Call { pub kind: CallKind, /// This call is being executed without write access (STATIC) pub is_static: bool, - /// This call generated implicity by a Transaction. + /// This call generated implicitly by a Transaction. pub is_root: bool, /// This call is persistent or call stack reverts at some point pub is_persistent: bool, diff --git a/bus-mapping/src/circuit_input_builder/execution.rs b/bus-mapping/src/circuit_input_builder/execution.rs index 045ba2e44b..f99cb3bac7 100644 --- a/bus-mapping/src/circuit_input_builder/execution.rs +++ b/bus-mapping/src/circuit_input_builder/execution.rs @@ -337,7 +337,7 @@ impl From<(Word, Word, Word)> for ExpStep { } } -/// Event representating an exponentiation `a ^ b == d (mod 2^256)`. +/// Event representing an exponentiation `a ^ b == d (mod 2^256)`. #[derive(Clone, Debug)] pub struct ExpEvent { /// Identifier for the exponentiation trace. diff --git a/bus-mapping/src/circuit_input_builder/tracer_tests.rs b/bus-mapping/src/circuit_input_builder/tracer_tests.rs index 0855d491eb..9ce73c4599 100644 --- a/bus-mapping/src/circuit_input_builder/tracer_tests.rs +++ b/bus-mapping/src/circuit_input_builder/tracer_tests.rs @@ -146,7 +146,7 @@ fn check_err_depth(step: &GethExecStep, next_step: Option<&GethExecStep>) -> boo #[test] fn tracer_err_depth() { - // Recursive CALL will exaust the call depth + // Recursive CALL will exhaust the call depth let code = bytecode! { PUSH1(0x0) // retLength PUSH1(0x0) // retOffset diff --git a/bus-mapping/src/error.rs b/bus-mapping/src/error.rs index 313ed43652..a125fdb421 100644 --- a/bus-mapping/src/error.rs +++ b/bus-mapping/src/error.rs @@ -105,7 +105,7 @@ pub enum OogError { SelfDestruct, } -// Given OpCodeId, returns correponding OogError. +// Given OpCodeId, returns corresponding OogError. impl From<&OpcodeId> for OogError { fn from(op: &OpcodeId) -> Self { match op { diff --git a/bus-mapping/src/evm/opcodes/callop.rs b/bus-mapping/src/evm/opcodes/callop.rs index 350915302a..395b22504f 100644 --- a/bus-mapping/src/evm/opcodes/callop.rs +++ b/bus-mapping/src/evm/opcodes/callop.rs @@ -170,7 +170,7 @@ impl Opcode for CallOpcode { // read balance of caller to compare to value for insufficient_balance checking // in circuit, also use for callcode successful case check balance is // indeed larger than transfer value. for call opcode, it does in - // tranfer gadget implicitly. + // transfer gadget implicitly. state.account_read( &mut exec_step, call.caller_address, diff --git a/bus-mapping/src/evm/opcodes/error_write_protection.rs b/bus-mapping/src/evm/opcodes/error_write_protection.rs index 2c9bd0b87e..65c3cb9eee 100644 --- a/bus-mapping/src/evm/opcodes/error_write_protection.rs +++ b/bus-mapping/src/evm/opcodes/error_write_protection.rs @@ -44,7 +44,7 @@ impl Opcode for ErrorWriteProtection { .contains(&geth_step.op)); if geth_step.op == OpcodeId::CALL { - // get only the frist three stack elements since the third one is the value we + // get only the first three stack elements since the third one is the value we // want to check. for i in 0..3 { state.stack_read( diff --git a/bus-mapping/src/lib.rs b/bus-mapping/src/lib.rs index abd38f9141..f370e4b356 100644 --- a/bus-mapping/src/lib.rs +++ b/bus-mapping/src/lib.rs @@ -187,7 +187,7 @@ //! | `key` | `val` | `rw` | `gc` | Note | //! |:------:| ------------- | ------- | ---- | ---------------------------------------- | //! | `0x40` | `0` | `Write` | | Init | -//! | `0x40` | `0x80` | `Write` | 0 | Assume written at the begining of `code` | +//! | `0x40` | `0x80` | `Write` | 0 | Assume written at the beginning of `code`| //! | `0x40` | `0x80` | `Read` | 4 | `56 MLOAD` | //! | - | | | | | //! | `0x80` | `0` | `Write` | | Init | @@ -213,7 +213,7 @@ //! See: #![cfg_attr(docsrs, feature(doc_cfg))] -// We want to have UPPERCASE idents sometimes. +// We want to have UPPERCASE indents sometimes. #![allow(non_snake_case)] // Catch documentation errors caused by code changes. #![deny(rustdoc::broken_intra_doc_links)] diff --git a/bus-mapping/src/mock.rs b/bus-mapping/src/mock.rs index 08a581e318..31c449c9a5 100644 --- a/bus-mapping/src/mock.rs +++ b/bus-mapping/src/mock.rs @@ -20,7 +20,7 @@ pub struct BlockData { /// chain id pub chain_id: Word, /// history hashes contains most recent 256 block hashes in history, where - /// the lastest one is at history_hashes[history_hashes.len() - 1]. + /// the latest one is at history_hashes[history_hashes.len() - 1]. pub history_hashes: Vec, /// Block from geth pub eth_block: eth_types::Block, diff --git a/bus-mapping/src/operation.rs b/bus-mapping/src/operation.rs index 26469c77b5..e2a3061f1d 100644 --- a/bus-mapping/src/operation.rs +++ b/bus-mapping/src/operation.rs @@ -90,7 +90,7 @@ impl RWCounter { } } -/// Enum used to differenciate between EVM Stack, Memory and Storage operations. +/// Enum used to differentiate between EVM Stack, Memory and Storage operations. /// This is also used as the RwTableTag for the RwTable. #[derive(Debug, Clone, PartialEq, Eq, Copy, EnumIter, Hash)] pub enum Target { @@ -1038,7 +1038,7 @@ impl Operation { &mut self.op } - // /// Matches over an `Operation` returning the [`Target`] of the iternal + // /// Matches over an `Operation` returning the [`Target`] of the internal // op /// it stores inside. // pub const fn target(&self) -> Target { // self.op.target() diff --git a/bus-mapping/src/operation/container.rs b/bus-mapping/src/operation/container.rs index 21d1918895..cf2e4dcf22 100644 --- a/bus-mapping/src/operation/container.rs +++ b/bus-mapping/src/operation/container.rs @@ -16,7 +16,7 @@ use itertools::Itertools; /// [`ExecStep`](crate::circuit_input_builder::ExecStep). /// /// Finally, the container also provides the capability of retrieving all of the -/// `Stack`, `Memory` or `Storage` operations ordered according to the criterias +/// `Stack`, `Memory` or `Storage` operations ordered according to the criteria /// they have specified. /// That serves as a way to get an input with which is easy to work with in /// order to construct the State proof. diff --git a/eth-types/src/geth_types.rs b/eth-types/src/geth_types.rs index b40c107a47..7c81808d29 100644 --- a/eth-types/src/geth_types.rs +++ b/eth-types/src/geth_types.rs @@ -167,7 +167,7 @@ pub struct Transaction { /// Gas Limit / Supplied gas /// U64 type is required to serialize into proper hex with 0x prefix pub gas_limit: U64, - /// Transfered value + /// Transferred value pub value: Word, /// Gas Price pub gas_price: Word, @@ -359,7 +359,7 @@ impl Transaction { ..response::Transaction::default() } } - /// Convinient method for gas limit + /// Convenient method for gas limit pub fn gas(&self) -> u64 { self.gas_limit.as_u64() } diff --git a/eth-types/src/keccak.rs b/eth-types/src/keccak.rs index 3bef09e94a..b697a5743c 100644 --- a/eth-types/src/keccak.rs +++ b/eth-types/src/keccak.rs @@ -253,7 +253,7 @@ impl Sponge { } } -/// Convinient method to get 32 bytes digest +/// Convenient method to get 32 bytes digest pub fn keccak256(msg: &[u8]) -> [u8; 32] { let mut keccak = Keccak::default(); keccak.update(msg); diff --git a/eth-types/src/sign_types.rs b/eth-types/src/sign_types.rs index af5dd261c4..c3104903fd 100644 --- a/eth-types/src/sign_types.rs +++ b/eth-types/src/sign_types.rs @@ -140,7 +140,7 @@ pub fn recover_pk( } lazy_static! { - /// Secp256k1 Curve Scalar. Referece: Section 2.4.1 (parameter `n`) in "SEC 2: Recommended + /// Secp256k1 Curve Scalar. Reference: Section 2.4.1 (parameter `n`) in "SEC 2: Recommended /// Elliptic Curve Domain Parameters" document at http://www.secg.org/sec2-v2.pdf pub static ref SECP256K1_Q: BigUint = BigUint::from_bytes_le(&(secp256k1::Fq::ZERO - secp256k1::Fq::ONE).to_repr()) + 1u64; } diff --git a/gadgets/src/is_zero.rs b/gadgets/src/is_zero.rs index ed44aa56a0..db89ff28ba 100644 --- a/gadgets/src/is_zero.rs +++ b/gadgets/src/is_zero.rs @@ -52,7 +52,7 @@ impl IsZeroConfig { } #[derive(Debug, Clone)] -/// Wrapper arround [`IsZeroConfig`] for which [`Chip`] is implemented. +/// Wrapper around [`IsZeroConfig`] for which [`Chip`] is implemented. pub struct IsZeroChip { config: IsZeroConfig, } diff --git a/geth-utils/gethutil/mpt/state/statedb.go b/geth-utils/gethutil/mpt/state/statedb.go index 616f629b6d..787319705c 100644 --- a/geth-utils/gethutil/mpt/state/statedb.go +++ b/geth-utils/gethutil/mpt/state/statedb.go @@ -767,7 +767,7 @@ func (s *StateDB) Copy() *StateDB { // nil if object, exist := s.stateObjects[addr]; exist { // Even though the original object is dirty, we are not copying the journal, - // so we need to make sure that anyside effect the journal would have caused + // so we need to make sure that any side effect the journal would have caused // during a commit (or similar op) is already applied to the copy. state.stateObjects[addr] = object.deepCopy(state) @@ -816,7 +816,7 @@ func (s *StateDB) Copy() *StateDB { } if s.snaps != nil { // In order for the miner to be able to use and make additions - // to the snapshot tree, we need to copy that aswell. + // to the snapshot tree, we need to copy that as well. // Otherwise, any block mined by ourselves will cause gaps in the tree, // and force the miner to operate trie-backed only state.snaps = s.snaps diff --git a/geth-utils/gethutil/mpt/trie/hasher.go b/geth-utils/gethutil/mpt/trie/hasher.go index c96677415b..4904340b7b 100644 --- a/geth-utils/gethutil/mpt/trie/hasher.go +++ b/geth-utils/gethutil/mpt/trie/hasher.go @@ -40,7 +40,7 @@ func (b *sliceBuffer) Reset() { type hasher struct { sha crypto.KeccakState tmp sliceBuffer - parallel bool // Whether to use paralallel threads when hashing + parallel bool // Whether to use parallel threads when hashing } // hasherPool holds pureHashers @@ -189,7 +189,7 @@ func (h *hasher) HashData(data []byte) HashNode { } // ProofHash is used to construct trie proofs, and returns the 'collapsed' -// node (for later RLP encoding) aswell as the hashed node -- unless the +// node (for later RLP encoding) as well as the hashed node -- unless the // node is smaller than 32 bytes, in which case it will be returned as is. // This method does not do anything on value- or hash-nodes. func (h *hasher) ProofHash(original Node) (collapsed, hashed Node) { diff --git a/geth-utils/gethutil/mpt/types/block.go b/geth-utils/gethutil/mpt/types/block.go index 360f1eb47c..b22efb6692 100644 --- a/geth-utils/gethutil/mpt/types/block.go +++ b/geth-utils/gethutil/mpt/types/block.go @@ -314,7 +314,7 @@ func (b *Block) Header() *Header { return CopyHeader(b.header) } func (b *Block) Body() *Body { return &Body{b.transactions, b.uncles} } // Size returns the true RLP encoded storage size of the block, either by encoding -// and returning it, or returning a previsouly cached value. +// and returning it, or returning a previously cached value. func (b *Block) Size() common.StorageSize { if size := b.size.Load(); size != nil { return size.(common.StorageSize) diff --git a/geth-utils/gethutil/trace.go b/geth-utils/gethutil/trace.go index e6d8464d36..f0cb76cffd 100644 --- a/geth-utils/gethutil/trace.go +++ b/geth-utils/gethutil/trace.go @@ -117,7 +117,7 @@ type Transaction struct { type TraceConfig struct { ChainID *hexutil.Big `json:"chain_id"` // HistoryHashes contains most recent 256 block hashes in history, - // where the lastest one is at HistoryHashes[len(HistoryHashes)-1]. + // where the latest one is at HistoryHashes[len(HistoryHashes)-1]. HistoryHashes []*hexutil.Big `json:"history_hashes"` Block Block `json:"block_constants"` Accounts map[common.Address]Account `json:"accounts"` diff --git a/geth-utils/src/mpt.rs b/geth-utils/src/mpt.rs index 46c60d0e65..6f212f2f54 100644 --- a/geth-utils/src/mpt.rs +++ b/geth-utils/src/mpt.rs @@ -96,7 +96,7 @@ pub fn get_witness(block_no: u64, mods: &[TrieModification], node_url: &str) -> unsafe { go::FreeString(c_str.as_ptr()) }; // Note: previously this function returned a Vec of Nodes, but now returning a JSON string - // to avoid imporing zkEVM circuit here (that will create a circular dependency). + // to avoid importing zkEVM circuit here (that will create a circular dependency). // TODO: consider defining Node types in another crate. json diff --git a/integration-tests/build.rs b/integration-tests/build.rs index b42601fe88..6b937e3bf9 100644 --- a/integration-tests/build.rs +++ b/integration-tests/build.rs @@ -45,7 +45,7 @@ enum BuildError { /// Vec is empty #[error("ArtifactError")] ArtifactError, - /// Functon compile_output failed to encode CompilerInput to Vec + /// Function compile_output failed to encode CompilerInput to Vec #[error("CompileOutputFailure({0:})")] CompileOutputFailure(String), /// Could not convert Vec to CompilerOutput diff --git a/integration-tests/src/bin/gen_blockchain_data.rs b/integration-tests/src/bin/gen_blockchain_data.rs index e9eac2682a..dd4f3ad4ef 100644 --- a/integration-tests/src/bin/gen_blockchain_data.rs +++ b/integration-tests/src/bin/gen_blockchain_data.rs @@ -63,7 +63,7 @@ async fn dump_tx_trace(prov: Provider, receipt: TransactionReceipt, name: .expect("Failed to get transaction debug trace"); let filename = format!("{}_trace.json", name); serde_json::to_writer(&File::create(filename).expect("cannot create file"), &trace) - .expect("Could not seralize trace as json data"); + .expect("Could not serialize trace as json data"); } fn erc20_transfer( diff --git a/integration-tests/src/integration_test_circuits.rs b/integration-tests/src/integration_test_circuits.rs index 9631b36316..bfa239d236 100644 --- a/integration-tests/src/integration_test_circuits.rs +++ b/integration-tests/src/integration_test_circuits.rs @@ -164,7 +164,7 @@ fn test_actual_circuit>( let mut transcript = PoseidonTranscript::new(Vec::new()); - // change instace to slice + // change instance to slice let instance: Vec<&[Fr]> = instance.iter().map(|v| v.as_slice()).collect(); log::info!("gen circuit proof"); @@ -214,7 +214,7 @@ fn test_actual_root_circuit>( let mut transcript = EvmTranscript::<_, NativeLoader, _, _>::new(vec![]); - // change instace to slice + // change instance to slice let instance: Vec<&[Fr]> = instance.iter().map(|v| v.as_slice()).collect(); log::info!("gen root circuit proof"); diff --git a/integration-tests/tests/circuit_input_builder.rs b/integration-tests/tests/circuit_input_builder.rs index d2fbd6a22b..f5eb9de752 100644 --- a/integration-tests/tests/circuit_input_builder.rs +++ b/integration-tests/tests/circuit_input_builder.rs @@ -74,7 +74,7 @@ macro_rules! declare_tests { } // This test builds the complete circuit inputs for the block where 1 ETH is -// transfered. +// transferred. declare_tests!(test_circuit_input_builder_block_transfer_0, "Transfer 0"); // This test builds the complete circuit inputs for the block where the Greeter // contract is deployed. diff --git a/mock/src/test_ctx.rs b/mock/src/test_ctx.rs index 23c3e38218..164b27e589 100644 --- a/mock/src/test_ctx.rs +++ b/mock/src/test_ctx.rs @@ -80,7 +80,7 @@ pub struct TestContext { /// Account list pub accounts: [Account; NACC], /// history hashes contains most recent 256 block hashes in history, where - /// the lastest one is at history_hashes[history_hashes.len() - 1]. + /// the latest one is at history_hashes[history_hashes.len() - 1]. pub history_hashes: Vec, /// Block from geth pub eth_block: eth_types::Block, @@ -172,7 +172,7 @@ impl TestContext { } } -/// Collection of helper functions which contribute to specific rutines on the +/// Collection of helper functions which contribute to specific routines on the /// builder pattern used to construct [`TestContext`]s. pub mod helpers { use super::*; diff --git a/testool/README.md b/testool/README.md index 4a619374c5..0f389d8ad6 100644 --- a/testool/README.md +++ b/testool/README.md @@ -102,7 +102,7 @@ Sometimes there are some files or specific tests that we want to disable at all. When the command line parameter `--report` is defined, it automatically: - After the execution, a two files are created in the `report` folder. They are - - `-.hml` with the browseable results of the execution. + - `-.hml` with the browsable results of the execution. - `-.csv` with the raw results of the execution - The HTML file also contains the diff with the previous result. The previous result file is the more recent csv file with different commit from the current one diff --git a/testool/src/abi.rs b/testool/src/abi.rs index e3e9287bbb..34e1699253 100644 --- a/testool/src/abi.rs +++ b/testool/src/abi.rs @@ -15,7 +15,7 @@ pub fn encode_funccall(spec: &str) -> Result { let func_name = func_name_params[0]; let func_params = &func_name_params[1..func_name_params.len() - 1]; - // transform func_params and args into the appropiate types + // transform func_params and args into the appropriate types let map_type = |t| match t { "uint" => ParamType::Uint(256), diff --git a/testool/src/main.rs b/testool/src/main.rs index e94bffff9d..1687af80fb 100644 --- a/testool/src/main.rs +++ b/testool/src/main.rs @@ -109,7 +109,7 @@ fn go() -> Result<()> { env_logger::Builder::from_env(env_logger::Env::default().default_filter_or("info")).init(); log::info!("Using suite '{}'", args.suite); - log::info!("Parsing and compliling tests..."); + log::info!("Parsing and compiling tests..."); let compiler = Compiler::new(true, Some(PathBuf::from(CODEHASH_FILE)))?; let suite = config.suite(&args.suite)?.clone(); let state_tests = load_statetests_suite(&suite.path, config, compiler)?; diff --git a/zkevm-circuits/src/bin/stats/helpers.rs b/zkevm-circuits/src/bin/stats/helpers.rs index fa470f0143..4594c187e4 100644 --- a/zkevm-circuits/src/bin/stats/helpers.rs +++ b/zkevm-circuits/src/bin/stats/helpers.rs @@ -213,7 +213,7 @@ pub(crate) fn print_circuit_stats_by_states( assert_eq!(ExecState::Op(opcode), step.exec_state); let height = fn_height(&builder.block, state, step_index); - // Substract 1 to step_index to remove the `BeginTx` step, which doesn't appear + // Subtract 1 to step_index to remove the `BeginTx` step, which doesn't appear // in the geth trace. let geth_step = &block.geth_traces[0].struct_logs[step_index - 1]; assert_eq!(opcode, geth_step.op); diff --git a/zkevm-circuits/src/bytecode_circuit/test.rs b/zkevm-circuits/src/bytecode_circuit/test.rs index e28f8c2cf8..b5f69c4481 100644 --- a/zkevm-circuits/src/bytecode_circuit/test.rs +++ b/zkevm-circuits/src/bytecode_circuit/test.rs @@ -194,7 +194,7 @@ fn bytecode_invalid_is_code() { }) .verify(false); } - // Mark the 4rd byte as data (is code) + // Mark the 4th byte as data (is code) { BytecodeCircuit::::from_bytes(bytecodes.clone(), k) .mut_rows(|rows| { diff --git a/zkevm-circuits/src/circuit_tools/constraint_builder.rs b/zkevm-circuits/src/circuit_tools/constraint_builder.rs index 814b2eaa0f..b61d58b26d 100644 --- a/zkevm-circuits/src/circuit_tools/constraint_builder.rs +++ b/zkevm-circuits/src/circuit_tools/constraint_builder.rs @@ -32,7 +32,7 @@ fn get_condition_expr(conditions: &Vec>) -> Expression { - /// Desciption + /// Description pub description: &'static str, /// Condition under which the lookup needs to be done pub regional_condition: Expression, @@ -47,7 +47,7 @@ pub struct TableData { /// Lookup data #[derive(Clone, Debug)] pub struct LookupData { - /// Desciption + /// Description pub description: String, /// Condition under which the lookup needs to be done pub regional_condition: Expression, @@ -130,7 +130,7 @@ pub struct ConstraintBuilder { max_degree: usize, /// conditions for constraints conditions: Vec>, - /// Columns whoes equality constraints needed to be enable + /// Columns whose equality constraints needed to be enable equalities: Vec>, /// The tables pub tables: HashMap>>, @@ -147,7 +147,7 @@ pub struct ConstraintBuilder { pub region_id: usize, /// lookup input challenge pub lookup_challenge: Option>, - /// state contect + /// state context pub state_context: Vec>, /// state constraints start pub region_constraints_start: usize, @@ -213,7 +213,7 @@ impl ConstraintBuilder { } pub(crate) fn pop_region(&mut self) { - // Apply the region condition to all contraints added in this region + // Apply the region condition to all constraints added in this region let condition = get_condition_expr(&self.state_context); for idx in self.region_constraints_start..self.constraints.len() { self.constraints[idx].1 = condition.expr() * self.constraints[idx].1.clone(); @@ -810,7 +810,7 @@ impl ExprResult for Expression { } } -/// Implement `ExprResult` for tupples +/// Implement `ExprResult` for tuples #[macro_export] macro_rules! impl_expr_result { ($($type:ty),*) => { diff --git a/zkevm-circuits/src/copy_circuit.rs b/zkevm-circuits/src/copy_circuit.rs index dff1f99a42..644a951900 100644 --- a/zkevm-circuits/src/copy_circuit.rs +++ b/zkevm-circuits/src/copy_circuit.rs @@ -431,7 +431,7 @@ impl SubCircuitConfig for CopyCircuitConfig { .collect() }); - meta.create_gate("id_hi === 0 when Momory", |meta| { + meta.create_gate("id_hi === 0 when Memory", |meta| { let mut cb = BaseConstraintBuilder::default(); let cond = tag.value_equals(CopyDataType::Memory, Rotation::cur())(meta) diff --git a/zkevm-circuits/src/ecc_circuit.rs b/zkevm-circuits/src/ecc_circuit.rs index 0764e19d76..5c4c0d092a 100644 --- a/zkevm-circuits/src/ecc_circuit.rs +++ b/zkevm-circuits/src/ecc_circuit.rs @@ -570,7 +570,7 @@ impl EccCircuit { ecc_chip.assert_equal(ctx, &rand_point, &sum3); - log::trace!("[ECC] EcAdd Assignmnet END:"); + log::trace!("[ECC] EcAdd Assignment END:"); log_context_cursor!(ctx); EcAddDecomposed { @@ -602,7 +602,7 @@ impl EccCircuit { powers_of_256: &[QuantumCell], op: &EcMulOp, ) -> EcMulDecomposed { - log::trace!("[ECC] ==> EcMul Assignmnet START:"); + log::trace!("[ECC] ==> EcMul Assignment START:"); log_context_cursor!(ctx); let (px, px_cells, px_valid, px_is_zero) = @@ -653,7 +653,7 @@ impl EccCircuit { let point_r_got = ecc_chip.select(ctx, &point_r_got, &infinity, &is_valid); ecc_chip.assert_equal(ctx, &point_r.ec_point, &point_r_got); - log::trace!("[ECC] EcMul Assignmnet END:"); + log::trace!("[ECC] EcMul Assignment END:"); log_context_cursor!(ctx); EcMulDecomposed { diff --git a/zkevm-circuits/src/evm_circuit/execution/addmod.rs b/zkevm-circuits/src/evm_circuit/execution/addmod.rs index 9bd928a7ce..a952b166bc 100644 --- a/zkevm-circuits/src/evm_circuit/execution/addmod.rs +++ b/zkevm-circuits/src/evm_circuit/execution/addmod.rs @@ -64,7 +64,7 @@ impl ExecutionGadget for AddModGadget { let n = cb.query_word32(); let r = cb.query_word32(); - // auxiliar witness + // auxiliary witness let k = cb.query_word32(); let a_reduced = cb.query_word32(); let d = cb.query_word32(); @@ -161,7 +161,7 @@ impl ExecutionGadget for AddModGadget { // get stack values let [mut r, n, b, a] = [3, 2, 1, 0].map(|index| block.get_rws(step, index).stack_value()); - // assing a,b & n stack values + // assign a,b & n stack values self.a.assign_u256(region, offset, a)?; self.b.assign_u256(region, offset, b)?; self.n.assign_u256(region, offset, n)?; diff --git a/zkevm-circuits/src/evm_circuit/execution/calldatacopy.rs b/zkevm-circuits/src/evm_circuit/execution/calldatacopy.rs index f0d5155cac..99f6cdd933 100644 --- a/zkevm-circuits/src/evm_circuit/execution/calldatacopy.rs +++ b/zkevm-circuits/src/evm_circuit/execution/calldatacopy.rs @@ -116,7 +116,7 @@ impl ExecutionGadget for CallDataCopyGadget { CopyDataType::Memory.expr(), ); cb.condition(memory_address.has_length(), |cb| { - // Set source start to the minimun value of data offset and call data length. + // Set source start to the minimum value of data offset and call data length. let src_addr = call_data_offset.expr() + select::expr( data_offset.lt_cap(), diff --git a/zkevm-circuits/src/evm_circuit/execution/calldataload.rs b/zkevm-circuits/src/evm_circuit/execution/calldataload.rs index bc133db5c2..67b2efda19 100644 --- a/zkevm-circuits/src/evm_circuit/execution/calldataload.rs +++ b/zkevm-circuits/src/evm_circuit/execution/calldataload.rs @@ -115,7 +115,7 @@ impl ExecutionGadget for CallDataLoadGadget { }, ); - // Set source start to the minimun value of data offset and call data length. + // Set source start to the minimum value of data offset and call data length. let src_addr = call_data_offset.expr() + select::expr( data_offset.lt_cap(), diff --git a/zkevm-circuits/src/evm_circuit/execution/callop.rs b/zkevm-circuits/src/evm_circuit/execution/callop.rs index 66716640c1..761e54d50f 100644 --- a/zkevm-circuits/src/evm_circuit/execution/callop.rs +++ b/zkevm-circuits/src/evm_circuit/execution/callop.rs @@ -234,7 +234,7 @@ impl ExecutionGadget for CallOpGadget { // Verify transfer only for CALL opcode in the successful case. If value == 0, // skip the transfer (this is necessary for non-existing accounts, which - // will not be crated when value is 0 and so the callee balance lookup + // will not be created when value is 0 and so the callee balance lookup // would be invalid). let transfer = cb.condition(is_call.expr() * is_precheck_ok.expr(), |cb| { TransferGadget::construct( diff --git a/zkevm-circuits/src/evm_circuit/execution/codecopy.rs b/zkevm-circuits/src/evm_circuit/execution/codecopy.rs index 45c2fc0360..fc019ec674 100644 --- a/zkevm-circuits/src/evm_circuit/execution/codecopy.rs +++ b/zkevm-circuits/src/evm_circuit/execution/codecopy.rs @@ -68,7 +68,7 @@ impl ExecutionGadget for CodeCopyGadget { cb.stack_pop(code_offset.original_word().to_word()); cb.stack_pop(WordLoHi::from_lo_unchecked(length.expr())); - // Construct memory address in the destionation (memory) to which we copy code. + // Construct memory address in the destination (memory) to which we copy code. let dst_memory_addr = MemoryAddressGadget::construct(cb, dst_memory_offset, length); // Fetch the hash of bytecode running in current environment. @@ -89,7 +89,7 @@ impl ExecutionGadget for CodeCopyGadget { let copy_rwc_inc = cb.query_cell(); cb.condition(dst_memory_addr.has_length(), |cb| { - // Set source start to the minimun value of code offset and code size. + // Set source start to the minimum value of code offset and code size. let src_addr = select::expr( code_offset.lt_cap(), code_offset.valid_value(), diff --git a/zkevm-circuits/src/evm_circuit/execution/end_tx.rs b/zkevm-circuits/src/evm_circuit/execution/end_tx.rs index 8c68776fdc..5f650f693a 100644 --- a/zkevm-circuits/src/evm_circuit/execution/end_tx.rs +++ b/zkevm-circuits/src/evm_circuit/execution/end_tx.rs @@ -467,7 +467,7 @@ mod test { .sorted_by_key(|a| a.rw_counter()) .tuple_windows() .for_each(|(a, b)| { - // chech there is no consecutive write with same txid value + // check there is no consecutive write with same txid value assert!(a.rw_counter() != b.rw_counter()); assert!(a.value_assignment() != b.value_assignment()); }) diff --git a/zkevm-circuits/src/evm_circuit/execution/extcodecopy.rs b/zkevm-circuits/src/evm_circuit/execution/extcodecopy.rs index bb05e5237d..5cda8007d8 100644 --- a/zkevm-circuits/src/evm_circuit/execution/extcodecopy.rs +++ b/zkevm-circuits/src/evm_circuit/execution/extcodecopy.rs @@ -116,7 +116,7 @@ impl ExecutionGadget for ExtcodecopyGadget { let copy_rwc_inc = cb.query_cell(); cb.condition(memory_address.has_length(), |cb| { - // Set source start to the minimun value of code offset and code size. + // Set source start to the minimum value of code offset and code size. let src_addr = select::expr( code_offset.lt_cap(), code_offset.valid_value(), diff --git a/zkevm-circuits/src/evm_circuit/execution/logs.rs b/zkevm-circuits/src/evm_circuit/execution/logs.rs index 47456bcafc..327cae451f 100644 --- a/zkevm-circuits/src/evm_circuit/execution/logs.rs +++ b/zkevm-circuits/src/evm_circuit/execution/logs.rs @@ -402,10 +402,10 @@ mod test { code.write_op(cur_op_code); // second log op code - // prepare additinal bytes for memory reading + // prepare additional bytes for memory reading code.append(&prepare_code(&pushdata, 0x20)); mstart = 0x00usize; - // when mszie > 0x20 (32) needs multi copy steps + // when msize > 0x20 (32) needs multi copy steps msize = 0x30usize; for topic in topics { code.push(32, *topic); diff --git a/zkevm-circuits/src/evm_circuit/execution/origin.rs b/zkevm-circuits/src/evm_circuit/execution/origin.rs index 720d8d21b0..2c51b35397 100644 --- a/zkevm-circuits/src/evm_circuit/execution/origin.rs +++ b/zkevm-circuits/src/evm_circuit/execution/origin.rs @@ -73,7 +73,7 @@ impl ExecutionGadget for OriginGadget { ) -> Result<(), Error> { let origin = block.get_rws(step, 1).stack_value(); - // Assing TxId. + // Assign TxId. self.tx_id .assign(region, offset, Value::known(F::from(tx.id)))?; diff --git a/zkevm-circuits/src/evm_circuit/execution/returndatacopy.rs b/zkevm-circuits/src/evm_circuit/execution/returndatacopy.rs index d84d324046..7e1a8b57aa 100644 --- a/zkevm-circuits/src/evm_circuit/execution/returndatacopy.rs +++ b/zkevm-circuits/src/evm_circuit/execution/returndatacopy.rs @@ -94,7 +94,7 @@ impl ExecutionGadget for ReturnDataCopyGadget { WordLoHi::from_lo_unchecked(return_data_size.expr()), ); - // 3. contraints for copy: copy overflow check + // 3. constraints for copy: copy overflow check // i.e., offset + size <= return_data_size let in_bound_check = RangeCheckGadget::construct( cb, diff --git a/zkevm-circuits/src/evm_circuit/execution/sar.rs b/zkevm-circuits/src/evm_circuit/execution/sar.rs index fd09750a16..1bd8dc9805 100644 --- a/zkevm-circuits/src/evm_circuit/execution/sar.rs +++ b/zkevm-circuits/src/evm_circuit/execution/sar.rs @@ -124,7 +124,7 @@ impl ExecutionGadget for SarGadget { lt }); - // Merge contraints + // Merge constraints let shf_lo_div64_eq0 = cb.is_zero(shf_div64.expr()); let shf_lo_div64_eq1 = cb.is_eq(shf_div64.expr(), 1.expr()); let shf_lo_div64_eq2 = cb.is_eq(shf_div64.expr(), 2.expr()); diff --git a/zkevm-circuits/src/evm_circuit/param.rs b/zkevm-circuits/src/evm_circuit/param.rs index c69cfeb503..e2e4550418 100644 --- a/zkevm-circuits/src/evm_circuit/param.rs +++ b/zkevm-circuits/src/evm_circuit/param.rs @@ -180,7 +180,7 @@ lazy_static::lazy_static! { }; // Step slot height in evm circuit // We enable the invalid_tx feature to get invalid tx's ExecutionState height - // We garentee the heights of other ExecutionStates remains unchanged in the following test + // We guarantee the heights of other ExecutionStates remains unchanged in the following test pub(crate) static ref EXECUTION_STATE_HEIGHT_MAP : HashMap = get_step_height_map(*INVALID_TX_CONFIG); } fn get_step_height_map(feature_config: FeatureConfig) -> HashMap { diff --git a/zkevm-circuits/src/evm_circuit/step.rs b/zkevm-circuits/src/evm_circuit/step.rs index 85deb21ba6..195cc77321 100644 --- a/zkevm-circuits/src/evm_circuit/step.rs +++ b/zkevm-circuits/src/evm_circuit/step.rs @@ -596,7 +596,7 @@ impl ExecutionState { .collect() } - /// Get the state hight + /// Get the state height pub fn get_step_height_option(&self) -> Option { EXECUTION_STATE_HEIGHT_MAP.get(self).copied() } diff --git a/zkevm-circuits/src/evm_circuit/table.rs b/zkevm-circuits/src/evm_circuit/table.rs index da51d63c69..cfa5170fd6 100644 --- a/zkevm-circuits/src/evm_circuit/table.rs +++ b/zkevm-circuits/src/evm_circuit/table.rs @@ -47,7 +47,7 @@ pub enum FixedTableTag { Pow2, /// Lookup constant gas cost for opcodes ConstantGasCost, - /// Preocmpile information + /// Precompile information PrecompileInfo, } impl_expr!(FixedTableTag); @@ -253,7 +253,7 @@ impl RwValues { #[derive(Clone, Debug)] pub(crate) enum Lookup { - /// Lookup to fixed table, which contains serveral pre-built tables such as + /// Lookup to fixed table, which contains several pre-built tables such as /// range tables or bitwise tables. Fixed { /// Tag to specify which table to lookup. diff --git a/zkevm-circuits/src/evm_circuit/util/common_gadget.rs b/zkevm-circuits/src/evm_circuit/util/common_gadget.rs index 0c323be986..04ee168d49 100644 --- a/zkevm-circuits/src/evm_circuit/util/common_gadget.rs +++ b/zkevm-circuits/src/evm_circuit/util/common_gadget.rs @@ -748,7 +748,7 @@ impl, const IS_SUCCESS_CAL let cd_address = MemAddrGadget::construct_self(cb); let rd_address = MemAddrGadget::construct_self(cb); // Lookup values from stack - // `callee_address` is poped from stack and used to check if it exists in + // `callee_address` is popped from stack and used to check if it exists in // access list and get code hash. // For CALLCODE, both caller and callee addresses are `current_callee_address`. // For DELEGATECALL, caller address is `current_caller_address` and diff --git a/zkevm-circuits/src/evm_circuit/util/constraint_builder.rs b/zkevm-circuits/src/evm_circuit/util/constraint_builder.rs index 01342631f3..c7fce109ab 100644 --- a/zkevm-circuits/src/evm_circuit/util/constraint_builder.rs +++ b/zkevm-circuits/src/evm_circuit/util/constraint_builder.rs @@ -1562,7 +1562,7 @@ impl<'a, F: Field> EVMConstraintBuilder<'a, F> { /// and constrain it using the provided respective constraint. This mechanism is specifically /// used for constraining the internal states for precompile calls. Each precompile call /// expects a different cell layout, but since the next state can be at the most one precompile - /// state, we can re-use cells assgined across all thos conditions. + /// state, we can re-use cells assigned across all those conditions. pub(crate) fn constrain_mutually_exclusive_next_step( &mut self, conditions: Vec>, diff --git a/zkevm-circuits/src/evm_circuit/util/instrumentation.rs b/zkevm-circuits/src/evm_circuit/util/instrumentation.rs index a238a542f8..fb7f76db2f 100644 --- a/zkevm-circuits/src/evm_circuit/util/instrumentation.rs +++ b/zkevm-circuits/src/evm_circuit/util/instrumentation.rs @@ -37,7 +37,7 @@ impl Instrument { self.states.push((execution_state, sizes)); } - /// Dissasembles the instrumentation data and returns a collection of + /// Disassembles the instrumentation data and returns a collection of /// `ExecStateReport`s. One for each EVM `ExecutionState`. pub fn analyze(&self) -> Vec { let mut report_collection = vec![]; diff --git a/zkevm-circuits/src/evm_circuit/util/memory_gadget.rs b/zkevm-circuits/src/evm_circuit/util/memory_gadget.rs index bbd2bbcfac..3f59a5d0b0 100644 --- a/zkevm-circuits/src/evm_circuit/util/memory_gadget.rs +++ b/zkevm-circuits/src/evm_circuit/util/memory_gadget.rs @@ -568,7 +568,7 @@ pub(crate) struct BufferReaderGadget; MAX_BYTES], - /// The selectors that indicate if the corrsponding byte contains real data + /// The selectors that indicate if the corresponding byte contains real data /// or is padded selectors: [Cell; MAX_BYTES], /// The min gadget to take the minimum of addr_start and addr_end diff --git a/zkevm-circuits/src/keccak_circuit.rs b/zkevm-circuits/src/keccak_circuit.rs index b02544fec5..529cd61c9d 100644 --- a/zkevm-circuits/src/keccak_circuit.rs +++ b/zkevm-circuits/src/keccak_circuit.rs @@ -296,7 +296,7 @@ impl SubCircuitConfig for KeccakCircuitConfig { // that allows reusing the same parts in an optimal way for the chi step. // We can save quite a few columns by not recombining the parts after rho/pi and // re-splitting the words again before chi. Instead we do chi directly - // on the output parts of rho/pi. For rho/pi specically we do + // on the output parts of rho/pi. For rho/pi specially we do // `s[j][2 * i + 3 * j) % 5] = normalize(rot(s[i][j], RHOM[i][j]))`. cell_manager.get_strategy().start_region(); let mut lookup_counter = 0; @@ -1005,7 +1005,7 @@ impl SubCircuit for KeccakCircuit { keccak_unusable_rows() } - /// The `block.circuits_params.keccak_padding` parmeter, when enabled, sets + /// The `block.circuits_params.keccak_padding` parameter, when enabled, sets /// up the circuit to support a fixed number of permutations/keccak_f's, /// independently of the permutations required by `inputs`. fn new_from_block(block: &witness::Block) -> Self { diff --git a/zkevm-circuits/src/keccak_circuit/keccak_packed_multi.rs b/zkevm-circuits/src/keccak_circuit/keccak_packed_multi.rs index 26a4aea374..25f16a5f96 100644 --- a/zkevm-circuits/src/keccak_circuit/keccak_packed_multi.rs +++ b/zkevm-circuits/src/keccak_circuit/keccak_packed_multi.rs @@ -450,7 +450,7 @@ pub(crate) mod transform { } } -// Transfroms values to cells +// Transforms values to cells pub(crate) mod transform_to { use super::{AssignKeccakRegion, Cell, KeccakRegion, Part, PartValue}; use crate::{ diff --git a/zkevm-circuits/src/mpt_circuit.rs b/zkevm-circuits/src/mpt_circuit.rs index a69fb5b94e..5a2c79b02b 100644 --- a/zkevm-circuits/src/mpt_circuit.rs +++ b/zkevm-circuits/src/mpt_circuit.rs @@ -201,7 +201,7 @@ pub enum FixedTableTag { RangeKeyLen256, /// For checking there are 0s after the RLP stream ends RangeKeyLen16, - /// Extesion key odd key + /// Extension key odd key ExtOddKey, /// RLP decoding RLP, diff --git a/zkevm-circuits/src/mpt_circuit/extension.rs b/zkevm-circuits/src/mpt_circuit/extension.rs index 6552eeeb71..e3ed78e819 100644 --- a/zkevm-circuits/src/mpt_circuit/extension.rs +++ b/zkevm-circuits/src/mpt_circuit/extension.rs @@ -61,7 +61,7 @@ impl ExtensionGadget { circuit!([meta, cb], { // Data let key_items = [ - // Special case, requring string fail tests + // Special case, requiring string fail tests ctx.rlp_item( meta, cb, diff --git a/zkevm-circuits/src/root_circuit/aggregation.rs b/zkevm-circuits/src/root_circuit/aggregation.rs index debbca689b..f53ae78b26 100644 --- a/zkevm-circuits/src/root_circuit/aggregation.rs +++ b/zkevm-circuits/src/root_circuit/aggregation.rs @@ -518,7 +518,7 @@ pub mod test { pub struct StandardPlonk(F); impl StandardPlonk { - /// Create a `StandardPlonk` with random instnace. + /// Create a `StandardPlonk` with random instance. pub fn rand(mut rng: R) -> Self { Self(F::from(rng.next_u32() as u64)) } diff --git a/zkevm-circuits/src/super_circuit.rs b/zkevm-circuits/src/super_circuit.rs index 53b7a90c30..55fabdf08a 100644 --- a/zkevm-circuits/src/super_circuit.rs +++ b/zkevm-circuits/src/super_circuit.rs @@ -285,7 +285,7 @@ impl SuperCircuit { } } -// Eventhough the SuperCircuit is not a subcircuit we implement the SubCircuit +// Even though the SuperCircuit is not a subcircuit we implement the SubCircuit // trait for it in order to get the `new_from_block` and `instance` methods that // allow us to generalize integration tests. impl SubCircuit for SuperCircuit { diff --git a/zkevm-circuits/src/table/bytecode_table.rs b/zkevm-circuits/src/table/bytecode_table.rs index f433a2a777..ca73aab745 100644 --- a/zkevm-circuits/src/table/bytecode_table.rs +++ b/zkevm-circuits/src/table/bytecode_table.rs @@ -40,7 +40,7 @@ impl BytecodeTable { } } - /// Assign the `BytecodeTable` from a list of bytecodes, followig the same + /// Assign the `BytecodeTable` from a list of bytecodes, following the same /// table layout that the Bytecode Circuit uses. pub fn load( &self, diff --git a/zkevm-circuits/src/table/copy_table.rs b/zkevm-circuits/src/table/copy_table.rs index eeeb1a2eb1..4b93bdf2ba 100644 --- a/zkevm-circuits/src/table/copy_table.rs +++ b/zkevm-circuits/src/table/copy_table.rs @@ -119,7 +119,7 @@ impl CopyTable { number_or_hash_to_word(©_event.dst_id) }; - // tag binary bumber chip + // tag binary number chip let tag = if is_read_step { copy_event.src_type } else { diff --git a/zkevm-circuits/src/table/keccak_table.rs b/zkevm-circuits/src/table/keccak_table.rs index 6957a09e98..e2d906e40e 100644 --- a/zkevm-circuits/src/table/keccak_table.rs +++ b/zkevm-circuits/src/table/keccak_table.rs @@ -125,7 +125,7 @@ impl KeccakTable { } /// returns matchings between the circuit columns passed as parameters and - /// the table collumns + /// the table columns pub fn match_columns( &self, value_rlc: Column, diff --git a/zkevm-circuits/src/test_util.rs b/zkevm-circuits/src/test_util.rs index e73b5d18e7..9a890b7364 100644 --- a/zkevm-circuits/src/test_util.rs +++ b/zkevm-circuits/src/test_util.rs @@ -269,13 +269,13 @@ pub enum Circuit { #[derive(Debug, Error)] /// Errors for Circuit test pub enum CircuitTestError { - /// We didn't specify enough attibutes to define a block for the circuit test + /// We didn't specify enough attributes to define a block for the circuit test #[error("NotEnoughAttributes")] NotEnoughAttributes, /// Something wrong in the handle_block #[error("CannotHandleBlock({0})")] CannotHandleBlock(String), - /// Something worng in the block_convert + /// Something wrong in the block_convert #[error("CannotConvertBlock({0})")] CannotConvertBlock(String), /// Problem constructing MockProver @@ -299,7 +299,7 @@ pub enum CircuitTestError { impl CircuitTestError { /// Filter out EVM circuit failures /// - /// Errors must come from EVM circuit and must be unsatisifed constraints or lookup failure + /// Errors must come from EVM circuit and must be unsatisfied constraints or lookup failure pub fn assert_evm_failure(&self) { match self { Self::VerificationFailed { circuit, reasons } => { diff --git a/zkevm-circuits/src/tx_circuit/sign_verify.rs b/zkevm-circuits/src/tx_circuit/sign_verify.rs index 15587021c6..7a9e0b2f5f 100644 --- a/zkevm-circuits/src/tx_circuit/sign_verify.rs +++ b/zkevm-circuits/src/tx_circuit/sign_verify.rs @@ -390,9 +390,9 @@ impl SignVerifyChip { // Ref. spec SignVerifyChip 4. Verify the ECDSA signature ecdsa_chip.verify(ctx, &sig, &pk_assigned, &msg_hash)?; - // TODO: Update once halo2wrong suports the following methods: + // TODO: Update once halo2wrong supports the following methods: // - `IntegerChip::assign_integer_from_bytes_le` - // - `GeneralEccChip::assing_point_from_bytes_le` + // - `GeneralEccChip::assign_point_from_bytes_le` Ok(AssignedECDSA { pk_x_le, diff --git a/zkevm-circuits/src/util/cell_manager.rs b/zkevm-circuits/src/util/cell_manager.rs index 574301ea78..abc2d1c815 100644 --- a/zkevm-circuits/src/util/cell_manager.rs +++ b/zkevm-circuits/src/util/cell_manager.rs @@ -277,7 +277,7 @@ impl CellManagerColumns { } } - /// Returns a column of a given cell type and index amoung all columns of that cell type. + /// Returns a column of a given cell type and index among all columns of that cell type. pub fn get_column(&self, cell_type: CellType, column_idx: usize) -> Option<&CellColumn> { if let Some(columns) = self.columns.get(&cell_type) { columns.get(column_idx) diff --git a/zkevm-circuits/src/util/word.rs b/zkevm-circuits/src/util/word.rs index c2e3e381a8..0205a234da 100644 --- a/zkevm-circuits/src/util/word.rs +++ b/zkevm-circuits/src/util/word.rs @@ -1,5 +1,5 @@ //! Define generic Word type with utility functions -// Naming Convesion +// Naming Conversion // - Limbs: An EVN word is 256 bits. Limbs N means split 256 into N limb. For example, N = 4, each // limb is 256/4 = 64 bits diff --git a/zkevm-circuits/src/witness/block.rs b/zkevm-circuits/src/witness/block.rs index 507e8e370c..2718c795e9 100644 --- a/zkevm-circuits/src/witness/block.rs +++ b/zkevm-circuits/src/witness/block.rs @@ -191,7 +191,7 @@ pub struct BlockContext { pub number: Word, /// The timestamp of the block pub timestamp: Word, - /// The difficulty of the blcok + /// The difficulty of the block pub difficulty: Word, /// The base fee, the minimum amount of gas fee for a transaction pub base_fee: Word, diff --git a/zkevm-circuits/src/witness/rw.rs b/zkevm-circuits/src/witness/rw.rs index 7c83101b49..950a8329b1 100644 --- a/zkevm-circuits/src/witness/rw.rs +++ b/zkevm-circuits/src/witness/rw.rs @@ -16,7 +16,7 @@ use crate::{ use super::MptUpdates; -/// Rw constainer for a witness block +/// Rw container for a witness block #[derive(Debug, Default, Clone)] pub struct RwMap(pub HashMap>);