1.3.6 Time Synchronization

In order to enforce the expiration of records, each node in the graph has a synchronized view of time. To accomplish this, the Peer-to-Peer Graphing Protocol implements the concept of peer time. Peer time is initialized to UTC when a graph is created, and moves at approximately the same rate. For more information, see section 3.1.5.2.2.

When the graph is created, the peer time is set to UTC as seen by the creator of the graph. When a node first connects to the graph, it sets its peer time to be the peer time as seen by the remote node (that is, the node to which it is connected). When an active node makes a connection to an additional node, it sets its peer time to a weighted average of its current peer time and the peer time received from its new neighbor. In this way, the peer time of all nodes is consistently averaged together, keeping them close in value.

Note that this averaging does allow peer time to move backward by small amounts on occasion.

peer time is measured as the number of 100s of nanosecond intervals since Jan. 1, 1601 and expressed in UTC format.