Skip to content

Hybrid Schnorr pubkeys fail in script evalutation #7

@dagurval

Description

@dagurval

Steps to reproduce

  1. Revert commit bfb6442
  2. python3 -m unittest discover

Output

FAIL: test_script_schnorr (bitcoincash.tests.test_scripteval.Test_EvalScript)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/dagurval/python-bitcoincash/bitcoincash/core/schnorr.py", line 208, in verify
    pubpoint = ser_to_point(pubkey)
AssertionError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/dagurval/python-bitcoincash/bitcoincash/core/scripteval.py", line 168, in _CheckSig
    return bitcoincash.core.schnorr.verify(pubkey, sig, h)
ValueError: pubkey could not be parsed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/dagurval/python-bitcoincash/bitcoincash/tests/test_scripteval.py", line 125, in test_script_schnorr
    VerifyScript(scriptSig, scriptPubKey, txSpend, 0, flags, amount = 0)
bitcoincash.core.scripteval.ArgumentsInvalidError: EvalScript: OP_CHECKSIG args invalid: pubkey error: pubkey could not be parsed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/dagurval/python-bitcoincash/bitcoincash/tests/test_scripteval.py", line 128, in test_script_schnorr
    self.fail('Script FAILED: %r %r %r with exception %r' % (scriptSig, scriptPubKey, comment, err))
AssertionError: Script FAILED: CScript([x('d211631fdebf4c8376b3d169ef65a1987460eda43c3312e561b0226fa3069f68a68bac0dbf780f77dd60ff602c66186f1da2bb0a31f10187796242f48295ddbe01')]) CScript([x('0679be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8'), OP_CHECKSIG]) 'Schnorr P2PK with hybrid pubkey but no STRICTENC' with exception ArgumentsInvalidError('EvalScript: OP_CHECKSIG args invalid: pubkey error: pubkey could not be parsed')

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions