Marzullo’s algorithm, invented by Keith Marzullo for his Ph.D. dissertation in 1984, is an
agreement algorithm used to select sources for estimating accurate time from a number of noisy
time sources. NTP uses a modified form of this called the Intersection algorithm, which returns
a larger interval for further statistical sampling. However, here we want the smallest interval.
Here is a description of the algorithm:
https://en.wikipedia.org/wiki/Marzullo%27s_algorithm#Method
This is a port of the TigerBeetle implementation done mainly by Joran Dirk Greef (https://github.com/jorangreef) and King Protty (https://github.com/kprotty):
see it here https://github.com/tigerbeetle/tigerbeetle/blob/main/src/vsr/marzullo