0xPolygonZero / zk_evm

Apache License 2.0
77 stars 32 forks source link

perf(continuations): Hash initial accounts at the beginning of the execution #412

Open hratoanina opened 1 month ago

hratoanina commented 1 month ago

Currently, we hold in memory a copy of the original payloads of all initial accounts and initial storage slots, which is kept all the way to the initial trie hashing at the end of the execution. What we could do instead is to hash them in the beginning so that we only need to store the initial accounts in the form of hash nodes.

hratoanina commented 1 month ago

Hashing at the beginning would make segment RlpRaw very big for the entire execution, so it's likely that good performance gains require https://github.com/0xPolygonZero/zk_evm/issues/452 first.