3

Block weight is divided between 3 different types of transaction classes:

  • mandatory
  • operation
  • normal

Each type has a max_total. The max_total is used so that any one type does not dominate the block. In any case, there is a max_block for which the sum of these classes cannot exceed.

Below is an illustration with 3 normal transactions that have reach its limit, 2 mandatory transactions, and 1 operational transaction. Also, note that the block is not full.

/// |   |`max_block`
/// |   | 
/// |   |                      -- `Mandatory` limit (unlimited)
/// |#  |                 |   |
/// |#  | `Ext3`          | - - `Operational` limit
/// |#  | `Ext2`          |-  - `Normal` limit
/// | # | `Ext1`          |#  |
/// |  #| `on_initialize` |# #|
/// |  #| `base_block`    |###|
/// |NOM|                 |NOM|

Questions:

  1. Please tell me if the following understanding is correct: In the case that there are no more operational or mandatory transactions that can fill up the remaining space and normal transactions have reach its limit. A block is created and will NOT attempt to fill the remaining space with more normal transactions?

  2. If the above is true, what are the limitations that prevents an architectural design that attempts to always fill up the remaining space?

  3. Can I reach into the transaction pool to see if I can add more normal transactions to fill up the remaining space?

1 Answer 1

4
  1. Your understanding is correct, if max_total is reached for a particular Dispatch Class, no more transactions of that class will be attempted to be included in the block.
  2. Substrate is flexible about how to fill the blocks and there are not limitations. However, a bad configuration might lead to building oversized blocks that might have a critical impact in your chain, or Operational transactions never being included and pushed out by high-priority/high-fees Normal transactions.
  3. The weights configurations about how to fill a block can be found in BlockWeights and WeightsPerClass. You can play with max_total and reserved attributes for each Dispatch Class to meet your chain's particular needs. A detailed explanation can be found here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.