chainwayxyz / citrea

Citrea, Bitcoin's First ZK Rollup 🍊🍋
https://citrea.xyz
GNU General Public License v3.0
114 stars 22 forks source link

Better State Diff Format #711

Open ercecan opened 3 months ago

eyusufatik commented 3 months ago

Currently we are accumulating (Vec, Option<Vec>) for state diffs.

One optimisation is to get rid of vectors and just depending on key hashes #712 .

Since nonce's in EVM increase by one (%99 of the time) it can be really helpful to get rid of u256 updates for nonces on the diff. this is done by zksync afaik. however, since we maintain a more generic tree rather than ethereum's state, it might be hard to idenitfy which keys are nonces :)

Let's discuss potential improvements to the state diff formats in this issue.