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

Integration tests for tx, copy and bytecode circuits #654

Merged
merged 19 commits into from
Aug 16, 2022

Conversation

adria0
Copy link
Member

@adria0 adria0 commented Aug 4, 2022

No description provided.

@adria0 adria0 requested a review from ed255 as a code owner August 4, 2022 16:31
@github-actions github-actions bot added crate-bus-mapping Issues related to the bus-mapping workspace member crate-integration-tests Issues related to the integration-tests workspace member crate-prover Issues related to the prover workspace member crate-zkevm-circuits Issues related to the zkevm-circuits workspace member labels Aug 4, 2022
@adria0 adria0 force-pushed the feature/more-integration-tests branch from 36543a3 to e8082af Compare August 5, 2022 06:21
Copy link
Contributor

@pinkiebell pinkiebell left a comment

Choose a reason for hiding this comment

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

Nice! I left a few comments 🙂

@pinkiebell
Copy link
Contributor

pinkiebell commented Aug 8, 2022

@AronisAt79 Can we support running CI checks on forks if we for example request it via a comment -or- if we approve a PR?
Edit: Adding a label that will run the ci tests on forks would be nice :)

I'm also wondering if it makes sense to prefix all heavy tests with heavy, e.g heavy_foo_bar so that we have a easier time filtering that via cargo test heavy across all crates?

@pinkiebell
Copy link
Contributor

@adria0 Can you prefix the prover tests with serial_? Seems like we use that term already. In a future PR we can get rid of the crate exclusion stuff inside the CI runner :)

@AronisAt79
Copy link
Contributor

I'm also wondering if it makes sense to prefix all heavy tests with heavy, e.g heavy_foo_bar so that we have a easier time filtering that via cargo test heavy across all crates?

Maybe @adria0 could better comment on that as i know he had a while back started an effort to create test batches according to duration and resource requirements. I agree that would be extremely helpful!

@pinkiebell
Copy link
Contributor

My intention is to get the integration tests inside the CI runner and to have a easy filter locally without excluding crates. Because right now we miss important stuff inside the CI checks. I saw that we already use serial_, for every test function that uses the MockProver should be prefixed w/ serial_, this makes also possible to test things locally without grep'ing through :)

@AronisAt79
Copy link
Contributor

@AronisAt79 Can we support running CI checks on forks if we for example request it via a comment -or- if we approve a PR? Edit: Adding a label that will run the ci tests on forks would be nice :)

@pinkiebell, i think it is doable - with some ( a lot ?) administration. But what would that offer against running CI on the fork independently? For PRs, if not done already, we can simply activate the workflows we want, based on event (pull request/push etc).

@pinkiebell
Copy link
Contributor

@AronisAt79 Can we support running CI checks on forks if we for example request it via a comment -or- if we approve a PR? Edit: Adding a label that will run the ci tests on forks would be nice :)

@pinkiebell, i think it is doable - with some ( a lot ?) administration. But what would that offer against running CI on the fork independently? For PRs, if not done already, we can simply activate the workflows we want, based on event (pull request/push etc).

Somehow I misinterpreted that this wasn't a fork 😂 . Anyway, running the tests on our own runner - on PRs from forks - would be nice. And I think adding a label from the reviewer team is good enough authorization?

@adria0
Copy link
Member Author

adria0 commented Aug 9, 2022

@adria0 Can you prefix the prover tests with serial_? Seems like we use that term already. In a future PR we can get rid of the crate exclusion stuff inside the CI runner :)

sure. done in c99ea9b

Copy link
Contributor

@pinkiebell pinkiebell left a comment

Choose a reason for hiding this comment

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

🤩

@adria0 adria0 linked an issue Aug 10, 2022 that may be closed by this pull request
adria0 and others added 4 commits August 11, 2022 12:55
Co-authored-by: Chih Cheng Liang <chihchengliang@gmail.com>
…circuits into feature/more-integration-tests
…caling-explorations/zkevm-circuits into feature/more-integration-tests
Copy link
Collaborator

@ChihChengLiang ChihChengLiang 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
Copy link
Contributor

CPerezz commented Aug 16, 2022

Let's try to merge this so that when @adria0 is back this is not super far away from main and requires a lot of work to rebase.

Copy link
Contributor

@CPerezz CPerezz left a comment

Choose a reason for hiding this comment

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

LGTM for now to merge and prevent PR outdating.

I'd really consider to use testing setup/teardown to reduce the verbosity and redundancy in the tests.

Also, I think it would be benefitial to setup a final solution that unifies ALL the randomness used across all the tests so that we don't do different things on each PR/test.

See: #641

Comment on lines +77 to +78
async fn test_tx_circuit_block(block_num: u64) {
const DEGREE: u32 = 20;
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of doing this on each test, why don't we use a crate like: https://github.com/markhildreth/test-context to do test setup/teardown?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
crate-bus-mapping Issues related to the bus-mapping workspace member crate-integration-tests Issues related to the integration-tests workspace member crate-prover Issues related to the prover workspace member crate-zkevm-circuits Issues related to the zkevm-circuits workspace member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add TxCircuit and BytecodeCircuit to the integration test
5 participants