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

fix(verifier): return evm compiler version actually used for successful verification #1092

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rimrakhimov
Copy link
Member

Right now the versions used in the request are returned. For example, if user specified a usual v0.8.28+commit.7893614a solidity compiler in the request it will be returned even though era-solidity v0.8.28+commit.acc7d8f9 resulted in successful verification

@rimrakhimov
Copy link
Member Author

There is a problem with zksolc_1_3_5 test (https://github.com/blockscout/blockscout-rs/actions/runs/11501807515/job/32015247302?pr=1092). It seems that zksolc v1.3.5 does not differentiate between solidity compilers that results in any era-solidity compiler (and the usual solidity as well) verify given contract. Because ListFetcher keeps versions inside a HashMap internally, that results in random era-solidity compiler version returned in case of verification success, resulting in floppy test case.

In general, that is just a test case problem, which may be fixed by specifying a list of possible compiler responses. But I believe that reveals more generic issue. There may be several era-solidity compilers with the same evm version (e.g., v0.8.28), but different zksync revisions (e.g, v1.0.0 vs v1.0.1). In most cases we want the latest revision to be tried first, as it has the most chances to be successful and reduce the average verification time. But currently, we just use a random order for them. It may be especially noticeable if more compilers with the same evm versions are added in the future.

@rimrakhimov rimrakhimov marked this pull request as draft October 28, 2024 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant