cloudflare/roughtime

Client robustness to misbehaving server

wbl opened this issue ยท 3 comments

wbl commented

Right now if a server misbehaves it can lead to the client averaging in the cheating offset, leading to high offsets.

What we should do instead is is validate the server responses first, store the offsets, then find the majority region and report any cheaters that are impeachable.

Perhaps clients should use the median time instead? That would mitigate the immediate problem if just one server misbehaves.

Honestly I'm just laughing so hard right now that anyone could think that averaging would be the right way!
Yep agree with @ChosunOne median would be the way to make it much more robust.

For some context which not everyone might be aware of, the biggest client supporting the ethereum 2 phase 0 Medalla testnet implemented roughtime which broke hilariously a few days ago. The entire testnet basically broke down because one of the six roughtime servers (ticktock.mixmin.net) returned an incorrect date. The roughtime client then averages the responses and concluded the time had shifted +4 hours