How does the GPS network time server make the integrated system work in coordination?


How does the GPS network time server make the integrated system work in coordination?

How does the GPS network time server make the integrated system work in coordination?

Jingzhun electronic technology official wechat – ahjzsz

This paper mainly explains the important function of blockchain: proof of work. It mainly explains that work proof is an important feature and necessary for blockchain; Other frequently mentioned features (such as security) in the blockchain are secondary, useful but not necessary.

The explanation of this paper is mainly based on some interesting features proved by blockchain work. These features are not obvious, sometimes even contrary to intuition. For example, blockchain participants can solve problems together without communication.


After understanding these characteristics, it should be easy to conclude that the work proof is mainly to complete the distributed or decentralized time mechanism (such as clock).


Please note that this article is not about the explanation of the proof of work itself, it just explains how the blockchain uses it. If you don’t know about proof of work, this link may be a good start.


Time sequencing of decentralized ledger


Before further describing the explanation, let’s focus on this problem, that is, the time sequencing problem. Much of the literature on proof of work is confusing because they always try to explain the results of the problem rather than determine the problem itself first.


Any ledger absolutely needs order. A man cannot spend money he has not received, nor can he spend money he has spent. Blockchain transactions (or blockchain transactions) must be in a clear order and do not require a trusted third party to coordinate the order.


Even if the blockchain is not a ledger, but just some kind of data such as sequential log, the order is also necessary for each node to have the same blockchain replica. Different order of blockchains means different blockchains.


However, what if transactions are generated by anonymous participants around the world, and there is no centralized organization responsible for the sequencing of transactions, but the fact requires a sequencing? Although a transaction (or block) may include timestamps, how can these timestamps be trusted?


Time is only a human concept. The weighing instrument of time, such as an atomic clock, is a “trusted third party” for people. However, due to the influence of network delay and time relativity, it is impossible to determine the sequence of events by time stamp in decentralized system.


The “time” we are interested in is not the time concept we are used to, such as year, month, day and so on. What we need is a mechanism through which we can verify that one event occurs before another or may occur at the same time. (banq note: sequence of events)


First of all, we need to establish a time point for the concepts of what is before and what is after. Establishing a time point at first seems theoretically impossible because there is not enough accurate technology to measure Planck time. But as you can see, bitcoin solves this problem by creating its own time concept. At this time point, it is actually possible to determine the exact time point.


Leslie Lamport described this problem well in his 1978 paper “time, clock and event sequence in distributed systems”. In addition to “correctly synchronized physical clock”, this paper does not actually provide a comprehensive solution. In 1982, Lamport also described the “Byzantine general problem”, and Satoshi explained in his first email how the work proved to solve the problem, Because the bitcoin file points out that “to implement a distributed timestamp server on a peer-to-peer network, we will need to use a proof of work system”, which indicates that proof of work is mainly to solve the timestamp problem.


Time is the fundamental problem


It must be emphasized that it is impossible to associate events with time points in distributed systems, which is an unsolved problem. Decentralized ledger can not be realized until Nakamoto invented blockchain and proved this solution. Blockchain has many other technical details, but time selection is fundamental and important. No time, no blockchain.



Work certificate


In short, the work of blockchain proves to be a SHA-2 hash value that meets certain requirements, which is very difficult to find. The difficulty is that the hash is smaller than a specific number. The smaller the number, the rarer the input value, and the more difficult it is to find it.


It is called “proof of work” because it is known that values with such hashes are very rare, which means that finding such values requires a lot of trial and error, namely “work”. In turn, this means “time”.


By changing the requirements, we can change the difficulty and thus the possibility of discovering this hash. Bitcoin difficulty is dynamically adjusted so that a correct hash value can be found every ten minutes.


Nothing happens between blocks


The state of a blockchain is reflected by its blocks, and each new block will produce a new state. The distance that the blockchain state moves forward one block at a time, and a block takes an average of 10 minutes, which is the minimum measure of blockchain time.


Sha is memoryless without memory and progress free without progress


The secure hash algorithm is memoryless in statistics and probability. This is a particularly counterintuitive concept for us humans.


The best example of no memory is a coin toss. If a coin appears on the same side 10 times in a row, does this mean that the next flip is more likely to be the opposite side? Our intuition says yes, but in fact, every throw is a 50 / 50 chance, no matter how many coincidences have happened before.


No memory is needed for progress free without progress. No process means that as miners try to solve the problem of iterating over random numbers to find the hash value (solution) of the next block, each attempt is an independent event, and the probability of finding a solution in each attempt is unchanged no matter how much work has been done in the past. In other words, in each attempt, participants did not get closer to the solution or made any progress. A miner who has been looking for a hash value for a year is no more likely to find a hash value on his next attempt than a miner who has just opened a mine.


Therefore, the probability of finding a given solution (hash value) in a given time period is only determined by the speed at which all participants iterate in the hash. Not previous history, not data, just hash rate.


The hash rate, in turn, is a function of the number of participants and the speed of the device used to calculate the hash.


Sha input is irrelevant


In the bitcoin blockchain, the input is the block header. But if we only give it a random value, the probability of finding a consistent hash is still the same. Whether the input is a valid block header or a byte from / dev / random, it takes an average of 10 minutes to find the hash value of the next block.


Of course, if you find a qualified hash, but your input is not a valid block, such a solution cannot be added to the blockchain, but it is still workload verification (although useless).


The difficulty is the Milky way


It means that across the universe, it means strange. We can ask the miners on Mars to help find it. They don’t need to communicate with the miners on earth. The key is to find the answer every 10 minutes. Well, they need to tell the earthlings in some way whether they have solved the problem, otherwise we will never know.


It is worth noting that there is no real communication between distant participants, because they solve the same statistical problems together, but they don’t even know each other’s existence.


Although this “universality” looks magical at first, it is actually easy to explain. I use the word “universal” because it uses one word to describe it, but it does mean “everyone knows”.


The input of SHA-256 can be considered as an integer between the 256 square of 0 and 2 (because the output is 32 bytes, that is, between the 256 square of 0 and 2, any larger value can be guaranteed, such as redundancy). Even if it is very large (much larger than the number of atoms in the perceptible universe), it is a set of numbers that every participant knows that participants can only choose from this set of data.


If the input set is well known, the function (SHA-256) is well known, and the difficulty requirements are well known, the possibility of finding a solution is indeed “universal”.


Trying Sha will make you a participant


If the problem is to find a matching hash value, you only need to try once, and bingo, you have also affected the global hash rate, and you are a participant in that attempt to help others solve the problem. You don’t need to tell others that you did it (unless you really found a solution), others don’t need to know it, but your attempt did affect the result. For the whole universe, no less.


If the above situation is still in doubt, a good analogy may be the problem of finding large prime numbers. It is difficult to find the largest prime number. Once found, it becomes “discovered” or “known”. There are countless prime numbers, but there is only one instance of each number in the universe. Therefore, people trying to find the maximum prime are studying the same problem. You don’t need to tell anyone that you’ve decided to find the maximum prime, you just need to publish it when you find one. If no one finds the largest prime, it will never be found. Therefore, as long as the final discovery (if found) is published, the participants (i.e. trying to find one), even if it is completely confidential, still affect the results.


Think about this incredible statistical phenomenon, that is, any participant will affect the result even if it is completely confidential, even if it is not successful, which is why Nakamoto’s invention is so brilliant.


It is worth noting that since finding Sha is a conceptual problem without progress, each attempt can be regarded as a participant trying to join and leave immediately. Therefore, miners join and leave 50 times per second.


Participation is a statistical display


The global hash rate listed on many websites is not because every miner is registered in some “miner registration office”. They report the hash rate regularly. But there is no such thing.


The hash rate is known because, on average, many of these attempts (21 of 10 at the time of writing) must be implemented by someone somewhere for finding a solution of a particular difficulty in 10 minutes.


We don’t know who these participants are. They never announce that they are working. The people who haven’t found a solution (in fact, they are) don’t tell anyone that they are working. Their location may be anywhere in the universe, but we know for sure that they exist. Because the problem needs to continue to be solved (the hash value needs to be found).


Work is a clock


The key to the problem is that the difficulty of finding a consistent hash is like a clock. If you like, a universal clock. Because there is only one such clock in the universe, nothing can be synchronized. Anyone can “see” it.


It doesn’t matter that the clock is inaccurate. Importantly, this is the same clock for everyone, and the state of the blockchain can be unambiguously linked to the ticking sound of the clock.


This clock is operated by multiple efficiencies of an unknown number of collective participants all over the world, completely independent of each other.


The last part of the puzzle


The solution must be the hash of the block (exactly the block header). As we mentioned, input is not important, but if it is an actual block, it occurs at the tick of our working time check clock whenever a solution is found. Not before or after it, but just at the moment of ticking. We know this unambiguously because the block is part of the mechanism.


In other words, if the block is not input to the sha256 function, we will still have a distributed clock, but we can’t connect the block with the tick of the clock. Using blocks as input solves this problem.


It is worth noting that our work proves that the clock only provides us with tick timing. There is no way to judge the order from the tick, which is the purpose of Merkle tree.


How about distributed consensus?


Consensus means agreement. All participants can only agree on the ticking of the clock and have no choice but to reach a consensus. In addition, everyone knows ticking and additional data. In fact, as Nakamoto explained in the email quoted earlier, this does solve the Byzantine general problem.


In a rare but common case, two consecutive ticks are associated with a block and conflict. This conflict is resolved by what block is associated with the next tick, making one of the controversial blocks an “orphan”. How the blockchain continues is an accident, so it may also be indirectly attributed to the working time clock.


this is it


This is the work done for blockchain. This is not a “miner”. The miner is the right to solve the problem, and it is not to turn real energy into a valuable concept, but all red herring.


For example, the reward of winning the prize for miners is the reason to encourage miners to participate, but this is not the reason to make blockchain possible. A block is a Merkle tree, but it has nothing to do with proof of work. It encrypts the records of block sorting. The Merkle tree also makes the previous tick “more certain”, “more undeniable” or simpler.


Workload proof is also a mechanism that blocks are actually immutable. This is a good side effect, which can make isolated witness possible, but it can also be completed by retaining signatures (witnesses), so this is also secondary.




The work of bitcoin blockchain proves that it is only a distributed and decentralized clock.


If you understand this explanation, you should better grasp the comparison between proof of work and proof of stake, and it is obvious that the two are not comparable: proof of interest is about (random distributed) permissions, and proof of work is a clock.


In the context of blockchain, proof of work may be a misuse. This term is the legacy of the hashcash project, and it is indeed used to prove the work. In blockchain, it is mainly about verifiable time-consuming. When people find a hash value that meets the difficulty, they find that it takes some time. The way to complete this time is “work”. Hashing is interesting because it is a proof of time.


The fact that work has proved to be entirely about time rather than work also suggests that other similar statistical challenges may exist, which are time-consuming and labor-consuming. This may also mean that the bitcoin hash rate is too high, and the bitcoin clock described above can run reliably on a small part of the hash rate, but the hash rate is an incentive structure to stimulate energy consumption.


If you find a way to reduce the time-consuming of your work, you will have a trillion dollar problem. Please let me know!