Polygon Block Performance
Our method In this bounty, as mentioned in the question, we take a look at the number of transactions and the life of the blocks. First of all, it is necessary to note that sometimes we encountered the number 0. Both in counting the number of transactions and in calculating the life of blocks. And because we could not show zero in the graph later, we were forced to add a small amount to the obtained results so that the graphs look neat and tidy. So this small value, which is shown by epsilon, has more of a presentational and formal aspect and lacks mathematical and computational value.
Description of the blue and red graphs: In each of the above graphs, we have measured and displayed the performance of the blocks with three criteria. In the blue graph, we have shown the number of transactions in terms of the lowest number, the highest number, and the average number, and we can see the same three metrics in the red graph. It should be noted that in this diagram, the life of each block is calculated in seconds.
All in all, some of the numbers in these charts look a bit strange and may create the uncertainty that the chosen method is wrong. But if you study the SQL codes, you will see that they are not so complicated and the only part that seems a little advanced is
DateDiff(second,lag(block_timestamp,1) OVER (ORDER BY block_number),block_timestamp) as AGE.
In fact, here we have tried to consider the start time of each block as the end time of the previous block and by calculating the difference between the two, we get the block life. Sometimes, when the blocks were produced quickly, these times were even equal to the value of seconds, and it caused the lifetime of a block to be 0, and we have solved this problem by adding epsilon. Only in polygon, the minimum time has a non-zero value. The blue graph also shows a strange issue. For optimism, all three values equal to 1 have been obtained, which means that in each block, 1 and exactly 1 transaction has been done, and the variance of the number of transactions is equal to zero, which of course seems very strange. In our opinion, this is a problem caused by the method of gathering information for the tables. Because if our method had a problem, other blockchains should have faced a similar problem, and this has not happened yet.
Conclusion:
-
Compared to other blockchains, on average, it takes more time to generate a block from the polygon network. Something more than 2 seconds.
-
The longest block life has occurred for one of the Flow network blocks, that is about 53k seconds, which is a very long time.
-
Both in terms of the average number of transactions in blocks and in terms of the largest number of transactions in a block, polygon ranks second after Solana. Of course, the rate of failure in performing transactions on the Solana platform is a very large number and shows that Solana is undesirable from this point of view. But we have not added this analysis to our dashboard.