-
Notifications
You must be signed in to change notification settings - Fork 498
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"errno.WITNESS_UNEXPECTED" error while trying to get signatures #367
Comments
There is definitely a bug here, but I'm not sure exactly what it is. You can work around it by adding
(There is a known bug affecting segwit that means the z-values above are probably incorrect.) |
thank you very much for addressing the issue. |
I'm going to reopen as a reminder to improve this error case. |
This issue persists if a segwit or a transaction with more than one inputs were given.
Log:
vb@h2o:~# tx -s 0100000000010285325215f4daedad07839c16648ad631fc654d3c40cd287f3437c3dcde3c90340000000000ffffffff02e783a09ca7de9824151fa6699a31c6fef1fd979f68ef4f1149f5e4629e402d000000006b483045022100917eef11069fcf2be24dd55c29bb9d5e30b10eeb812be1024a5a404d80d7a51c0220293952a6d8b80c2db98e2575ddd00a591115161e33853652fde5cbc58e4488c40121023614b4175b150d36c6058bff2dcc4e26c244c848785387482d57b31ab60818cfffffffff018e5812000000000017a9143ffa057b31d280f5034b66af6ca0824b9a98aed5870247304402204748ea5502f7561eed5494b95f0545ae4b05ed40d32f5169d6385df0a1ea54e6022052fe070b165d7cde86aba2d7ca72996d10ba9d304521088b34015bcd59c8bec001210364f57caa72b31e1cbfd12f92b2b281407b4914b2e7e0b9cb7b3cd9bb9a7bbf0c0000000000 Traceback (most recent call last): File "/usr/local/bin/tx", line 11, in <module> load_entry_point('pycoin==0.0.0', 'console_scripts', 'tx')() File "/usr/local/lib/python3.6/dist-packages/pycoin-0.0.0-py3.6.egg/pycoin/cmds/tx.py", line 710, in main tx(args, parser) File "/usr/local/lib/python3.6/dist-packages/pycoin-0.0.0-py3.6.egg/pycoin/cmds/tx.py", line 686, in tx args.verbose_signature, args.disassemble, args.trace, args.pdb) File "/usr/local/lib/python3.6/dist-packages/pycoin-0.0.0-py3.6.egg/pycoin/cmds/tx.py", line 569, in print_output dump_tx(output, tx, network, verbose_signature, disassembly_level, trace, pdb) File "/usr/local/lib/python3.6/dist-packages/pycoin-0.0.0-py3.6.egg/pycoin/cmds/dump.py", line 120, in dump_tx dump_inputs(output, tx, network, verbose_signature, traceback_f, disassembly_level) File "/usr/local/lib/python3.6/dist-packages/pycoin-0.0.0-py3.6.egg/pycoin/cmds/dump.py", line 72, in dump_inputs dump_signatures(output, tx, tx_in, tx_out, idx, network, traceback_f) File "/usr/local/lib/python3.6/dist-packages/pycoin-0.0.0-py3.6.egg/pycoin/cmds/dump.py", line 88, in dump_signatures signatures = [parse_signature_blob(blob) for blob, sig_hash in network.who_signed.extract_signatures(tx, idx)] File "/usr/local/lib/python3.6/dist-packages/pycoin-0.0.0-py3.6.egg/pycoin/cmds/dump.py", line 88, in <listcomp> signatures = [parse_signature_blob(blob) for blob, sig_hash in network.who_signed.extract_signatures(tx, idx)] File "/usr/local/lib/python3.6/dist-packages/pycoin-0.0.0-py3.6.egg/pycoin/contrib/who_signed.py", line 33, in extract_signatures for puzzle_script, solution_stack, flags, sighash_f in sc.puzzle_and_solution_iterator(tx_context): File "/usr/local/lib/python3.6/dist-packages/pycoin-0.0.0-py3.6.egg/pycoin/coins/bitcoin/SolutionChecker.py", line 215, in puzzle_and_solution_iterator witness_tuple = self.witness_program_tuple(tx_context, puzzle_script, solution_stack, flags, is_p2sh) File "/usr/local/lib/python3.6/dist-packages/pycoin-0.0.0-py3.6.egg/pycoin/coins/bitcoin/SegwitChecker.py", line 144, in witness_program_tuple raise ScriptError("witness unexpected", errno.WITNESS_UNEXPECTED) pycoin.coins.SolutionChecker.ScriptError: ('witness unexpected', 39)
The text was updated successfully, but these errors were encountered: