-
Notifications
You must be signed in to change notification settings - Fork 396
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
Going through the unverified contracts during migration #1562
Comments
Sharing findings here: I categorized the failed verifications under the following errors. I am going to share the number of errors for the Mainnet contracts only because with a total of 32k contracts, it's the majority of unverified contracts. Metadata file not foundError message: This case is quite unexpected as they indeed don't have any metadata file in the current FS as well as the backups. This is just lost data, it seems. Abstract contractError message: I fail to understand how these contracts were verified. The Cannot insert contractError message: These contracts seem to contain a Cannot generate contract artifactsError message: Found that these contracts have a different auxdata at the end of their bytecode and the verification process stops incorrectly. Fixed by #1594 Metadata match but not bytecodesError message: Turns out they can be verified when they are verified with Import from Etherscan but the verification can't be reproduced via the files saved in the Sourcify repo. This is expected as the bug says exactly this, the info in the metadata does not reproduce the bytecode found onchain. Selfdesctruct'ed contractsThese contracts return the below error. Upon inspecting couple of them I see the general pattern that these are the Error message: Bytecodes don't matchError message: This is the majority of the contracts.
Compiler ErrorsError message: Here there can be multiple errors for each contract so it's difficult to get a full number. These are also weird because it leaves me thinking how did they compile and get verified in the first place? Maybe an issue with the compiler binary platform? There were couple different errors:
I'll try to debug these a bit to see if I can catch a pattern. |
When moving from the old infra to GCP, we had to re-verify all contracts on the GCP instance. This is because the old infra only had files (after the incident, we had the backups) and to have the DB data, we need to compile them all and verify.
In the end we verified +5M contracts, this is the final sync table, ordered by
not_synced
, totals on the last row:Table
Bear in mind there are chains like Ethereum Goerli (5) that are deprecated ie. not supported. Ex-Kovan, now Lukso (42) will not be added as this is an unresolved issue about the chainId collusion.
We need to look at why these contracts don't verify. Some give "There is not contract at 0x...` which means the contract might have been destroyed. Some give "bytecodes don't match" which is weird because how did they get verified in the first place? Some give compiler errors which is also unexpected.
We should categorize these error and go through them. I believe we'll gain a lot of insights and potentially find some bugs with this. The difficult thing is there are a lot of contracts and we have to recognize some patterns, group the contracts and execute and report systematically.
The text was updated successfully, but these errors were encountered: