In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
In this article, the editor introduces "what is the key concept of Libra protocol" in detail, the content is detailed, the steps are clear, and the details are handled properly. I hope this article "what is the key concept of Libra protocol" can help you solve your doubts.
Libra protocol
Libra protocol is the foundation of Libra block chain. This paper mainly explains some key concepts of Libra protocol.
Deals and statu
We know that blockchain can also be called distributed ledger, and its main function is to store a variety of transactions. In order to facilitate query and improve efficiency, modern block chains will introduce the concept of state to represent the current snapshot of data on the chain at a certain time.
The transaction changes its status, as shown in the following figure:
The figure above depicts the corresponding state change of the Libra block chain when the execution transaction occurs.
Where T is the transaction and S is the state. In order to describe it, we assume that each transaction and state are one-to-one corresponding, T1 corresponds to S1Magic T2 and S2MagneTn corresponds to Sn. The value of n increases with the passage of time.
Suppose we have two users, An and B, in the Sn-1 state, which have 110L BRM and B owns 52LBR. Next, there is a transaction, Tn, to transfer the 10LBR owned by A to B.
A deterministic function F (Sn-1,Tn) = Sn is used here to get the latest Sn.
The deterministic function means that F always returns the same final state for a specific initial state and a specific transaction.
This function F is implemented in Libra using the move language. We will introduce the Move language in detail in a later article.
Detailed explanation of transaction
Transactions record the transmission of information between accounts, which is an important information of the block chain, and each block is composed of transactions. The transactions in the Libra blockchain contain the following information:
Account address of the sender of the transaction
Sender public key-the public key corresponding to the private key used to sign the transaction
Program:
Transaction script for moving bytecode
An optional list of script inputs. For peer-to-peer transactions, enter information about the recipient and the amount transferred to the recipient.
An optional list of mobile bytecode modules to publish.
Gas price: the amount the sender is willing to pay per unit Gas to execute the transaction. Gas is a way to pay for computing and storage costs. The Gas unit is an abstract measure of calculation and has no inherent actual value.
Maximum number of Gas: the maximum amount of Gas allowed to be consumed by a transaction.
Serial number: an unsigned integer that must be equal to the serial number stored under the sender account.
Expiration time: the time when the transaction ceases to be valid.
Signature: the sender's digital signature.
A transaction script is an arbitrary program that encodes the transaction logic and interacts with resources published in the distributed database of the Libra blockchain.
Detailed explanation of the status of the account book
The account status of Libra consists of the status of all accounts in the blockchain. In order to execute a transaction, each verifier must know the global status of the latest version of the blockchain distributed database.
Version database
All data in the Libra blockchain is stored in a single version of the distributed database. The version number is an unsigned 64-bit integer that corresponds to the number of transactions performed by the system.
The version database allows the verifier to do the following:
Perform transactions against the latest version of the account status.
Respond to customer inquiries about the current and previous versions of the book history.
Account
Libra accounts include Move modules and Move resources. It is marked by the account address. This essentially means that the status of each account consists of code and data:
Move modules contains code (type and procedure declarations), but they do not contain data. The module is used to encode the rules used to update the global status of the blockchain.
Move resources contains data, but no code. Each resource value has a type declared in the module published in the blockchain distributed database.
An account can contain any number of Move modules and Move resources.
Account address
The address of the Libra account is a 256-bit value. In the public and private key system, the account address is the encrypted hash of the user's public key. To sign a transaction sent from its account address, the user (or the managed client on behalf of the user) must use the private key corresponding to that account.
The accounts that Libra users can create can be unlimited, but to create an account address, you need to send a transaction from an account that has enough Libra currency to pay for account creation.
Proof
All data in the Libra blockchain is stored in a single version of the distributed database. The storage is used for persistent storage of determined transaction blocks and their execution results. This data is implemented in a growing Merkle tree. If necessary, I will explain what a Merkle tree is in a later article, where we just need to know that every transaction executed on the blockchain is attached to the tree in the form of a leaf node.
Proof is a method of verifying the authenticity of data in a chain of Libra blocks.
Each operation stored on the blockchain can be verified by password, and no data is left out. For example, if a customer queries an account for the most recent n transactions, Proof verifies that no transactions are missing in the query response.
In a blockchain, clients do not need to trust the entity from which they receive data. Customers can query the account balance, ask if specific transactions have been processed, and so on. Like other Merkle trees, the history of a ledger can provide the Proof of a particular transaction object.
Authentication node
In the blockchain system, the verification node is a very critical component. Generally speaking, the verification node runs the consensus protocol (together with other verifier nodes), executes the transaction, and stores the transaction and execution results in the blockchain. The validator node decides which transactions are added to the blockchain and in what order. The customer of the Libra blockchain creates the deal and submits it to the validator node.
The verifier node contains the following logical components:
Admission Control (AC)
Admission control is the only external interface of the validator node. Any client request to the validator node first goes to AC.
AC performs an initial check on the request to protect the rest of the validator node from damage or large input.
Mempool
Mempool is a buffer that holds transactions waiting to be executed.
When a new transaction is added to the memory pool of the validator node, the memory pool of this validator node will share the transaction with the memory pools of other validators in the system.
Consensus
The consensus component is responsible for sorting the transaction blocks and agreeing on the execution results by participating in the consensus agreement with other verifier nodes in the network.
Execution
The execution component uses a virtual machine (VM) to perform transactions.
The task of execution is to coordinate the execution of a series of transactions and to maintain a temporary status in which a consensus vote can be passed.
The execution maintains the in-memory representation of the execution results until the consensus submits the block to the distributed database.
Virtual machine (VM)
AC and Mempool use the VM component to perform validation checks on transactions.
VM is used to run the programs contained in the transaction and determine the results.
The above figure is a schematic diagram of the verification node.
After reading this, the article "what are the key Concepts of Libra Protocol" has been introduced. If you want to master the knowledge points of this article, you still need to practice and use it yourself. If you want to know more about related articles, welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.