celestiaorg / celestiaorg/celestia-node

refactoring(share): Move Pruner Interface to Availability Package

Open
#3,394 4 comments 0 reactions 0 assignees View on GitHub
enhancement kind:refactor
Dominant language
Go
Stars
996
Forks
1.1k
Avg merge
1d 6h
Merged PRs (30d)
34

Description

### Implementation ideas

Proposal to relocate the `Pruner` interface to the `Availability` package to enhance cohesion between components that manage data lifecycle within the node. This change aims to align both pruning and data availability functionalities which are inherently related, albeit performing opposite tasks.

The `Pruner` and `Availability` functionalities are closely tied, as they manage different aspects of data lifecycle - storage and removal, respectively. Combining them under the same package will:

- **Improve Cohesion**: Both interfaces deal with node type-specific behaviors. Housing them in the same package emphasizes their interrelated roles.
- **Facilitate Access to Shared Context**: This move will allow the pruner components to have better awareness of the implementation details of data availability, potentially optimizing the data pruning process.
- **Maintain Modular Design**: Despite the proposed integration at the interface level, the `Pruner` service will continue to reside in its own separate package, maintaining a clean separation of concerns similar to how the `DASer` is structured.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.