-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
refactor(contract-verifier): Brush up contract verifier #3189
Conversation
c630768
to
45003b5
Compare
45003b5
to
ddc5c8e
Compare
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.
- Is the contract verifier library used somewhere externally? (Looks like that judging by commit history.) These uses would probably need to be updated, and I'm not quite sure which verifier APIs should be public.
- I don't see a compelling reason why the contract verifier API should be a node component, especially given that the verifier backend is not a component. I think it could work autonomously provided that it uses some interface to interact with a node (namely, fetch the contract bytecode, contract deployer events and the deploying transaction). All of these seem to be covered by the Web3 RPC. Would such a refactoring be too deep to handle? (Obviously, won't do it in this PR since it's large as-is.)
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.
Is the contract verifier library used somewhere externally?
@AntonD3 please help with it.
I don't see a compelling reason why the contract verifier API should be a node component
It shouldn't. It was a compromise to put it there. Overall I wouldn't proceed with any deep refactoring unless it's clearly needed/beneficial short term. There were discussions about moving contract verifier out of zksync-era somewhere closer to block-explorer but this was deprioritized. So its future is not determined
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.
Approve for workflows
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.
Sorry for being late to the party. Looks great!
Left a few nits, but feel free to ignore.
@popzxc I'm preparing a follow-up PR that adds EVM emulation support to the contract verifier; will address your suggestions there. |
What ❔
Brushes up contract verifier code.
Why ❔
Would make it easier to support EVM emulation in the contract verifier.
Checklist
zkstack dev fmt
andzkstack dev lint
.