
Editor's Note: This article comes fromBlockchain Camp (ID: blockchain_camp)Editor's Note: This article comes from
Blockchain Camp (ID: blockchain_camp)
, Author: Second State, Editor in Charge: George, published by Odaily with authorization.
One reason is its glorious mission of "building a simple, borderless currency and financial infrastructure that serves billions of people". Moments of friends swiping screens, community swiping screens, online and offline experts PK, xx discussing swords, supporting, questioning, and opposing, "Libra is too good", "Libra is too good to be blown".
image description
Image source: https://github.com/trending?since=daily
text
It can be said that Libra may be the most anticipated and discussed news in the blockchain field this year so far.
image description
text
The Libra Blockchain is a decentralized programmable database designed to power a low-volatility cryptocurrency that serves billions of people around the world as an efficient medium of exchange.
text
— Libra White Paper
But as technologists, we're most interested in how it applies blockchain technology.
Why does the Libra project require its own blockchain? Where are the opportunities for application developers? What inferences can be drawn from this for enterprises as well as for traditional IT companies? We will discuss these issues in three articles.
1. Libra application development method;
3. How to develop an application based on Libra?
This article is the first part of a series of articles, let's take a look.
Smart contract first

One of the most striking design features of the Libra project is its smart contract-first strategy. Even with a smart contract platform like Ethereum, the execution of a smart contract is just one type of transaction. Ethereum’s native operations are still coin transactions. But Libra is different. Smart contracts are first-class citizens on Libra.
The process of writing smart contracts through Libra Core internal components
The Libra blockchain itself is written in Rust, but applications on Libra are written in a new programming language, Move. All external blockchain interactions are handled by the Move program. On Libra, even the transfer of a coin is also handled by the Move program. Each Libra node runs a virtual machine. The virtual machine executes the program and records the result after the consensus is reached. The author believes that the smart contract-first approach will enable the Libra project to establish a functionally diverse infrastructure, which can also be adapted to future needs.
secondary title
Why Use the Move Programming Language
So, why do we need a new programming language? Because of security and performance requirements. Libra needs to build a new chain, because the current blockchain solutions on the market cannot meet its performance and security requirements.
Facebook and Libra wanted to build a blockchain focused on payments and asset digitization, so they created the Move programming language with built-in support for immutable and non-copyable assets. The Move programming language is a DSL (Domain Specific Language) for digital asset management.
— Alex Mitt, Chairman, Google

image description

image description
text
The Move programming language is static, and it's up to the compiler tools to spot bugs and potential problems.
text
In fact, the current Libra profile only has cases for the Move IR code. Details of the Move source code have not been released at the time of writing.
The Move programming language and virtual machine are the key innovations of the Libra project, but compared with the traditional Solidity and Vyper smart contract languages, as well as the EVM (Ethereum Virtual Machine) and WebAssembly blockchain virtual machine, the Move programming language makes What are the compromises?
secondary title
Most DSL-specific language systems are optimized for specific tasks and thus are not suitable for computing in a broad sense. Libra does not directly indicate whether the Move programming language is a Turing-complete system, but Move is optimized for financial transactions, and the Move system may not be suitable for developing cryptocurrency games or gambling.
secondary title
Move programs are not smart contracts
text
The Move program must be compiled and integrated into a Libra node software to be available to ordinary users. If the Libra blockchain wants to support the new Move program, the entire chain must be suspended, and all two-thirds of the verifier nodes must undergo software upgrades to support the same Move program, which essentially means that every time To add a new Move program to the blockchain, a hard fork is required, during which the blockchain service is suspended. This is not a smart contract, but a chaincode (chain code).
A decisive feature of a smart contract is its ability to deploy and execute new code through consensus in the blockchain as required without suspending services, which is very important for enterprise blockchains or public chains .
secondary title
write at the end
write at the end
text
Each node of Ethereum maintains a global database, and after each block is updated, the database will also be updated; Libra is different from Ethereum, Libra's database is based on different versions, and Libra's state database is updated every Get updated when a transaction completes. For Libra, the concept of blocks is less important than the concept of transactions.
The initial performance goal of the Libra Blockchain is 1,000 transactions per second. Obviously, this is enough for a global payment company or a global e-commerce scenario, because the average TPS of VISA is only around 1700. Libra did not brag about millions of TPS unrealistically and irresponsibly.
secondary title
https://libra.org/en-US/white-paper/
Libra GitHub:
https://github.com/libra/libra
Expand resources:
https://developers.libra.org/docs/assets/papers/the-libra-blockchain.pdf
Libra white paper:
https://developers.libra.org/docs/assets/papers/libra-move-a-language-with-programmable-resources.pdf
Libra technical white paper:
Move language: