Commit Graph

1365 Commits

Author SHA1 Message Date
bors[bot]
2472d116a2
Merge #428
428: Change the public ASB to use the default port r=da-kami a=da-kami

I noticed that out public ASB is not using the configured default port for `tcp` connections. 
I don't know why that is, but I felt it would be better to update it to use the default port. I already opened port `9939` and closed `9876`.

This has the side-effect that releases prior to `0.4.0` will NOT just work upon startup anymore, because the ASB is not running on the auto-configured port anymore. I think that is a good thing, because the public ASB does not support these versions anymore. 

Co-authored-by: Daniel Karzel <daniel@comit.network>
2021-04-19 11:21:28 +00:00
dependabot[bot]
b88deee663
Bump rust_decimal from 1.10.3 to 1.11.0
Bumps [rust_decimal](https://github.com/paupino/rust-decimal) from 1.10.3 to 1.11.0.
- [Release notes](https://github.com/paupino/rust-decimal/releases)
- [Commits](https://github.com/paupino/rust-decimal/compare/1.10.3...1.11.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-19 09:22:57 +00:00
dependabot[bot]
9b6a29deae
Bump async-trait from 0.1.49 to 0.1.50
Bumps [async-trait](https://github.com/dtolnay/async-trait) from 0.1.49 to 0.1.50.
- [Release notes](https://github.com/dtolnay/async-trait/releases)
- [Commits](https://github.com/dtolnay/async-trait/compare/0.1.49...0.1.50)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-19 09:22:47 +00:00
dependabot[bot]
d1da15338a
Bump zip from 0.5.11 to 0.5.12
Bumps [zip](https://github.com/zip-rs/zip) from 0.5.11 to 0.5.12.
- [Release notes](https://github.com/zip-rs/zip/releases)
- [Commits](https://github.com/zip-rs/zip/compare/v0.5.11...v0.5.12)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-19 09:22:10 +00:00
Daniel Karzel
33623c3a68
Change the public ASB to use the default port 2021-04-19 12:26:48 +10:00
bors[bot]
56a23fa98f
Merge #426
426: Upgrade to bdk 0.6 r=thomaseizinger a=thomaseizinger



Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
2021-04-19 01:24:01 +00:00
Thomas Eizinger
39eea61538
Upgrade to bdk 0.6 2021-04-19 10:14:14 +10:00
bors[bot]
822997c0c3
Merge #425
425: Release version 0.5.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/757973547.
I've updated the changelog and bumped the versions in the manifest files in this commit: 43dc74cd9d.

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-04-17 09:53:41 +00:00
COMIT Botty McBotface
43dc74cd9d Prepare release 0.5.0 2021-04-17 07:23:09 +00:00
bors[bot]
730315da08
Merge #419
419: Update changelog for recent PRs merged r=da-kami a=thomaseizinger



Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
Co-authored-by: Daniel Karzel <daniel@comit.network>
2021-04-17 06:53:03 +00:00
Daniel Karzel
a114460520
Better wording 2021-04-17 16:51:41 +10:00
Thomas Eizinger
d1bc7e8fc2
Add changelog entry for redial fix 2021-04-17 16:50:49 +10:00
Thomas Eizinger
e957cbd909
Rewrite changelog entry as fix rather than a change 2021-04-17 16:39:01 +10:00
bors[bot]
02c94f6368
Merge #424
424: Update README.md r=thomaseizinger a=c22

--seller-multiaddr should  be --seller-addr

Co-authored-by: c22 <c22@users.noreply.github.com>
2021-04-17 03:59:41 +00:00
c22
206fc694b3
Update README.md
--seller-multiaddr should  be --seller-addr
2021-04-17 13:55:59 +10:00
bors[bot]
6c0dccba30
Merge #422
422: Websocket support r=da-kami a=da-kami

This allows us to request quotes via js-libp2p.

PoC used for testing: https://github.com/da-kami/js-libp2p-quote-poc

Thanks for all the input @thomaseizinger 😉

Co-authored-by: Daniel Karzel <daniel@comit.network>
2021-04-16 06:24:47 +00:00
Daniel Karzel
c1e993deb2
Json codec for quote protocol
A `RequestResponseCodec` for pull-based protocols where the response is encoded using JSON.
This was added to more properly express the behavior of the quote protocol, where the dialer
doesn't send any message and expects the listener to directly send the response.

Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
2021-04-16 16:00:45 +10:00
Daniel Karzel
f70e2aa8d6
Listen on tcp and websocket transports
- Listen on both tcp and websockets as default
- Listening addresses in config as array
- Configure fallback transport using `or_transport` - if listening on a given address fails on WS, we fall back to TCP.
2021-04-16 16:00:38 +10:00
bors[bot]
2e3f052417
Merge #408 #417
408: Improve error reporting of failed protocols r=thomaseizinger a=thomaseizinger

Instead of forwarding every error, we deliberately ignore certain
variants that are not worth being printed to the log. In particular,
this concerns "UnsupportedProtocols" and "ResponseOmission".

To make this less verbose we introduce a macro for mapping a
`RequestResponseEvent` to `{alice,bob}::OutEvent`. We use a macro
because those `OutEvent`s are different types and the only other
way of abstracting over them would be to introduce traits that we
implement on both of them.

To make the macro easier to use, we move all the `From` implementations
that convert between the protocol and the more high-level behaviour
into the actual protocol module.

417: Bump curve25519-dalek from 3.0.2 to 3.1.0 r=thomaseizinger a=dependabot[bot]

Bumps [curve25519-dalek](https://github.com/dalek-cryptography/curve25519-dalek) from 3.0.2 to 3.1.0.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/dalek-cryptography/curve25519-dalek/blob/main/CHANGELOG.md">curve25519-dalek's changelog</a>.</em></p>
<blockquote>
<h3>3.1.0</h3>
<ul>
<li>Add support for the Elligator2 encoding for Edwards points.</li>
<li>Add two optional formally-verified field arithmetic backends which
use the Fiat Crypto project's Rust code, which is generated from
proofs of functional correctness checked by the Coq theorem proving
system.</li>
<li>Add support for additional sizes of precomputed tables for basepoint
scalar multiplication.</li>
<li>Fix an unused import.</li>
<li>Add support for using the <code>zeroize</code> traits with all point types.
Note that points are not automatically zeroized on Drop, but that
consumers of <code>curve25519-dalek</code> should call these methods manually
when needed.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="2ea17d554a"><code>2ea17d5</code></a> Update CHANGELOG and README; bump to 3.1.0.</li>
<li><a href="5eca140010"><code>5eca140</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/dalek-cryptography/curve25519-dalek/issues/351">#351</a> from isislovecruft/fix/cleanup-elligator</li>
<li><a href="cecc821f40"><code>cecc821</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/dalek-cryptography/curve25519-dalek/issues/342">#342</a> from huitseeker/fiat4_with_u32</li>
<li><a href="35d4eab431"><code>35d4eab</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/dalek-cryptography/curve25519-dalek/issues/349">#349</a> from huitseeker/modernize_benchmarks</li>
<li><a href="b05feec7aa"><code>b05feec</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/dalek-cryptography/curve25519-dalek/issues/350">#350</a> from isislovecruft/develop</li>
<li><a href="0da8f08d65"><code>0da8f08</code></a> Maintain legacy 3.x support for lookup tables.</li>
<li><a href="ee90202a58"><code>ee90202</code></a> Trivial cleanups to Elligator2 encoding.</li>
<li><a href="d130b5f17e"><code>d130b5f</code></a> [benchmarks-only] Updates the benchmarks</li>
<li><a href="cc0c444fae"><code>cc0c444</code></a> Merge branch 'feature/dynamic-table-sizes' into develop</li>
<li><a href="1491f0db36"><code>1491f0d</code></a> Update copyright years.</li>
<li>Additional commits viewable in <a href="https://github.com/dalek-cryptography/curve25519-dalek/compare/3.0.2...3.1.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=curve25519-dalek&package-manager=cargo&previous-version=3.0.2&new-version=3.1.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: Thomas Eizinger <thomas@eizinger.io>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-15 09:06:36 +00:00
bors[bot]
20d94ea10b
Merge #415 #418
415: Bump tokio-util from 0.6.5 to 0.6.6 r=thomaseizinger a=dependabot[bot]

Bumps [tokio-util](https://github.com/tokio-rs/tokio) from 0.6.5 to 0.6.6.
<details>
<summary>Commits</summary>
<ul>
<li><a href="917aad684b"><code>917aad6</code></a> chore: prepare tokio-util 0.6.6 (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3696">#3696</a>)</li>
<li><a href="e366cf9b3e"><code>e366cf9</code></a> chore: upgrade loom to 0.5.0 (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3697">#3697</a>)</li>
<li><a href="3a02d34d3a"><code>3a02d34</code></a> sync: document that Semaphore is fair (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3693">#3693</a>)</li>
<li><a href="adad8fc3cd"><code>adad8fc</code></a> io: add a copy_bidirectional utility (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3572">#3572</a>)</li>
<li><a href="08f1b67fcb"><code>08f1b67</code></a> sync: add <code>mpsc::Sender::capacity</code> (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3690">#3690</a>)</li>
<li><a href="28d6879897"><code>28d6879</code></a> macros: forward input arguments in <code>#[tokio::test]</code> (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3691">#3691</a>)</li>
<li><a href="1a72b28f53"><code>1a72b28</code></a> rt: fix panic in JoinHandle::abort() when called from other thread (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3672">#3672</a>)</li>
<li><a href="1d5655272b"><code>1d56552</code></a> runtime: use Park::Error: Debug for better panic messages (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3641">#3641</a>)</li>
<li><a href="5513b6b825"><code>5513b6b</code></a> time: change 300ms to 1s in documentation (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3685">#3685</a>)</li>
<li><a href="787aca1826"><code>787aca1</code></a> net: implement IntoRawFd for TcpSocket (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3684">#3684</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/tokio-rs/tokio/compare/tokio-util-0.6.5...tokio-util-0.6.6">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tokio-util&package-manager=cargo&previous-version=0.6.5&new-version=0.6.6)](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>

418: Bump async-trait from 0.1.48 to 0.1.49 r=thomaseizinger a=dependabot[bot]

Bumps [async-trait](https://github.com/dtolnay/async-trait) from 0.1.48 to 0.1.49.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/dtolnay/async-trait/releases">async-trait's releases</a>.</em></p>
<blockquote>
<h2>0.1.49</h2>
<ul>
<li>Fix for use of <code>self::</code> as prefix of a path in expression position (<a href="https://github-redirect.dependabot.com/dtolnay/async-trait/issues/158">#158</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="fa92d1f8bc"><code>fa92d1f</code></a> Release 0.1.49</li>
<li><a href="797b6e8eaf"><code>797b6e8</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/dtolnay/async-trait/issues/160">#160</a> from dtolnay/self</li>
<li><a href="6029cbf375"><code>6029cbf</code></a> Preserve <code>self</code> as segment of path</li>
<li><a href="bb62922062"><code>bb62922</code></a> Add regression test for issue 158</li>
<li><a href="6bff4e0c59"><code>6bff4e0</code></a> Add to 'async' keyword on crates.io</li>
<li><a href="9f2acfc6ae"><code>9f2acfc</code></a> Update name of type alias impl trait feature in nightly</li>
<li><a href="25e8547d30"><code>25e8547</code></a> Remove recently stabilized min_const_generics feature gate</li>
<li><a href="12c51d210e"><code>12c51d2</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/dtolnay/async-trait/issues/157">#157</a> from dtolnay/tracingtest</li>
<li><a href="50d0b7ec4b"><code>50d0b7e</code></a> Remove unused tracing-futures dev dependency</li>
<li><a href="24afee4c72"><code>24afee4</code></a> Re-enable tracing attribute test</li>
<li>See full diff in <a href="https://github.com/dtolnay/async-trait/compare/0.1.48...0.1.49">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=async-trait&package-manager=cargo&previous-version=0.1.48&new-version=0.1.49)](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-04-15 08:49:28 +00:00
bors[bot]
c2d8edd1a0
Merge #407
407: Make Bob re-dial Alice if he ever loses the connection r=thomaseizinger a=thomaseizinger



Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
2021-04-14 23:54:19 +00:00
dependabot[bot]
ee0b22c1ab
Bump async-trait from 0.1.48 to 0.1.49
Bumps [async-trait](https://github.com/dtolnay/async-trait) from 0.1.48 to 0.1.49.
- [Release notes](https://github.com/dtolnay/async-trait/releases)
- [Commits](https://github.com/dtolnay/async-trait/compare/0.1.48...0.1.49)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-14 07:35:49 +00:00
dependabot[bot]
3e4c218799
Bump curve25519-dalek from 3.0.2 to 3.1.0
Bumps [curve25519-dalek](https://github.com/dalek-cryptography/curve25519-dalek) from 3.0.2 to 3.1.0.
- [Release notes](https://github.com/dalek-cryptography/curve25519-dalek/releases)
- [Changelog](https://github.com/dalek-cryptography/curve25519-dalek/blob/main/CHANGELOG.md)
- [Commits](https://github.com/dalek-cryptography/curve25519-dalek/compare/3.0.2...3.1.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-14 07:35:31 +00:00
bors[bot]
80b68d4b48
Merge #410
410: Bump futures from 0.3.13 to 0.3.14 r=thomaseizinger a=dependabot[bot]

Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.13 to 0.3.14.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/rust-lang/futures-rs/releases">futures's releases</a>.</em></p>
<blockquote>
<h2>0.3.14</h2>
<ul>
<li>Add <code>future::SelectAll::into_inner</code> (<a href="https://github-redirect.dependabot.com/rust-lang/futures-rs/issues/2363">#2363</a>)</li>
<li>Allow calling <code>UnboundedReceiver::try_next</code> after <code>None</code> (<a href="https://github-redirect.dependabot.com/rust-lang/futures-rs/issues/2369">#2369</a>)</li>
<li>Reexport non-Ext traits from the root of <code>futures_util</code> (<a href="https://github-redirect.dependabot.com/rust-lang/futures-rs/issues/2377">#2377</a>)</li>
<li>Add <code>AsyncSeekExt::stream_position</code> (<a href="https://github-redirect.dependabot.com/rust-lang/futures-rs/issues/2380">#2380</a>)</li>
<li>Add <code>stream::Peekable::{next_if, next_if_eq}</code> (<a href="https://github-redirect.dependabot.com/rust-lang/futures-rs/issues/2379">#2379</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md">futures's changelog</a>.</em></p>
<blockquote>
<h1>0.3.14 - 2021-04-10</h1>
<ul>
<li>Add <code>future::SelectAll::into_inner</code> (<a href="https://github-redirect.dependabot.com/rust-lang/futures-rs/issues/2363">#2363</a>)</li>
<li>Allow calling <code>UnboundedReceiver::try_next</code> after <code>None</code> (<a href="https://github-redirect.dependabot.com/rust-lang/futures-rs/issues/2369">#2369</a>)</li>
<li>Reexport non-Ext traits from the root of <code>futures_util</code> (<a href="https://github-redirect.dependabot.com/rust-lang/futures-rs/issues/2377">#2377</a>)</li>
<li>Add <code>AsyncSeekExt::stream_position</code> (<a href="https://github-redirect.dependabot.com/rust-lang/futures-rs/issues/2380">#2380</a>)</li>
<li>Add <code>stream::Peekable::{next_if, next_if_eq}</code> (<a href="https://github-redirect.dependabot.com/rust-lang/futures-rs/issues/2379">#2379</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="8aecdeb9bb"><code>8aecdeb</code></a> Release 0.3.14</li>
<li><a href="071a434191"><code>071a434</code></a> Link to modules instead of traits</li>
<li><a href="e0d378fc22"><code>e0d378f</code></a> Add stream::Peekable::{next_if, next_if_eq}</li>
<li><a href="a4a0e05392"><code>a4a0e05</code></a> Add AsyncSeekExt::stream_position</li>
<li><a href="698e09a3e4"><code>698e09a</code></a> Reexport non-Ext traits from the root of futures_util</li>
<li><a href="48347802f2"><code>4834780</code></a> Remove empty line from futures example</li>
<li><a href="e21659e0ea"><code>e21659e</code></a> Add Receiver::try_next return value descriptions</li>
<li><a href="caae2283ad"><code>caae228</code></a> Allow calling UnboundedReceiver::try_next after None</li>
<li><a href="53313b7e67"><code>53313b7</code></a> Add .editorconfig</li>
<li><a href="343e6c57d9"><code>343e6c5</code></a> Document results of UnboundedReceiver::try_next</li>
<li>Additional commits viewable in <a href="https://github.com/rust-lang/futures-rs/compare/0.3.13...0.3.14">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=futures&package-manager=cargo&previous-version=0.3.13&new-version=0.3.14)](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-04-14 02:46:05 +00:00
bors[bot]
2c13a90073
Merge #412
412: Bump actions/setup-python from v2.2.1 to v2.2.2 r=thomaseizinger a=dependabot[bot]

Bumps [actions/setup-python](https://github.com/actions/setup-python) from v2.2.1 to v2.2.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/actions/setup-python/releases">actions/setup-python's releases</a>.</em></p>
<blockquote>
<h2>v2.2.2</h2>
<p>Address PyPy installation issues on Windows: <a href="https://github-redirect.dependabot.com/actions/setup-python/issues/196">actions/setup-python#196</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="dc73133d4d"><code>dc73133</code></a> Fix PyPy installation on Windows to adopt new parameters format (<a href="https://github-redirect.dependabot.com/actions/setup-python/issues/201">#201</a>)</li>
<li><a href="a1121449a2"><code>a112144</code></a> Add on: pull_request trigger to CodeQL workflow (<a href="https://github-redirect.dependabot.com/actions/setup-python/issues/180">#180</a>)</li>
<li><a href="66319ca9fa"><code>66319ca</code></a> Use quotes around Python versions in README (<a href="https://github-redirect.dependabot.com/actions/setup-python/issues/175">#175</a>)</li>
<li>See full diff in <a href="https://github.com/actions/setup-python/compare/v2.2.1...dc73133d4da04e56a135ae2246682783cc7c7cb6">compare view</a></li>
</ul>
</details>
<br />


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-04-14 00:56:28 +00:00
dependabot[bot]
70a6894f80
Bump futures from 0.3.13 to 0.3.14
Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.13 to 0.3.14.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.13...0.3.14)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-14 00:47:04 +00:00
dependabot[bot]
2fd0732e6b
Bump tokio-util from 0.6.5 to 0.6.6
Bumps [tokio-util](https://github.com/tokio-rs/tokio) from 0.6.5 to 0.6.6.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-util-0.6.5...tokio-util-0.6.6)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-14 00:46:29 +00:00
Thomas Eizinger
b417950f99
Improve error reporting of failed protocols
Instead of forwarding every error, we deliberately ignore certain
variants that are not worth being printed to the log. In particular,
this concerns "UnsupportedProtocols" and "ResponseOmission".

To make this less verbose we introduce a macro for mapping a
`RequestResponseEvent` to `{alice,bob}::OutEvent`. We use a macro
because those `OutEvent`s are different types and the only other
way of abstracting over them would be to introduce traits that we
implement on both of them.

To make the macro easier to use, we move all the `From` implementations
that convert between the protocol and the more high-level behaviour
into the actual protocol module.
2021-04-14 10:34:06 +10:00
Thomas Eizinger
f0f7288bb6
Introduce a redial::Behaviour
This behaviour makes Bob re-dial Alice with an exponential backoff as
soon as the connection is lost.
2021-04-14 10:07:14 +10:00
Thomas Eizinger
d4c10a1292
Introduce swarm::{alice,bob} function to construct a Swarm instance 2021-04-14 10:06:32 +10:00
bors[bot]
0f21f28e1d
Merge #413 #414
413: Bump reqwest from 0.11.2 to 0.11.3 r=thomaseizinger a=dependabot[bot]

Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.11.2 to 0.11.3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/seanmonstar/reqwest/releases">reqwest's releases</a>.</em></p>
<blockquote>
<h2>v0.11.3</h2>
<ul>
<li>Add <code>impl From&lt;hyper::Body&gt; for reqwest::Body</code>.</li>
<li>(wasm) Add credentials mode methods to <code>RequestBuilder</code>.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md">reqwest's changelog</a>.</em></p>
<blockquote>
<h2>v0.11.3</h2>
<ul>
<li>Add <code>impl From&lt;hyper::Body&gt; for reqwest::Body</code>.</li>
<li>(wasm) Add credentials mode methods to <code>RequestBuilder</code>.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="7afade446c"><code>7afade4</code></a> v0.11.3</li>
<li><a href="43725ac1ee"><code>43725ac</code></a> Add wasm integration tests to CI (<a href="https://github-redirect.dependabot.com/seanmonstar/reqwest/issues/657">#657</a>) (<a href="https://github-redirect.dependabot.com/seanmonstar/reqwest/issues/1237">#1237</a>)</li>
<li><a href="7d8c32784e"><code>7d8c327</code></a> impl From&lt;hyper::Body&gt; for Body (<a href="https://github-redirect.dependabot.com/seanmonstar/reqwest/issues/1236">#1236</a>)</li>
<li><a href="1614c5ea64"><code>1614c5e</code></a> supports wasm fetch credentials</li>
<li><a href="81c0b6685a"><code>81c0b66</code></a> Up MSRV to 1.46.0</li>
<li><a href="97af751665"><code>97af751</code></a> Bump y18n from 4.0.0 to 4.0.1 in /examples/wasm_github_fetch (<a href="https://github-redirect.dependabot.com/seanmonstar/reqwest/issues/1232">#1232</a>)</li>
<li><a href="c6eb2c4fcb"><code>c6eb2c4</code></a> Fix typo in cookies.rs (<a href="https://github-redirect.dependabot.com/seanmonstar/reqwest/issues/1225">#1225</a>)</li>
<li><a href="29b15cb1d2"><code>29b15cb</code></a> Updated documentation in examples (<a href="https://github-redirect.dependabot.com/seanmonstar/reqwest/issues/1219">#1219</a>)</li>
<li><a href="dada01ef65"><code>dada01e</code></a> Fix unused lint for tokio's enter guard in blocking::wait (<a href="https://github-redirect.dependabot.com/seanmonstar/reqwest/issues/1223">#1223</a>)</li>
<li><a href="544282a0b4"><code>544282a</code></a> proxy: refactor a collapsible_match (<a href="https://github-redirect.dependabot.com/seanmonstar/reqwest/issues/1214">#1214</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/seanmonstar/reqwest/compare/v0.11.2...v0.11.3">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=reqwest&package-manager=cargo&previous-version=0.11.2&new-version=0.11.3)](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>

414: Bump tokio from 1.4.0 to 1.5.0 r=thomaseizinger a=dependabot[bot]

Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.4.0 to 1.5.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/tokio-rs/tokio/releases">tokio's releases</a>.</em></p>
<blockquote>
<h2>Tokio v1.5.0</h2>
<h1>1.5.0 (April 12, 2021)</h1>
<h3>Added</h3>
<ul>
<li>io: add <code>AsyncSeekExt::stream_position</code> (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3650">#3650</a>)</li>
<li>io: add <code>AsyncWriteExt::write_vectored</code> (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3678">#3678</a>)</li>
<li>io: add a <code>copy_bidirectional</code> utility (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3572">#3572</a>)</li>
<li>net: implement <code>IntoRawFd</code> for <code>TcpSocket</code> (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3684">#3684</a>)</li>
<li>sync: add <code>OnceCell</code> (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3591">#3591</a>)</li>
<li>sync: add <code>OwnedRwLockReadGuard</code> and <code>OwnedRwLockWriteGuard</code> (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3340">#3340</a>)</li>
<li>sync: add <code>Semaphore::is_closed</code> (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3673">#3673</a>)</li>
<li>sync: add <code>mpsc::Sender::capacity</code> (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3690">#3690</a>)</li>
<li>sync: allow configuring <code>RwLock</code> max reads (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3644">#3644</a>)</li>
<li>task: add <code>sync_scope</code> for <code>LocalKey</code> (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3612">#3612</a>)</li>
</ul>
<h3>Fixed</h3>
<ul>
<li>chore: try to avoid <code>noalias</code> attributes on intrusive linked list (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3654">#3654</a>)</li>
<li>rt: fix panic in <code>JoinHandle::abort()</code> when called from other threads (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3672">#3672</a>)</li>
<li>sync: don't panic in <code>oneshot::try_recv</code> (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3674">#3674</a>)</li>
<li>sync: fix notifications getting dropped on receiver drop (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3652">#3652</a>)</li>
</ul>
<h3>Documented</h3>
<ul>
<li>io: clarify requirements of <code>AsyncFd</code> (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3635">#3635</a>)</li>
<li>runtime: fix unclear docs for <code>{Handle,Runtime}::block_on</code> (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3628">#3628</a>)</li>
<li>sync: document that <code>Semaphore</code> is fair (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3693">#3693</a>)</li>
<li>sync: improve doc on blocking mutex (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3645">#3645</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="a5ee2f0d3d"><code>a5ee2f0</code></a> chore: prepare Tokio v1.5.0 (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3695">#3695</a>)</li>
<li><a href="917aad684b"><code>917aad6</code></a> chore: prepare tokio-util 0.6.6 (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3696">#3696</a>)</li>
<li><a href="e366cf9b3e"><code>e366cf9</code></a> chore: upgrade loom to 0.5.0 (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3697">#3697</a>)</li>
<li><a href="3a02d34d3a"><code>3a02d34</code></a> sync: document that Semaphore is fair (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3693">#3693</a>)</li>
<li><a href="adad8fc3cd"><code>adad8fc</code></a> io: add a copy_bidirectional utility (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3572">#3572</a>)</li>
<li><a href="08f1b67fcb"><code>08f1b67</code></a> sync: add <code>mpsc::Sender::capacity</code> (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3690">#3690</a>)</li>
<li><a href="28d6879897"><code>28d6879</code></a> macros: forward input arguments in <code>#[tokio::test]</code> (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3691">#3691</a>)</li>
<li><a href="1a72b28f53"><code>1a72b28</code></a> rt: fix panic in JoinHandle::abort() when called from other thread (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3672">#3672</a>)</li>
<li><a href="1d5655272b"><code>1d56552</code></a> runtime: use Park::Error: Debug for better panic messages (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3641">#3641</a>)</li>
<li><a href="5513b6b825"><code>5513b6b</code></a> time: change 300ms to 1s in documentation (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3685">#3685</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/tokio-rs/tokio/compare/tokio-1.4.0...tokio-1.5.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tokio&package-manager=cargo&previous-version=1.4.0&new-version=1.5.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-04-14 00:01:01 +00:00
bors[bot]
19766b9759
Merge #405
405: Concurrent swaps with same peer r=da-kami a=da-kami

Fixes #367 

- [x] Concurrent swaps with same peer

Not sure how much more time I should invest into this. We could just merge the current state and then do improvements on top...?

Improvements:

- [x] Think `// TODO: Remove unnecessary swap-id check` through and remove it
- [x] Add concurrent swap test, multiple swaps with same Bob
- [ ] Save swap messages without matching swap in execution in the database
- [ ] Assert the balances in the new concurrent swap tests
- [ ] ~~Add concurrent swap test, multiple swaps with different Bobs~~
- [ ] ~~Send swap-id in separate message, not on top of `Message0`~~

Co-authored-by: Daniel Karzel <daniel@comit.network>
2021-04-13 08:50:44 +00:00
Daniel Karzel
c976358c37
Multiple swaps with the same peer
- Swap-id is exchanged during execution setup. CLI (Bob) sends the swap-id to be used in his first message.
- Transfer poof and encryption signature messages include the swap-id so it can be properly associated with the correct swap.
- ASB: Encryption signatures are associated with swaps by swap-id, not peer-id.
- ASB: Transfer proofs are still associated to peer-ids (because they have to be sent to the respective peer), but the ASB can buffer multiple
- CLI: Incoming transfer proofs are checked for matching swap-id. If a transfer proof with a different swap-id than the current executing swap is received it will be ignored. We can change this to saving into the database.

Includes concurrent swap tests with the same Bob.

- One test that pauses and starts an additional swap after the transfer proof was received. Results in both swaps being redeemed after resuming the first swap.
- One test that pauses and starts an additional swap before the transfer proof is sent (just after BTC locked). Results in the second swap redeeming and the first swap being refunded (because the transfer proof on Bob's side is lost). Once we store transfer proofs that we receive during executing a different swap into the database both swaps should redeem.

Note that the monero harness was adapted to allow creating wallets with multiple outputs, which is needed for Alice.
2021-04-13 18:16:19 +10:00
dependabot[bot]
ba34843ec4
Bump tokio from 1.4.0 to 1.5.0
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.4.0 to 1.5.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.4.0...tokio-1.5.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-13 07:47:11 +00:00
dependabot[bot]
73a320c9e8
Bump reqwest from 0.11.2 to 0.11.3
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.11.2 to 0.11.3.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.11.2...v0.11.3)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-13 07:46:51 +00:00
dependabot[bot]
443e698a41
Bump actions/setup-python from v2.2.1 to v2.2.2
Bumps [actions/setup-python](https://github.com/actions/setup-python) from v2.2.1 to v2.2.2.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v2.2.1...dc73133d4da04e56a135ae2246682783cc7c7cb6)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-13 07:46:17 +00:00
Daniel Karzel
46f144ac67
Switch monero-rpc to debug in tests
To be able to see CI monero RPC errors.
2021-04-13 17:43:10 +10:00
Daniel Karzel
99268c2715
Workaround to avoid overflow in check_tx_key
`check_tx_key` can run into an overflow error when handling `-1` values for confirmations.
This most likely happens when a transaction is not in mempool yet.
In order to avoid unwanted side effects in the tests (i.e. failure because the transfer is seemingly confirmed, when it is not yet),
we add a guard that checks for values close to u64::MAX.
Note that we cannot check for the exact value of u64::MAX, because it seems that there is an addition somewhere in monerod/wallet-rpc,
that results in `-1` (first), `-2` (second) (...) until the transaction is in mempool.
2021-04-13 17:43:00 +10:00
Daniel Karzel
6c4d72704a
Correct debug log for check_tx_key 2021-04-13 16:35:27 +10:00
Daniel Karzel
ecebbb76b1
Prefix for wallet-rpc container name for concurrent tests
Past prefix cleanup removed too much.
The container name needs prefix, but the wallet names within the container do not!
2021-04-13 16:35:27 +10:00
Daniel Karzel
3fd77cbfb5
Upgrade to latest monero version 2021-04-13 16:35:27 +10:00
bors[bot]
2f19222948
Merge #397
397: Always log at debug level to file r=rishflab a=rishflab

WILL SQUASH DOWN TO 3 COMMITS WHEN APPROVED!

Log at debug level to file

EnvFilter is applied globally. This means you cannot log at INFO level 
to the terminal and at DEBUG level to log files. To get a around this 
limitation I had to implement the layer trait on a new type and filter 
in the on_event() trait method. Each swap has its own log file denoted 
by its swap_id. The logger appends to the existing file when resuming a 
swap.

Closes #278 


I think the `DebugTerminalPritner` and `InfoTerminalPrinter` could be consolidated with some effort with some generics wizardry. It works for now and I think it can be done later. I wish in general there was a cleaner way to do this.
 

Co-authored-by: rishflab <rishflab@hotmail.com>
2021-04-09 00:19:56 +00:00
bors[bot]
688364cb41
Merge #404
404: Generate from keys can fall back to opening wallet if already generated r=da-kami a=da-kami



Co-authored-by: Daniel Karzel <daniel@comit.network>
2021-04-08 09:25:09 +00:00
Daniel Karzel
489696ee08
Swap-id as file name for generated Monero wallet
Instead of using the private view-key as wallet filename we use the swap-id, to be able to identify which wallet is associated with which swap.
2021-04-08 19:23:54 +10:00
Daniel Karzel
548f057726
Try to open wallet in case generate_from_keys fails 2021-04-08 19:15:30 +10:00
Daniel Karzel
b60790a32c
Allow buffering multiple transfer proofs per peer
Allowing multiple swaps with the same peer requires buffering multiple transfer proofs per peer.
2021-04-08 17:02:18 +10:00
rishflab
8805002f96 Remove redundant noun from tracing initialiser functions 2021-04-08 16:14:32 +10:00
rishflab
9745d150e7 Log at debug level to file
EnvFilter is applied globally. This means you cannot log at INFO level
to the terminal and at DEBUG level to log files. To get a around this
limitation I had to implement the layer trait on a new type and filter
in the on_event() trait method. Each swap has its own log file denoted
by its swap_id. The logger appends to the existing file when resuming a
swap.

Closes #278
2021-04-08 16:10:35 +10:00
rishflab
e517c5934e Move asb tracing initializer to asb module 2021-04-08 10:51:54 +10:00
bors[bot]
bad6ca95e0
Merge #402
402: Update ASB docs r=thomaseizinger a=da-kami

- remove outdated known limitations
- link to latest release
- mention of resuming swap upon restart and Bitcoin commands

Co-authored-by: Daniel Karzel <daniel@comit.network>
2021-04-07 02:08:21 +00:00