This protocol describes block chain systems & rules of kokonut.
- The 'Block' is the collection of data which contains uniqueness.
- Blocks have meaning and value only when they are connected to each other.
- Format is JSON(.json).
- version : The kokonut protocol verison (match to major number of library version).
- index : The numbering of block which previous block index < next block index.
- previousHash : The hash of previous block.
- timestamp : Time relative to UTC. Indicates the time the block difficulty was solved.
- data :
- difficulty : The numbers of leading 0 of hash. All block hash must follow difficulty.
- nonce : The total times of trying hash function for satisfying difficulty.
- hash : The output 64-digits string format which came from SHA-256(Secure Hash Algorithm 256-bit) hash function, inputs is the sequential collection of all data's in block.
{
"version":4,
"index":1,
"previousHash":"00000000000000000000000000000000000000000000000061bdff5e59b8ff4c",
"timestamp":1724547179867,
"data": {
"reward":16.230218,
"miner":"6c60b7550766d5ae24ccc3327f0e47fbaa51e599172795bb9ad06ac82784a92d",
"transactions":[],
"comment":"kokonut version 4"
},
"difficulty":6,
"nonce":1502929,
"hash":"000000f31571551dacab93769546843d2ef483fd0d26181fe8950de617b919ec"}
It is called genesis block which follows below :
- first block of chain
- previousHash is "0"
- reward is 0
- miner is "0000000000000000000000000000000000000000000000000000000000000000"
- transactions is empty
- difficulty is 0
- nonce is 0
- hash isn't made by SHA-256 Hash Algorithm. it is artificially generated.
{
"version":4,
"index":0,
"previousHash":"0",
"timestamp":1725108420520,
"data":{
"reward":0.0,
"ticker":"KNT",
"miner":"0000000000000000000000000000000000000000000000000000000000000000",
"transactions":[],
"comment":"Navigate beyond computing oceans"
},
"difficulty":0,
"nonce":0,
"hash":"000000000000000000000000000000000000000000000000190282d71244ac7a"
}
- The connectivity of blocks.
- Kovalut is Database which use SQLite DBMS(DataBase Management System) software.
- Check Miner
- Check Index
- Check Version
- CHeck Difficulty
- Check Hash
fun calculateHash(): String {
val input = "$version$index$previousHash$timestamp$data$difficulty$nonce"
hash = MessageDigest.getInstance("SHA-256")
.digest(input.toByteArray())
.fold("") { str, it -> str + "%02x".format(it) }
return hash
}
- READY
- MINING
- FAILED
- MINED
- Configuration is 3 parts. Fuel, Full and Light Nodes
- VALID : Able to internet connect & verified by wallet is valid
- INVALID : Able to internet connect but, non-verified by wallet is invalid
- DISCONNECTED : Status of not being able to internet connect to node
- URL : https://kokonut-fuelnode.onrender.com
- It contains genesis block
- Service full node lists
- Synchronize full nodes
- Supplies important information to cross validation between full & light node
- URL : -
- DockerHub : https://hub.docker.com/r/volta2030/knt_fullnode
- Validate Block and Add to Chain. powered by kokonut
- Check Chain is valid
- Client Application for block chain system
- Mine Block. powered by kokonut
- Check Chain is valid
- It has two mission. 1. Alert stop other full nodes mining 2. Comparison other full nodes than infect longer blockchain.
- INVALID
- PENDING
- READY
- RESERVED
- EXECUTED