<blockquote>
  <p>I have some questions regarding transactions, prevTxHash in Inputs of a Transaction, does this carry the hash of previous transaction in block or hash of the prev transaction by the same private key.</p>
</blockquote>

<p>No, it's the hash of the transaction whose output you are currently spending. Suppose I wanted to spend <a href="https://blockchain.info/tx/961763d1c918e654c0ec922eb0aeb7f7e951e9bfae5398ec52e93fa0576c1f74" rel="nofollow noreferrer">this</a> transaction. I would include 961763d1c918e654c0ec922eb0aeb7f7e951e9bfae5398ec52e93fa0576c1f74 as the previous transaction hash in order to identify which output I am spending.</p>

CC BY-SA 3.0
2017-07-31T03:28:04.690Z
Thanx for the reply it helped me a lot, hopefully you have heard about SEGWIT soft fork, i just wanted to know that f signatures are not included in transaction how can they verify the transaction without it?
Hamza Tahir
CC BY-SA 3.0
2017-07-31T03:31:49.253Z
They're not hashed in the transaction ID. However, signatures are kept alongside the transaction when relayed or in blocks. The wtxid in the block commits to the signature.
Nick ODell
CC BY-SA 3.0
2017-07-31T03:47:34.650Z
thanx, but this arise a confusion in my mind, So as in segwit soft fork witnesses are kept in an extension block, so the software that is not updated it yet still accept the blockchain, so how can it understand and validate the transactions as it doesn't know the new rule that witnesses are in extension block not with the transaction?
Hamza Tahir
CC BY-SA 3.0
2017-07-31T06:54:31.837Z
@HamzaTahir Segwit outputs appear as anyone-can-spend outputs to nodes that do not understand segwit. Non-segwit clients do no meaningful validation of segwit outputs.
Nick ODell
CC BY-SA 3.0
2017-07-25T02:44:49.193Z
2017-07-25T02:44:49.193Z
Nick ODell
<p>I have some questions regarding transactions,
<strong>prevTxHash</strong> in Inputs of a Transaction, does this carry the hash of previous transaction in block or hash of the prev transaction by the same private key.</p>

CC BY-SA 3.0
2017-07-25T00:59:37.250Z
Welcome to the site.  It is best to use a descriptive title that explains what your post is about; titles that just say "please help" don't draw the attention of the relevant experts.  I made an edit; if you prefer something else you may also use the edit button.
Nate Eldredge
<transactions>
What is prevTxHash?
Hamza Tahir
# What is prevTxHash?

(Asked by: username_0 on 2017-07-24)

I have some questions regarding transactions,
**prevTxHash** in Inputs of a Transaction, does this carry the hash of previous transaction in block or hash of the prev transaction by the same private key.

**Tags:** transactions

> **Comments:**
> **username_1**: Welcome to the site.  It is best to use a descriptive title that explains what your post is about; titles that just say "please help" don't draw the attention of the relevant experts.  I made an edit; if you prefer something else you may also use the edit button.  

---

## 1 answers

### Answer by username_2 on 2017-07-25. Score: 1 | Accepted answer

> I have some questions regarding transactions, prevTxHash in Inputs of a Transaction, does this carry the hash of previous transaction in block or hash of the prev transaction by the same private key.

No, it's the hash of the transaction whose output you are currently spending. Suppose I wanted to spend [this](https://blockchain.info/tx/961763d1c918e654c0ec922eb0aeb7f7e951e9bfae5398ec52e93fa0576c1f74) transaction. I would include 961763d1c918e654c0ec922eb0aeb7f7e951e9bfae5398ec52e93fa0576c1f74 as the previous transaction hash in order to identify which output I am spending.

> **Comments:**
> **username_0**: Thanx for the reply it helped me a lot, hopefully you have heard about SEGWIT soft fork, i just wanted to know that f signatures are not included in transaction how can they verify the transaction without it?  
> **username_2**: They're not hashed in the transaction ID. However, signatures are kept alongside the transaction when relayed or in blocks. The wtxid in the block commits to the signature.  
> **username_0**: thanx, but this arise a confusion in my mind, So as in segwit soft fork witnesses are kept in an extension block, so the software that is not updated it yet still accept the blockchain, so how can it understand and validate the transactions as it doesn't know the new rule that witnesses are in extension block not with the transaction?  
> **username_2**: @username_0 Segwit outputs appear as anyone-can-spend outputs to nodes that do not understand segwit. Non-segwit clients do no meaningful validation of segwit outputs.  

---

