github.com/badrootd/nibiru-cometbft@v0.37.5-0.20240307173500-2a75559eee9b/docs/qa/CometBFT-QA-34.md (about)

     1  ---
     2  order: 1
     3  parent:
     4    title: CometBFT QA Results v0.34.x
     5    description: This is a report on the results obtained when running v0.34.x on testnets
     6    order: 3
     7  ---
     8  
     9  # CometBFT QA Results v0.34.x
    10  
    11  ## v0.34.x - From Tendermint Core to CometBFT
    12  
    13  This section reports on the QA process we followed before releasing the first `v0.34.x` version
    14  from our CometBFT repository.
    15  
    16  The changes with respect to the last version of `v0.34.x`
    17  (namely `v0.34.26`, released from the Informal Systems' Tendermint Core fork)
    18  are minimal, and focus on rebranding our fork of Tendermint Core to CometBFT at places
    19  where there is no substantial risk of breaking compatibility
    20  with earlier Tendermint Core versions of `v0.34.x`.
    21  
    22  Indeed, CometBFT versions of `v0.34.x` (`v0.34.27` and subsequent) should fulfill
    23  the following compatibility-related requirements.
    24  
    25  * Operators can easily upgrade a `v0.34.x` version of Tendermint Core to CometBFT.
    26  * Upgrades from Tendermint Core to CometBFT can be uncoordinated for versions of the `v0.34.x` branch.
    27  * Nodes running CometBFT must be interoperable with those running Tendermint Core in the same chain,
    28    as long as all are running a `v0.34.x` version.
    29  
    30  These QA tests focus on the third bullet, whereas the first two bullets are tested using our _e2e tests_.
    31  
    32  It would be prohibitively time consuming to test mixed networks of all combinations of existing `v0.34.x`
    33  versions, combined with the CometBFT release candidate under test.
    34  Therefore our testing focuses on the last Tendermint Core version (`v0.34.26`) and the CometBFT release
    35  candidate under test.
    36  
    37  We run the _200 node test_, but not the _rotating node test_. The effort of running the latter
    38  is not justified given the amount and nature of the changes we are testing with respect to the
    39  full QA cycle run previously on `v0.34.x`.
    40  Since the changes to the system's logic are minimal, we are interested in these performance requirements:
    41  
    42  * The CometBFT release candidate under test performs similarly to Tendermint Core (i.e., the baseline)
    43      * when used at scale (i.e., in a large network of CometBFT nodes)
    44      * when used at scale in a mixed network (i.e., some nodes are running CometBFT
    45        and others are running an older Tendermint Core version)
    46  
    47  Therefore we carry out a complete run of the _200-node test_ on the following networks:
    48  
    49  * A homogeneous 200-node testnet, where all nodes are running the CometBFT release candidate under test.
    50  * A mixed network where 1/2 (99 out of 200) of the nodes are running the CometBFT release candidate under test,
    51    and the rest (101 out of 200) are running Tendermint Core `v0.34.26`.
    52  * A mixed network where 1/3 (66 out of 200) of the nodes are running the CometBFT release candidate under test,
    53    and the rest (134 out of 200) are running Tendermint Core `v0.34.26`.
    54  * A mixed network where 2/3 (133 out of 200) of the nodes are running the CometBFT release candidate under test,
    55    and the rest (67 out of 200) are running Tendermint Core `v0.34.26`.
    56  
    57  ## Configuration and Results
    58  In the following sections we provide the results of the _200 node test_.
    59  Each section reports the baseline results (for reference), the homogeneous network scenario (all CometBFT nodes),
    60  and the mixed networks with 1/2, 1/3 and 2/3 of Tendermint Core nodes.
    61  
    62  ### Saturation Point
    63  
    64  As the CometBFT release candidate under test has minimal changes
    65  with respect to Tendermint Core `v0.34.26`, other than the rebranding changes,
    66  we can confidently reuse the results from the `v0.34.x` baseline test regarding
    67  the [saturation point](TMCore-QA-34.md#finding-the-saturation-point).
    68  
    69  Therefore, we will simply use a load of (`r=200,c=2`)
    70  (see the explanation [here](TMCore-QA-34.md#finding-the-saturation-point)) on all experiments.
    71  
    72  We also include the baseline results for quick reference and comparison.
    73  
    74  ### Experiments
    75  
    76  On each of the three networks, the test consists of 4 experiments, with the goal of
    77  ensuring the data obtained is consistent across experiments.
    78  
    79  On each of the networks, we pick only one representative run to present and discuss the
    80  results.
    81  
    82  
    83  ## Examining latencies
    84  For each network the figures plot the four experiments carried out with the network.
    85  We can see that the latencies follow comparable patterns across all experiments.
    86  
    87  Unique identifiers, UUID, for each execution are presented on top of each graph.
    88  We refer to these UUID to indicate to the representative runs.
    89  
    90  ### CometBFT Homogeneous network
    91  
    92  ![latencies](img34/homogeneous/all_experiments.png)
    93  
    94  ### 1/2 Tendermint Core - 1/2 CometBFT
    95  
    96  ![latencies](img34/cmt1tm1/all_experiments.png)
    97  
    98  ### 1/3 Tendermint Core - 2/3 CometBFT
    99  
   100  ![latencies](img34/cmt2tm1/all_experiments.png)
   101  
   102  ### 2/3 Tendermint Core - 1/3 CometBFT
   103  
   104  ![latencies_all_tm2_3_cmt1_3](img34/v034_200node_tm2cmt1/all_experiments.png)
   105  
   106  
   107  ## Prometheus Metrics
   108  
   109  This section reports on the key Prometheus metrics extracted from the following experiments.
   110  
   111  * Baseline results: `v0.34.x`, obtained in October 2022 and reported [here](TMCore-QA-34.md).
   112  * CometBFT homogeneous network: experiment with UUID starting with `be8c`.
   113  * Mixed network, 1/2 Tendermint Core `v0.34.26` and 1/2 running CometBFT: experiment with UUID starting with `04ee`.
   114  * Mixed network, 1/3 Tendermint Core `v0.34.26` and 2/3 running CometBFT: experiment with UUID starting with `fc5e`.
   115  * Mixed network, 2/3 Tendermint Core `v0.34.26` and 1/3 running CometBFT: experiment with UUID starting with `4759`.
   116  
   117  We make explicit comparisons between the baseline and the homogenous setups, but refrain from
   118  commenting on the mixed network experiment unless they show some exceptional results.
   119  
   120  ### Mempool Size
   121  
   122  For each reported experiment we show two graphs.
   123  The first shows the evolution over time of the cumulative number of transactions
   124  inside all full nodes' mempools at a given time.
   125  
   126  The second one shows the evolution of the average over all full nodes.
   127  
   128  #### Baseline
   129  
   130  ![mempool-cumulative](img34/baseline/mempool_size.png)
   131  
   132  ![mempool-avg](img34/baseline/avg_mempool_size.png)
   133  
   134  #### CometBFT Homogeneous network
   135  
   136  The results for the homogeneous network and the baseline are similar in terms of outstanding transactions.
   137  
   138  ![mempool-cumulative-homogeneous](img34/homogeneous/mempool_size.png)
   139  
   140  ![mempool-avg-homogeneous](img34/homogeneous/avg_mempool_size.png)
   141  
   142  #### 1/2 Tendermint Core - 1/2 CometBFT
   143  
   144  ![mempool size](img34/cmt1tm1/mempool_size.png)
   145  
   146  ![average mempool size](img34/cmt1tm1/avg_mempool_size.png)
   147  
   148  #### 1/3 Tendermint Core - 2/3 CometBFT
   149  
   150  ![mempool size](img34/cmt2tm1/mempool_size.png)
   151  
   152  ![average mempool size](img34/cmt2tm1/avg_mempool_size.png)
   153  
   154  #### 2/3 Tendermint Core - 1/3 CometBFT
   155  
   156  ![mempool_tm2_3_cmt_1_3](img34/v034_200node_tm2cmt1/mempool_size.png)
   157  
   158  ![mempool-avg_tm2_3_cmt_1_3](img34/v034_200node_tm2cmt1/avg_mempool_size.png)
   159  
   160  ### Consensus Rounds per Height
   161  
   162  The following graphs show the rounds needed to complete each height and agree on a block.
   163  
   164  A value of `0` shows that only one round was required (with id `0`), and a value of `1` shows that two rounds were required.
   165  
   166  #### Baseline
   167  We can see that round 1 is reached with a certain frequency.
   168  
   169  ![rounds](img34/baseline/rounds.png)
   170  
   171  #### CometBFT Homogeneous network
   172  
   173  Most heights finished in round 0, some nodes needed to advance to round 1 at various moments,
   174  and a few nodes even needed to advance to round 2 at one point.
   175  This coincides with the time at which we observed the biggest peak in mempool size
   176  on the corresponding plot, shown above.
   177  
   178  ![rounds-homogeneous](img34/homogeneous/rounds.png)
   179  
   180  #### 1/2 Tendermint Core - 1/2 CometBFT
   181  
   182  ![peers](img34/cmt1tm1/rounds.png)
   183  
   184  #### 1/3 Tendermint Core - 2/3 CometBFT
   185  
   186  ![peers](img34/cmt2tm1/rounds.png)
   187  
   188  #### 2/3 Tendermint Core - 1/3 CometBFT
   189  
   190  ![rounds-tm2_3_cmt1_3](img34/v034_200node_tm2cmt1/rounds.png)
   191  
   192  ### Peers
   193  
   194  The following plots show how many peers a node had throughtout the experiment.
   195  
   196  The thick red dashed line represents the moving average over a sliding window of 20 seconds.
   197  
   198  #### Baseline
   199  
   200  The following graph shows the that the number of peers was stable throughout the experiment.
   201  Seed nodes typically have a higher number of peers.
   202  The fact that non-seed nodes reach more than 50 peers is due to
   203  [#9548](https://github.com/tendermint/tendermint/issues/9548).
   204  
   205  ![peers](img34/baseline/peers.png)
   206  
   207  #### CometBFT Homogeneous network
   208  
   209  The results for the homogeneous network are very similar to the baseline.
   210  The only difference being that the seed nodes seem to loose peers in the middle of the experiment.
   211  However this cannot be attributed to the differences in the code, which are mainly rebranding.
   212  
   213  ![peers-homogeneous](img34/homogeneous/peers.png)
   214  
   215  #### 1/2 Tendermint Core - 1/2 CometBFT
   216  
   217  ![peers](img34/cmt1tm1/peers.png)
   218  
   219  #### 1/3 Tendermint Core - 2/3 CometBFT
   220  
   221  ![peers](img34/cmt2tm1/peers.png)
   222  
   223  #### 2/3 Tendermint Core - 1/3 CometBFT
   224  
   225  As in the homogeneous case, there is some variation in the number of peers for some nodes.
   226  These, however, do not affect the average.
   227  
   228  ![peers-tm2_3_cmt1_3](img34/v034_200node_tm2cmt1/peers.png)
   229  
   230  ### Blocks Produced per Minute, Transactions Processed per Minute
   231  
   232  The following plot show the rate of block production and the rate of transactions delivered, throughout the experiments.
   233  
   234  In both graphs, rates are calculated over a sliding window of 20 seconds.
   235  The thick red dashed line show the rates' moving averages.
   236  
   237  #### Baseline
   238  
   239  The average number of blocks/minute oscilate between 10 and 40.
   240  
   241  ![heights](img34/baseline/block_rate_regular.png)
   242  
   243  The number of transactions/minute tops around 30k.
   244  
   245  ![total-txs](img34/baseline/total_txs_rate_regular.png)
   246  
   247  
   248  #### CometBFT Homogeneous network
   249  
   250  The plot showing the block production rate shows that the rate oscillates around 20 blocks/minute,
   251  mostly within the same range as the baseline.
   252  
   253  ![heights-homogeneous-rate](img34/homogeneous/block_rate_regular.png)
   254  
   255  The plot showing the transaction rate shows the rate stays around 20000 transactions per minute,
   256  also topping around 30k.
   257  
   258  ![txs-homogeneous-rate](img34/homogeneous/total_txs_rate_regular.png)
   259  
   260  #### 1/2 Tendermint Core - 1/2 CometBFT
   261  
   262  ![height rate](img34/cmt1tm1/block_rate_regular.png)
   263  
   264  ![transaction rate](img34/cmt1tm1/total_txs_rate_regular.png)
   265  
   266  #### 1/3 Tendermint Core - 2/3 CometBFT
   267  
   268  ![height rate](img34/cmt2tm1/block_rate_regular.png)
   269  
   270  ![transaction rate](img34/cmt2tm1/total_txs_rate_regular.png)
   271  
   272  #### 2/3 Tendermint Core - 1/3 CometBFT
   273  
   274  ![height rate](img34/v034_200node_tm2cmt1/block_rate_regular.png)
   275  
   276  ![transaction rate](img34/v034_200node_tm2cmt1/total_txs_rate_regular.png)
   277  
   278  ### Memory Resident Set Size
   279  
   280  The following graphs show the Resident Set Size (RSS) of all monitored processes and the average value.
   281  
   282  #### Baseline
   283  
   284  ![rss](img34/baseline/memory.png)
   285  
   286  ![rss-avg](img34/baseline/avg_memory.png)
   287  
   288  #### CometBFT Homogeneous network
   289  
   290  This is the plot for the homogeneous network, which is slightly more stable than the baseline over
   291  the time of the experiment.
   292  
   293  ![rss-homogeneous](img34/homogeneous/memory.png)
   294  
   295  And this is the average plot. It oscillates around 560 MiB, which is noticeably lower than the baseline.
   296  
   297  ![rss-avg-homogeneous](img34/homogeneous/avg_memory.png)
   298  
   299  #### 1/2 Tendermint Core - 1/2 CometBFT
   300  
   301  ![rss](img34/cmt1tm1/memory.png)
   302  
   303  ![rss average](img34/cmt1tm1/avg_memory.png)
   304  
   305  #### 1/3 Tendermint Core - 2/3 CometBFT
   306  
   307  ![rss](img34/cmt2tm1/memory.png)
   308  
   309  ![rss average](img34/cmt2tm1/avg_memory.png)
   310  
   311  #### 2/3 Tendermint Core - 1/3 CometBFT
   312  
   313  ![rss](img34/v034_200node_tm2cmt1/memory.png)
   314  
   315  ![rss average](img34/v034_200node_tm2cmt1/avg_memory.png)
   316  
   317  ### CPU utilization
   318  
   319  The following graphs show the `load1` of nodes, as typically shown in the first line of the Unix `top`
   320  command, and their average value.
   321  
   322  #### Baseline
   323  
   324  ![load1](img34/baseline/cpu.png)
   325  
   326  ![load1-avg](img34/baseline/avg_cpu.png)
   327  
   328  #### CometBFT Homogeneous network
   329  
   330  The load in the homogenous network is, similarly to the baseline case, below 5 and, therefore, normal.
   331  
   332  ![load1-homogeneous](img34/homogeneous/cpu.png)
   333  
   334  As expected, the average plot also looks similar.
   335  
   336  ![load1-homogeneous-avg](img34/homogeneous/avg_cpu.png)
   337  
   338  #### 1/2 Tendermint Core - 1/2 CometBFT
   339  
   340  ![load1](img34/cmt1tm1/cpu.png)
   341  
   342  ![average load1](img34/cmt1tm1/avg_cpu.png)
   343  
   344  #### 1/3 Tendermint Core - 2/3 CometBFT
   345  
   346  ![load1](img34/cmt2tm1/cpu.png)
   347  
   348  ![average load1](img34/cmt2tm1/avg_cpu.png)
   349  
   350  #### 2/3 Tendermint Core - 1/3 CometBFT
   351  
   352  ![load1](img34/v034_200node_tm2cmt1/cpu.png)
   353  
   354  ![average load1](img34/v034_200node_tm2cmt1/avg_cpu.png)
   355  
   356  ## Test Results
   357  
   358  The comparison of the baseline results and the homogeneous case show that both scenarios had similar numbers and are therefore equivalent.
   359  
   360  The mixed nodes cases show that networks operate normally with a mix of compatible Tendermint Core and CometBFT versions.
   361  Although not the main goal, a comparison of metric numbers with the homogenous case and the baseline scenarios show similar results and therefore we can conclude that mixing compatible Tendermint Core and CometBFT introduces not performance degradation.
   362  
   363  A conclusion of these tests is shown in the following table, along with the commit versions used in the experiments.
   364  
   365  | Scenario | Date | Version | Result |
   366  |--|--|--|--|
   367  |CometBFT Homogeneous network | 2023-02-08 | 3b783434f26b0e87994e6a77c5411927aad9ce3f | Pass
   368  |1/2 Tendermint Core <br> 1/2 CometBFT | 2023-02-14 | CometBFT: 3b783434f26b0e87994e6a77c5411927aad9ce3f <br>Tendermint Core: 66c2cb63416e66bff08e11f9088e21a0ed142790 | Pass|
   369  |1/3 Tendermint Core <br> 2/3 CometBFT | 2023-02-08 | CometBFT: 3b783434f26b0e87994e6a77c5411927aad9ce3f <br>Tendermint Core: 66c2cb63416e66bff08e11f9088e21a0ed142790 | Pass|
   370  |2/3 Tendermint Core <br> 1/3 CometBFT | 2023-02-08 | CometBFT: 3b783434f26b0e87994e6a77c5411927aad9ce3f <br>Tendermint Core: 66c2cb63416e66bff08e11f9088e21a0ed142790  | Pass |