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

Updates to saved state directory structure

Open
#5,359 3 comments 0 reactions 1 assignee Claimed by @cody-littley View on GitHub
Platform
Dominant language
Java
Stars
406
Forks
226
Avg merge
3d 4h
Merged PRs (30d)
210

Description

Per Leemon's request, we should make the following changes to the directory structure for saved states.

The current format is as follows:

```
data/saved/com.swirlds.foobar/1234/mySwirld/1000
|--------| |----------------| |--| |------| |--|
| | | | |
| mainClassName | | round
| | swirldName
location where selfId
states are saved
```

- instead of `selfId`, we should call it `nodeId` (documentation change)
- Instead of `swirldName`, we should call it the `ledgerId`. (documentation change)
- the ledger ID should be a hex value, and for mainnet it should be `00`.
- we should add another directory layer for shard. Each shard should have its own directory. This directory should come immediately before the round.
- swap the order of `selfId` and `ledgerId` (the `ledgerId` should come first)
- names for each directory should be self documenting

Proposed format:

```
data/saved/com.swirlds.foobar/ledger-00/node-20/shard-2/round-42
|--------| |----------------| |-------| |-----| |-----| |------|
| | | | | |
| mainClassName | | shard |
| | node Id |
location where ledger ID round number
states are saved
```

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.