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

Bytecodes differ only in last 32 bytes. The contract cannot be verified. #285

Open
semiok opened this issue May 13, 2023 · 6 comments
Open

Comments

@semiok
Copy link

semiok commented May 13, 2023

I deployed the contract first, but the code of the deployed contract was not committed immediately, after the deployment, I clean up the code and deleted the newlines or spaces. But when i want to verify the contract, the bytecodes does not match in last 32 bytes.

Theoretically the original code should produce the same bytecodes as the code added with some blank lines, but I found that zk mainnet/testnet source code verification system rejects such changes.

I am able to compiled to a bytecodes that matched the one on-chain except the last 32 bytes. Will the zk team are able to update the validation rules for the plugin to support this case? Just similar to the validation rules of Ethereum. As more developers get into zksync, I think a lot of people will encounter this problem.

Thanks.

@reednow
Copy link

reednow commented May 15, 2023

I am experiencing the same issue too, the last 32 bytes should not be failing the verification process.

@tonyke-bot
Copy link

+1

@AaronNan24
Copy link

wondering any updates on this issue?

@idea404
Copy link

idea404 commented Dec 13, 2023

Hi, long delay but have only seen this recently. The last 32 bytes contain the metadata. This includes code from the source files and file paths and names. The checks are strict for the plugins and on the verification service for the explorer as of this moment.

@reednow
Copy link

reednow commented Dec 16, 2023

Thank you for your response.
Yes, I'm aware that this is referred to as "full verification". However, Ethereum also supports "partial verification", which ignores the hash of the metadata part, as it is irrelevant to the code logic. Do you have any plans to support "partial verification"?

ethereum verifying smart contracts

@clemsos
Copy link

clemsos commented Feb 6, 2024

Hi, long delay but have only seen this recently. The last 32 bytes contain the metadata. This includes code from the source files and file paths and names. The checks are strict for the plugins and on the verification service for the explorer as of this moment.

Hello, is there a way to decode these last 32 bytes to get the metadata ? or is it just a hashed representation of it ?

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

No branches or pull requests

6 participants