how exactly blocks are created in hyperledger fabric

后端 未结 3 769
没有蜡笔的小新
没有蜡笔的小新 2021-02-03 14:54

I am going through hyperledger fabric V1.0. Need to know the internals of hyper-ledger.

1) How and where the blocks and transactions are saved in hyperledger internally.

3条回答
  •  闹比i
    闹比i (楼主)
    2021-02-03 14:59

    The BatchSize and BatchTimeout are the defining criteria for creation of blocks by the Ordering service. The BatchTimeout is pretty straightforward, but BatchSize, however, has three subparameters - MaxMessageCount, AbsoluteMaxBytes and PreferredMaxBytes. So, if the BatchTimeout is set to a pretty high value, BatchSize would be instrumental in deciding when a block will get created. If the messages are really not that big, a new block gets created whenever the number of messages become equal to MaxMessageCount first while the cumulative block size <= PreferredMaxBytes or in the other case, where cumulative size hits the max bytes threshold, the block will end up having arbitrary number of messages such that cumulative size doesn't cross the PreferredMaxBytes. On the other hand, if the transaction size is big (>PreferredMaxBytes), then a block will get created with fewer no. of transaction with a restriction of the cumulative size do not cross AbsoluteMaxBytes.

提交回复
热议问题