f899daabe6 Do not auto generate the QT UI code in setup.py (Wukong)
Pull request description:
If the user has an incompatible version of PySide2 installed on their system, the generation process might fail.
Since we have already checked in the correct version of the generated QT UI code, we don't need to run the generation process for every user in the `setup.py`
Hopefully this fixes#1087
Top commit has no ACKs.
Tree-SHA512: d1b5189369dfbdeda83250e9ebdd93d4bb14632ded5bd3a10a88362e237f548756326122755aa84a03ff74e558039adf288fc21c16a3d256486780d734edbb8f
b953d7e75d Document rpc_cookie_file and rpc_wallet_file in default config (Kristaps Kaupe)
Pull request description:
RPC cookie auth was added in #128 (Mar 2018), but never documented anywhere. This adds it to default generated `joinmarket.cfg`. Also added detailed comment about `rpc_wallet_file`, as it also sometimes confuses new users.
Top commit has no ACKs.
Tree-SHA512: 27613b1b293220c2666bd887a374d14048f604cd0e9592d5e1294e800c7d839ee6798a6d3a776c9731d828adc683990814484195d3a0f9581a996a27134578cb
Fixes#1093. This adds a POST method freeze for a wallet,
in which the utxo must be specified as a standard hex txid:n
string in the body, along with a boolean value of 'freeze', to
toggle the frozen/unfrozen state of the given utxo in the wallet.
Fixes#1123. Prior to this commit, the unlockwallet
method erroneously waited for wallet sync before continuing
and returning the credential. This was not necessary as the
WalletService method startService calls wallet syncing
asynchronously(!) in request_wallet_sync. Hence this initial
syncing step is removed, allowing the RPC call to return
immediately.
Fixes#1143 (and possibly others). Before this commit,
(index plus gap limit) addresses are imported on sync,
and addresses used by maker/taker in coinjoin are imported,
but when a deposit occurred, bumping the index, further
addresses were not imported. The effect was that it was
possible, if doing a series of deposits to multiple
external addresses in a Qt session, to end up depositing
to an address that was not yet imported. And this results
in the user needing to rescan for Core+JM to recognize the
coins.
After this commit, we ensure all 'gap limit forwards'
addresses, which are displayed as potential deposit addresses
in Joinmarket-Qt, are imported before the display.
Fixes#1120. As per the discussion in that issue, while
we can only return 'processing started' by default, and
the client must monitor progress/state to see if the maker
service has connected successfully, nevertheless if the
maker startup is immediately invalidated by the fact that
the already-synced wallet does not contain confirmed coins,
we can and should return an error message instead of a 202.
This commit does that, adding to the spec a 409-No-Coins
response type which indicates to the API client that the
setup of the maker failed for this specific reason.
Fixes#1118.
Before this commit, the json serializtion of a
WalletEntry object was incorrect and missing some
fields. This is now fixed, and the WalletDisplayResponse
in the RPC spec .yaml file correctly reflects the
fields that are returned by the JMWalletDaemon in response
to the /display request.
f05492110b Pin python-qrcode to a specific version (Kristaps Kaupe)
Pull request description:
There have been some [takeover of qr.js NPM account recently](https://github.com/zpao/qrcode.react/issues/168). Let's remove potential attack vector here by pinning `qrcode` to a specific (latest) version.
It seems that PyPI does not allow overwrite of already uploaded files, so, unless PyPI itself is hacked, this is safe, it can't be replaced with something else so easy (although using package hashes would be better, of course).
Top commit has no ACKs.
Tree-SHA512: 34aebae3a875dc780417303649b253c2d4ab40dbbe358fc47dc13913beb1f64e40e670e36fa2eb183f622cf3541cd75ba948f009370a8ffcb93c21d21bfa1262
Prior to this commit, if a user has attempted
a coinjoin with /taker/coinjoin but a problem
occurs (such as an unresponsive maker), they
are not able to abort the protocol but must wait
until the taker_finished event is triggered.
After this commit a GET request to the endpoint
defined as /wallet/walletname/taker/stop will
force-stop the coinjoin attempt (similar to
quitting the script in CLI). This will reset the
wallet daemon state to CJ_NOT_RUNNING.
Fixes#1121.
Prior to this commit, if a user
lost access to the authentication token for
a session with the wallet RPC, they would not
be able to lock the existing wallet before
authenticating again (getting a new token for
the same wallet, or a different one).
After this commit, a call to the /unlock endpoint
will succeed even if an existing wallet is currently
unlocked (whether a different one or the same one).
The existing wallet service, if present, is shut down,
if the attempt to authenticate a new wallet, with a
password is successful (otherwise nothing happens).
A test is added to make sure that this re-unlock can work.
This commit changes the underlying functions used in
jmbitcoin from the private and public key primitives
in coincurve and replaces them with equivalent
primitives CKey and CPubKey from python-bitcointx,
this removes the need to install coincurve and its
own bundled libsecp256k1 dynamic library.
Note that an additional pubkey_tweak_mul function
is exposed with ctypes from python-bitcointx's
bundled libsecp256k1 library.
a1bcac99cc Fix tumble log dir after load_program_config (Adam Gibson)
Pull request description:
Fixes#1060.
Prior to this commit, the extra log for tumbler.py
was created in the local directory, because it was
set before running load_program_config (which defaults
to the user's default joinmarket config location), this
is now corrected.
ACKs for top commit:
kristapsk:
ACK a1bcac99cc
Tree-SHA512: 69085ef50bdbe6a7f420df8c9384e21855df1fdad377b968714b70cefed4db558a66d7afc4f8cba1efd8dc41447564578c466d9d7ebea3b1a2cef9a4d7b069a2
f5c7f339d3 Allow signmessage to work with any index (Adam Gibson)
Pull request description:
Fixes#1043.
Prior to this commit, only keys/scripts/addresses
inside the scope of the current wallet script_map
(the keys cached by sync, according to persisted
index in wallet file, including gap limit) would
allow a successful signing operation, otherwise
an assertion was raised.
After this commit, signing can be done with any
arbitrary height index in the wallet (assuming a
valid path for this wallet).
ACKs for top commit:
kristapsk:
ACK f5c7f339d3
Tree-SHA512: bf057347d1c088217236b085562afefee10ecf8f2610a48b10439f0ed3f6bb00ab1b88917c9b29b7a3f265d0378286a7d687db0644f2a1e2134ff70ccec7d8e5
Fixes#1043.
Prior to this commit, only keys/scripts/addresses
inside the scope of the current wallet script_map
(the keys cached by sync, according to persisted
index in wallet file, including gap limit) would
allow a successful signing operation, otherwise
an assertion was raised.
After this commit, signing can be done with any
arbitrary height index in the wallet (assuming a
valid path for this wallet).
Fixes#1024.
Prior to this commit, if the RPC connection were lost
while JoinmarketQt was running, the reactor would be
stopped, but the qt5reactor shutdown does not stop
the Qt Application. This commit fixes that by injecting
a custom reactor stop function wrapper into jmbase,
which triggers the close event of the Qt main window.
Some of the return codes for the endpoints in
the RPC API were incorrect, these are fixed.
They are also checked in the tests.
Additionally, an extra test of the maker start/
stop function is added (though it tests only
state updates, not actual service start).
Fixes#1060.
Prior to this commit, the extra log for tumbler.py
was created in the local directory, because it was
set before running load_program_config (which defaults
to the user's default joinmarket config location), this
is now corrected.
Fixes#1091.
Before this commit, if the unconfirmed transaction
event triggered the taker_finished callback in the
RPC-started coinjoin, the value of fromtx is
'unconfirmed' and not False, hence an assertion error
was raised unless the confirmed event came first
(which is only likely to happen on regtest). This
crashed the jmwalletd daemon backend.
After this commit, the assertion check is only that
the value is not True, which it must not be as long
as we only accept single-join schedules.
fb4644ec5b Allow utxo address validation with script (Adam Gibson)
Pull request description:
Prior to this commit, the sendtomany.py script
would sometimes fail based on the output of the
RPC call gettxout returning only a script, and not
an address. After this commit, the validation will
still work correctly in these cases using the
chosen cryptoengine to convert from script to address.
ACKs for top commit:
kristapsk:
ACK fb4644ec5b. Was able to reproduce the issue and that this fixes it. Also test suite passes.
Tree-SHA512: 805e45144403317167243023bb3bda0d14b0197d5df71e510a1ca898b69faa2298f8d2a13d6915e6875fd99fcdeb343297b062fe0f4ce0d3b3ca1a95da7271ba
Prior to this commit, the sendtomany.py script
would sometimes fail based on the output of the
RPC call gettxout returning only a script, and not
an address. After this commit, the validation will
still work correctly in these cases using the
chosen cryptoengine to convert from script to address.
Also notably, the return value of utxo set does
not include an 'address' key any more.
Tests are updated to reflect this.
9ebd538db5 Removed Unicode dash. (Mark Lopez)
Pull request description:
Executing with `0.9.4` now results in a crash when attempting to generate a new `joinmarket.cfg`. The issue is likely related to my terminal emulator or something - but a easily fix is to remove the superfluous unicode dash from the generated configuration file.
```
$ python wallet-tool.py generate
User data location: /home/blah/.joinmarket/
Traceback (most recent call last):
File "wallet-tool.py", line 6, in <module>
jmprint(wallet_tool_main("wallets"), "success")
File "/opt/joinmarket/joinmarket-clientserver/jmclient/jmclient/wallet_utils.py", line 1502, in wallet_tool_main
load_program_config(config_path=options.datadir)
File "/opt/joinmarket/joinmarket-clientserver/jmclient/jmclient/configure.py", line 635, in load_program_config
configfile.write(defaultconfig)
UnicodeEncodeError: 'latin-1' codec can't encode character '\u2014' in position 2701: ordinal not in range(256)
```
ACKs for top commit:
kristapsk:
ACK 9ebd538db5
Tree-SHA512: daa316818eefb6ee7fe927894b177dbbd66373c2267f7e70a64f6df493b9c2bf5f44b2b744e336f241f54a7cf9a95f9824ee4285593d5fbdd286ce307290ec3a