<p>This appears to be a bug in BitcoinIDE. The issue is that it is computing the hash differently from what it actually is. Because it finds a different hash, the comparison that checks that the hashes match (the <code>OP_EQUALVERIFY</code>) fails.</p>
<p>However the hash does match. If you compute the hash manually, you get a different hash than what BitcoinIDE is showing.</p>
<p>Using the <a href="https://github.com/bitcoin-core/btcdeb" rel="nofollow noreferrer">btcdeb</a> project, I am able to execute this script and step through all of the opcodes correctly.</p>

CC BY-SA 4.0
2021-04-07T19:14:49.453Z
2021-04-07T19:14:49.453Z
Ava Chow
<p>I just wanted to verify the input of <a href="https://blockchain.info/tx/7de75c9a33a687de04c9621ec98d60acf6a830fda6b12b027df227d1c72d2808?format=json" rel="nofollow noreferrer">transaction 7de75</a>. The related output is index 10 of <a href="https://blockchain.info/tx/00f645c7443e367330410e526b152fc799c71dafd4971d8ed6ee37babbd581bb?format=json" rel="nofollow noreferrer">transaction 00f64</a>.</p>
<p>The locking script defined in 76a91 (index 10) is:</p>
<pre><code>OP_DUP
OP_HASH160
7ddb236e7877d5040e2a59e4be544c65934e573a
OP_EQUALVERIFY
OP_CHECKSIG
</code></pre>
<p>The unlocking script in 7de75 is:</p>
<pre><code>3045022100b7393ff959120e3ccb5284e3cf2eaa200235643a1549a4e6faaa911619089e2b02207b677827c7beeb53503e016a8dd29164d07cb79f0f1e058df9b8dfa3568d029001
04c4b7a7f7bb2c899f4aeab75b41567c040ae79506d43ee72f650c95b6319e47402f0ba88d1c5a294d075885442679dc24882ea37c31e0dbc82cfd51ed185d7e94
</code></pre>
<p>I've concatenated both:</p>
<pre><code>3045022100b7393ff959120e3ccb5284e3cf2eaa200235643a1549a4e6faaa911619089e2b02207b677827c7beeb53503e016a8dd29164d07cb79f0f1e058df9b8dfa3568d029001
04c4b7a7f7bb2c899f4aeab75b41567c040ae79506d43ee72f650c95b6319e47402f0ba88d1c5a294d075885442679dc24882ea37c31e0dbc82cfd51ed185d7e94
OP_DUP
OP_HASH160
7ddb236e7877d5040e2a59e4be544c65934e573a
OP_EQUALVERIFY
OP_CHECKSIG
</code></pre>
<p>and executed it via <a href="https://siminchen.github.io/bitcoinIDE/build/editor.html" rel="nofollow noreferrer">bitcoinIDE</a>. However, <code>OP_EQUALVERIFY</code> failed. Could somebody explain to me where I made a mistake?</p>
<p>edit: I think <a href="https://youtu.be/1n4g3eYX1UI?t=358" rel="nofollow noreferrer">Rene Pickhard explains the issue here</a> but I cannot follow the explanation </p>

<raw-transaction><transaction-verification>
How are the unlocking script + locking script executed?
Martin Thoma
# How are the unlocking script + locking script executed?

(Asked by: username_0 on 2021-04-07)

I just wanted to verify the input of [transaction 7de75](https://blockchain.info/tx/7de75c9a33a687de04c9621ec98d60acf6a830fda6b12b027df227d1c72d2808?format=json). The related output is index 10 of [transaction 00f64](https://blockchain.info/tx/00f645c7443e367330410e526b152fc799c71dafd4971d8ed6ee37babbd581bb?format=json).

The locking script defined in 76a91 (index 10) is:

```
OP_DUP
OP_HASH160
7ddb236e7877d5040e2a59e4be544c65934e573a
OP_EQUALVERIFY
OP_CHECKSIG

```

The unlocking script in 7de75 is:

```
3045022100b7393ff959120e3ccb5284e3cf2eaa200235643a1549a4e6faaa911619089e2b02207b677827c7beeb53503e016a8dd29164d07cb79f0f1e058df9b8dfa3568d029001
04c4b7a7f7bb2c899f4aeab75b41567c040ae79506d43ee72f650c95b6319e47402f0ba88d1c5a294d075885442679dc24882ea37c31e0dbc82cfd51ed185d7e94

```

I've concatenated both:

```
3045022100b7393ff959120e3ccb5284e3cf2eaa200235643a1549a4e6faaa911619089e2b02207b677827c7beeb53503e016a8dd29164d07cb79f0f1e058df9b8dfa3568d029001
04c4b7a7f7bb2c899f4aeab75b41567c040ae79506d43ee72f650c95b6319e47402f0ba88d1c5a294d075885442679dc24882ea37c31e0dbc82cfd51ed185d7e94
OP_DUP
OP_HASH160
7ddb236e7877d5040e2a59e4be544c65934e573a
OP_EQUALVERIFY
OP_CHECKSIG

```

and executed it via [bitcoinIDE](https://siminchen.github.io/bitcoinIDE/build/editor.html). However, `OP_EQUALVERIFY` failed. Could somebody explain to me where I made a mistake?

edit: I think [Rene Pickhard explains the issue here](https://youtu.be/1n4g3eYX1UI?t=358) but I cannot follow the explanation

**Tags:** raw-transaction, transaction-verification


---

## 1 answers

### Answer by username_1 on 2021-04-07. Score: 1 | Accepted answer

This appears to be a bug in BitcoinIDE. The issue is that it is computing the hash differently from what it actually is. Because it finds a different hash, the comparison that checks that the hashes match (the `OP_EQUALVERIFY`) fails.

However the hash does match. If you compute the hash manually, you get a different hash than what BitcoinIDE is showing.

Using the [btcdeb](https://github.com/bitcoin-core/btcdeb) project, I am able to execute this script and step through all of the opcodes correctly.


---

