Skip to content

Update EVM #1660

@emilbayes

Description

@emilbayes

Hi!

I've been looking for a disassembler with a call graph view, for analysing EVM (Ethereum VM) contracts.
I see there's some initial implementation here, but it looks like it's fairly outdated.
I'm more than happy to try and bring it up to date, if you are interested.

  1. I saw some issue about the internal data structures of capstone only supporting 16 byte instructions, where EVM has a PUSH32 which is a byte for the instruction itself and then 32 data bytes. Is this still a blocker? Or can the instruction be parsed as one and the data as another?

  2. Is it possible to implement "dynamic linking"? Ethereum has instructions for calling out to other contracts dynamically through the CALL, DELEGATECALL and STATICCALL instructions. It also supports "creating" new programs through CREATE and CREATE2 instructions.

  3. Furthermore it has some "magic" instructions, which I guess are kinda I/O, for interacting with "remote" data such as BLOCKHASH, NUMBER, EXTCODEHASH etc.

  4. While not explicitly marked, the IR for the solidity compiler also splits code into 3 sections, "constructor" code, "runtime" code and "data", which all loose their semantic labels once compiled, but can approximately be inferred. I'm not sure if this can be handled?

  5. Finally there's one thing I'm a bit unsure of how to handle here. EVM has an instruction assigned as INVALID and a whole lot of instructions that don't mean anything yet as they're unassigned.

Metadata

Metadata

Assignees

No one assigned

    Labels

    EVMArchoutdated-moduleIssue due to an outdated arch module

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions