I am currently researching transaction characterization on Algorand. I have collected data on block speed times over the course of several days which the average is about 3.3 seconds. However, there are some outlier blocks that have been created in less than 3 seconds, (1, 2, or even 0 seconds). I am curious about the nature of these outliers. Could they be the result of data errors, time-stamping errors, or is it genuinely possible for a block to be created in less than 3 seconds? If it is indeed possible, what factors may contribute to the faster creation of these blocks compared to others?
It looks like you’re using the timestamp in each block to work this out. The timestamp is only in whole seconds, so it’s not precise enough to tell you if a block was proposed in 3.5 seconds. Additionally the timestamps are set by the block proposer, but must meet certain criteria. It can be no lower than the previous block’s timestamp, and it can be no more than 25 seconds beyond it. I would also imagine that each computer in the network is likely going to have its own clock skew compared to one another despite NTPs best efforts, so trusting the timestamp as being 100% accurate can’t be guaranteed.
Thank you! You are saying that these outlier block speeds are because of the difference between block proposers’ clocks, so are not real. Another question in this regard, do you have any idea on how I can obtain precise block speeds in a more accurate format, such as a block speed of 3.4 seconds? If I were to consider the timestamp of the block proposer as the confirmation time, do you know if there’s an API request available on the Algorand Mainnet or Testnet that could provide the exact time when a transaction is created by a user or received by the proposer?
There isn’t really any way to know the exact time. Since the blocks will always take some amount of time to propagate across the network, and each proposer may be from anywhere. So you can only really time the duration between blocks that your own node receives. Maybe if you setup multiple nodes all across the world and average the time between blocks as they each receive them you could get a more accurate representation, but it’s not going to be far from 3.4 seconds at the time of writing.
Image taken from: Metrika