0

I'm learning about basic transactions and know that a transaction should contain:

i) Signature of the sender using some operator: sign(private key,message)

ii) Receivers Public key (wallet address)

iii) Hash Pointer pointing to the originating transaction / previous owner (i.e. A hash of the previous transaction's hash, signatures, etc)

I'm not sure if this is all that a transaction should contain, and also whether my understanding of point i) and especially iii) is correct. Hash pointers are a bit confusing; I understand the 'direction' of the arrow to mean we are pointing to what we are hashing, as opposed to the direction of flow of information.

Interested to hear your thoughts to help my understanding!

1 Answer 1

1

Transactions consist of a version number, a list of inputs, a list of outputs, and a lock time.

Each input contains a reference to the output it is spending. This reference is the hash of the transaction containing the output followed by the 0-based index of the output's position in list of outputs. Then there is the input script which contains whatever data is necessary to satisfy the conditions of the output script. Lastly there is a sequence number.

Each output contains the amount of Bitcoin in satoshis and an output script that defines the conditions necessary to spend that output.

It is important to note that addresses are not included anywhere; rather they encode data that is then used to construct the output script. It is also important to note that output scripts are not just public keys (although a public key can be included in the output script) and input scripts are not just signatures (although signatures can be included in the input script).

A description of the actual transaction format can be found on bitcoin.org.

2
  • Thanks Andrew. Regarding my understanding of hash pointers, am I right to say that it simply points to the 'output' it is hashing ? (i.e referencing)
    – DCH
    Jun 16, 2018 at 10:50
  • The hash itself does not point to the output. It points to the transaction. The index number, combined with the hash, points to the output.
    – Andrew Chow
    Jun 16, 2018 at 18:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.