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

CBOR Metadata is not supported in the Bytecode circuit #196

Open
oclaw opened this issue Dec 11, 2024 · 2 comments
Open

CBOR Metadata is not supported in the Bytecode circuit #196

oclaw opened this issue Dec 11, 2024 · 2 comments
Assignees

Comments

@oclaw
Copy link
Contributor

oclaw commented Dec 11, 2024

By default solidity compiler adds to the binary representation of the bytecode CBOR-encoded metadata: https://docs.soliditylang.org/en/latest/metadata.html

Expected behavior: circuit ignores this bytecode part or supports constraints for it
Actual behavior: circuit tries to treat this metadata as the code part and satisfiability check breaks.

Workaround: pass to circuit contracts compiled with --no-cbor-metadata option

@oclaw oclaw added bug Something isn't working blueprint labels Dec 11, 2024
@ETatuzova
Copy link
Contributor

It is not a bug. It's a problem.

Final bytecode circuit design depends on non-implemented and non-designed transaction circuit and MPT trie design. Bytecode hash is a part of account's state -- i.e. is a part of account MPT trie, and it is also used in transaction hash.

But what exactly bytecode hash is used (with metadata or not, what hash function is used) and how exactly bytecode hash used depends on cluster architecture. IFinal circuit design also depends on it. When we will have its description, we'll finalize bytecode circuit according to it.

@oclaw oclaw removed the bug Something isn't working label Dec 12, 2024
@oclaw
Copy link
Contributor Author

oclaw commented Dec 12, 2024

Ok. Anyway it needs to be addressed somehow, so will keep the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants