This repository has been archived by the owner on May 13, 2022. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Tested 10000 transactions on regtest with old version: got 44/10000 failures; see http://pastebin.com/u6imE6MC for txhex of each failed tx. A quick way to find the source of the error is to search for the string '021f' (although it could be lower than 1f, but the likelihood of that is near zero).
Tested 10000 with this bip66 correction: got 0/10000 failures (of any type).
The value 44/10000 is closely in line with expectations: 1/(256*2) is the expected probability of this failure mode for one DER encoded value (half of the cases where the first byte of 32 is zero). However, each of these transactions had 1 input, meaning 2 DER encoded values, leading to a 1/256 or ~40/10000 expected number of failures.
Note that all failures were associated with the same error string: "error: {"code":-26,"message":"64: non-mandatory-script-verify-flag (No error)" , as expected.
Since a real joinmarket transaction might have ~6 inputs, we could well see 1/20 to 1/50 transactions failing this way.
It may be worth updating to https://github.com/simcity4242/pybitcointools/ , although I know we are considering using a different codebase entirely. simcity4242 seems to have identified a few other issues, although I can't say how important they are.