Troubleshooting pybitcointools transaction signing/verification I'm having several problems getting tests to successfully run under my fork (or vbuterin's pybitcointools, and I'm hoping someone with a combined Python / Bitcoin knowledge can provide some insight.

Here's the error message (as submitted to #145):

======================================================================
FAIL: test_all (__main__.TestTransaction)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/private/var/mobile/Containers/Shared/AppGroup/AA78F2EC-3EE8-40F4-A318-8A9AB1BCB5FF/Pythonista3/Documents/pybitcointools-vbuterin/test.py", line 179, in test_all
    self.assertTrue(verify_tx_input(tx1, 0, mscript, sig1, pubs[1]), "Verification Error")
AssertionError: Verification Error

======================================================================
FAIL: test_all (__main__.TestTransactionSignVerify)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/private/var/mobile/Containers/Shared/AppGroup/AA78F2EC-3EE8-40F4-A318-8A9AB1BCB5FF/Pythonista3/Documents/pybitcointools-vbuterin/test.py", line 133, in test_all
    "Verification error"
AssertionError: Verification error

----------------------------------------------------------------------
Ran 18 tests in 6.944s

FAILED (failures=2, errors=2)


I've got a hunch this has to do with the introduction of low_s (ie s = N-s if s&gt;N//2 else s) for ECDSA signing, but can't be certain.

Can anyone point out where things are going astray?
OK, I figured it out.

It was an issue with the value of v in vrs (v being the version byte, and r/s being the DER values). Since v is not encoded by DER signatures, the check for 27 &lt;= v &lt;= 34 was failing because not knowing the v value would sometimes require v be equal to None, 0 or 1.