-
Notifications
You must be signed in to change notification settings - Fork 269
Configuration file migration tool
This is a simple program that makes it easier to upgrade configuration file. It changes keys but not values. Follow hereby instructions:
- Using intalled node: Install and run the latest RSK node here.
- Using compiled node: Compile RSKJ code. Click here for further information.
From version | To version | migration.properties |
---|---|---|
v0.4.0 or earlier | v0.4.1 or later | LINK |
You can also create your own migration file.
migration.properties
is a properties file which describes the mapping between the old and the new configuration. For example:
bind.address = bind_address
If you want to add a new key, you could add the prefix [new]
and the value this way:
[new]rpc.host = ["localhost"]
The migration must be invoked with:
java -cp [jar] co.rsk.cli.config.MigrationTool -i [original.conf] -m [migration.properties] (-o output.config) (--replace)
Where you should replace:
-
[jar]
: path to RSK .jar file, for example ../ rskj-core-0.4.2-BAMBOO-all.jar. -
[original.conf]
: full path to configuration file that wants to be migrated. -
[migration.properties]
: full path to migration.properties file.
As an invocation example:
java -cp rskj-core-0.4.2-BAMBOO-all.jar co.rsk.cli.config.MigrationTool -i /home/user/Documents/testnet.conf -m /home/user/Documents/migration.properties
You don't need to specify an output file, a new file will be created in the same location as the previous config file appending a .new suffix. This behavior can be overridden by a -o
option indicating the new config file name, or with --replace
which will overwrite the original file (use this one with caution).
If newly created file containes .new suffix, rename it and restart node.