For Higher Security
To Change Initial Account
In order to avoid letting the third party, including Tech Bureau, to know the account being set for each nodes, it may be bothering a little bit, but the followings steps are required as a safe environment. Convert it into a Private blockchain which is managed by a corporate by sending XEM to a separate account from 'Change Running Account of Node and Initial Account' while mijin is running.
The following is the overall process.
- create a new account
- send all XEM owned by the initial account to the new account
- suspend the node, and change the account that sent the XEM into a starting account, then reboot mijin
- leave the running nodes with the initial account, and switch rest of the nodes into a new account
- wait for a day for the 'importance' to be reflected on the new account
- once the 'importance' has been reflected to the new account, switch the initial account of the node into a new account
Method to Change Account
1. Generating Account
Please issue the account from the host of the running node from below. Account can be issued more than one, however, the information on the account address, the Public Key, and the Private Key will not be recorded on mijin once it is issued. So please take a note on the account information.
2. Checking Owning XEM on Initial Account
Here is to check how much XEN is owned by the initial account (the account apart from the one which is used for mijin that is running).
3. Send XEM from Initial Account to New Account
After figuring out how much XEM is owned, it is time to send the XEM to the new account.
4. Check Transaction Record on Blockchain
Let's check that the XEM has been sent to the account, as well as check there is no balance in the initial account.
5. Edit config-user.properties
Followings are the editting sections.
// around line #45
// enter the Private Key of the account that sent the XEM
nis.bootKey = 56f3366cce8c643cbfbd4884ad9ed231e58915e64998ed667edcaf2ad05816cd
6. Edit peers-config_mijinnet.json
Download the file from the running node, and enter the Public Key of the account that has been set for nis.bootKey to the public-key of the changing node.
{
"_info": "this file contains a list of all trusted peers and can be shared",
"knownPeers": [
{
"endpoint": {
"host": "27.133.131.154",
"port": 7895,
"protocol": "http"
},
"identity": {
"name": "mijin01",
"public-key": "442159366e13c9b899e53d4f0b64e6139910a6679fc30d6941e234de13f587e5"
}
}
{
"endpoint": {
"host": "27.133.154.6",
"port": 7895,
"protocol": "http"
},
"identity": {
"name": "mijin02",
"public-key": "f7321ebe78dc09dac511893984ac1e194dfcffa3c3c3224192156ee94c304780"
}
}
.
.
.
]
}
7. Upload the Files and Reboot mijin
Upload the following editted files and the nemesis-mijinnet.bin file to the node which will be changing the account, and then reboot the mijin.
- peers-config_mijinnet.json
- config-user.properties
- nemesis-mijinnet.bin
Following is the method to reboot.
// acquire the process of Java
$ ps aux | grep java
root 14925 2.0 82.3 8315404 837156 pts/2 Sl+ 18:20 4:53 java -Xms6G -Xmx6G -XX:+PrintGC -XX:+PrintGCDateStamps -Xloggc:./gc.txt -cp .:./serverjars/* org.nem.deploy.CommonStarter
root 15227 0.0 0.0 9032 660 pts/0 S+ 22:20 0:00 grep --color=auto java
in case of above, 14925 is suitable
// select the process number and suspend
$ kill -9 Process Number
// reboot mijin
$ screen -S mijin -d -m /home/mijin/startnem.sh
8. Check on mijin's Start
Check the condition on the mijin once it starts. Sometimes it may take a while (for few minutes) to re-start due to making a record on the memory to an activated address once it scans the retainling hashed database.
9. Delete Files
Create a back-up for the following files and delete them from the node on the running mijin.
- config-user.properties
- nemesis-mijinnet.bin
10. Same Process Method for other Nodes
Repeat the method from #1 to #9shown above for rest of each nodes (make sure to leave one of the nodes as an initial running account).
11. Check the 'importances' on the Account being Set
Here it is to check the importances (the authority to connect the blockchains) of the newly setted account. It will take a day to have the importances to be reflects after sending the XEM to the new account.
12. Transfer Rest of the Nodes to a New Account
When the 'isSet' is stated as '1' in the 'importance' of the newly setted account, switch the rest of the nodes into a new account. The method is as same as above.
Send the balance of XEM to other Accounts from the Initial Account
For the initial account that still has the balance of XEM, send all the balance to other account and make sure that there are no balance of XEM in the initial account. This will avoid a false use of the account.
- Remove all the balace of XEM in the initial account
- Check whether the transaction process has been successfully done after the switch of the account.
The following is the method.
1. Generate Receiver's Account
2. Check Balance of Sender's XEM
Here is to check the balance of XEM in the sender's account.
3. Send XEM to Created Account
4. Check Balance of XEM on Account
Check the balance of the XEM in the account to see that it has been successfully sent.
When the process above is completed, the XEM will disappear from the account of nemesis-accounts.txt which had been provided from Tech Bureau. The initial account will become just an account which cannot generate a transaction.