The Structure and Location of config.json
Currently, there are 3 separate "config.json"s. although each file has the same structure, their roles are slightly different. This document defines these config.json as follows:
- remote config: The config.json file on Nine Chronicles S3 storage which is accessible via HTTPS.
local config: The config.json file that the user installs and uses.
- Editing this configuration won’t work as the launcher will overwrite it with remote config in most cases.
user config: The config.json file that is set by each user through the launcher’s settings which are shared across multiple versions of the launcher.
- (on different network (ex. internal, previewnet))
- (on macOS)
~/Library/Application Support/Nine Chronicles/config.json
- (on Linux)
Installation and Application of remote config
Currently, remote config is served on https://download.nine-chronicles.com/9c-launcher-config.json and can be distributed to each user over HTTPS.
If all of the following conditions are met, the user’s local config will be overwritten to the remote settings.
- If the APV of the remote and local configuration matches
- If the
ConfigVersionof the remote config is higher than the local config
Therefore, you can assume that the latest version of the user distribution has remote config applied when running on the mainnet.
Overwrite of user config
User configuration uses the same schema as the others but usually stores the values that are specific to the user, such as language preference, the location of the blockchain data etc. When the corresponding key exists in the user config, the launcher reads the value of the user config without merging it with other values from other configs.
However, this feature sometimes causes the blockchain data from other networks to get mixed up. So from v100087 and onwards uses a different user config when connecting to other networks by looking at the
Network value of the local config. If the value is set to
9c-main, it reads the config.json, but if it is set to something else like
9c-previewnet, the launcher will read
config.9c-previewnet.json to avoid this conflict.
9c-launcher/config.ts at fbb99228b61d6ca4140f42a6a597e34e208d9f08 · planetarium/9c-launcher
|GenesisBlockPath||string||Yes||No||Headless, Launcher, Libplanet|