Skip to content
This repository was archived by the owner on Jul 5, 2024. It is now read-only.

CopyCircuit Challenge API integration#965

Merged
CPerezz merged 6 commits into
mainfrom
copy_circuit_challenge_api
Dec 7, 2022
Merged

CopyCircuit Challenge API integration#965
CPerezz merged 6 commits into
mainfrom
copy_circuit_challenge_api

Conversation

@CPerezz
Copy link
Copy Markdown
Contributor

@CPerezz CPerezz commented Dec 5, 2022

The CopyCircuit was not using the Value API for witness assignation.
Therefore, the Challenge API has been integrated in both configure and
synthesize steps and the Value<F> is the default operand.

Resolves: #955

@CPerezz CPerezz requested review from ed255 and lispc December 5, 2022 15:49
@github-actions github-actions Bot added the crate-zkevm-circuits Issues related to the zkevm-circuits workspace member label Dec 5, 2022
@CPerezz CPerezz force-pushed the copy_circuit_challenge_api branch 2 times, most recently from eddd4c3 to e4da47a Compare December 5, 2022 19:04
@github-actions github-actions Bot added crate-circuit-benchmarks Issues related to the circuit-benchmarks workspace member T-bench Type: benchmark improvements labels Dec 5, 2022
Copy link
Copy Markdown
Collaborator

@roynalnaruto roynalnaruto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

Copy link
Copy Markdown
Contributor

@ed255 ed255 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe I found two columns that should be in SecondPhase but are still in FirstPhase. Please take a look!

Comment thread zkevm-circuits/src/table.rs
Comment thread zkevm-circuits/src/copy_circuit.rs
Comment thread zkevm-circuits/src/copy_circuit.rs
The CopyCircuit was not using the Value API for witness assignation.
Therefore, the Challenge API has been integrated in both `configure` and
`synthesize` steps and the `Value<F>` is the default operand.
Now the `TxTable` uses the `Challenges` in order to assign all the
values on it's columns.
Now that the CopyTable and CopyCircuit use the `Value` and `Challenges`
APIs, the calls from EvmCircuit and SuperCircuit have changed and needed
to be updated.
@CPerezz CPerezz force-pushed the copy_circuit_challenge_api branch from 40fb12c to d81ff4a Compare December 7, 2022 15:13
@CPerezz CPerezz requested a review from ed255 December 7, 2022 15:13
Copy link
Copy Markdown
Contributor

@ed255 ed255 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@CPerezz CPerezz merged commit a7f87b3 into main Dec 7, 2022
@CPerezz CPerezz deleted the copy_circuit_challenge_api branch December 7, 2022 15:35
pinkiebell added a commit to pinkiebell/zkevm-circuits that referenced this pull request Dec 15, 2022
commit cc1e0d6
Author: z2trillion <z2trillion@users.noreply.github.com>
Date:   Thu Dec 15 04:02:49 2022 -0500

    Add TODO (privacy-ethereum#961)

    Co-authored-by: Mason Liang <mason@scroll.io>
    Co-authored-by: Carlos Pérez <37264926+CPerezz@users.noreply.github.com>
    Co-authored-by: Chih Cheng Liang <chihchengliang@gmail.com>

commit 20b4db0
Author: DreamWuGit <wwuwwei@126.com>
Date:   Thu Dec 15 15:58:43 2022 +0800

    fix dummy error handling  (privacy-ethereum#979)

    * fix dummy error

    * minor refacotr

commit 5710e30
Author: DreamWuGit <wwuwwei@126.com>
Date:   Thu Dec 15 10:15:24 2022 +0800

    fix balance test (privacy-ethereum#989)

commit 4840a5a
Author: Zhang Zhuo <mycinbrin@gmail.com>
Date:   Wed Dec 14 21:57:38 2022 +0800

    fix(evm): get_test_degree (privacy-ethereum#983)

    * fix(evm): get_test_degree

    * fmt

    * change bytecode table row estimation

commit c78c86d
Author: smtmfft <99081233+smtmfft@users.noreply.github.com>
Date:   Mon Dec 12 16:05:08 2022 +0800

    Math gadgets refactory (privacy-ethereum#920)

    * refactory is_zero

    * add a few gadget files

    * fix import warn

    * Split gadget into independent files

    * Fix lints

    * Add bye size gadget test case

    * Split tests into single function

    * Fix comments from brecht

    * update unit test organization for better self explain

    * fix review comments

    * fix review comments

    * fix review comments

    * remove useless tests

    * Update zkevm-circuits/src/evm_circuit/util/math_gadget/min_max.rs

    Co-authored-by: Brecht Devos <Brechtp.Devos@gmail.com>

    * Update zkevm-circuits/src/evm_circuit/util/math_gadget/addwords.rs

    Co-authored-by: Brecht Devos <Brechtp.Devos@gmail.com>

    * improve: mod dependency

    * keep fixing review comments

    * refine tests

    * Fix test framework issue

    Signed-off-by: smtmfft <smtm@taiko.xyz>

    * use macro to make better readability

    * remove dup marco def

    * use try_test macro

    * code refine

    * update test case

    * fix max carry test case

    * fix review comments

    * refine annotations

    * fix review comments

    * fix review comments

    Signed-off-by: smtmfft <smtm@taiko.xyz>
    Co-authored-by: smtmfft <smtm@taiko.xzy>
    Co-authored-by: john xu <john@taiko.xyz>
    Co-authored-by: Brecht Devos <Brechtp.Devos@gmail.com>

commit ee1cfbd
Author: zengzengzenghuy <85567868+zengzengzenghuy@users.noreply.github.com>
Date:   Fri Dec 9 19:09:51 2022 +0800

    fix: typo in memory.rs (privacy-ethereum#962)

    * fix: typo in memory.rs

    * fix: typo in memory.rs

commit f444466
Author: Leo Lara <leolara@users.noreply.github.com>
Date:   Thu Dec 8 19:01:59 2022 +0700

    Integration tests to use actual prover (privacy-ethereum#878)

    Closes privacy-ethereum#789

commit a7f87b3
Author: Carlos Pérez <37264926+CPerezz@users.noreply.github.com>
Date:   Wed Dec 7 16:34:59 2022 +0100

    CopyCircuit Challenge API integration (privacy-ethereum#965)

    * change: Port CopyCircuit to Challenge and Value APIs

    The CopyCircuit was not using the Value API for witness assignation.
    Therefore, the Challenge API has been integrated in both `configure` and
    `synthesize` steps and the `Value<F>` is the default operand.

    * change: Port Tx table to Challenge API

    Now the `TxTable` uses the `Challenges` in order to assign all the
    values on it's columns.

    * update: EVM and Super Circuits CopyTable calls

    Now that the CopyTable and CopyCircuit use the `Value` and `Challenges`
    APIs, the calls from EvmCircuit and SuperCircuit have changed and needed
    to be updated.

    * update: Cargo.lock

    * fix: Remove randomness instance from benchmarks

    * fix: Add `value` and `id` columns as SecondPhase

commit 56642ad
Author: pinkiebell <40266861+pinkiebell@users.noreply.github.com>
Date:   Wed Dec 7 02:38:23 2022 +0100

    bus-mapping: fix return data offset and length bookkeeping (privacy-ethereum#951)

    * bus-mapping: fix return data offset and length bookkeeping

    This resolves a problem with the returndatacopy opcode because
    of zero return_data.[offset, length]

    * fix conflict

    Co-authored-by: Zhang Zhuo <mycinbrin@gmail.com>

commit 5def16d
Author: pinkiebell <40266861+pinkiebell@users.noreply.github.com>
Date:   Mon Dec 5 18:07:37 2022 +0100

    fix: keccak/plain: incremental update() broken (privacy-ethereum#964)

    * fix: keccak/plain: incremental update() broken

    Fixes: privacy-ethereum#922

    * always pad
noel2004 pushed a commit to noel2004/zkevm-circuits that referenced this pull request Nov 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

crate-circuit-benchmarks Issues related to the circuit-benchmarks workspace member crate-zkevm-circuits Issues related to the zkevm-circuits workspace member T-bench Type: benchmark improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor Copy Circuit with challenge API

3 participants