This repository has been archived by the owner on Jul 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 858
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(callop): fix LastCalleeId, and other fixes (#1594)
### Description 1. for callop, when there is no bytecode (empty account or non-existed account) or pre check fails, the return data should be flushed to empty, and the LastCalleeId (used in RETURNDATACOPY opcode) should be set to correct callee id instead of 0. 2. precompile can fail. (eg: out of gas) 3. "precompile account exists" is only the current status of eth mainnet. It is not part of evm spec. Following spec, precompile account can be non-existed. 4. when ErrDepth, there is no transfer 5. (not 100% sure) I also changed the 'is_static' check for only call opcode. It was a fix i made long ago during fixing each fail case of testool. I guess maybe we can construct this test case to check this behavior: delegatecall inside callcode(with non 0 value) inside staticcall. It is a valid tx, but the 'value' is not zero? ### Issue Link [_link issue here_] ### Type of change - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update
- Loading branch information
Showing
2 changed files
with
29 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters