-
Notifications
You must be signed in to change notification settings - Fork 236
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(config): Simplify config and data dir parsing #19
Merged
Conversation
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
fa62211
to
fee2fa6
Compare
BREAKING CHANGE: Command line arguments and some config options and chan spec options have been changed. It may break scripts and integration tests that depends on the command line interface. - Command line argument `--config|-c` is now a top option, which should be specified before sub-command. - Remove command line arguments `--data-dir` and `--chain`. They should be configured via the config file. - Add a new config option `data_dir`, which configures the path of data directory. - Option `ckb.chain` now only accepts a path. - Option `system_cells` in chain spec now only accepts paths. The path `data_dir` and `ckb.chain` can be an absolute path, or relative to the directory containing the config file. The paths of `system_cells` in chain spec can be absolute, or relative to the directory containing the chain spec file. If `--config|-c` is omitted, the app tries `ckb.json`, `nodes/default.json` in order. It is recommended to use `nodes/default.json` for development, which can be created by copying `nodes/default.example.json`. The default config saves data in `nodes/default/`, and loads chains spec `nodes/spec/dev.json`. Following locations are obsoleted data directories, which can be removed on development machines: - Linux - `$XDG_DATA_HOME/ckb` - `$XDG_DATA_HOME/NervosDev` - `$HOME/.local/share/ckb` - `$HOME/.local/share/NervosDev` - macOS - `$HOME/Library/Application Support/ckb` - `$HOME/Library/Application Support/NervosDev`
fee2fa6
to
ff6df78
Compare
With the new path, can we remove old cells at |
Yes, they should be moved to nodes/spec |
quake
previously approved these changes
Nov 26, 2018
XuJiandong
pushed a commit
to XuJiandong/ckb
that referenced
this pull request
Apr 16, 2024
* Add testcase: chech max pipe limits on child * Optimize test case max_fd_limits * Fix CI error * Add testcase about spawn * Add testcase: Add some code that is not covered
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
BREAKING CHANGE:
Command line arguments and some config options and chan spec options have been
changed. It may break scripts and integration tests that depends on the
command line interface.
--config|-c
is now a top option, which should bespecified before sub-command.
--data-dir
and--chain
. They should beconfigured via the config file.
data_dir
, which configures the path of datadirectory.
ckb.chain
now only accepts a path.system_cells
in chain spec now only accepts paths.The path
data_dir
andckb.chain
can be an absolute path, or relative tothe directory containing the config file.
The paths of
system_cells
in chain spec can be absolute, or relative to thedirectory containing the chain spec file.
If
--config|-c
is omitted, the app triesckb.json
,nodes/default.json
inorder.
It is recommended to use
nodes/default.json
for development, which can becreated by
cp -r nodes_template/ nodes
. The default config saves datain
nodes/default/
, and loads chains specnodes/spec/dev.json
.Following locations are obsoleted data directories, which can be removed on
development machines:
$XDG_DATA_HOME/ckb
$XDG_DATA_HOME/NervosDev
$HOME/.local/share/ckb
$HOME/.local/share/NervosDev
$HOME/Library/Application Support/ckb
$HOME/Library/Application Support/NervosDev