Crypto Academy Week 13 - Homework Post for @alphafx

in hive-108451 •  3 years ago 

crypto-markets-lcd-md.jpg
Source: google

Stellar Consensus Protocol SCP

A Stellar Consensus Protocol (SCP) which is also known as the Distributed Consensus Protocol (DCP), is the mechanism by which the Stellar blockchain network is being run. This Stellar Consensus Protocol is derived from what is known as Federated Byzantine Agreement (FBA), that is, SCP is the FBA that is used on the Stellar blockchain network.

Stellar Blockchain Network

Stellar Network is an open source protocol whereby value can be exchanged from one to another. The network connects banks, payment systems, and people.

The Stellar Network servers runs on a software implementation of the SCP. The internet plays a very vital role for the servers, because it is used to connect as well as communicate with other stellar network servers, thereby creating a global network which is value exchange oriented. Each of the Stellar Network Servers or nodes helps to stores an accurate record of all the 'accounts' on the stellar network. Where the records are stored is called 'Stellar Ledger', this is the database where all records are stored. The mechanism of the stellar network servers is that it proposes changes to the ledger or database, by proposing 'transactions', this helps in changing the outcome of an account balance in the form of spending the account balance or changing something in the said account. A consensus is reached when all the servers in the network come to an agreement on which set of transactions to add to the current Stellar Ledger. This consensus occurs at regular intervals at mind boggling 2 to 4 seconds.
You can build many decentralized applications using the stellar blockchain network such as digital wallets, banking tools, NFT markets, smart devices that pay for themselves etc.

Federated Byzantine Agreement (FBA)

Federated Byzantine Agreement (FBA) is derived from the Byzantine Agreement to systems that operates open membership for its network, where different nodes can have different ideas on how to run the network. They can have different ideas on which nodes would lead or how many quorum slices a quorum can contain. For example node A1 can consider that a quorum needs to have ≥ 2/3 of the nodes in some set U, and another node A2 can say that a quorum should contain > 1/4 of a similar but not identical set U'.
The Byzantine Agreement is a process that make sure there is agreement among all non-faulty nodes while it tolerates failure situations.

Federated Byzantine Agreement is from the Byzantine fault tolerance whereby a byzantine general is tasked with being responsible for their own blockchain. FBA is being operated by he Stellar Network because of its high throughput (speed at which data is processed), network scalability, and also because transaction costs are very low.
How the FBA works is that the FBA performs any function such as transactions, transfers etc., the FBA requires that the nodes involved are known and verified ahead of time, before users can perform any such function. These nodes choose who they trust in the network, then from choosing who they trust, a quorum of nodes emerges from the decisions made my those nodes, and all these nodes individually make up the FBA network.

These are the 3 ways which shows the mechanism by which the Stellar Consensus Protocols/Federated Byzantine Agreement works:

  • Initial voting on transactions is first perfumed by each node. Generically they are seen as statements. This is the first step of what is termed the 'federated voting' process. In this process, each node selects its statement and after that it would not vote any other statement contradicting its selection. However it can decide to accept a different statement but only if its quorum slice has accepted that different statement.

  • The next step is the acceptance step. Here each node accept a statement, if it has never accepted a statement that is contradicting the current statement and that each node in its v-blocking set has accepted that statement. A v-blocking set is a set of nodes, where each of the node is gotten from a quorum slice where the current node belongs to. Quorum slices has an influence on one another, and this leads to quorums that agree on specific statements. When all members of a quorum agree on a statement, this is the 'ratification step.'

  • The last step of the federated voting process is the confirmation step, this step shows that there is an agreement on all levels within the system. Here each nodes are made to send messages to each other confirmation messages, as a means of agreement upon the final value of state in the system.

With the Stellar Consensus Protocol (SCP), you can reach consensus without having to rely on a closed system to have an accurate record of financial transactions.

Four key properties by which the SCP operates. And they all operate simultaneously, they are:

  • decentralized control
  • flexible trust
  • asymptotic security
  • low latency

SCP is considered as the basis of public infrastructure for money, this makes Stellar kind of like a clay whereby people can mold up financial services that suits their lives.

Concepts in the Stellar Consensus Protocol (SCP)

The SCP uses concepts such as quorums and quorum slices. A single or specific node may appear on many quorum slices. The concept of quorum slices was introduced by Stellar to allow participation in the network to be open in that a single or specific node is allowed to choose a set of nodes within its slices. The principles behind quorum and quorum slices are based on real life business relationships amongst different entities, so therefore they are leveraging on the 'trust' that come into play in business models or relationships. Globally to reach consensus in the entire systems that exists, quorums would have to intersect. And from the decisions made by single and specific nodes, overall consensus is reached on a global scale.

Quorum

A quorum is the lowest amount of a group of nodes needed to make a solution to be correct, when this quorum is formed, the block is validated and added to the blockchain. It is a set of nodes to reach an agreement. A quorum is a group that contains at least one quorum slice for each of it members. So for every member in a quorum, they contain at least one quorum slice.

Quorum Slices

The Federated Byzantine Agreement also make uses of what is termed 'quorum slices', these are seen as subsets of quorums which can convince specific nodes operating on the network to agree with them.
This means that, a quorum slice is a subset of quorums that can convince a particular node on the network to come to agreement with it.
Let's say we have 3 quorums and their respective nodes, A=1,2,3; B=4,5,6; C=7,8,9; quorum slice G=2,4,8 can decide to convince a particular node say 6, to reach an agreement with it.

Note that this is the simplest form of example used to explain a quorum slice, it is much more complex than this.

However there are some other terms in the Stellar Consensus Protocol SCP which shows how the network initiates transactions in the network. I would be briefly describing them, so that incase you come across the SCP/FBA, you can grasp a little of what is going on.

Intertwined: Two non-faulty nodes v1 and v2 are intertwined when every quorum that contains v1 intersects every quorum that contains v2 in at least one non-faulty node.

Intact:

When a set of non-faulty nodes I is a quorum and every two nodes of I are intertwined in the “projected system” that results from removing nodes not in I from all quorum slices, then we say that I is intact.

Federated Voting: This is the mechanism by which nodes votes on statements. And with a two-step protocol may confirm these statements with the belief that intertwined nodes would not confirm another statement that is contradictory.

Federated Leader Selection: This is the way by which nodes decides to pick one or a small number of leaders in a very random manner and they consider the priorities that are in the quorum slices.

There are 3 distinct parts that make up the Stellar Consensus Protocol SCP and they are interlocked with each other.
They are

Nomination: Is the process by which node come together on a set of candidate values.

Balloting: This is the heartbeat of the SCP and if it is successful, it chooses an output value.

Timeouts:Describes the process by which nodes gives up on a ballot that has no value to give yet, then later tries again.

thank you @alphafx for this wonderful exercise

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Task satisfactorily done

Parameterrating
Presentation1/2
Content4/5
Originality1/3
Total6

Thanks for participating

Thank you @alphafx for reviewing my write-up on the subject matter. I hope to do much better next time.

This post has been rewarded by @bright-obias from @steemcurator04 Account with support from the Steem Community Curation Project."

Keep posting good content and follow @steemitblog for more updates. Thank you, Steemit Team!

Thank you @bright-obias and @steemcurator04 for taking the time to curate my post. Cheers!