Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add non static call constraint for sstore #467

Merged

Conversation

DreamWuGit
Copy link
Collaborator

@DreamWuGit DreamWuGit commented Apr 19, 2022

sstore op code will modify state, so if it is executed in static call , exception will occur , here constrain only in non static call , spec privacy-scaling-explorations/zkevm-specs#188

@DreamWuGit DreamWuGit requested a review from a team as a code owner April 19, 2022 06:51
@DreamWuGit DreamWuGit requested review from miha-stopar and removed request for a team April 19, 2022 06:51
@github-actions github-actions bot added crate-bus-mapping Issues related to the bus-mapping workspace member crate-zkevm-circuits Issues related to the zkevm-circuits workspace member labels Apr 19, 2022
@DreamWuGit
Copy link
Collaborator Author

the CI error looks weird to me (https://github.com/appliedzkp/zkevm-circuits/runs/6073405191?check_suite_focus=true), Does anybody know that ? @CPerezz @ChihChengLiang @miha-stopar ?

@ChihChengLiang
Copy link
Collaborator

ChihChengLiang commented Apr 19, 2022

@DreamWuGit Created an issue #470 and I'm investigating. For reviewers, Feel free to ignore that error and do the review.

Copy link
Collaborator

@roynalnaruto roynalnaruto left a comment

Choose a reason for hiding this comment

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

Minor suggestions from my side, looks good otherwise :)

bus-mapping/src/evm/opcodes/sstore.rs Show resolved Hide resolved
bus-mapping/src/evm/opcodes/sstore.rs Show resolved Hide resolved
@AronisAt79
Copy link
Contributor

the CI error looks weird to me (https://github.com/appliedzkp/zkevm-circuits/runs/6073405191?check_suite_focus=true), Does anybody know that ? @CPerezz @ChihChengLiang @miha-stopar ?

@DreamWuGit this happens because github.secrets are not shared with workflows triggered from PRs on forks.Therefore the invoked action is not permitted to access the https://api.github.com/repos/appliedzkp/zlevm-circuits/pull/467/requested_reviewers endpoint. We are working on alternatives with @ntampakas

@ntampakas
Copy link
Contributor

We are trying to avoid GH Actions limitations on forked repos, by implementing two different workflows:

  1. An action, triggered by the PR coming from the fork, that will create and upload an artifact that will contain all the necessary info (f.x.: PR_NUM, REPO, etc.)
  2. A cron job that will be executed periodically on the base repo, after downloading the artifact mentioned above and assigning randomly selected reviewers to the PR in question.

This is the cleanest way to trigger workflows from PRs coming from forks, that bypasses the necessity to access the GH secret(s).
There are a couple of drawbacks:
Github does no guarantee that the workflow using the schedule event, will run at the pre-defined time.

@ntampakas
Copy link
Contributor

ntampakas commented Apr 26, 2022

Moved to #446

Copy link
Collaborator

@icemelon icemelon left a comment

Choose a reason for hiding this comment

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

overall LGTM. Just need to address the comments

@DreamWuGit
Copy link
Collaborator Author

DreamWuGit commented Apr 27, 2022

@ntampakas I am curious why other PR not hit this issue , even my other PR (i.e. #466 is OK) :)

@DreamWuGit
Copy link
Collaborator Author

DreamWuGit commented Apr 27, 2022

@ntampakas I am curious why other PR not hit this issue , even my other PR (i.e. #466 is OK) :)

after push new stuff, CI can pass now .

@CPerezz
Copy link
Member

CPerezz commented Apr 27, 2022

Following up on the previous message, here is the implementation we have concluded on with pros and cons.

1. Every PR (either from fork or not) creates and uploads an artifact on base repo, consisting of all PR info.

2. A second workflow runs periodically as a scheduled task, downloads and extracts the artifact and in general may run any action requiring access to GitHub token: In our case the action is to randomly select reviewer(s) and assign them in PR.

Pros: No need to distribute tokens to external accounts, as first artifact creation requires no write permission. Same concept can be used for providing benchmark results in comments.

Cons: Second workflow is executed as a cron job, so it will flood the actions history with workflow run records. It will make it a bit annoying to read the actions history (without filtering). As mentioned in the comment above, Github does no guarantee that the workflow using the schedule event, will run at the pre-defined time. Therefore reviewers assignment, might take more than expected.

If everyone agrees on this approach, i will shortly raise a PR for review. @ed255 @CPerezz @ChihChengLiang

@AronisAt79 @ntampakas could you move this thread to the issue/PR where it corresponds to?

Copy link
Member

@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.

Can we update and merge this??

@CPerezz
Copy link
Member

CPerezz commented May 3, 2022

@lispc I can't rebase myself in order to merge it.
Please do so and ping me on TG or here in the conversation once the rebase has passed the CI so that I can merge this PR 😄

@lispc
Copy link
Collaborator

lispc commented May 3, 2022

@CPerezz

i don't fully understand "rebase myself in order to merge it".

I clicked the "update branch" button. And i think there is a "squash and merge" button, which is very helpful for things like this?

image

@CPerezz
Copy link
Member

CPerezz commented May 3, 2022

Oh @lispc I thought you couldn't merge the PR.

Ye, just squash and merge please! :)

@lispc
Copy link
Collaborator

lispc commented May 3, 2022

nonono, I cannot merge this. I snapshot from another repo just to give a demo..

@CPerezz
Copy link
Member

CPerezz commented May 3, 2022

nonono, I cannot merge this. I snapshot from another repo just to give a demo..

OOOOH! No, what I meant was that when your branch is out-of-date you can rebase or merge main into it.
I wanted you to rebase. That was all ahhaha

Thanks!! Merging!

@CPerezz CPerezz merged commit a0cc988 into privacy-scaling-explorations:main May 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crate-bus-mapping Issues related to the bus-mapping 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.

None yet

8 participants