1

I am not fully understanding the design purpose of the scriptPubKey in the transaction output.

I think the tx's (say tx1 here) output could just be the receiver's public key's hash.

Then when the receiver want to send the money to another one, he only needs to create the transaction tx2 (with receiver's public key and the sig of the previous transaction).

Then the bitcoin net work could check:

  1. Is the public hash(tx2.public_key) = t1.output.hash_public_key?
  2. Verify(tx2.sign, tx2.public_key, tx1)

a+b can approve that this transaction is created by the receiver.

Therefore, I am not quite understanding why we need to save OP_DUP OP_HASH160 next_receiver_public_key_hash OP_EQUALVERIFY OP_CHECKSIG in the tx.output.

1 Answer 1

3

Therefore, I am not quite understand why we need to save

Because scripting system allows more possibilities. https://en.bitcoin.it/wiki/Script#Scripts

1
  • Why Bitcoin need to provide that kind of the flexible, but use some enum to restrict the possible transaction type.
    – Carpemer
    Jan 15, 2016 at 3:25

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.