<p>In the Bitcoin scripting system, anything that is not explicitly OP_FALSE (0) is implicitly true. Because the top stack elements is not 0, it will be evaluated as true.</p>

CC BY-SA 4.0
2022-03-20T19:37:06.690Z
"The top stack item true" is just a relay policy then?
brq
CC BY-SA 4.0
2022-03-20T21:07:00.930Z
No, it is a consensus rule.
Ava Chow
CC BY-SA 4.0
2022-03-20T19:34:32.423Z
2022-03-20T19:34:32.423Z
Ava Chow
<p><a href="https://en.bitcoin.it/wiki/Script" rel="nofollow noreferrer">Quoting Bitcoin wiki:</a></p>
<blockquote>
<p>A transaction is valid if nothing in the combined script triggers
failure and the top stack item is true (non-zero).</p>
</blockquote>
<p>However, P2WPKH and P2WSH scriptPubkeys are two data pushes of witness versions and witness programs with empty scriptsigs spending them. From a pre-segwit client perspective, stack is ending with data pushes which are non-true? If so how do legacy clients evaluate segwit spends true?</p>

<segregated-witness>
How do pre-segwit clients evaluate segwit spends true?
brq
# How do pre-segwit clients evaluate segwit spends true?

(Asked by: username_0 on 2022-03-20)

[Quoting Bitcoin wiki:](https://en.bitcoin.it/wiki/Script)

> A transaction is valid if nothing in the combined script triggers
> failure and the top stack item is true (non-zero).

However, P2WPKH and P2WSH scriptPubkeys are two data pushes of witness versions and witness programs with empty scriptsigs spending them. From a pre-segwit client perspective, stack is ending with data pushes which are non-true? If so how do legacy clients evaluate segwit spends true?

**Tags:** segregated-witness


---

## 1 answers

### Answer by username_1 on 2022-03-20. Score: 1 | Accepted answer

In the Bitcoin scripting system, anything that is not explicitly OP\_FALSE (0) is implicitly true. Because the top stack elements is not 0, it will be evaluated as true.

> **Comments:**
> **username_0**: "The top stack item true" is just a relay policy then?  
> **username_1**: No, it is a consensus rule.  

---

