In part one of this three-part series, we discussed the importance of scalability, the limitations and flaws in current blockchain systems for reaching this level of scalability, and what Plasma offers to businesses looking to scale their blockchain operations while remaining connected to the single-source-of-truth that is ethereum main network. That section skirted some of the more technical details and edge cases of the Plasma proposal, and for good reason — businesses and investors need to understand that the utopia of economic equilibrium hinges on the issue of scalable architectures in blockchain.
This article focuses on the solutions proposed by Vitalik Buterin and Joseph Poon. By examining, on a mid-level, what Plasma offers the future of blockchain, we hope you will see why we think Business, especially Enterprise, needs Plasma now. In part three of this series, we will discuss some of the fundamental architectural and process changes that can occur because of Plasma’s implementation.
In the Plasma Whitepaper, Buterin and Poon outlined five “key components” [1, pg. 3] of Plasma. I’m going to transform and reorganize them a bit so they read a bit more human, but will still focus a bit more on some of the technical aspects. If you’re more application-minded, I suggest you skim this article, but part three may be of more use to you.
Component #1: Merkleized State Commitments with Fraud Proofs
Merkle trees [2;3] … so powerful. This data structure keeps showing how amazingly useful it is! For those who do not know what a Merkle tree is, it’s a tree structure whose root node represents the hash of the combined hash of its children node, and the hash of its children nodes are the hash of the combined hashes of their children nodes, and so on. Ethereum uses a special kind of Merkle Trie (note: not “tree”) , known as a Merkle Patricia Trie  to conduct proofs that the transaction history they receive is correct. The complexity for falsifying these proofs is exceptionally prohibitive, meaning that you can be assured to absurd amount of confidence that if you received a valid proof solution, the data you received is valid. This is the foundation for the machine trust created in modern blockchain cryptocurrencies, going back to Bitcoin.
Plasma takes the concept of machine trust and tries to scale it, so of course the method chosen is a well-known old friend: Merkle Tries. Using smart contracts as the foundation for creating the trust mechanism (Ethereum is so cool), a Plasma Chain “bonds” itself with its parent chain. This bonded chain is now a Plasma Chain under its parent. Due to the nature of this structure, construction of fraud proofs is extremely efficient using another well-known tool of the trade: MapReduce . The map phase published data commitments; the reduce phase “includes a merkleized proof of state transition when returning the result” [1, pg. 10]. This allows for quick and easy proof of fraud verification in the event of a bad actor. Those with stake in the Plasma Chain will self-monitor and file disputes in the form of proofs to the root chain when they can prove malfeasance.
The main key to get from this is, simply put, trees of blockchains.
Component #2: Single Source of Value
You, as a general Ethereum user, can direct funds to this bonded chain, using those funds for its resources. To prove that these funds are being used in a valid way, we need to implement a system for committing data that can be subject to “fraud proofs”. As the Plasma Chain commits transactions to its parent chain, the Plasma Chain provides blockheader hashes to the root chain. This enables users to submit fraud proofs to root chain in the event of an attempt at dishonesty. The root chain can validate this proof via the bond, and in the event of a valid proof of fraud, will quickly return the funds to you and prevent the fraud that occurs. The plasma paper refers to this as UTXO, or Unspent TransaXtion Output, a common term for saying, “A ledger of all value on all wallets.” It’s just a fancy way of saying that your wallet resides on the root chain, not the plasma chains you’re interacting with. You can’t spend more than the value in your UTXO, so consistency across the network is maintained. If you wish to exit a plasma chain, you can do so by broadcasting a proof of funds and they will be moved back to the root Ethereum chain.
The main key to get from this is, simply put, single root chain as the source of truth.
Component #3: Court and Rule Structure with Mass Exit Capability
It could bog down the root chain if all disputes had to go directly to the single source of value every single time. Besides, you may want to gracefully keep your funds in an ecosystem that is managing them. If so desired, a proof of fraud can be submitted to any parent Plasma Chain including the root chain. If you don’t like what’s going down, you can hop your funds one, two, or more up in depth and allowing for smooth transition of value.
Furthermore, if a node is proving to be a bad actor, those funds which were in dispute can be returned before the fraud occurred. Since the spend must occur from another node in the network, they must submit a bonded proof of spend to retrieve their funds. This proof will fail, triggering a mass-exit and a roll back of funds prior to the moment of attestation of malfeasance. This roll-back capability is extremely cheap, taking up only 2-bits of space on the parent blockchain [1, pg. 5]. Due to UTXO, the value is verifiable all the way to the root chain, so as proofs of fraud occur, they can be verified right to the single source of truth in the system.
The main key to get from this is, simply put, a cheap, fast, and reasonable means to dispute if chains or nodes aren’t obeying the rules.
Component #4: Securely Bonding with Your Parent
Proof of Stake opens a whole new incentive model for Ethereum. With this incentive model comes the concept of “bonded stake”. This is essentially the same system used when participating in a Plasma Chain. When you commit yourself to a Plasma Chain, you bond some stake into that chain. Your bonded stake can be transferred to Plasma Chain’s children, as well, but it prevents a spend beyond the amount you bonded with that chain. You can increase or decrease this bond at any time, and even do a full withdrawal back to the root chain. You can bond either Ether or even an ERC20 token of the Plasma Chain’s choosing.
This bonding mechanism also feeds the consensus system of the Plasma Chain. Being a bad actor and attempting, say, a block withholding attack will only harm yourself as your misbehavior penalizes your transaction fees. These fees are then allocated to a pool of funds which are distributed to pay out fees in the future, removing all incentive to participate in bad faith. This ensures the quality of the consensus of the other nodes on your chain. By utilizing the Proof of Stake mechanisms in Ethereum, children are incentivized to keep going, as their continued participating in the network yields stronger returns on transaction fees.
The main key to get from this is, simply put, there’s no profit in being a bad guy.
Component #5: Computation at Scale using MapReduce
Currently, there’s very little ability to decompose and parallelize code run in Ethereum smart contracts. This is a bit of a problem for a few reasons. First, it means we’re not taking full advantage of the fact that we’re in an ecosystem with multiple virtual machines processing mass amounts of potentially related data. Second, it shows a design flaw in Ethereum’s general-compute capability which prevents many tasks to occur in-tandem and work towards a result in a timely manner. Third, it highlights the fact that nodes can’t be special purpose or logically organized by task. Finally, it underscores gas, block-gas, and data limits and how they restrict the types of calculation that could possibly be incentivized across the network.
If you wanted to index all the words in Wikipedia using smart contracts, you’d be paying a dang fortune to do it. You’d push that data into the Ethereum, pay an enormous fee just to store, and an even more enormous fee to convince nodes to process your transactions. It costs about 20,000 gas to store a 256bits on-chain. That’s a high cost for such little value. I won’t get into the details, but Danny Ryan has a decent write up on how expensive this can get, especially with the high value of Ether .
However, if you owned the Plasma Chain and invited nodes to come participate, they might be inclined if your incentive structure was better. Furthermore, since chains are decomposed, you can send children chains tasks to be completed without requiring them to be committed to your chain. Your chain stores the results only. In the Wikipedia example, you can send children chains individual categories in Wikipedia to index the words over. These children then send pages in that category to their children, who then break those pages into chunks by section to their children, who then return a unique list of words, who their parent then indexes, who then sends that index back to the category parent, who then combines the indexes in the category and sends it back to your Plasma Chain who then combines all categories indexes and stores the, much, much smaller result set as a permanent form of knowledge in your blockchain. Does this sound familiar? It’s exactly a MapReduce operation .
In this model, space isn’t consumed on the root chain, where space is extremely competitive (and therefore expensive). To keep storage needs low, this farmed-out network of worker nodes is significantly more cost-effective and enables new computation models in the Ethereum network. This enables a whole new world of computing paradigms on the Ethereum network.
The main key to get from this is, simply put, parallel computational models are now possible using smart contracts.
In the next part of the series, I explore architecture opportunities that Plasma enables, and talk on some of the criticisms to the approach.