[Blockchain] A preliminary study of Ethereum blockchain technology

[The first in China] Ethereum blockchain practical teaching : http://edu.csdn.net/course/detail/6455

LinApex Profile

    Struggle in the blockchain network in the digital currency trading platform, the underlying framework design, the blockchain wallet, the first line of blockchain solutions, has done artificial intelligence, financial payment industry, and is currently working on a blockchain + gold App system .

Play earning blockchain QQ group: 128148617

 

Serial series (based on Ethereum)

    Development series

        1. [Blockchain] A preliminary study of Ethereum blockchain technology

        2. [Blockchain] Ethereum blockchain environment construction

        3. [Blockchain] Understanding the concept of Ethereum blockchain

        4. [Blockchain] Ethereum blockchain technology advanced

    Source series

        1. [Ethereum Source Code] Compile the Ethereum source code to create your own public chain and private chain

        2. [Ethereum source code] Ethereum source code research series (Ethereum simulator, mining, peer-to-peer network library, node discovery, contract code transmission, encrypted signature, etc.)

 

Basic Concepts of Blockchain

    A blockchain is a distributed database maintained by a collective formed by means of cryptography.

    The concept of blockchain is very popular recently. It comes from the realization of cryptocurrencies such as Bitcoin, but at present, this technology has been gradually applied in various fields. What is blockchain technology? In order to understand this problem perceptually, we can use the example of Google Earth as an analogy. Ajax is not a new technology, but when combined together, the product Google Earth is achieved. Similarly, blockchain is not a new technology, but it is similar to encryption and decryption. The combination of technology, P2P network, etc., gave birth to Bitcoin. Technicians, especially web development engineers, learning about ajax technology were first attracted by the cool effects of Google Earth. And now, history repeats itself again, many people are attracted by the crazy development of Bitcoin, and then start to study the technology behind it - blockchain.

    As the technology behind Bitcoin, blockchain can realize open, transparent and traceable storage data without a central server. It was originally a unique way of storing data in cryptocurrencies such as Bitcoin. It is a self-referential data structure used to store a large amount of transaction information. Each record is linked in an orderly manner from the back to the front. Features for easy traceability. In fact, this characteristic also directly reflects the characteristics of the entire Bitcoin, so it is very intuitive and appropriate to use the blockchain to summarize the technical implementation behind the cryptocurrency. Blockchain is a technology, and cryptocurrency is a class of products developed and realized by it (including tokens and blockchain products without tokens), which cannot be equated or confused. Compared with cryptocurrencies, the name blockchain puts aside the concept of tokens, is more visual, technical, and depoliticized, and is more suitable for research and promotion as a technology.

    Therefore, at present, when everyone talks about blockchain alone, it refers to blockchain technology, which is an architectural design method for products that realize open, transparent, and traceable data, and is regarded as a blockchain in a broad sense. When talking about blockchain in a specific product, it can refer to a data storage method similar to Bitcoin, perhaps a database design, or a design in the form of a file, which is regarded as a blockchain in a narrow sense. Blockchain technology in a broad sense must include four aspects: point-to-point network design, application of encryption technology, implementation of distributed algorithms, and use of data storage technology. Others may involve distributed storage, machine learning, VR, Internet of Things, Big data, etc. Blockchain in a narrow sense only involves data storage technology, database or file operations, etc. The blockchain in this article refers to the generalized blockchain.

 

Blockchain Architecture

 

blockchain terminology

1. Specific users: refer to users who must cooperate with Consensus to fulfill their personal information disclosure obligations in accordance with Chinese laws, regulations and policies.
2. Private key: It is composed of 256 random characters and is the core of digital tokens owned and used by users.
3. Public key: The private key is generated by one-way derivation with the help of cryptographic principles, and is used to generate the blockchain digital wallet address. The digital wallet address is the public payment address.
4. Mnemonic words: In line with the blockchain BIP39 industry standard, it consists of 12 (or 15/18/21/24) ordered words generated by random algorithms. It is an easy-to-record representation of the private key, which is convenient for users to back up and keep.
5. Keystore: It is a file format in which the private key or mnemonic is encrypted and saved by the wallet password set by the user. It is only stored in your mobile device and will not be synchronized to the Consensus server.
6. Digital tokens: refers to the types of digital tokens currently supported by Ethereum, including but not limited to ETH, DGD, etc.
7. Personal information: refers to various information recorded by electronic or other means that can identify the user’s personal identity alone or in combination with other information, including but not limited to the name, date of birth, ID number, personal biometric information, address of a natural person , phone number, bank card number, email address, wallet address, mobile device information, operation records, transaction records, etc., but does not include the user's wallet password, private key, mnemonic, Keystore.
8. Decentralization: This system can start running on the Internet autonomously after the rules are initially set, without relying on the central server and regulatory agency, and each participating node is equal and free to compete. It is a decentralized autonomous system (DAC).
9. Ethereum: Ethereum (Ethereum) is not an institution, but an underlying system that can realize smart contracts and open source on the blockchain. From the birth of Ethereum to May 2017, it took only three and a half years. , more than 200 Ethereum applications have been born around the world. Ethereum is a platform and a programming language that enables developers to build and publish the next generation of distributed applications. Ethereum can be used to program, decentralize, secure and trade anything: voting, domain names, financial exchanges, crowdfunding, corporate governance, contracts and most agreements, intellectual property, and smart assets that benefit from hardware integration.

To be continued~
 

Common URLs of Ethereum

1. Ethereum official website: https://ethereum.org/

       This website is the official website of Ethereum. It has a detailed introduction to Ethereum and various connection addresses. It is recommended to take a look at it in detail.

2. All source addresses of Ethereum (official): https://github.com/ethereum/

       This github is the source address of all projects in Ethereum, as well as updates and releases.

3. Ethereum Homestead documentation address (official): http://www.ethdocs.org/en/latest/index.html

       This website is a detailed introduction document of Ethereum, which basically covers all aspects of Ethereum. If there are any unclear principles and applications, you can basically find answers and clues here.

4. Ethereum network status address (official): https://ethstats .net /

       The website can comprehensively display the network status, including nodes, difficulty, computing power, etc., very intuitive

5. Ethereum resource website (official): http://ether.fund/

       The website provides many application resources of Ethereum, such as market conditions, contract auxiliary tools, released smart contracts, Ethereum network, DAAP, etc., to facilitate development and release.

6. Solidity programming documentation (official): http://solidity.readthedocs.io/en/latest/

       This website provides a comprehensive reference manual for the Ethereum Solidity language, which is a must for learning the Solidity language.

7. Ethereum network scan (official): http://etherscan.io/

       The website provides various statuses of the Ethereum network, such as account details, TOKEN details, difficulty details, and block details, which are very convenient and intuitive.

8. Ethereum official blog: https://blog.ethereum.org/

9. Ethereum wiki encyclopedia address: https://github.com/ethereum/wiki/wiki

       There are white papers, yellow papers and development guides here, which are more comprehensive.

10. Ethereum Chinese fan website: http://ethfans.org/

       This website is a website established spontaneously by domestic Ethereum enthusiasts. The content is relatively complete and the information is updated quickly.

11. Ethereum's gitter real-time communication website: https://gitter.im/orgs/ethereum/rooms    

       This website is the website of Ethereum's gitter chart. It is divided into many rooms according to the project. As long as you ask questions, most of them will answer them, which is very good, but you can only communicate in English.

12. The official forum of Ethereum: https://forum.ethereum.org/

      The official forum, nothing to say, a few questions I encountered, all the answers found here

13. A third-party powerful IDE for Ethereum: https://live.ether.camp/

        This is the Solidity IDE released by a third party. I took a look at it. It is very powerful, and it is too powerful to be used. His goal is an enterprise-level IDE, and foreigners use it more.

14. Truffle manual for Ethereum development framework: http://truffle.readthedocs.io/en/latest/

        The manual of Truffle, the current popular development framework of Ethereum, this framework is more popular.

15. The dapple manual for the Ethereum development framework: http://dapple.readthedocs.io/en/master/

        This development framework is seen on the gitter chart. I feel that there are not many people using it. Let's observe it first.

16. Meteor manual for the official recommended development framework of Ethereum: https://github.com/ethereum/wiki/wiki/Dapp-using-Meteor

        This development framework is officially recommended by Ethereum and has been written into the official wiki of Ethereum. It is worth learning. Of course, the Ethereum official often changes directions, and it may not be possible to change it in the future.

 

Description of various projects in Ethereum

(1) Go -ethereum project

    Development language: go language

    Client file: Geth

    Interface: Command Line

    Applicable platforms: windows, linux and OSX

    Functions and features: This project is the most widely used Ethereum client. Most nodes are running this client. It also has the most tutorials and examples. It is recommended to use. It can be used for mining, building private chains, managing accounts, and deploying intelligence. Common functions such as contracts cannot be compiled into smart contracts.

(2) webthree-umbrella project

    This project contains 3 clients

    Development language: c++

    Client files: AlethZero, Mix and Eth

    Platforms used: windows, linux and OSX

    Interface: Graphical interface

    Functions and features: Strictly speaking, this project is a shell of the cpp-ethereum project. It was written by Gavin Wood, the former CTO of the Ethereum Foundation, so it is very popular and easy to use. AlethZero is a graphical wallet client, which corresponds to the function of Geth, but is fully graphical. However, with the subsequent launch of Mist, a graphical wallet promoted by the Ethereum Foundation, it gradually declined. Mix is ​​a development IDE for smart contracts (called DAPP in Ethereum), which can support the writing, debugging, deployment, and full graphical interface of smart contracts (DAPP). Eth is a command-line client written in C++ with the same functionality as Geth.

(3) Mist project

    Development language: JavaScript

    Client file: Mist (currently using the name Ethereum-Wallet)

    Platforms used: windows, linux and OSX

    Interface: Graphical interface

    Functions and features: This project is the main project promoted by the Ethereum Foundation. Mist is positioned not just as a wallet, but as a future DAPP (application APP for smart contracts) market, similar to the Apple market, where you can have your account and browse , DAPP applications for publishing and buying and selling Ethereum. At present, because the development is not comprehensive enough, the name is temporarily displayed as Ethereum-Wallet, and the function is also very simple, that is, the function of a wallet. Highly recommended, future mainstream clients.

(4) Solidity project

    Development language: C++

    Client file: solc

    Platforms used: windows, linux and OSX

    Interface: Command Line Interface

    Functions and features: This project is the programming language of Ethereum smart contracts (DAPP), using solc as the compiler, this project is mainly used for compilation, strictly speaking, it is a basic compilation platform, and MIX can be used as an alternative for general development.

(5) The browser-solidity project

    Development language: C++

    Client file: displayed in browser

    Platforms used: windows, linux and OSX

    Interface: Browser interface

    Functions and features: This project is a development environment for the browser version of smart contracts, which can support direct development, debugging and compilation in the browser. For beginners, it can be used quickly without installation, which is very convenient and can be used directly by accessing the address. : https://ethereum.github.io/browser-solidity/

(6) pyethereum project and ethereumj project

    The pyethereum project is an Ethereum client written in the Python language, and the ethereumj project is an Ethereum client written in the Java language, but the language is different, and the functions of the client Geth written in the GO language are exactly the same.

(7) Ethminer Project

    Development language: C++

    Client file: ethminer

    Platforms used: windows, linux and OSX

    Interface: Command Line

    Functions and features: This project is part of the cpp-ethereum project, which is used for GPU mining with Geth, which is more than 100 times more efficient than CPU mining, and can also be used for mining pools

 

 

What problem was the blockchain created to solve?

When Alipay transfers money, as a user, you feel that you are directly transferring your money to the other party's account. but! .... the facts are this:

Alipay and other companies here are "third parties", so why should there be a "third party" for the two of us to transfer money?

This is a passage from Alibaba's documentary "Dream Maker", ps: I will quote it many times below, which can explain the term "third party" very well. This is also the beginning of the birth of Taobao and Alipay. In other words, Ali was forced to be this "third party" at that time, because no company could play such a role at that time, so Ali became the center of trust, and merchants and users chose to give money to them because of "trust". Ali. But what if Ali absconded with the money (although it's impossible...) or something went wrong with the financial operator (it's a human after all...)? It would be nice to have a machine or a "super system" to do these things! Today, more than ten years after the replacement of Internet technology updates, the blockchain appears in front of us, yes! It's that "super system"! A trusted machine .

With blockchain, things are starting to look different.

Traditional centralized way:

The "decentralized way" under the blockchain network:

Under the decentralized network, each user can be directly connected, and there is no longer any third-party participation. The transfer between users is like hand-delivering cash, which is why Bitcoin is called "Electronic Cash".

Well, now that A has transferred the money to B, who will keep the account? Before, Alipay helped me to keep accounts and reconcile accounts, which will be stored in the Alipay background system. In order for all users' transactions to be recorded and the accounts to be correct, Alipay will make great efforts for this. Look at the early days of Alipay...

1000 bills a day, manual reconciliation is already very painful. With the current size of Alipay, there are as few as hundreds of thousands of bills per day. Even system reconciliation will inevitably miss bills, and corresponding manpower and material resources are required to maintain this very complex income and expenditure settlement system. Having said so much, how does the blockchain reconcile accounts? The answer is: no! There is no need for reconciliation and zero settlement in the blockchain network, because each node in the blockchain (that is, a computer or understood as a user) has its own ledger, which is updated in real time. Any transaction that occurs in the blockchain network will be recorded in your own ledger. Yes, you also have other people's accounts, but you don't know who this person is, because they all look like this:

0x3c7e7bd1ff2952fbf5a16d0d8b0fc2803162b088

This means that, in the past, a centralized organization helped you book and reconcile accounts, but now every participant in the network helps you keep accounts, and everyone has the same ledger. As shown below

Everyone has the same ledger. Even if you tamper with your own ledger and add 100 million to your account, but more than 51% of the ledger still has 1 cent in your account, it means that the balance on your account is 1 cent, irrefutable. Of course, if you can control 51% of the people in the network to help you turn a penny into 100 million in the ledger, you can get 100 million, but basically you have to use the power of the whole country... Sao Nian, you Are you sure you can?

This is why people say that the blockchain network is safe, because the cost of attacking is too huge. For example: Bitcoin is now worth 8 billion US dollars. If you want to break it and get this 8 billion US dollars, you may spend more than 200 Billion dollars... Having

said so much above, I actually want to illustrate several features of the blockchain:

  1. Decentralized, there is no third-party intermediary, everything is done by the program.
  2. Security is mainly reflected in distributed, 51% attack, even if a node is attacked or down, it will not affect the operation of the network.
  3. The most important thing is to trust. All social behaviors must be based on "trust", which is also the most fundamental problem solved by blockchain.

 

The landing scene of the blockchain

    Global P2P Leasing https://atlant.io/cn/#contribute

    JD Blockchain https://www.leiphone.com/news/201612/VGtxUJDpj12JswTv.html

    WeBank : Loan Settlement
    China UnionPay: Points Exchange
    Ripple: Cross-border Payment
    ABRA: Cross-border Payment
    Circle: Domestic and Overseas Payment
    BTCJam: Internet Lending
    Wave: Supply Chain Finance & Trade Finance
    Chain: Equity Transaction Issuance
    ShoCard: Identity Recognition

 

technical books

"Blockchain Technology Guide"  CSDN must set a score, so I got a minimum of 2 points, I thought it would be free.

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324426613&siteId=291194637