Developer Activity: Three-day Review of Wuhan Substrate Seminar
Phala可信网络
2020-12-16 02:10
本文约3242字,阅读全文需要约13分钟
Technology-driven, technology-first.

Developer Activities | Wuhan Substrate Seminar Three-Day Review

From December 10th to December 13th, Yin Hang and Wang Zhe of Phala team went to Wuhan together with Crust CTO Fan Zikun, Litentry developer Wu Yifei, Yiyi + Community Yaxun, Substrate developer Guo Bin, and Long Jingqi, and Huazhong University of Science and Technology The School of Software, the School of Education and Training of Huazhong University of Science and Technology, and the Data Science and Big Data Special Committee of the Operations Research Society of Hubei Province jointly organized the first training course on blockchain technology (advanced) in Wuhan (hereinafter referred to as the training course).

This course mainly revolves around the basic principles of blockchain technology and the development of Substrate blockchain. Substrate is a blockchain framework created and developed by Parity, a blockchain development team led by Ethereum co-founder Gavin Wood in 2018. It is also one of the latest, most cutting-edge, easiest-to-use, and most supported blockchain frameworks in the current blockchain field. The blockchain based on the Substrate framework realizes easy blockchain construction and cross-chain operations. The Substrate framework encapsulates all the modules necessary for a blockchain system, and integrates cutting-edge technologies such as libp2p and WASM, making blockchain development easier.

In just a few days, we have taught many practical and interesting topics, let's take a look👇

Part 1: Brief History and Application Scenarios of Blockchain

At the beginning of the chapter, Phala co-founder & COO Wang Zhe gave a brief introduction to the development of blockchain. In the class, he popularized the characteristics and classification of blockchain for students, as well as the application scenarios of blockchain technology that have been integrated with industries, such as supply chain finance, agricultural traceability, insurance, confidential sharing of medical data, and blockchain official seal , DCEP and so on. In the class, he hopes that every enthusiast and developer who joins this industry or wants to learn related technologies realizes that technology is the foundation and technology comes first.

From the 1.0 era represented by Bitcoin to the 2.0 era represented by Ethereum, the blockchain has completed the upgrade from a single asset transfer to programmable computing. However, the new generation of blockchain technology led by Substrate technology makes blockchain development and data interaction on the chain extremely simple. —— Wang Zhe

Part 2: Getting Started with Blockchain

In the second part, Ya Xun, the founder of Yiyi+, the largest blockchain developer community in China, gave an overall introduction to the concept of blockchain. She briefly introduced the industry status and background of blockchain development, the trend of blockchain development, and the necessary competencies for blockchain development.

Developer basic ability requirements:

1) Understand the characteristics of blockchain and the problems it tries to solve;

2) Familiar with the core functional components of the blockchain;

3) Master the development model of typical decentralized applications;

4) Combining different technologies with blockchain to solve real-world problems, etc.

—— Ya Xun

Part 3: Rust language entry & advanced

In the third part, Guo Bin, Polkadot China Ambassador, Substrate online course ambassador, and master of blockchain at Beihang University, gave a brief introduction to Rust and the macro language.

First, he introduced the famous attack on Ethereum in the history of the blockchain: the hacker called the extcodesize command and launched 50,000 attacks on a single block. The Parity client based on Rust still provided services normally despite the pressure, and became famous from then on. , Rust has gained a lot of attention in the blockchain field;

In addition, around the application of Rust language in Substrate, he gave a detailed explanation from the aspects of Rust language data type and process control, type system and ownership mechanism, Rust&Substrate macro design pattern, etc. In particular:

  • Understand the history, features and compilation process of Rust language;

  • Familiar with common data types and design patterns of Substrate;

  • Understand how the Rust type system and ownership work;

  • Master the basic ability of using the Substrate development framework for practical development.

The combination of Rust and blockchain is a very wonderful experience, not only because Rust allows us to write complex and high-performance software with confidence, but also because it is fun to write, easy to read, and zero-cost abstraction. The history of blockchain development is a history of struggles with hackers. We have reason to believe that this "little crab" can make the blockchain industry more prosperous! —— Guo Bin

Part 4: Getting Started with Substrate Development and Privacy Computing

In the fourth part, Yin Hang and Fan Zikun, excellent developers of the Substrate ecosystem, combined their own project development experience to describe in detail the difficulties that should be paid attention to and considered during the development process.

Crust CTO Fan Zikun explained the process of issuing a chain on Substrate step by step from Rust, Wasm to Node-template, polkadot.js. In this sharing, he focused on the topic of "Substrate Advanced Application Development", from the detailed introduction and installation of Polkadot-JS App, the explanation of common functions, the use of Substrate to build blockchain and its application in distributed storage, etc. Detailed explanation. Through this course, let the students understand the basic components and composition of the blockchain, the basic knowledge of Substrate, the principle of Polkadot Host (the underlying principle of Substrate), build their own chain through Substrate, understand and use Polkadot-js/apps and about Distributed storage and Crust Network.

Decentralized Storage Network (DSN) is a storage business model that uses distributed storage technology to store files or file collection fragments in the storage space provided by the supplier. Technically speaking, similar to BitTorrent, the content addressable network constructed by DHT can ensure that any resources declared in the network can be found and accessed. The Crust Network encourages individuals to provide storage resources and constructs a decentralized, edge-side storage network in a decentralized manner. —— Fan Zikun

Yin Hang, the co-founder and chief developer of Phala, popularized blockchain security technology and privacy-related knowledge for everyone. Taking the Phala confidential smart contract as an example, he explained the principle, implementation and gameplay of blockchain security technology. At the same time, he said that if the TEE security technology is combined with the underlying Web2 technology such as Google Cloud, the security, scalability, and availability will be very high, and the application prospects will be very broad. this aspectPhala Public AccountThere are already sufficient video materials, so I won't repeat them here.

Link to Yin Hang’s handout: https://docs.google.com/presentation/d/1RbSAS55UE8clOhV0cEOGvb5tcCzjf2w85NLsiE5U0xE/edit?usp=sharing

Part 5: Two Workshops

Polkadot technology ambassador and Litentry community developer Wu Yifei explained how to interact with on-chain and off-chain data with "Use Offchain workers to obtain Ethereum data". First, he introduced the basic concepts of off-chain workers and the advantages of off-chain workers in substrate. Then it explains some basic knowledge that will be used in off-chain workers, including dependencies, signature types, and basic structures. Finally, I took everyone to start coding and debugging together, and realized a function of using off-chain worker to obtain the balance of the Ethereum account. Students complete the following tasks to pass the level.

  • Associate Ethereum account through substrate

  • Use Off-chain workers to make http requests

  • Parse the results of the http request

Long Jingqi, a Substrate developer from Phala, used the CryptoKitties NFT blind box to demonstrate the actual combat case of Rust and Substrate——Substrate Kitties. CryptoKitties (CryptoKitties) is an NFT game that was very popular on Ethereum in the early years. A rare encryption can be sold for $100,000. Long Jingqi taught on the spot how to combine the Phala confidential smart contract to build the Substrate version of CryptoKitties, and it comes with the unprecedented gameplay of [Blind Box NFT]. Different from its predecessor, the content of the blind box NFT CryptoKitties is invisible until the user performs the [unpacking] operation, which greatly increases the fun of NFT gameplay and expands the possibility of NFT. Students complete the following tasks to pass the level.

  • Build a basic blind box

  • The back-end output that reminds the user that a blind box has been disassembled

  • Set the NFT price on-chain and ensure only the NFT owner can change the price

From new contact to actual combat development, I believe that these three days full of dry goods are precious gains for both enthusiasts and developers. Phala will also continue to popularize Substrate and Phala in more developer activities to help more developers realize more gameplay and applications.

About Phala

Phala NetworkyesPolkadotandpLibraandWeb3 Analyticshas been obtained twiceweb3 foundation grant 。Substrate Builders Programfirst members.member.member.member.member.

Phala可信网络
作者文库