In the Python3 compatibility upgrade, jmbase.support.getpassword
was changed and now returns bytes, therefore the password should
not be utf-8 encoded in the function decrypt_wallet_data. Without
this change, the conversion script errors; this fixes that error.
Prior to this commit, the test function test_tumble_tweak in
jmclient/test_schedule.py would occasionally fail due to the
creation of a schedule with less than 7 transactions, resulting
in an index error when trying to tweak the remaining schedule
entries (of which there were none). Here we bump the number of
mixdepths to make this probabilistically infeasible.
The keys created in the bigstring.py module in case of message
length greater than 65535 were unicode and this was unsupported
by amp.py, this fixes the key to be ascii.
Additionally the tests in test_commands.py were failing silently
due to an unupgraded command syntax in JM_SETUP, it's now upgraded
and now tests, as originally, the large orderbook case, which now
passes due to the previously mentioned bugfix in bigstring for the
new Py3 compatibilty mode (builtins).
Previous to this commit, if a utxo string did not conform to
the standard txid:n in hex format, of the correct length, an
exception would be thrown (specifically for invalid values of
the output index, which must be parseable as an integer). This
could allow a taker to crash a maker by sending an invalid
commitment string. After this commit this invalid utxo is
correctly ignored (and the commitment of course is invalid).
Previous to this commit, if certain types of invalid addresses were
used as coinjoin or change address by the maker, the address_to_script
function would throw an uncaught exception. This validates the maker's
chosen destination addresses before allowing them to be included in the
transaction.
The test file added here can be run locally to see potential
errors in E2E coinjoin operation, but it is not yet ready to
be included in automated testing, since errors may occur silently
in this setup. This should be fixed, and then the test should
be added to travis, in a future PR.