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 verification logic #1594

Merged
merged 3 commits into from
Aug 27, 2024
Merged

Fix verification logic #1594

merged 3 commits into from
Aug 27, 2024

Conversation

kuzdogan
Copy link
Member

This PR adds two changes:

  1. 2bf7168 fixes the incorrect return when a different auxdata was found in the creation bytecode. This became apparent when debugging the "cannot generate artifacts" error in Going through the unverified contracts during migration #1562. Here the contract has a different auxdata at the end of the creation code because it returns raw bytecode of the factory contract. The verification logic incorrectly stops when it finds different auxdata, whereas it should've continued to find the auxdatas by editing the contract and recompiling.
  2. Fixes the wrong match check (match.creationBytecode instead of match.runtimeBytecode) in the verification logic.

Also adds small modifications to logs during fetching traces for clarity.

…edited-recompilation

When a contract's creation code has for some reason a different auxdata, the current control flow returns false and abrubts the cborAuxdata position finding process.

Instead it should continue to find the positions by editing the contract and recompiling. The real auxdata is actually embedded inside the bytecode.
@kuzdogan kuzdogan merged commit aa7b4ca into staging Aug 27, 2024
2 of 4 checks passed
@kuzdogan kuzdogan deleted the fix-verification-logic branch September 9, 2024 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: COMPLETED
Development

Successfully merging this pull request may close these issues.

2 participants