Skip to content

Expose a config option that allows users to set the number of memory layers to retain #32059

Open
@rjl493456442

Description

@rjl493456442

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:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions