bitcoin core – What precisely is the “vout” area?

0
72


vout is the 0 based mostly output index. It may be extra than simply 0 or 1, however these are typically the commonest as a result of individuals do not make transactions with a lot of outputs.

To know vout, you need to perceive how Bitcoin transactions really work. A Bitcoin transaction consumes transaction outputs as inputs, and creates transaction outputs. It may devour a number of transaction outputs, and create a number of transaction outputs. Moreover, these transaction outputs may be consumed by completely different transactions, so each wants to have the ability to be uniquely recognized. So a singular identifier accommodates two objects: the transaction id to establish the transaction an output belongs to, and an index to level to the place within the record of outputs in that individual transaction.

That index is what the vout is. As with many issues in pc science, it’s a 0 based mostly counter so the primary merchandise is at index 0, the second at 1, and so forth.

listsinceblock, listtransactions, and another RPCs in Bitcoin Core do not really record Bitcoin transactions. Fairly they record the logical transaction – the one which people have a tendency to think about. It’s because a single Bitcoin transaction can each ship Bitcoin away from you, and permit you to obtain Bitcoin.

In a single Bitcoin transaction, you may be consuming your personal transaction outputs, so the transaction is sending your Bitcoin away. Nevertheless not all transactions include inputs from the identical particular person. This transaction may contain one other one that has their very own transaction outputs as inputs to this transaction. And maybe they’re creating an output that you’d be capable of spend. So this transaction can also be sending Bitcoin to you. This single Bitcoin transaction would then include two logical transactions – one the place you’re sending, and one the place you’re receiving.

This may usually happen with change outputs, however the software program shouldn’t be displaying you these as it’s sensible sufficient to cover them and never take into account them as a definite logical transaction. Change outputs are when a transaction output is created by you that sends the Bitcoin again to your self. They exist as a result of a transaction output have to be spent in full, however usually the quantity you’re really sending doesn’t precisely match the precise quantity of the output your are spending. So you need to create an output that sends the rest again to your self.



Supply hyperlink

Leave a reply