Skip to content

Shoestring/make node dir #1495

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

Open
wants to merge 14 commits into
base: dev
Choose a base branch
from

Conversation

dusanjp-and-pasomi
Copy link

2025_07_16:13:59_JST

`commands/setup.py`
`wizard/ShoestringOperation.py`
以上の 2fileを差し替える事により、
① wizardの setup実行時には、nodeディレクトリが作成され、nodeディレクトリに node本体が格納される。
② wizardの upgrade実行時には、shoestring/rest_overrides.jsonが存在する場合には、`--rest-overrides shoestring/rest_overrides.json`が引数として命令に追加される。

③ commandの setup記述で、それぞれの引数に、デフォルト値を設定した。
これにより、以下に挙げる引数は、条件に合致する場合は省略可能とした。
また、引数にて該当する ファイルの場所と名前を明示的に記述すると、記述された引数は適用される。

`--ca-key-path ca.key.pem`の場合は、`--ca-key-path`引数を省略可能。
`--config shoestring/shoestring.ini`の場合は、`--config`引数を省略可能。
`--overrides shoestring/overrides.ini`の場合は、`--overrides`引数を省略可能。
`--directory node`の場合は、`--directory`引数を省略可能。
※1 `--directory`引数で、存在しない ディレクトリを指定した場合は、引数で指定した場所と名前の ディレクトリが新規作成され、そこに node本体が格納される。
`--package mainnet`の場合は、`--package`引数を省略可能。
`--rest-overrides shoestring/rest_overrides.json`の場合は、`--rest-overrides`引数を省略可能。
※2 `--rest-overrides`引数を省略した場合で、`shoestring/rest_overrides.json`が存在する場合は、`--rest-overrides shoestring/rest_overrides.json`が引数となり、適用される。
※3 `--rest-overrides`引数を省略した場合で、`shoestring/rest_overrides.json`が存在しない場合は、`--rest_overrides`引数は適用されない。
`commands/setup.py`
`wizard/ShoestringOperation.py`
By replacing the above two files,

① When running wizard setup, the node directory is created and the node body is stored in the node directory.
② When running wizard upgrade, if shoestring/rest_overrides.json exists, `--rest-overrides shoestring/rest_overrides.json` is added as an argument to the command.

③ In the command setup description, a default value is set for each argument.
As a result, the arguments listed below can be omitted if the conditions are met.
Also, if the location and name of the corresponding file are explicitly stated in the argument, the stated argument will be applied.

In the case of `--ca-key-path ca.key.pem`, the `--ca-key-path` argument can be omitted.
If you use `--config shoestring/shoestring.ini`, you can omit the `--config` argument.
If you use `--overrides shoestring/overrides.ini`, you can omit the `--overrides` argument.
If you use `--directory node`, you can omit the `--directory` argument.
*1 If you specify a directory that does not exist with the `--directory` argument, a new directory with the location and name specified in the argument will be created, and the node body will be stored there.
If you use `--package mainnet`, you can omit the `--package` argument.
If you use `--rest-overrides shoestring/rest_overrides.json`, you can omit the `--rest-overrides` argument.
*2 If the `--rest-overrides` argument is omitted and `shoestring/rest_overrides.json` exists, `--rest-overrides shoestring/rest_overrides.json` will be the argument and will be applied.
*3 If the `--rest-overrides` argument is omitted and `shoestring/rest_overrides.json` does not exist, the `--rest_overrides` argument will not be applied.

2025_07_20
setup_file_generator.pyの説明
Explanation of setup_file_generator.py

wizard実行時に、metadataが設定された場合に、
"_info": "replace the body of this object with custom fields and objects to personalize your node"
を
"_info": "This is nodeMetaData"
に変更する。

Explanation of setup_file_generator.py
When the wizard is run and metadata is set, change metadata.
"_info": "replace the body of this object with custom fields and objects to personalize your node"
to
"_info": "This is nodeMetaData"
.

setup時に nodeディレクトリを自動生成、nodeディレクトリに node本体を格納します。また、--directory に任意の ディレクトリ名を記述すると、任意の ディレクトリを作成し、任意の ディレクトリに node本体を格納します。
During setup, the node directory is automatically generated and the node body is stored in the node directory. Also, if you specify a directory name in --directory, the directory will be created and the node body will be stored in the directory.
wizardでの setup実行時に、nodeディレクトリを指定して、nodeディレクトリに node本体を格納する様に変更。
又、node証明書の更新時に、nodekeyを保持する様に変更。
When running setup with the wizard, you now specify a node directory and store the node itself in the node directory.
Also, when updating the node certificate, the nodekey is now retained.
wizardでの setup時に、metadataを設定した場合でも、"_info": "replace the body of this object with custom fields and objects to personalize your node"が metadataに設定されるが、
これを、metadataが設定された場合に、"_info":"This is nodeMetaData"に変更する。

Even if you set metadata during setup in the wizard, "_info": "replace the body of this object with custom fields and objects to personalize your node" will be set in the metadata, but if metadata is set, change this to "_info": "This is nodeMetaData".
commandの setup記述で、それぞれの引数に、デフォルト値を設定した。
これにより、以下に挙げる引数は、条件に合致する場合は省略可能とした。
また、引数にて該当する ファイルの場所と名前を明示的に記述すると、記述された引数は適用される。

`--ca-key-path ca.key.pem`の場合は、`--ca-key-path`引数を省略可能。
`--config shoestring/shoestring.ini`の場合は、`--config`引数を省略可能。
`--overrides shoestring/overrides.ini`の場合は、`--overrides`引数を省略可能。
`--directory node`の場合は、`--directory`引数を省略可能。
※1 `--directory`引数で、存在しない ディレクトリを指定した場合は、引数で指定した場所と名前の ディレクトリが新規作成され、そこに node本体が格納される。
`--package mainnet`の場合は、`--package`引数を省略可能。
`--rest-overrides shoestring/rest_overrides.json`の場合は、`--rest-overrides`引数を省略可能。
※2 `--rest-overrides`引数を省略した場合で、`shoestring/rest_overrides.json`が存在する場合は、`--rest-overrides shoestring/rest_overrides.json`が引数となり、適用される。
※3 `--rest-overrides`引数を省略した場合で、`shoestring/rest_overrides.json`が存在しない場合は、`--rest_overrides`引数は適用されない。

In the command setup description, a default value is set for each argument.
As a result, the arguments listed below can be omitted if the conditions are met.
Also, if the location and name of the corresponding file are explicitly stated in the argument, the stated argument will be applied.

In the case of `--ca-key-path ca.key.pem`, the `--ca-key-path` argument can be omitted.
If you use `--config shoestring/shoestring.ini`, you can omit the `--config` argument.
If you use `--overrides shoestring/overrides.ini`, you can omit the `--overrides` argument.
If you use `--directory node`, you can omit the `--directory` argument.
*1 If you specify a directory that does not exist with the `--directory` argument, a new directory with the location and name specified in the argument will be created, and the node body will be stored there.
If you use `--package mainnet`, you can omit the `--package` argument.
If you use `--rest-overrides shoestring/rest_overrides.json`, you can omit the `--rest-overrides` argument.
*2 If the `--rest-overrides` argument is omitted and `shoestring/rest_overrides.json` exists, `--rest-overrides shoestring/rest_overrides.json` will be the argument and will be applied.
*3 If the `--rest-overrides` argument is omitted and `shoestring/rest_overrides.json` does not exist, the `--rest_overrides` argument will not be applied.
以下の 9つの命令fileに デフォルト値を設定しました。
Default values have been set for the following nine command files.

announce_transaction.py
health.py
import_bootstrap.py
min_cosignatures_count.py
pemtool.py
renew_certificates.py
renew_voting_keys.py
reset_data.py
signer.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant