Quantcast
Channel: Yudiz Solutions Ltd.
Viewing all articles
Browse latest Browse all 595

Understanding The Libra Protocol

$
0
0

Overview

Hello Blockchain Enthusiast. Are you excited about the new Blockchain “The Libra”. Today we are going to understand The Libra Protocol. Let’s try to keep it short and simple.
In near future, The Libra Blockchain will serve as a medium of exchange for billions of people around the world. This Blockchain is maintained using Libra Protocol.
If you don’t know much about Libra Blockchain, one of my colleagues has written a very good article on Libra Blockchain. Here it is.

Are you excited guys? Let’s dive deep into The Libra Protocol.

libraprotocol_image1

Libra Protocol contains several components. I will cover the following in this article,

States & Transaction

At any point of time Blockchain has a state. It is also known as ledger state. Ledger state represent current snapshot of the data on the Blockchain. This state is structured as key-values store, which maps account address to account values.
Users of the Libra Blockchain can update the ledger state by submitting the transactions. Transaction consists of transaction script and transaction arguments like recipient address and amount of Libra to send.
Ledger state is not updated until the transaction is committed by the consensus.

Ledger History

Most of the Blockchain maintains a linked list of each block of transactions with the hash of the block. The Libra Protocol uses single merkle tree to provide authenticated data structure.
The Ledger History stores previously executed transaction as well as associated events that is emitted by transaction. The purpose of ledger history is to keep a record of how the latest ledger state was computed. In ledger history, There is no concept of blocks of transactions like Bitcoin and Ethereum.
Any user can query against the ledger history and use the ledger history for the auditing the transaction execution.

libraprotocol_image2

Accounts

Libra have something what Ethereum tries to achieve with account abstraction.

  • Each account has an instance of the standard module called libraAccount.
  • This module stores basic information like balance, sequence number(like nonce in Ethereum) and authentication key.

The Libra protocol does not link any accounts to a real-world identity. A user is free to create as many as accounts by generating multiple key-pairs. Accounts constrained by the same clients have no link to one another.

Transaction Structure

In Libra Blockchain transaction is a signed message that contains the following data:

  • Sender Address: Address of the account who sends the transaction.
  • Senders Publickey: The public key that corresponds to the private key used to sign the transaction.
  • Program: Generally program consists Move bytecode of transaction script.
  • Gas Price: The number of Libra coins that the sender is willing to pay per unit of gas to execute the transaction.
  • Maximum Gas Amount: Maximum Number of gas units that the transaction is allowed to consume.
  • Sequence Number: A number that is equal to the number stored under the sender’s account. Once this transaction executes, sequence number is incremented by one. So only one transaction can be executed for given sequence number.
  • Signature: The digital signature of the sender.

Move Programming Language

Move is a programming language created during the design of the Libra Protocol. Move is used to implement custom transaction and smart contract on Libra Blockchain.
Moves has three important roles in the system,

  1. Enable flexible transaction via transaction script.
  2. Allow user defined smart contract via modules.
  3. Support configuration and extensibility of the Libra Protocol.

libraprotocol_image3

I know it’s a little bit confusing but I’m assuming you got it. Let’s move forward, just a few more to go!!!!!

LibraBFT

The Libra Blockchain uses variant of the Hotstuff consensus protocol called LibraBFT. LibraBFT assumes that 3f+1 votes is distributed among a set of validators that may be honest or Byzantine. LibraBFT stays safe, preventing attacks such as fork and double spends when at most f votes are controlled by Byzantine validators.
LibraBFT maintains safety when validator node crash or restart. Even if all validator node restart at the same time.

Validators (Validator Node)

When users of Libra Blockchain submit transaction, transaction will reach to validator node. Then validator node run consensus protocol, execute transaction and store transaction and it’s execution result in Blockchain. Validator node will decide which transaction will be added to Blockchain and in which order.

libraprotocol_image4

Conclusion

So guys, today we learnt about the different components of The Libra Protocol. There is a lot more to learn on the Libra Blockchain. Stay tuned for the upcoming blogs.


Viewing all articles
Browse latest Browse all 595

Trending Articles