Blockchain
Blockchain is undoubtedly one of the hottest concepts of recent times, blockchain, Bitcoin, Ethereum and ICO in the circle of friends, all kinds of terms brush the screen every day, but do you really understand the meaning of these terms?
01
Blockchain
From a technical point of view, blockchain is a technical system that is jointly maintained by multiple parties, stores data in a blockchain structure, uses cryptography to ensure transmission and access security, and can achieve consistent data storage, cannot be tampered with, and cannot be denied.
Let's take an analogy:
Blockchain is like a train, with goods piled up in each train car, similar to storing data in each block, connecting all train cars into trains, similar to connecting all blocks into a chain. However, due to the exquisite and special design of the blockchain, the content of the subsequently generated block is affected by all the previous blocks, which leads to even a slight tampering with the previous block being detected, which also promotes the tamper-proof and reliable characteristics of the blockchain.
What's inside the carriage (block)?
- Block Head: Records the eigenvalue of the current block
- - Generation time - Hash of actual data (i.e. block body) - Hash of the previous block - Random number - Body: Actual data
-
- Transaction data
Each new block in the blockchain depends on the hash value corresponding to the content of the previous block, and the content of the previous block contains the hash value of the previous block corresponding to it, so each block is tightly interlocked and cannot be tampered with. This tightly interlocking mechanism is difficult to understand, and can be compared to the idiom solitaire, smooth sailing - smooth wind and smooth water - water to water.
- Knowledge points:
- Hash function: ** Hash verification is often used on the forum and when software is released, in order to ensure the correctness of the file, prevent some people from stealing the program, adding some Trojan horses or tampering with copyright, a set of verification systems designed. Each file can be calculated with a fixed MD5 code using the Hash MD5 verification program.
- Asymmetric encryption: Asymmetric encryption algorithms require two keys, public key and private key, if the data is encrypted with a public key, only the corresponding private key can be decrypted.
- 02
- Bitcoin
- The founder, Satoshi Nakamoto, is speculated to be Japanese. Bitcoin is the first application of a P2P electronic money system built using blockchain technology. The Bitcoin system uses a blockchain technology system to maintain a distributed ledger that records Bitcoin transactions.
- Mining:
- Anyone can run software on specialized hardware and become a Bitcoin miner. The mining software listens to the transaction broadcast through the P2P network and performs the appropriate tasks to process and confirm these transactions. Bitcoin miners do this to earn user-paid transaction fees to speed up transaction processing and additional bitcoins issued according to a fixed formula.
- New transactions need to be included in a block with a mathematical proof of work in order to be confirmed. Such proofs are difficult to generate because they can only be produced by computations that are tried billions of times per second. Miners need to run these calculations before their blocks are accepted and rewarded. As more people start mining, the difficulty of finding valid blocks is automatically increased by the network to ensure that the average time to find a block remains at 10 minutes.
- The specific process of trading:
- Suppose A transfers 10 bitcoins to B, the steps in the simplified version are as follows:
- Confirm the information of both parties to the transaction, including A's wallet address and wallet balance, B's wallet address. 1. Initiate a transaction application through the Bitcoin client, and each transaction application will generate a public key through the private key, and everyone can verify whether the transaction is legitimate through the public key. 1. Miners package all transactions in the last 10 minutes into a new transaction block. 1. The miner's computer starts computing the cryptographic hash function. The new hash value is calculated based on the hash value of the previous block, the new transaction block, and the random number. 1. The Bitcoin system requires new hashes to have a specific format – they must start with a specific number of zeros. Miners can't predict which random number will produce a hash starting with 0 of the required number, so they are forced to create many hashes with different random numbers until they get the valid one. 1. The timestamp server adds a timestamp to the hash calculation result of a block of data, and publishes the hash calculation result on a large scale. Each block contains an initial transaction called coinbase, which is a payment of 50 Bitcoins to the winning miner. 1. Finally add new blocks to the blockchain.
- Bitcoin's currency is issued through mining (proof of work), the total number is 21 million written dead through the program, and the first block reward is also hard-coded. The reward for miners digging out a block will be halved every 210,000 blocks, and the execution efficiency of mining a block in an average of 10 minutes means that it will be sharply reduced almost every four years.
- The reward was 50 BTC per block from January 2009, halved by 25 BTC per block in November 2012, and halved to 12.5 BTC in July 2016. Based on this rule, by 2140, all bitcoins (20,999,999,980) will be issued in full, and no new bitcoins will be generated after that.
- Problem Thinking:
- Is mining a waste of resources? 1. Will Bitcoin transactions be blocked? 1. Where does the blockchain data exist? 1. How does the entire system continue to run after the bitcoin is issued?
- 03
- Ethereum
- Founder Vitalik, Russian.
- Publishing the Ethereum White Paper at the age of 19, he affirmed the great idea of a "distributed database" for the Bitcoin network, but also pointed out its drawbacks: insufficient scalability, only bitcoin is a symbol. Ethereum, on the other hand, can be seen as a distributed computer, where anyone can upload and execute applications, and miners are like CPUs responsible for computing, working together to form a decentralized world computer.
- One of the biggest differences between Ethereum and Bitcoin is that it provides a more powerful contract programming environment. If bitcoin's function is only the digital currency itself, then on Ethereum, users can also write smart contract applications, directly bringing the development of blockchain technology into the 2.0 era.
- Take a look at the composition of Ethereum:
- Let's take an analogy:
- From a platform perspective, Ethereum is similar to Apple's App Store; Technically, Ethereum is similar to a blockchain operating system.
- Smart Contract:
- A smart contract is a computer program that directly controls a digital asset. Smart contracts in Ethereum run on virtual machines, commonly known as EVMs (Ethereum Virtual Machines). This is a sandbox of smart contracts, which are stored on Ethereum's blockchain and compiled into Ethereum virtual machine bytecode, through which smart contracts are run. Thanks to the existence of this middle layer, Ethereum also implements contract code compilation in multiple languages, with each Ethereum node in the network running an EVM implementation and executing the same instructions. If Bitcoin is a two-dimensional world, then Ethereum is a three-dimensional world, which can implement countless different two-dimensional worlds. (Ethereum's source code is maintained on GitHub: https://github.com/ethereum)
- Other words:
- You can build any application using Ethereum's smart contracts, including the development of virtual coins using Ethereum.
- At the same time, in order to prevent computational waste, each transaction needs to set a limit to limit its total calculation steps, to put it bluntly, it is to make the execution of the transaction cost, and each transaction must pay a certain fee (Gas).
- 04
- ICO
- Initial Coin Offerings, an initial public offering of digital token financing. The so-called ICO is that investors use ready-made virtual digital currencies such as Bitcoin in exchange for new tokens issued by ICO projects. Because there are fewer owners of new coins and the price fluctuations are large, the selling price on the exchange is likely to be much higher than the issue price. The initiator of the ICO project uses the traditional digital currency raised, exchanges it for legal tender such as RMB on the exchange, and then invests in the designated technology project.
- Blockchain technology implements a third-party notarization mechanism to ensure that once you participate in crowdfunding and pay money, you will be able to get the corresponding electronic cryptocurrency. This part solves the trust problem of the ICO and lowers the threshold for ICO participation.
- Special note: On September 4, 2017, Chinese Bank and other 7 ministries and commissions jointly issued a document to conduct the first official characterization of the ICO, saying that "token issuance financing ... It is essentially an act of illegal public financing without approval", and requires that "all kinds of token issuance financing activities should be stopped immediately".
- 05
- Cut the leeks
- "I can calculate the trajectory of celestial bodies, but I can't calculate human madness." - Newton
- When others flock to dig for gold, I build shovels:
- Bitmain a mining machine 15,000 yuan (the latest version of S9), according to the conversion, a day can bring about 0.0011 bitcoins, the current bitcoin market price of 9,000 US dollars, equivalent to about 60 yuan a day.
- Bitmain had revenue of $2.5 billion and profit of nearly $360 million in 2017.
- You can issue coins by bragging:
- With the services provided by Ethereum, it is very simple to create a virtual coin at will, you can search for a tutorial on the Internet, and a similar programmer can do it himself, and a new currency can be born. If you are too lazy to do it, you can also go on Taobao:
- The deepest water of the exchange:
- A foreign virtual currency researcher Sylvain Ribes published an article pointing out that most virtual currency exchanges are brushing their own trading volume, and the most fake exchanges have up to 93% of their trading volume. The trading volume of Huobi Network is about 60%. If you want to log on to the exchange to circle money, you have to pay the "coin fee" to the exchange, either cash, or offset part of the bitcoin share to the exchange, and after landing on the transaction, the exchange cashes out by itself.
- Problem Thinking:
- There are already many Internet companies in China involved in the blockchain field, what is the relationship between Xunlei Play Guest Cloud, 360 Shared Cloud, Baidu Letz Dog, NetEase Planet, these products and blockchain?