-
Notifications
You must be signed in to change notification settings - Fork 385
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
feat: standardize node directory structure #1944
feat: standardize node directory structure #1944
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1944 +/- ##
==========================================
- Coverage 45.63% 45.59% -0.05%
==========================================
Files 480 482 +2
Lines 68817 68860 +43
==========================================
- Hits 31408 31394 -14
- Misses 34795 34849 +54
- Partials 2614 2617 +3 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙏
pre-approving, good after changes
From the review meeting:
|
Do you mind keeping the This could be useful for multiple reasons.
I don't really understand why you put the genesis.json outside of the directory structure... Could you let in into And YES, this as it is will break the portal-loop |
We are completely dropping the config directory, as the config is becoming optional, and not required to run the node (as it is with the SDK, and old Gno versions). Once we've separated the concept of node The reasoning for
The node directory should contain wipe-able data, (if we wipe the node directory, we can catch up easily again), so keeping the genesis there doesn't make too much sense with this premise |
What changes need to be done to the portal loop to accommodate this PR? |
Changes require to be done:
|
I've updated the Can you please check if everything for the Portal Loop is working fine with this commit locally? The |
@thehowl The reason being we will have more fine configurations in the future (gnoVM, different modules), and it makes sense to keep them grouped like this It's also worth noting it's completely irrelevant where the config is located, since the secret paths are no longer relative (as of this PR), and will get dropped entirely in a PR that resolves #1884 |
- Depends on #1944 (git history is based on that one) - Closes #1883 <details><summary>Contributors' checklist...</summary> - [ ] Added new tests, or not needed, or not feasible - [ ] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory - [ ] Updated the official documentation or not needed - [ ] No breaking changes were made, or a `BREAKING CHANGE: xxx` message was included in the description - [ ] 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> --------- Co-authored-by: Milos Zivkovic <milos.zivkovic@tendermint.com>
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:
BREAKING CHANGES:
genesis.json
file is no longer contained inside the node's working directory, but outside it by default (this is dropped entirely in [chain] Add agenesis.json
path flag tognoland start
#1883)<node-dir>/config
, but in<node-dir>/secrets
priv_validator_state.json
is moved to<node-dir>/secrets
by defaultIf 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 relevantconfig.toml
path values (genesis_file
andhome
for theBaseConfig
). Additionally, update allhome
paths in theconfig.toml
to be absolute paths (this is dropped in #1884).Contributors' checklist...
BREAKING CHANGE: xxx
message was included in the description