Commit Graph

41 Commits (113f2fa38524f3b4a477237174e2dffc1b459a2e)

Author SHA1 Message Date
bors[bot] 904312d1e9
Merge #313
313: Bump tracing-subscriber to 0.2.17 r=da-kami a=thomaseizinger

This release includes a bug-fix that removes an erroneous space
from our logs when running with `--debug`.

Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
3 years ago
Daniel Karzel 442c377490 Remove openssl dependency
Upgrade tokio-tungstenite to 0.14 and use feature flag rustls-tls
to get rid of the openssl dependency.
3 years ago
Thomas Eizinger a667c0ecd8
Bump tracing-subscriber to 0.2.17
This release includes a bug-fix that removes an erroneous space
from our logs when running with `--debug`.
3 years ago
Daniel Karzel 58c33f8468 Add asb to release including ARM build 3 years ago
Thomas Eizinger 5ce9e5662c
Update Cargo.lock for new version
I forgot about this in the last commit ...
3 years ago
rishflab bcdde021eb Add windows support to monero rpc installer 3 years ago
Thomas Eizinger f4827e3fa4
Improve time formatting of log output
Previously, the time was formatted as ISO8601 timestamps which is
barely readable by humans. Activating the `chrono` feature allows
us to format with a different format string. The output now looks
like this:

2021-03-01 11:59:52  DEBUG Database and seed will be stored in /home/thomas/.local/share/xmr-btc-swap
2021-03-01 11:59:52  DEBUG Starting monero-wallet-rpc on port 40673
2021-03-01 11:59:59  DEBUG Still got 0.00009235 BTC left in wallet, swapping ...
2021-03-01 11:59:59  DEBUG Dialing alice at 12D3KooWCdMKjesXMJz1SiZ7HgotrxuqhQJbP5sgBm2BwP1cqThi
2021-03-01 11:59:59  DEBUG Requesting quote for 0.00008795 BTC

There is a double space after the time which is already fixed in
tracing-subscriber but not yet released.

See https://github.com/tokio-rs/tracing/issues/1271.
3 years ago
Thomas Eizinger a82e82edd5
Tell the user about the monero-wallet-rpc download
Fixes #242.
3 years ago
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.
3 years ago
Daniel Karzel aed8358fb7 Remove dead code 3 years ago
Thomas Eizinger 33cf609020
Update bitcoin-harness to latest version
This finally removes the openssl dependency completely from our
dependency tree.
3 years ago
Thomas Eizinger 66db8e1851
Remove unnecessary log dependency
By updating `tracing_log`, we can access the re-export. That we need
to initialize the `tracing_log` adaptor.

The usage of `log::LevelFilter` for the `init_tracing` function was
conceptually incorrect. We should be using a type from the `tracing`
library here.
3 years ago
Thomas Eizinger 03078f328c
Split monero-harness into harness and rpc
This allows us to move `monero-harness` and `bitcoin-harness` into
`[dev-dependencies]` of `swap`.
3 years ago
Thomas Eizinger 2a3db9bd80
Remove unnecessary derivative dependency 3 years ago
Thomas Eizinger f0ba80794c
Remove unnecessary serde_derive dependency declaration
We already express the same thing through the serde `derive` feature.
3 years ago
Thomas Eizinger 729f4f09a8
Remove unnecessary tracing_core dependency 3 years ago
Thomas Eizinger 418aa02191
Remove unnecessary ed25519-dalek dependency 3 years ago
Franck Royer 92b3df4158 Introduce dynamic rates 3 years ago
Thomas Eizinger 2d8ede80e1
Use released version of backoff 3 years ago
Thomas Eizinger 84bc2c82b7
Upgrade to bdk 4.0
To achieve this we also:

- upgrade rust-bitcoin to 0.26
- upgrade bitcoin-harness to latest version (which also depends bitcoin 0.26)
- upgrade to latest edcsa-fun
- replace cross_curve_dleq proof with sigma_fun (to avoid an upgrade dance over there)
3 years ago
Thomas Eizinger 8c83f7e2e1
Upgrade to testcontainers v0.12 3 years ago
rishflab a0ef1f96ec Replace bitcoind wallet with bdk wallet
The bitcoind wallet required the user to run a bitcoind node. It was replaced with a bdk wallet which allows the user to connect to an electrum instance hosted remotely. An electrum and bitcoind testcontainer were created to the test the bdk wallet. The electrum container reads the blockdata from the bitcoind testcontainer through a shared volume. bitcoind-harness was removed as bitcoind initialisation code was moved into test_utils. The bdk wallet differs from the bitcoind wallet in that it needs to be manually synced with an electrum node. We synchronise the wallet once upon initialisation to prevent a potentially long running blocking task from interrupting protocol execution. The electrum HTTP API was used to get the latest block height and the transaction block height as this functionality was not present in the bdk wallet API or it required the bdk wallet to be re-synced to get an up to date value.
3 years ago
Franck Royer 60e0b9382c
Introduced from float API for Monero quantities 3 years ago
Daniel Karzel 0600a7048e Cancel command 3 years ago
Franck Royer 3fa4ffa82c
Implement new behaviour for execution setup 3 years ago
Daniel Karzel 802dc61e7e Configuration for RPC urls and Bitcoin wallet name 3 years ago
rishflab 77fc5743a2
Upgrade tokio to 1.0
Upgrade bitcoin harness dependency to latest commit

Upgrade backoff to fix failing tests. The previous version of backoff had a broken version of the retry function. Upgraded to a newer comit which fixes this problem.

Upgrade hyper to 0.14 as the 0.13 was bringing in tokio 0.2.24

Upgraded bitcoin harness to version that uses tokio 1.0 and reqwest 0.11

Upgrade reqwest to 0.11. Reqwest 0.11 uses tokio 1.0

Upgrade libp2p to 0.34 in preparation for tokio 1.0 upgrade
3 years ago
Daniel Karzel bfc388d264 Enable tracing in monero-harness 3 years ago
Daniel Karzel 0a21040e08 Deterministic peer id from seed for alice
This includes the introduction of the --data-dir parameter instead of the --database.
Both the seed file and the database are stored in the data-dir, the database in sub-folder `database`.
3 years ago
rishflab c900d12593 Merge xmr_btc crate
Created network, storage and protocol modules. Organised
files into the modules where the belong.

xmr_btc crate moved into isolated modulein swap crate.

Remove the xmr_btc module and integrate into swap crate.

Consolidate message related code

Reorganise imports

Remove unused parent Message enum

Remove unused parent State enum

Remove unused dependencies from Cargo.toml
3 years ago
Franck Royer 69e1c2bb27
Align Alice DB states with swap states 3 years ago
Franck Royer 638143a10d
Replace hard coded port by dynamic available one
Fixes #84.
3 years ago
Daniel Karzel 43d05935e7 Remove tor module 3 years ago
rishflab 9b7b44ceba Remove old refund test 4 years ago
Daniel Karzel 03b8e5f52e Upgrade CLI for mainnet test 4 years ago
Franck Royer 78674818c2
Upgrade bitcoin-harness 4 years ago
Franck Royer cfcd1e7170
Clean-up dep versions
- Use bitcoin-harness 0.2
- Use cross-curve-dleq latest master commit
4 years ago
Franck Royer 624716d8a7
Upgrade rust-bitcoin to 0.25 4 years ago
Franck Royer c3e43f50aa
Update bitcoin-harness to specific revision 4 years ago
Franck Royer 765482b0aa
Implement `wait_for_transaction_finality` 4 years ago
Franck Royer 62db4fb430
Push cargo lock to git as we are building a binary 4 years ago