Monday 2 January 2017

UTXO Model


In Bitcoin, a transaction actually consumes a collection of objects called unspent transaction outputs (“UTXOs”) created by one or more previous transactions, and then produces one or more new UTXOs, which can then be consumed by future transactions. The database is a set of immutable rows keyed by (hash:output index). Transactions define outputs that append new rows and inputs which consume existing rows.

Ethereum uses the virtual computer model. It models the database as the in-memory state of a global computer with a single thread of execution determined by the block chain.

There are two validation rules for a transaction:
(i) the transaction must contain a valid signature for the owner of each UTXO that it consumes,

(ii) the total denomination of the UTXOs consumed must be equal or greater than the total denomination of the UTXOs that it produces.

Each UTXO has a denomination(value) and an owner. A user’s balance is thus not stored as a number; rather, it can be computed as the total sum of the denominations of UTXOs that they own.

One particular argument is that it allows transactions to be processed in parallel, as if a transaction sender creates two independent transactions they can take care to spend separate UTXOs, and so those transactions can be processed in any order. This order invariance and parallelizability property may also lead to scalability benefits.
UTXOs are stateless, and so are not well-suited to applications that are generally stateful, such as various kinds of smart contracts.

Reference:
https://medium.com/@ConsenSys/thoughts-on-utxo-by-vitalik-buterin-2bb782c67e53#.pjbi84jht

No comments:

Post a Comment