Skip to content

[MDBX] Implement pruning of earliest state with applied BlockStateDiff #217

@dhyaniarun1993

Description

@dhyaniarun1993

Describe the feature

We need to implement functionality to prune old trie data from the storage backend by applying a given BlockStateDiff to the earliest stored state and updating the earliest block number accordingly.

Goals:

  • Implement prune_earliest_state
  • Ensure that all related branch and leaf data older than the new earliest block are deleted
  • Maintain data consistency and atomic updates during pruning.

Acceptance Criteria:

  • Outdated trie nodes are removed or updated according to BlockStateDiff.
  • new_earliest_block_number is stored successfully.
  • Operation is atomic and crash-safe.
  • Verified efficient performance for large state diffs.
  • Unit test

Additional context

No response

Metadata

Metadata

Assignees

Labels

A-dbArea: databaseA-trieArea: Merkle Patricia TrieK-featureKind: featureW-historical-proofsWorkstream: historical-proofs

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions