As discussed with @schildbach and @petertodd on IRC (who were willing to add the same to BitcoinJ and python-bitcoin)
This adds P2SH+STRICTENC to every test case for now. Way overkill, but makes this patch have no semantic impact.
As discussed with @schildbach and @petertodd on IRC (who were willing to add the same to BitcoinJ and python-bitcoin)
This adds P2SH+STRICTENC to every test case for now. Way overkill, but makes this patch have no semantic impact.
Thanks sipa!
Misleading title: Actually it's the script_*.json validation flags.
@schildbach Thanks, fixed.
Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/p4876_6022b5dc6ba930797db46e00426923b53d6594b3/ for binaries and test log. This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ Contact BlueMatt on freenode if something looks broken.
ACK.
ut ACK.
I have prepared the code for bitcoinj. I'm now waiting for this PR to be merged.
Concept ACK. I did not verify that any tests were added or removed.
Current state of progress on bitcoinj master:
@schildbach STRICTENC is not implemented (the tests pass anyway -- is this expected?)
That's expected - the STRICTENC tests are in a separate file right now and need to be put in the .json testcases.
Thanks, What's that file called, and (when) will they be put into the .json testcases?
They're in canonical_tests.cpp
When? When someone does the work. :) I'm in no rush myself, because I've been told python-bitcoinlib doesn't even reliably spit out canonical signatures w/ the EVEN/ODD or whatever it is rule; I'm in no rush to delve into OpenSSL's docs and figure out how to fix that.
@schildbach I'll work on that. @petertodd Don't confuse the strict DER ("canonical encoding") requirement with the low-S rule (which is just there to break malleability). The latter (the S value in the signature needs to be less than half of the curve's order; the exact semantics are in BIP62) is Bitcoin specific, and not something you can ask OpenSSL to do, unfortunately. It's not hard to fix manually though. There is no even/odd rule anymore - that used to be in the code for a short time, but low-s instead of even-s is not harder and results in on average half a byte smaller sigs.