Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Block size and transaction per block in Hyperledger Fabric

What is the relationship between MaxMessageCount, AbsoluteMaxBytes, and PreferredMaxBytes?

A block in fabric consists of a MaxMessageCount number of transaction or PreferredMaxBytes?

What should be the value of these to get maximum throughput?

like image 205
Subhankar Avatar asked Sep 21 '18 04:09

Subhankar


People also ask

What is block size in Hyperledger Fabric?

AbsoluteMaxBytes: 98 MB # Preferred Max Bytes: The preferred maximum number of bytes allowed for # the serialized messages in a batch. A message larger than the preferred # max bytes will result in a batch larger than preferred max bytes. PreferredMaxBytes: 512 KB.

How many transactions can Hyperledger handle?

Hyperledger Fabric processes up to 3,000 transactions per second (tps) that can be scaled up to 20,000 tps with some pluggable modules [9] . In addition, Hyperledger Fabric supports different languages to implement smart contracts, such as Java, Golang, and JavaScript. ...

What are the two types of transactions in the Hyperledger Fabric?

Transactions may be of two types: Deploy transactions create new chaincode and take a program as parameter. When a deploy transaction executes successfully, the chaincode has been installed “on” the blockchain. Invoke transactions perform an operation in the context of previously deployed chaincode.

What is transaction in Hyperledger Fabric?

Transaction is an important element in Hyperledger Fabric. Transaction reflects the business activity upon the fabric network. To achieve data immutability transactions are kept inside blocks and protected through a chained structure. This is how the word blockchain comes from.


1 Answers

Max Message Count: The maximum number of transactions/messages to permit in block.

Absolute Max Bytes: The (strict) maximum number of bytes allowed for serialized transactions/messages in a block.

Preferred Max Bytes: The preferred maximum number of bytes allowed the serialized transactions/messages in a batch. A transaction/message larger than the preferred max bytes will result in a batch larger than preferred max bytes.

The criteria that is encountered first will be taken into consideration while the orderer cuts the block.

If you have a constantly flowing high number of transactions, then pack as many transactions as possible in a block to get max throughput. Otherwise tweak the BatchTimeout and MaxMessageCount to optimize your transaction throughput.

If you want to dig deep on this aspect refer to this research paper: https://arxiv.org/pdf/1805.11390.pdf

like image 178
arnabkaycee Avatar answered Oct 10 '22 08:10

arnabkaycee