How is date/time managed across the network

I have a couple of time-dependent scenarios, and am trying to understand a bit about how correct time-values are assured across the network.

How is time calculated when creating a new block, and secondly when referenced within EVM code processing? Can it be maliciously manipulated in either case?

Could a malicious node trigger a time-dependent state change by adjusting local node time settings? What is the best way to ensure a state change or event trigger within contract data occurs at a given point in time?

A couple of examples to illustrate the kind of scenarios I am considering:

1. Contract rule: send all money to Bob at 12:00 on the 1st Jan 2020.

2. If [Contract_Storage_expiry date/time] is greater than [current date/time] AND [Contract_eventfeed_value1] equals X then send money to Bob, else do nothing.

Thoughts appreciated!

Comments

  • dlehenkydlehenky Member Posts: 2,249 ✭✭✭✭
    I don't know if this really answers your question, in particular regarding malicious tampering, but all nodes in the network are "expected" to be setting their system time from a reference source, like your country's official time reference. Here in the USA, that would be NIST or other sources that feed off of it. With linux systems, you simply use the 'ntpd' Network Time Protocol daemon to do this automatically. I have no idea how you set it up for Windows, but I'm sure there is a OS mechanism for doing the same thing. With that done, the network nodes are all seeing the same "time", automatically adjusted for time zone, seasonal time changes, etc..

    -Best Care
    David
Sign In or Register to comment.