From 6a9c87e9128d1ceea4cb64ac827ef6fe5abfa3d2 Mon Sep 17 00:00:00 2001 From: Seung Woo Kim Date: Wed, 3 Apr 2019 15:53:15 +0900 Subject: [PATCH 1/2] Change theme color of the config file generator --- src/components/TopBar.css | 6 ++++++ src/components/TopBar.js | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 src/components/TopBar.css diff --git a/src/components/TopBar.css b/src/components/TopBar.css new file mode 100644 index 0000000..f9b6b04 --- /dev/null +++ b/src/components/TopBar.css @@ -0,0 +1,6 @@ +.topbar-color +{ + background-color:#05aad1 !important; +} + + \ No newline at end of file diff --git a/src/components/TopBar.js b/src/components/TopBar.js index d9151e1..01cc6f5 100644 --- a/src/components/TopBar.js +++ b/src/components/TopBar.js @@ -1,8 +1,9 @@ import React from 'react'; +import './TopBar.css'; function TopBar () { return ( -
+
CodeChain Config Generator
From f464e264092695720ac8290e4e30074b1da659aa Mon Sep 17 00:00:00 2001 From: Seung Woo Kim Date: Wed, 3 Apr 2019 18:53:49 +0900 Subject: [PATCH 2/2] Convert all Parity related documentation and code to fit CodeChain's needs and standards --- .travis.yml | 14 - README.md | 4 +- docs/docTemplate.js | 49 -- package.json | 8 +- scripts/generate-config-data.js | 309 ---------- scripts/generate-config-docs.js | 110 ---- src/components/Preview.js | 4 +- src/data.compiled.json | 2 +- src/data.extra.json | 977 +++++++++----------------------- src/system.js | 10 +- 10 files changed, 273 insertions(+), 1214 deletions(-) delete mode 100644 .travis.yml delete mode 100644 docs/docTemplate.js delete mode 100644 scripts/generate-config-data.js delete mode 100644 scripts/generate-config-docs.js diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 2e65ce8..0000000 --- a/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ -language: node_js -node_js: "9" - -env: - global: - - REPO_SLUG=paritytech/parity-config-generator - - secure: "VyqeNnK4Hi7nmTuoEhdTpJUv5fG/ZxrVXQug1vFr8qQfAMEEVGEoFgLrejEBhssHN/LwrSWQrAYqpPraHKvlDH1D5no9V9I39Q6AqvJ5tWGoUuNjV4aq74GGgRVhq5Tfl8gSIvjC8d2HwOjEpa6QjTuUAJtjO/UgujTmxhChLfmZnCTfoAGvmP2akOUwV1D6+Pbdoq46dW5BuHVVe2yPN/rStEuS8vTdAs5f6JxlSOjA36OKNuA4V2vqYLGzcXEzCnOS7DICXkBhxSG6rBY0q0bFOQy0vFFVkQVS4C4MRbmhMkUiwbXFJoNBsr+mi6tEdmd+QIpyyfqpPEQyB4Q7b4C6+YLeTaNLAk/t/wrhtLHjscxYss3BArHL8teeBz9VwiEPUM4Fy8QTHTsqhkBWy+RJpZIyfDNNo2fNZTqSorEuF7GF36QyQf1qcZ4An8FtkbI/Umay0MQycCM6fDpNEd5usgINKoRO/BTvQlreY/2AciCml/hKspqxHkLgaDm32z1Aouv8mACOZgT/50YqILcBn7wQqmq62hhmhy72wUZzvOLDO9V9Fpy63dGSGzG8lPfdgYNjK9gR3+RbKFS+GAb6xS+VrRUUy6P6t9wJONEe7N1TVb7Ruzamqdr2YTsUT5sWM5S/n97MW8er0Tm15ICIPmdy+V8CTVMpDSiPEUY=" - -script: - - yarn test - - yarn build - -after_success: - - ./scripts/deploy-to-gh-pages.sh diff --git a/README.md b/README.md index 7ed28f9..d802dd7 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,6 @@ # CodeChain Config Generator - See demo at: [CodeChain Config Generator](ADD_LINK) ## Development - -To update the list of fields, run `npm run generate-data`. This will parse the command-line options and configuration fields [from the parity repo](https://github.com/paritytech/parity/blob/master/parity/cli/mod.rs), apply the manual overwrites and extra information of `src/data.extra.json` and save the result into `src/data.compiled.json`, which is the file used by Parity Config Generator. +Taken from [Parity's config generator code](https://github.com/paritytech/parity-config-generator). diff --git a/docs/docTemplate.js b/docs/docTemplate.js deleted file mode 100644 index 9a358a8..0000000 --- a/docs/docTemplate.js +++ /dev/null @@ -1,49 +0,0 @@ - -const BufferList = require('bl'); - -module.exports = { - preExampleConfig: new BufferList(` ---- -title: Configuring Parity Ethereum ---- - -Parity can be configured using either the [CLI options](#cli-options) or a [config file](#config-file). Should the CLI flags and the config file disagree about a setting, the CLI takes precedence. - -You can list all CLI options by running \`$parity --help\`. The vast majority of CLI options map to a setting in the TOML file, for example \`--mode-timeout 500\` can be set by creating a config file: - -\`\`\`toml -[parity] -mode_timeout = 500 -\`\`\` - -## Config File - -Parity can be configured using a [TOML](https://github.com/toml-lang/toml) file. The file can be generated using the [Parity Config Generator](https://paritytech.github.io/parity-config-generator/). To start parity with a config file, the file needs to be located in: - - * Windows: \`%UserProfile%\\AppData\\Roaming\\Parity\\Ethereum\\config.toml\` - * Linux: \`~/.local/share/io.parity.ethereum/config.toml\` - * macOS: \`$HOME/Library/Application Support/io.parity.ethereum/config.toml\` - -To use a custom path run \`$ parity --config path/to/config.toml\`. - -## Default config.toml - -The following is a representation of a configuration file with all default values (*note: the \`[stratum]\` section is not present by default, and including it in your config currently enables stratum*). - -\`\`\`toml`), - postExampleConfig: new BufferList('\n```\n'), - preConfigDoc: new BufferList(` -## Presets - -Parity can also be launched with a [preset configuration file](https://github.com/paritytech/parity-ethereum/tree/master/parity/cli/presets) using the \`--config\` flag with one of the following values: - * \`dev\`: uses [dev chain specifications](Private-development-chain) with [Instant-seal](Pluggable-Consensus#instant-seal) consensus engine. The gas price is set to 0. - * \`dev-insecure\`: uses the same configuration as \`dev\`, plus sets the flag \`no_consensus\`, allows all RPC APIs and accepts all RPC interfaces and hosts, as well as all IPFS hosts. - * \`insecure\`: uses the Mainnet default configuration, plus sets the flag \`no_consensus\`, allows all RPC APIs and accepts all RPC interfaces and hosts, as well as all IPFS hosts. - * \`mining\`: uses the Mainnet default configuration, plus increases the number of peers to min 50 and max 100, it disables the Dapps and IPC interface. It forces the sealing of blocks with a minimum of 4 seconds interval, forces the reseal for any new transaction (external or local), reduces the transaction queue size to 2048 while increasing the cache size to 256 MB and setting the \`trace\` logging level for the \`miner\` and \`own_tx\` modules. - * \`non-standard-ports\`: sets the client to listen to the port 30305 and 8645 for RPC connections. - -## Configuration options - -`), - postConfigDoc: new BufferList(``) -}; diff --git a/package.json b/package.json index a248528..7217387 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "parity-config-generator", + "name": "codechain-config-generator", "version": "0.1.0", "private": true, - "homepage": "http://paritytech.github.io/parity-config-generator", + "homepage": "AddPage", "devDependencies": { "babel-eslint": "^7.1.1", "react-scripts": "0.4.3", @@ -27,9 +27,7 @@ "test": "react-scripts test --env=jsdom", "eject": "react-scripts eject", "lint": "semistandard --verbose | snazzy", - "lint-fix": "semistandard --fix --verbose | snazzy", - "generate-data": "node scripts/generate-config-data.js", - "generate-docs": "node scripts/generate-config-docs.js" + "lint-fix": "semistandard --fix --verbose | snazzy" }, "semistandard": { "parser": "babel-eslint" diff --git a/scripts/generate-config-data.js b/scripts/generate-config-data.js deleted file mode 100644 index adbb6dd..0000000 --- a/scripts/generate-config-data.js +++ /dev/null @@ -1,309 +0,0 @@ -const https = require('https'); -const fs = require('fs').promises; -const path = require('path'); -const bl = require('bl'); - -const CONFIG_IS = { - SAME: 'same', - OPPOSITE: 'opposite', - ARRAY_OF: 'array_of', - NONE: 'none', - UNKNOWN: 'unknown' -}; - -function fetchSource () { - if (process.env.AUTOGENSCRIPT) { - return fs.readFile(path.resolve(__dirname, '../../parity/cli/mod.rs'), 'UTF-8'); - } - return new Promise((resolve, reject) => { - https.get('https://raw.githubusercontent.com/paritytech/parity/master/parity/cli/mod.rs', res => { - if (res.statusCode !== 200) { - reject(new Error(`Failed to load source code, status code: ${res.statusCode}`)); - } - - res.pipe(bl(function (err, data) { - if (err) { - reject(new Error(err)); - } - - resolve(data.toString()); - })); - }); - } - ); -} - -function getCliOptions (source) { - const regex = /^\s*(FLAG|ARG) (\w+): *\([\w<>]+?\) *= (.+?)(?:u\d+|usize)?, or (.+),\n.+\n\s*"(.+)",(?:\s+\/\/.+)?$/gm; - - const cliOptions = []; - for (const [, type, variableName, defaultValueString, configCallbackString, helpString] of execAll(regex, source)) { - if (configCallbackString.includes('_legacy')) { - continue; - } - cliOptions.push({type, variableName, defaultValueString, configCallbackString, helpString}); - } - - const parsedCliOptions = cliOptions.map(({defaultValueString, configCallbackString, helpString, ...rest}) => { - const defaultValue = parseDefaultValue(defaultValueString); - const help = helpString.replace(/\\"/g, '"'); - const {configSection, configProp, configIs} = parseConfigCallback(configCallbackString); - return {defaultValue, help, configSection, configProp, configIs, ...rest}; - }); - - return parsedCliOptions; -} - -function* execAll (regex, str) { - const localCopy = new RegExp(regex, regex.flags); - let match; - while ((match = localCopy.exec(str))) { - yield match; - } -} - -function parseDefaultValue (defaultValue) { - switch (defaultValue) { - case 'None': - return null; - case 'Vec::new()': - return []; - default: - try { - // Remove thousands separators if numeric value - if (/^\d[\d_]+\d$/.test(defaultValue)) { - defaultValue = defaultValue.replace(/_/g, ''); - } - - defaultValue = defaultValue.replace(/^Some\((".+").into\(\)\)$/, '$1'); - - return JSON.parse(defaultValue); - } catch (e) { - console.warn('Warning: Failed to parse default value', defaultValue, e.message); - } - } -} - -function parseConfigCallback (configCallback) { - const regexToConfigIs = [ - [ - /^\|c: &Config\| c\.([a-zA-Z_]+)\.as_ref\(\)\?\.([a-zA-Z_]+)(?:\.clone\(\))?$/, - CONFIG_IS.SAME - ], - [ - /^\|c: &Config\| c\.([a-zA-Z_]+)\.as_ref\(\)\?\.([a-zA-Z_]+)(?:\.clone\(\))?\.map\(\|([a-zA-Z_]+)\| !\3\)(\.clone\(\))?$/, - CONFIG_IS.OPPOSITE - ], - [ - /^\|c: &Config\| c\.([a-zA-Z_]+)\.as_ref\(\)\?\.([a-zA-Z_]+)(?:\.clone\(\)|\.as_ref\(\))?\.map\(\|vec\| vec\.join\(","\)\)?$/, - CONFIG_IS.ARRAY_OF - ], - [ - /^\|_\| None$/, - CONFIG_IS.UNKNOWN - ] - ]; - - for (const [regex, configIs] of regexToConfigIs) { - const parts = regex.exec(configCallback); - if (parts !== null) { - const [, configSection, configProp] = parts; - return {configIs, configSection, configProp}; - } - } - - console.warn('Warning: Failed to recognize callback', configCallback); - return {configIs: CONFIG_IS.UNKNOWN}; -} - -function makeCliConfigTree (parsedCliOptions) { - const configCliOptions = parsedCliOptions - .filter(({configIs}) => configIs !== CONFIG_IS.NONE && configIs !== CONFIG_IS.UNKNOWN); - - const tree = {}; - configCliOptions.forEach(({configSection, configProp, ...rest}) => { - tree[configSection] = tree[configSection] || {}; - tree[configSection][configProp] = {...rest}; - }); - return tree; -} - -function getStructFields (name, source) { - const subsource = source.match(new RegExp(`^struct ${name} {[^]+?}`, 'm'))[0]; - - const fields = subsource.split('\n').slice(1, -1).filter(s => s.trim() && !s.trim().startsWith('#') && !s.trim().startsWith('_legacy')); - - const parsedFields = fields.map(line => { - const matches = line.match(/^\s*(\w+): Option<([\w<>]+)>,$/); - const [, name, type] = matches; - return {name, type}; - }); - - return parsedFields; -} - -function hydrateConfigWithCli (config, cliConfig) { - const data = {}; - - for (const section of config) { - data[section.name] = {}; - data[section.name].section = section.name_friendly; - - for (const prop of section.props) { - data[section.name][prop.name] = {}; - data[section.name][prop.name].name = prop.name.replace(/_/g, ' ').replace(/^./, a => a.toUpperCase()); - data[section.name][prop.name].type = prop.type; - - // If the config prop is linked to a CLI command - if (section.name in cliConfig && - prop.name in cliConfig[section.name]) { - const cliConfigProp = cliConfig[section.name][prop.name]; - const dataProp = data[section.name][prop.name]; - - switch (cliConfigProp.configIs) { - case CONFIG_IS.SAME: - dataProp.description = cliConfigProp.help; - dataProp.default = cliConfigProp.defaultValue; - break; - case CONFIG_IS.ARRAY_OF: - dataProp.description = cliConfigProp.help; - if (cliConfigProp.defaultValue !== null) { - dataProp.default = cliConfigProp.defaultValue.split(','); - } else { - dataProp.default = []; - } - break; - case CONFIG_IS.OPPOSITE: - dataProp.default = !cliConfigProp.defaultValue; - break; - default: - throw new Error(`Error: Unreachable: configIs with value '${cliConfigProp.configIs}' can be 'same', 'array_of', 'opposite', 'none', 'unknown'; is none of the first three; last two are pruned in makeCliConfigTree; qed.`); - } - } else { - console.warn('Warning: Config option %s.%s is not linked to any CLI option.', section.name, prop.name); - } - } - } - - return data; -} - -function augment (data, extra) { - const dataAugmented = Object.assign({}, data); - const overwritten = []; - - for (const section in extra) { - if (!(section in dataAugmented)) { - dataAugmented[section] = extra[section]; - overwritten.push(section); - continue; - } - - for (const prop in extra[section]) { - if (prop === 'section' || prop === 'description' || prop === 'condition') { - dataAugmented[section][prop] = extra[section][prop]; - continue; - } - - overwritten.push(`${section}.${prop}`); - dataAugmented[section][prop] = {...dataAugmented[section][prop], ...extra[section][prop]}; - } - } - - // Quick hack to retain the key order of data.extra.json - // (make new object and insert data.extra.json props first) - - const dataAugmentedOrdered = {}; - - overwritten.forEach(id => { - if (!id.includes('.')) { - dataAugmentedOrdered[id] = dataAugmented[id]; - } else { - const [section, prop] = id.split('.'); - dataAugmentedOrdered[section] = dataAugmentedOrdered[section] || {}; - dataAugmentedOrdered[section][prop] = dataAugmented[section][prop]; - } - }); - - Object.keys(dataAugmented) - .filter(section => !overwritten.includes(section)) - .forEach(section => { - dataAugmentedOrdered[section] = dataAugmentedOrdered[section] || {}; - - Object.keys(dataAugmented[section]) - .filter(prop => !overwritten.includes(`${section}.${prop}`)) - .forEach(prop => { - dataAugmentedOrdered[section][prop] = dataAugmented[section][prop]; - }); - }); - - return dataAugmentedOrdered; -} - -function generateAugmentedData (source, extra) { - // Parse CLI options - - const cliOptions = getCliOptions(source); - const configCliOptions = makeCliConfigTree(cliOptions); - - // Parse config structs - - const configSections = getStructFields('Config', source).map(({name: section, type: sectionStructName}) => - ({ - name: section, - name_friendly: sectionStructName, - props: getStructFields(sectionStructName, source).map(prop => { - prop.type = prop.type.toLowerCase().replace(/vec<(.+)>/, '$1[]').replace(/u16|u32|u64|usize/, 'number'); - return prop; - }) - }) - ).filter(({props}) => props.length); - - // Hydrate config structs with CLI options - - const data = hydrateConfigWithCli(configSections, configCliOptions); - - // Augment with data.extra.json - - return augment(data, extra); -} - -async function fetchExtraData(){ - return JSON.parse(await fs.readFile(path.resolve(__dirname, '../src/data.extra.json'), 'UTF-8')); -} - -if (!module.parent) { - (async function () { - // Make sure that config items with unrecognized default values - // were set a default value in data.extra.json - const dataAugmented = generateAugmentedData(await fetchSource(), await fetchExtraData()); - - - Object.keys(dataAugmented).forEach(section => { - const undefinedDefaults = Object.keys(dataAugmented[section]) - .filter(prop => { - const item = dataAugmented[section][prop]; - return typeof item === 'object' && typeof item.default === 'undefined'; - }) - .map(prop => `${section}.${prop}`); - - if (undefinedDefaults.length) { - throw new Error(`Couldn't parse the default CLI value for the following config items: ${undefinedDefaults.join(', ')}. Please set a default value for them in data.extra.json.`); - } - }); - - // Write to file - - await fs.writeFile(path.resolve(__dirname, '../src/data.compiled.json'), JSON.stringify(dataAugmented, null, 2)); - })().catch(e => { - console.error(e); - process.exit(1); - }); -} else { - module.exports = { - fetchSource: fetchSource, - fetchExtra: fetchExtraData, - getCliOptions: getCliOptions, - getData: generateAugmentedData - }; -} diff --git a/scripts/generate-config-docs.js b/scripts/generate-config-docs.js deleted file mode 100644 index b12113a..0000000 --- a/scripts/generate-config-docs.js +++ /dev/null @@ -1,110 +0,0 @@ -const fs = require('fs'); -const path = require('path'); -const BufferList = require('bl'); -const docTemplate = require('../docs/docTemplate.js'); -const data = require('./generate-config-data.js'); - -const outputDir = '../docs/'; -const outputFile = 'config.md'; - -function dirtySerialize (valueItem) { - if (typeof valueItem !== 'undefined') { - const rawDefaultValue = valueItem; - var defaultValue; - if (typeof rawDefaultValue === 'object') { - if (rawDefaultValue === null) { - defaultValue = 'null'; - } else { - defaultValue = JSON.stringify(rawDefaultValue); - } - } else { - if (rawDefaultValue === '') { - defaultValue = '""'; - } else { - defaultValue = rawDefaultValue; - } - } - return defaultValue; - } -} - -function compiledToml (compiledData) { - var compiledBuffer = new BufferList(); - for (const key in compiledData) { - if (key[0] !== '_') { - const sectionValues = compiledData[key]; - compiledBuffer.append('[' + key + ']\n'); - for (const value in sectionValues) { - if (value.indexOf('section') < 0 && value.indexOf('description') < 0) { - const valueItem = sectionValues[value]['default']; - compiledBuffer.append(value + ' = ' + dirtySerialize(valueItem) + '\n'); - } - } - compiledBuffer.append('\n'); - } - } - return compiledBuffer; -} - -// Command line options, configs, and descriptions. -function compiledMd (cliOptions) { - const compiledBuffer = new BufferList(); - const builtTree = {}; - for (const option in cliOptions) { - const configSection = cliOptions[option]['configSection']; - const configProp = cliOptions[option]['configProp']; - const helpText = cliOptions[option]['help']; - const variableName = cliOptions[option]['variableName']; - const defaultValue = dirtySerialize(cliOptions[option]['defaultValue']); - var cliName = variableName.replace(/_/g, '-').slice(4); - if (cliName[0] === '-') { - cliName = cliName.slice(1); - } - cliName = '--' + cliName; - const toAppend = BufferList('\n'); - toAppend.append('## ' + cliName.slice(2) + '\n'); - toAppend.append(helpText + '\n'); // description - toAppend.append('#### Command line option \n `' + cliName + '`\n'); // cli flag - if (typeof configSection !== 'undefined') { - toAppend.append('#### Config file option \n```toml\n' + '[' + configSection + ']' + '\n' + configProp + ' = ' + defaultValue + '\n```\n'); // config item - } - toAppend.append('#### Default Value \n`' + defaultValue + '`\n'); - if (typeof builtTree[configSection] !== 'undefined') { - builtTree[configSection].append(toAppend); - } else { - builtTree[configSection] = toAppend; - } - } - for (var section in builtTree) { - var sectionText = section; - if (section === 'undefined') { - sectionText = 'CLI Only'; - } - compiledBuffer.append('# ' + sectionText + '\n'); - compiledBuffer.append(builtTree[section]); - compiledBuffer.append('\n'); - } - - return compiledBuffer; -} - -async function buildPage () { - var compiledBuffer = new BufferList(); - const source = await data.fetchSource(); - const extra = await data.fetchExtra(); - compiledBuffer.append(docTemplate.preExampleConfig); - compiledBuffer.append(compiledToml(data.getData(source, extra))); - compiledBuffer.append(docTemplate.postExampleConfig); - compiledBuffer.append(docTemplate.preConfigDoc); - compiledBuffer.append(compiledMd(data.getCliOptions(source))); - compiledBuffer.append(docTemplate.postConfigDoc); - return compiledBuffer; -} - -(async function () { - fs.writeFileSync(path.resolve(__dirname, outputDir + outputFile), (await buildPage()).toString()); -})().catch(e => { - console.error(e); - process.exit(1); -}); - diff --git a/src/components/Preview.js b/src/components/Preview.js index 9777d78..53fecd2 100644 --- a/src/components/Preview.js +++ b/src/components/Preview.js @@ -100,10 +100,8 @@ function toToml (settings, defaults) { } const { platform } = settings.__internal || defaults.__internal; - const configPath = joinPath([basePath(platform), 'config.toml'], platform); toml.unshift( - '# This config should be placed in following path:', - `# ${configPath}`, + '# The config file path should be specified by using the --config CLI option.' ); return toml.join('\n'); diff --git a/src/data.compiled.json b/src/data.compiled.json index 4e9e6bc..18f147a 100644 --- a/src/data.compiled.json +++ b/src/data.compiled.json @@ -305,7 +305,7 @@ "path": { "name": "Path", "type": "path", - "description": "Parity will create an IPC socket at {}.", + "description": "CodeChain will create an IPC socket at {}.", "default": "/tmp/jsonrpc.ipc" }, diff --git a/src/data.extra.json b/src/data.extra.json index 8d137ba..18f147a 100644 --- a/src/data.extra.json +++ b/src/data.extra.json @@ -15,813 +15,362 @@ "platform": { "name": "Platform", "description": { - "Windows": "Config for Windows", "Linux": "Config for Linux", "Mac OS": "Config for Mac OS" }, "default": null, "values": [ - "Windows", "Linux", "Mac OS" ] } }, - "parity": { - "section": "Parity", - "description": "Basic parameters regarding Parity operation.", - "chain": { - "name": "Chain", - "description": { - "foundation": "Main Network", - "kovan": "Kovan Test Network", - "dev": "Local Development Chain", - "ropsten": "Ropsten Test Network", - "classic": "Ethereum Classic", - "classic-testnet": "Ethereum Classic Test Network", - "expanse": "Expanse Network", - "olympic": "Olympic Network", - "musicoin": "Musicoin Network", - "ellaism": "Ellaism Network", - "tobalaba": "Tobalaba Network", - "easthub": "Easthub Network", - "social": "Social Network" - }, - "suggestions": [ - "foundation", - "kovan", - "dev", - "ropsten", - "classic", - "classic-testnet", - "expanse", - "olympic", - "musicoin", - "ellaism", - "tobalaba", - "easthub", - "social" - ], - "simple": true - }, - "mode": { - "name": "Operating Mode", - "description": { - "last": "Uses the last-used mode, active if none", - "active": "Parity continously syncs the chain", - "passive": "Parity syncs initially, then sleeps and wakes regularly to resync", - "dark": "Parity syncs only when the RPC is active", - "offline": "Syncing is disabled (no network)" - }, - "values": [ - "Last [last]", - "Active [active]", - "Passive [passive]", - "Dark Mode [dark]", - "Offline [offline]" - ], - "simple": true - }, - "mode_timeout": { - "name": "Mode Timeout", - "description": "Parity will move to inactive mode after {} seconds.", - "min": 0, - "max": 10000, - "condition": "settings.parity.mode !== 'active' && !isOffline" + "codechain": { + "quiet": { + "name": "Quiet", + "type": "bool", + "description": "Do not show any synchronization information in the console.", + "default": false }, - "mode_alarm": { - "name": "Mode Alarm", - "description": "Parity will automatically wake-up every {} seconds.", - "min": 0, - "max": 600000, - "condition": "settings.parity.mode === 'passive'" + "db_path": { + "name": "Database Path", + "type": "path", + "description": "CodeChain databases will be stored in {}.", + "default": "db" }, - "auto_update": { - "name": "Auto Update", - "description": { - "all": "Auto-updates to every release", - "critical": "Auto-updates only to consensus/security updates", - "none": "No updates will be auto-installed" - }, - "values": [ - "all", - "critical", - "none" - ], - "simple": true + "keys_path": { + "name": "Keys Path", + "type": "path", + "description": "Your encrypted private keys will be stored in {}.", + "default": "keys" }, - "auto_update_delay": {}, - "auto_update_check_frequency": {}, - "release_track": { - "name": "Auto Update Release Track", + "chain": { + "name": "Chain", + "type": "string", "description": { - "stable": "Stable", - "beta": "Beta", - "nightly": "Nightly (unstable)", - "testing": "Testing (do not use)", - "current": "Whatever track this executable was released on" + "solo": "", + "simple_poa": "", + "tendermint": "", + "cuckoo": "", + "blake_pow": "", + "husky": "", + "saluki": "", + "corgi": "" }, - "values": [ - "stable", - "beta", - "nightly", - "testing", - "current" + "default": "solo", + "suggestions": [ + "solo", + "simple_poa", + "tendermint", + "cuckoo", + "blake_pow", + "husky", + "saluki", + "corgi" ], - "condition": "settings.parity.auto_update !== 'none'", "simple": true }, - "no_download": { - "name": "Don't Download Updates", - "description": "Disables auto downloading of new releases. Not recommended." - }, - "no_consensus": { - "name": "No Consensus", - "description": "Forces Parity to run even if there are known issues regarding consensus. Not recommended." - }, "base_path": { "name": "Base Path", + "type": "path", "description": "Blockchain and settings will be stored in {}.", "default": "$BASE", - "type": "path", "simple": true }, - "db_path": { - "name": "Database Path", - "description": "Parity databases will be stored in {}.", - "default": "$LOCAL/chains", - "type": "path" - }, - "keys_path": { - "name": "Keys Path", - "description": "Your encrypted private keys will be stored in {}.", - "type": "path" + "section": "CodeChain", + "description": "Basic parameters regarding CodeChain operation." + }, + + "mining": { + "disable": { + "name": "Disable", + "type": "bool", + "description": "Insert Description.", + "default": false }, - "identity": { - "name": "Identity", - "description": "You will be identified as '{}' amongst other nodes.." + + "mem_pool_mem_limit": { + "name": "Mem Pool Mem Limit", + "type": "number", + "description": "Maximum amount of memory(in MB) that can be used by the mem pool. Setting this parameter to 0 disables limiting.", + "default": 4 }, - "no_persistent_txqueue": { - "simple": true + "mem_pool_fee_bump_shift": { + "name": "Mem Pool Mem Limit", + "type": "number", + "description": "A value which is used to check whether a new transaciton can replace a transaction in the memory pool with the same signer and seq. If the fee of the new transaction is `new_fee` and the fee of the transaction in the memory pool is `old_fee`, then `new_fee > old_fee + old_fee >> mem_pool_fee_bump_shift` should be satisfied to replace.", + "default": 3 }, - "light": {}, - "no_hardcoded_sync": { - "condition": "settings.parity.light" - } - }, - "account": { - "section": "Account", - "description": "Unlocking accounts and private keys security parameters.", - "unlock": { - "name": "Accounts to unlock", - "description": "From: [{}] you'll be able to send transactions without password.", + "notify_work": { + "name": "Notify Work", + "type": "string[]", + "description": "URLs to which work package notifications are pushed.", "default": [ "" ] }, - "password": { - "name": "Password File", - "description": "File at {} should contain passwords to unlock your accounts. One password per line.", - "default": [""] + "force_sealing": { + "name": "Force Sealing", + "type": "bool", + "description": "Force the node to author new blocks as if it were always sealing/mining.", + "default": false }, - "keys_iterations": { - "name": "Keys deriving iterations", - "description": "Parity will do {} iterations to derive private keys from passphrase (higher=safer).", - "min": 1000, - "max": 1000000 - } - }, - "ui": { - "section": "Parity Wallet", - "description": "Manage your wallet, confirm and sign transactions.", - "path": { - "name": "Path", - "description": "Wallet configuration will be stored at {}.", - "type": "path" - } + "reseal_on_txs": { + "name": "Reseal On Transactions", + "type": "string", + "description": { + "none": "New transactions will not cause a new pending block to be created.", + "own": "New pending block will be created only on transactions sent using local RPC/IPC", + "ext": "New pending block will be created only on external transactions.", + "all": "New pending block will be created for all transactions (both local and external)." + }, + "default": "own", + "values": [ + "Never [none]", + "Local [own]", + "External [ext]", + "All [all]" + ] + }, + "reseal_min_period": { + "name": "Reseal Period", + "type": "number", + "description": "Specify the minimum time between reseals from incoming transactions. MS is time measured in milliseconds.", + "default": 2000, + "min": 1, + "max": 30000 + }, + "reseal_max_period": { + "name": "Reseal max period", + "type": "number", + "description": "Specify the maximum time since last block to enable force-sealing. MS is time measured in milliseconds.", + "default": 120000 + }, + "no_reseal_timer": { + "name": "No Reseal Timer", + "type": "bool", + "description": "Do not use reseal timer.", + "default": false + }, + "engine_signer": { + "name": "Engine Signer", + "type": "string", + "description": "Specify the address which should be used to sign consensus messages and issue blocks.", + "default": "" + }, + "work_queue_size": { + "name": "Work Queue Size", + "type": "number", + "description": "Specify the number of historical work packages which are kept cached lest a solution is found for them later. High values take more memory but result in fewer unusable solutions.", + "default": 20 + }, + "section": "Mining", + "description": "Options for mining nodes." }, + "network": { - "section": "Networking", - "description": "Network and peer-related settings. Network is not available if Parity is in offline mode.", - "condition": "!isOffline", - "warp": { - "name": "Warp Sync", - "description": "Parity will sync by downloading latest state first. Node will be operational in couple minutes." + + "disable": { + "name": "Disable", + "type": "bool", + "description": "Insert Description.", + "default": false }, - "warp_barrier": { - "condition": "settings.network.warp" + + "interface": { + "name": "Interface", + "type": "string", + "description": "Network interface to listen to.", + "default": "all" }, "port": { "name": "Port", - "description": "Parity will listen for connections on port {}." - }, - "min_peers": { - "name": "Min Peers", - "description": "Parity will try to maintain connection to at least {} peers.", - "default": 25, - "min": 0, - "max": 100000, - "simple": true + "type": "number", + "description": "Listen for connections on PORT", + "default": 30303 }, "max_peers": { "name": "Max Peers", - "description": "Parity will maintain at most {} peers.", + "type": "number", + "description": "Set the maximum number of connections the user would like.", "default": 50, "min": 0, "max": 100000, "simple": true }, - "snapshot_peers": { - "name": "Snapshot Sync Peers", - "description": "Parity will maintain additional {} peers for snapshot sync.", - "min": 0, - "max": 100000 - }, - "max_pending_peers": { - "name": "Max Pending Peers", - "description": "Parity will allow up to {} pending connections.", + "min_peers": { + "name": "Min Peers", + "type": "number", + "description": "Set the minimum number of connections the user would like.", + "default": 25, "min": 0, - "max": 100000 - }, - "nat": { - "name": "NAT settings", - "description": { - "any": "Parity will use all possible methods to determine public IP address.", - "none": "Parity won't attempt detect you public IP address", - "upnp": "Parity will use UPNP to detect your public IP address.", - "extip:": "Fill up the config manually and provide your public IP address." - }, - "values": [ - "Any [any]", - "None [none]", - "UPNP [upnp]", - "External IP [extip:]" - ], + "max": 100000, "simple": true }, - "id": { - "name": "Network ID", - "description": "Network ID of the chain will be overridden to: {}", - "default": 0 - }, - "bootnodes": { - "name": "Bootnodes", - "description": "Override the bootnodes from selected chain file.", + + "bootstrap_addresses": { + "name": "Bootstrap Addresses", + "type": "string[]", + "description": "Bootstrap addresses to connect.", "default": [ "" ] }, + + "sync": { + "name": "Sync", + "type": "bool", + "description": "Insert Description.", + "default": true + }, + + "transaction_relay": { + "name": "Transaction Relay", + "type": "bool", + "description": "Insert Description.", + "default": true + }, + "discovery": { - "name": "Peers Discovery", - "description": "Enable or disable new peers discovery." - }, - "node_key": { - "name": "Node Key", - "description": "Specify node secret key (64-char hex or input to SHA3)", - "default": "" - }, - "reserved_peers": { - "name": "Reserved Peers Path", - "description": "Specify a path to a file with peers' enodes to be always connected to.", - "default": "", - "type": "path" - }, - "reserved_only": { - "name": "Reserved Only", - "description": "Connect only to reserved nodes." - }, - "allow_ips": { - "name": "Allow Connections", + "name": "Discovery", + "type": "bool", + "default": true, + "description": "Decide how to choose the addresses to be sent. Options are kademlia and unstructured. In a testing environment, an unstructured p2p network is desirable because it is more than sufficient when there are a few nodes(< 100)." + }, + + "discovery_type": { + "name": "Discovery Type", + "type": "string", "description": { - "all": "Parity will not filter outbound connections.", - "private": "Parity will connect only to private network IP addresses.", - "public": "Parity will connect only to public network IP addresses." + "kademlia": "", + "unstructured": "" }, - "values": [ - "All IPs [all]", - "Private Network [private]", - "Public Network [public]" + "default": "unstructured", + "suggestions": [ + "kademlia", + "unstructured" ] }, - "no_serve_light": { - "name": "Disable light server", - "description": "Disable serving light peers." - } + + "discovery_refresh": { + "name": "Discovery Refresh", + "type": "number", + "description": "Refresh timeout of discovery. MS is time measured in milliseconds.", + "default": 60000 + }, + "discovery_bucket_size": { + "name": "Discovery Bucket Size", + "type": "number", + "description": "Bucket size for discovery.", + "default": 10 + }, + + "section": "Network", + "description": "Network and peer-related settings. Network is not available if CodeChain is in offline mode.", + "condition": "!isOffline" }, "rpc": { - "section": "RPC", - "description": "Expose JSON-RPC APIs over HTTP.", "disable": { "name": "Disable JSON-RPC", - "description": "You won't be able to interact with Parity using JSON-RPC over HTTP." - }, - "port": { - "name": "Port", - "description": "JSON-RPC over HTTP will be accessible on port {}.", - "simple": true + "type": "bool", + "description": "You won't be able to interact with CodeChain using JSON-RPC over HTTP.", + "default": false }, + "interface": { "name": "Interface", - "description": " JSON-RPC will be listening for connections on IP {}.", + "type": "string", + "description": " Specify the interface address for rpc connections.", + "default": "127.0.0.1", "simple": true }, - "cors": { - "name": "CORS", - "description": "Allows Cross-Origin Requests from domain '{}'.", - "default": [], - "simple": true - }, - "hosts": { - "name": "Allowed Hosts", - "description": "Allow connections only using specified addresses." - }, - "apis": { - "name": "Exposed APIs", - "description": "Only selected APIs will be exposed over this interface.", - "values": [ - "Web3 [web3]", - "Eth [eth]", - "Net [net]", - "Personal [personal]", - "Parity [parity]", - "Parity Accounts [parity_accounts]", - "Private transactions [private]", - "PUB-SUB [pubsub]", - "Parity PUB-SUB [parity_pubsub]", - "Whisper [shh]", - "Whisper PUB-SUB [shh_pubsub]", - "Traces [traces]", - "Trusted Signer (unsafe) [signer]", - "Parity Set* (unsafe) [parity_set]", - "RPC [rpc]", - "Secret Store [secretstore]" - ] - }, - "server_threads": { - "name": "Server threads", - "description": "Threads for handling incoming connections for HTTP JSON-RPC server.", - "default": 1 - } - }, - "websockets": { - "section": "WebSockets (since 1.7)", - "description": "Expose JSON-RPC APIs over WebSockets.", - "disable": { - "name": "Disable WebSockets", - "description": "UI won't work and WebSockets server will be not available." - }, "port": { "name": "Port", - "description": "JSON-RPC over WebSockets will be accessible on port {}.", - "simple": true - }, - "interface": { - "name": "Interface", - "description": " JSON-RPC will be listening for connections on IP {}.", - "simple": true - }, - "origins": { - "name": "Origins", - "description": "Allows connecting from Origin '{}'.", + "type": "number", + "description": "Listen for rpc connections on PORT.", + "default": 8080, "simple": true }, - "hosts": { - "name": "Allowed Hosts", - "description": "Allow connections only using specified addresses." - }, - "apis": { - "name": "Exposed APIs", - "description": "Only selected APIs will be exposed over this interface.", - "values": [ - "Web3 [web3]", - "Eth [eth]", - "PUB-SUB [pubsub]", - "Net [net]", - "Personal [personal]", - "Parity [parity]", - "Parity Accounts [parity_accounts]", - "Private transactions [private]", - "Traces [traces]", - "Trusted Signer (unsafe) [signer]", - "Parity Set* (unsafe) [parity_set]", - "RPC [rpc]", - "Secret Store [secretstore]", - "Parity PUB-SUB [parity_pubsub]", - "Whiper [shh]", - "Whisper PUB-SUB [shh_pubsub]" - ] - } + + "section": "RPC", + "description": "Expose JSON-RPC APIs over HTTP." }, "ipc": { - "section": "IPC", - "description": "Expose JSON-RPC APIs over IPC.", "disable": { "name": "Disable IPC", - "description": "You won't be able to use IPC to interact with Parity." + "type": "bool", + "description": "You won't be able to use IPC to interact with CodeChain.", + "default": false }, "path": { "name": "Path", - "description": "Parity will create an IPC socket at {}.", - "default": "$HOME/.local/share/io.parity.ethereum/jsonrpc.ipc", - "type": "path" + "type": "path", + "description": "CodeChain will create an IPC socket at {}.", + "default": "/tmp/jsonrpc.ipc" }, - "apis": { - "name": "Exposed APIs", - "description": "Only selected APIs will be exposed over this interface.", - "values": [ - "Web3 [web3]", - "Eth [eth]", - "PUB-SUB [pubsub]", - "Net [net]", - "Personal [personal]", - "Parity [parity]", - "Parity Accounts [parity_accounts]", - "Private transactions [private]", - "Traces [traces]", - "Trusted Signer (unsafe) [signer]", - "Parity Set* (unsafe) [parity_set]", - "RPC [rpc]", - "Secret Store [secretstore]", - "Parity PUB-SUB [parity_pubsub]", - "Whisper [shh]", - "Whisper PUB-SUB [shh_pubsub]" - ] - } + + "section": "IPC", + "description": "Expose JSON-RPC APIs over IPC." }, - "secretstore": { - "section": "Secret Store (since 1.7)", - "description": "Secret Store. Requires a special build of Parity.", + "ws": { "disable": { - "name": "Disable Secret Store", - "description": "You won't be able to encrypt and decrypt secrets." - }, - "nodes": { - "name": "Nodes", - "description": "List of other secret store cluster nodes. Format: NODE_PUBLIC_KEY_IN_HEX@NODE_IP:NODE_PORT" - }, - "port": { - "name": "Port", - "description": "Secret Store will be running on port {}." + "name": "Disable ws", + "type": "bool", + "description": "", + "default": false }, "interface": { "name": "Interface", - "description": "Secret Store will listen for connections on IP {}." - }, - "http_port": { - "name": "HTTP Port", - "description": "Secret Store HTTP iface will be running on port {}." - }, - "http_interface": { - "name": "HTTP Interface", - "description": "Secret Store will listen for HTTP requests on IP {}." - }, - "path": { - "name": "Path", - "description": "Encrypted secrets will be stored in {}.", - "type": "path" - } - }, - "ipfs": { - "section": "IPFS API (since 1.7)", - "description": "IPFS-compatible API for blockchain data.", - "enable": { + "type": "string", + "description": "Specify the interface address for the WebSockets JSON-RPC server.", + "default": "127.0.0.1" }, "port": { "name": "Port", - "description": "Secret Store will be running on port {}." - }, - "interface": { - "name": "Interface", - "description": "Secret Store will listen for connections on IP {}." - }, - "cors": { - "name": "CORS", - "description": "Allows Cross-Origin Requests from domain '{}'.", - "default": [] - }, - "hosts": { - "name": "Allowed Hosts", - "description": "Allow connections only using specified addresses." - } + "type": "number", + "description": "Specify the port portion of the WebSockets JSON-RPC server.", + "default": 8081 + }, + + "max_connections": { + "name": "Max Connections", + "type": "number", + "description": "Maximum number of allowed concurrent WebSockets JSON-RPC connections.", + "default": 100 + }, + "section": "ws", + "description": "INSERT" }, - "mining": { - "section": "Mining", - "description": "Options for mining nodes.", - "author": { - "name": "Author (Coinbase)", - "description": "Account address to receive reward when block is mined.", - "default": "", - "simple": true - }, - "engine_signer": { - "name": "Engine Signer", - "description": "Account to sign consensus messages and issue blocks for non-PoW chains.", - "default": "" - }, - "force_sealing": { - "name": "Force Sealing", - "description": "Prepare a block to seal even when there are no miners connected." - }, - "reseal_on_txs": { - "name": "Reseal On Transactions", - "description": { - "none": "New transactions will not cause a new pending block to be created.", - "own": "New pending block will be created only on transactions sent using local RPC/IPC", - "ext": "New pending block will be created only on external transactions.", - "all": "New pending block will be created for all transactions (both local and external)." - }, - "values": [ - "Never [none]", - "Local [own]", - "External [ext]", - "All [all]" - ] - }, - "reseal_min_period": { - "name": "Reseal Period", - "description": "New pending block will be created only once per {} milliseconds.", - "min": 1, - "max": 30000 - }, - "work_queue_size": { - "name": "Work Queue Size", - "description": "Parity will produce at most {} distinct pending blocks for miners.", - "min": 1, - "max": 100 - }, - "relay_set": { - "name": "Relay Set", - "description": { - "cheap": "Relay any transaction in the queue (may include invalid transactions).", - "strict": "Relay only executed transactions (will relay nothing if not mining).", - "lenient": "Same as strict when mining, and cheap when not." - }, - "values": [ - "Cheap [cheap]", - "Strict [strict]", - "Lenient [lenient]" - ] - }, - "usd_per_tx": { - "name": "USD per Transaction", - "description": "You will be paid ${} for a basic transaction - Minimum gas price will be set accordingly.", - "default": 0.0001, - "simple": true - }, - "usd_per_eth": { - "name": "USD per Eth", - "description": "Specify source (URL) or current price of Eth." - }, - "price_update_period": { - "name": "Price Update Period", - "description": "Parity will update price per ETH every {}." - }, - "gas_floor_target": { - "name": "Gas Floor Target", - "description": "Targeting {} gas per block when sealing a new block.", - "default": 4700000 - }, - "gas_cap": { - "name": "Gas Cap", - "description": "Gas limit will be raised at most by {} gas.", - "default": 6283184 - }, - "tx_gas_limit": { - "name": "Gas Limit per Transaction", - "description": "Parity will reject transactions above {} gas.", - "default": 0, - "min": 0, - "max": 10000000 - }, - "tx_time_limit": { - "name": "Time Limit per Transaction [ms]", - "description": "Parity will start banning senders/code when execution exceeds specified limit.", - "default": 0, - "min": 0, - "max": 100000 - }, - "tx_queue_ban_count": { - "name": "Ban After", - "description": "Parity will start banning senders/code when execution exceeds limit {} time(s).", - "min": 0, - "max": 1000 - }, - "tx_queue_ban_time": { - "name": "Ban For", - "description": "Parity will ban senders/code for {} seconds.", - "min": 0, - "max": 10000 - }, - "tx_queue_size": { - "name": "Transaction Queue Size", - "description": "Parity will keep/relay at most {} transactions in queue.", - "min": 0, - "max": 1000000 - }, - "tx_queue_strategy": { - "name": "Transaction Queue Strategy", - "description": { - "gas_price": "Txs in the queue are ordered by gas price (high gas price = high priority)", - "gas": "Txs in the queue are ordered by gas (low gas = high priority)", - "gas_factory": "Txs in the queue are ordered by gas/2^15 + gas_price (low gas or high gas+high fee = high priority)" - }, - "values": [ - "Gas Price [gas_price]", - "Gas Only [gas]", - "Gas & Gas Price [gas_factor]" - ] - }, - "extra_data": { - "name": "Extra Data", - "description": "Blocks that you mine will have '{}' in extra data field.", - "default": "" - }, - "remove_solved": { - "name": "Remove Solved Blocks", - "description": "Removes solved blocks - faster import speed, but extra solutions to the same work package will go unused." + "snapshot": { + "disable_snapshot": { + "name": "Disable Snapshot", + "type": "bool", + "description": "Disables automatic periodic snapshots.", + "default": false }, - "notify_work": { - "name": "Notify Work", - "description": "URLs to which work package notifications are pushed.", - "default": [ - "" - ] + "path": { + "name": "Path", + "type": "string", + "description": "Specify the snapshot directory path.", + "default": "snapshot" }, - "refuse_service_transactions": { - "name": "Refuse Service Transactions", - "description": "Always refuse service ZGP transactions." - } + "section": "Snapshots", + "description": "Snapshoting (warp sync) settings." }, "stratum": { - "section": "Stratum (since 1.6)", - "description": "Stratum Server for miner push notifications.", - "port": { - "name": "Port", - "description": "Stratum Server will be running on port {}." - }, - "interface": { - "name": "Interface", - "description": " Stratum Server will listen for connections on IP {}." - } - }, - "footprint": { - "section": "Footprint", - "description": "Tune Parity CPU, Memory and Disk usage.", - "tracing": { - "name": "Tracing", - "description": { - "on": "Compute and Store tracing data. (Enables trace_* APIs).", - "off": "Disable tracing.", - "auto": "Disable tracing unless it was enable previously for that DB." - }, - "values": [ - "on", - "off", - "auto" - ], - "simple": true - }, - "db_compaction": { - "name": "DB Compaction Profile", - "description": { - "hdd": "Increase performance on HDD.", - "ssd": "Increase performance on SSD.", - "auto": "Determine automatically." - }, - "values": [ - "HDD [hdd]", - "SSD [ssd]", - "Auto [auto]" - ], - "simple": true - }, - "pruning": { - "name": "Pruning", - "description": { - "fast": "Prune old state data. Maintains journal overlay - fast but extra 50MB of memory used.", - "archive": "Keep all state trie data. No pruning.", - "auto": "Prune data unless pruning was disable previously for that DB." - }, - "values": [ - "fast", - "archive", - "auto" - ], - "simple": true - }, - "pruning_history": { - "name": "Pruning History", - "description": "Will keep up to {} old state entries.", - "min": 0, - "max": 32000, - "condition": "settings.footprint.pruning !== 'archive'" - }, - "pruning_memory": { - "name": "Pruning Memory", - "description": "Will keep up to {} MB old state entries.", - "min": 0, - "max": 32000, - "condition": "settings.footprint.pruning !== 'archive'", - "simple": true - }, - "fat_db": { - "name": "Fat DB", - "description": { - "on": "Enables Fat DB", - "off": "Disable Fat DB.", - "auto": "Detect if Fat DB was enabled previously." - }, - "values": [ - "on", - "off", - "auto" - ], - "simple": true - }, - "scale_verifiers": { - "name": "Autoscale Verifiers Threads", - "description": "Number of threads will vary depending on the workload. Not guaranteed to be faster." - }, - "num_verifiers": { - "name": "Number of Verifiers Threads", - "description": "Initial number of verifier threads", - "default": 8, - "condition": "settings.footprint.scale_verifiers" - }, - "cache_size_db": { - "name": "Database Cache", - "description": "Will keep up to {}MB data in Database cache.", - "min": 0, - "max": 32000, - "condition": "!settings.footprint.cache_size" - }, - "cache_size_blocks": { - "name": "Blockchain Cache", - "description": "Will keep up to {}MB data in Blockchain cache.", - "min": 0, - "max": 32000, - "condition": "!settings.footprint.cache_size" - }, - "cache_size_queue": { - "name": "Import Queue Cache", - "description": "Will keep up to {}MB of blocks in block import queue.", - "min": 0, - "max": 32000, - "condition": "!settings.footprint.cache_size" - }, - "cache_size_state": { - "name": "State Cache", - "description": "Will keep up to {}MB data in State cache.", - "min": 0, - "max": 32000, - "condition": "!settings.footprint.cache_size" - }, - "cache_size": { - "name": "Total Cache Size", - "description": "If defined will never use more then {}MB for all caches. (Overrides other cache settings).", - "default": 0, - "min": 0, - "max": 32000, - "simple": true - }, - "fast_and_loose": { - "deprecated": true, + "disable_stratum": { + "name": "Disable Stratum", + "type": "bool", + "description": "Do not run Stratum server for miner push notification.", "default": false - } - }, - "snapshots": { - "section": "Snapshots", - "description": "Snapshoting (warp sync) settings.", - "disable_periodic": { - "name": "Disable Periodic", - "description": "Disables automatic periodic snapshots." - } - }, - "whisper": { - "section": "Whisper", - "description": "Whisper network" - }, - "misc": { - "section": "Miscellaneous", - "description": "Other uncategorized options.", - "logging": { - "name": "Logging", - "description": "Logging pattern (`=`, e.g. `own_tx=trace`).", - "default": "", - "simple": true }, - "log_file": { - "name": "Log File", - "description": "Logs will be stored at {}.", - "default": "", - "simple": true + "port": { + "name": "Port", + "type": "number", + "description": "Stratum Server will be running on port {}.", + "default": 8008 }, - "color": { - "name": "Enable Colors", - "description": "Enables colors in logs." - } - }, - "private_tx": { - "section": "Private Transactions" + "section": "Stratum (since 1.6)", + "description": "Stratum Server for miner push notifications." } -} +} \ No newline at end of file diff --git a/src/system.js b/src/system.js index 31a8e69..3f9c9aa 100644 --- a/src/system.js +++ b/src/system.js @@ -24,8 +24,7 @@ export function localPath (platform) { '%UserProfile%', 'AppData', 'Local', - 'Parity', - 'Ethereum' + 'CodeChain' ], platform); } @@ -36,8 +35,7 @@ export function basePath (platform) { if (platform === 'Windows') { return joinPath([ '%AppData%', - 'Parity', - 'Ethereum' + 'CodeChain' ], platform); } @@ -46,7 +44,7 @@ export function basePath (platform) { '$HOME', 'Library', 'Application Support', - 'io.parity.ethereum' + 'CodeChain' ], platform); } @@ -54,6 +52,6 @@ export function basePath (platform) { '~', '.local', 'share', - 'io.parity.ethereum' + 'CodeChain' ], platform); }