总结plasma ,plasma cash 和 plasma debit

plasma
扩展性方面,通过添加子链扩展主链,每个子链内部有自己的共识机制,子链产生的区块会被打包到主链中,使主链变成了blockchain of blockchain。
性能方面,由于增加了更多链,所以提高了TPS,但是在账户由子链退出到主链过程中,因为子链是UTXO账户模型,需要在主链中搜索所有区块查找包含该账户的所有交易,当区块数量特别大时plasma采用mapreduce去解决,但性能上有隐患。
plasma cash
为了解决上述问题plasma cash在子链中的币是有ID的且不可分割的,每个ID绑定一个pub key。这样退出搜索整个链的时候只需要查找包含该ID的区块,而不是所有区块,并且可以引入checkpoint,在某个point上记录该ID的balance,这样更快的得到退出时得到的币。
plasma debit
plasma cash虽然解决了退出性能问题,但是币的不可分割性导致了无法进行小额交易。为了解决引入了plasma debit。具体解决方法如下英文描述,由此得出plasma debit在性能,可用性上更具优势。

In Plasma Cash, the transaction Merkle tree is divided into slots, each of which stores a fixed denomination of ETH (the amount that was deposited) and tracks a public key. Each transaction in that slot updates the public key currently associated with that coin.

In Plasma Debit, each slot would track not only a public key, but a number a between 0 and v, where v is the total amount of ETH that was deposited into that account on the main chain. v does not change, but a can vary in each transaction, and represents the portion of the current coin that is owned by the owner. The remainder of the money deposited in that slot is owned by the operator. A transaction in which a is changed, like any other transaction, requires a signature from the current coinholder. (The operator does not need to sign the update, since their consent is impli
ed by their inclusion of the transaction.)

When a coin is withdrawn, the coinholder receives a, and the operator receives v – a. (The exit rules need to be altered slightly to allow either the owner or the operator to exit a coin.)

When a coin is initially created, a is equal to v. The operator can increase v (and thus increase their balance held in the coin) by depositing additional ETH into that coin, using a separate operatorTopUp function on the parent chain’s contract.

你可能感兴趣的:(总结plasma ,plasma cash 和 plasma debit)