Bitcoin 200 times
reference link: http://wuhan.pbc.gov.cn/wuhan/2929354/3393665/index.html
public key system: corresponds to a public key and a private key, keeps the private key in the application and publishes the public key. When Party A transmits information to Party B, it can use Party A's private key to encrypt the information, and Party B can use Party A's public key to decrypt the information, so as to ensure that the third party cannot impersonate Party A to send the information; At the same time, when Party A transmits information to Party B, it is encrypted with Party B's public key and sent to Party B, and then Party B decrypts it with his own private key, so as to ensure that the third party cannot eavesdrop on the communication between the two people. RSA is the most common public key system, but the lliptic curve digital signature algorithm is used in bitcoin protocol. What's the difference between cash and bank account? Bitcoin is an electronic currency in BTC. In this article, it is also used to refer to the whole bitcoin system. Like opening an account in a bank, the corresponding concept in bitcoin is address. Everyone can have one or more bitcoin addresses, which are used to pay and collect money. Each address is a string that starts with 1. For example, I have two bitcoin accounts, and. A bitcoin account is uniquely determined by a pair of public key and private key. To save the account, you only need to save the private key file. Unlike bank accounts, banks keep all transaction records and maintain the book balance of each account, while bitcoin's transaction records are jointly maintained by the whole P2P network through a pre agreed protocol. How much money is in my account address? Although the current account balance can be seen by bitcoin software, unlike banks, there is no place to maintain the book balance of each address. It can only calculate the account balance in real time through all historical transactions. How do I pay? When I pay from address a to address B of the other party, the payment amount is e. at this time, both parties will announce the transaction information to each network node, telling address a to pay to address B, and the payment amount is e. In order to prevent the third party from forging the transaction information, the transaction information will be encrypted with the private key of address A. at this time, the network node receiving the transaction information can use the public key of address a to verify that the transaction information is indeed sent by address a. Of course, trading software will help us do these things, we just need to input the relevant parameters in the software. What will the network node do after receiving the transaction information? This is the most important part of the bitcoin system, which needs to be elaborated. For the sake of simplicity, only bitcoin protocol has been implemented. In the current version, each network node will save all transaction information synchronously. There are two kinds of transaction information in history, one is & quot; Verified & quot; The transaction information, that is, the verified transaction information, is stored in a series of "blocks". Each & quot; block" Is the previous & quot; bock" The ID of each block is the hash code of the hash code of the block and the new transaction information (see an actual block). The other category refers to those who also & quot; Unverified & quot; The transaction information just paid above belongs to this category. When a network node receives new unverified transaction information (possibly more than one), it can calculate the book balance of each address at that time because the node keeps all the transaction information in history, so it can calculate whether the transaction information is valid, that is, whether there is enough balance in the payment account. After eliminating the invalid transaction information, it first takes out the last & quot; block" Then, the unverified transaction information is combined with the ID, and a verification code is added to form a new "block". It needs a lot of calculation to build a new block, because it needs to calculate the verification code, so that the above combination becomes a block, that is, the first several bits of the hash code of the block are 1. At present, the first 13 bits need to be 1 (generally, the specific method is uncertain), which means that if the block is generated by enumeration method, the average number of enumerations is 16 ^ 13. Using CPU resources to generate a block is called "gold mining", because the proction of the block will get a certain reward, and the reward information has been included in the block. When a network node generates a new block, it will broadcast to other network nodes. However, this network block may not be accepted by the network, because it is possible that other network nodes have proced the block earlier. Only the earliest block or the block with the largest number of subsequent blocks is valid, and the remaining blocks are no longer used as the initial blocks of the next block. How does the other party confirm that the payment is successful? When the payment information is distributed to the network node, the network node begins to calculate whether the transaction is valid (that is, whether the account balance is enough to pay), and attempts to generate blocks containing the transaction information. When six blocks (one direct block and five subsequent blocks) contain the transaction information, the transaction information is considered "verified", so that the transaction is formally confirmed, and the other party can confirm the successful payment. A possible problem is that I will pay the balance of address a to address B, and at the same time pay to address C. If I only verify that the single comparison transaction is valid. At this point, my way of cheating is to generate six blocks including B to B and six blocks including C to C before the truth is revealed. Because I need a very long CPU time to generate a block, compared with the whole network, the probability of my cheating success is very small. What is the motivation of network nodes to proce blocks? As can be seen from the above description, in order to make the transaction information effective, the network node needs to generate 1 and 5 subsequent blocks to contain the transaction information, and such block generation is very CPU intensive. How to let other network nodes help to proce blocks as soon as possible? The answer is very simple. The agreement stipulates that BTC will be rewarded for the address where the block is proced, as well as the Commission promised by both parties. At present, the reward for procing a block is 50btc, which will be halved every four years in the future. For example, the reward will be 25btc from 2013 to 2016. Is the transaction anonymous? Yes, and No. All bitcoin transactions are visible. We can check all transaction records of each account, such as mine. But what's different from the banking monetary system is that everyone's account itself is anonymous, and everyone can open many accounts. In general, anonymity is not as good as it claims. But bitcoin has another advantage in doing black market trading: it can't be frozen. Even if the police trace a bitcoin address, there is nothing they can do unless they trace the computer used by the exchange based on the Internet address. How to ensure that bitcoin does not depreciate? Generally speaking, in the case of equivalent trading activities, the value of money is inversely proportional to the amount of money issued. Unlike the traditional money market, the central bank can determine the amount of money issued. Bitcoin does not have a central issuing institution. Only by procing blocks can we get a certain amount of BTC currency. Therefore, bitcoin's new amount of money depends on: 1. The speed of procing blocks: bitcoin's agreement stipulates that the difficulty of procing blocks is fixed at an average of 2016 every two weeks, about 10 minutes. Moore's law of doubling CPU speed every 18 months will not speed up the proction of block. 2. The number of rewards for block proction: at present, 50 BTC is awarded for each block proced, which is halved every four years. In 2013, 25 BTC is awarded, and in 2017, 12.5 BTC is awarded. Considering the above two factors, bitcoin's currency issuing speed is not controlled by any single node in the network. Its protocol makes the currency stock known in advance, and the maximum stock is only 21 million BTC
Bitcoin, English name bitcoin, is a digital currency based on blockchain technology, which is composed of a series of computer-generated complex codes. Like RMB's ¥ and US dollar's $, bitcoin has its own symbol, the "B" in the figure below
The inventor of
bitcoin is Nakamoto. Satoshi Nakamoto is the creator of bitcoin protocol and its related software bitcoin QT. In 2008, he published a paper called "bitcoin: a peer-to-peer electronic cash system", describing an electronic currency and its algorithm that he called "bitcoin"
In 2009, he released the first bitcoin software and officially launched the bitcoin financial system In 2010, he graally faded out and handed over the project to other members of the bitcoin communityNakamoto is believed to hold about one million bitcoins. If the price of each bitcoin was $2W, it was worth $20 billion at one time. So far, his true identity is still unknown to the outside world, that is to say, no one knows who Nakamoto is
bitcoin appeared after the global financial crisis in 2008. In fact, before that, many people have tried electronic currency, digital currency and virtual currency, but they have not succeeded. There are not only technical reasons, but also social environment and economic background reasons. To some extent, it was the 2008 financial crisis that gave birth to bitcoin
according to the currency conversion ratio on January 3, 2020, one bitcoin = RMB 47000
compared with fiat money, bitcoin has no centralized issuer. It is generated by the calculation of network nodes. Anyone can participate in the proction of bitcoin, and it can circulate all over the world. It can be bought and sold on any computer connected to the Internet. No matter where they are, anyone can dig, buy, sell or receive bitcoin, And in the transaction process, foreigners can not identify the user's identity information
the global financial crisis broke out in 2008. On November 1, 2008, a person who called himself Satoshi Nakamoto published bitcoin white paper "bitcoin: a peer-to-peer e-cash system" on the P2P foundation website, stating a new idea for e-money bitcoin came out. On January 3, 2009, bitcoin Genesis block was born
whenever bitcoin comes into the view of mainstream media, mainstream media always ask some mainstream economists to analyze bitcoin. Earlier, these analyses focused on whether bitcoin was a scam. Now the analysis focuses on whether bitcoin can become the mainstream currency in the future. The focus of the debate is often on the deflationary nature of bitcoin
extended data:
currency features:
Decentralization: bitcoin is the first distributed virtual currency, and the whole network is composed of users without a central bank. Decentralization is the guarantee of bitcoin's security and freedom
Global Circulation: bitcoin can be managed on any computer connected to the Internet. No matter where you are, anyone can dig, buy, sell or collect bitcoin
exclusive ownership: private key is required to manipulate bitcoin, which can be stored in any storage medium in isolation. No one can get it except the user himself
low transaction cost: bitcoin can be remitted free of charge, but a transaction fee of about 1 bitfen will be charged for each transaction to ensure faster transaction execution
About 400 percent
when bitcoin first appeared in 2009, one dollar could buy almost 1300 bitcoins. Before April 2011, the price of each bitcoin was always below $1. In June 2011, the highest price of bitcoin rose to $30. Then, the price almost fell within a week. In 2012, the price of bitcoin once fell below $2
further dropped to $114 on January 14, 2015. Since then, bitcoin has begun to rise again. In 2017, after the bitcoin ETF fund was rejected by the US Securities Regulatory Commission, bitcoin plummeted by $315 to below $1000. After that, it rose again. In the first four months of this year, the price of bitcoin and an ounce of gold were almost equal
However, with the strong rise of bitcoin in this round, the price of bitcoin has exceeded the price of an ounce of gold. On April 26, the price of bitcoin was $1282.97, compared with $1264 for an ounce of gold. Bitcoin has surpassed gold in price
extended data
in 2016, there were dozens of bitcoin exchanges in the world, and the trading volume of bitcoin in most countries and regions increased sharply. Among the countries and regions with the highest growth rate, the trading volume of bitcoin in Japan is second only to China, ranking second in the world; The local bitcoin trading volume in Venezuela increased by more than 913%
South Korea has become the sixth largest bitcoin trading market in the world, Korean people can buy bitcoin from a large number of convenience stores, and korbit's trading volume currently accounts for 70% of the South Korean market; Local bitcoin transactions in Colombia increased by about 370%; Bitcoin markets in Malaysia, Russia and Australia are also developing rapidly. Bitcoin trading in China once accounted for more than 80% of the global trading volume
in addition, CPU is not good at parallel computing at all. It can perform more than ten tasks at most at one time. This is far from the fact that the graphics card has thousands of stream processors. The graphics card is too high, so we slowly develop the corresponding mining algorithm for the graphics card
taking BTC as an example, its basic algorithm principle is to take all transactions within 10 minutes as an input and add a random number. When all transactions within 10 minutes are added with your random number, a hash of sha256 is calculated. It's almost full of integer operations. It's just like a special design for a graphics card. The graphics card is very suitable for this kind of brainless algorithm. The more the number of stream processors, the better
as far as hash computing is concerned, it is almost all independent and concurrent integer computing, and GPU is designed and proced for this. Compared with the pitiful 2-8 threads of CPU and the astonishing length of control judgment and scheling branches, GPU can easily perform integer calculation concurrency of hundreds of threads (brainless brute force cracking without any judgment is the strength of a card)
OpenCL can make use of a large number of unified shaders on GPU chip, which can be used as resources for integer calculation. The resource of stream processor of a card is several times that of N card (the same level card)
but later, we found that the graphics card is still too weak, and the computing power can be greatly improved by directly using the ALU unit of large-scale ASIC stack. The computing power of the palm sized computing board is dozens of times that of the graphics card, so now bitcoin can't dig without a special ASIC miner
although a large number of interdependent and random memory access instructions are introced into the script algorithm used in the later LTC, when the footprint is large enough, a large number of cache failures will occur at the L2 level or even TLB level of GPU, resulting in more DRAM accesses, so as to weaken the advantage of ASIC / FPGA in integer operation performance compared with GPU, However, it is still targeted to develop mining machines. At present, only specialized mining machines can dig
however, the second generation of virtual currency (such as Eth and Zec) has absorbed the experience of the predecessors' blasted algorithms, and made more special optimization on the mining algorithm to prevent the occurrence of brainless operations. It has high requirements for video memory, so it can effectively resist the invasion of mining machines
because eth can only rely on graphics cards for mining, the rising price and shortage of graphics cards started in the second half of 2017. Many mine owners sold thousands of graphics cards to set up mining machines to mine these virtual currencies
over time, we all think that CPU can't mine, but in fact, the efficiency and benefit are too low.
