Experiment on block chain with temperature and humidity data

category: Pc
tags: Sensor

On the rooftop of the university, an RTK reference station and microcomputers (Raspberry Pi and BeagleBone) are installed and various experiments are carried out. This time, we conducted an experiment to share information on the rooftop temperature and humidity sensor to multiple PCs by using the sample program of the released block chain. This program is written in the language Go, and it can be modified relatively easily. I am grateful to the author who published the sample program.

A block chain is a technology that various computers share the same information by communicating each other, the communication is referred to as P2P (Point-to-Point) communication. When new data is arrived, the computers compete calculating hash each other. There is the condition that the hash obtained is correct (for example, the head of the hash are arranged by several zeros). The competitions among computers is to quickly obtain the the correct answer. Since this correct answer can be verified easily, it is difficult to insert false data to the block chain. This ensure the correctness of the stored data.

Experiment of Block chain

When the sensor acquired the information, these microcomputers competed for searching hash values. In this case, the left side microcomputer found the correct answer of zero 2 digits at the head in calculation of the 43th hash value. In this case, calculation of the hash value is performed up to 60 times and it is set to give up if the correct answer is not found, so the microcomputer on the right side failed “mining” and decided to adopt the information on the left side microcomputer.

If some information is missing at a microcomputer, they hold the same information in all the microcomputers at the end. If one attempted to insert a false data to the block chain, it was found that contradiction occurred in the hash value and it could not be added. Actually trying out, I understood well what the block chain is.