LDecentralization is one of the fundamental aspects of technology blockchain And of course, that implies that anyone, from any part of the world, can be added to the network and can operate in it. This in turn causes, that there is no universal time code. This is because we can connect from any time zone. The timestamp is a timestamp, which is calculated according to different parameters.
The temporal parameter, or timestamp, is based on an instantaneous adjustment that uses a median of the timestamps returned by all nodes of the network. This is due to the decentralized form of it, and seeks to keep the nodes of the network as well synchronized as possible.
We must also bear in mind that the timestamps of the blocks are not exact. This is because they do not necessarily have to be in order. However, they still offer a relative precision of between one and two hours, which gives a margin of validity. Basically, all the nodes are connected to the same time slot. For this, the reference is taken UTC-0 (London local time), where UTC It's in Spanish Coordinated Universal Time. From this, the network nodes coordinate the time in which they work. Now, after storing this data, the local node calculates the displacement time between the UTC strip and the local time.
This makes an adjustment between the time of the local node with the displacement of all the nodes that are connected to the network. This allows the network time to be adjusted constantly. This avoids manipulation and usually does with slight time variations with respect to the time slot. This is done in this way, because there may be many hourly rates and repetitions and other problems could occur. Therefore, a universal timestamp creation system was developed for all nodes. This system takes into account the jet lag that could exist between the nodes.
Implementing a timestamp makes the block it is impossible to be repeated in the future, since in addition to the time, the date of creation of the block is also stored, therefore, there is no possibility that it will be repeated hash that happened a week, two months ago, or a year ago.
What is blockchain timestamp used for?
One of the main uses of timestamp is to establish the parameters of the process of mining is.. This is because these timestamps allow nodes to correctly adjust the mining difficulty to be used for each block generation period. Timestamps help the network determine how long it takes to extract blocks for a certain period, and from there adjust the mining difficulty parameter.
This of course can open the door for miners to manipulate time in order to lessen the difficulty. Nevertheless, Satoshi Nakamoto he foresaw this and programmed the network so that nodes ignore blocks that are outside a certain time range based on their own internal clock time. As a result, if a miner tried to do this, he would lose all his mining work.
On the other hand, in whitepaper From Bitcoin, Nakamoto explains that another functionality of the timestamp is to create a mechanism to avoid double spending. In this regard, Nakamoto wrote the following:
For our purposes, the last transaction is what counts, so we won't mind other subsequent double-spending attempts.