How blocks are linked in the Hyperledger Fabric blockchain?

0 votes
Bitcoin blockchain uses the hash of previous block to link the blocks. Is it the same in Hyperledger Fabric?
How does it look in Hyperledger Fabric?
Jul 3, 2018 in Blockchain by digger
• 26,550 points
391 views

1 answer to this question.

+1 vote
Best answer

The structure of block in Hyperledger Fabric is very similar to that of bitcoin. The hash(H) is
computed as follows:

H(H) = hash([transactions] || H(N-1) || N)

The block looks something like this:

message Block {
    BlockHeader header = 1;
    BlockData data = 2;
    BlockMetadata metadata = 3;
}

and the definition of Blockheader is:

message BlockHeader {
    uint64 number = 1; // The position in the blockchain
    bytes previous_hash = 2; // The hash of the previous block header
    bytes data_hash = 3; // The hash of the BlockData, by MerkleTree
}

Check out https://github.com/hyperledger/fabric/blob/master/protos/common/common.proto to know more.

answered Jul 3, 2018 by Omkar
• 67,660 points

selected Jul 3, 2018 by digger

Related Questions In Blockchain

+1 vote
1 answer
+1 vote
2 answers

How can I traverse the blocks of transactions in hyperledger fabric?

For hyperledger fabric you can use query ...READ MORE

answered May 8, 2018 in Blockchain by Rachel
1,985 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Invalid Batch or signature in Savtooth

This will solve your problem import org.apache.commons.codec.binary.Hex; Transaction txn ...READ MORE

answered Aug 1, 2018 in Blockchain by digger
• 26,550 points
81 views
+1 vote
1 answer
0 votes
1 answer

In Hyperledger fabric, how does committer validate the transaction?

Endorsing and committing are just two functions ...READ MORE

answered Jul 3, 2018 in Blockchain by Omkar
• 67,660 points
258 views