<p>I think you have a problem with your unlocking script for input 1</p>
<p>For input <strong>2</strong>, your script is <code>0014DC6BF86354105DE2FCD9868A2B0376D6731CB92F</code></p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>hex</th>
<th>meaning</th>
</tr>
</thead>
<tbody>
<tr>
<td>00</td>
<td>OP_0</td>
</tr>
<tr>
<td>14</td>
<td>OP_PUSH20</td>
</tr>
<tr>
<td>DC6BF86354105DE2FCD9868A2B0376D6731CB92F</td>
<td>pushed data</td>
</tr>
</tbody>
</table>
</div>
<p>Which looks standard</p>
<p>However for input <strong>1</strong>, I believe you have <code>160014AA6502A44947CF829B41B6D065E04E80F92897A2</code></p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>hex</th>
<th>meaning</th>
</tr>
</thead>
<tbody>
<tr>
<td>16</td>
<td>OP_PUSH22</td>
</tr>
<tr>
<td>0014AA6502A44947CF829B41B6D065E04E80F92897A2</td>
<td>pushed data</td>
</tr>
</tbody>
</table>
</div>
<p><strong>I suspect that initial byte 0x16 is spurious and shouldn't be there.</strong> Or maybe the prior 0x17 is spurious and isn't meant to be a script length?</p>
<p>The pushed data looks like it was meant to be a more normal <code>OP_0</code> and a push.</p>
<hr />
<p>Here's my parsing of the transaction (which I hope is correct)</p>
<pre><code>blockchain&gt; txfile tx6.hex
Reading file `tx6.hex` ...

The hexadecimal data is

[0200000002e534266acdc23f944e919ef38d9968c47f9f504c03a57897c0dc2336afec1bf50000000017160014aa6502a44947cf829b41b6d065e04e80f92897a2ffffffff3ba884bc7fc43c5bebb34ed174e2c2b0e866112660649248eef6609db0f5ac1b0b000000160014dc6bf86354105de2fcd9868a2b0376d6731cb92fffffffff01a00f00000000000017a914a7fe1a34561bf3ca04b2f00975aa518012c765298700000000]

The first output is worth 4000 Satoshi

The full transaction details are


  Version:................02000000 (2)
  Inputs:.................02 (2)
  Input:1
    Previous Transaction:.F51BECAF3623DCC09778A5034C509F7FC468998DF39E914E943FC2CD6A2634E5
    Previous Output Index:0000 (0)
    Script Length:........17 (23)
    Unlocking Script:.....160014AA6502A44947CF829B41B6D065E04E80F92897A2
    Sequence:.............FFFFFFFF
  Input:2
    Previous Transaction:.1BACF5B09D60F6EE48926460261166E8B0C2E274D14EB3EB5B3CC47FBC84A83B
    Previous Output Index:000B (11)
    Script Length:........16 (22)
    Unlocking Script:.....0014DC6BF86354105DE2FCD9868A2B0376D6731CB92F
    Sequence:.............FFFFFFFF
  Outputs:................01 (1)
  Output 1
    Value:................A00F000000000000 (4000)
    Script Length:........17 (23)
    Locking Script:.......A914A7FE1A34561BF3CA04B2F00975AA518012C7652987
  LockTime:...............00000000 (0)
  (Calculated hash is 0A144FDBCF7476695368607E0A840B391F29E34D7579979F93FE3314C713B54B)
</code></pre>
<p>Bitcoin core seems to parse your transaction the same way</p>
<pre><code>C:\Program Files\Bitcoin\daemon&gt;  bitcoin-cli decoderawtransaction &quot;0200000002e534266acdc23f944e919ef38d9968c47f9f504c03a57897c0dc2336afec1bf50000000017160014aa6502a44947cf829b41b6d065e04e80f92897a2ffffffff3ba884bc7fc43c5bebb34ed174e2c2b0e866112660649248eef6609db0f5ac1b0b000000160014dc6bf86354105de2fcd9868a2b0376d6731cb92fffffffff01a00f00000000000017a914a7fe1a34561bf3ca04b2f00975aa518012c765298700000000&quot;
{
  &quot;txid&quot;: &quot;0a144fdbcf7476695368607e0a840b391f29e34d7579979f93fe3314c713b54b&quot;,
  &quot;hash&quot;: &quot;0a144fdbcf7476695368607e0a840b391f29e34d7579979f93fe3314c713b54b&quot;,
  &quot;version&quot;: 2,
  &quot;size&quot;: 169,
  &quot;vsize&quot;: 169,
  &quot;weight&quot;: 676,
  &quot;locktime&quot;: 0,
  &quot;vin&quot;: [
    {
      &quot;txid&quot;: &quot;f51becaf3623dcc09778a5034c509f7fc468998df39e914e943fc2cd6a2634e5&quot;,
      &quot;vout&quot;: 0,
      &quot;scriptSig&quot;: {
        &quot;asm&quot;: &quot;0014aa6502a44947cf829b41b6d065e04e80f92897a2&quot;,
        &quot;hex&quot;: &quot;160014aa6502a44947cf829b41b6d065e04e80f92897a2&quot;
      },
      &quot;sequence&quot;: 4294967295
    },
    {
      &quot;txid&quot;: &quot;1bacf5b09d60f6ee48926460261166e8b0c2e274d14eb3eb5b3cc47fbc84a83b&quot;,
      &quot;vout&quot;: 11,
      &quot;scriptSig&quot;: {
        &quot;asm&quot;: &quot;0 dc6bf86354105de2fcd9868a2b0376d6731cb92f&quot;,
        &quot;hex&quot;: &quot;0014dc6bf86354105de2fcd9868a2b0376d6731cb92f&quot;
      },
      &quot;sequence&quot;: 4294967295
    }
  ],
  &quot;vout&quot;: [
    {
      &quot;value&quot;: 0.00004000,
      &quot;n&quot;: 0,
      &quot;scriptPubKey&quot;: {
        &quot;asm&quot;: &quot;OP_HASH160 a7fe1a34561bf3ca04b2f00975aa518012c76529 OP_EQUAL&quot;,
        &quot;desc&quot;: &quot;addr(3H1HAvNW4qSX5jgPvrJFLaJdY2asa8U8N1)#29glrxse&quot;,
        &quot;hex&quot;: &quot;a914a7fe1a34561bf3ca04b2f00975aa518012c7652987&quot;,
        &quot;address&quot;: &quot;3H1HAvNW4qSX5jgPvrJFLaJdY2asa8U8N1&quot;,
        &quot;type&quot;: &quot;scripthash&quot;
      }
    }
  ]
}
</code></pre>

CC BY-SA 4.0
2023-09-01T22:15:12.400Z
yeah i got same parsed from bitcoin core when decode the transaction.
Tepan
CC BY-SA 4.0
2023-09-01T17:40:05.557Z
2023-09-01T18:04:19.300Z
2023-09-01T18:04:19.300Z
RedGrittyBrick
<p>My raw Transaction</p>
<p><strong>0200000002e534266acdc23f944e919ef38d9968c47f9f504c03a57897c0dc2336afec1bf50000000017160014aa6502a44947cf829b41b6d065e04e80f92897a2ffffffff3ba884bc7fc43c5bebb34ed174e2c2b0e866112660649248eef6609db0f5ac1b0b000000160014dc6bf86354105de2fcd9868a2b0376d6731cb92fffffffff01a00f00000000000017a914a7fe1a34561bf3ca04b2f00975aa518012c765298700000000</strong></p>
<p>can someone help me to fix this raw transaction.., please.
This is my P2SH Addresses
<a href="https://www.blockchain.com/explorer/addresses/btc/3PdQoXyQwWmerpt3SbF7Hbh3aukC5w28GP" rel="nofollow noreferrer">https://www.blockchain.com/explorer/addresses/btc/3PdQoXyQwWmerpt3SbF7Hbh3aukC5w28GP</a></p>
<p>I just sent some fund and trying to spend, but i just have redeem script.</p>

<transactions><electrum><utxo><p2sh>
Script evaluated without error but finished with a false/empty top stack element (Electrum gives error)
Tepan
# Script evaluated without error but finished with a false/empty top stack element (Electrum gives error)

(Asked by: username_0 on 2023-09-01)

My raw Transaction

**0200000002e534266acdc23f944e919ef38d9968c47f9f504c03a57897c0dc2336afec1bf50000000017160014aa6502a44947cf829b41b6d065e04e80f92897a2ffffffff3ba884bc7fc43c5bebb34ed174e2c2b0e866112660649248eef6609db0f5ac1b0b000000160014dc6bf86354105de2fcd9868a2b0376d6731cb92fffffffff01a00f00000000000017a914a7fe1a34561bf3ca04b2f00975aa518012c765298700000000**

can someone help me to fix this raw transaction.., please.
This is my P2SH Addresses
<https://www.blockchain.com/explorer/addresses/btc/3PdQoXyQwWmerpt3SbF7Hbh3aukC5w28GP>

I just sent some fund and trying to spend, but i just have redeem script.

**Tags:** transactions, electrum, utxo, p2sh


---

## 1 answers

### Answer by username_1 on 2023-09-01. Score: 0

I think you have a problem with your unlocking script for input 1

For input **2**, your script is `0014DC6BF86354105DE2FCD9868A2B0376D6731CB92F`

| hex | meaning |
| --- | --- |
| 00 | OP\_0 |
| 14 | OP\_PUSH20 |
| DC6BF86354105DE2FCD9868A2B0376D6731CB92F | pushed data |

Which looks standard

However for input **1**, I believe you have `160014AA6502A44947CF829B41B6D065E04E80F92897A2`

| hex | meaning |
| --- | --- |
| 16 | OP\_PUSH22 |
| 0014AA6502A44947CF829B41B6D065E04E80F92897A2 | pushed data |

**I suspect that initial byte 0x16 is spurious and shouldn't be there.** Or maybe the prior 0x17 is spurious and isn't meant to be a script length?

The pushed data looks like it was meant to be a more normal `OP_0` and a push.

---

Here's my parsing of the transaction (which I hope is correct)

```
blockchain> txfile tx6.hex
Reading file `tx6.hex` ...

The hexadecimal data is

[0200000002e534266acdc23f944e919ef38d9968c47f9f504c03a57897c0dc2336afec1bf50000000017160014aa6502a44947cf829b41b6d065e04e80f92897a2ffffffff3ba884bc7fc43c5bebb34ed174e2c2b0e866112660649248eef6609db0f5ac1b0b000000160014dc6bf86354105de2fcd9868a2b0376d6731cb92fffffffff01a00f00000000000017a914a7fe1a34561bf3ca04b2f00975aa518012c765298700000000]

The first output is worth 4000 Satoshi

The full transaction details are

  Version:................02000000 (2)
  Inputs:.................02 (2)
  Input:1
    Previous Transaction:.F51BECAF3623DCC09778A5034C509F7FC468998DF39E914E943FC2CD6A2634E5
    Previous Output Index:0000 (0)
    Script Length:........17 (23)
    Unlocking Script:.....160014AA6502A44947CF829B41B6D065E04E80F92897A2
    Sequence:.............FFFFFFFF
  Input:2
    Previous Transaction:.1BACF5B09D60F6EE48926460261166E8B0C2E274D14EB3EB5B3CC47FBC84A83B
    Previous Output Index:000B (11)
    Script Length:........16 (22)
    Unlocking Script:.....0014DC6BF86354105DE2FCD9868A2B0376D6731CB92F
    Sequence:.............FFFFFFFF
  Outputs:................01 (1)
  Output 1
    Value:................A00F000000000000 (4000)
    Script Length:........17 (23)
    Locking Script:.......A914A7FE1A34561BF3CA04B2F00975AA518012C7652987
  LockTime:...............00000000 (0)
  (Calculated hash is 0A144FDBCF7476695368607E0A840B391F29E34D7579979F93FE3314C713B54B)

```

Bitcoin core seems to parse your transaction the same way

```
C:\Program Files\Bitcoin\daemon>  bitcoin-cli decoderawtransaction "0200000002e534266acdc23f944e919ef38d9968c47f9f504c03a57897c0dc2336afec1bf50000000017160014aa6502a44947cf829b41b6d065e04e80f92897a2ffffffff3ba884bc7fc43c5bebb34ed174e2c2b0e866112660649248eef6609db0f5ac1b0b000000160014dc6bf86354105de2fcd9868a2b0376d6731cb92fffffffff01a00f00000000000017a914a7fe1a34561bf3ca04b2f00975aa518012c765298700000000"
{
  "txid": "0a144fdbcf7476695368607e0a840b391f29e34d7579979f93fe3314c713b54b",
  "hash": "0a144fdbcf7476695368607e0a840b391f29e34d7579979f93fe3314c713b54b",
  "version": 2,
  "size": 169,
  "vsize": 169,
  "weight": 676,
  "locktime": 0,
  "vin": [
    {
      "txid": "f51becaf3623dcc09778a5034c509f7fc468998df39e914e943fc2cd6a2634e5",
      "vout": 0,
      "scriptSig": {
        "asm": "0014aa6502a44947cf829b41b6d065e04e80f92897a2",
        "hex": "160014aa6502a44947cf829b41b6d065e04e80f92897a2"
      },
      "sequence": 4294967295
    },
    {
      "txid": "1bacf5b09d60f6ee48926460261166e8b0c2e274d14eb3eb5b3cc47fbc84a83b",
      "vout": 11,
      "scriptSig": {
        "asm": "0 dc6bf86354105de2fcd9868a2b0376d6731cb92f",
        "hex": "0014dc6bf86354105de2fcd9868a2b0376d6731cb92f"
      },
      "sequence": 4294967295
    }
  ],
  "vout": [
    {
      "value": 0.00004000,
      "n": 0,
      "scriptPubKey": {
        "asm": "OP_HASH160 a7fe1a34561bf3ca04b2f00975aa518012c76529 OP_EQUAL",
        "desc": "addr(3H1HAvNW4qSX5jgPvrJFLaJdY2asa8U8N1)#29glrxse",
        "hex": "a914a7fe1a34561bf3ca04b2f00975aa518012c7652987",
        "address": "3H1HAvNW4qSX5jgPvrJFLaJdY2asa8U8N1",
        "type": "scripthash"
      }
    }
  ]
}

```

> **Comments:**
> **username_0**: yeah i got same parsed from bitcoin core when decode the transaction.  

---

