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

[CREATE Part C] bus-mapping and gadget implementation#1358

Closed
roynalnaruto wants to merge 5 commits into
privacy-ethereum:mainfrom
scroll-tech:feat/create-part-c
Closed

[CREATE Part C] bus-mapping and gadget implementation#1358
roynalnaruto wants to merge 5 commits into
privacy-ethereum:mainfrom
scroll-tech:feat/create-part-c

Conversation

@roynalnaruto
Copy link
Copy Markdown
Collaborator

@roynalnaruto roynalnaruto commented Apr 14, 2023

Description

Part C

This PR is based on Part B (#1357)
Part B is based on Part A (#1356)

The commits to be reviewed are:

Issue Link

#1130

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Contents

  • Bus mapping implementation for CREATE/CREATE2
  • EVM circuit's gadget for CREATE/CREATE2

How Has This Been Tested?

Tests can be found here: https://github.com/scroll-tech/zkevm-circuits/blob/2d2bfc6ccf179ade1a8d063f9586b93e5283a557/zkevm-circuits/src/evm_circuit/execution/create.rs#L678

@github-actions github-actions Bot added crate-bus-mapping Issues related to the bus-mapping workspace member crate-mock Issues related to the mock workspace member crate-zkevm-circuits Issues related to the zkevm-circuits workspace member labels Apr 14, 2023
@roynalnaruto roynalnaruto changed the title Feat/create part c [CREATE Part C] bus-mapping and gadget implementation Apr 14, 2023
@roynalnaruto roynalnaruto requested review from hero78119 and lispc April 14, 2023 14:16
@roynalnaruto roynalnaruto mentioned this pull request Apr 14, 2023
4 tasks
@andyguzmaneth andyguzmaneth linked an issue Apr 20, 2023 that may be closed by this pull request
KimiWu123 added a commit that referenced this pull request May 25, 2023
### Description

NOTE: This is an updated version of
#1356

This is Part A of a 3 part pull request to add support for
`CREATE`/`CREATE2` opcodes.

Part A:
#1356
Part B:
#1357
Part C:
#1358

### Issue Link

#1130 

### Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] This change requires a documentation update

### Contents
 
As part of the bigger additions needed for the `CREATE`/`CREATE2`
opcodes' gadget, this PR adds support for the copy circuit to "always"
have a value accumulator field `value_acc`.

### Rationale

We need a value accumulator (of the random linear combination) in order
to get the `RLC(bytes)` for the bytes copied from `Memory` to `Bytecode`
(specifically the init code). This RLC is later used to do a lookup to
the Keccak table to check the value of `keccak256(init_code)`.

### How Has This Been Tested?

The existing tests for copy circuit pass for the updated constraints on
the copy circuit.

---------

Co-authored-by: Rohit Narurkar <rohit.narurkar@protonmail.com>
Co-authored-by: KimiWu <leonhartwu@gmail.com>
@KimiWu123
Copy link
Copy Markdown
Contributor

moved to #1430

@KimiWu123 KimiWu123 closed this May 26, 2023
KimiWu123 added a commit that referenced this pull request Jun 9, 2023
### Description

NOTE: This is an updated version of
#1358

This PR is actually based on top of
#1425

### Issue Link

#1130 

### Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] This change requires a documentation update

### Contents

Bus mapping implementation for CREATE/CREATE2
EVM circuit's gadget for CREATE/CREATE2

### How Has This Been Tested?
Tests can be found here:
https://github.com/scroll-tech/zkevm-circuits/blob/2d2bfc6ccf179ade1a8d063f9586b93e5283a557/zkevm-circuits/src/evm_circuit/execution/create.rs#L678

---------

Co-authored-by: Rohit Narurkar <rohit.narurkar@protonmail.com>
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-mock Issues related to the mock 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.

Implement CREATE & CREATE2

2 participants