1

Does a transaction with 50 inputs have 50 different hashofthingtosign, one for each input, or does it just have one that is used for all the input scripts?

1

It is different for each input. Each input's hash preimage contains that input's previous output's scriptPubKey in that input's scriptSig. All other inputs have empty scriptSigs. This means that the preimage for each input is unique, and thus has a unique hash.

  • A large portion (but not all) of the hash preimage consists of the serialized transaction where all inputs except the one being signed for have empty scriptSigs. – Andrew Chow Aug 8 '17 at 4:38
  • I don't know if this is something I'm allowed to ask, if not, totally erase it. Is there a way I can just pay someone to make a python script for me where I put in the transaction id and it sends the hash of each "input script" from that transaction to a file? I've got some serious OCD on this. Its a puzzle I must complete! – Mine Aug 8 '17 at 5:33
  • Sure you can, but this is not the right place to ask for such a thing. Such a script would require having the entire blockchain and know where each transaction is in the blockchain. – Andrew Chow Aug 8 '17 at 5:35
  • Where would be the right place to ask for something like that? and blockcypher.com has stuff that gives people access to such stuff within python, they could have it kick back the whole data set for a particular transaction if I have read it correctly. – Mine Aug 8 '17 at 5:38
  • Try asking on bitcointalk.org or in the various Bitcoin subreddits (r/bitcoin, r/jobs4bitcoins) – Andrew Chow Aug 8 '17 at 5:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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