Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

PI refactor

PI refactor #528

Triggered via pull request September 3, 2023 22:32
@CeciliaZ030CeciliaZ030
synchronize #138
Status Success
Total duration 11s
Artifacts

labeler.yml

on: pull_request_target
Fit to window
Zoom out
Zoom in

Annotations

24 errors and 1 warning
unused `std::result::Result` that must be used: zkevm-circuits/src/circuit_tools/constraint_builder.rs#L1401
error: unused `std::result::Result` that must be used --> zkevm-circuits/src/circuit_tools/constraint_builder.rs:1401:65 | 1401 | ($region:expr, $cell:expr, $offset:expr => $value:expr) => {{ | _________________________________________________________________^ 1402 | | use halo2_proofs::circuit::Value; 1403 | | let description = 1404 | | $crate::concat_with_preamble!(stringify!($cell), " => ", stringify!($value)); ... | 1411 | | ) 1412 | | }}; | |_____^ | ::: zkevm-circuits/src/taiko_pi_circuit.rs:430:17 | 430 | assign!(region, self.block_hash.2, 0 => evidence.assignment_acc(BLOCK_HASH, evm_word)); | -------------------------------------------------------------------------------------- in this macro invocation | = note: this `Result` may be an `Err` variant, which should be handled = note: this error originates in the macro `assign` (in Nightly builds, run with -Z macro-backtrace for more info) help: use `let _ = ...` to ignore the resulting value | 1401 | ($region:expr, $cell:expr, $offset:expr => $value:expr) => {let _ = { | +++++++
unused `std::result::Result` that must be used: zkevm-circuits/src/circuit_tools/constraint_builder.rs#L1401
error: unused `std::result::Result` that must be used --> zkevm-circuits/src/circuit_tools/constraint_builder.rs:1401:65 | 1401 | ($region:expr, $cell:expr, $offset:expr => $value:expr) => {{ | _________________________________________________________________^ 1402 | | use halo2_proofs::circuit::Value; 1403 | | let description = 1404 | | $crate::concat_with_preamble!(stringify!($cell), " => ", stringify!($value)); ... | 1411 | | ) 1412 | | }}; | |_____^ | ::: zkevm-circuits/src/taiko_pi_circuit.rs:429:17 | 429 | assign!(region, self.block_hash.0, 0 => (evidence.block_context.number).as_u64().scalar()); | ------------------------------------------------------------------------------------------ in this macro invocation | = note: this `Result` may be an `Err` variant, which should be handled = note: this error originates in the macro `assign` (in Nightly builds, run with -Z macro-backtrace for more info) help: use `let _ = ...` to ignore the resulting value | 1401 | ($region:expr, $cell:expr, $offset:expr => $value:expr) => {let _ = { | +++++++
unused `std::result::Result` that must be used: zkevm-circuits/src/circuit_tools/constraint_builder.rs#L1401
error: unused `std::result::Result` that must be used --> zkevm-circuits/src/circuit_tools/constraint_builder.rs:1401:65 | 1401 | ($region:expr, $cell:expr, $offset:expr => $value:expr) => {{ | _________________________________________________________________^ 1402 | | use halo2_proofs::circuit::Value; 1403 | | let description = 1404 | | $crate::concat_with_preamble!(stringify!($cell), " => ", stringify!($value)); ... | 1411 | | ) 1412 | | }}; | |_____^ | ::: zkevm-circuits/src/taiko_pi_circuit.rs:428:17 | 428 | assign!(region, self.parent_hash.2, 0 => evidence.assignment_acc(PARENT_HASH, evm_word)); | ---------------------------------------------------------------------------------------- in this macro invocation | = note: this `Result` may be an `Err` variant, which should be handled = note: this error originates in the macro `assign` (in Nightly builds, run with -Z macro-backtrace for more info) help: use `let _ = ...` to ignore the resulting value | 1401 | ($region:expr, $cell:expr, $offset:expr => $value:expr) => {let _ = { | +++++++
unused `std::result::Result` that must be used: zkevm-circuits/src/circuit_tools/constraint_builder.rs#L1401
error: unused `std::result::Result` that must be used --> zkevm-circuits/src/circuit_tools/constraint_builder.rs:1401:65 | 1401 | ($region:expr, $cell:expr, $offset:expr => $value:expr) => {{ | _________________________________________________________________^ 1402 | | use halo2_proofs::circuit::Value; 1403 | | let description = 1404 | | $crate::concat_with_preamble!(stringify!($cell), " => ", stringify!($value)); ... | 1411 | | ) 1412 | | }}; | |_____^ | ::: zkevm-circuits/src/taiko_pi_circuit.rs:427:17 | 427 | assign!(region, self.parent_hash.0, 0 => (evidence.block_context.number - 1).as_u64().scalar()); | ----------------------------------------------------------------------------------------------- in this macro invocation | = note: this `Result` may be an `Err` variant, which should be handled = note: `-D unused-must-use` implied by `-D warnings` = note: this error originates in the macro `assign` (in Nightly builds, run with -Z macro-backtrace for more info) help: use `let _ = ...` to ignore the resulting value | 1401 | ($region:expr, $cell:expr, $offset:expr => $value:expr) => {let _ = { | +++++++
using `clone` on type `C` which implements the `Copy` trait: zkevm-circuits/src/circuit_tools/memory.rs#L161
error: using `clone` on type `C` which implements the `Copy` trait --> zkevm-circuits/src/circuit_tools/memory.rs:161:38 | 161 | cm.get_typed_columns(t.clone())[0].column | ^^^^^^^^^ help: try dereferencing it: `*t` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
using `clone` on type `C` which implements the `Copy` trait: zkevm-circuits/src/circuit_tools/memory.rs#L159
error: using `clone` on type `C` which implements the `Copy` trait --> zkevm-circuits/src/circuit_tools/memory.rs:159:31 | 159 | let config = (t.clone(), 1usize, phase, false); | ^^^^^^^^^ help: try dereferencing it: `*t` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
iterating on a map's values: zkevm-circuits/src/circuit_tools/memory.rs#L108
error: iterating on a map's values --> zkevm-circuits/src/circuit_tools/memory.rs:108:9 | 108 | self.banks.iter().map(|(_, bank)| bank.tag().0).collect() | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.banks.values().map(|bank| bank.tag().0)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_kv_map = note: `-D clippy::iter-kv-map` implied by `-D warnings`
length comparison to zero: zkevm-circuits/src/circuit_tools/cell_manager.rs#L269
error: length comparison to zero --> zkevm-circuits/src/circuit_tools/cell_manager.rs:269:12 | 269 | if self.get_typed_columns(config.0).len() != 0 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.get_typed_columns(config.0).is_empty()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero = note: `-D clippy::len-zero` implied by `-D warnings`
field assignment outside of initializer for an instance created with Default::default(): zkevm-circuits/src/circuit_tools/cell_manager.rs#L255
error: field assignment outside of initializer for an instance created with Default::default() --> zkevm-circuits/src/circuit_tools/cell_manager.rs:255:9 | 255 | cm.height_limit = max_height; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: consider initializing the variable with `CellManager::<F, C> { height_limit: max_height, ..Default::default() }` and removing relevant reassignments --> zkevm-circuits/src/circuit_tools/cell_manager.rs:254:9 | 254 | let mut cm = CellManager::default(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default = note: `-D clippy::field-reassign-with-default` implied by `-D warnings`
this expression creates a reference which is immediately dereferenced by the compiler: zkevm-circuits/src/circuit_tools/constraint_builder.rs#L609
error: this expression creates a reference which is immediately dereferenced by the compiler --> zkevm-circuits/src/circuit_tools/constraint_builder.rs:609:45 | 609 | .map(|_v| local_compression(&values)) | ^^^^^^^ help: change this to: `values` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zkevm-circuits/src/circuit_tools/constraint_builder.rs#L606
error: this expression creates a reference which is immediately dereferenced by the compiler --> zkevm-circuits/src/circuit_tools/constraint_builder.rs:606:53 | 606 | (true, false) => vec![local_compression(&values)], | ^^^^^^^ help: change this to: `values` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zkevm-circuits/src/circuit_tools/constraint_builder.rs#L605
error: this expression creates a reference which is immediately dereferenced by the compiler --> zkevm-circuits/src/circuit_tools/constraint_builder.rs:605:52 | 605 | (true, true) => vec![local_compression(&values)], | ^^^^^^^ help: change this to: `values` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zkevm-circuits/src/circuit_tools/constraint_builder.rs#L589
error: this expression creates a reference which is immediately dereferenced by the compiler --> zkevm-circuits/src/circuit_tools/constraint_builder.rs:589:33 | 589 | let rlc = rlc::expr(&values, challenge.expr()) * local_condition.expr(); | ^^^^^^^ help: change this to: `values` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this function has too many arguments (8/7): zkevm-circuits/src/circuit_tools/constraint_builder.rs#L541
error: this function has too many arguments (8/7) --> zkevm-circuits/src/circuit_tools/constraint_builder.rs:541:5 | 541 | / pub(crate) fn add_lookup( 542 | | &mut self, 543 | | description: &'static str, 544 | | tag: C, ... | 549 | | dyn_path: bool, 550 | | ) { | |______^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments = note: `-D clippy::too-many-arguments` implied by `-D warnings`
use of `expect` followed by a function call: zkevm-circuits/src/circuit_tools/constraint_builder.rs#L460
error: use of `expect` followed by a function call --> zkevm-circuits/src/circuit_tools/constraint_builder.rs:460:26 | 460 | .expect(&format!( | __________________________^ 461 | | "Fixed table {:?} not found for dynamic lookup", 462 | | table_tag 463 | | )) | |__________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call = note: `-D clippy::expect-fun-call` implied by `-D warnings` help: try this | 460 ~ .unwrap_or_else(|| panic!("Fixed table {:?} not found for dynamic lookup", 461 + table_tag)) |
this expression creates a reference which is immediately dereferenced by the compiler: zkevm-circuits/src/circuit_tools/constraint_builder.rs#L422
error: this expression creates a reference which is immediately dereferenced by the compiler --> zkevm-circuits/src/circuit_tools/constraint_builder.rs:422:40 | 422 | let table_expr = rlc::expr(&table, challenge.expr()); | ^^^^^^ help: change this to: `table` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow = note: `-D clippy::needless-borrow` implied by `-D warnings`
using `clone` on type `Column<Advice>` which implements the `Copy` trait: zkevm-circuits/src/circuit_tools/constraint_builder.rs#L409
error: using `clone` on type `Column<Advice>` which implements the `Copy` trait --> zkevm-circuits/src/circuit_tools/constraint_builder.rs:409:38 | 409 | meta.enable_equality(c.clone())}); | ^^^^^^^^^ help: try dereferencing it: `*c` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
using `clone` on type `C` which implements the `Copy` trait: zkevm-circuits/src/circuit_tools/constraint_builder.rs#L212
error: using `clone` on type `C` which implements the `Copy` trait --> zkevm-circuits/src/circuit_tools/constraint_builder.rs:212:42 | 212 | self.fixed_tables.insert(tag.clone(), table.table_exprs(meta)); | ^^^^^^^^^^^ help: try dereferencing it: `*tag` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy = note: `-D clippy::clone-on-copy` implied by `-D warnings`
unused import: `ExprVec`: zkevm-circuits/src/taiko_pi_circuit.rs#L20
error: unused import: `ExprVec` --> zkevm-circuits/src/taiko_pi_circuit.rs:20:84 | 20 | use crate::circuit_tools::constraint_builder::{ConstraintBuilder, TO_FIX, RLCable, ExprVec}; | ^^^^^^^
unused import: `itertools::Itertools`: zkevm-circuits/src/taiko_pi_circuit.rs#L10
error: unused import: `itertools::Itertools` --> zkevm-circuits/src/taiko_pi_circuit.rs:10:5 | 10 | use itertools::Itertools; | ^^^^^^^^^^^^^^^^^^^^
unused import: `LookupTable`: zkevm-circuits/src/taiko_pi_circuit.rs#L26
error: unused import: `LookupTable` --> zkevm-circuits/src/taiko_pi_circuit.rs:26:90 | 26 | use crate::table::{byte_table::ByteTable, BlockContextFieldTag, BlockTable, KeccakTable, LookupTable}; | ^^^^^^^^^^^
unused import: `itertools::Itertools`: zkevm-circuits/src/circuit_tools/memory.rs#L13
error: unused import: `itertools::Itertools` --> zkevm-circuits/src/circuit_tools/memory.rs:13:5 | 13 | use itertools::Itertools; | ^^^^^^^^^^^^^^^^^^^^
redundant field names in struct initialization: zkevm-circuits/src/taiko_pi_circuit.rs#L472
error: redundant field names in struct initialization --> zkevm-circuits/src/taiko_pi_circuit.rs:472:13 | 472 | evidence: evidence, | ^^^^^^^^^^^^^^^^^^ help: replace it with: `evidence` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names = note: `-D clippy::redundant-field-names` implied by `-D warnings`
unused import: `H256`: zkevm-circuits/src/taiko_pi_circuit.rs#L4
error: unused import: `H256` --> zkevm-circuits/src/taiko_pi_circuit.rs:4:45 | 4 | use eth_types::{Field, ToBigEndian, ToWord, H256, H160, U256}; | ^^^^ | = note: `-D unused-imports` implied by `-D warnings`
triage
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/labeler@v3. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/