TLDR: This post aims to give you a high-level understanding the problems a consensus system solves and why its required. I think understanding this will act as a foundation for future learning
Time (chronological order of events) is subjective in software
Consensus System: Software layer responsible for determining the correct state of the system
It solves two problems:
1) Resolves the subjectivity of time - orders blocks chronologically in a decentralized way 2) Provides Sybil resistance mechanism for nodes
Once these problems are solved, software can objectively decide which valid chain to follow.
End: TLDR
Intro
A decentralized system is like a special type of distributed system, so let's start by explaining the problems faced there - which are much simpler.
Distributed Systems
An example of a distributed system is an application that saves its state in two clustered databases. Let's say we want to mint exactly 600 NFTs after accepting payment. We store the mint address and the username in a database so we can count up to 600 and stop.
In distributed systems "time is subjective" which means the system might disagree on the user that bought the last NFT in the series.
Consensus in a distributed system
1) Resolve the subjectivity of time i.e race conditions a. e.g Arbitration node that will decide which user transaction will be rolled back.
Decentralized System
Decentralized systems are distributed, but cannot rely on a single owner to resolve conflicts.
Consensus in a Decentralized System:
1) Resolve the subjectivity of time - without relying on a single owner 2) Must have a Sybil resistance mechanism
Resolving the Subjectivity of Time
This is done by creating a system that gets unrelated parties to order transactions chronologically in blocks. In doing so you effectively create a decentralized time server - the bitcoin whitepaper talks about this but it took me a while to understand what that meant.
When both of these problems are solved, the decentralized system can objectively sync to the right state - without any user intervention.
PoW is a consensus system where the correct chain is the most difficult chain to mine, this metric is objective and does not depend on time.
Nodes can sync the most difficult chain (that is valid).
Weak Subjectivity
A PoS system makes a slight compromise to solve this problem - that is its consensus system is weakly subjective.
This term is pretty important to understand.
Weak subjectivity: new nodes joining the network and nodes that have been offline for a long time cannot always automatically tell which chain is the true state.
In a system which has weak subjectivity, your node must always be online or there is no guarantee it will sync to the true state of the network. This property isn't exclusive to PoS consensus systems, because if you consensus rule (the business logic of your application - decides if a block is valid) that is time dependent then the whole system becomes subjective.
Sybil Resistance
In a decentralized system you need a mechanism to ensure it's not easy for one person to trivially spam nodes that contribute to consensus - because the network is permission less unlike in a distributed system.
In PoW this is solved by using game theory, probability and cryptography aka mining. Ensuring that different people are allocated the right to mine blocks based on a competition that encourages as much honest participants as possible - therefore making if progressively harder for one malicious individual to dominate by creating multiple fake identities they control.
If that didnβt make sense, imagine if moons were worth 100 dollars each and the karma ratio was one - imagine the amount of shit-posting. It would be very difficult for one individual to dominate the narrative with alt accounts to shill HEX. (assuming no bots are being used ).
In PoS this accomplished by introducing having a stacking requirement eg 32 ETH and having penalties for poor service/behavior.
Resources
https://ethereum.stackexchange.com/questions/15659/what-is-weak-subjectivity
https://bitcoin.org/bitcoin.pdf
Quiz
Say I decided to make a consensus rule, that defines the chain as valid so long as it has no re-orgs greater than 20. I am using PoW to follow the longest valid chain - including this rule. Does this decentralized system have weak subjectivity - if so why.
[link] [comments]
You can get bonuses upto $100 FREE BONUS when you:
π° Install these recommended apps:
π² SocialGood - 100% Crypto Back on Everyday Shopping
π² xPortal - The DeFi For The Next Billion
π² CryptoTab Browser - Lightweight, fast, and ready to mine!
π° Register on these recommended exchanges:
π‘ Binanceπ‘ Bitfinexπ‘ Bitmartπ‘ Bittrexπ‘ Bitget
π‘ CoinExπ‘ Crypto.comπ‘ Gate.ioπ‘ Huobiπ‘ Kucoin.
Comments