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

spec for codestore error#393

Merged
CPerezz merged 3 commits into
privacy-ethereum:masterfrom
scroll-tech:error_code_store
Apr 13, 2023
Merged

spec for codestore error#393
CPerezz merged 3 commits into
privacy-ethereum:masterfrom
scroll-tech:error_code_store

Conversation

@DreamWuGit
Copy link
Copy Markdown
Collaborator

@DreamWuGit DreamWuGit commented Mar 6, 2023

spec issue #394
circuit PR is privacy-ethereum/zkevm-circuits#1265

  • hackmd spec for code store related two errors: CodeStoreOutOfGas and MaxCodeSizeExceeded

Copy link
Copy Markdown
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.

Some changes for the text. Constraints look good.

Comment thread specs/error_state/ErrorCodeStore.md Outdated
Comment thread specs/error_state/ErrorCodeStore.md Outdated
Comment thread specs/error_state/ErrorCodeStore.md Outdated
Comment thread specs/error_state/ErrorCodeStore.md Outdated
Comment thread specs/error_state/ErrorCodeStore.md Outdated

### Constraints
1. `code_store_cost` > gas_left or `length` > `MAXCODESIZE`
2. Current call must be failed.
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.

Current call should not be STATICALL. Do we need to highlight it here?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@CPerezz you are right ! will add this constraint.

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.

Aside from this one, I wonder if we're missing something else. Specially regarding call-depth or similar.

Copy link
Copy Markdown
Collaborator Author

@DreamWuGit DreamWuGit Mar 10, 2023

Choose a reason for hiding this comment

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

oh, I realize that each constraint you mention has its error gadget handling. like if create in STATICALL , ErrorWriteProtection gadget will handle it. if call-depth exceeds, it will go to ErrorDepth gadget side. so I don't think need check each one. otherwise we are going to ensure all other errors of create(ErrDepth, ErrInsufficientBalance, ErrContractAddressCollision , ErrInvalidCode etc.) not happens. WDYT?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

added non static call constraint in cbb1600

DreamWuGit and others added 2 commits March 9, 2023 17:18
Co-authored-by: Carlos Pérez <37264926+CPerezz@users.noreply.github.com>
@DreamWuGit DreamWuGit marked this pull request as ready for review March 14, 2023 06:28
Copy link
Copy Markdown
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!!

Thanks @DreamWuGit !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants