Check that an operation with the given op_round
, at level op_level
is likely to be correct, meaning it could have been produced before now (+ the safety margin from configuration).
Given an operation at level greater or equal than/to the current level, we compute the expected timestamp of the operation's round. If the operation is at a greater level, we assume that it is based on the proposal at round zero of the current level.
All operations whose (level, round) is lower than or equal to the current head are deemed valid. Note that in case where their is a high drift in the computer clock, they might not have been considered valid by comparing their expected timestamp to the clock.
This is a stricter than necessary filter as it will reject operations that could be valid in the current timeframe if the proposal they endorse is built over a predecessor of the current proposal that would be of lower round than the current one.
What can we do that would be smarter: get current head's predecessor round and timestamp to compute the timestamp t0 of a predecessor that would have been proposed at round 0.
Timestamp of round at current level for an alternative head that would be based on such proposal would be computed based on t0. For level higher than current head, compute the round's earliest timestamp if all proposal passed at round 0 starting from t0.