Truffle Ethereum client
the first stage: the basic theory of blockchain technology is suitable for students who have various needs for blockchain technology. It is the most comprehensive and up-to-date curriculum system at present. With the rapid appreciation of bitcoin, blockchain technology has become more and more sought after and studied by people from all walks of life, Or from the perspective of technology research and development, this set of courses are very suitable for you to download and learn. Schele: Lesson 1 ICO & amp; EOS understands the risks of ICO and ICO projects, How to judge whether an ICO is reliable lesson 2 the past and present of bitcoin blockchain understand the origin and related background knowledge of bitcoin and blockchain lesson 3 cryptography master the necessary knowledge of blockchain related cryptography lesson 4 bitcoin transaction in-depth discussion of what happened behind bitcoin transaction lesson 5 block generation and link in-depth discussion of how blockchain is generated Lesson 6 bifurcation principle of blockchain and how to operate the coins in hand before and after the bifurcation Lesson 7 how does the wallet know how much money I have and how to hold the coins in hand more safely Lesson 8 mining understanding the history and principle of mining, Experience mining in bitcoin regression test environment Lesson 9 blockchain security, understand the security problems of blockchain, how to "steal" other people's money Lesson 10 smart contract learn the principle of blockchain 2.0 smart contract, understand how the smart contract is written and run
2
stage 2: introction to blockchain technology research and development, Blockchain technology is a very popular new technology at present, which is highly praised by large IT companies and experts all over the world. Not long ago, the blockchain technology platform enterprise Ethereum Alliance (EEA) announced its formal establishment, and nearly 30 giants including JPMorgan Chase, Microsoft and Intel joined in. Extremely optimistic about the future of Ethereum. At present, the term blockchain is very popular, but few people really understand blockchain technology. If you no longer want to be a onlooker, you are welcome to learn this course. After learning this course, you can master the following contents: deeply master the blockchain technology, understand what mining is, learn how to build your own blockchain network, how to publish your own applications on your own blockchain network or enterprise Ethernet network, and how to write smart contracts, Blockchain technology applications. This course is based on practical teaching, mainly teaching front-line practical skills, to ensure that students can quickly learn to apply! Timetable: 1. Introction to blockchain 1.1 introction to blockchain technology 1.2 blockchain platform, Ethereum, an open source blockchain technology platform 1.3 Ethereum working principle, Ethereum virtual machine, account 1.4 what can Ethereum do, Blockchain technology application appreciation 1.5 Ethereum white paper 2. Client installation and operation 2.1 client installation 2.2 Ethereum account creation and management 2.3 multi signature account 2.4 Ethereum 3. Ethereum network 3.1 Ethernet network type 3.2 building local private network, User defined Genesis block 3.3 mining on local private network 4. Introction to smart contract programming 4.1 Ethereum multiple private nodes networking 4.2 multiple nodes, Introction to writing, deploying and using smart contracts 4.3 introction to development language solidy 4.4 introction to building development environment 4.5 basic variable types 5.solidy complex variable types 5.1 enumeration 5.2 structure 5.3 mapping 5.4 delete 5.5 common attributes and methods of block and transaction 6.solidy method 6.1 anonymous method 6.2 modifier 7.solidy inheritance and event 8.solidid Y programming practice 8.1 smart contract -- "vote" 9.solidy programming practice 9.1 smart contract -- "create your own token" 9.2 smart contract -- "public auction" 10.decentralized application DAPP project practice 10.1 Ethereum Web3 interface 10.2 building Ethereum online wallet 10.3 building the development framework of truss on Windows
3
Level 3 In addition to video tutorials, we have also collected a number of classic e-books for students to learn and understand the knowledge of blockchain technology. These e-books are expensive, and published relatively new, reading format is very rich, not just PDF kind, suitable for mobile phone installation of common reading software. Lesson schele: 1. How blockchain will redefine the world; 2. Blockchain Society: decoding global application and investment cases of blockchain; 3. Blockchain Revolution: how bitcoin underlying technology changes currency, technology and technology Business and the world 4. Blockchain: from digital currency to credit society 5. Blockchain: technology driven finance 6. Blockchain: Reshaping economy and the world 7. Illustrated blockchain 8. The age of artificial intelligence, A book reads block chain finance "(Internet plus era enterprise management real battle Series) 9." block chain technology guide "10." block chain: define the new pattern of future finance and economy "11." business block chain: open a new era of encryption economy "12." Accenture ":" block chain + "13." bitcoin "
there is no central server in Ethereum. Instead, there are many equal nodes connected by P2P protocol, which store all the data in many nodes. When a user initiates a transaction, the transaction will be broadcast out through P2P protocol. The miner node verifies, packages and further broadcasts the transaction to the whole network. After confirmation in the blockchain, the operation is considered to be unchangeable
in the articles on blockchain on the Internet, the two words distributed and decentralized are mentioned, sometimes slightly different, sometimes mixed. The author thinks that if we want to distinguish accurately, the distributed system emphasizes that multiple components work together by sending messages, and the decentralized system emphasizes that there is no central node to control the operation of the whole system. Therefore, we think that Ethereum is both decentralized and distributed, or running a decentralized program on a distributed platform.
like many other languages, when accessing state variables, it is not necessary to add a prefix such as this
this contract can't do a lot (limited by Ethereum's infrastructure), it just allows anyone to store a number. And anyone in the world can access this number. There is no reliable way to protect the number you publish. Anyone can call the set method to set a different number to cover your published number. But your numbers will remain in the history of blockchain. Later we'll learn how to add an access limit so that only you can change the number
token example
the next contract will implement a cryptocurrency in the simplest form. Taking money in the air is no longer a magic trick. Of course, only the person who creates the contract can do it (it's also very easy to use other currency issuance modes, just to realize the differences in details). And anyone can send money to others, without registering a user name and password, as long as there is a pair of Ethereum public and private keys
note
this is not a good example for online solidness environments. If you use the online solidity environment to try this example. The address of from cannot be changed when the function is called. So you can only play the role of a coiner, you can cast money and send it to others, but you can't play the role of others. This online solidity environment will be improved in the future.
built in smart contract compilation, linking, deployment and binary file management
automatic contract testing under rapid development
scripted and extensible deployment and publishing framework
the network environment management function deployed to no matter how many public or private networks
uses the package management provided by ethpm & NPM and erc190 standard
a direct interactive console that communicates directly with the contract (after writing the contract, you can verify it on the command line)
the configurable construction process supports tight integration
external scripts can be executed in truffle environment< Truffle is the most popular development framework, whose mission is to make development easier
installation method:
$NPM install - G truffle
environment requirements
nodejs 5.0 +
windows, Linux, or Mac OS X
truffle needs Ethereum client and supports standard JSON RPC API. For development, some are more suitable, which will be introced in the following chapters (for example, testrpc provides real-time feedback ring coding and debugging)
suggestions for Windows users
if you are a Windows user, we recommend that you use PowerShell or git bash to install and use the truffle framework. These two shell environments provide more convenient features than the default
if you have to use the command line, see the discussion here on how to configure truffle.
network layer: blockchain network is essentially a P2P (peer-to-peer) network. The resources and services in the network are distributed on all nodes, and the information transmission and service implementation are directly carried out between nodes, without the intervention of intermediate links and servers. Each node not only receives information, but also generates information. Nodes synchronize information by maintaining a common blockchain. When a node creates a new block, it notifies other nodes in the form of broadcast. After receiving the information, other nodes verify the block and create a new block on the basis of the block, So as to achieve the role of the whole network to jointly maintain a bottom ledger. Therefore, the network layer will involve the design of P2P network, propagation mechanism and verification mechanism. Obviously, these designs can affect the confirmation speed of block information. The network layer can be used as a research direction in the scalable scheme of blockchain technology
data layer: the underlying data of blockchain is a data structure of block + linked list, which includes data block, chain structure, timestamp, hash function, Merkle tree, asymmetric encryption, etc. Among them, data block and chain structure can be used as the improvement direction of data layer research in the extensible scheme of blockchain technology
consensus layer: it is the basis for highly dispersed nodes to reach a fast consensus on the effectiveness of block data. The main consensus mechanisms include pow (proof of work), POS (proof of stake), dpos (delegated proof of stake) and pbft (Practical Byzantine fault tolerance), They have always been the highlight of the scalable solution of blockchain technology
incentive layer: it is a common mining mechanism, which is used to design certain economic incentive model and encourage nodes to participate in the security verification of blockchain, including the design of issuance mechanism and allocation mechanism. Improvements at this level do not seem to be directly related to blockchain scalability
Contract layer: mainly refers to various script codes, algorithm mechanisms and smart contracts. Strictly speaking, this layer of the first generation blockchain is missing, so they can only trade, and can not be used in other fields or other logical processing. The emergence of the contract layer makes it a reality to use blockchain in other fields. This part of Ethereum includes EVM (Ethereum virtual machine) and smart contract. The improvement of this level seems to provide a potential new direction for the scalability of the blockchain, but it does not seem to be directly related to the application layer in terms of structure
it is the display layer of the blockchain, including various application scenarios and cases. For example, Ethereum uses truffle and Web3 JS. The application layer of blockchain can be mobile terminal, Web terminal, or integrated into the existing server, taking the current business server as the application layer. The improvement of this level also seems to provide a potential new direction for the expansion of blockchain, but structurally, it doesn't seem to be directly related
the Xueshuo innovation blockchain Technology Workstation of Lianqiao ecation online is the only approved "blockchain Technology Specialty" pilot workstation of "smart learning workshop 2020 Xueshuo innovation workstation" launched by the school planning, construction and development center of the Ministry of ecation of China. Based on providing diversified growth paths for students, the professional station promotes the reform of the training mode of the combination of professional degree research, proction, learning and research, and constructs the applied and compound talent training system.