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.
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
.