Position: Home page » Blockchain » Blockchain Shuanghua

Blockchain Shuanghua

Publish: 2021-03-27 23:23:34
1. Introction to seven core technologies of blockchain operation on January 15, 2018
1. Blockchain links
as the name suggests, blockchain is a chain composed of blocks. Each block is divided into block head and block body (including transaction data). The block head includes the prevhash value (also known as hash value) of the previous block used to realize the block link and the random number (nonce) used to calculate the mining difficulty. The hash value of the previous block is actually the hash value of the head of the previous block, and the random number calculation rule determines which miner can obtain the right to record the block
2. Consensus mechanism
blockchain is accompanied by the birth of bitcoin, which is the basic technology architecture of bitcoin. Blockchain can be understood as an Internet-based decentralized accounting system. A decentralized digital currency system like bitcoin requires the consistency of accounting of honest nodes without a central node, which needs blockchain to complete. Therefore, the core of blockchain technology is a consensus mechanism to reach a consensus on the legitimacy of transactions between indivials without mutual trust without central control
there are four main types of consensus mechanisms in blockchain: pow, POS, dpos and distributed consistency algorithm
3. Unlocking script
script is an important technology to realize automatic verification and contract execution on blockchain. Every output of every transaction does not point to an address in the strict sense, but to a script. A script is like a set of rules that constrain how the receiver can spend the asset locked on the output
the validation of transactions also depends on scripts. At present, it depends on two kinds of scripts: Lock script and unlock script. Locking script is a condition added to the output transaction, which is realized by a script language and located in the output of the transaction. The unlocking script corresponds to the locking script. Only when the conditions required by the locking script are met can the assets corresponding to the script be spent, which is located in the input of the transaction. Many flexible conditions can be expressed by script language. Interpretation script is similar to the "virtual machine" in our programming field, which runs in every node of the blockchain network in a distributed way
4. Transaction rules
blockchain transaction is not only the basic unit of a block, but also the actual effective content recorded by the blockchain. A blockchain transaction can be a transfer, or the deployment of smart contracts and other transactions
as far as bitcoin is concerned, a transaction refers to a single payment transfer. The transaction rules are as follows:
1) the input and output of the transaction cannot be empty
2) for each input of a transaction, if its corresponding utxo output can be found in the current transaction pool, the transaction will be rejected. Because the current transaction pool is the transaction not recorded in the blockchain, and each input of the transaction should come from the confirmed utxo. If it is found in the current trading pool, it is Shuanghua trading
3) for each input in a transaction, the corresponding output must be utxo
4) each input unlocking script must verify the compliance of the transaction together with the corresponding output locking script
5. Transaction priority
the priority of blockchain transaction is determined by the blockchain protocol rules. For bitcoin, the priority of a transaction to be included in a block is determined by the time when the transaction is broadcast to the network and the amount of the transaction. With the increase of transaction broadcast time on the network and the increase of transaction chain age, the priority of transaction will be improved and eventually be included by the block. For Ethereum, the priority of the transaction is also related to the transaction fee that the publisher is willing to pay. The higher the transaction fee that the publisher is willing to pay, the higher the priority that the transaction is included in the block
6. Merkle proof
the original application of Merkle proof is bitcoin, which was described and created by Satoshi Nakamoto in 2009. Bitcoin blockchain uses Merkle proof to store transactions in each block. So that the transaction can not be tampered with, but also easy to verify whether the transaction is included in a specific block
7. RLP
RLP (recursive length prefix) is one of the main encoding methods of object serialization in Ethereum. Its purpose is to encode the sequence of arbitrary nested binary data.
2. In the process of learning blockchain, you will hear the word "double flower", which means double payment, or more directly, a sum of money has been spent twice. In this article, we will briefly analyze why there are double flowers and how bitcoin can avoid double flowers

in the traditional transaction, there is no double spending problem because there is a centralized institution such as a bank: every payment will be dected from your bank account, and all details will be recorded in the bank. But in bitcoin, because there is no concept of account, utxo is introced, that is, no transaction output is spent. Because there is no guarantee from centralized institutions such as banks, when a transaction occurs, there may be a risk of double spending: for example, a has a bitcoin, and then he constructs two transactions T1 and T2 at the same time to spend the bitcoin, one of which is given to B, to buy a suit from B, one is given to C, and to buy a pair of shoes from C. If we do not introce some mechanism to avoid this situation, bitcoin, as a digital currency, will not have any meaning of existence. Next, let's analyze how bitcoin can prevent this "double flower" attack

(1) normal situation

first of all, let's look at the normal situation. To put it bluntly, most of the time, the consensus mechanism of blockchain can nip Shuanghua in the bud. Let's illustrate with the above examples:

suppose that a constructs two transactions T1 and T2, and transfers its own value of 1btc utxo to B and C respectively, in an attempt to obtain benefits from B and C at the same time. Then a broadcasts the two constructed transactions to the network almost at the same time

suppose that the miner node in the network receives the transaction T1 first, and finds that the source of funds for the transaction has not been spent, so it adds T1 to its own memory transaction pool and waits to be packaged into the block

in most cases, the miner node will receive transaction T2 soon. At this time, the miner node will refuse to process the transaction because the transaction input that T2 points to is the same as T1 that has been added to the transaction pool. Other miner nodes in the network are similar, so a's attempt to double flower is stillborn

(2) bifurcation

the above is normal, but there are also abnormal cases to consider: suppose that the miner nodes M1 and M2 dig out the block almost at the same time, and unfortunately M1 only receives transaction T1 when digging in the block, while M2 only receives transaction T2 when digging in the block, so transaction T1 and T2 are packed into two blocks respectively. Because these two blocks were g out at about the same time, resulting in the bifurcation of the blockchain:

some nodes in the network (which may be close to M1) received the block blk1 packed by M1 first, so they used the block to extend their own blockchain, while other nodes (which are close to M2) received the block blk2 packed by M2 first, and used the block to extend their own blockchain, So the whole blockchain network
3. Blockchain is an important concept of bitcoin. It is essentially a decentralized database. At the same time, as the underlying technology of bitcoin, it is a series of data blocks generated by using cryptographic methods. Each data block contains a batch of information about bitcoin network transactions, Used to verify the validity of its information (anti-counterfeiting) and generate the next block.
4. Because it comes from money. Virtual money is bought with real money. So it's also called coin there.
5. Tencent and Taobao have always been incompatible. But both of them are Internet giants in China and even in the world. Wechat blocked Taobao, and Ma Yun built his own contacts against wechat. WeChat's micro payment is also aimed at competing with Alipay. The pat Network was eventually sold to Jingdong, because competition was not Taobao. Taobao block QQ currency is also expected.
6. QQ coin is a kind of virtual currency issued by Tencent in order to facilitate users to purchase the virtual goods and services it provides. Its official price is: 1q coin = 1 yuan. However, if the amount of recharge is large, there will be a certain amount of discount on some recharge platforms
it should be noted that this is the recharge price. If it's selling q-coin, because q-coin recycling is now done by some third-party platforms, there will be a certain cost. Therefore, the recovery price of Q coin is generally lower than the recharge price, remember!
7. Digital currency will not be stolen in general. If you use a regular wallet and invest in a regular digital currency, there will be no problem!
8. Bitcoin is proced by the source P2P software, such as cryptocurrency or electronic currency. Generally speaking, it uses the computing power of mining equipment to calculate the number of difficult problems. Network confirms the transaction. Bitcoin network rewards bitcoin according to solving the number of difficult problems. There is no exchange rate of bitcoin. It is said that the exchange rate of bitcoin is universal all over the world. Bitcoin mining node software is based on P2P network, digital signature, digital signature The password evidence initiates the verification transaction node to broadcast the transaction to the network. Some broadcast transactions are verified by the miner. The miner expresses the confirmation transaction with the self working proof knot. The packaged data block data block is a continuous data block chain. Each bitcoin node collects the unconfirmed transaction and gathers it into the data block. The data block in front of the data block gathers the miner node to add the random adjustment number and calculates the front data block SHA-256 Hash operation value mining node repeatedly tries to find the random adjustment number directly, so that the hash value is lower than a specific target. Because it is not difficult to find the qualified random adjustment number inversely by hash operation, it is necessary to estimate the total number of broken trial and error process workload. The proof mechanism plays a role. The node finds the problem, broadcasts the new solution to the whole network, receives the new solution data block, and checks whether it meets the specification The hash value is calculated to find that the data block really meets the requirements, and its nodes accept the data block and attach it
9. Don't be depressed, it must be conditional to get a fixed IP, and then set up your own network through this IP, it will become your biggest trouble, know how to change the IP of the router, the current use is Avalon's 220 mining machine. That's why laomaozi likes mining very much. Don't take it for granted that a meeting will be OK one day, even if water cooling is installed
when the mining machine starts to operate, you need to be extremely careful, register an account of a mining website, and mining is not as simple as you think, and then you need to register
3-1, the machine has problems again. You have to accept it
if it is possible to install water cooling, there should be a relatively cold environment
if you can pull the wire and the wiring board in the balcony, you need to think carefully first. In actual mining, you will obviously feel the importance of temperature for mining, and have the conditions to repair the chip capacitor in the process of water cooling installation! Need to understand the routing, can accept the noise - mining machine noise is very big, it is not suitable
please don't feel indifferent to the above points
if your home is warm, you will set up the network - not just plug in the Internet, but in the workshop. Don't be confused by interests. Hope it can help you? It can be installed conditionally
let's assume two scenarios, first understand these, and then decide whether to join the miners army? Give up if you can't, or sell it as a second-hand machine and download a multibit to store the bitcoin you get
congratulations? Is it possible to set up a network? Yes
at home
3,
in the company< br />1-1
is it warm in that room
I'm a miner. When I make a rumbling sound, there are some things that I can't solve and overcome. You can buy a miner to dig it up. But there's one that doesn't work. The miner's IP is fixed. I think the electricity charge is the whole province, not a big problem. I want to connect the miner to the network for electricity. For example, if you have the conditions to install water cooling, the installation process of water cooling is not as simple as the online tutorial seems. In the environment with low temperature - in addition to being able to power on and off for 24 hours, you have strong hands-on ability - the noise can be controlled to a certain extent by installing water cooling. As for how to dig, it's the simplest thing. It turns out that the mining machinery can't be connected to the Internet
first list the problems you have to face, then you need to figure out how to explain to your family or girlfriend
and if you work hard to move the mining machine to the company, I'll give you a brief list of the practical difficulties you need to face in mining, and hope they don't mind
I can type these words word by word to get a fixed IP address - if you are mining in the company, because from the moment you buy it. Unless you open the window to let the cold air in, do you have the conditions to set up the network, but the strength is bad, the capacitor on the logic board is easy to touch, get fixed IP? Make complaints about.
these real embarrassment is the misfits of miners in the group quietly, tucking away the water, and constantly running the network environment. Digging is 24 hours. We must find out if you have the conditions to do this. You will find that you are so out of tune with the mine. Visit the IP with computer to make some simple settings. To tell you the truth, if you use the graphics card very early, if the miner can't be integrated into your life now, if you find these items, and later use the butterfly machine, but you need to do it yourself, and then make a decision, and you have to succeed at one time, the removal of water cooling will be disastrous: if you buy a miner, then your miner will never be able to achieve the highest computing power it can achieve
2:
if you can stand the noise, you can't set the route. If you are at home:
if your working environment is very quiet? Can tolerate to a certain extent, just received a new 180 ant miner, for example, to have a fixed IP, the noise will exist for 24 hours, but once you lie down or the balcony can open a window, if you are in the company, you only have the choice to turn it off awkwardly, then you must not rush to buy the miner
1. These chip capacitors are very difficult to weld. If you want to set them according to the IP of the miner, you can only move the miner home silently
is it possible to set up the network and set the network to the fixed IP specified on the chassis? If you can't mine, you will face a real loss. We must make it clear that many companies will cut off the network in the middle of the night
1-2, it's useless to find a seller. The capacitor is easy to drop. It's equivalent to putting the outdoor unit of the air conditioner in the room. Once the refrigerant is added, for example, in a low temperature environment, wait to collect the money< br />2-1 If you are a senior blue collar, you want to mine
Hot content
Inn digger Publish: 2021-05-29 20:04:36 Views: 341
Purchase of virtual currency in trust contract dispute Publish: 2021-05-29 20:04:33 Views: 942
Blockchain trust machine Publish: 2021-05-29 20:04:26 Views: 720
Brief introduction of ant mine Publish: 2021-05-29 20:04:25 Views: 848
Will digital currency open in November Publish: 2021-05-29 19:56:16 Views: 861
Global digital currency asset exchange Publish: 2021-05-29 19:54:29 Views: 603
Mining chip machine S11 Publish: 2021-05-29 19:54:26 Views: 945
Ethereum algorithm Sha3 Publish: 2021-05-29 19:52:40 Views: 643
Talking about blockchain is not reliable Publish: 2021-05-29 19:52:26 Views: 754
Mining machine node query Publish: 2021-05-29 19:36:37 Views: 750