ethereum / ethereum/execution-specs

Investigate differences between EELS and evmone's t8n

Open
#1,202 5 comments 0 reactions 0 assignees View on GitHub
A-spec-tools C-bug stale
Dominant language
Python
Stars
1.2k
Forks
505
Avg merge
2d 14h
Merged PRs (30d)
116

Description

> @danceratopz would you mind checking to see if this branch also fixes ethereum/execution-spec-tests#994 (tracing) for you?

Hey @SamWilsn, tracing working well and results generally better match the output of `evmone-t8n` (as apposed to the last version of tracing that was working in `forks/prague`: https://github.com/ethereum/execution-specs/commit/5f2d661dd30a5813aa972f27feb332735c6caaaa)
- `memory` is no longer logged in the traces (jfyi: the user can't currently configure extended trace options for `fill`).
- No spurious `"returnData":"0x"` entries for Prague, but it is for pre-Prague forks, example below (`evmone-t8n` does not contain these entries for any forks):

Shanghai EELS:
```
{"pc":0,"op":70,"gas":"0x5f58ef8","gasCost":"0x2","memSize":0,"stack":[],"returnData":"0x","depth":1,"refund":0,"opName":"CHAINID"}
{"pc":1,"op":96,"gas":"0x5f58ef6","gasCost":"0x3","memSize":0,"stack":["0x1"],"returnData":"0x","depth":1,"refund":0,"opName":"PUSH1"}
{"pc":3,"op":85,"gas":"0x5f58ef3","gasCost":"0x5654","memSize":0,"stack":["0x1","0x1"],"returnData":"0x","depth":1,"refund":0,"opName":"SSTORE"}
{"pc":4,"op":0,"gas":"0x5f5389f","gasCost":"0x0","memSize":0,"stack":[],"returnData":"0x","depth":1,"refund":0,"opName":"STOP"}
{"output":"","gasUsed":"0x5659"}
```

Prague EELS:
```
{"pc":0,"op":70,"gas":"0x5f58ef8","gasCost":"0x2","memSize":0,"stack":[],"depth":1,"refund":0,"opName":"CHAINID"}
{"pc":1,"op":96,"gas":"0x5f58ef6","gasCost":"0x3","memSize":0,"stack":["0x1"],"depth":1,"refund":0,"opName":"PUSH1"}
{"pc":3,"op":85,"gas":"0x5f58ef3","gasCost":"0x5654","memSize":0,"stack":["0x1","0x1"],"depth":1,"refund":0,"opName":"SSTORE"}
{"pc":4,"op":0,"gas":"0x5f5389f","gasCost":"0x0","memSize":0,"stack":[],"depth":1,"refund":0,"opName":"STOP"}
{"output":"","gasUsed":"0x5659"}
```

Couple of unimportant(?) differences (same behavior here as for ethereum/execution-spec-tests#1195, i believe):
- `evmone-t8n` doesn't add a trace for `STOP`.
- `evmone-t8n` doesn't report the full gas used for an operation, EELS does
```diff
< {"pc":1,"op":84,"gas":"0x48c2a","gasCost":"0x64","memSize":0,"stack":["0x0"],"depth":1,"refund":0,"opName":"SLOAD"}
---
> {"pc":1,"op":84,"gas":"0x48c2a","gasCost":"0x834","memSize":0,"stack":["0x0"],"depth":1,"refund":0,"opName":"SLOAD"}
5c5,7
< {"pc":4,"op":84,"gas":"0x483f2","gasCost":"0x64","memSize":0,"stack":["0x3"],"depth":1,"refund":0,"opName":"SLOAD"}
---
> {"pc":4,"op":84,"gas":"0x483f2","gasCost":"0x834","memSize":0,"stack":["0x3"],"depth":1,"refund":0,"opName":"SLOAD"}
> {"pc":5,"op":0,"gas":"0x47bbe","gasCost":"0x0","memSize":0,"stack":["0x0"],"depth":1,"refund":0,"opName":"STOP"}
> {"output":"","gasUsed":"0x106e"}
```
![image](https://github.com/user-attachments/assets/46403056-18e2-4f79-a88c-b70cc0c93c93)

_Originally posted by @danceratopz in https://github.com/ethereum/execution-specs/issues/1199#issuecomment-2823998327_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.