Commit Graph

1937 Commits

Author SHA1 Message Date
dependabot[bot]
6badf09394
Bump bdk from 0.6.0 to 0.7.0
Bumps [bdk](https://github.com/bitcoindevkit/bdk) from 0.6.0 to 0.7.0.
- [Release notes](https://github.com/bitcoindevkit/bdk/releases)
- [Changelog](https://github.com/bitcoindevkit/bdk/blob/v0.7.0/CHANGELOG.md)
- [Commits](https://github.com/bitcoindevkit/bdk/compare/v0.6.0...v0.7.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-28 18:42:25 +10:00
bors[bot]
ed4a51981d
Merge #541
541: Bump rust_decimal from 1.13.0 to 1.14.1 r=thomaseizinger a=dependabot[bot]

Bumps [rust_decimal](https://github.com/paupino/rust-decimal) from 1.13.0 to 1.14.1.
<details>
<summary>Commits</summary>
<ul>
<li><a href="e346c59b35"><code>e346c59</code></a> Version 1.14.1</li>
<li><a href="91163c4a2f"><code>91163c4</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/paupino/rust-decimal/issues/386">#386</a> from paupino/issues/384</li>
<li><a href="3a4393012c"><code>3a43930</code></a> Replace negate with wrapping_neg to prevent overflow</li>
<li><a href="4b59f535fb"><code>4b59f53</code></a> Attempt to reproduce <a href="https://github-redirect.dependabot.com/paupino/rust-decimal/issues/384">#384</a></li>
<li><a href="1ea5b89f9e"><code>1ea5b89</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/paupino/rust-decimal/issues/385">#385</a> from paupino/feature/exp-underflow</li>
<li><a href="779de167bf"><code>779de16</code></a> Fix some unrelated documentation</li>
<li><a href="569f5b3b34"><code>569f5b3</code></a> Add test for panic conditions</li>
<li><a href="b7279d8a60"><code>b7279d8</code></a> Add in better logic for negative exp</li>
<li><a href="8b4f146ca7"><code>8b4f146</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/paupino/rust-decimal/issues/381">#381</a> from paupino/version/1.14.0</li>
<li><a href="93bed3c976"><code>93bed3c</code></a> Version 1.14.0</li>
<li>Additional commits viewable in <a href="https://github.com/paupino/rust-decimal/compare/1.13.0...1.14.1">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=rust_decimal&package-manager=cargo&previous-version=1.13.0&new-version=1.14.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-28 08:32:29 +00:00
bors[bot]
4a5e9d47b7
Merge #545
545: Release version 0.7.0 r=da-kami a=comit-botty-mc-botface

Hi @da-kami!

This PR was created in response to a manual trigger of the release workflow here: https://github.com/comit-network/xmr-btc-swap/actions/runs/884754906.
I've updated the changelog and bumped the versions in the manifest files in this commit: 7e6ff81efb.

Merging this PR will create a GitHub release and upload any assets that are created as part of the release build.

Co-authored-by: COMIT Botty McBotface <botty@coblox.tech>
2021-05-28 07:32:54 +00:00
COMIT Botty McBotface
7e6ff81efb Prepare release 0.7.0 2021-05-28 07:17:26 +00:00
bors[bot]
0cc98baa98
Merge #540
540: Bump hyper from 0.14.7 to 0.14.8 r=thomaseizinger a=dependabot[bot]

Bumps [hyper](https://github.com/hyperium/hyper) from 0.14.7 to 0.14.8.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/hyperium/hyper/releases">hyper's releases</a>.</em></p>
<blockquote>
<h2>v0.14.8</h2>
<h2>Features</h2>
<ul>
<li><strong>client:</strong> allow to config http2 max concurrent reset streams (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2535">#2535</a>) (<a href="b9916c4101">b9916c41</a>)</li>
<li><strong>error:</strong> add <code>Error::is_parse_too_large</code> and <code>Error::is_parse_status</code> methods (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2538">#2538</a>) (<a href="960a69a587">960a69a5</a>)</li>
<li><strong>http2:</strong>
<ul>
<li>Implement Client-side CONNECT support over HTTP/2 (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2523">#2523</a>) (<a href="5442b6fadd">5442b6fa</a>, closes <a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2508">#2508</a>)</li>
<li>allow HTTP/2 requests by ALPN when http2_only is unset (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2527">#2527</a>) (<a href="be9677a1e7">be9677a1</a>)</li>
</ul>
</li>
</ul>
<h2>Performance</h2>
<ul>
<li><strong>http2:</strong> reduce amount of adaptive window pings as BDP stabilizes (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2550">#2550</a>) (<a href="https://github.com/hyperium/hyper/commit/4cd06bf2">4cd06bf2</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/hyperium/hyper/blob/master/CHANGELOG.md">hyper's changelog</a>.</em></p>
<blockquote>
<h3>v0.14.8 (2021-05-25)</h3>
<h4>Features</h4>
<ul>
<li><strong>client:</strong> allow to config http2 max concurrent reset streams (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2535">#2535</a>) (<a href="b9916c4101">b9916c41</a>)</li>
<li><strong>error:</strong> add <code>Error::is_parse_too_large</code> and <code>Error::is_parse_status</code> methods (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2538">#2538</a>) (<a href="960a69a587">960a69a5</a>)</li>
<li><strong>http2:</strong>
<ul>
<li>Implement Client-side CONNECT support over HTTP/2 (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2523">#2523</a>) (<a href="5442b6fadd">5442b6fa</a>, closes <a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2508">#2508</a>)</li>
<li>allow HTTP/2 requests by ALPN when http2_only is unset (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2527">#2527</a>) (<a href="be9677a1e7">be9677a1</a>)</li>
</ul>
</li>
</ul>
<h4>Performance</h4>
<ul>
<li><strong>http2:</strong> reduce amount of adaptive window pings as BDP stabilizes (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2550">#2550</a>) (<a href="https://github.com/hyperium/hyper/commit/4cd06bf2">4cd06bf2</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="e61b494e3b"><code>e61b494</code></a> v0.14.8</li>
<li><a href="5442b6fadd"><code>5442b6f</code></a> feat(http2): Implement Client-side CONNECT support over HTTP/2 (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2523">#2523</a>)</li>
<li><a href="be9677a1e7"><code>be9677a</code></a> feat(http2): allow HTTP/2 requests by ALPN when http2_only is unset (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2527">#2527</a>)</li>
<li><a href="4cd06bf256"><code>4cd06bf</code></a> perf(http2): slow adaptive window pings as the BDP stabilizes (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2550">#2550</a>)</li>
<li><a href="960a69a587"><code>960a69a</code></a> feat(error): add <code>Error::is_parse_too_large</code> and <code>Error::is_parse_status</code> met...</li>
<li><a href="b9916c4101"><code>b9916c4</code></a> feat(client): allow to config http2 max concurrent reset streams (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2535">#2535</a>)</li>
<li><a href="ccba59fb1b"><code>ccba59f</code></a> docs(common): remove favicon doc from sync_wrapper module (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2548">#2548</a>)</li>
<li><a href="8a05f8eec1"><code>8a05f8e</code></a> docs(server): add bigger example to server module (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2539">#2539</a>)</li>
<li><a href="e79d09396d"><code>e79d093</code></a> docs(client): document the guarantees of cloning a <code>Client</code> (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2540">#2540</a>)</li>
<li><a href="d1d2f32a73"><code>d1d2f32</code></a> docs(headers): no_inline doc on HeaderMap (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2525">#2525</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/hyperium/hyper/compare/v0.14.7...v0.14.8">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=hyper&package-manager=cargo&previous-version=0.14.7&new-version=0.14.8)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-28 06:36:38 +00:00
dependabot[bot]
a0ce9ad0a0
Bump rust_decimal_macros from 1.13.0 to 1.14.1
Bumps [rust_decimal_macros](https://github.com/paupino/rust-decimal) from 1.13.0 to 1.14.1.
- [Release notes](https://github.com/paupino/rust-decimal/releases)
- [Commits](https://github.com/paupino/rust-decimal/compare/1.13.0...1.14.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-28 06:33:17 +00:00
dependabot[bot]
4c225074c6
Bump rust_decimal from 1.13.0 to 1.14.1
Bumps [rust_decimal](https://github.com/paupino/rust-decimal) from 1.13.0 to 1.14.1.
- [Release notes](https://github.com/paupino/rust-decimal/releases)
- [Commits](https://github.com/paupino/rust-decimal/compare/1.13.0...1.14.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-28 06:33:13 +00:00
bors[bot]
5385fc1aa0
Merge #531 #535
531: Bump thiserror from 1.0.24 to 1.0.25 r=thomaseizinger a=dependabot[bot]

Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.24 to 1.0.25.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/dtolnay/thiserror/releases">thiserror's releases</a>.</em></p>
<blockquote>
<h2>1.0.25</h2>
<ul>
<li>Support <code>error(transparent)</code> on errors containing a non-<code>'static</code> inner error (<a href="https://github-redirect.dependabot.com/dtolnay/thiserror/issues/113">#113</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="19cb5cee4b"><code>19cb5ce</code></a> Release 1.0.25</li>
<li><a href="e49c10f2ba"><code>e49c10f</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/dtolnay/thiserror/issues/134">#134</a> from dtolnay/nonstatic</li>
<li><a href="1ed8751081"><code>1ed8751</code></a> Support non-static AsDynError lifetimes</li>
<li><a href="51a1ff6593"><code>51a1ff6</code></a> Add regression test for issue 113</li>
<li><a href="ee2a47d3af"><code>ee2a47d</code></a> Adjust macro hygiene test formatting</li>
<li><a href="c610d97267"><code>c610d97</code></a> Update ui test suite to nightly-2021-05-14</li>
<li><a href="c10adbc25e"><code>c10adbc</code></a> Ignore manual_map clippy lint</li>
<li>See full diff in <a href="https://github.com/dtolnay/thiserror/compare/1.0.24...1.0.25">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=thiserror&package-manager=cargo&previous-version=1.0.24&new-version=1.0.25)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

535: Bitcoin network check when building PSBT r=da-kami a=da-kami

This ensures that funds are not sent to an address on the wrong network.

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Daniel Karzel <daniel@comit.network>
2021-05-28 06:16:59 +00:00
bors[bot]
1688d7e603
Merge #521 #543
521: Introduce dedicated ParseResult to simplify error handling in main r=da-kami a=thomaseizinger



543: Tell dependabot to stop automatically rebasing PRs r=thomaseizinger a=thomaseizinger

This interferes with bors trying to merge several PRs at once.

Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
2021-05-28 05:35:28 +00:00
Thomas Eizinger
76b81ac2c4
Tell dependabot to stop automatically rebasing PRs 2021-05-28 15:30:42 +10:00
Thomas Eizinger
51316d8183
Make it easier to create a bitcoin::Wallet for testing
Forcing the user to create an implementation of `EstimateFeeRate`
every time they want to create a wallet for testing is tedious and
leads to duplicated code.

The implementation for tests is rarely dynamic and thus can be
simplified to static arguments.

This also allows us to provide convenience constructors to make tests
that don't care about fees less distracting by reducing the number of
constants that are floating around.
2021-05-28 15:26:19 +10:00
Thomas Eizinger
229d840990
Introduce dedicated ParseResult to simplify error handling in main 2021-05-28 15:22:55 +10:00
Thomas Eizinger
d43ba33e15
Lift out Ok wrapping from match expression 2021-05-28 15:22:52 +10:00
Daniel Karzel
766ac706de
Application arg tests
Includes validation for given Bitcoin address against network.
2021-05-28 14:50:43 +10:00
bors[bot]
baf5a0896e
Merge #536
536: Switch to using stable Rust instead of nightly r=thomaseizinger a=thomaseizinger



Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
2021-05-28 04:47:26 +00:00
Daniel Karzel
202f6d1fa0
Bitcoin network check when building PSBT
This ensures that funds are not sent to an address on the wrong network.
2021-05-28 09:54:35 +10:00
bors[bot]
60d595f6c7
Merge #542
542: More resilient `MoneroWalletRpc` startup in the harness r=da-kami a=da-kami

Recently we se this problem on CI quite often:

```
 May 27 01:26:55.898  INFO testcontainers::core::wait_for_message: Found message after comparing 80 lines
May 27 01:27:00.858  INFO testcontainers::core::wait_for_message: Found message after comparing 2 lines
May 27 01:27:00.859  INFO monero_harness: Starting monerod: DQma_monerod
May 27 01:27:08.143  INFO testcontainers::core::wait_for_message: Found message after comparing 183 lines
May 27 01:27:08.204  INFO monero_harness: Starting miner wallet: miner
May 27 01:27:09.832  INFO testcontainers::core::wait_for_message: Found message after comparing 16 lines
May 27 01:27:12.261  INFO monero_harness: Starting wallet: alice
May 27 01:27:14.482  INFO testcontainers::core::wait_for_message: Found message after comparing 16 lines
thread 'alice_punishes_after_restart_if_bob_dead' panicked at 'called `Result::unwrap()` on an `Err` value: error sending request for url (http://127.0.0.1:49177/json_rpc): operation was canceled: connection closed before message completed
```

Given the message `connection closed before message completed` it is likely that the `monero-wallet-rpc` is not fully started yet.

Unfortunately we cannot wait to see a different message in the logs upon container startup, because there are just no further deterministic messages after the one we are currently listening on.

To overcome this problem without extending testcontainers we introduce a retry mechanism when creating the wallet.

Co-authored-by: Daniel Karzel <daniel@comit.network>
2021-05-27 23:52:52 +00:00
bors[bot]
c164f3d1f5
Merge #538
538: Add ping protocol to ensure connection is alive r=da-kami a=da-kami

Fixes #532 

Adds the ping behaviour to both ASB and CLI behaviour that periodically pings a connected party to ensure that the underlying network connection is still alive.
This fixes problems with long-running connections that become dead without a connection closure being reported back to the swarm.

Co-authored-by: Daniel Karzel <daniel@comit.network>
2021-05-27 07:28:45 +00:00
Daniel Karzel
5d3060a2e6
More resilient MoneroWalletRpc startup in the harness
Recently we se this problem on CI quite often:

```
 May 27 01:26:55.898  INFO testcontainers::core::wait_for_message: Found message after comparing 80 lines
May 27 01:27:00.858  INFO testcontainers::core::wait_for_message: Found message after comparing 2 lines
May 27 01:27:00.859  INFO monero_harness: Starting monerod: DQma_monerod
May 27 01:27:08.143  INFO testcontainers::core::wait_for_message: Found message after comparing 183 lines
May 27 01:27:08.204  INFO monero_harness: Starting miner wallet: miner
May 27 01:27:09.832  INFO testcontainers::core::wait_for_message: Found message after comparing 16 lines
May 27 01:27:12.261  INFO monero_harness: Starting wallet: alice
May 27 01:27:14.482  INFO testcontainers::core::wait_for_message: Found message after comparing 16 lines
thread 'alice_punishes_after_restart_if_bob_dead' panicked at 'called `Result::unwrap()` on an `Err` value: error sending request for url (http://127.0.0.1:49177/json_rpc): operation was canceled: connection closed before message completed
```

Given the message `connection closed before message completed` it is likely that the `monero-wallet-rpc` is not fully started yet.
Unfortunately we cannot wait to see a different message in the logs, because there are just no further deterministic messages after the one we are currently listening on.
to overcome this problem without extending testcontainers we introduce a retry mechanism when creating the wallet.
2021-05-27 17:03:06 +10:00
Daniel Karzel
c9064d5a37
Add ping protocol to ensure connection is alive
Adds the ping behaviour to both ASB and CLI behaviour that periodically pings a connected party to ensure that the underlying network connection is still alive.
This fixes problems with long-running connections that become dead without a connection closure being reported back to the swarm.
2021-05-27 11:19:27 +10:00
dependabot[bot]
44005fb757
Bump hyper from 0.14.7 to 0.14.8
Bumps [hyper](https://github.com/hyperium/hyper) from 0.14.7 to 0.14.8.
- [Release notes](https://github.com/hyperium/hyper/releases)
- [Changelog](https://github.com/hyperium/hyper/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hyperium/hyper/compare/v0.14.7...v0.14.8)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-26 06:11:46 +00:00
Thomas Eizinger
8f9d612af2
Change to stable Rust 1.52
Fix clippy warnings that are new in this version.
2021-05-25 16:11:49 +10:00
Thomas Eizinger
5d7acd39ee
Use new .toml extension for rust-toolchain file 2021-05-25 16:11:49 +10:00
Thomas Eizinger
694ade11d1
Replace cargo-fmt with dprint
If we want to use stable Rust, we can't use cargo-fmt with nightly
features.
2021-05-25 16:11:48 +10:00
Thomas Eizinger
b8cb9e1b8b
Update secp256kfun and rand to latest version
This will allow us to compile on stable Rust.
The latest version of `secp256kfun` uses `curve25519-dalek-ng` instead
of the original curve25519-dalek crate. Instead of converting back and
forth, we simply switch to this crate as well. Judging from the README
it is just a fork because there was trouble between the maintainers of
the original crate.
2021-05-25 15:35:13 +10:00
Thomas Eizinger
e79ac4563b
Delete unused code 2021-05-25 15:32:03 +10:00
bors[bot]
6743801c71
Merge #533
533: fix typo r=da-kami a=SamouraiDev



Co-authored-by: TDevD <dev@samouraiwallet.com>
2021-05-25 02:46:36 +00:00
bors[bot]
2a570058fa
Merge #528
528: Add the arm CLI build to the release binaries r=da-kami a=da-kami

Currently it is not shipped because we forgot to include it.
I don't see a reason not to ship that as well. @bonomat  and me tested it on a raspi last Friday :)

Co-authored-by: Daniel Karzel <daniel@comit.network>
2021-05-25 01:43:17 +00:00
TDevD
5da075f533 fix typo 2021-05-24 10:24:06 +02:00
Daniel Karzel
7dfe719e5f
Add the arm CLI build to the release binaries
Currently it is not shipped because we forgot to include it.
2021-05-24 17:54:27 +10:00
dependabot[bot]
78b29a944d
Bump thiserror from 1.0.24 to 1.0.25
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.24 to 1.0.25.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.24...1.0.25)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-24 07:35:20 +00:00
bors[bot]
ca6cb0a76a
Merge #527
527: Release version 0.6.0 r=da-kami a=comit-botty-mc-botface

Hi @da-kami!

This PR was created in response to a manual trigger of the release workflow here: https://github.com/comit-network/xmr-btc-swap/actions/runs/870083908.
I've updated the changelog and bumped the versions in the manifest files in this commit: 30b2cb467a8dde873da16cedf69f5b4ccbdb7508.

Merging this PR will create a GitHub release and upload any assets that are created as part of the release build.

Co-authored-by: Daniel Karzel <daniel@comit.network>
Co-authored-by: COMIT Botty McBotface <botty@coblox.tech>
2021-05-24 06:02:15 +00:00
COMIT Botty McBotface
3f2d094f65
Prepare release 0.6.0 2021-05-24 16:00:43 +10:00
Daniel Karzel
4804359ee3
Update ASB readme
Remove CLi defaults because they may get outdated very fast.
Recommendation to run own node.
Link to public bitcoin nodes as well.
2021-05-24 16:00:31 +10:00
Daniel Karzel
1de907b176
Change default Monero mainnet node to xmr.to
It appears to be more stable.
Encountered issues with the previous setup, `monero-wallet-rpc` logs:

```
2021-05-24 04:23:54.852	E !r. THROW EXCEPTION: tools::error::no_connection_to_daemon
2021-05-24 04:23:54.857	E Exception at while refreshing, what=no connection to daemon
```
2021-05-24 14:44:44 +10:00
bors[bot]
ded9ea1b79
Merge #525
525: Bitcoin transaction published state r=da-kami a=da-kami

This improves the error handling on the ASB.
Once the Bitcoin redeem transaction is seen in mempool, the state machine cannot transition to a cancel scenario anymore because at that point the CLI will have redeemed the Monero.
The additional state then waits for transaction finality and prevents re-publishing the transaction.

Co-authored-by: Daniel Karzel <daniel@comit.network>
2021-05-24 02:55:31 +00:00
bors[bot]
284733d359
Merge #522
522: Add support for arm architecture to Swap CLI r=da-kami a=bonomat

Tested locally on my RPI4

Co-authored-by: Philipp Hoenisch <philipp@hoenisch.at>
2021-05-24 01:58:57 +00:00
Daniel Karzel
01af9a5676
Bitcoin transaction published state
This improves the error handling on the ASB.
Once the Bitcoin redeem transaction is seen in mempool, the state machine cannot transition to a cancel scenario anymore because at that point the CLI will have redeemed the Monero.
The additional state then waits for transaction finality.
2021-05-24 10:53:14 +10:00
bors[bot]
bc27b9a47d
Merge #524
524: Update the README for mainnet r=da-kami a=da-kami



Co-authored-by: Daniel Karzel <daniel@comit.network>
2021-05-24 00:32:52 +00:00
Daniel Karzel
7a787fba6a
Update the README for mainnet 2021-05-24 10:31:51 +10:00
bors[bot]
db319d0a90
Merge #520
520: Cli json logging r=da-kami a=da-kami

Combining `--json` with the debug file logger was a pita, so I stopped and went for a simpler approach:

If `--json` is given we just log to terminal - **no** logfiles will be created in `{data-dir}/logs`. 
The `--debug` flag applies to `--json` (i.e. if not given it will just print json on info level). We could change that to automatically fallback to debug - could add a `required_if` dependency via strucopt/clap but I did not want to invest more time into thinking about this.

Note on extending binary functionality:
As discussed with @thomaseizinger recently, we will have to think about multiple binaries soon, i.e. a binary that focuses to be used to building on top of it (that always logs json) and potientially keeping a simple CLI that is more user friendly. This also goes towards more clearly separating the application code from re-usable protocol / network code. 


Co-authored-by: Daniel Karzel <daniel@comit.network>
2021-05-21 09:49:10 +00: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
bors[bot]
ba33e1acc1
Merge #519
519: Avoid application error upon `--help` r=da-kami a=da-kami

Our `preview` release is currently broken because of this issue.

The way we use clap's `get_matches_from_safe` caused parsing errors upon `--help` and `--version` to be bubbled up to the application - which causes the application to exit with an error when running `--help` and `--version`.
This is solved by using `get_matches_from` instead of `get_matches_from_safe` which handles these known clap commands internally and exits early. 

Added smoke tests to CI so we catch such kind of problems in the future. Smoke testing by calling `--help` is cheap and should be OK in CI.

Co-authored-by: Daniel Karzel <daniel@comit.network>
2021-05-21 05:43:24 +00:00
Daniel Karzel
fb9fb21c2b
CLI log statements to be more JSON friendly
Values to be logged as fields.
Upon starting a swap we print the swap-id as well.
2021-05-21 15:00:31 +10:00
Daniel Karzel
0187d9ef4f
Introduce --json flag for the CLI
When `--json` is used the CLI does not log to file, but only on the command line in json output.
2021-05-21 15:00:19 +10:00
bors[bot]
0032e820af
Merge #512
512: Bump libp2p from 0.37.1 to 0.38.0 r=thomaseizinger a=dependabot[bot]

Bumps [libp2p](https://github.com/libp2p/rust-libp2p) from 0.37.1 to 0.38.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/libp2p/rust-libp2p/releases">libp2p's releases</a>.</em></p>
<blockquote>
<h2>v0.38.0</h2>
<p>See individual <a href="https://github.com/libp2p/rust-libp2p/blob/HEAD/CHANGELOG.md">changelogs</a> for details.</p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/libp2p/rust-libp2p/blob/master/CHANGELOG.md">libp2p's changelog</a>.</em></p>
<blockquote>
<h2>Version 0.38.0 [2021-05-17]</h2>
<ul>
<li>Update individual crates.
<ul>
<li><code>libp2p-core</code></li>
<li><code>libp2p-gossipsub</code></li>
<li><code>libp2p-noise</code></li>
<li><code>libp2p-pnet</code></li>
<li><code>libp2p-wasm-ext</code></li>
</ul>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="0b7ee3fa92"><code>0b7ee3f</code></a> *: Prepare v0.38.0 (<a href="https://github-redirect.dependabot.com/libp2p/rust-libp2p/issues/2072">#2072</a>)</li>
<li><a href="c5bcada2c2"><code>c5bcada</code></a> protocols/gossipsub: Rework connection keep-alive (<a href="https://github-redirect.dependabot.com/libp2p/rust-libp2p/issues/2043">#2043</a>)</li>
<li><a href="9c5dd84099"><code>9c5dd84</code></a> build(deps): Update snow requirement from 0.7.1 to 0.8.0 (<a href="https://github-redirect.dependabot.com/libp2p/rust-libp2p/issues/2068">#2068</a>)</li>
<li><a href="1fdac073fc"><code>1fdac07</code></a> build(deps): Bump actions-rs/toolchain from 1 to 1.0.7 (<a href="https://github-redirect.dependabot.com/libp2p/rust-libp2p/issues/2069">#2069</a>)</li>
<li><a href="10fcc1c485"><code>10fcc1c</code></a> build(deps): Bump actions-rs/cargo from 1 to 1.0.3 (<a href="https://github-redirect.dependabot.com/libp2p/rust-libp2p/issues/2070">#2070</a>)</li>
<li><a href="82c8b1a4b3"><code>82c8b1a</code></a> build(deps): Bump actions/checkout from 2 to 2.3.4 (<a href="https://github-redirect.dependabot.com/libp2p/rust-libp2p/issues/2071">#2071</a>)</li>
<li><a href="43a8ad8fc2"><code>43a8ad8</code></a> protocols/relay/examples: Add client server instructions (<a href="https://github-redirect.dependabot.com/libp2p/rust-libp2p/issues/2060">#2060</a>)</li>
<li><a href="8988ac247e"><code>8988ac2</code></a> protocols/mdns: Fix discovered event emission. (<a href="https://github-redirect.dependabot.com/libp2p/rust-libp2p/issues/2065">#2065</a>)</li>
<li><a href="5c541a16f1"><code>5c541a1</code></a> build(deps): update salsa20 requirement from 0.7 to 0.8 (<a href="https://github-redirect.dependabot.com/libp2p/rust-libp2p/issues/2062">#2062</a>)</li>
<li><a href="d931f36428"><code>d931f36</code></a> transport/wasm-ext: Support dialing <code>Multiaddr</code> with <code>/p2p</code> protocol (<a href="https://github-redirect.dependabot.com/libp2p/rust-libp2p/issues/2058">#2058</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/libp2p/rust-libp2p/compare/v0.37.1...v0.38.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=libp2p&package-manager=cargo&previous-version=0.37.1&new-version=0.38.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-21 01:48:01 +00:00
Daniel Karzel
9ff29ae491
CLI --help and --version are handled correctly
Since we introduced our own parsing function for command line arguments, we have to make sure that clap's behaviour is handled correctly.
Clap's `get_matches_from_safe` returns an error of a certain kind, of which `ErrorKind::HelpDisplayed` and `ErrorKind::VersionDisplayed ` have to be handled to properly print the help/version and exit the program.
The clap error includes the message, so we print help/version in main now and ensure the program exits with `0` afterwards.
2021-05-21 11:46:11 +10:00
bors[bot]
014388bfaa
Merge #518
518: Fix bug that breaks swap ID for logging r=da-kami a=da-kami

Somehow I introduced this really stupid bug. Might have happened during a rebase. 

We create the swap id at the top of main.
Creating another id here breaks the name of the swap's logfile for the CLI, because the actual swap will have another id. 
Should definitely go in before releasing :)

Co-authored-by: Daniel Karzel <daniel@comit.network>
2021-05-20 08:28:16 +00:00