The more bitcoin hashes 0, the better
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
1 - data layer: data block, chain structure and time stamp
2 - network layer: P2P network, propagation mechanism, verification mechanism
3 - consensus layer: pow, POS, dpos
4 - incentive layer: issuance mechanism, distribution mechanism
5 - contract layer: script code, algorithm mechanism, smart contract
6-application layer: encapsulates various application scenarios
in the future, jinwowo group will focus on promoting the legal circulation and commercial application of big data with blockchain technology.
Hash algorithm maps any length of binary value to a fixed length of smaller binary value, which is called hash value. Hash value is a unique and compact numerical representation of a piece of data. If you hash a piece of plaintext and change only one letter of the paragraph, subsequent hashes will proce different values. It is computationally impossible to find two different inputs with the same hash value
message authentication code (MAC) hash function is usually used with digital signature to sign data, while message detection code (MDC) hash function is used for data integrity
the basic information of bitcoin network is as follows:
all digital currencies that need to be mined have hash values, such as Laite coin, Ruitai coin, doggy coin, Weimeng coin, Diandian coin, Yuanbao coin, etc< br />
[comedy + compare h bar]<
grandson of the slippery ghost
[so this is introced by a friend = v = I haven't seen it]
black cat
[male master is a killer, and he was called the terminator of hell later because he was influenced by Shaye]
holy mark of the wind
[absolutely recommended!! The handsome male protagonist is the contractor, controlling the wind is the wind warlock, while the female owner is the famous fire warlock family. Then they quarrel when they meet, but they have very good feelings. They are both arrogant. But later, another person who lives in the male owner's memory appears. The male owner of the weak and weak shrimp suddenly knows that his family has the power to become a robber. Then turn around and turn into a robber. It's very handsome
goblin's tail
[keep pushing. Magic. The painting style is beautiful, the plot is better, it's just a little hot, but you're sure to like it!]
leaves... If it's not enough, then you go to QQ, I'm telling you, I've seen animation ~ give me 0.0
hash value of previous block: prev_ Hash
the hash tree value of the transaction to be written: Merkle_ Root
update time: ntime
current difficulty: nbits
the process of mining is to find x to make
sha256 (version + prev)_ hash + merkle_ root + ntime + nbits + x )) < Target
the range of X in the above formula is 0 ~ 2 ^ 32, which can be calculated according to the current difficulty. In addition to x, you can also try to change Merkle_ Root and ntime. Because of the hash feature, finding such an X can only be brute force search
once you find x, you can broadcast a new block, and other clients will verify whether your block is legal. If your block is accepted, the first transaction in each block must be to send the newly generated 25 bitcoins to an address. Of course, you will set the address to your own address to get the 25 bitcoins< Every transaction record of bitcoin from the beginning to now has been saved on the network. The whole bitcoin network maintains a huge transaction record file (about 12g now). The average update cycle of this file is 10 minutes. The newly added transaction record is called a block, and this huge file is composed of a series of blocks, called block chain.
Why are 25 bitcoins
this is the rule. At first, there are 50 bitcoins. For each half of the remaining bitcoins, the income will be halved. In this way, the total amount of bitcoins that can be generated will approach 21 million. If you still claim to have g up 50 bitcoins, it will not be accepted by other clients, and the block will be g up in vain
how to ensure that the average update cycle is 10 minutes
the smaller the target, the more difficult it is to solve X. for every 2016 blocks (about 14 days) generated, the network will adjust the target according to the average interval of new blocks generated ring this period
is it the fastest person who always solves it first
No. You always want to take the mining income as your own, so when everyone calculates, the address to send the mining income is different, so Merkle_ Root is different, that is to say, everyone starts to solve from a different initial state
how to solve it at the same time
there will be a fork in the block chain. Some clients accept a and some accept B. until a branch becomes longer, everyone will choose the longer branch. If what you dig is unfortunately not selected, your mining income will be invalid
since I choose a longer branch, how can I solve it with very low difficulty
the client finds the most difficult and longest branch among many branches
are these calculations wasted
if you want to spend a sum of money twice, you need to do so. Dig a new block, but hide not broadcast, and continue to mine. Find merchant a, pay bitcoin, and let others on the network dig the block and write the transaction record. Find merchant B, pay bitcoin, and write the block you g. If you can get two blocks first and broadcast them, everyone will take your longer branch as the current block chain, and the bitcoin received by merchant a will not be recognized. In this way, the probability of successful attack depends on the speed of hash calculation. If the computing power of the whole network is high enough, the success rate of such attacks is very low or the cost is very high.
Suppose that in 2009, Tencent spent 100000 yuan to buy its shares. Now it has achieved financial freedom. Tencent's shares have not doubled in the past ten years, but multiplied many times
Before answering the question, I would like to give you a piece of advice: be cautious when entering the market, pay attention to value investment, long-term investment and don't speculate in stocks for the poor
converted into RMB is: RMB 2.45 million - RMB 5.4 million
in the stock market, if you choose the right stock, holding it for a long time for several years or ten years is actually very profitable, but you should also know that the stock market is the most risky way of investment, we still need to be cautious and rational investment