go-ethereum
go-ethereum copied to clipboard
Optimize state rollback performance
Geth provides an RPC endpoint to rewind the chain head: debug.setHead().
However, the entire procedure is highly inefficient, it takes around 500ms to revert a single block on my machine. Notably, the actual state execution accounts for only ~20ms of that time.
This RPC should be optimized for providing a better UX.
I could work on it