Open
Description
Currently, Geth retains the latest 128 diff layers in memory by default, merging all
older layers into the disk layer. This configuration works well for the Ethereum mainnet
but may be inefficient for some L2 projects with shorter block slot times.
With the implementation of #30971, it becomes possible to retain an arbitrary number
of diff layers in memory without sacrificing lookup performance. In theory, the number
of in-memory diff layers only needs to be bounded by available physical memory.
Before exposing this configuration to users, trie nodes should also be tracked during
lookups to ensure performance is maintained.
Prerequisites:
- Persist the in-memory diff layers into the file @jsvisa
- trie: write trie journal into disk #32060 - Track the trie node data in the lookup @rjl493456442