3

When I try to spend an utxo sent to a pay to script hash, with the script 5 OP_CHECKSEQUENCEVERIFY OP_DROP OP_PUBKEY OP_CHECKSIG I get the following error.

Any help would be greatly appreciated.

$ bitcoin-cli --rpcuser=bitcoinrpcuser --rpcpassword=bitcoinrpcpass --rpcport=18332 sendrawtransaction 0200000003530699e6ac0766846d1ce5b2b76014b23c3dbb67eedc69523bb11205435236ea0000000070483045022100d48af25c0e1816dd0007bdb0907ae2c4cf96602fb41a089a975eba017f9295af022000af5806f68ac0ba6ac2ada355e8f6050ccfb4d7020ff7d22788be10a07d51a9012655b27521027690887ac2455b6b19c5f4268a8a9c09228351368b9a7643ad791282c3148759ac05000000004a8cd4b96db4a786d560e47a8864a580448de655f716a9ddcf9f25b945a7ff00000000704830450221009914d50bfcc49b1f539824c04f8bc22520906dd24be8cbf5d3c9eafd78e8b1400220305d70a8888e1b8f7bbbaef0e1b3d8d1b9509561f4fff53b194315989122ffb1012655b27521027690887ac2455b6b19c5f4268a8a9c09228351368b9a7643ad791282c3148759ac0500000007921ebd8395a377ce80f9bf08295bc7603b9014357fce90508ffb692dbd474d00000000704830450221008fab401cba85dcc1aac10d9949ca066e8c2cd86ca153a1e0059d839372bf8f12022066c97d30d95286185497d2f9622642ef7d9e511e8c4f2686c9d12504273ac80d012655b27521027690887ac2455b6b19c5f4268a8a9c09228351368b9a7643ad791282c3148759ac050000000336150000000000001976a9140d98bebd47d04361d889e11a977a9ab61665d59188ac00000000000000001e6a1c0131b3774cfeb0198684fce15e0fdf7709e830c9387a1ac6e99b6647c67401000000000017a9149c202ce4f6cafc3420271e79be29911288c513268700000000
error code: -26
error message:
64: non-mandatory-script-verify-flag (NOPx reserved for soft-fork upgrades)

$ bitcoin-cli --rpcuser=bitcoinrpcuser --rpcpassword=bitcoinrpcpass --rpcport=18332 decoderawtransaction 0200000003530699e6ac0766846d1ce5b2b76014b23c3dbb67eedc69523bb11205435236ea0000000070483045022100d48af25c0e1816dd0007bdb0907ae2c4cf96602fb41a089a975eba017f9295af022000af5806f68ac0ba6ac2ada355e8f6050ccfb4d7020ff7d22788be10a07d51a9012655b27521027690887ac2455b6b19c5f4268a8a9c09228351368b9a7643ad791282c3148759ac05000000004a8cd4b96db4a786d560e47a8864a580448de655f716a9ddcf9f25b945a7ff00000000704830450221009914d50bfcc49b1f539824c04f8bc22520906dd24be8cbf5d3c9eafd78e8b1400220305d70a8888e1b8f7bbbaef0e1b3d8d1b9509561f4fff53b194315989122ffb1012655b27521027690887ac2455b6b19c5f4268a8a9c09228351368b9a7643ad791282c3148759ac0500000007921ebd8395a377ce80f9bf08295bc7603b9014357fce90508ffb692dbd474d00000000704830450221008fab401cba85dcc1aac10d9949ca066e8c2cd86ca153a1e0059d839372bf8f12022066c97d30d95286185497d2f9622642ef7d9e511e8c4f2686c9d12504273ac80d012655b27521027690887ac2455b6b19c5f4268a8a9c09228351368b9a7643ad791282c3148759ac050000000336150000000000001976a9140d98bebd47d04361d889e11a977a9ab61665d59188ac00000000000000001e6a1c0131b3774cfeb0198684fce15e0fdf7709e830c9387a1ac6e99b6647c67401000000000017a9149c202ce4f6cafc3420271e79be29911288c513268700000000
{
  "txid": "c927276d8ac392b88225ae25d596b8e3f658195232200a1fe83788497bc46c66",
  "size": 574,
  "version": 2,
  "locktime": 0,
  "vin": [
    {
      "txid": "ea3652430512b13b5269dcee67bb3d3cb21460b7b2e51c6d846607ace6990653",
      "vout": 0,
      "scriptSig": {
        "asm": "3045022100d48af25c0e1816dd0007bdb0907ae2c4cf96602fb41a089a975eba017f9295af022000af5806f68ac0ba6ac2ada355e8f6050ccfb4d7020ff7d22788be10a07d51a9[ALL] 55b27521027690887ac2455b6b19c5f4268a8a9c09228351368b9a7643ad791282c3148759ac",
        "hex": "483045022100d48af25c0e1816dd0007bdb0907ae2c4cf96602fb41a089a975eba017f9295af022000af5806f68ac0ba6ac2ada355e8f6050ccfb4d7020ff7d22788be10a07d51a9012655b27521027690887ac2455b6b19c5f4268a8a9c09228351368b9a7643ad791282c3148759ac"
      },
      "sequence": 5
    }, 
    {
      "txid": "ffa745b9259fcfdda916f755e68d4480a564887ae460d586a7b46db9d48c4a00",
      "vout": 0,
      "scriptSig": {
        "asm": "30450221009914d50bfcc49b1f539824c04f8bc22520906dd24be8cbf5d3c9eafd78e8b1400220305d70a8888e1b8f7bbbaef0e1b3d8d1b9509561f4fff53b194315989122ffb1[ALL] 55b27521027690887ac2455b6b19c5f4268a8a9c09228351368b9a7643ad791282c3148759ac",
        "hex": "4830450221009914d50bfcc49b1f539824c04f8bc22520906dd24be8cbf5d3c9eafd78e8b1400220305d70a8888e1b8f7bbbaef0e1b3d8d1b9509561f4fff53b194315989122ffb1012655b27521027690887ac2455b6b19c5f4268a8a9c09228351368b9a7643ad791282c3148759ac"
      },
      "sequence": 5
    }, 
    {
      "txid": "4d47bd2d69fb8f5090ce7f3514903b60c75b2908bff980ce77a39583bd1e9207",
      "vout": 0,
      "scriptSig": {
        "asm": "30450221008fab401cba85dcc1aac10d9949ca066e8c2cd86ca153a1e0059d839372bf8f12022066c97d30d95286185497d2f9622642ef7d9e511e8c4f2686c9d12504273ac80d[ALL] 55b27521027690887ac2455b6b19c5f4268a8a9c09228351368b9a7643ad791282c3148759ac",
        "hex": "4830450221008fab401cba85dcc1aac10d9949ca066e8c2cd86ca153a1e0059d839372bf8f12022066c97d30d95286185497d2f9622642ef7d9e511e8c4f2686c9d12504273ac80d012655b27521027690887ac2455b6b19c5f4268a8a9c09228351368b9a7643ad791282c3148759ac"
      },
      "sequence": 5
    }
  ],
  "vout": [
    {
      "value": 0.00005430,
      "n": 0,
      "scriptPubKey": {
        "asm": "OP_DUP OP_HASH160 0d98bebd47d04361d889e11a977a9ab61665d591 OP_EQUALVERIFY OP_CHECKSIG",
        "hex": "76a9140d98bebd47d04361d889e11a977a9ab61665d59188ac",
        "reqSigs": 1,
        "type": "pubkeyhash",
        "addresses": [
          "mgkr4TjXCGMJSpcoQGi6wDkr72NTtkuMDs"
        ]
      }
    }, 
    {
      "value": 0.00000000,
      "n": 1,
      "scriptPubKey": {
        "asm": "OP_RETURN 0131b3774cfeb0198684fce15e0fdf7709e830c9387a1ac6e99b6647",
        "hex": "6a1c0131b3774cfeb0198684fce15e0fdf7709e830c9387a1ac6e99b6647",
        "type": "nulldata"
      }
    }, 
    {
      "value": 0.00095430,
      "n": 2,
      "scriptPubKey": {
        "asm": "OP_HASH160 9c202ce4f6cafc3420271e79be29911288c51326 OP_EQUAL",
        "hex": "a9149c202ce4f6cafc3420271e79be29911288c5132687",
        "reqSigs": 1,
        "type": "scripthash",
        "addresses": [
          "2N7UjwnxwetBQB8pEaufas4bhS6wh4JjBoy"
        ]
      }
    }
  ]
}

Edit:

When I replace the OP_CHECKSEQUENCEVERIFY with a OP_NOP I can spend it just fine.

As demonstrated by the p2sh address 2N6PWjG9eFjuKcxHf8pvQdHityorvyAerFT for the script 1 OP_NOP OP_DROP OP_PUBKEY OP_CHECKSIG

0

What are you setting the input's nSequence value to?

  • 5 as can be seen in the decoded raw transaction above, however I think I may just have used an outdated bitcoind by mistake. Currently recompiling to verify. – Fabian Barkhau Apr 25 '16 at 11:14
0

I was not running version 0.12.1 of bitcoind, as I mistakenly didn't overwrite the binary when upgrading.

Now that I have upgraded it has been accepted into the mempool and I expect it to be included in a block as soon as upgraded miner includes it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.