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.
Mention the creation of a legacy wallet in USAGE.md. This is currently
important because of the use of `importmulti` RPC which doesn't exist for
the new descriptor wallets.
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
07cdd3a8d7 add twitter joinmarket onion link to readme (unofficial bisq contributor)
Pull request description:
since twitter got official onion now, link to it too
Top commit has no ACKs.
Tree-SHA512: 663a693a0365c91c3feb1759e6644610b66f52c14fed0404cfb67bd93d12c39d4a582ea70d2bb739e0bb619d4d9d6e4e48d39bc4a709d0538891ff2de18caeee
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.
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.
* Migrate callbacks registered under provisional (tx-output tuples) keys
as soon as their txids are known. Leave a txid breadcrumb in place so
register_callbacks and check_callback_called can find it and the
migrated list of callbacks.
* Invoke callbacks via list comprehensions, retaining only the callbacks
that return False. The old code was buggy, as it was removing elements
from the callback lists while iterating over them, which would cause
callbacks to be skipped.
* The existing code would fail to call any "confirmed" callbacks for a
remove-only transaction if no "unconfirmed" callbacks had been
registered for that transaction, and it would discontinue monitoring
of a transaction after just one "confirmed" callback had returned
True, even if other "confirmed" callbacks returned False to remain
registered. This commit overhauls the logic to fix all of these bugs.
* Delete emptied callback lists from the dicts to be tidy.
The transaction_monitor function in WalletService was polling the most
recent 100 transactions from the BlockchainInterface every 5 seconds.
This was egregious and inefficient. Introduce a _yield_new_transactions
function that remembers the newest previously yielded transaction
between invocations and yields only transactions newer than that one.
Use the new function in transaction_monitor.
Avoid repeatedly deserializing confirmed transactions that remain in the
set of monitored transactions after being confirmed either due to
"confirmed" callbacks that return False or because callbacks have timed
out and have been unregistered without cleaning the set of monitored
transactions. Change the active_txids list to an active_txs dict whose
keys are the txids and whose values are the deserialized transactions.
Use this new dict as a cache to avoid repeatedly deserializing confirmed
transactions.
Alter the BitcoinCoreInterface._yield_transactions generator to be
nicer in cases where only a small number of transactions need to be
examined. Geometrically ramp the requested number of transactions in
each successive request, starting from 1. Since new transactions can
appear in the Bitcoin Core wallet between RPC calls, overlap successive
request ranges and resume yielding transactions after finding the
previously yielded transaction to avoid yielding duplicates.
The listtransactions RPC of Bitcoin Core can return the same (txid,vout)
as both a "category":"receive" and a "category":"send". Therefore, use
(txid,vout,category) as the sync key to ensure that all distinct
elements are yielded.
Delete the unused wallet_name parameter from _yield_transactions, per
suggestion by Adam Gibson.
Prior to this commit, the file commitmentlist, which stores
commitments (podle) for makers to let them blacklist/prevent
reuse was stored in the local directory for the script, which
allowed remote running of jmdaemon but was very unhelpful for
any situation where multiple bots are running at once, e.g.
in testing or using multiple wallets against the same codebase.
This could result in incorrect rejection of coinjoins.
After this commit, by default, the commitmentlist file is stored
in datadir/cmtdata/commitmentlist, so it will be local to any
custom data directory as would be the case for running multiple
wallets on the same machine. A user can set the POLICY variable
commitment_list_location to "." to revert to the previous behaviour.
308f739467 Print which option is invalid in shell scripts (Kristaps Kaupe)
Pull request description:
To save time when you have a typo in single of them in a long list.
Top commit has no ACKs.
Tree-SHA512: 56d34b11aede9e3cd9cd5e2f79b1c43fa79dc53c9d0f650148ee4e0c0ad400e70b9847254d40bba7bf08e5da1fe955c9eae769746f2e144968d6cea8837785cd
fbab9aadf2 Update YIELDGENERATOR.md (Steve)
Pull request description:
Fixed documentation to point users to the joinmarket.cfg file for yield generator configuration.
ACKs for top commit:
kristapsk:
ACK fbab9aadf2
Tree-SHA512: c534944d77ed6470c48f1ba82b21dbcd3ba3145138b4e1682d2dd25eef4ac09c66d3285311c02e76214d27f5bbf74751bb981cad9a4ec8cb1a891221a747c0e2
9594238886 Output script instead of address in /orderbook.json (Kristaps Kaupe)
Pull request description:
Fixes#1193.
Top commit has no ACKs.
Tree-SHA512: 866e76ef1ab7e9a99a6feb9133ba347f356b14e06113898038a6c7afb146428e12cd529347e690276f8742beef0e5f0f0f0771f9cb3c7a56dd0dafa392de6e74
d832d788d1 Create un/freeze all command in wallet-tool freeze (chris-belcher)
Pull request description:
If a user has many UTXOs but wants to spend just one, they would have to freeze all the UTXOs one-by-one except for one, then after sending do the same again unfreezing all UTXOs one-by-one. This new command drastically speeds up this process.
ACKs for top commit:
kristapsk:
re-ACK d832d788d1
Tree-SHA512: 16c24de153a22d7025bcfb622ac7cba3ab3438c86d0d1cce07deb3b828f1463713ab8c8ee41694a55e7d5074dc2fd92359afb6424ea59d2c2ac905b9dfdfe7e3
If a user has many UTXOs but wants to spend just one, they would have
to freeze all the UTXOs one-by-one except for one, then after sending
do the same again unfreezing all UTXOs one-by-one. This new command
drastically speeds up this process.
97e4816ca6 Update default makercount in USAGE.md (Luke)
Pull request description:
The default number of makers is [8 to 10](83918a971d/jmclient/jmclient/cli_options.py (L474)).
ACKs for top commit:
kristapsk:
ACK 97e4816ca6
Tree-SHA512: 25ba5946195016326ce5092ad5b396612f5fd5a848a0abbbf07d2ff08b4b16f5a5320e1132e0a8d3c76ec494e94930adeda2f106ddfa0211d426f2863f087002
This commit fixes an issue regarding a wrong taker state caused by
initiating a taker operation when no `max_cj_fee` value is present.
Before this change the taker state switches to `running` indefinitely.
After this change the config check is made before updating the state.
06dc4f7a05 fix: improve NotEnoughCoinsForMaker error message (Thebora Kompanioni)
Pull request description:
Changes the error message when the maker cannot start due to not enough coins from:
`"Maker could not start, no coins."` to `"Maker could not start, no confirmed coins."`
According to @AdamISZ [here](https://github.com/joinmarket-webui/joinmarket-webui/issues/34#issuecomment-1032558663) this could be an improvement for the user, as it might make it clear that coins need to mature.
Please just dismiss if you think it's not a good idea.
Edit: The newline change has been made by GitHub automatically.. 🤔
ACKs for top commit:
kristapsk:
utACK 06dc4f7a05
Tree-SHA512: c72441e1050ec664248da01bd2df9a3fc95cf7477ea512d876797e4798ae5d915771821efa42a7de4da71df08295d796517f5eda2aabd49eb171ecc2529d9b82
7445f3a39d docs: fix example in comment of default config (Thebora Kompanioni)
Pull request description:
A small error was introduced while formatting the comments in the default config.
Should be `thousand` instead of `million` in the comment of `max_cj_fee_rel`.
ACKs for top commit:
kristapsk:
utACK 7445f3a39d
Tree-SHA512: 8a01522617da3bb285ddec356362e79bf86d6a43a5f33f0f97892bd832fd7d5eba4e60cac1392558e41ab0831393102aeda04180da0cc6fc0dc036ae1edd925c