hiero-ledger / hiero-ledger/hiero-consensus-node

Create component responsible for the file system layout of a node

Open
#5,343 2 comments 0 reactions 0 assignees View on GitHub
Base Resource Management P3 Platform Tech Debt Reduced
Dominant language
Java
Stars
406
Forks
226
Avg merge
3d 4h
Merged PRs (30d)
210

Description

There are a bunch of different important file system locations we currently read and write.

- signed state periodic snapshots
- emergency state dumps
- event streams
- preconsensus event streams (soon)
- temporary files
- keys
- log4j files
- configuration files
- application files (e.g. record stream files, side cars)

Currently, the code defining the locations of these files is scattered all over the place. This makes it hard to maintain and hard to document.

We should create a special component whose only responsibility is to decide the file paths for these types of files. This object should take only node configuration in its constructor, and should have a bunch of methods that return paths.

For example:

```
public class FileSystemLayout {

public FileSystemLayout(final Configuration configuration) {
// ...
}

public Path getSignedStatePath(final long round, final long selfId) {
return Path.of(...);
}

}

```

Contributor guide

Open the contributing guide

Research direction

Start by locating the existing code that defines paths for signed-state snapshots, emergency dumps, event streams, temporary files, keys, logs, configuration, and application files. Trace how node Configuration is provided, then define the component's ownership and verify that each listed location can be obtained through its path methods.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.