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).
Previously the `cert_msg` in the fidelity bond protocol involves a
binary public key. This is additional unnecessary complexity given
that we want other wallets to also implement the fidelity bond
protocol (see issue #993 for full discussion). So its good to move
to a certificate message which is entirely ascii.
This commit has ascii certficiate messages also be accepted as valid
along with the old certificate messages.
a04fb60 add tests of /session auth-ed and not (Adam Gibson)
7e4d2b1 docs: clarify handling of optional auth token in session endpoint (theborakompanioni)
c7a2612 feat: validate auth header in session request if provided (theborakompanioni)
14077003d7 Bump local Tor to version 0.4.6.10 (Kristaps Kaupe)
Pull request description:
See [ChangeLog](https://gitweb.torproject.org/tor.git/plain/ChangeLog?h=tor-0.4.6.10), contains mostly bugfixes.
Top commit has no ACKs.
Tree-SHA512: 54c05ac6e73f31d53f15efffb8612d4a890629f82821eeeadae234991ad29a873ef4d56179e9b067681b2700c561f9573102131397b16afc86c0e175a2322d58
Prior to this commit, passive observation of orderbook updates by bots
such as ob-watcher was not able to keep track of nicks/bots that had
disconnected and were no longer available, because non-directory peers
do not get the network level disconnection event.
After this commit, the directory nodes forward a variant of the
"peerlist" control message, that was previously used only to send
connection information from one non-directory peer to another (so that
they could establish a new p2p connection if desired). Now a new version
of that message adds an extra "D" field to indicate that this message is
being used to inform that the relevant peer has disconnected from this
directory node.
Bubbling up the on_nick_leave event: it is already the case that the
final on_nick_leave callback is only triggered by the disappearance of a
nick from all available message channels (so that as long as a nick is
perceived as being in at least one available message channel, its
current offers are still maintained in the local database); this logic
is now repeated one layer down, because the disconnection of a nick from
one directory node may not mean it is shut down, so we only pass the
on_nick_leave callback from the OnionMessageChannel object up to the
MessageChannelCollection callback when the active_directories dict
indicates that this particular nick is no longer available on any of our
configured directory nodes.
8eefb4d68c unused and missing vars in jmbitcoin tx code (Adam Gibson)
Pull request description:
Just noticed these while reading the code for some reason or other.
The `btc.OP_RETURN` was presumably not fixed before because that code (burn addresses) is now entirely unused.
However, this should be in the tests somewhere. We are missing tests for a lot of the functions in `secp256k1_transaction`. A PR should be opened by someone at some point to add those.
ACKs for top commit:
kristapsk:
ACK 8eefb4d68c
Tree-SHA512: 6cd7f959c1f798f14536a17c672a7ededbb4f962183aed17cba46a81955d91f5499bbd550a2de7bf337ed81660d55d00ea2f8b8cb0936c905f49a14ad405a6b9
Fixes#1214.
Prior to this commit, if a broadcast of a transaction failed locally, or
failed after attempting remote broadcast then falling back to local via
the function jmclient.taker.Taker.handle_unbroadcast_transaction, then
the version of the on_finished_callback found in
jmclient.wallet_rpc.JMWalletDaemon incorrectly asserted that the fromtx
keyword argument must be True, thus failing to update the state of the
daemon to CJ_NOT_RUNNING.
After this commit that assertion is removed, and the coinjoin_in_process
value returned over the API is correctly False after either a
successful, or an unsuccessful, finishing of the coinjoin.
Fixes#1213.
Prior to this commit, if the YieldGeneratorService were started via a
call to /maker/start over the RPC-API, the early check of whether coins
were present in the wallet to allow starting the maker, incorrectly read
the contents of the dict returned by
jmclient.wallet.UTXOManager.get_balance_by_mixdepth, which returns
entries for mixdepths with coins which are all frozen, with a total
value of zero, even if the include_disabled keyword argument is set to
False. Thus only checking for whether the length of the returned dict
was zero was incorrect.
After this commit, we will stop early, as intended, for a wallet which
has no mixdepths with any non-frozen coins.
Fixes#1212.
Before this commit, transactions were kept monitored in
WalletService.transaction_monitor after first being seen, only if the
list of confirmed callbacks was non empty, but this meant that the logic
is process_new_tx was not executed, meaning the height field of the utxo
was never updated from INF_HEIGHT, so the utxo would continue to be seen
as having zero confirmations, even after blocks are mined.
After this commit, we add any transaction that was seen to the
active_txs dict, so that the height field, and thus the number of
confirmations reported, is correct even if the caller never registered a
confirmed callback.
2692f08d3b Update local Tor config (Kristaps Kaupe)
Pull request description:
* Change loglevel to "warn" to have less verbose output (it still outputs some "notice" level messages for me but less than without this).
* Add [stream isolation](https://github.com/JoinMarket-Org/joinmarket-clientserver/issues/583).
```
IsolateDestPort Don’t share circuits with streams targeting a different destination port.
IsolateDestAddr Don’t share circuits with streams targeting a different destination address.
```
* Cookie authentication.
Top commit has no ACKs.
Tree-SHA512: d006e541d250418656b7933ee2537b16897b449ae9418f3b7f2c1521bd964048d7ef62ed5cc3098c4d0f4aea4eb0af680c9e23ed9d18cb310c1bd5acfefdf58c
The former was a stale test that we never got to a properly
working state, so we replace it with test/e2e-coinjoin-test.py
which does the same job more effectively, using the RPC-API.
Also removed the old file from parameters of run_tests script.
8d7d82f15c Add local Tor autostart to missing scripts (Kristaps Kaupe)
Pull request description:
Some scripts were missed in #1061.
Top commit has no ACKs.
Tree-SHA512: ae6a87295c5d771cc44b8e78d05f20917ddaa7d59a5267811e0e04d4619c101efcb9cb55ed392411c126d1d82ded1ab32f2e668746a3663c0af5d19ce1807182
704ffcfb7e docs: Add required port for directory_nodes in doc (laanwj)
Pull request description:
`:80` needs to be provided otherwise parsing will fail with
Failed to load directory nodes: InvalidLocationStringError('3kxw6lf5vf6y26emzwgibzhrzhmhqiw6ekrek3nqfjjmhwznb2moonad.onion')
This is correct in the auto-generated configuration file, but not in the document.
Also mention that even for UNIX sockets, it's necessary to specify `tor_control_port`.
ACKs for top commit:
kristapsk:
ACK 704ffcfb7e. Checked that doc changes describes current reality.
Tree-SHA512: 32c41e0e0136c7d84f6fe988befbbf3e0ebcae0fa5f5d790c32c73e06c0b47296cfdacbb97fba4479c84c69bda436fa7382d01fb70dbfd1a00cf9d9c0653f6de
`:80` needs to be provided otherwise parsing will fail with
Failed to load directory nodes: InvalidLocationStringError('3kxw6lf5vf6y26emzwgibzhrzhmhqiw6ekrek3nqfjjmhwznb2moonad.onion')
This is correct in the auto-generated configuration file, but not in the
document.
Also mention that even for UNIX sockets, it's necessary to specify `tor_control_port`.
Original testing setup of onion message channels just sent messages on
the first directory node peer in our list. This fixes that TODO.
After this commit, we keep a map of which directory nodes we have seen a
given Joinmarket nick on, and we keep track of whether those directory
nodes are available (connected) or not. Then when we want to privmsg
that nick, if we do not currently have a direct connection, we choose
randomly from the set of directory nodes on which that nick has been
seen, and which are currently live/connected.