Skip to content

fix: vm tracing should ignore upper dirty bits in call - #80

Merged
fubuloubu merged 2 commits into
ApeWorX:mainfrom
eliteWalrus4164:fix-call-address-truncate
Dec 4, 2025
Merged

fix: vm tracing should ignore upper dirty bits in call#80
fubuloubu merged 2 commits into
ApeWorX:mainfrom
eliteWalrus4164:fix-call-address-truncate

Conversation

@eliteWalrus4164

Copy link
Copy Markdown
Contributor

Evm CALL, STATICCALL, DELEGATECALL opcodes naturally ignore the upper dirty bits of the address argument, but the vmTrace module validates the address argument strictly.

Take as an example the transaction 0x679ea9d6528c1fffa631799832c5ee97ee352a3469464803bdfe8281e9f1c0ec on ethereum mainnet, during which a call is made to the address 44000000000004444c5dc75cb358380d2e3de08a90 (21 bytes).

What I did

Truncate the bytes representation of the stack element to 20 bytes before using the pydantic validation (which will pad left when the value is less than 20 bytes).

fixes: #

How I did it

How to verify it

Checklist

  • Passes all linting checks (pre-commit and CI jobs)
  • New test cases have been added and are passing
  • Documentation has been updated
  • PR title follows Conventional Commit standard (will be automatically included in the changelog)

@eliteWalrus4164
eliteWalrus4164 force-pushed the fix-call-address-truncate branch from 691ed08 to 4a032d3 Compare October 17, 2025 12:02
Evm CALL, STATICCALL, DELEGATECALL opcodes naturally ignore the upper
dirty bits of the address argument, but the vmTrace module validates the
address argument strictly.

Take as an example the transaction `0x679ea9d6528c1fffa631799832c5ee97ee352a3469464803bdfe8281e9f1c0ec` on ethereum mainnet, during which a call is made to the address `44000000000004444c5dc75cb358380d2e3de08a90` (21 bytes).
@eliteWalrus4164
eliteWalrus4164 force-pushed the fix-call-address-truncate branch from 4a032d3 to 11e8a17 Compare October 17, 2025 12:06
@eliteWalrus4164 eliteWalrus4164 changed the title Vm tracing should ignore upper dirty bits in call fix: Vm tracing should ignore upper dirty bits in call Oct 20, 2025
@fubuloubu
fubuloubu enabled auto-merge (squash) December 3, 2025 21:12
@fubuloubu fubuloubu changed the title fix: Vm tracing should ignore upper dirty bits in call fix: vm tracing should ignore upper dirty bits in call Dec 4, 2025
@fubuloubu
fubuloubu disabled auto-merge December 4, 2025 02:41
@fubuloubu

Copy link
Copy Markdown
Member

Okay can't figure out why CI won't run, but lgtm

@fubuloubu
fubuloubu merged commit 02dd06a into ApeWorX:main Dec 4, 2025
2 checks passed
@fubuloubu

Copy link
Copy Markdown
Member

Thanks for the PR (sorry for not noticing it sooner)

released in https://github.com/ApeWorX/evm-trace/releases/tag/v0.2.7

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants