threefoldtech / minting_v3

minting code for grid v3, using v3 tokenomics
Apache License 2.0
0 stars 0 forks source link

Detect clock skew over long time #25

Closed LeeSmet closed 1 year ago

LeeSmet commented 1 year ago

The current code only detects low/high uptime if this is spotted in 2 consecutive pings, but if skew is built up over a long period of time, this is currently not handled. We still want to try and detect this though. A possible solution would be to track the original reported boot time, and verify every uptime report against this boot time, also checking that difference in boot time reported is not more than 1 minute (to allow for chain skew). Although over this lengthy period is might be better to take 2 minutes into account (the maximum allowed skew if we go from one extreme to the other). It should be noted that the boot time must be reset after every reboot.