-
Notifications
You must be signed in to change notification settings - Fork 857
circuit for invalid creation code #1292
circuit for invalid creation code #1292
Conversation
Hi @DreamWuGit , would you kindly resolved the conflict, since this pr #1342 is merged :) ? Thanks! |
yes @DreamWuGit can copy new codes from scroll fork i think. i have already merged these branches. |
@DreamWuGit kindly reminder: could you update this PR to resolve conflicts? Thanks! |
CREATE PRs (#1419 #1425 #1430 ) are all merged. This PR is unblocked. |
@silathdiir will work on this |
@silathdiir is this ready for review? |
Yes, thanks. I update this PR with latest main branch, and also the spec doc PR privacy-scaling-explorations/zkevm-specs#400. Please help review when you have time. Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, one question regarding to soundness
In create.rs and return_revert, I didn't find the constraint where force the prover must fill is_success == false
if code starting with 0xef
. I am wondering what if a malicious prover fill is_success = true
, can the create/return_revert circuit catch up this InValidCreationWord error or actually it can pass?
From what I understand the only place to avoid this soundness is create.rs
must also have constrain which force to go this error execution step.
Yes, I see, I think you are right.
|
Hi @hero78119, sorry for late update. After some investigation, it seems that in CREATE (or CREATE2) execution step, the contract Run result could not be retrieved (from memory) to check this ErrInvalidCode error. Please correct me if I was wrong, thanks. So I fix to add a constraint which constrains the first byte of create init code must not be |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the quick fix!! @silathdiir 🙏
I think we also need to fix specs part, other than that all LTGM!
…`init_code_first_byte` to 0 in else condition, and rename `construct_with_last_return` to `construct_with_return_data`.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 LGTM! 💯
Hi @lispc, |
i will have a look |
* refactor many prover codes * fix * fix * tmp hack for opcode parsing
Description
circuit for invalid creation code error in create, markdown spec privacy-scaling-explorations/zkevm-specs#400
Issue Link
issue #1291
Type of change
Rationale
Get first byte of code to store , check it is 0xef
This PR contains: