[eos1]eosio 2.0简介
本人是个程序员,对技术并不是多感兴趣,只是一直将其看作生存的一项技能而已,直到比特币和区块链技术的出现,打破了我的之前想法,为我打开了一扇大门。
对btc有一定的理解,看过《Mastering Bitcoin》。对Hyperledger Fabric也有一定了解,但是忘差不多了。由于工作原因,最近一直没有继续深入学习区块链方面的知识,总感觉再不学习就要被淘汰了。
所以,计划从现在开始对eos进行相关学习,在此记录下自己的学习历程。
学习的方式:以阅读官方文档和实践为主,阅读中文资料为辅。
本次学习以这个链接作为切入点。https://eos.io/news/introducing-eosio-2/
eosio 2.0 增强性能、提升安全、提供新的开发工具
总结
- EOS VM: A high-performance WebAssembly (WASM) engine specialized for blockchain applications that facilitates more efficient use of system resources when processing smart contracts and substantial performance gains.
- EOSIO Quickstart Web IDE: A powerful, new, self-contained, web-based integrated development environment for building EOSIO smart contracts and associated web applications. It can be set up in minutes, run in any browser, and helps lower the barrier to entry for new EOSIO blockchain developers.
- WebAuthn Support: A widely accepted secure authentication standard that enables transaction signing without browser extensions or additional software.
- Weighted Threshold Multi-Signature Block Production Support: A secure way for block producers to use different keys to sign blocks on primary and backup block production hardware.
关键点提取
-
We believe the single biggest bottleneck for blockchain development is the speed in which they can execute smart contracts.
-
EOSIO was the first blockchain software to use a WebAssembly (WASM) engine to improve performance, but in time, we outgrew existing general purpose WASM engines and knew we could do more.
-
eos vm三件套
-
A Trio of Powerful Components for Blockchain WebAssembly Execution
The EOS VM Interpreter is a WebAssembly interpreter providing extremely fast parsing/loading, and deterministic and efficient time bound execution. Designing the interpreter from the ground up has enabled us to make room for future debugging support for smart contracts.
The EOS VM Just In Time (JIT) compiler is a WebAssembly compiler that takes WASM and generates native code on the fly. This architecture enables very fast execution of WASM smart contracts and provides significant performance benefits over interpreters like WABT, Binaryen, and the EOS VM Interpreter. The sheer speed of this JIT solution allows us to use it on the blockchain without the long block compiling times of other solutions.
The EOS VM Optimized Compiler is the third component of EOS VM and it uses a specialized compiler framework (LLVM) that leverages a multipass compilation architecture. The resulting native code from the Optimized Compiler is often an order of magnitude faster than the same code executed within WABT, Binaryen, EOS VM Interpreter, and EOS VM JIT. Most importantly, it is even faster than the existing WAVM engine, but unlike WAVM it can be used safely on the blockchain utilizing our tier-up design.
前置知识
WebAssembly:https://www.zcfy.cc/article/an-abridged-cartoon-introduction-to-webassembly-ndash-smashing-magazine
LLVM:https://www.jianshu.com/p/1367dad95445
思考
-
1、了解eos的大致运行机制,如交易、出块等基本原理
我们先从宏观上概括一下, EOS的运行机制。请注意,这是一个非常简略的描述,我们后续会逐渐展开各部分的细节。用户发起一笔转账操作之后,这一交易会传播到主网之中;
当前出块的节点会监听网络之中的交易信息,并进行区块打包、入库、广播等过程;
打包节点会确认区块,并开始区块上链的流程,此时区块为可逆状态;
每个出块节点每次出块12个,每个区块时间为0.5s时间,就是说,每个BP会出块6s,然后换下一个出块节点;
其他的节点也会对区块进行确认;经过两轮确认之后(一轮为precommit验证区块存在,一轮为commit确认状态),区块会成为不可逆状态(需要得到2/3+1的节点确认).
-
2、eos vm三件套的关系
https://www.jianshu.com/p/34dbc3f0a4b8
三件套关系暂不清楚,后续解决