Vol 112.区块链到底是什么?
By 回形针PaperClip
Summary
## Key takeaways - **Satoshi Nakamoto's Breakthrough**: On October 31, 2008, Satoshi Nakamoto signed a 9-page paper solving payments in anonymous decentralized networks without trusted third parties, creating Bitcoin worth 100 billion yuan and blockchain technology. [00:28], [00:34] - **Broadcast Transfers for Trust**: In blockchain, transfers are broadcast to everyone with an electronic signature like '8529C36...', verified by all, then recorded in identical ledgers where everyone checks balances retrospectively. [00:49], [01:36] - **PoW Mining via Hash Puzzle**: Proof-of-Work uses SHA256 hashing where miners adjust a random number in the block header to get a hash starting with 76 zeros, now taking an RTX 2080Ti 1,407 years. [02:15], [03:28] - **Immutable Chain via Hash Pointers**: Each block records the previous block's hash; modifying any block invalidates all subsequent hashes, requiring recalculation of every following block. [04:06], [04:41] - **51% Attack Rewrites History**: Bitcoin Gold suffered a 51% attack where an attacker created a longer chain B without a $10 million transfer after A chain confirmed it, replacing A and stealing the funds. [05:31], [06:04] - **Private Key Proves Ownership**: Private key generates public key and address; only it creates valid electronic signatures for transfers, as shown when Adam's on-camera reveal led to instant theft of 1,500 yuan Bitcoin. [06:20], [06:40]
Topics Covered
- Blockchain Eliminates Trusted Third Parties
- Proof-of-Work Secures Ledger via Computation
- Hash Chains Prevent Ledger Tampering
- 51% Attacks Rewrite Blockchain History
- Private Keys Prove Ownership Exclusively
Full Transcript
Hi, Happy New Year!
You transfer me 200 yuan I transfer Meiyang 100 bucks And Meiyang transfer Donglin Guo 500 bucks uh, the balance is insufficient.
Every second elapsed, WeChat had to process 14,000 such transfers he premise that you can transfer money normally is because WeChat knows how much money you have, and the money is kept in a special account of the People's Bank.
And you also believe that countless employees behind WeChat and the banking system will not mistake your balance.
But without these trusted third parties in a completely anonymous decentralized network, how would you pay me?
On October 31, 2008, ID, signed by Satoshi Nakamoto, solved this problem with a 9-page paper.
Now we know that this mysterious man called Satoshi Nakamoto and these 9 pages of paper have created Bitcoin equivalent to 100 billion yuan, and the technology that supports the operation of Bitcoin-blockchain.
The block chain Without a trusted third party, the biggest problem is that none of us can trust each other.
Therefore, in the blockchain world, the transfer must be broadcast the purpose is to let everyone know the ins and outs of every person on the network.
"Hello everyone" "I transferred Meiyang 100 yuan" "This is my electric signature: 8529C36..."
Everyone will verify that this sentence is indeed what I said through an electronic signature and then write this transfer on the ledger, I will lose 100, and Meiyangwill have 100 more.
But how do you know that I really have $ 100?
Your ledger will help you confirm it.
This ledger is the block.
Linking blocks together is the blockchain.
It records all the transaction records of Bitcoin from its creation to today.
There are about 600,000 blocks now.
Each block records two or three thousand transactions.
Wherever I come, where I spend it, It will record it clearly and transparently.
In the blockchain network, everyone has an identical and updated ledger.
So when I said that I had to pay 100 to Meiyang everyone's account book would begin to retrospectively check whether I had 100 yuan If not, the transfer would be invalid.
It is not difficult to find that the reliability of the ledger is the cornerstone of digital currency.
If there is a problem with the ledger, no currency can be used.
But this raises two new questions: Who will keep accounts for everyone?
How to ensure that the ledger is not falsified?
If everyone can keep accounts, the transactions and order of transactions contained in each block may be different.
If there are intentional false accounts, it will be even more chaotic It is impossible to get a ledger that everyone accepts.
Therefore, the bookkeeper must be accepted by everyone so that everyone's books can be unified.
This is also called the consensus mechanism.
Today, various blockchains have different consensus mechanisms, and Satoshi's solution is to do the problem.
Whoever calculates the answer first has the right to keep accounts This mechanism is called PoW: Proof-of-Work The nature of proof of work is exhaustive.
The more powerful your device is, the more likely it is to calculate the answer.
To do this, hash encryption is needed.
Take the SHA256 algorithm as an example any string of characters encrypted with it can get a unique 256-bit binary number.
As long as the original input is slightly changed, the encrypted number will be completely different.
Open a block, we can see the number of transactions, transaction details, block header and other information recorded in this block.
A block header is a label of a block, which contains information such as the timestamp, the hash of the Merk tree root, a random number, and the hash of the previous block.
And if you calculate the block header twice using the SHA256 you can get the hash value of this blcok If you want to keep an account you have to pack all kinds of information in the block, and then modify this random number in the block header so that the input value can get a hash value where the first n numbers are 0 after the hash calculation. .
In fact, there are two possibilities for each digit: 1 and 0, o each time a random number is changed, the probability of success is 1/2 to the power of n.
For example, n is 1, which means that as long as the first number is 0, the success rate is 1 in 2.
The stronger the computing power involved in the network, the more zeros to calculate, and the more difficult the proof of workload is.
Today, the n in the Bitcoin network is about 76, and the success rate is 2 to the 76th power, which is almost 755 trillion Using a RTX 2080Ti graphics card with a price of 8,000 yuan, you probably need to calculate 1,407 years.
It's not easy to get it right but as long as you figure it out, everyone can instantly verify that you're right.
If there is no problem, everyone will connect this block to the ledger and start to pack and calculate the next block.
In this way, everyone in the network has an identical and updated ledger.
In order to give everyone an incentive to do the bookkeeping, the first node to complete the block packaging will get a system reward, which is now 12.5 bitcoins, which is almost 85,715 dollars This process is also called mining.
On the other hand, in order to prevent tampering of the ledger, each newly added block needs to record the hash value of the previous block in the block header, also known as the hash pointer.
Such a continuous forward pointer will eventually point to the first founding block, tightly linking all the blocks together If you modify any character in any block, it will change the hash value of this block and invalidate the hash pointer of the next block.
So you have to modify the hash pointer of the next block, but this will affect the hash value of this block, so you need to recalculate the random number.
After finishing the calculation, you must continue to modify the next block of this block.
Until you modify all the blocks after this block, which is very troublesome.
In this way, even if the bookkeeper wants to fraud, it cannot be done Because of the electronic signature, bookkeepers cannot forge transfers made by others, and because of the existence of historical ledgers, they cannot change a sum of money out of thin air.
But this raises a new question: if two people complete the calculation at the same time and package a new block, who should we listen to?
The answer is: whoever has a longer chain, now everyone can pack after these two blocks.
for example, the buddy who finishes the calculation first in the next round chooses to connect to B, then the B chain is longer, and others will be more willing to connect behind B.
Winning and defeating can generally be done within 6 blocks.
The abandoned on-chain transactions will be withdrawn and put back into the transaction pool for packaging.
But since who is the longest listener, as long as you can count more than everyone, the computing power is greater than 51%, you can calculate the longest chain by yourself, and then control the ledger.
Therefore, the stronger the miner's computing power in the bitcoin world, the more 0 you have to count, ensuring that no one can control the right to keep accounts.
But other blockchains with few participants are hard to say.
For example, on May 15, 2018, a digital currency called Bitcoin Gold suffered a 51% attack.
The attacker first transferred his $ 10 million bit gold to the exchange, and the transfer was recorded on block A.
At the same time, the attacker secretly prepared a block B where the transfer did not occur, and calculated a new block after block B.
After the transfer on the A chain is confirmed, the attacker can withdraw the bit gold on the exchange But because the attacker's computing power is greater than 51% of the entire network, the length of the B chain will eventually be larger than the A chain.
At this time, as long as the longer B chain is released to the entire network, the history will be rewritten.
The B chain will replace the A chain to become the real main chain, and the transfer to the exchange in block A will be withdrawn , and the attacker earns 10 million in vain.
Today, for ordinary people without computing power, the easiest way to obtain digital currency is to buy it at an exchange and then withdraw it to the wallet address.
This address comes from your private key.
After the private key is encrypted, you will get the public key.
After the public key is encrypted, you will get the address.
In an anonymous network such as a blockchain, only the private key can prove that you are you.
As long as you attach the electronic signature generated by your private key when transferring, everyone can confirm that the transfer is valid.
So if the private key is leaked, anyone can pretend to transfer your money away.
For example, a man named Adam received a bitcoin equivalent to 1,500 yuan today in a live TV broadcast in 2013.
After happily showing the private key to the camera, the money was stolen on the spot.
Loading video analysis...