Decoding the EVM
A new debugging format for smart contracts
Summary
… and it still won’t even be good
*Remix/Tenderly: please hold your glares until the end of the talk 🙂
About me
(mostly meetings and light project management)
Notably, I architected @truffle/debugger and @truffle/codec
g. nick // gnidan.eth
Talk agenda
How to make a debugger today
Solidity debugging today
What we can know vs. what we can’t
We need to understand Solidity internals for:
With solc and debug_traceTransaction, we can be sure about:
Key problem here: debuggers must guess how compilers work
(and good luck if the compiler changes!)
Debugging data formats
(have been solving this problem for traditional computing since the 1980s)
Making sense of raw bytes
Debugging data for smart contracts
Existing formats are sadly not suitable for smart contract languages:
Solidity encodings get weird because of gas and how state is stored on-chain:
from “storing things in solidity for fun and confusion”
https://gist.github.com/gnidan/b1890c68c8e0825d4a699929ccb2018e
ethdebug/format working group
Working group to-date
John Toman (Certora), Daniel Kirchner (Solidity), Kamil Śliwak (Solidity), Harry Altman (prev. Truffle), Amal Sudama (prev. Truffle), Marko Veniger (Tenderly)
Approach (as currently understood)
So exciting (and not at all tedious)!
Please help us do a good job
Thank you 🙏
Thursday,
Nov 16, 2023
İstanbul, Türkiye