Commit graph

545 commits

Author SHA1 Message Date
Adam Gibson
501b5f0dac
Merge #1301: ob-watcher: tackle stale orders by first removing all of them
ace9996 ob-watcher: tackle stale orders by first removing all of them (Tim Akinbo)
2022-10-08 14:55:27 +01:00
Kristaps Kaupe
d6d40df606
Allow amounts below DUST_THRESHOLD (0.00027300 BTC) for non-cj direct sends 2022-09-28 17:20:29 +03:00
Kristaps Kaupe
9d9035b43f
Fix sendpayment without amount argument, BIP21 only
Fixes bug introduced with 83c6bc053a
2022-09-25 15:08:24 +03:00
Kristaps Kaupe
46013d2ef4
chmod +x scripts/jmwalletd.py 2022-09-17 20:56:49 +03:00
Adam Gibson
f1f3972aa1
update version to 0.9.9dev 2022-09-15 14:53:57 +01:00
Adam Gibson
a7e3eed318
add release notes and version for 0.9.8 2022-09-13 16:48:40 +01:00
Adam Gibson
ed6f745372
update version for 0.9.8dev 2022-08-28 18:17:46 +01:00
Adam Gibson
28df2fc0e4
add release notes and version for 0.9.7 2022-08-28 13:58:16 +01:00
theborakompanioni
2b277b0ff2
fix(ob-watcher): consistent orderbook.json response 2022-08-18 23:26:02 +02:00
Adam Gibson
524cbda886
update Qt for new tumbler algo 2022-07-31 12:29:01 +01:00
Adam Gibson
75c444e9b2
Update wallet_rpc for new tumbler code 2022-07-29 17:53:43 +01:00
Adam Gibson
d0bf888971
Remove mixdepthsrc from options, more tests 2022-07-29 13:01:59 +01:00
Adam Gibson
d3dc9d7bbd
Change tumbler algo to cycle and add tests
Prior to this commit, the tumbler algorithm assumed that destination
mixdepths of INTERNAL transactions were incremented by 1, but the
underlying taker code uses (mod maxmixdepth) logic always. This commit
takes the decision to make the usage of the wallet "purely" cyclic, that
is, not only the Taker object but also the tumbler algorithm now always
treat the wallet as a cycle. This is not problematic in a tumbler
algorith (or any other schedule generation algorithm), as long as we use
the strict rule of "always exit each mixdepth with a sweep", which the
tumbler always did and this commit does not change.
Also, and importantly, several much more detailed tests of the tumbler
schedule generation have been added.
2022-07-25 22:02:55 +01:00
Kristaps Kaupe
83c6bc053a
Allow bitcoin: prefix for addresses with sendpayment.py 2022-07-08 17:21:43 +03:00
PulpCattel
72bf4474dd Script: Add bond-calculator.py
Add a new helper module to calculate fidelity bonds values and stats, and a script to use it.
The goal is to give as much information as possible to the user before
committing to a fidelity bond.
2022-06-16 17:47:56 +00:00
Tim Akinbo
ace9996d8e ob-watcher: tackle stale orders by first removing all of them
when checking for timed-out counterparties (or refreshing the
orderbook), stale entries are preserved because those peers
disconnected prematurely. This fix prevents that issue by
first removing all entries before requesting for the orderbook.
2022-06-07 06:36:17 +00:00
Adam Gibson
5b38ea509c
Merge #1266: Display the account xpub in QT interface
d95e279 Display the account xpub in QT interface (Wukong)
2022-05-24 17:02:24 -05:00
Wukong
d95e279d98 Display the account xpub in QT interface 2022-05-16 18:59:20 -07:00
Wukong
015cb4aa20 If there is unavailable fund, display 2 balances: total balance and unlocked balance.
For frozen balances, display a label "FROZEN" in the status notes.
For unconfirmed balances, display a label "PENDING" in the status notes.

Both FROZEN and LOCKED balances are considered unavailable balances, while PENDING balance is considered available balance.
Because it is possible to broadcast a transaction that spends unconfirmed balance, while a user has to manually unfreeze
the balance or wait until the timelock has expired before they can use FROZEN or LOCKED balances.
2022-05-12 18:05:08 -07:00
Wukong
e4f249ad4b Show QR code for xpub
Show QR code for xpub so that mobile client can easily create a watch-only wallet by scanning the QR code
2022-05-10 22:27:18 -07:00
Adam Gibson
7254149353
update version for 0.9.7dev 2022-05-08 23:02:07 +01:00
Adam Gibson
4c9c8d1f3c
Add release notes and version for 0.9.6 2022-05-07 13:40:04 +01:00
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