forked from gnolang/gno
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: standardize node directory structure (gnolang#1944)
## Description Closes gnolang#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 gnolang#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 gnolang#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 gnolang#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>
- Loading branch information
1 parent
c1fd8d5
commit 0fde5b8
Showing
40 changed files
with
285 additions
and
337 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,31 @@ | ||
*.sw[pon] | ||
cmd/foo.go | ||
unsorted.* | ||
# Editor Leftovers | ||
.DS_Store | ||
.vscode | ||
.idea | ||
|
||
# Default node data | ||
gnoland-data | ||
genesis.json | ||
|
||
# Build leftovers | ||
build | ||
|
||
# Legacy .gitignore | ||
data/* | ||
testdir | ||
pkgs/sdk/vm/_testdata | ||
build | ||
|
||
# Log + generation leftovers | ||
*.tx | ||
*.log.* | ||
*.log | ||
*.gno.gen.go | ||
*.gno.gen_test.go | ||
.vscode | ||
.idea | ||
*.pb.go | ||
pbbindings.go | ||
*~ | ||
.#* | ||
*# | ||
|
||
# Test coverage leftovers | ||
cover.out | ||
coverage.out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.