1. Moves the JMWalletDaemon service class into
the jmclient package (see the wallet_rpc.py module).
2. Adds dependencies "klein" and "autobahn" to the
jmclient package, as well as "pyjwt".
3. Adds another module websocketserver.py, using
autobahn, to allow the JMWalletDaemon service to
serve subscriptions over a websocket, for e.g.
transaction notifications.
4. Adds tests both for the websocket connection
and for the JSON-RPC HTTP connection.
JmwalletdWebSocketServerFactory.sendTxNotification
sends the json-ified transaction details using
jmbitcoin.human_readable_transaction (as is currently
used in our CLI), along with the txid.
Also adds a coinjoin state update event sent via
the websocket (switch from taker/maker/none).
Require authentication to connect to websocket.
5. Add OpenApi definition of API in yaml;
also auto-create human-readable API docs in markdown.
6. Add fidelity bond function to API
7. Add config read/write route to API
8. Remove snicker rpc calls temporarily
9. Updates to docoinjoin: corrects taker_finished
for this custom case, does not shut down at end.
10. Address detailed review comments of @PulpCattel.
The /utxos route is the equivalent of the showutxos
wallet tool method.
The heartbeat route /session allows a client to
make sure the backend is still running and in the
expected state (but see later commits for the
coinjoin state update via the websocket).
Fixes to sendpayment, the maker service,
the create wallet function.
sendpayment fix
Also substantially improved and made
functional the coinjoin route, a schedule
is now created and a complete taker-side
coinjoin is now possible.
Uses Klein to provide HTTP server support.
Adds cookie based auth to requests (made JWT token
based in later commits).
Basic routes are: /unlock, /lock, /display,
/create of wallet.
Encapsulates WalletDaemon as a Service
Add snicker receiver service start, stop
Adds yg/maker function as stoppable service.
Adds a JMShutdown command to
the AMP protocol, allowing a clean shutdown
of a long running bot (e.g. maker) by shutting
down its message channel connections, without
shutting down the entire process.
Adds payment(direct send) request, first draft
bc71997058 Reorder the tabs in Qt (Wukong)
Pull request description:
The current ordering of the tabs in Qt feels very strange. For example, the "Settings" tab is usually the last tab in most applications, while it's the 2nd tab in JoinMarket-Qt.
This PR reorders the tabs from "JM Wallet, Settings, Coinjoins, Tx History, Coins" to "JM Wallet, Tx History, Coinjoins, , Coins, Settings".
I made the new ordering of the tabs by consulting the Electrum wallet, which has the tab orders of "History, Send, Coins".
ACKs for top commit:
kristapsk:
ACK bc71997058
Tree-SHA512: 8133764152316e31b475a80b7e55cc06f416a93fb787f08cde6935e4c2e5fc8d1b6f9245c11854bc13c8e2d274be424099bbcc07a1f5be860da3a5e4dca433d4
3f5abeec14 Fix help description of yg's command line txfee options (Kristaps Kaupe)
Pull request description:
Help output description of yield generator's `--txfee` command line option is currently wrong.
Top commit has no ACKs.
Tree-SHA512: ae1d1f9652df313fd0e9d4f6c16583a70f0666f54c03a2e1c03318a52b688c52787d737d75b9e084a0ac64af4a08f8380ca15644552b5f788fe7be235246a74c
df5f241f29 Add configurable miner fee randomization factor (Kristaps Kaupe)
Pull request description:
Defaults to previously hardcoded 0.2 (+/- 20%).
Resolves#1009.
What I don't like is that we now have `tx_fees` and `tx_fees_factor` under `[POLICY]` and `txfee` and `txfee_factor` under `[YIELDGENERATOR]`, which may be confusing, but I don't see a good solution to that (apart from getting rid of yg txfee configs).
Top commit has no ACKs.
Tree-SHA512: 0c7fddf5209a74fa8d0dc2b195b1125b819e48db3c6aa8543a0c305a8ad19a5e02ada916e36325acbbd3a9114a33c0183ee49772ab37769de0f538113e506d5c
040fb548f0 Fix JSON output when stdout is not a terminal (Kristaps Kaupe)
Pull request description:
When output is redirected, colourizer is not used, so character replacements aren't needed too.
Fixes#1022.
Top commit has no ACKs.
Tree-SHA512: 9096fa6cefca01b5f880929210116a2ff8dbe1004f60eb8e82ff7ad40345457d5d8dcd669d9f5fd0f3499d1882b296f50b0223954fcf3e2ae3bd7b3e05457c02
0e80b2dee7 Show fidelity bond value in manual order picking (Kristaps Kaupe)
Pull request description:
.
Top commit has no ACKs.
Tree-SHA512: c9ace4fd09f7bd36abd8fe887a6cd17d47e34f504fc0f30dcd6ef959f8af68b49fcafacd44dff7d91d651234e4c1c45a226ec731c09fc7fb1d447306b5abee6a
2fdebb8 do not call reactor.stop() in test_commands.py (undeath)
e082c3c remove unneeded hex encoding/decoding from sent_tx + push_tx (undeath)
dfc82ab various whitespace fixes (undeath)
7dcd3f3 move client/server data encoding to twisted (undeath)
f50fa4f74f Add a menu action to force wallet refresh (Wukong)
Pull request description:
After https://github.com/JoinMarket-Org/joinmarket-clientserver/pull/942, the Qt wallet view is only updated when the callback is triggered.
If, for some reason, the callback wasn't triggered properly, a user would have to close and re-open the Qt wallet to refresh the wallet.
This PR adds a new menu action, "Refresh Wallet", so that in this rare case, a user can use this menu action to force a wallet refresh.
Top commit has no ACKs.
Tree-SHA512: 8f1ead71e7b5bd6bd93ab7af28efb5ee19e480c9051ed29457e21b3e6878dce205b6af24bcc3e09ddd239e78ea46c3490e4393102f0b9ce05cbeb660b1673f9a
1. The url for jmqtui should be `/jmqtui`, not `/jmfg`.
2. All the urls in setup.py must specify `tree/master` as part of the url, otherwise the links can no longer be opened.
3. All the urls in setup.py should use `https` instead of `http`, even though GitHub will auto redirect the request to use `https`.
4. Use `JoinMarket-Org` instead of `Joinmarket-Org` in the url links for better consistency, even though it doesn't affect the effectiveness of the link.
Before this commit, the ob-watcher.py script errored
in trying to read offers because the variable
dust_threshold of the OrderbookWatch class was not
initialized; this was because this variable is now
set by the client in the AMP message JMInit; but
ob-watcher is a script that runs without any such
client. Since the script has access to the global
configuration from the jmclient package anyway, the
fix is just to add that into the ObBasic class
constructor.
This ensures that `wallet_utils.py` and `genwallet.py` use the same logic for
reading the password.
The current algorithm for reading the password entails some
non-obvious details like utf-8 encoding and not stripping trailing
newlines.
Changes from top to bottom:
- Add header comment
- Import wallet_utils (needed for DEFAULT_MIXDEPTH)
- Make password optional in usage string
- Set variable wallet_name at the top where options are parsed
- Use DEFAULT_MIXDEPTH instead of hardcoded value
bugfix: use enumerate instead of len
reviewed estimation of transaction sizes
estimates are still a bit conservative with room for improvement;
signatures could still save up to one byte each if using low-r
values. python-bitcointx==1.1.2-dev already supports grinding for
low-r values so when it's stable and referenced version is updated,
this should be reviewed again so as to utilize that benefit.
added utility method `estimate_extra_bytes`
the purpose of this method is for the computation
of extra bytes when the coinjoin or direct send output
type is different from that of the wallet
updated tests to reflect new transaction size
computation
p2pkh transactions are now 1 byte larger for
the inputs hence the change amount should be
less 4 * 30 sats.
add private keys for utxos that we may not be
tracking
some transactions (e.g. opt-in rbf) may require signing
with private keys for utxos that we may have stopped
tracking. this commit will search through all inputs
and for those we own and retrieve their private keys
so we can sign with them.
added support for p2wsh output scripts in
refactored the estimation of the transaction size
when outputs of a different type is the target
Previously, a different method was employed which
was kind of kludgy considering the fact that the
`extra_bytes` parameter is really for `OP_RETURN`
outputs. This method modifies the `estimate_tx_size`
method to accept an optional extra parameter called
`outtype` which is used to estimate the correct
transaction size if the target output is different
from that of the wallet.
added missing import
added a note about preserving the order of wallet type constants
Fix bug with timelocked addrs in receive payjoin
Previously there would be a crash if the wallet receiving a payjoin
had a timelocked UTXO.