Distributed Systems Dynamics
- 10:02
Understand the dynamics of information and transactions in distributed systems.
Downloads
No associated resources to download.
Glossary
Blockchain CryptocurrencyTranscript
Blockchain and cryptocurrencies distributed systems dynamics. In this section, we will look at the dynamics of information and transactions in distributed systems.
With so many parties having access to records and information, how can the legitimacy of each record be insured? Can each and every record be trusted? Hence, we need a system in which information is encrypted into a block and can be accessed only by a specific entity or group. Furthermore, two blocks of information the before and after are to be linked by hard to invert cryptographic hash, forming a chain, the encryption and hard to invert nature. Together with the distributed and transparent features discussed previously, make this system immutable. The records cannot be changed or altered since records are both shared and cannot be inverted. The initial block that started it all is known as the Genesis block.
The cryptographic technology behind immutability was developed by David Chm in 1982. While the non invertible chain technology that prevented tampering of existing legitimate records was developed based on the timestamp concept by Haber and Stornetta in 1991. The most popular validation methods are the proof of work, POW, and the proof of stake. POS. The POW is the original consensus validation algorithm where validators known as miners, attempt to validate information in a block by solving complex cryptographic calculations. With the POW approach, miners with the most powerful hardware and software have a clear, unfair competitive advantage over others. In addition, POW requires the use of huge amounts of energy, making it unfriendly to the environment. As an alternative to POW, the POS or proof of stake was created as a result. The POS addresses the validation issue by assigning mining power to the proportion of stake held by a miner. So a miner with a 1% stake cannot mine more than 1% of the blocks. A threat to both POW and POS is the 51% attack. When an entity or a group gains more than half of the network's power or stake, eventually taking full control. The proof of activities POA method is an attempt to combine the best features of both the POW and the POS. In this validation methodology, a group of validators is randomly selected from the network to validate a new block with validators with higher stakes, more likely to be selected but not guaranteed. The selected validators will then work to validate competing blocks, hence reducing the drain in energy. The block with the required number of validators becomes the winning block and becomes a complete block. The mining rewards are then split among the miners.
To illustrate how the validation system and the consensus method works, let's take a look at an illustrative example. In this example, there are four entities, Deutsche Bank, bank of America, Merrill Lynch, HSBC, and China International Capital Corporation. They are engaging in a number of transactions with code names such as Houston Bills, et cetera. Each transaction naturally entails cashflow implications. This table displays the cashflow implications to the transactions in this block. Transactions under code names of Houston and Seahawks represent cash inflows. Whereas Bills, Patriots, saints and Eagles represent cash outflow. Each outflow is of the amount of 100. So for the Houston Bills transaction in this block, bank of America, HSBC and China International Capital each incurred a cash outflow of 100 with the amounts going to Deutsche Bank as cash inflow. Totaling 300 Patriots represents cash outflow of negative 100 to each of the entities, but since they are all cash outflows, the net to each is zero. The same applies to the Saints transactions. Finally, the Seahawks and Eagles transactions netted Deutsche Bank and HSBC 100 each from BAML and China International Capital. The total balance from the block for all the entities are 400 for Deutsche Bank, negative 200 for Bank of America Merrill Lynch, zero for HSPC and negative 200 for China International Capital. These are also the values for this Genesis block. This table displays the transactions involving a second block as a continuation of the Genesis block In this block, each cash outflow is now 200 in this block transaction, Houston represents a cash outflow of 200 for Deutsche Bank, and this is split among Bank of America, HSBC and CICC. Each getting 200 divided by three equaling 66.7. The reverse is true from a cashflow perspective for the Titan Baltimore transactions and so on. At the end of the day, the balance for each entity for this block is displayed in the penultimate column. All the information from this block must be validated by minors before the records are added to the Genesis block. Deutsche Bank has suggested paying CICC 300, can this be a possible valid transaction? So for the participants of this exercise, putting their miners hat on, how long would it take to validate the records, do you think? And do you think you can beat the other miners and earn the reward? Regardless, the answer is yes, not based on this block, but based on the chain. With the prior block. Once validated, the information on the second block together with the Genesis block will be shared or distributed among all entities, including all the miners. Given everyone has a copy of the validated distributed ledger, it is hard for anyone to change the information in all the records possessed by everyone. Furthermore, the blocks are chained. It is hard to change one block without going back to change the prior blocks. Finally, recall that each block in the chain is timestamped, making it close to impossible to hack into the chain of blocks of information. Given the illustrative exercise and the scenarios just discussed with the four entities and the transactions in the two blocks, can you verify if the Deutsche Bank pays CICC 300? Transaction should be added record, the time you spent on this, how much time was spent verifying the transaction, including going through and digging out information on the previous two slides.
In this exercise, we demonstrated how consensus verification works in a distributed ledger system. In some the decentralized, more specifically distributed nature of the system offers the following advantages. One, trust as the system is self-governed with information blocks possessed by all parties, it relies on no central authority. Two, the system with its distributed nature and timestamped records is secure. Three, with information not having to go through a central authority for validation but is simultaneously validated by a number of competing miners, this offers a fast and efficient way of validating transaction information. And four, the enhanced efficiency in theory, makes this validation method economical. This, however, is increasingly arguable with the tremendous drain and energy becoming more of an issue from an environmental perspective. On the negative side, the system does have its drawbacks. One, the adverse impact on the environment is clear. Two, the entity with more powerful hardware and software can have an unfair advantage over others. And three, these networks have been used for illegal transactions. And four, while the system is decentralized, the information is still susceptible to some entity or organization. Most apparently its creators. Other limitations, though not Highly likely, may still post problems such as problematic transactions may not be reversed. Technically, corrective actions can only be taken by adding correcting blocks to the chain, and with all of its security features, it is still possible for the system to be subject to hacks resulting in data losses and financial losses.
The distributed system can be easily applied to contracts as contracts are simply a set of if then logic conditions. If a service is delivered, then payment will be affected. As long as the terms in the contract cast a sufficiently wide net, a variety of conditions can be captured. This gives rise to smart contracts governing the transfer of assets between parties.
A more widely debated application is using the concept in possibly preventing central banks from going rogue, more specifically ensuring that governments act responsibly and not print money for political or economic convenience.