This quickstart guide will help you to run a Cryptokernel node with the reference coin K320. First we will download and install the Cryptokernel software, synchronise with the blockchain, create a new K320 receiving address and configure mining in order to acquire some coins. You can use these coins to further explore Cryptokernel.
Download and install
Visit the downloads page in order to download the latest Cryptokernel release for your platform. At present 64-bit Windows, MacOS and Linux binaries are provided. It is also possible to build Cryptokernel from the source code. Once you have downloaded the archive for your platform, extract its contents to a location of your choice.
Opening the terminal
ckd
is the reference Cryptokernel daemon that contains everything you need to run a K320 node and start using Cryptokernel. ckd
is a command-line application so you will need to open a terminal window in order to begin.
Linux
The method for accessing the terminal depends on your specific Linux distribution. On Ubuntu Desktop it can be accessed by searching for “Terminal” in the menu bar. Once you have a terminal open, change directory to the location where you extracted Cryptokernel.
e.g.
~$ cd /home/james/cryptokernel
Windows
The terminal on Windows is called the command prompt. This can be found from the Start menu or by pressing the windows key and R, then typing cmd
at the “Run” window and pressing okay. From the command prompt you will need to change location to where you extracted Cryptokernel.
e.g.
C:\Users\James> dir C:\Users\James\cryptokernel
C:\Users\James\cryptokernel>
MacOS
The terminal in MacOS can be found from Finder in Applications->Utilities->Terminal
. Once you have a terminal open, change directory to the location where you extracted Cryptokernel.
e.g.
~$ cd /Users/James/cryptokernel
Running ckd
The remainder of this guide will continue using the Linux/MacOS convention of starting ckd
by typing:
~$ ./ckd
Windows users will instead have to write the following (without the ./
) to achieve the same thing:
C:\Users\James\cryptokernel> ckd
First run
As described above, start ckd
in order to create a new K320 wallet. ckd
will ask you to choose a password for your wallet.
e.g.
~$ ./ckd
Enter new wallet passphrase (min 8 chars): ********
Confirm passphrase: ********
Wallet successfully encrypted
ck daemon started
Querying information about our node
Now open a second terminal window and change directory to the location where you extracted Cryptokernel as in the opening the terminal section above. From there, you can interact with the ckd
instance you just started. First off you can use the getinfo
command to retrieve the current status of your node.
e.g.
~$ ./ckd getinfo
{
"balance" : "0.00000000",
"ck_version" : "0.1.1-alpha",
"connections" : 0,
"height" : 1,
"mempool" :
{
"count" : 0,
"size" : "0.000 MB"
},
"rpc_version" : "0.0.2"
}
It typically takes a few hours for ckd
to syncronise the entire K320 blockchain. The connections
field in the getinfo
output tells you how many other Cryptokernel peers you are connected to. Once ckd
has found some peers, it will begin downloading and verifying blocks and the height
field will increase accordingly to indicate how many blocks are in the blockchain.
Querying information about other nodes
You can use getpeerinfo
to retrieve information about the peers you are connected to. Part of this readout tells you the heights of other peers, which can be useful to determine if you are fully syncronised with the K320 network.
e.g.
~$ ./ckd getpeerinfo
{
"108.20.219.131" :
{
"connectedSince" : 1534358423,
"height" : 207062,
"incoming" : false,
"ping" : 18,
"transferDown" : 92082,
"transferUp" : 22222,
"version" : "0.1.1-alpha"
},
"13.58.67.108" :
{
"connectedSince" : 1534358426,
"height" : 207062,
"incoming" : false,
"ping" : 44,
"transferDown" : 33721,
"transferUp" : 23843,
"version" : "0.1.1-alpha"
},
"159.65.161.209" :
{
"connectedSince" : 1534358429,
"height" : 207062,
"incoming" : false,
"ping" : 9,
"transferDown" : 25625,
"transferUp" : 13736,
"version" : "0.1.0-alpha-rc4"
},
"18.85.22.252" :
{
"connectedSince" : 1534358414,
"height" : 207062,
"incoming" : false,
"ping" : 4,
"transferDown" : 31122,
"transferUp" : 19799,
"version" : "0.1.0-alpha-rc4"
}
}
Stopping ckd
You can stop the ckd
instance by using stop
.
e.g.
~$ ./ckd stop
Running ckd
in the background
To start ckd
in daemon mode, use the -daemon
flag. This will cause ckd
to run in the background, allowing you to close the terminal window.
e.g.
~$ ./ckd -daemon
ck daemon started
~$
Retrieving a wallet address
In order to receive coins from mining or from other users you will need to generate a new wallet address. Cryptokernel stores addresses as labeled accounts with distinct balances to help you easily organise your funds. To create a new account or view the balance and address for an existing account, use the account
command and provide an account name of your choosing.
e.g.
~$ ./ckd account mining_rewards
Please enter your wallet passphrase: ********
{
"balance" : "0",
"keys" :
[
{
"privKey" :
{
"cipherText" : "qtWvIRW3E9wHDclGPZ4GTjAolBjVT8Dpe4st8SUzBahv7oE8SpQ9eeUlNtjpRLLZ",
"iv" : "0/GiyAoK3D0OvozHALGK7g==",
"salt" : "MJOLKLDeQWVZpU8TQ0+eruKbov3Ub+gB16KDU5lelD0="
},
"pubKey" : "BDdUhYtSgftZzhzQo1DKZyK4B3GkM8WnaP0IOv9oFmcWxXXGlmeFoguLmHrVSY8/56BxH8Dpz3Lyw7cKw/SjPRM="
}
],
"name" : "mining_rewards"
}
The pubKey
field shows the address you can give to others such that they can send you coins. Issuing the same command in the future will retreive the same address and display your updated balance if coins are sent to (or from) the address. Also displayed in the privKey
field is the AES-256 encrypted representation of the private key needed to send from the address.
Configuring mining
The easiest way to acquire coins is to mine them. Mining is the means by which new coins are created in K320 and other Proof-of-Work based cryptocurrencies. Mining also helps to secure the network by validating new transactions. Effectively you are voting with your computer’s power on the correct state of the system.
Edit the config.json
file which is stored in the same location as the ckd
binary with your favourite text editor. Inside that file you will need to set the miner
field to true
and the pubKey
field to an address you generated in the earlier retrieving a wallet address section.
e.g.
...
"miner" : true,
"pubKey" : "BDdUhYtSgftZzhzQo1DKZyK4B3GkM8WnaP0IOv9oFmcWxXXGlmeFoguLmHrVSY8/56BxH8Dpz3Lyw7cKw/SjPRM=",
...
Now when you restart ckd
(see the stopping ckd
and running ckd
sections), it will begin mining K320. Over time you will see the balance of the mining address you chose increasing though it could take several hours before you successfully mine your first coins depending on the speed of your computer and the number of other miners on the network.
Sending coins
Once you have mined some coins you can use the sendtoaddress
command to send them to other K320 users. sendtoaddress
takes the destination address and amount as arguments and returns the transaction ID if the send was sucessful.
e.g.
~$ ./ckd sendtoaddress BFAxMRX95crygWONzw2vxWPos8OGPdUAX9qyXvzgiapyvmQWDNY1Ao8Z5L9oDdmTS5uJ/2lqAJcftUCkqd0aBYY= 50
Please enter your wallet passphrase: ********
74770d95b789c2b7551bb62d284509e49a32eef3288c104a72409c097ce515a1
Next steps
Now that you have successfully set up a ckd
instance and are on your way to mining some K320 you’re ready to explore the rest of what Cryptokernel has to offer. Check out the help
command of ckd
to see the full list of currently available commands or see the rest of the documentation for more advanced uses of Cryptokernel.