Commit Graph

21 Commits

Author SHA1 Message Date
Byron Hambly
249e97826f
feat: check swap cli wallet rpc version and remove if not fluorine fermi
- swap cli will check its wallet rpc version and delete the binary if
  its version does not match on "Fluorine Fermi". it will then download
  the newer version.
- adds download progress for wallet rpc
2022-08-10 21:35:22 +02:00
Byron Hambly
0a7a27327e
feat: upgrade to monero 0.18 2022-08-10 21:22:11 +02:00
devbordecraft
fb32d87114 Update from monero v17.2.0 to monero v17.3.0 2022-01-23 14:37:09 +01:00
Thomas Eizinger
9119ce5cc4
Tidy up log messages across the codebase
1. Clearly separate the log messages from any fields that are
captured. The log message itself should be meaningful because it
depends on the underlying formatter, how/if the fields are displayed.
2. Some log messages had very little context, expand that.
3. Wording of errors was inconsistent, hopefully all errors should
now start with `Failed to ...`.
4. Some log messages were duplicated across multiple layers (like opening
the database).
5. Some log messages were split into two where one part is now an `error!`
and the 2nd part is an `info!` on what is happening next.
6. Where appropriate, punctuation has been removed to not interrupt
the reader's flow.
2021-07-07 16:02:00 +10:00
Philipp Hoenisch
21babf9678
Support armv7 architecture for monero-wallet-rpc.
This allows us to run swap cli on a raspberry pi 4.
2021-05-21 17:55:04 +10:00
Philipp Hoenisch
a445ddd2bd
Print download URL while downloading. 2021-05-21 17:54:03 +10:00
Philipp Hoenisch
f6c7410457
Upgrade monero-wallet-rpc to version 2.0 2021-05-21 17:53:43 +10:00
Daniel Karzel
4dd696ebe1
Fix monero-wallet-rpc startup for mainnet CLI
There is no `--mainnet` flag.
Since we cannot just pass an empty string to `.arg()` we use the `.args()` method to pass nothing for mainnet and the respective flags for stagenet and testnet.
2021-05-20 13:05:51 +10:00
Daniel Karzel
1cdc23de32
Explicitly specify monero-wallet-rpc deamon port
In order to allow people to plug into public nodes / be more flexible with their own setup we now enforce specifying the monero daemon port to be used by the `monero-wallet-rpc`.
2021-05-14 09:50:52 +10:00
Philipp Hoenisch
26e0383e17
Apply suggestions from code review
Co-authored-by: Daniel Karzel <daniel.karzel@coblox.tech>
2021-05-11 16:06:44 +10:00
Philipp Hoenisch
c011e95062
Improve logging by adding details as fields instead of into the msg. 2021-05-11 15:27:53 +10:00
Thomas Eizinger
0970c2bc72
Initialize reqwest clients with verbose logging 2021-04-26 18:12:56 +10:00
Thomas Eizinger
6d06db3259
Use macro-based JSON-RPC client 2021-04-26 12:45:35 +10:00
rishflab
a3e85526c6 Specify LANG env variable for monero wallet rpc for unix systems
By specifying the language we can look for a specific string to check if
 monero wallet rpc is ready
2021-03-25 19:52:43 +11:00
rishflab
bc902ea63a Use language agnostic heuristic to check if monero_wallet_rpc is ready
Our strategy of searching for a english string to determine if
monero_wallet_rpc is ready is not compatible with languages other than
english. Instead we assume the monero rpc is ready if it has stopped
writing to stdout. We make a json rpc request to confirm this. A better
solution would have been to configure the monero_wallet_rpc to always
output in english but there is not command line argument to configure
the language.

Closes #353.
2021-03-25 18:13:06 +11:00
Thomas Eizinger
4138039ea0
Make sure all error messages start with an uppercase letter
These might potentially be shown to a user, let's make them all
consistent.
2021-03-05 15:49:15 +11:00
Thomas Eizinger
6d9b21cb47
Change imports_granularity to module
This reduces the overall amount of LoC that imports take up in our
codebase by almost 100.
It also makes merge-conflicts less likely because there is less
grouping together of imports that may lead to layout changes which
in turn can cause merge conflicts.
2021-03-04 14:48:13 +11:00
rishflab
bcdde021eb Add windows support to monero rpc installer 2021-03-02 15:09:12 +11:00
rishflab
27df9128be Bail if monero wallet rpc is not found in downloaded archive
Previously we were ignoring if the monero wallet rpc was not found and
unpacked from archive leading to a failure down the line when trying to
run a non-existent executable. Bail when the executable is no found in
the archive.
2021-03-02 15:09:12 +11:00
Thomas Eizinger
a82e82edd5
Tell the user about the monero-wallet-rpc download
Fixes #242.
2021-03-02 09:50:16 +11:00
rishflab
51c16f23d8
Download and run monero wallet rpc on swap cli startup
If the monero wallet rpc has not already been downloaded we download the monero cli package and extract the wallet rpc. The unneeded files are cleaned up. The monero wallet rpc is started on a random port which is provided to the swap cli.

We added a fork of tokio-tar via a git subtree because we needed a tokio-tar version that was compatible with tokio 1.0. Remove this subtree in favor of a regular cargo dependency when this PR merges: https://github.com/vorot93/tokio-tar/pull/3.
2021-02-25 11:21:41 +11:00