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 check against 0xEF byte in contract creation. #719

Merged
merged 1 commit into from
Oct 14, 2024
Merged

Conversation

LindaGuiga
Copy link
Contributor

In some transactions, the kernel might process a transaction with contract creation and empty code. In process_contract_creation_txn_after_constructor, there is a check that the first byte is not 0xef. The check works for empty contracts in the non-batched case since SEGMENT_RETURNDATA is empty in that case. However, in the batched case, the first byte might come from a previous transaction, if the current contract is empty.

This PR addresses this issue by only checking the first byte when code_size > 0.

@LindaGuiga LindaGuiga added the bug Something isn't working label Oct 11, 2024
@github-actions github-actions bot added the crate: evm_arithmetization Anything related to the evm_arithmetization crate. label Oct 11, 2024
@Nashtare
Copy link
Collaborator

7.5/7.5 @praetoriansentry 👀

@LindaGuiga LindaGuiga merged commit 340b054 into develop Oct 14, 2024
20 checks passed
@LindaGuiga LindaGuiga deleted the fix-ef-check branch October 14, 2024 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working crate: evm_arithmetization Anything related to the evm_arithmetization crate.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants