Skip to content

lib_shell: Factorize the timestamp drifting check

For synchronization issues, the shell accepts blocks which are not too far away in the future (about 15s). We propose in this MR to factorize the use of this constant in a new module Constants.ml. We also factorize the function soon which is actually used three times.

The use of this constant can be checked with rgrep "15" *.ml on the files of the Tezos directory and especially the ones of lib_shell.

This MR is in conflict with !2083 (merged). I suggest that !2083 (merged) should be merged first.

Further discussion for reviewing:

  • This check is not done when a node is baked locally (this was changed in the second commit of this MR)
  • I have used rgrep to check everytime the check was done. But did I missed any occurrences?
  • I introduced a new module called Clock_drift, but maybe I could already used one existing module?

Suggested reviewers

@vbotbol @bidinger @romain.nl

Edited by François Thiré

Merge request reports