Height Of A Block

+1 vote

My understanding is this, that, MultiChain, internally, manages collection of blocks, in the form of "Merkle Tree".

In my chain, "getblockchaininfo" command depicts, "blocks: 81"....i.e. my chain is having "Total Block Count = 81".

Initially, I thought, 81th-block, shall be the leaf in my "Merkle Tree".

but, I was wrong, as, from the output of commands "getblockhash & getblock".....I had seen that 81th-block is actually the root of the Merkle Tree.

How I reached to that conclusion ?

Well,  because total confirmations in the output of "getblock" ...was ONLY ONE.

So, the analogy I have build from aforesaid observations is as follows:

Any "New Block", in the MultiChain, shall increase the "Height" of existing blocks, BY ONE. 

Am I building correct analogy ?

Following was the output of getblockhash & getblock for the reference:

 

uselesschain1: getblockhash 81
{"method":"getblockhash","params":[81],"id":1,"chain_name":"uselesschain1"}

0038578b101797832a59e84d2a7847015e04810834904d2f777548669b3ea57f


uselesschain1: getblock 0038578b101797832a59e84d2a7847015e04810834904d2f777548669b3ea57f
{"method":"getblock","params":["0038578b101797832a59e84d2a7847015e04810834904d2f777548669b3ea57f"],"id":1,"chain_name":"uselesschain1"}

{
    "hash" : "0038578b101797832a59e84d2a7847015e04810834904d2f777548669b3ea57f",
    "miner" : "1JZzMjVbs1cgb4fDKRSRAHXwj8dVERPJFQjJu6",
    "confirmations" : 1,
    "size" : 266,
    "height" : 81,
    "version" : 3,
    "merkleroot" : "8eeeda5a3fc176fa795041ee820fef2ca173fc8e50d1dd7d6a17022603a44241",
    "tx" : [
        "8eeeda5a3fc176fa795041ee820fef2ca173fc8e50d1dd7d6a17022603a44241"
    ],
    "time" : 1529827770,
    "nonce" : 57,
    "bits" : "2000ffff",
    "difficulty" : 0.00000006,
    "chainwork" : "0000000000000000000000000000000000000000000000000000000000005200",
    "previousblockhash" : "00091aa81e8e8e106ca2a83b58b86534c1e9c219d986f10f8652a702810c8b7d"
}

asked Jun 24, 2018 by GST

1 Answer

+1 vote
Blocks are not themselves a merkle tree. Each block points to the previous one – that is all – so it's a chain with the occasional extra branch forking off.

A merkle tree is used to put a single hash in a block header to represent all of the transactions within that block.
answered Jun 25, 2018 by MultiChain
...