Bitcoin computing
1. Mining can not only proce bitcoin, but also guarantee transaction information
similarly, a mathematical system contains 21 million mathematical problems, so we need to constantly seek the special solution of each mathematical problem through a huge amount of calculation. In addition, the special solution is unique
mining can not only increase the supply of bitcoin money, but also protect the security of bitcoin transactions and prevent fraulent transactions. In terms of process, bitcoin network is a point-to-point payment system, and anyone can trade through the transaction program
in order to ensure that the transaction process is truthfully recorded, the role of "miner" is required to be responsible for recording bitcoin transaction information. The time interval is 10 minutes. The best recorded transaction records among miners will be packaged and stored in a new block, and the corresponding miners will also receive a certain amount of bitcoin rewards
2. The mining process is extremely complex, which is beyond human power
the specific process is as follows. When a miner listens to the transaction, he will first verify the transaction information. The verified transactions will be recorded by miners and stored in their own database. There may be thousands of miners in the world doing the same thing, but every ten minutes, only one miner has the right to create a new block, so that the transaction information recorded by himself can be recognized and stored permanently
next, miners need to fight for the right to keep accounts. This is a competition of computing power. The core of this competition is to use computers to complete a large number of calculation tasks and find a super difficult random number. This random number is the special solution of the equation mentioned in the first paragraph. The miner who calculates the correct random number first wins. According to the rules of the game, the probability of a miner getting the accounting right is directly proportional to the proportion of his computing power in the total computing power of the whole network. In other words, the probability of finding the random number is equivalent to throwing out 100 million dice, and the total number of dice is less than 150 million. Therefore, mining requires a large number of computers, installation of specific algorithm software, repeated operation day and night, not human
3. Bitcoin mining is actually "villagers' bookkeeping"
maybe some netizens still don't understand, let's take an example. In a village, the villagers often borrow money from each other, even if they write a written document, there is a risk of default. Then, every time there is a loan behavior in the village, we will use the village trumpet to inform everyone that all the villagers (miners) will record all the transaction records in their own account books.
generally, an ordinary bitcoin transaction is composed of one input and two outputs, with the size of about 200 bytes. The default charge is 0.0001btc for every 1000 bytes, and the ordinary bitcoin transfer fee is about 0.001-0.002btc
however, e to the limited capacity of the block to hold transaction records, miners generally give priority to the transaction with higher handling charges. Therefore, when the transaction needs urgent confirmation, it is recommended to select custom charges. I also saw these in Yingfu College of Finance and economics.
1. Prepare the bitcoin you want to send. The client is responsible for collecting the balance of bitcoin in your wallet (bitcoin QT) to prepare for payment, because every bitcoin you receive is stored in your wallet until you spend it. If you receive two payments from 3btc and 2btc, their records in the wallet are independent of each other, that is, a 3btc and a 2btc, rather than merging them into 5btc (the wallet only records transaction details and does not merge the balance, but you can see the total balance on the interface of the wallet). As time goes on, many bitcoins of different amounts will accumulate in your wallet, So when you send bitcoin, the wallet has to decide which bitcoin is the most suitable for this sending. The bitcoin you get in a transaction is called "inputs" and the bitcoin you spend is called "outputs". There are multiple inputs and outputs in your wallet
2. If your outputs are less than 0.01btc (including the fund changes inside your wallet), you have to pay a handling charge of 0.0001, even if you transfer it to yourself. The wallet has an established rule when preparing your payment amount, that is, when preparing the payment amount in many inputs, try to avoid the amount change less than 0.01btc (for example, if you want to pay 5.005btc, the wallet should choose 3 + 2.005 or 1 + 1 + 3.005 instead of 5 + 0.005)
3. The larger the amount, the higher the age, and the higher the priority. If the amount you send is too small or your bitcoin has just been mined, then your transfer is no longer free. Each transaction will be assigned a priority, which is determined by the degree of currency, the number of bytes and the number of transactions. Specifically, for each input, the client will first multiply the number of bitcoins by the time they exist in the block (currency age, age), and then divide all the procts by the size of the transaction (in bytes). The calculation formula is: priority = sum (input)_ value_ in_ base_ units * input_ age)/size_ in_ If the calculation result is less than 0.576, then the transaction must pay the handling fee. If you do have a large amount of small input and want to transfer it out for free, you can add a large amount of bitcoin with a large age, which will increase the average priority, so that you can transfer out bitcoin for free
4. Charge per kilobyte. At the end of the transfer, the client will detect the size of the transfer (in bytes). The size generally depends on the amount of input and output. The calculation formula is as follows: 148 * input amount + 34 * output amount + 10. If the size of the transfer exceeds 10000 bytes, but the priority meets the free standard, you can still enjoy the free transfer, Otherwise, there will be a handling charge. The cost of 1000 bytes is 0.0001btc by default, but you can also add it in the client. Open the tab "settings & gt; Options & gt; The main purpose is to adjust the handling charge. If the service charge you are setting is less than 0.0001, BTC is calculated as 0.0001.
renrenfu financial and business school tells you that every bitcoin node will collect all unconfirmed transactions and gather them into a data block, which will be integrated with the previous data block. The miner node will attach a random adjustment number and calculate the SHA-256 hash value of the previous data block. The mining node keeps trying again and again until it finds the random adjustment number so that the generated hash value is lower than a specific target
because hash operation is irreversible, it is very difficult to find the required random adjustment number, which requires a continuous trial and error process that can predict the total number. At this time, the workload proof mechanism will play a role. When a node finds a satisfactory solution, it can broadcast its results to the whole network. Other nodes can receive the new data block and check whether it meets the specification. If other nodes do meet the requirements by calculating the hash value, then the data block is valid, and other nodes will accept the data block and attach it to their own chain
bitcoin mining uses SHA-256 hash value operation. This algorithm will carry out a large number of 32-bit integer circular right shift operations
exhaustive verification until it finds a data that meets the requirements. This meaningless data is a dollar