Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chain] Drops file paths from config.toml #1884

Open
zivkovicmilos opened this issue Apr 3, 2024 · 0 comments
Open

[chain] Drops file paths from config.toml #1884

zivkovicmilos opened this issue Apr 3, 2024 · 0 comments
Assignees

Comments

@zivkovicmilos
Copy link
Member

zivkovicmilos commented Apr 3, 2024

Description

Master issue: #1836

This task concerns dropping all path params (node key, validator key, validator signed state, genesis.json) from the config.toml, since these path values are predefined as part of #1882 (and the genesis.json path is given on node starts)

Blocked by #1883.

Definition of done:

  • all path values are removed from config.toml
@zivkovicmilos zivkovicmilos added the 📦 🤖 gnovm Issues or PRs gnovm related label Apr 3, 2024
@zivkovicmilos zivkovicmilos added 📦 ⛰️ gno.land Issues or PRs gno.land package related and removed 📦 🤖 gnovm Issues or PRs gnovm related labels Apr 3, 2024
@zivkovicmilos zivkovicmilos moved this from Backlog to Todo in 🧙‍♂️gno.land core team Apr 3, 2024
@thehowl thehowl assigned thehowl and unassigned thehowl Apr 15, 2024
@thehowl thehowl moved this from Todo to In Progress in 🧙‍♂️gno.land core team Apr 15, 2024
@thehowl thehowl self-assigned this Apr 15, 2024
zivkovicmilos added a commit that referenced this issue Apr 25, 2024
## 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>
@Kouteki Kouteki moved this from In Progress to Todo in 🧙‍♂️gno.land core team May 15, 2024
@linear linear bot removed the 📦 ⛰️ gno.land Issues or PRs gno.land package related label Sep 11, 2024
@Kouteki Kouteki moved this from Todo to Backlog in 🧙‍♂️gno.land core team Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

3 participants