More Viable Plasma


#22

The proofs that both will not happen at once look good, but they assume too much to be useful for the “at least one happens proof”. They assume that one of the xor components happens, which is what we’re supposed to be proving. Or am I missing something?

Could you try expanding on this reasoning that leads to at least one happening?

Meanwhile, I’ll try to tackle that proof from a different angle, I think you can prove the whole statement by proving these two implications:

1/ assume:

o \in unspent(reality(T_n))
o \not\in double_spent(T_n)
o \in I(t_{n+1})
o \not\in E(T_{n+1}) (the “other xor component” not being true)

then these should imply O(t_{n+1}) \subseteq E(t_{n+1})

2/ assume:

o \in unspent(reality(T_n))
o \not\in double_spent(T_n)
o \in I(t_{n+1})
O(t_{n+1}) \not\subseteq E(t_{n+1}) (the opposite “xor component” not being true)

then these should imply o \in E(T_{n+1})

Sadly, I can’t follow that through now, b/c in transit. If you could elaborate on your reasoning, I’ll delve into that a couple of days later or I’ll try to pick up with this method above.


#23

Ah, yes–Kelvin is right, the initial definition of liveness is wrong. The third option is that if t_{n+1} is a double spend, then its inputs are removed from the list of exitable outputs E.


#24

Hello @kfichter

Would you clarify how a resolution should work in the following (hypothetical) example:

  1. There is a transaction T1 has an input I1_0 spending an output UTXO1. Transaction T1 is in block N. T1 has in total two inputs and few outputs
  2. There is a transaction T2 has an input I2_0 spending an output UTXO1 too (double spend). Transaction T2 is in block N. T2 has two inputs and few outputs
  3. T2 has the second input I2_1 spending some UTXO2.
  4. T2 has higher priority than T1 due to younger UTXO2.
  5. There is another transaction T3 spending an output UTXO2 and colliding with T2.
  6. T3 has higher priority than T2

That means that both inputs of T2 collide with some other transactions (so such transactions should be eliminated completely), but T1 still can not exit.

Another example: one of many inputs to transaction T is colliding with some other transaction. T has lower priority than another transaction. Lets name other inputs to transaction T as UTXO[i]. In this case should T be deemed as invalid challenge to attempts to exit UTXO[i]? (In case if other users try to exit a transaction producing those UTXO[i])

Sincerely, Alex


#25

If T2 is included before T1, then T1 is not canonical and can’t be exited. Canonicity is determined by the position in the chain, not the priority of the youngest input.

So in your example, if the inclusion order is T1, T2, T3, then the outputs of T1 will be able to exit.


#26

Good day, Kelvin.

I’m sorry, looks like I didn’t make a clear example. Inclusion order is T3 - T2 -T1.

Nevertheless following your explanation T3 exists, T2 is deemed non-canonical, so T1 also exists as T2 is already non-canonical. Would you confirm such logic, right now it’s the only puzzling thing for me to compete the implementation.

Sincerely, Alex


#27

If the order is T3, T2, T1 and assuming there are no other conflicting transactions in the chain, then T3 is the only transaction that can be exited. We define canonicity with respect to a single transaction - the set of competing transactions to t is the set of all transactions such that the transaction shares an input with t. The canonical transaction within that set is the transaction that’s included first. So in your example, T3 is canonical, but T2 and T1 are both not canonical (T2 because of T3, and T1 because of T2).

So even though T2 is not canonical, T1 is also not canonical because we look at all transactions when determining canonicity, not just other canonical transactions. The reason we make this distinction is because we would otherwise potentially get a long challenge-response game where each challenge is subsequently proven not canonical.


#28

Hey Kelvin,

Very interesting post. I’m confused by this line in particular:

“Honest owners of inputs or outputs to t “piggyback” on this exit and post a bond. Users who do not piggyback will not be able to exit.”

My current understanding of the above is that an owner of one of the outputs in transaction t, may initiate an exit. Any honest owner of another output may “piggyback” on this exit and post a bond if they wish to exit as well. If they do not wish to exit, they do not need to post a bond and can start an Exit at a later time once the original exit has finalized.

Is this understanding correct? Do honest users have to post a bond to a transaction t regardless of if they wish to exit at that particular time? If so, why?

Also, why do the owners of the inputs of a transaction have to post a bond. Since they are inputs, they have already spend their UTXO’s in transaction t in order to create the outputs of transaction t. Thus, they shouldn’t be exiting their inputs to t if they are honest.

Let me know if I’m missing something.


#29

Also following from shamatar’s example:

In the case where the priority order is T3, T2, T1 then the funds in UTXO1 are locked forever, right?

Since the original owners of UTXO1 cannot withdraw because users can post a proof that it was spent. The new conflicting owners in the outputs of T2 and T1 cannot exit because those transactions are both non-canonical.


#30

Small nitpick - anyone can start the exit, not just an owner of the outputs.

Your understanding is correct. Honest users don’t need to post a bond if they don’t wish to.

Owners of the inputs need to post a bond in the case that t is not canonical (some input double spend is included earlier than t), and therefore the outputs aren’t exitable. Any unspent inputs to t should get their money back.

Also correct. The owner of UTXO1 spent in two transactions, so UTXO1 is no longer exitable, even if it wasn’t included in any canonical transactions.


#31

Hey Kelvin,
FourthState (the team from Blockchain@Berkeley) were discussing More Viable Plasma. We came across a scenario where a validator can grief honest users who received transactions from validator-controlled addresses.

In the case where there is block withholding, in More Viable Plasma, the receivers of transactions can exit safely because their inputs occur before any invalid transactions inputs.

Consider the case where a validator sends a transaction to user A:

He then refuses to include that transaction, and instead spends those same inputs back to himself and withholds the block.

When user A posts a bond and tries to exit their unincluded transaction, the validator can challenge by submitting his included transaction which is the canonical transaction and claim A’s bond.

A loses their bond, even though A was not malicious. A validator that has sent multiple transactions that are in the mempool can grief all recipients of those transactions.

Only the validator can pull off such an attack, but there is no way for the user to know whether a received transaction was from a validator-controlled address. Thus when there is block-holding, an honest receiver must take on the risk that the sender may have been the validator and the honest receiver can potentially lose their bond.

Worse still, if user A tries to exit too soon after the withheld block, the validator may be able to challenge and publish the block immediately causing users to attribute the withheld block to low availability as opposed to malicious activity. This would allow the validator to get away with malicious activity without the punishment of a mass exit.

Does More Viable Plasma have a solution to this attack?


#32

Yep, we thought about this problem significantly. I haven’t found a design that doesn’t have this griefing vector, unfortunately. Even confirmation signatures has a similar problem - imagine the following scenario:

  • A sends to B (operator).
  • A sees the transaction included in a block, publishes a confirmation to B.
  • B pretends to go offline, A attempts to withdraw from the original input.
  • B reveals tx + confirmation, griefing.

If you’re using offline confirmation signatures, then B doesn’t even need to be the operator. For the above to be a problem.

As for the second aspect (low availability), I don’t think it’s really a problem if clients have some standard wait period and will begin to exit automatically if they don’t receive a block within that period. Clients shouldn’t initiate an in-flight exit unless they’re sure that something bad has happened.