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: call failure gas refund to caller #698

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open

Conversation

Nashtare
Copy link
Collaborator

@Nashtare Nashtare commented Oct 3, 2024

Upon CALL failure, we refund the amount initially sent to the caller. However, during the call frame, the target to may have spent it all, being unable to refund fully the initial amount.

We need to call %min(initial_amount, current_balance) and withdraw this instead. This edge case unfortunately wasn't caught by the Ethereum test suite but got triggered in John's test (block 978, txn 43). Will consider adding it as regression payload once the whole block is passing.

3/N @praetoriansentry

@Nashtare Nashtare added this to the Testing and Validation milestone Oct 3, 2024
@Nashtare Nashtare self-assigned this Oct 3, 2024
@github-actions github-actions bot added the crate: evm_arithmetization Anything related to the evm_arithmetization crate. label Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crate: evm_arithmetization Anything related to the evm_arithmetization crate.
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

1 participant