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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

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
Comment on lines +249 to +250
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub verification_problems: Vec<VerificationProblem>,
Copy link
Member Author

Choose a reason for hiding this comment

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

The side effect here is that if BE front-end won't be updated together with this change, the partially verified contracts will render as "fully verified" ones. However, the risk here is not great (and we will communicate this update to partners), so IMHO it's better than a breaking change.

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
1 participant