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

Implement Gasprice opcode and gadget#422

Merged
CPerezz merged 7 commits into
mainfrom
gasprice
Apr 4, 2022
Merged

Implement Gasprice opcode and gadget#422
CPerezz merged 7 commits into
mainfrom
gasprice

Conversation

@CPerezz
Copy link
Copy Markdown
Contributor

@CPerezz CPerezz commented Apr 3, 2022

The PR adds an implementation for GASPRICE bus-mapping opcode and the zkevm-circuits gadget structure.

Also, it adds a simplification on the testing utilities in zkevm-circuits in 0fea7a8

@github-actions github-actions Bot added crate-bus-mapping Issues related to the bus-mapping workspace member T-opcode Type: opcode-related and focused PR/Issue crate-zkevm-circuits Issues related to the zkevm-circuits workspace member labels Apr 3, 2022
@CPerezz CPerezz changed the title Gasprice Implement Gasprice opcode and gadget Apr 4, 2022
@CPerezz CPerezz marked this pull request as ready for review April 4, 2022 08:53
@CPerezz CPerezz requested review from ed255 and han0110 April 4, 2022 08:53
CPerezz and others added 7 commits April 4, 2022 12:52
This module was tending to grow into a monster as `mock/lib.rs` was in
the past due to the fact that a lot of functions were being created with
minimal customizations from the generic simple calls.

Instead, the idea would be that on each test the ctx is written. And to
not make it super verbose, `TestContext::simple_ctx_with_bytecode` has
been implemented.

Then, all of the tests that were able to have simpler and easier config
calls have been created.
Co-authored-by: Han <tinghan0110@gmail.com>
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! Nice work on the simplification of the testing utilities :D


assert_eq!(
run_test_circuits(
TestContext::<2, 1>::simple_ctx_with_bytecode(bytecode).unwrap(),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I have to say that it's a bit strange specifying the ::<2,1> because the simple_ctx_with_bytecode is not generic and doesn't require self. But without it, the code doesn't compile. So I don't have any solution for this :P

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It surprised me a lot too!! It's a weird const_generics property that I did not see before.

@CPerezz CPerezz merged commit d554260 into main Apr 4, 2022
@CPerezz CPerezz deleted the gasprice branch April 4, 2022 16:50
zemse pushed a commit to zemse/zkevm-circuits that referenced this pull request Mar 22, 2023
* add invalid creation code circuit

* remove outdated todo
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-zkevm-circuits Issues related to the zkevm-circuits workspace member T-opcode Type: opcode-related and focused PR/Issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants