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

feat(contract-verifier): Auto-verify the same bytecode #3309

Closed
popzxc opened this issue Nov 20, 2024 · 0 comments · Fixed by #3527
Closed

feat(contract-verifier): Auto-verify the same bytecode #3309

popzxc opened this issue Nov 20, 2024 · 0 comments · Fixed by #3527
Milestone

Comments

@popzxc
Copy link
Member

popzxc commented Nov 20, 2024

Depends on #3190

We need to automatically verify the contracts with the same bytecode:

  • When a new contract is deployed, we should check if the verification data for this bytecode exists. If so, it shouldn't require additional verification.
  • When a new contract is verified, we should check if there are other contracts with the same bytecode. If so, they should become verified.
  • This should interact with partial matches: if there are differences in metadata, the contract should still be considered verified with partial match, but it should still be possible to do the "full" verification later.

⚠️ Don't treat the acceptance criteria as an implementation proposal: likely we don't actually need to scan the whole contracts table each time we deploy a contract or verify it. Most likely, we may just change the way we query verification data.

@popzxc popzxc moved this to Todo in DevEx squad Nov 20, 2024
@dutterbutter dutterbutter added this to the Q1 2025 milestone Jan 15, 2025
github-merge-queue bot pushed a commit that referenced this issue Jan 30, 2025
…3527)

Fixes #3190
Fixes #3309

I still have to test the migration logic (want to make sure that Era
mainnet data can be migrated correctly & quickly), but the PR is
reviewable otherwise.

This one is much bigger than I indended it to be, sorry 🥲 

- Changes `zksolc` used in contract verifier tests to 1.5.10 (old one
didn't have `ipfs` metadata hash support).
- Fixes problems that occured with newer compilers (e.g. `Yul` bytecode
extraction).
- Makes it easier to run contract verifier tests locally (pins compiler
versions, so that if you have a lot of compilers locally, tests don't
crash).
- Introduces partial matching for contracts
- Reworks the schema so that contracts with matching bytecode can be
"automatically" verified.
- Adds a migration to the new table.
@github-project-automation github-project-automation bot moved this from Todo to Done in DevEx squad Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants