Simple scripts to create a Komodo assetchain using a single node for testing
This repository automates the steps described in the doc: https://docs.komodoplatform.com/assetchains/create-asset-chain-single-node.html
Assumes Ubuntu desktop environment, may need tweaks for other environments
Clone the repository and navigate into it.
Create a file named
data and add the following contents:
name=<ASSETCHAIN-NAME> srcdir=/home/<USER>/komodo/src launch="komodod -ac_name=$name -ac_supply=10" datadir=/home/<USER>/coinData
nameis the assetchain's desired name
srcdiris the absolute location of the directory which contains
launchis the custom launch parameters of the assetchain, don't include
datadiris the absolute location of the directory to which the datadirectories of the second daemons are saved, no need to create it, the script will do it for you
Create a file named
keys and add the following contents:
pubkey1=02xxxxxxxxxxxxxxxxxx pubkey2=03xxxxxxxxxxxxxxxxxx privkey1=Uxxxxxxxxxxxxxxxxxx privkey2=Uxxxxxxxxxxxxxxxxxx
privkey1are a pair of keys used to launch the first daemon
privkey2are a pair of keys used to launch the second daemon
create-assetchain.sh script, it will launch two terminals each with a daemon running in them.
It also imports the
privkey corresponding to the
pubkey for the respective daemons.
Use the scripts
c2 to interact with the 1st and 2nd daemons respectively.
./c1 getinfo ./c2 setgenerate true 1 ./c2 getbalance
stop method to gracefully stop the daemons.
The script can be used to both create new assetchains or to launch an existing one.
create-assetchain.sh explorer installs the explorer too
Once the initial launch is done and the daemons have been shut down, the
start.sh script can be used to launch the daemons and start mining on the first daemon
To stop both the daemons, use the
For the first time the any of the indexes:
address,transaction,spent have been added to the
conf file, a reindex is needed. Use the
reindex.sh script to do that. It also opens the
debug.log corresponding to the daemon being reindexed in a new terminal.
./reindex.sh # reindexes both daemons ./reindex.sh 1 # reindexes the first daemon ./reindex.sh 2 # reindexes the second daemon
install-explorer.sh to install the explorer for your assetchain. You can use the command
./start.sh explorer to start the explorer along with the coin daemons after it has been installed.
To remove the assetchain completely, execute the
cleanup.sh script. It removes the datadirectories of both the daemons, the explorer script and explorer installation. This is typically done to start another assetchain with the same name.
To target the removal of a Assetchain other than the one described in the
data file, use