I am testing a simple escrow transaction where the sender gets to send the UTXO back to himself after 512 seconds (1 block in CSV). nSequence = the token in redeem script = 4194305. using decoderawtransaction & manually parsing the hex data, it looks like there are no errors. Have searched for the error message in the codebase and am not able to figure out where 'unknown error' may be indicating. is this a bug? or am I just missing something? thanks!
for easy readability, I've attached my parsed version of the transaction hex at the end.
$ bitcoin-cli -regtest sendrawtransaction
02000000013246884b0078951ca69508a9bd6667b16bc8967edd1b01378c010aae6fac36b901000000bf00473044022054b2af907f7be9a1719869db04acf5171c958fcbeda6b8bc8bd5052330fc88b60220
2592fe1bdbcdcb4b132505a265cf7d55efdf9d2b8de7a83ab786c29c7ab9ab9001004c7363522102e28
87490bd940ef9122575269db1e4d91eeacc2fd85f61b06e443ddd6414736b210281cd7c6b17e5a62786b2f1f4fa0f71126c39540129e7692dabde56d601c1fc3d52ae6703010040b2752102e2887490bd940ef9122575269db1e4d91eeacc2fd85f61b06e443ddd6414736bac6801004000014060e429010000001976a91492d85871fe16cac1cf847ee1b88b9973907670e788ac00000000
error code: -26
error message:
64: non-mandatory-script-verify-flag (unknown error)
<!--- What behavior did you expect? -->
I expected the transaction to be broadcast successfully since the UTXO was clearly more than 512 seconds old by the time I made my numerous attempts.
I have checked the script works with the btcdeb debugger, which skipped the sequence check. So it shouldn't be an issue with the signature, or the conditional part of the script. It should be an issue with CSV.
<!--- What was the actual behavior (provide screenshots if the issue is GUI-related)? -->
<!--- How reliably can you reproduce the issue, what are the steps to do so? -->
<!-- What version of Bitcoin Core are you using, where did you get it (website, self-compiled, etc)? -->
$ bitcoin-cli -regtest getinfo
{
"deprecation-warning": "WARNING: getinfo is deprecated and will be fully removed in 0.16. Projects should transition to using getblockchaininfo, getnetworkinfo, and getwalletinfo before upgrading to 0.16",
"version": 150100,
"protocolversion": 70015,
"walletversion": 139900,
"balance": 14699.99972510,
"blocks": 100609,
"timeoffset": 0,
"connections": 0,
"proxy": "",
"difficulty": 4.656542373906925e-10,
"testnet": false,
"keypoololdest": 1522968861,
"keypoolsize": 1999,
"paytxfee": 0.00000000,
"relayfee": 0.00001000,
"errors": ""
}
<!-- What type of machine are you observing the error on (OS/CPU and disk type)? -->
MacOS, 2.6 GHz Intel Core i5, SSD
<!-- Any extra information that might be useful in the debugging process. -->
<!--- This is normally the contents of a `debug.log` or `config.log` file. Raw text or a link to a pastebin type site are preferred. -->
bitcoin-cli -regtest decoderawtransaction 02000000013246884b0078951ca69508a9bd6667b16bc8967edd1b01378c010aae6fac36b901000000bf00473044022054b2af907f7be9a1719869db04acf5171c958fcbeda6b8bc8bd5052330fc88b602202592fe1bdbcdcb4b132505a265cf7d55efdf9d2b8de7a83ab786c29c7ab9ab9001004c7363522102e2887490bd940ef9122575269db1e4d91eeacc2fd85f61b06e443ddd6414736b210281cd7c6b17e5a62786b2f1f4fa0f71126c39540129e7692dabde56d601c1fc3d52ae6703010040b2752102e2887490bd940ef9122575269db1e4d91eeacc2fd85f61b06e443ddd6414736bac6801004000014060e429010000001976a91492d85871fe16cac1cf847ee1b88b9973907670e788ac00000000
{
"txid": "7f196d44abc0fe0c363b087c8d4dfd690f73a0c25c39e15c194f1addc371b1cf",
"hash": "7f196d44abc0fe0c363b087c8d4dfd690f73a0c25c39e15c194f1addc371b1cf",
"version": 2,
"size": 276,
"vsize": 276,
"locktime": 0,
"vin": [
{
"txid": "b936ac6fae0a018c37011bdd7e96c86bb16766bda90895a61c9578004b884632",
"vout": 1,
"scriptSig": {
"asm": "0 3044022054b2af907f7be9a1719869db04acf5171c958fcbeda6b8bc8bd5052330fc88b602202592fe1bdbcdcb4b132505a265cf7d55efdf9d2b8de7a83ab786c29c7ab9ab90[ALL] 0 63522102e2887490bd940ef9122575269db1e4d91eeacc2fd85f61b06e443ddd6414736b210281cd7c6b17e5a62786b2f1f4fa0f71126c39540129e7692dabde56d601c1fc3d52ae6703010040b2752102e2887490bd940ef9122575269db1e4d91eeacc2fd85f61b06e443ddd6414736bac68",
"hex": "00473044022054b2af907f7be9a1719869db04acf5171c958fcbeda6b8bc8bd5052330fc88b602202592fe1bdbcdcb4b132505a265cf7d55efdf9d2b8de7a83ab786c29c7ab9ab9001004c7363522102e2887490bd940ef9122575269db1e4d91eeacc2fd85f61b06e443ddd6414736b210281cd7c6b17e5a62786b2f1f4fa0f71126c39540129e7692dabde56d601c1fc3d52ae6703010040b2752102e2887490bd940ef9122575269db1e4d91eeacc2fd85f61b06e443ddd6414736bac68"
},
"sequence": 4194305
}
],
"vout": [
{
"value": 49.97800000,
"n": 0,
"scriptPubKey": {
"asm": "OP_DUP OP_HASH160 92d85871fe16cac1cf847ee1b88b9973907670e7 OP_EQUALVERIFY OP_CHECKSIG",
"hex": "76a91492d85871fe16cac1cf847ee1b88b9973907670e788ac",
"reqSigs": 1,
"type": "pubkeyhash",
"addresses": [
"mtuQ81VrJ4eXmv8igrdkQXd9WF7x8pFnns"
]
}
}
]
}