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): Partial matching & automatic verification #3527

Merged
merged 20 commits into from
Jan 30, 2025

Conversation

popzxc
Copy link
Member

@popzxc popzxc commented Jan 24, 2025

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.

@popzxc popzxc force-pushed the popzxc-contract-verifier branch 4 times, most recently from 2a0083d to 44aac98 Compare January 24, 2025 12:39
@popzxc popzxc force-pushed the popzxc-contract-verifier branch from 44aac98 to 514900f Compare January 24, 2025 13:22
@popzxc popzxc marked this pull request as ready for review January 24, 2025 14:01
@popzxc popzxc requested a review from a team as a code owner January 24, 2025 14:01
@popzxc popzxc requested a review from slowli January 28, 2025 11:03
Copy link
Contributor

@perekopskiy perekopskiy left a comment

Choose a reason for hiding this comment

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

Approach with indexing hashes is nit!

core/lib/dal/src/contract_verification_dal.rs Outdated Show resolved Hide resolved
core/lib/dal/src/contract_verification_dal.rs Outdated Show resolved Hide resolved
@popzxc popzxc requested a review from perekopskiy January 28, 2025 13:24
perekopskiy
perekopskiy previously approved these changes Jan 28, 2025
core/lib/contract_verifier/src/compilers/solc.rs Outdated Show resolved Hide resolved
core/bin/contract-verifier/src/main.rs Show resolved Hide resolved
core/bin/contract-verifier/src/main.rs Outdated Show resolved Hide resolved
core/lib/dal/src/contract_verification_dal.rs Outdated Show resolved Hide resolved
core/lib/dal/src/contract_verification_dal.rs Outdated Show resolved Hide resolved
core/lib/dal/src/contract_verification_dal.rs Show resolved Hide resolved
core/lib/dal/src/contract_verification_dal.rs Show resolved Hide resolved
core/lib/dal/src/contract_verification_dal.rs Show resolved Hide resolved
core/lib/dal/src/contract_verification_dal.rs Outdated Show resolved Hide resolved
@popzxc popzxc requested a review from slowli January 30, 2025 07:40
@popzxc popzxc enabled auto-merge January 30, 2025 12:31
@popzxc popzxc added this pull request to the merge queue Jan 30, 2025
Merged via the queue into main with commit bf9fe85 Jan 30, 2025
42 checks passed
@popzxc popzxc deleted the popzxc-contract-verifier branch January 30, 2025 14:33
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.

feat(contract-verifier): Auto-verify the same bytecode Support partial matches in contract verifier
4 participants