I've seen that currently max gas per block is 8 million, but what should be the maximum that one solidity function spends to make sure that it is included without delay in a block
Also, to prevent excessive gas, should for each loops be avoided?
Thanks