omgnetwork / plasma-mvp

OmiseGO's research implementation of Minimal Viable Plasma
MIT License
561 stars 158 forks source link

MVP spec mismatch when client calling withdraw() #73

Closed ggs134 closed 6 years ago

ggs134 commented 6 years ago

https://github.com/omisego/plasma-mvp/blob/1683070b28bb64b0193f7dd4220957849fd6d317/plasma/client/client.py#L47

According to the Minimal Viable Plasma, priority is <blknum 1000000000 + txindex 10000 + oindex>.

So, <txPos[0] 1000000000 + txPos[1] 10000 txPos[2] + 0> should be changed to txPos[0] 1000000000 + txPos[1] 10000 + txPos[2] 1

smartcontracts commented 6 years ago

Yep this looks like a bug, should be

utxoPos = txPos[0] * 1000000000 + txPos[1] * 10000 + txPos[2] * 1