Lisk-sdk: Add config.json migration script from from old version 0.9.x

Created on 18 May 2018  路  2Comments  路  Source: LiskHQ/lisk-sdk

Expected behavior

Need a script inside core to migrate the config.json file from 0.9.x version to current version. The script should be initiated manually by user if running from source. And we will trigger the script from lisk_bridge.sh script during core migration.

Actual behavior

Currently the migration script is in lisk-scripts repo and not updated.

Which version(s) does this affect? (Environment, OS, etc...)

1.0.0

improvement

Most helpful comment

@webmaster128 Yes we are working on this direction. The description of the issues was misleading, I updated it now.

All 2 comments

I don't think core should ever touch the config file. When there are optional file format changes, core can print warnings. When there are incompatible file format changes, core should avoid to start.

It should always be the administrator's job to manage configure files. It should also be possible to copy custom config files to a node in an automated setup. It is already a pain that just starting core 0.9.x leads to this diff:

diff --git a/config.json b/config.json
index 51dd5c07..1cc9aaba 100644
--- a/config.json
+++ b/config.json
@@ -32,7 +32,9 @@
         "enabled": true,
         "access": {
             "public": false,
-            "whiteList": ["127.0.0.1"]
+            "whiteList": [
+                "127.0.0.1"
+            ]
         },
         "options": {
             "limits": {
@@ -114,8 +116,8 @@
     },
     "dapp": {
         "masterrequired": true,
-        "masterpassword": "",
+        "masterpassword": "9xX4yY2wVrTi",
         "autoexec": []
     },
     "nethash": "da3ed6a45429278bac2666961289ca17ad86595d33b31037615d4b8e8f158bba"
-}
+}

This only causes that the administrator or the system configuration tool (e.g. Ansible) competes with core over how the file looks like.

@webmaster128 Yes we are working on this direction. The description of the issues was misleading, I updated it now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

slaweet picture slaweet  路  3Comments

Tschakki picture Tschakki  路  4Comments

toschdev picture toschdev  路  3Comments

willclarktech picture willclarktech  路  4Comments

MaciejBaj picture MaciejBaj  路  4Comments