user9382: 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>N//2 else s) for ECDSA signing, but can't be certain.
Can anyone point out where things are going astray?

user9382: 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 <= v <= 34 was failing because not knowing the v value would sometimes require v be equal to None, 0 or 1.

9382: <p>I'm having several problems getting tests to successfully run <a href="https://github.com/wizardofozzie/pybitcointools" rel="nofollow">under my fork</a> (or vbuterin's <a href="https://github.com/vbuterin/pybitcointools" rel="nofollow">pybitcointools</a>, and I'm hoping someone with a combined Python / Bitcoin knowledge can provide some insight.</p>

<p>Here's the error message (as submitted to <a href="https://github.com/vbuterin/pybitcointools/issues/145" rel="nofollow">#145</a>):</p>

<pre><code>======================================================================
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)
</code></pre>

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

<p>Can anyone point out where things are going astray?</p>
 9382: <p>OK, I figured it out.</p>

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