This repository was archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Allow longer state pruning history #11911
Copy link
Copy link
Closed
Labels
C1-lowPR touches the given topic and has a low impact on builders.PR 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.An enhancement to provide a smaller (system load, memory, network or disk) footprint.U3-nice_to_haveIssue is worth doing eventually.Issue is worth doing eventually.Z2-mediumCan be fixed by a coder with good Rust knowledge but little knowledge of the codebase.Can 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.An easy task where a mentor is available. Please indicate in the issue who the mentor could be.
Description
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C1-lowPR touches the given topic and has a low impact on builders.PR 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.An enhancement to provide a smaller (system load, memory, network or disk) footprint.U3-nice_to_haveIssue is worth doing eventually.Issue is worth doing eventually.Z2-mediumCan be fixed by a coder with good Rust knowledge but little knowledge of the codebase.Can 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.An easy task where a mentor is available. Please indicate in the issue who the mentor could be.