-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: eth: correctly encode and simplify native input/output encoding
When generating eth traces, we encode "native" message inputs/outputs to "solidity ABI" by formatting the inputs/outputs the same way we do in FEVM's "handle_native_method". However, we had quite a few bugs with the implementation: 1. We were right-aligning 64bit values in 256bit words, instead of left-aligning (as we should given that these values are big-endian). 2. The return-value encoding wasn't correctly handling lengths. This patch: 1. Fixes those bugs. 2. Deduplicates the logic (we're doing _basically_ the same thing in both cases). 3. Removes all error paths (these functions can't fail).
- Loading branch information
Showing
4 changed files
with
42 additions
and
101 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
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