Skip to content

Commit

Permalink
docs(forge): document non-obvious traces (#1248)
Browse files Browse the repository at this point in the history
  • Loading branch information
leovct authored Aug 1, 2024
1 parent 11d2ee6 commit 69dd216
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/forge/traces.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,12 @@ Forge will try to decode as many signatures and values as possible, but sometime
[<Gas Usage>] <Address>::<Calldata>
└─ ← <Return Data>
```

Some traces might be harder to grasp at first glance. These include:

- The `OOG` shorthand stands for "Out Of Gas".
- The acronym `EOF` stands for "Ethereum Object Format", which introduces an extensible and versioned container format for EVM bytecode. For more information, read [here](https://evmobjectformat.org/).
- `NotActivated` means the feature or opcode is not activated. Some versions of the EVM only support certain opcodes. You may need to use a more recent version usign the `--evm_version` flag. For example, the `PUSH0` opcode is only available since the [Shanghai](https://www.evm.codes/?fork=shanghai) hardfork.
- `InvalidFEOpcode` means that an undefined bytecode value has been encountered during execution. The EVM catches the unknown bytecode and returns the `INVALID` opcode instead, of value `0xFE`. You can find out more [here](https://www.evm.codes/#fe).

For a deeper insight into the various traces, you can explore the [revm source code](https://github.com/bluealloy/revm/blob/main/crates/interpreter/src/instruction_result.rs).

0 comments on commit 69dd216

Please sign in to comment.