Some Resources on Plasma

A messy collection on some articles and projects about Plasma.

Export from my notes. Hope to reorganize this in future.

Make this as a start post in Listed.

Famous Ones

Blockchain Scaling Solutions: Cosmos and Plasma

https://medium.com/tendermint/blockchain-scaling-solutions-cosmos-and-plasma-b5ee09456f80

https://plasma.io/plasma.pdf

Breaking Down How Plasma Works

First things first, we need to define what Plasma is. There are three different Plasma concepts that are often talked about:

  • Plasma as outlined in the original whitepaper
  • Minimal Viable Plasma (or MVP)
  • Plasma Cash
  • There are other plasmas too, such as Plasma Debit, and More Viable Plasma, as this is still an active design space

Minimal Viable Plasma (MVP)

With this setup for MVP, we are simply doing token transfers, and there are no general smart contract capabilities. Instead, we get strong token security guarantees.

Why is EVM-on-Plasma hard?

https://medium.com/@kelvinfichter/why-is-evm-on-plasma-hard-bf2d99c48df7

  • It’s not always clear who gets to move a contract from the Plasma chain to the root chain.
  • If anyone can modify the state of the contract, then anyone can block an exit.
  • Validating EVM state changes inside the EVM is hard.

Why we’ve chosen a Plasma-like sidechain solution for our DEX

https://blog.altcoin.io/why-weve-chosen-a-plasma-like-sidechain-solution-for-our-dex-97737ca46b86

State channels made it possible to transact between multiple parties off-chain (as many times as you like) and only commit that block once the channel was closed, saving time and gas costs.

But as the network grows and more transactions take place, you end up with an increasingly complex transaction history that each peer has to verify in order to trade.

Before anyone can trade, they have to verify their trading partner’s transaction history by verifying each of their trading partners and their histories, and so on. Depending on network activity, your computer would need to perform thousands or even millions of transactions before processing your trade.

https://parseclabs.org/

Plasma Leap

PARSEC Labs
@Parsec_Labs
Fast and secure blockchain. Based on Plasma and PoS. Scaling Ethereum! http://t.me/parseclabs

parseclabs.org
Joined January 2018

Explained: Ethereum Plasma

https://medium.com/@argongroup/ethereum-plasma-explained-608720d3c60e

Plasma guarantees that every party can always withdraw their funds and assets back onto the main chain at any time. So even in the case of a attacker trying to take control over the network, the worst that can happen is they force you to leave the child-chain.

In addition, when making a transaction that can be challenged, you are also required to attach a small bounty to it, in order to incentivize people to challenge you, if they believe your behavior was malicious. It’s like trying to steal something and saying “I’ll pay you $5 if you can catch me.”

In the normal case, if Bob wanted to transfer X ETH back to the main-chain, he’d submit an exit transaction (plus the bounty as collateral), and if it went unchallenged he’d be able to claim X ETH on the main-chain. If Bob’s exit transaction was successfully challenged, it would get cancelled and the challenger gets the bounty.

Does Plasma have drawbacks?

The main concern related to the current Plasma proposal is what would happen if everyone using a child-chain tried to exit the sidechain at the same time. In the case of a mass withdrawal, there might not be enough capacity on the Ethereum main-chain to process everyone’s transactions within the challenge period, meaning users could lose funds. Fortunately, there are many possible techniques for preventing this, e.g. by extending the challenge period in a way that is responsive to demand for withdrawals.

Plasma 关注的一个核心是,PlasmaChain 上的用户尝试退出。当同时很多用户退出时,主链的处理能力将不能承载退出交易,从而导致挑战时间很可能超时。

Journey to Scale on Ethereum — State Channels, Plasma and Plasma Cash

https://blog.ethlend.io/journey-to-scale-on-ethereum-state-channels-plasma-and-plasma-cash-4fe7914e06a

The fundamental drawback of Plasma Cash is consequence of the indivisibility of the coins. If an user has a coin of 10 ETH, with this model it is not possible to use only 1 ETH in the Child Chain, because by definition each coin is indivisible.

The State of Plasma: #1

https://media.consensys.net/the-state-of-plasma-1-6b48c1e4b295

这篇文章内容十分多,汇总了很多资料

Plasma White Paper [August 2017] Vitalik and Joseph Poon

Minimum Viable Plasma [January 2018] Vitalik — along with the help of Joseph Poon and David Knott

Plasma Cash [March 2018] Vitalik alongside Karl Floersch

Plasma Cash utilizes unique identifiers when depositing ETH into a Plasma contract that allows users to only store information about their coin. But even then, the storage requirements from a user standpoint can be excessive, as one is required to store and maintain an ever-growing history of transactions, inclusion proofs, and non-inclusion proofs.

Plasma XT [May 2018] Kelvin Fichter

a method to reduce the storage requirements and maintain finality using cryptoeconomic aggregate signatures and checkpointing

Plasma Debit & More Viable Plasma [June 2018]

Each Plasma Debit coin is essentially equivalent to a bidirectional payment channel (similar to the multisig-based payment channels used in the Lightning Network) between the current coin owner and the operator. This allows the operator to record microtransactions in the payment channel of arbitrary amounts. This method currently only works with single-operator run Plasma chains.

Also in June 2018, More Viable Plasma was introduced by Kelvin Fichter and Ben Jones with assistance from Vitalik Buterin, Li Xuanji, David Knott, Eva Beylin, and Kasima Tharnpipitchai. With the same acronym as Minimum Viable Plasma, it is generally known as MoreVP. It is an extension of MVP but reorganizes the exit priority from output-age priority to youngest-input priority and removes confirmation signatures. There is also an additional special exit game that requires users to post bonds and piggyback off the transaction.

https://www.learnplasma.org/en/

Notable Active Plasma Implementations
OmiseGO (MVP-Python, Cash-Python):
https://github.com/omisego/plasma-contracts
https://github.com/omisego/plasma-mvp
https://github.com/omisego/plasma-cash

Loom Network (Cash-Python):
https://github.com/loomnetwork/plasma-cash

BankEX (MVP-JS):
https://github.com/BANKEX/PlasmaParentContract
https://github.com/BANKEX/PlasmaETHexchange

Blockchian @ Berekley (MVP-GO):
https://github.com/FourthState/plasma-mvp-rootchain
https://github.com/FourthState/plasma-mvp-sidechain

DeepBlockchain (Cash-N/A):
https://github.com/wolkdb/deepblockchains

Lucidity Tech (Cash-JS):
https://github.com/luciditytech/lucidity-plasma-cash

Notable People

  • Joseph Poon (Plasma Author)
  • Vitalik Buterin (Plasma Author)
  • Karl Floersch (Ethereum Foundation)
  • David Knott (OmiseGO)
  • Kelvin Fichter (OmiseGO)
  • Dan Robinson (Chain)
  • Xuanji Li (L4 Ventures)
  • Georgios Konstantopoulos (Loom Network)

Plasma in 10 minutes

https://medium.com/chain-cloud-company-blog/plasma-in-10-minutes-c856da94e339

https://medium.com/loom-network/plasmachain-gamechain-socialchain-the-loom-network-universe-expounded-5c672617a333

https://blog.ujomusic.com/a-plasma-cash-primer-27dcfd1d5ddc

https://www.learnplasma.org/en/learn/mvp.html

Exit Priority

Note then that “older” UTXOs withdraw before newer ones. That means that if an invalid transaction is ever included in the blockchain, then all transactions that occurred before the invalid transaction will be processed before that invalid one. We’ve solved half of our problem!

疑问:这里的 blcokchain 指的是 rootchain 还是 plasmachain?应该是 plasmachain?那么 rootchain 具体是怎么验证的?

Confirmation Signatures

Whenever a user makes a transaction, they’ll sign a first signature to have that transaction included in a block. Then, once the transaction is included in a valid block, the user will sign a second signature, called a confirmation signature. Users correctly following this rule will never sign a confirmation signature unless they know that their transaction was included in a valid block.

We add an extra rule that exit challenges also have to provide the confirmation signature. Now, if the operator includes a user’s transaction after their invalid transaction, the user simply won’t sign a confirmation signature. A transaction included after an invalid transaction won’t have a confirmation signature, and therefore won’t be valid. Every correctly behaving user can therefore get their funds back.

相当于让用户检查是否有异常情况,提现逻辑里加入对用户确认签名的检查

Watching the Plasma Chain

Users should run this software at least once every few days, although the exact time depends on parameters set by the Plasma MVP smart contract.

However, if something ever goes irreversibly wrong (hopefully an extremely rare occurrence), then the user’s wallet will automatically start to withdraw their funds from the plasma chain. This automatic withdrawal is what keeps user funds safe, even in the very worst case when a malicious operator is trying to steal funds.

当 plasmachain 有异常情况时,用户如果不 withdraw 会怎样?

More Viable plasma

Confirmation signatures make for pretty bad user experience. Users need to sign a signature before making a transaction, wait to see the transaction included in a valid block, and then sign another signature.

These second signatures must also be included within a plasma block, reducing block space available for more transactions!

within a plasma chain, reducing block space 是什么意思?

More Viable Plasma, also known as MoreVP, is an extension to Minimal Viable Plasma that removes the need for confirmation signatures.

MoreVP 不需要 confirmation signatures

Plasma MVP relies on confirmation signatures because withdrawals are processed in order based on the position of the output being withdrawn.

In a nutshell, MoreVP modifies the process through which users can withdraw their funds. The ordering of each withdrawal becomes based on the position of the youngest input to the transaction that created an output.

Minimal Viable Plasma

https://ethresear.ch/t/minimal-viable-plasma/426

The Plasma contract maintains the following data structures:

  • The owner (set at initialization time)
  • A list of Plasma blocks, for each block storing (i) the Merkle root, (ii) the time the Merkle root was submitted.
  • A list of submitted exit transactions, storing (i) the submitter address, and (ii) the UTXO position (Plasma block number, txindex, outindex). This must be stored in a data structure that allows transactions to be popped from the set in order of priority.

  1. 合约的 owner 还是 Plasma Chain 的 operator,owner 有没有其他权限?
  2. 是否 Plasma Chain 上的每个块都需要提交?
  3. 退出交易

A Plasma block can be created in one of two ways.

  • First, the operator of the Plasma chain can create blocks.
  • Second, anyone can deposit any quantity of ETH into the chain, and when they do so the contract adds to the chain a block that contains exactly one transaction, creating a new UTXO with denomination equal to the amount that they deposit.

  1. 相当于 block producer,operator 可以是几个人?
  2. 合约怎么把交易自动发到 Plasma Chain 上。是否是监听 root chain 事件,然后由 operator 再在 plasma chain 上构造交易?这个交易是类似铸币交易?

However, if when calling exit, the block that the UTXO was created in is more than 7 days old, then the blknum of the oldest Plasma block that is less than 7 days old is used instead. There is a passive loop that finalizes exits that are more than 14 days old, always processing exits in order of priority (earlier to later).


7 days, 14 days 依据

User Behavior

The process for sending a Plasma coin to someone else is as follows:

Ask them for their address.
Send a transaction that sends some of your UTXOs to their address.
Wait for it to get confirmed in a block.
Send them a confirm message, signed with the keys that you use for each of your UTXO inputs.

Emergency exiting

A user should continually validate (or validate at least once per 7 days) that the Plasma chain is fully available and valid; if it is not, they should exit immediately.

立即退出的依据是什么?如果不立即退出呢?

PPT | Plasma 最小实现版

https://ethfans.org/posts/plasma-mvp

很多章节PPT

https://www.youtube.com/watch?time_continue=14&v=jTc_2tyT_lY

A quick overview of Plasma MVP--the first easily implementable full Plasma specification.

https://docs.google.com/presentation/d/1RzextrcF7LJFt9pGE-gEN3HyLFlQ_8kbl4nGAvsaAM4/edit#slide=id.g333c27f06c_0_4263

科普 | 构建 Plasma 链 0x1

https://ethfans.org/posts/construction-of-plasma-chain-0x1

科普 | 构建 Plasma 链 0x1

https://ethfans.org/posts/construction-of-plasma-chain-0x1

Plasma - 退出机制的安全性介绍

https://mp.weixin.qq.com/s/I2FKSwVaIL9ABw-prqErnw

Layer2技术 - Plasma MVP图例介绍

https://mp.weixin.qq.com/s/cPskPREZGSMEV7Tv4x3-jg

More Viable plasma

MoreVP 尝试解决 MVP 必须要 confirmation signature,体验差的问题

Confirmation signatures make for pretty bad user experience. Users need to sign a signature before making a transaction, wait to see the transaction included in a valid block, and then sign another signature. These second signatures must also be included within a plasma block, reducing block space available for more transactions!

第二次签名是否要打包入 plasma block?

Plasma MVP relies on confirmation signatures because withdrawals are processed in order based on the position of the output being withdrawn.

MoreVP modifies the process through which users can withdraw their funds. The ordering of each withdrawal becomes based on the position of the youngest input to the transaction that created an output.

https://ethresear.ch/t/more-viable-plasma/2160 (Kelvin Fichter OMG 的人)

https://github.com/omisego/elixir-omg/blob/develop/docs/morevp.md

--
More information about exit priority can be found at the OmiseGO research repository here

https://github.com/omisego/research/blob/master/plasma/plasma-mvp/explore/priority.md


Youngest-Input Priority

This proposal replaces output-age priority with something we call “youngest-input” priority. Basically, the exit priority of an output is now the age of its youngest input. We claim that this construction is safe (honest clients cannot have money stolen) as long as clients don’t spend any outputs included after any invalid or witheld transaction.

初步看下来,MoreVP 与 MVP 处理退出博弈正好是两种思路。MVP 退出优先级根据 Output 的新旧程度,越老越优先退出(Output-Age Priority);而 MoreVP 退出优先级根据 Input 的新旧程度,越新越优先退出(Youngest-Input Priority)。

这里讨论安全问题时,新旧程度是指提交到 rootchain 的先后顺序。我们简化思考,新旧对比的目标为正常交易和作恶交易。

无论是 MVP 还是 MoreVP,在退出机制上都是让非作恶者先退出(把合约里的钱提走)

MVP 中,正常交易引用的 Output 更早被确认。这样一旦出现异常,正常用户提现走人即可(退出优先级更高)。

而 MoreVP 中,确保

Ethereum Plasma Debit and More Viable Plasma

https://medium.com/taipei-ethereum-meetup/ethereum-plasma-debit-and-more-viable-plasma-5a4ac3fa3c0b
https://kimiwublog.blogspot.com/2018/09/ethereum-plasma-mvp-and-plasma-cash.html

https://www.youtube.com/watch?v=s7GGlk8CV5I#utm_source=Facebook_PicSee&utm_medium=Social/#t=4h46m40s
Tsan Hsiang Hsu 徐粲翔
OmiseGO 國立臺灣大學
COSCUP x GNOME.Asia x openSUSE.Asia 2018 IB302 議程直播 Live broadcast

MVP的exit game

  1. 越舊的UTXO的優先權越高
  2. 送出交易需要簽章,離開時也需要簽章(confirmation signature)
  3. 單一挑戰期(需要exit bond)

MoreVP的exit game

  • 越新的input(youngest input)優先權越高
  • 只需要送出交易的簽章,不需要confirmation signature
  • 兩段式挑戰期(需要exit bond跟piggyback bond)

kfichter 的一段关于 MVP 为何需要 confirmation signature 的解释

https://ethresear.ch/t/why-do-dont-we-need-two-phase-sends-plus-confirmation/1866/13

OMG MoreVP SPEC

https://github.com/omisego/elixir-omg/blob/develop/docs/morevp.md

Additionally, it's important to note that the MoreVP exit protocol is not necessary in all cases.

不是所有场景下都需要 MoreVP 退出协议

We can use the Plasma MVP exit protocol without confirmation signatures for any transaction included before an invalid (or, in the case of withheld blocks, potentially invalid) transaction.

不带确认签名的 Plasma MVP 退出协议

We therefore only need to make use of the MoreVP protocol for the set transactions that are in-flight when a Plasma chain becomes byzantine.

MoreVP protocol 针对 in-flight 交易

  • exit bond
  • piggyback bond (on exit)

MoreVP Exit Protocol Specification

The MoreVP exit protocol makes use of a “challenge-response” mechanism, whereby users can submit a challenge but are subject to a response that invalidates the challenge. To give users enough time to respond to a challenge, the exit process is split into two “periods.”

We define each period to have a length of half the minimum finalization period (MFP).

这一段是重点

https://github.com/omisego/elixir-omg/blob/develop/docs/morevp.md#starting-the-exit

https://scrapbox.io/m0t0k1ch1/More_Viable_Plasma 日本人的整理很赞,scrapbox 网站很赞

Plasma Cash Simple Spec

觉得 MoreVP 关注者过少,且比较复杂,不妨先看 Plasma Cash。

https://karl.tech/plasma-cash-simple-spec/

https://www.learnplasma.org/en/learn/cash.html

https://medium.com/@kelvinfichter/whats-a-sparse-merkle-tree-acda70aeb837