Skip to content

perf(state): avoid full header decode in StateAtBlockNumber #3784

Description

@ongyimeng

StateAtBlockNumber currently calls pruner.HeaderByNumberIfStateRetained, which fully decodes the block header even though opening historical state only needs:

GlobalStateRoot
Hash, for the state-retention hash → number check

A partial-header decode could avoid materializing heavier unused fields such as EventsBloom.

Use #3782 as reference implementation

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions