Blockchain School (4): Basic Concepts and Tools of Ethereum Geth, Browser-solidity, Mist

In the process of my research on Ethereum technology, I took a lot of detours due to the lack of relevant information. Therefore, here we will not introduce the syntax structure of Solidity first, but will introduce the three major tools of Geth, Browser-solidity and Mist in the next first stage, starting from actual combat, and continue to explain Ethereum in the process. basic concept.

Through the practical use of these tools and the continuous deepening of the understanding of the basic concepts of Ethereum, the second stage of learning the solidity language can be multiplied with half the effort (after all, language learning is very fast, especially for a js-like language)

Basic Concepts of Ethereum

  • Ethereum, in the simplest terms: blockchain technology + smart contracts.
  • Like the blockchain technology, Ethereum has Transactions and Blocks. The relationship between accounts needs to be executed with Transactions. Any Transaction needs to be generated by mining blocks.
  • The difference between Ethereum and the original Bitcoin technology is that
    1. Realize the smart contract based on Solidity language, and regard the smart contract as a special account, so that specific methods can also be implemented on the smart contract
    2. The EVM (Ethereum Virtual Machine), which can execute smart contracts on the ground, is realized. Through the Ethereum virtual machine, js-like code such as solidity is turned into encrypted code that can be executed on the blockchain.
    3. Unlike Bitcoin technology, transactions in Ethereum require gas. The gas of a contract or transaction is fixed (depending on the size and complexity of the code), and the price of gas is determined by the oracle in Ethereum. Decide.
    4. At the same time, Ethereum has also built a relatively complete and open source ecosystem, not only the underlying geth, programming solidity, contract online browser browser-solidity, contract wallet Mist/wallet, Ethereum's front-end development framework Truffle, various Such open source DApps, etc., are convenient for everyone to get started quickly and develop blockchain applications suitable for landing.
  • If you are interested in blockchain technology, please contact me, or visit our etheric Chinese website http://www.ethchinese.com

Geth tool introduction

  • The Geth tool is Go Ethereum, the official client of Ethereum (implemented in Go language)
  • Through some basic commands of Geth, it is very convenient to create a private chain of Ethereum.
geth --datadir "./" init genesis.json
geth --datadir "./" --nodiscover console 2>>geth.log
  • Geth's command line contains most of the Ethereum commands, including account creation, ether transfer between accounts, mining, getting balance, deploying Ethereum contracts, etc.
  • Of course, the shortcomings of Geth are also obvious. Geth is still a low-level content, and many operations require more complex inputs. So we will introduce Browser-solidity

Browser-solidity

  • This is a browser compiler for Ethereum smart contracts. You can directly access the website. Of course, if you think the speed is too slow and unstable, you can also build it yourself.
  • Because Browser-solidity runs in memory, it is very fast, and for some simple functions, such as arithmetic operations, it is very easy to develop and debug.
  • In Browser-solidity, we will repeat some basic concepts to you, such as transaction, gas, account, etc.
  • The disadvantage of Browser-solidity is also obvious, that is, because it runs in memory, it is quite powerless for contract development, debugging & testing involving accounts. Therefore, I will introduce Mist, the official wallet tool, to you.

Mist

  • Mist is the official wallet of Ethereum. It can not only connect to the production network, test network, but also connect to our own private network by setting parameters.
  • After Mist is connected through the geth.ipc file, it is completely integrated with the network established by Geth. The contract deployed on Mist is actually deployed on the geth network. New accounts on the geth network can also be seen on the Mist tool.
  • Through Mist, we explained the core concepts of Ethereum in more detail, including: block, transaction, gas, account, contract, constructors, variables and methods in contracts.

The introduction of Geth, Browser-solidity, and Mist provides us with a good tool for developing, debugging and testing our smart contracts.

In the next article, we will formally introduce the three major tools Geth/Browser-solidity/Mist to you.

The next chapter starts with an introduction to the basics of Ethereum, the Geth client

Original link: http://www.ethchinese.com/?p=651


QQ group: 559649971 (Blockchain Academy fan group)
Personal WeChat: steven_k_colin

For the latest blockchain consultation, please pay attention to the WeChat public account of "Ether Chinese Network": Ethereum Chinese Network

Guess you like

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