<p>my teammates and I at Ducat Protocol are trying to debug a transaction that spends a wrapped segwit input, and this one has stumped both myself and @btctechsupport and the entire team:</p>
<pre><code>02000000000102e01170a477e12a8a980bd3465ef4fd13f68c7a63ef9c8fc7e7b22f8ba3d4a1640300000000ffffffffed8c82cae1818870b434de81176491578a4aaed208cc6ec1bb511ec3a625d594000000001600141885d24191efe93d320c438d1bc6f9d341249d8fffffffff041427000000000000225120da4ec4d4c127e1795120b504bd777e42961a406a2b0d9d6e860ce3e6e26599e4d0561e0000000000225120d307434f7fcc9539aea10417fdc07c264085b9b22a194c0c8004814d338ad0071027000000000000225120c85cf7461f01acbe66729deb067b829ff5587e9c2fc300d88b6eb614983e25b400000000000000000b6a5d0800b89c5d01ce290201404291859cb2ba98a36f8db06c49c9530ac19d46affccc85981c3a779a58261ead1680323e22103db1a9569bcb86c546868a4efe479bee3136d64bdf85062319f80247304402200b5721b3f801ab777981e3aa08140d38cebb415a587ce987095f237e4bfc0c6d0220295fd225d0386afd4314fcb6448db4bc960f87cc8505a9777aeded37c18628b9012102d94b9aaf75bfc25472a369dcb7060cfabe10375ab6cb533c995941f12a48d4bb00000000
</code></pre>
<p>We get this from the RPC API:</p>
<p><code>mandatory-script-verify-flag-failed (Script evaluated without error but finished with a false/empty top stack element)</code></p>
<p>There seems to be some standardness rule that Bitcoin Core isn't pointing to exactly that tells us what the issue is. We've read BIPs BIP-49 and BIP-141 in order to double-check that we're doing everything correctly and things look about right, so it's not quite clear what we're doing wrong.</p>
<p>We're also asking Ben what version of Bitcoin Core he's running on MutinyNet, so please bear with us while we get that.</p>
<p>Thank you for your time.</p>

CC BY-SA 4.0
2024-12-23T21:15:46.793Z
This error generally means that the signature is just invalid (so the implicit OP_CHECKSIG in P2WPKH evaluation puts a 0 on the stack, which is considered failure, but not a script execution error).
Pieter Wuille
CC BY-SA 4.0
2024-12-23T21:16:32.820Z
Thank you, Pieter! Will keep investigating...
Hunter Beast
CC BY-SA 4.0
2024-12-23T21:21:21.730Z
Looks like this is coming from Bitcoin Core v25.
Hunter Beast
<bitcoin-core><wrapped-segwit>
mandatory-script-verify-flag-failed (Script evaluated without error but finished with a false/empty top stack element) on wrapped SegWit input
Hunter Beast
# mandatory-script-verify-flag-failed (Script evaluated without error but finished with a false/empty top stack element) on wrapped SegWit input

(Asked by: username_0 on 2024-12-23)

my teammates and I at Ducat Protocol are trying to debug a transaction that spends a wrapped segwit input, and this one has stumped both myself and @btctechsupport and the entire team:

```
02000000000102e01170a477e12a8a980bd3465ef4fd13f68c7a63ef9c8fc7e7b22f8ba3d4a1640300000000ffffffffed8c82cae1818870b434de81176491578a4aaed208cc6ec1bb511ec3a625d594000000001600141885d24191efe93d320c438d1bc6f9d341249d8fffffffff041427000000000000225120da4ec4d4c127e1795120b504bd777e42961a406a2b0d9d6e860ce3e6e26599e4d0561e0000000000225120d307434f7fcc9539aea10417fdc07c264085b9b22a194c0c8004814d338ad0071027000000000000225120c85cf7461f01acbe66729deb067b829ff5587e9c2fc300d88b6eb614983e25b400000000000000000b6a5d0800b89c5d01ce290201404291859cb2ba98a36f8db06c49c9530ac19d46affccc85981c3a779a58261ead1680323e22103db1a9569bcb86c546868a4efe479bee3136d64bdf85062319f80247304402200b5721b3f801ab777981e3aa08140d38cebb415a587ce987095f237e4bfc0c6d0220295fd225d0386afd4314fcb6448db4bc960f87cc8505a9777aeded37c18628b9012102d94b9aaf75bfc25472a369dcb7060cfabe10375ab6cb533c995941f12a48d4bb00000000

```

We get this from the RPC API:

`mandatory-script-verify-flag-failed (Script evaluated without error but finished with a false/empty top stack element)`

There seems to be some standardness rule that Bitcoin Core isn't pointing to exactly that tells us what the issue is. We've read BIPs BIP-49 and BIP-141 in order to double-check that we're doing everything correctly and things look about right, so it's not quite clear what we're doing wrong.

We're also asking Ben what version of Bitcoin Core he's running on MutinyNet, so please bear with us while we get that.

Thank you for your time.

**Tags:** bitcoin-core, wrapped-segwit

> **Comments:**
> **username_1**: This error generally means that the signature is just invalid (so the implicit OP_CHECKSIG in P2WPKH evaluation puts a 0 on the stack, which is considered failure, but not a script execution error).  
> **username_0**: Thank you, username_1! Will keep investigating...  
> **username_0**: Looks like this is coming from Bitcoin Core v25.  

---

## 0 answers

