Maintenance
Starting the Zetrix Service
Input the following command to start the zetrix service.
./ztx startNote: You must enter the /usr/local/ztxchain/scripts directory to execute ztx command.
Stopping the Zetrix Service
Input the following command to stop the zetrix service.
./ztx stopQuerying the Zetrix Service Status
Input the following command to query the zetrix service.
./ztx statusQuerying the Detailed System Status
Input the following command to query the detailed system status.
curl 127.0.0.1:18002/getModulesStatusThe result is shown below:
{
"glue_manager":{
"cache_topic_size":0,
"ledger_upgrade":{
"current_states":null,
"local_state":null
},
"system":{
"current_time":"2017-07-20 10:32:22", //Current system time
"process_uptime":"2017-07-20 09:35:06", //When zetrix is started
"uptime":"2017-05-14 23:51:04"
},
"time":"0 ms",
"transaction_size":0
},
"keyvalue_db":Object{...},
"ledger_db":Object{...},
"ledger_manager":{
"account_count":2316, //Total accounts
"hash_type":"sha256",
"ledger_sequence":12187,
"time":"0 ms",
"tx_count":1185 //Total transactions
},
"peer_manager":Object{...},
"web server":Object{...}
}Clearing Database
Before clearing the database, you must stop the Zetrix service. Follow these steps to properly clear the database:
Input the following command to enter the zetrix service directory.
cd /usr/local/ztxchain/binInput the following command to clear the database.
./ztx --dropdb
Note: After the database is successfully cleared, you can see the information shown below.

Creating a Hard Fork
You must complete the following steps to create a hard fork.
Create the hard fork by inputting the following command in the /usr/local directory.
./ztxchain/bin/ztx --create-hardforkEnter
ywhen prompted and then pressEnter. The message shown below indicates the hard fork is created successfully.

Note:
After executing the above command, the new blockchain network has only one verification node.
After executing the hard fork command, the following hash value is displayed:
4b9ad78065c65aaf1280edf6129ab2da93c99c42f2bcd380b5966750ccd5d80dInput the following command to clear the consensus status data. When clearing the consensus status data, you must ensure that the zetrix service is not running, otherwise it cannot be cleared.
./ztxchain/bin/ztx --clear-consensus-statusAdd the hash value to the ztx.json file in the /usr/local/ztxchain/config directory of the node or synchronization node.
"ledger": { "genesis_account": "ztxSe9NGrGXmNBhwDerRyRyaXouFT4WbPT7LA", "max_trans_per_ledger": 1000, "hardfork_points":[ "4b9ad78065c65aaf1280edf6129ab2da93c99c42f2bcd380b5966750ccd5d80d" ] },Start the node service for the configuration to take effect.
Updating the configure file
Before updating the configure file, you must make sure that the Zetrix service is down. If you want to update the configure file of the Zetrix node, you can modify it by following the steps below.
Input the following command to enter the directory where the configuration file is located.
cd /usr/local/ztxchain/config/Change the configuration file name (ztx.json) for the current running environment, for example:
cp ztx.json ztx-previous.jsonUpdate the configure file ztx.json, for example:
vi ztx.json
Note:
If you want to update the configure file, you can refer to xxx
After changing the running environment, you must clear the database to restart the zetrix service.
Last updated