Polygon Block Performance
Methods:
What was the maximum and minimum recorded time between two blocks? How many transactions are done in a block on average?
>
> To understand this, we create a query using the table polygon.core.fact_blocks and the columns block_number, block_timestamp, TX_COUNT, and the functions datediff, min, avg, and max.
>
> First, to get the maximum and minimum recorded time between two blocks, we use the block_number and block_timestamp columns and the datediff function and calculate the minimum, maximum and average of time_block .
>
> with PBlock as (SELECT
>
> block_number,
>
> block_timestamp,
>
> datediff(second, lag(block_timestamp,1,block_timestamp) over (order by block_number), block_timestamp) as time_block
>
> from polygon.core.fact_blocks group by 1,2 order by 1 )
>
> SELECT 'Polygon' as chain, min(time_block) as "min time", avg(time_block) as "average time", max(time_block) as "max time", FROM PBlock
>
> And finally, by using SELECT block_number, lag(TX_COUNT,1,TX_COUNT) over(ORDER BY BLOCK_NUMBER) as tx_block
and by calculating average of tx_block, we get the average number of transactions done in each block.
>
>
>
> You can see the related query below:
Conclusion:
>
> By comparing the results, we find that the maximum time recorded between both blocks in Polygon after Optimism is less than the others and the average number of tx done in one block in Polygon after Solana is higher than other blockchains. Also, in Solana, the average time between two blocks is less than other blockchains, and the average number of transactions per block is more than the others.
>
>
> max time: 1.Arbitrum 2.Solana 3.Flow 4.Polygon 5.Optimism
>
>
> average tx number : 1.Solana 2.Polygon 3.Flow 4.Arbitrum 5.Optimism
How do these numbers compare to L1 such as Flow or Solana, or other L2 such as Arbitrum or Optimism?
>
> To understand this ĜAccording to the previous steps, we obtain the results for Solana, Flow , Arbitrum , and Optimism, and finally we compare them with each other.
>
>
>
> You can see the related queries below:
We used the following tables for this bounty :
- polygon.core.fact_blocks
- flow.core.fact_blocks
- solana.core.fact_blocks
- arbitrum.core.fact_blocks
- optimism.core.fact_blocks