Max processing time in a transaction


In the apply section of a transaction, how long could that process take before becoming problematic? (in a chain with standard 101 DPOS).

For example if I perform complex actions based on the users assets in a transaction, like an analysis that takes 75ms would that be ok? And what if it takes 600ms?

Is there any recommendation?


Currently SDK don’t have good tool to measure that, and it is difficult to accurately calculate the time.
There are multiple factor to decide if is sufficient or not.

Main factors are

  • block time
  • block size
  • transaction size
  • Safety ratio
  • Max transaction execution time

block time / safety ratio > (block size / transaction size) * max transaction execution time

where safety ratio should be around greater than 10 but it also depends on the network size

I would be nice to have the calculation tool in the SDK in the future.