github.com/badrootd/celestia-core@v0.0.0-20240305091328-aa4207a4b25d/docs/qa/v034/README.md (about)

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