字幕表 動画を再生する 英語字幕をプリント I'm going to talk about the issue of Scalability in Bitcoin but before that I will Provide Some Background on Bitcoins and Then We'll Slowly Build it Up to the point where We can See the Issues in Bitcoin Scalability and what Is? Being Done in Current Blockchain Designs to Address These issues in Scalability the key Metrics that, we are Looking at Here Are the Throughput of the System that Is what Is the Maximum rate at Which Transactions can be Handled By the System in Terms of writing Them to the Blockchain and then The other Metric Is that of Latency That Is from the point When A client Submits a transaction to the system? How Long Does it Take until it's written to the Blockchain I Think some History, Would be nice so bitcoin Appeared on the Scene in 2008 On an online Meaning Mailing List by a pseudonymous Author Called Satoshi Nakamoto Whose Origin Is Unknown and Then The next Year in 2009 There was A software Release of Bitcoin and it Generated A lot of Interest Since its Inception because it went on to become one of the biggest Digital Currencies of our Times so just Today a one Bitcoin is Worth About $6,000 yet on the other end of the Spectrum There are People who have Said that Blockchain is the biggest Bubble of our Times the Aspect of Bitcoin that Really Gives it its wings Is The Blockchain Which Is at the heart of Bitcoin Now A lot of People Have Started to become Interested in Block Chains Because These can be Applied to other Scenarios Which Are Beyond its immediate Application to Digital Currencies We did A video with tom Scott About online Voting and The Blockchain was not mentioned at all but Lots of the Comments of People who Watch that Video Say? Why can't We do voting with a blockchain Is this one of the Applications you're Talking About yes Exactly if You look at the Blockchain One of the key Properties of the Blockchain that Distinguishes It from Regular Traditional Databases Is that of public Verifiability and Public Verifiability is enabled by two other Properties Called Integrity and Transparency Now by, transparency, We mean That anyone can verify How the State of Data has Been Updated and By Integrity we mean that anybody can Be sure that the Data that they are Retrieving Is Not Corrupt and it is correct. I can imagine that it would be a feats an Engineer A system for 60 Million People Living in the Uk but Never mind how, Many People are Living in China or India Or some of the other Nations That have got, Many, Many more People. Is that the sort of Scalability, we're Going to be Talking About Well This is the Kind of Scalability that, We are Going to Talk about but Let's not Forget that Systems like Google or Facebook Also deal With may, be much greater Magnitude of Users but the advantage that These systems have, over Systems Like Blockchain Is that They are Centralized Systems that are under The Control of a single entity Or a consortium of Entities While in A blockchain the Network Is Between A Fully Decentralized Set of Nodes so what does a blockchain really Look like Well you Can Think of a blockchain as a linked List of Hash Pointers so a hash Pointer Is Simply A Hash of some Data and Now We are going to look at a linked List of Hash Pointers so in the Beginning We need to start from Somewhere so we have? Sort of A Dummy Or a Padding, Data Called Genesis Block and We Take the hash of This first Block? Which Is Included in The Header of the next Piece of Data So there is A hash Pointer Which points to the Previous Piece of Data and new Data then the next Block and it's Called ST-1 Then Imagine that you Have Another Piece of Data and this is the simplest Form of Lock Chain so as you can See This is a linked List of Hash Pointers Now the hash Point Ourselves Two Purposes The First Purpose Is that it Uniquely identifies The Previous Block of Data so a hash Pointers IDentifies The Data and the Hash Pointers due To the Properties of Hashing Functions Also Confirms that the Data has not, Been Corrupted you Can Think of it as a temporal evident Log and Anybody Can independently Take Hash of this Data Match it with the hash included in The next Piece of Data Compare These Two and if These Two Match then They can, be sure that the Data has not Been Corrupted There Are Two Kinds of Operations That Can be Performed on a blockchain One is a read Operation and one is A write Operation Now as you might have guessed Read Operations are Easy Because they, Simply, Involves Retrieving, some Data of the Blockchain However Write Operations Are More Challenging Because They Can Potentially Hurt The Properties of Transparency and intake Integrity That We Expect From the Blockchain So a blockchain has Two basic functional Components one Is to Validate Transactions and the other is to write to the Blockchain We are First going to Talk about Validation of Transactions what is the Transaction? You Can Think of a transaction IS an Operation that Changes The State of Data That Lives on the Blockchain Okay, so let's Look at A very Simple Example in The Context of Bitcoin So a transaction might Look something like Say Ten Bitcoins to Bob and This Transaction has Been Generated by Alice now alice has Two things to Prove to the Blockchain Network Alice first has to prove that She Owns These ten Bitcoins so she is able to Pay them to Bob which means that as input She, also has to Provide the Id of the Block in Which alice Became the Owner of These ten Bitcoins Say it was Zero Zero seven And the other Thing that alice has to prove Is that it's actually Alice who is generating this Transaction and not Somebody Else who is pretending to be to be Alice for This Purpose She Takes Advantage of A cryptographic primitive Called Digital Signature so She Basically signs this whole thing With her private key She then Submits This Transaction To the Network Any Node That receives This Transaction if it wants to Validate This Transaction it has to perform two Checks First to Check That alice Actually Received Ten Bitcoins at some Point in The History of the Blockchain So if You Remember the Structure of the Blockchain, was something like This and There Is this Head of This Blockchain? so it will Traverse the Blockchain and At some Point it will reach the Block Where Ellis Came Into the Ownership of These ten Bitcoins say it was this One? so the first Check has Been Passed the other Check that it has to do Is to Traverse Back in The Blockchain and Confirm That Alice Actually possesses These ten Bitcoins and That Up until now alice has not Tried to Pay These ten Bitcoins to Anybody Else Because then that Would be Considered a double Spend Because Imagine if Alice has Already Paid out These ten Bitcoins to Charlie Then She's not the current, owner of These ten Bitcoins even Though she, was at. Some Point in the Past So that's Another Thing that the Node has to confirm that from the point when These ten Bitcoins Came Into The Ownership of Alice She did not at Any Point Transfer Them to Anybody Else if The Transaction passes Both These checks then the next Step is to write it to the Blockchain now this Would be Straightforward in A centralized System Where There are all trusted Nodes and They'll Just Simply perform the right Operation? However This is Significantly more Complex in A fully, Decentralized Network like that in The Blockchain Because all the untrusted or semi Trusted Nodes Have to reach an Agreement Among Themselves Whether They Are going to write this Piece of Data or transaction to the Blockchain or not This is where The Issue of Consensus Comes Into Picture Consensus Simply Means to reach Agreement About A value Among Multiple Nodes Within a network Now in The case of Bitcoin this Consensus is done By getting all the nodes To solve A hash Puzzle or Provide some Proof of Work This is also called Mining and for this Reason Potential Bitcoin leaders are also Called Miners a Miner can, also be thought a successful miner Can, also be Thought of as a leader Because when the miner has successfully solved the puzzle? It can write to the Blockchain then there are two main issues in Bitcoin? However Note That Even Though I mentioned These issues in The Context of Bitcoin These are Shared by all Blockchain Systems That Work, Along the Same Principles as Bitcoin The first issue Is that of Folks now Bitcoin is Decentralized System and it's a peer-To-Peer Network Where Different Nodes communicate Transactions and other Information to each other using a gossip Protocol Now the Network has its Own Limitations for example Propagation Delays or the transactions Could Simply get lost on its way Or a node could be simply bad This Could Mean That The Nodes in The Network Could Potentially Have Different views of the System what might happen Is That A minor Builds on Top of this Block While Another Minor who has not yet Heard About this Block Builds on Top of some other Block the Blockchain has Effectively Been Forked and Some Nodes will Continue To extend This Part of the Blockchain While Others Would Continue To mine on Top or extend This part of the Blockchain This is Really Bad for the Blockchain and it Defies the Fundamental Philosophy of The Blockchain Which Wants to Provide A consistent view of the World to its Users So all systems need to have some Mechanism to resolve Such Conflicts in the case of Bitcoin There Is This Implicit rule that Nodes Who find themselves in A Fork Situation Should Follow the longest Fork you mentioned before what I heard as A Gossip Protocol Is that yes What's a gossip Protocol a gossip Protocol Is most naive Kind of Protocol where for example if There are Five People in the Room and They want to communicate some Information to each other Then I'll Tell that Information to as Many People I know in the Room and All These People will Also communicate The Same Information to everybody Else in The Room so everybody is talking to everybody Else the other Issue in Bitcoin Is that of Performance Now There are two key Metrics That Are used to assess the performance of such Systems, one Is that of Throughput and yes the other Is that of Latency By Throughput, We mean that what Is the Maximum rate at which the System Can write Transactions to the Blockchain and by latency we mean that after the point at which a node hears about a new transaction How Long Does it Take to actually write it to the Blockchain Now in Bitcoin the Throughput of the System is Basically a Function of Two Properties of the System - Block Size and the other Is the inter Block Interval What is a block We've Been Talking about Transactions so far A block Is simply an Extension of that Idea? You Package a number of Transactions Into a block So what Gets written to the Blockchain Is not a single Transaction but Rather a block of Transactions The Size of This Block in Bitcoin is Currently Capped at one Megabytes the Inter Block Interval Sort of Relates To a Difficulty of the Hashing Puzzle Because that has to do With how fast Miners Can solve the Puzzle Currently This Is set at about 10 Minutes and The idea Is that the Inter Plock Interval Should Be large enough that Majority of The Nodes in The Network Have Heard About a new Block That has Been Added to the Blockchain Before Another Block Is Added To it to avoid Folks with the current Block Size of 1 megabytes and An Inter Block interval of 10 Minutes the Throughput of Bitcoin is at is capped at about 7 Transactions per Second and A client That Submits a, transaction to bitcoin It has Generally on Average to Wait About six More Blocks Are Added to the Blockchain to be Sure that it's Block is Actually Permanently Added to the Blockchain Now this is very slow Just to give you an Idea Main Stream Payment Processing systems like Visa Can Process Transactions Up to at up to 24,000 Transactions per Second With a latency of Just A few Seconds Now One might Argue that Reaper Amat Rising the Inter Block Interval Value and The Size of the Block Maybe These performance Metrics of Bitcoin Can be Improved It Turns out According to a recent Study that even Then the best We can do IS 27 Transactions per Second and a latency of About 12 Seconds People have now Started to look at Options To Redesign Block Chains to Address These issues of Forking and low Performance Now Or that the issue of Consensus Is not new it has Been Studied for Well Over Two decades in Classical Distributed systems and There are Well Known and well tested protocols that enable? Agreement Among A group of Nodes That Can Tolerate Two Kinds of Errors There are Crash Failures and There are Bees and Time Failures the protocols that Are Well Known for crash Failures are for example raft Paxos and so Forth By crash Failures We mean that A node Simply Becomes silent for example because it Crashed and Is not able to actively Participate in the Consensus Protocol Resent time failures are worse in This case the Nodes might behave arbitrarily or Inconsistently for Example Sometimes it might exhibit The behavior of Crash Nodes By Becoming silent or? Sometimes it might Lie about the value on Which Consensus is Required The Most Popular Protocol for Tolerating Bees and Time Failures Is called Practical Byzantine fault Tolerant Protocol Or Pbft so what do These classical Consensus protocols have got to do With Bitcoin or block Change in General Recall That in Bitcoin the way to reach Consensus, was that A miner? Solves a Puzzle so Basically it receives The Transaction it does Mining mining Mining Solves a Puzzle and then Say This is the Blockchain it Gets to write The Transaction to the Blockchain Now What Researchers are Currently looking at Is What About if We replace this leader with a group of leaders so instead of Having one Leader who is a miner We have a group of leaders? We're Not Really Mining I mean the criteria for entering this Group, of leaders might be Mining but Once They enter This Committee or Group They Are not Really Mining so what this Group Does Is that when it receives A transaction it Basically runs A Pbft protocol Among The Nodes and Then They Reach an Agreement Whether or not They are going to write this Transaction to the Blockchain so if They Decide to write you to the Blockchains Then it's A collective Decision of all the Nodes in This Group and it is Unlikely for A majority of These Nodes to be Corrupt and do Wrong things with the Blockchain Instead of if There Is One leader who Is in Charge of this task how Is that collective Formed you mentioned that mining might be A criteria for entry but how Would you how Would you put Those Groups Together I mean how Would We not Know There's some massive Conspiracy go here Honor Suppose? This is Actually A very Good Question and This Is one of the Research challenges in This Area right Now Because in Classical Systems The Entity That Controls the Network Already Knows the Nodes so this Is not an issue in the first Place But With Decentralized Networks Identity is A Huge issue who, do you, allow to join These Elite Group of leaders One Way that I mentioned was to sort of Create A cost for entering the Group by getting nodes to do Work Whether By mining but more Recently this Can Also be a Proof of Stake Proof of Space or Anything Else but This Really Is an Open Research Challenge and The The Trade-Off Here Really is that We want the Nodes Who want to enter the Committee to show some sort of Commitment that They're not Going to Misbehave Either by Making Sure That They Have used Their resources for example by mining Or they have sufficient Stakes in the System that they Wouldn't want to Misbehave for Their Own Benefit so that's a good way of Preventing or maybe Limiting The Amount of Folks That happen so does it Make it any Faster It does to a Certain extent Because we no longer have to worry about an interlocked interval to make sure that folks do not happen because once the committee has Reached a decision that we are going to write this block to the Blockchain Then that's it it Would Be written to the Blockchain for Sure However There is a limit to how much performance gains We Can achieve to the system Because this Committee Is Still the Bottleneck Really Every Node is Handling every Single Transaction So it doesn't Really Scale in A scalable Systems when you add more Nodes to the Network it Should Ideally Improve the Throughput of the System However The Problem With These Single Committee Systems Is That because of the way Pbft Works The Because of Messaging Complexity and The Amount of Complexity Involved in Reaching an Agreement The more Nodes You, Add to this Network The Transaction Throughput Actually Slows Down This is an issue and it Is an open research area right now a classical way to improve The Scalability of A system at least in The Context of traditional Databases Is that of Sharding by Sharding We mean that you split the State or the? Data Among Multiple Committees Or Groups Within the Network so Basically Instead of Having a single Committee You have multiple Committees and Then You Make These Committees Responsible for managing Transactions That have to do with Say, Data from a to F and then Data From G to K from L To P and so on Essentially you have Split the Transactions Among multiple Committees So not every Node is Handling every Single Transaction right now but it brings its Own unique Challenges Because of its Application to A setting for which it wasn't written in The first Place So for example the idea is also that each one of These Committees Have Their Own Block Chains for example But what if There is a transaction that Takes as an Input one Piece of Data from this Blockchain and One Piece of Data from this other Blockchain so Which Committee is going to Handle This Transaction now Block Chains might not end up something Quite like the Internet However in One Form or the other They are Probably here to stay But There's Still A long Path between Where We are right now up until the point Where They are as Widespread as Say for example traditional Databases I'm so i mean that's about Unfortunate is the problem With Cryptography Is that We couldn't Ever use truly Random Because, we? Wouldn't be able to decrypt it again We have our message bits Which are you know Naught 1 1 Naught something Different and We xor These together? One bit at a Time and that's how, We encrypt and the nice Thing Is
B1 中級 ブロックチェーンのスケーリング - Computerphile (Scaling Blockchains - Computerphile) 2 0 林宜悉 に公開 2021 年 01 月 14 日 シェア シェア 保存 報告 動画の中の単語