You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue concerns standardizing the node directory structure, after #1605 and #1593.
After internal discussions with @thehowl, we've come to the conclusion that the following structure would be more than enough for supporting future gno functionality:
## Description
Closes#1882
This PR standardizes the node's directory structure, and does not assume
that the `genesis.json` is contained within the node directory (further
tackled in #1883).
The biggest change introduced in this PR is that the node's directory
path is treated as absolute, so there is no funny business with path
concatenation when the node is running.
This is best described with the desired structure:
```
.
├── genesis.json
└── my-node-dir/
├── db/
│ ├── blockstore.db (folder)
│ ├── gnolang.db (folder)
│ ├── state.db (folder)
│ └── cs.wal
├── secrets/
│ ├── priv_validator_state.json
│ ├── node_key.json
│ └── priv_validator_key.json
└── config/
└── config.toml
```
**BREAKING CHANGES**:
- the `genesis.json` file is no longer contained inside the node's
working directory, but outside it by default (this is dropped entirely
in #1883)
- the configuration is moved top-level to the node's directroy
- the secrets are no longer contained in `<node-dir>/config`, but in
`<node-dir>/secrets`
- the `priv_validator_state.json` is moved to `<node-dir>/secrets` by
default
If you have an old Gno chain, and what to keep backwards compatibility,
move the `genesis.json` to just outside the node directory (to prevent
it from being regenerated), and update the relevant `config.toml` path
values (`genesis_file` and `home` for the `BaseConfig`). Additionally,
update all `home` paths in the `config.toml` to be absolute paths (this
is dropped in #1884).
<details><summary>Contributors' checklist...</summary>
- [x] Added new tests, or not needed, or not feasible
- [x] Provided an example (e.g. screenshot) to aid review or the PR is
self-explanatory
- [x] Updated the official documentation or not needed
- [x] No breaking changes were made, or a `BREAKING CHANGE: xxx` message
was included in the description
- [x] Added references to related issues and PRs
- [ ] Provided any useful hints for running manual tests
- [ ] Added new benchmarks to [generated
graphs](https://gnoland.github.io/benchmarks), if any. More info
[here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md).
</details>
Description
Master issue: #1836
This issue concerns standardizing the node directory structure, after #1605 and #1593.
After internal discussions with @thehowl, we've come to the conclusion that the following structure would be more than enough for supporting future gno functionality:
The definition of done for this task:
gnoland secrets init
initializes the data directory as shown (<default-node-dir>/secrets
)gnoland config init
initializes the config.toml as shown (<default-node-dir>/config.toml
)genesis.json
lives outside the node directoryThe reason for having
genesis.json
live outside the node directory, andconfig.toml
inside is the following:genesis.json
is required for a running node, it's something that should always be provided and immutableconfig.toml
is not required, and if it's not given, it should assume defaults (defaults can't be assumed for the genesis configuration)The text was updated successfully, but these errors were encountered: