Commit graph

523 commits

Author SHA1 Message Date
Adam Gibson
044bef6fff
Change default fidelity bond exponent settings.
Closes #1247.
This consists of an inclusion of the bond value exponent into the config
that the user can alter, and a change of that from 2 to default 1.3.
Also updates the fidelity bond documentation to account for those
changes, including the units used in ob-watcher, but not the calculation
of fidelity bond attack resistance (which remains a TODO).
2022-05-03 17:24:00 +01:00
Kristaps Kaupe
8d7d82f15c
Add local Tor autostart to missing scripts 2022-04-08 14:35:36 +03:00
Adam Gibson
e915daef88
Passive mode for ob-watcher bots on onion-mc
Prior to this commit, running ob-watcher with
an onion-type message channel configured would result
in the bot attempting to connect to all the makers,
which is bad. This happened because the internal logic
of the onion message channel is that receivers of privmsgs
will be sent peer info from the directory, so that they can
immediately respond p2p if they succeed in outward connecting.
But for bots who do not intend to engage in a coinjoin interactive
protocol, like ob-watchers, this is absolutely not the desired outcome.
After this commit, a bot can specify mode "PASSIVE" in the call to
get_mchannels(), which results in the OnionMessageChannel object only
creating non-directory remote peer objects of type OnionPeerPassive,
instead of OnionPeer, which means they never try to connect to those
remote peers.
2022-04-06 09:52:49 +01:00
Adam Gibson
52eeeb09b9
Merge #1182: Only onion message channels
5cc1695 Disconnection logic fixes, add btcnet to handshake (Adam Gibson)
830ac22 Allow taker peers to not serve onions + bugfixes. (Adam Gibson)
fd550ee Onion-based message channels with directory nodes (Adam Gibson)
2022-04-05 17:32:14 +01:00
Adam Gibson
5cc1695154
Disconnection logic fixes, add btcnet to handshake
Also, exports JMMakerClientProtocol for custom directory node scripts
(stored in the custom-scripts repo).
Modify default config with 2 signet and mainnet directory nodes to
start.
Handles unreachable directory nodes with a human readable error and
adjusts connection timeouts to be realistic.
Changes wording in Qt notifications from "IRC" to message channel.
Updates docs, new directory node information.
2022-04-03 14:54:46 +01:00
Adam Gibson
a48d1cff78
Merge #1216: Fixed so tumbler can restart if no utxos in depth 0
df429cd Fixed so tumbler can restart if no utxos in depth 0 (Jaime)
2022-04-02 17:11:06 +01:00
Kristaps Kaupe
4310af4f00
Merge JoinMarket-Org/joinmarket-clientserver#1061: Add support to build and autostart local Tor instance in jmvenv
5132342f57 update install.sh to build tor on macOS (jules23)
7a88781648 Add support to build and autostart local Tor instance in jmvenv (Kristaps Kaupe)

Pull request description:

  See https://github.com/JoinMarket-Org/joinmarket-clientserver/pull/1000#issuecomment-957379435 for context.

  This adds new option `--with-local-tor` to `install.sh` which builds Tor locally inside jmvenv. Then, when starting JM scripts that might need Tor connection, it is started automatically if nobody already listens on `127.0.0.1:9050`.

  If no problems are found with his approach in testing, we could switch to this as a default and remove all clearnet IRC configs from default config.

Top commit has no ACKs.

Tree-SHA512: caa7fcac88e57321f65a3f9fc09def94f9659855977026a19e1ac8f2f160a01237fe90220b986561bd622b05534f201ea5a29a9cdbc71013e40301992ed59e4d
2022-04-02 17:55:47 +03:00
Jaime
df429cd9b9 Fixed so tumbler can restart if no utxos in depth 0 2022-03-29 16:27:49 +02:00
Adam Gibson
830ac22934
Allow taker peers to not serve onions + bugfixes.
In the previous commit, all peers served an onion.

After this commit, taker client instances will automatically
send a config var to the jmdaemon backend that instructs
the OnionMessageChannel instance to not start an onion service,
and the handshake messages sent by these peers replace the
onion location with a placeholder string NOT-SERVING-ONION.
Directories and maker peers will not therefore to connect outbound
to them, but privmsging still happens p2p with connections from
takers to makers after the directory has communicated their
reachable .onion addresses.
This change reduces the configuration requirement for takers and
is better for their privacy and security (without sacrificing
the gain we get from having p2p connections).
The above comments re: takers also apply to ob-watcher bots.

This commit also fixes a large number of minor bugs and errors in
documentation, as well as many Python cleanups after review from
@PulpCattel. A few concrete items are:
It fixes the ob-watcher functionality to work with the new subclass
of MessageChannel (OnionMessageChannel).
It corrects the on_nick_leave trigger to make dynamic nick switching
between MessageChannels (as implemented in MessageChannelCollection)
work correctly.
It corrects the order of events in the add_peer workflow to ensure that
a handshake can always be sent so that the activation of the connection
always works.
It sets a default messaging config with onion, 2 active IRC servers and
one inactive IRC server. The onion config has 2 signet directory nodes,
so this will change to mainnet after the PR is merged to master.
2022-03-29 12:15:46 +01:00
Adam Gibson
fd550ee564
Onion-based message channels with directory nodes
Joinmarket bots run their own onion services allowing inbound connections.
Both takers and makers connect to other makers at the mentioned
onion services, over Tor.
Directory nodes run persistent onion services allowing peers to
find other (maker) peers to connect to, and also forwarding
messages where necessary.
This is implemented as an alternative to IRC, i.e. a new
implementation of the abstract class MessageChannel, in onionmc.py.

Note that using both this *and* IRC servers is supported; Joinmarket
supports multiple, redundant different communication methods,
simultaneously.

Messaging is done with a derived class of twisted's LineReceiver,
and there is an additional layer of syntax, similar to but not the
same as the IRC syntax for ensuring that messages are passed with
the same J5.. nick as is used on IRC. This allows us to keep the
message signing logic the same as before. As well as Joinmarket line
messages, we use additional control messages to communicate peer lists,
and to manage connections.
Peers which send messages not conforming to the syntax are dropped.
See https://github.com/JoinMarket-Org/JoinMarket-Docs/pull/12 for
documentation of the syntax.
Connections to directory nodes are robust as for IRC servers, in
that we use a ReconnectingClientFactory to keep trying to re-establish
broken connections with exponential backoff. Connections to maker
peers do not require this feature, as they will often disconnect
in normal operation.
Multiple directory nodes can and should be configured by bots.
2022-03-29 12:15:00 +01:00
Kristaps Kaupe
9594238886
Output script instead of address in /orderbook.json 2022-03-15 16:03:42 +02:00
Kristaps Kaupe
7a88781648
Add support to build and autostart local Tor instance in jmvenv 2022-03-03 14:01:07 +02:00
Adam Gibson
a7d49b26bb
update to new dev version 2022-02-18 15:48:20 +00:00
Adam Gibson
321a792712
Add release notes and version for 0.9.5 2022-02-18 13:15:34 +00:00
Kristaps Kaupe
c5456e4a6a
Don't show nonwallet_custom_change_warning in Qt GUI for non-cj sends 2022-02-16 23:42:39 +02:00
Kristaps Kaupe
f741fdd11a
Use get_txtype() / get_outtype() for address type detection 2022-02-16 21:47:19 +02:00
Adam Gibson
4389338d72
Make unconf unspent display default in jmwalletd
Fixes #1162.
Prior to this commit, the default argument [] was provided
to the bitcoind RPC listunspent call, which means only confirmed
unspent coins are returned. This is in contrast to the display
in wallet_tool, which deliberately updates listunspent_args to [0]
in order to default to showing unconfirmed coins, as users will
expect.
This commit adds the same listunspent_args = [0] in case the user
has not edited this variable in the config, for the same reason.
2022-02-04 12:38:24 +00:00
Kristaps Kaupe
7d1c4ebf30
Merge JoinMarket-Org/joinmarket-clientserver#1129: Fix tumble log dir after load_program_config
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
2021-12-28 14:42:56 +02:00
Adam Gibson
cf37639049
Make Qt shutdown gracefully on reactor stop.
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.
2021-12-28 09:14:41 +00:00
Adam Gibson
a1bcac99cc
Fix tumble log dir after load_program_config
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.
2021-12-26 16:46:43 +00:00
Wukong
d110101fad Rename WalletViewEntry.used to WalletViewEntry.status 2021-12-11 23:48:51 -08:00
Wukong
c706c6e1e9 Improve the UX of open wallet dialog.
When open wallet from menu, also use the JMOpenWalletDialog to handle the workflow
Create a new "errorMessageLabel" in the OpenWalletDialog, and show the error message in this new label instead of in a separate message box popup.
Auto focus on passphraseEdit when OpenWalletDialog is launched, and when a wallet file has been chosen
2021-12-10 09:48:00 -08:00
Kristaps Kaupe
f7e9c16363
update version to 0.9.5dev 2021-12-01 19:51:58 +02:00
Adam Gibson
e3b5a05ce8
add release notes and version 0.9.4 2021-11-30 14:00:20 +00:00
Kristaps Kaupe
b1b53a0d1a
Merge JoinMarket-Org/joinmarket-clientserver#1015: Implement address labeling
21c0e3e758 Implement address labeling (Kristaps Kaupe)

Pull request description:

  Adds new method `setlabel` to `wallet-tool.py` that allows to set label for wallet address. Setting it to empty string removes label. Labels are shown as additional column in `display` and `displayall` methods.

  Full functionality for now is cli only, in Qt GUI is only read-only displaying implemented.

Top commit has no ACKs.

Tree-SHA512: b24c96d4d57ab75a511474898e9087e8cd5faa0e1e9440ab57e6caafbc442a8b4edbbad5d3dbd67f0ed3a0cd95f9cd059924d28956869456901fb27dba0530d6
2021-11-02 11:43:36 +02:00
Kristaps Kaupe
21c0e3e758
Implement address labeling 2021-11-02 11:32:00 +02:00
Adam Gibson
d01e9bc0ca
update version to 0.9.4dev 2021-10-29 19:54:56 +01:00
Adam Gibson
fce946db75
add release notes and version for 0.9.3 2021-10-20 14:24:40 +01:00
Adam Gibson
ebd04648a9
Merge #1035: Rename yield generator's txfee settings to txfee_contribution
c2729c0 fix typo (Kristaps Kaupe)
a542680 Rename yield generator's txfee settings to txfee_contribution (Kristaps Kaupe)
2021-10-19 15:59:32 +01:00
Adam Gibson
4b8d499a90
update version to 0.9.3dev 2021-10-19 15:44:07 +01:00
Kristaps Kaupe
a5426808e3
Rename yield generator's txfee settings to txfee_contribution 2021-10-16 12:00:07 +03:00
Adam Gibson
ff10262c78
Merge #996: Rpc api 2
7e73e4c Add websocket for subscription, OpenAPI spec (Adam Gibson)
1688d2d Adds listutxos and heartbeat route, several fixes (abhishek0405)
80e17df Add jmwalletd script as RPC server. (Adam Gibson)
2021-10-10 16:49:14 +01:00
Adam Gibson
7e73e4caa9
Add websocket for subscription, OpenAPI spec
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.
2021-10-10 16:41:02 +01:00
abhishek0405
1688d2d2dc
Adds listutxos and heartbeat route, several fixes
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.
2021-10-10 10:50:00 +01:00
Adam Gibson
80e17df4a6
Add jmwalletd script as RPC server.
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
2021-10-10 10:50:11 +01:00
Kristaps Kaupe
658952ed76
Merge JoinMarket-Org/joinmarket-clientserver#1013: Reorder the tabs in Qt
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
2021-10-09 15:42:36 +03:00
Adam Gibson
a50edfa524
add release notes and version for 0.9.2 2021-10-01 12:22:38 +01:00
Kristaps Kaupe
0e80b2dee7
Show fidelity bond value in manual order picking 2021-09-25 22:04:40 +03:00
Wukong
8085a4e86e Set fidelity_bond_weighted_order_choose as default 2021-09-18 11:28:03 -07:00
Wukong
bc71997058 Reorder the tabs in Qt 2021-09-09 13:31:06 -07:00
Kristaps Kaupe
aaebb1a506
Merge JoinMarket-Org/joinmarket-clientserver#1014: Hide the donateLayout as it is currently disabled.
6ff1a65622 Hide the donateLayout as it is currently disabled. (Wukong)

Pull request description:

  The current Coinjoins tab has a disabled donation checkbox:
  ![image](https://user-images.githubusercontent.com/87334822/132644961-225b303c-be4b-4642-ae9e-be618d6003b7.png)

  When a user click the More button, it shows the following message:
  ![image](https://user-images.githubusercontent.com/87334822/132645137-de9a9a1c-bbf5-4937-9fe6-2c27e665ff31.png)

  I think it's not a great idea to show the donation feature while it's disabled, so I propose in this PR, that we hide this section entirely until we re-enabled the donation feature.

ACKs for top commit:
  kristapsk:
    utACK 6ff1a65622

Tree-SHA512: b4a320667b67ff471a17382988cf53bd9f1b56e896adf108d0f244424249d0fb742c85003fabd478aeb22e6df1ea800473b82bb164c8f6002aceee7226dad6a4
2021-09-09 21:30:40 +03:00
Adam Gibson
14addf097a
Merge #932: Show an Open Wallet dialog upon launching the app
2ed3f21 Update the url links in setup.py files (Wukong)
1dd1679 Show an OpenWallet dialog upon launching JoinMarketQT (Wukong)
2021-09-09 10:58:19 +01:00
Wukong
6ff1a65622 Hide the donateLayout as it is currently disabled. 2021-09-09 00:47:23 -07:00
Wukong
1dd1679711 Show an OpenWallet dialog upon launching JoinMarketQT 2021-09-08 20:56:48 -07:00
Wukong
f50fa4f74f Add a menu action to force wallet refresh
Co-authored-by: Kristaps Kaupe <kristaps@blogiem.lv>
2021-09-08 20:18:30 -07:00
Kristaps Kaupe
c94404658a
chmod +x 2021-09-08 09:51:24 +03:00
Adam Gibson
7eaf368dd7
Fix ob-watcher script after dust threshold change
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.
2021-09-07 09:19:50 +01:00
Adam Gibson
50f5228498
Merge #921: added opt-in replace-by-fee support for direct sends
635f3f1 Adds test case for fee bumping a tx using PSBT (Adam Gibson)
b19888e add opt-in rbf support for direct sends (Tim Akinbo)
2021-09-06 13:55:19 +01:00
Adam Gibson
cb0f75da12
Merge #972: Qt: Uppercase simple bech32 BIP21 URI's for QR code encoding
7d884da Uppercase simple bech32 BIP21 URI's for QR code encoding (Kristaps Kaupe)
2021-09-04 16:52:45 +01:00
Erik Arvstedt
53e7bf1018 genwallet.py: Add option --recovery-seed-file 2021-09-01 21:18:42 +02:00