Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Allow longer state pruning history #11911

@arkpar

Description

@arkpar

Currently when state pruning is enabled state-db reqeuires O(n) memory w.r.t. the number of blocks pending pruning. Therefore long pruning history requires a lot of memory. It should be possible to get rid of the memory requirement using the reference counting feature of parity-db.

This basically means removing death_rows and death_index fields in RefWindow struct. Journals that are currently kept in death_rows should be loaded on demand from the database, although I'd keep an in-memory cache for pruning window size <= 256. death_index should be replace with reference counting on the DB level.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C1-lowPR touches the given topic and has a low impact on builders.I8-footprintAn enhancement to provide a smaller (system load, memory, network or disk) footprint.U3-nice_to_haveIssue is worth doing eventually.Z2-mediumCan be fixed by a coder with good Rust knowledge but little knowledge of the codebase.Z6-mentorAn easy task where a mentor is available. Please indicate in the issue who the mentor could be.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions