Skip to content
This repository was archived by the owner on Apr 18, 2025. It is now read-only.

Commit 2f178fa

Browse files
authored
enhancement: add a typeos check in CI, and fix current existly typos errors. that is a TODO thing, and it's done now. (#1340)
* CI add typos check and fix current existly typos errors * correct ci.yml --------- Co-authored-by: unknown <xieyongqi>
1 parent 6bf1e69 commit 2f178fa

File tree

100 files changed

+225
-181
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+225
-181
lines changed

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ The target readers could be future developers, reviewers, and auditors. By readi
3535

3636
MUST: Reference the issue to resolve
3737

38-
### Single responsability
38+
### Single responsibility
3939

4040
Is RECOMMENDED to create single responsibility commits, but not mandatory.
4141

.github/workflows/ci.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,3 +274,19 @@ jobs:
274274
run: cargo check --all-features
275275
- name: Cargo fmt
276276
run: cargo fmt --all -- --check
277+
278+
typos-check:
279+
needs: [skip_check]
280+
if: |
281+
github.event.pull_request.draft == false &&
282+
(github.event.action == 'ready_for_review' || needs.skip_check.outputs.should_skip != 'true')
283+
name: TyposCheck
284+
timeout-minutes: 5
285+
runs-on: ubuntu-latest
286+
steps:
287+
- uses: actions/checkout@v4
288+
- uses: crate-ci/typos@v1.22.7
289+
with:
290+
config: ./typos.toml
291+
isolated: true
292+

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ clippy: ## Run clippy checks over all workspace members
1010
doc: ## Generate and tests docs including private items
1111
@cargo doc --no-deps --all --document-private-items
1212

13-
fmt: ## Check whether the code is formated correctly
13+
fmt: ## Check whether the code is formatted correctly
1414
@cargo check --all-features
1515
@cargo fmt --all -- --check
1616

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This is the zkEVM circuits used in Scroll Mainnet. It was forked from PSE zkevm-
66
2. RLP circuit / MPT circuit / Poseidon circuit
77
3. multi block chunking
88
4. proof aggregation
9-
5. [>99.5% compatiblity](https://circuit-release.s3.us-west-2.amazonaws.com/testool/nightly.1695216104.47e2015.html) with [official EVM test vector](https://github.com/ethereum/tests)
9+
5. [>99.5% compatibility](https://circuit-release.s3.us-west-2.amazonaws.com/testool/nightly.1695216104.47e2015.html) with [official EVM test vector](https://github.com/ethereum/tests)
1010
6. Many optimizations like read/write memory in word instead of byte
1111

1212
## Docs

aggregator/src/aggregation/decoder.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5590,7 +5590,7 @@ mod tests {
55905590
.set_pledged_src_size(Some(raw.len() as u64))
55915591
.expect("Encoder src_size: raw.len()");
55925592

5593-
encoder.write_all(&raw).expect("Encoder wirte_all");
5593+
encoder.write_all(&raw).expect("Encoder write_all");
55945594
encoder.finish().expect("Encoder success")
55955595
};
55965596

@@ -5626,7 +5626,7 @@ mod tests {
56265626
.expect("Encoder src_size: raw.len()");
56275627
// include the content size to know at decode time the expected size of decoded data.
56285628

5629-
encoder.write_all(&raw).expect("Encoder wirte_all");
5629+
encoder.write_all(&raw).expect("Encoder write_all");
56305630
encoder.finish().expect("Encoder success")
56315631
};
56325632

@@ -5672,7 +5672,7 @@ mod tests {
56725672
.set_pledged_src_size(Some(batch_data.len() as u64))
56735673
.expect("Encoder src_size: raw.len()");
56745674

5675-
encoder.write_all(&batch_data).expect("Encoder wirte_all");
5675+
encoder.write_all(&batch_data).expect("Encoder write_all");
56765676
encoder.finish().expect("Encoder success")
56775677
};
56785678

@@ -5716,7 +5716,7 @@ mod tests {
57165716
.set_pledged_src_size(Some(raw.len() as u64))
57175717
.expect("Encoder src_size: raw.len()");
57185718

5719-
encoder.write_all(&raw).expect("Encoder wirte_all");
5719+
encoder.write_all(&raw).expect("Encoder write_all");
57205720
encoder.finish().expect("Encoder success")
57215721
};
57225722

@@ -5759,7 +5759,7 @@ mod tests {
57595759

57605760
encoder
57615761
.write_all(&multi_batch_data)
5762-
.expect("Encoder wirte_all");
5762+
.expect("Encoder write_all");
57635763
encoder.finish().expect("Encoder success")
57645764
};
57655765

aggregator/src/aggregation/decoder/seq_exec.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ type ExportedCell<F> = AssignedCell<F, F>;
293293

294294
impl<F: Field> SeqExecConfig<F> {
295295
/// Construct the sequence instruction table
296-
/// the maxium rotation is prev(2), next(1)
296+
/// the maximum rotation is prev(2), next(1)
297297
pub fn configure(
298298
meta: &mut ConstraintSystem<F>,
299299
challenges: Expression<F>,
@@ -408,7 +408,7 @@ impl<F: Field> SeqExecConfig<F> {
408408
1.expr() - s_lit_cp_phase_next.expr() - s_back_ref_phase_next.expr();
409409
cb.condition(is_padding.expr(), |cb| {
410410
cb.require_equal(
411-
"padding never change once actived",
411+
"padding never change once activated",
412412
is_padding_next.expr(),
413413
is_padding.expr(),
414414
);
@@ -431,7 +431,7 @@ impl<F: Field> SeqExecConfig<F> {
431431
]),
432432
|cb| {
433433
cb.require_equal(
434-
"phase can only be actived in inst border",
434+
"phase can only be activated in inst border",
435435
is_inst_begin.expr(),
436436
1.expr(),
437437
);
@@ -445,7 +445,7 @@ impl<F: Field> SeqExecConfig<F> {
445445
]),
446446
|cb| {
447447
cb.require_equal(
448-
"phase must keep actived until block end",
448+
"phase must keep activated until block end",
449449
s_last_lit_cp_phase_prev.expr(),
450450
s_last_lit_cp_phase.expr(),
451451
);
@@ -454,7 +454,7 @@ impl<F: Field> SeqExecConfig<F> {
454454

455455
cb.condition(s_last_lit_cp_phase.expr(), |cb| {
456456
cb.require_equal(
457-
"lit cp must actived if last lit cp is actived",
457+
"lit cp must activated if last lit cp is activated",
458458
s_lit_cp_phase.expr_at(meta, Rotation::cur()),
459459
1.expr(),
460460
);

aggregator/src/aggregation/decoder/tables/bitstring.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ impl<const N_BYTES: usize> BitstringTable<N_BYTES> {
268268

269269
let mut cb = BaseConstraintBuilder::default();
270270

271-
// Columns that do not change in the chunk of 3 contigious bytes.
271+
// Columns that do not change in the chunk of 3 contiguous bytes.
272272
for col in [
273273
config.byte_idx_1,
274274
config.byte_idx_2,

aggregator/src/aggregation/decoder/tables/fse.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1294,7 +1294,7 @@ impl<const L: usize, const R: usize> FseTable<L, R> {
12941294

12951295
/// Lookup table expressions for (symbol, symbol_count) tuple check.
12961296
///
1297-
/// This check is only done on the last occurence of a particular symbol, i.e. where:
1297+
/// This check is only done on the last occurrence of a particular symbol, i.e. where:
12981298
/// - symbol_count == symbol_count_acc
12991299
pub fn table_exprs_by_symbol(&self, meta: &mut VirtualCells<Fr>) -> Vec<Expression<Fr>> {
13001300
vec![
@@ -1762,7 +1762,7 @@ impl FseSortedStatesTable {
17621762
// - smallest_spot does not change
17631763
// - last_baseline does not change
17641764
// - symbol_count_acc increments by +1
1765-
// - spot_acc accumlates based on the current spot
1765+
// - spot_acc accumulates based on the current spot
17661766
// - baseline_mark can transition from 0 -> 1 only once
17671767
// - baseline==0x00 if baseline_mark is set
17681768
// - baseline==baseline::prev+spot::prev if baseline_mark is not set

aggregator/src/aggregation/decoder/tables/seqinst_table.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ impl<F: Field> ChipContext<F> {
186186

187187
impl<F: Field> SeqInstTable<F> {
188188
/// The sequence count should be lookuped by parsed bitstream,
189-
/// used the block index and value for sequnce count tag to
189+
/// used the block index and value for sequence count tag to
190190
/// lookup (`true`, `block_index`, 1, `value`)
191191
/// The table would be padded by increased block index to
192192
/// fill all rows being enabled
@@ -247,7 +247,7 @@ impl<F: Field> SeqInstTable<F> {
247247
}
248248

249249
/// Construct the sequence instruction table
250-
/// the maxium rotation is prev(1), next(1)
250+
/// the maximum rotation is prev(1), next(1)
251251
pub fn configure(meta: &mut ConstraintSystem<F>) -> Self {
252252
let q_enabled = meta.fixed_column();
253253
let block_index = meta.advice_column();
@@ -347,7 +347,7 @@ impl<F: Field> SeqInstTable<F> {
347347
});
348348

349349
// so, we enforce s_beginning enabled for valid block index
350-
meta.create_gate("border constaints", |meta| {
350+
meta.create_gate("border constraints", |meta| {
351351
let mut cb = BaseConstraintBuilder::default();
352352
let s_beginning = s_beginning.expr_at(meta, Rotation::cur());
353353

@@ -492,7 +492,7 @@ impl<F: Field> SeqInstTable<F> {
492492
rep_offset_3.expr(),
493493
);
494494
});
495-
// update mode 2 (offset == 2 / offet == 1 while lit_len != 0)
495+
// update mode 2 (offset == 2 / offset == 1 while lit_len != 0)
496496
cb.condition(ref_update_mode_2.expr(), |cb| {
497497
cb.require_equal(
498498
"swap 1&2 for ref 2",
@@ -510,7 +510,7 @@ impl<F: Field> SeqInstTable<F> {
510510
rep_offset_3.expr(),
511511
);
512512
});
513-
// update mode 3 (offset == 3 / offet == 2 while lit_len != 0)
513+
// update mode 3 (offset == 3 / offset == 2 while lit_len != 0)
514514
cb.condition(ref_update_mode_3.expr(), |cb| {
515515
cb.require_equal(
516516
"rotate 3-1 for ref 3",
@@ -554,7 +554,7 @@ impl<F: Field> SeqInstTable<F> {
554554
)
555555
});
556556

557-
// the beginning of following rows must be constrainted
557+
// the beginning of following rows must be constrained
558558
meta.enable_equality(block_index);
559559
meta.enable_equality(seq_index);
560560
meta.enable_equality(rep_offset_1);

aggregator/src/aggregation/decoder/witgen/types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ pub struct AddressTableRow {
383383
}
384384

385385
impl AddressTableRow {
386-
/// a debug helper, input datas in the form of example in
386+
/// a debug helper, input data in the form of example in
387387
/// zstd spec: https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md#repeat-offsets
388388
/// i.e. [offset, literal, rep_1, rep_2, rep_3]
389389
#[cfg(test)]

0 commit comments

Comments
 (0)