Bitcoin–Monero Cross-chain Atomic Swap
Go to file
bors[bot] ffb9693f4c
Merge #1056 #1066 #1067
1056: Bump time from 0.3.9 to 0.3.11 r=delta1 a=dependabot[bot]

Bumps [time](https://github.com/time-rs/time) from 0.3.9 to 0.3.11.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/time-rs/time/releases">time's releases</a>.</em></p>
<blockquote>
<h2>v0.3.11</h2>
<p>See the <a href="https://github.com/time-rs/time/blob/main/CHANGELOG.md">changelog</a> for details.</p>
<h2>v0.3.10</h2>
<p>See the <a href="https://github.com/time-rs/time/blob/main/CHANGELOG.md">changelog</a> for details.</p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/time-rs/time/blob/main/CHANGELOG.md">time's changelog</a>.</em></p>
<blockquote>
<h2>0.3.11 [2022-06-21]</h2>
<h3>Fixed</h3>
<ul>
<li><a href="https://github-redirect.dependabot.com/time-rs/time/issues/479">#479</a>: regression when parsing optional values with <code>serde</code></li>
<li><a href="https://github-redirect.dependabot.com/time-rs/time/issues/481">#481</a>: <code>Time</code> subtracted from <code>Time</code> can panic. This was caused by a bug that has always existed,
in that an internal invariant was not upheld. Memory safety was not violated.</li>
</ul>
<p><a href="https://github-redirect.dependabot.com/time-rs/time/issues/479">#479</a>: <a href="https://github-redirect.dependabot.com/time-rs/time/issues/479">time-rs/time#479</a>
<a href="https://github-redirect.dependabot.com/time-rs/time/issues/481">#481</a>: <a href="https://github-redirect.dependabot.com/time-rs/time/issues/481">time-rs/time#481</a></p>
<h2>0.3.10 [2022-06-19]</h2>
<h3>Added</h3>
<ul>
<li>Serde support for non-self-describing formats</li>
<li><code>Duration::unsigned_abs</code>, which returns a <code>std::time::Duration</code></li>
<li>ISO 8601 well-known format</li>
<li><code>Duration</code> can now be formatted with a <code>.N</code> specifier, providing a shorter representation when
using <code>Display</code>.</li>
<li>Parse <code>null</code> as <code>None</code> on serde structs</li>
</ul>
<h3>Fixed</h3>
<ul>
<li>Fix incorrect parsing of UTC offset in <code>Rfc3339</code>.</li>
</ul>
<h3>Changed</h3>
<ul>
<li>The minimum supported Rust version is now 1.57.0.</li>
<li>Performance for <code>Rfc2822</code> has been improved.</li>
<li>Debug assertions have been added in a few places. This should have no user facing impact, as it
only serves to catch bugs and is disabled in release mode.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="02a9d7ae63"><code>02a9d7a</code></a> Update changelog, v0.3.11 release</li>
<li><a href="80456cde85"><code>80456cd</code></a> Remove some debug assertions, use <code>Duration::new</code></li>
<li><a href="1e36fe2821"><code>1e36fe2</code></a> Revert change accepting some serde formats</li>
<li><a href="8b42f24fd6"><code>8b42f24</code></a> Update changelog, create release</li>
<li><a href="33bfe5cfe3"><code>33bfe5c</code></a> Add note about <code>#[serde(default)]</code>, quiet clippy</li>
<li><a href="b599d6634c"><code>b599d66</code></a> Parse nulls as None on nested serde structs (<a href="https://github-redirect.dependabot.com/time-rs/time/issues/473">#473</a>)</li>
<li><a href="e893d31f9b"><code>e893d31</code></a> Avoid unnecessary call to <code>format!</code></li>
<li><a href="eafddc56a8"><code>eafddc5</code></a> Fix RFC3339 offset parsing (<a href="https://github-redirect.dependabot.com/time-rs/time/issues/478">#478</a>)</li>
<li><a href="9a3f9856aa"><code>9a3f985</code></a> Run UI tests separately for coverage</li>
<li><a href="21b439f474"><code>21b439f</code></a> Add debug assertions</li>
<li>Additional commits viewable in <a href="https://github.com/time-rs/time/compare/v0.3.9...v0.3.11">compare view</a></li>
</ul>
</details>
<br />


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

You can trigger a rebase of this PR 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>

1066: Bump async-compression from 0.3.12 to 0.3.14 r=delta1 a=dependabot[bot]

Bumps [async-compression](https://github.com/Nemo157/async-compression) from 0.3.12 to 0.3.14.
<details>
<summary>Commits</summary>
<ul>
<li><a href="ada65c660b"><code>ada65c6</code></a> Merge <a href="https://github-redirect.dependabot.com/Nemo157/async-compression/issues/149">#149</a></li>
<li><a href="149c9f8648"><code>149c9f8</code></a> Bump version to 0.3.14</li>
<li><a href="286ff05053"><code>286ff05</code></a> Merge <a href="https://github-redirect.dependabot.com/Nemo157/async-compression/issues/148">#148</a></li>
<li><a href="e724673876"><code>e724673</code></a> Don't reinitialize on reader EOF for other implementations</li>
<li><a href="701a3a3451"><code>701a3a3</code></a> Add assertion that we do not read past EOF</li>
<li><a href="eb1d0cc2d3"><code>eb1d0cc</code></a> bufread::generic::Decoder: don't reinitialize on reader EOF</li>
<li><a href="6104f83f21"><code>6104f83</code></a> Merge <a href="https://github-redirect.dependabot.com/Nemo157/async-compression/issues/147">#147</a></li>
<li><a href="cf23c9b4d2"><code>cf23c9b</code></a> Migrate from cargo audit to cargo deny</li>
<li><a href="63ea354f9c"><code>63ea354</code></a> Add cargo-deny config</li>
<li><a href="33f0b716a9"><code>33f0b71</code></a> Remove unused futures-codec dependency</li>
<li>Additional commits viewable in <a href="https://github.com/Nemo157/async-compression/compare/0.3.12...0.3.14">compare view</a></li>
</ul>
</details>
<br />


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

You can trigger a rebase of this PR 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>

1067: Bump hyper from 0.14.18 to 0.14.20 r=delta1 a=dependabot[bot]

Bumps [hyper](https://github.com/hyperium/hyper) from 0.14.18 to 0.14.20.
<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.20</h2>
<h2>Bug Fixes</h2>
<ul>
<li><strong>http1:</strong> fix <code>http1_header_read_timeout</code> to use same future (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2891">#2891</a>) (<a href="c5a14e7c08">c5a14e7c</a>)</li>
</ul>
<h2>Features</h2>
<ul>
<li><strong>ext:</strong> support non-canonical HTTP/1 reason phrases (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2792">#2792</a>) (<a href="b2052a433f">b2052a43</a>)</li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/kianmeng"><code>`@​kianmeng</code></a>` made their first contribution in <a href="https://github-redirect.dependabot.com/hyperium/hyper/pull/2876">hyperium/hyper#2876</a></li>
<li><a href="https://github.com/Ticsmtc"><code>`@​Ticsmtc</code></a>` made their first contribution in <a href="https://github-redirect.dependabot.com/hyperium/hyper/pull/2889">hyperium/hyper#2889</a></li>
</ul>
<h2>v0.14.19</h2>
<h2>Bug Fixes</h2>
<ul>
<li><strong>http1:</strong> fix preserving header case without enabling ffi (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2820">#2820</a>) (<a href="6a35c175f2">6a35c175</a>)</li>
<li><strong>server:</strong> don't add implicit content-length to HEAD responses (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2836">#2836</a>) (<a href="67b73138f1">67b73138</a>)</li>
</ul>
<h2>Features</h2>
<ul>
<li><strong>server:</strong>
<ul>
<li>add <code>Connection::http2_max_header_list_size</code> option (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2828">#2828</a>) (<a href="a32658c1ae">a32658c1</a>, closes <a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2826">#2826</a>)</li>
<li>add <code>AddrStream::local_addr()</code> (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2816">#2816</a>) (<a href="ffbf610b16">ffbf610b</a>, closes <a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2773">#2773</a>)</li>
</ul>
</li>
</ul>
<h2>Breaking Changes</h2>
<ul>
<li><strong>ffi (unstable):</strong>
<ul>
<li><code>hyper_clientconn_options_new</code> no longer sets the <code>http1_preserve_header_case</code> connection option by default.
Users should now call <code>hyper_clientconn_options_set_preserve_header_case</code> if they desire that functionality. (<a href="78de8914ea">78de8914</a>)</li>
</ul>
</li>
</ul>
<h2>New Contributors ❤️</h2>
<ul>
<li><a href="https://github.com/SabrinaJewson"><code>`@​SabrinaJewson</code></a>` made their first contribution in <a href="https://github-redirect.dependabot.com/hyperium/hyper/pull/2775">hyperium/hyper#2775</a></li>
<li><a href="https://github.com/Some-Dood"><code>`@​Some-Dood</code></a>` made their first contribution in <a href="https://github-redirect.dependabot.com/hyperium/hyper/pull/2812">hyperium/hyper#2812</a></li>
<li><a href="https://github.com/liamwarfield"><code>`@​liamwarfield</code></a>` made their first contribution in <a href="https://github-redirect.dependabot.com/hyperium/hyper/pull/2798">hyperium/hyper#2798</a></li>
<li><a href="https://github.com/cuishuang"><code>`@​cuishuang</code></a>` made their first contribution in <a href="https://github-redirect.dependabot.com/hyperium/hyper/pull/2818">hyperium/hyper#2818</a></li>
<li><a href="https://github.com/jannes"><code>`@​jannes</code></a>` made their first contribution in <a href="https://github-redirect.dependabot.com/hyperium/hyper/pull/2836">hyperium/hyper#2836</a></li>
<li><a href="https://github.com/silence-coding"><code>`@​silence-coding</code></a>` made their first contribution in <a href="https://github-redirect.dependabot.com/hyperium/hyper/pull/2828">hyperium/hyper#2828</a></li>
<li><a href="https://github.com/nylonicious"><code>`@​nylonicious</code></a>` made their first contribution in <a href="https://github-redirect.dependabot.com/hyperium/hyper/pull/2762">hyperium/hyper#2762</a></li>
<li><a href="https://github.com/ryanrussell"><code>`@​ryanrussell</code></a>` made their first contribution in <a href="https://github-redirect.dependabot.com/hyperium/hyper/pull/2875">hyperium/hyper#2875</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/hyperium/hyper/blob/v0.14.20/CHANGELOG.md">hyper's changelog</a>.</em></p>
<blockquote>
<h3>v0.14.20 (2022-07-07)</h3>
<h4>Bug Fixes</h4>
<ul>
<li><strong>http1:</strong> fix <code>http1_header_read_timeout</code> to use same future (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2891">#2891</a>) (<a href="c5a14e7c08">c5a14e7c</a>)</li>
</ul>
<h4>Features</h4>
<ul>
<li><strong>ext:</strong> support non-canonical HTTP/1 reason phrases (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2792">#2792</a>) (<a href="b2052a433f">b2052a43</a>)</li>
</ul>
<h3>v0.14.19 (2022-05-27)</h3>
<h4>Bug Fixes</h4>
<ul>
<li><strong>http1:</strong> fix preserving header case without enabling ffi (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2820">#2820</a>) (<a href="6a35c175f2">6a35c175</a>)</li>
<li><strong>server:</strong> don't add implicit content-length to HEAD responses (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2836">#2836</a>) (<a href="67b73138f1">67b73138</a>)</li>
</ul>
<h4>Features</h4>
<ul>
<li><strong>server:</strong>
<ul>
<li>add <code>Connection::http2_max_header_list_size</code> option (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2828">#2828</a>) (<a href="a32658c1ae">a32658c1</a>, closes <a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2826">#2826</a>)</li>
<li>add <code>AddrStream::local_addr()</code> (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2816">#2816</a>) (<a href="ffbf610b16">ffbf610b</a>, closes <a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2773">#2773</a>)</li>
</ul>
</li>
</ul>
<h4>Breaking Changes</h4>
<ul>
<li><strong>ffi (unstable):</strong>
<ul>
<li><code>hyper_clientconn_options_new</code> no longer sets the <code>http1_preserve_header_case</code> connection option by default.
Users should now call <code>hyper_clientconn_options_set_preserve_header_case</code> if they desire that functionality. (<a href="78de8914ea">78de8914</a>)</li>
</ul>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="0ff6213be2"><code>0ff6213</code></a> v0.14.20</li>
<li><a href="128bc7f148"><code>128bc7f</code></a> chore(lib): bump MSRV to 1.56 (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2902">#2902</a>)</li>
<li><a href="c5a14e7c08"><code>c5a14e7</code></a> fix(http1): fix <code>http1_header_read_timeout</code> to use same future (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2891">#2891</a>)</li>
<li><a href="b2052a433f"><code>b2052a4</code></a> feat(ext): support non-canonical HTTP/1 reason phrases (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2792">#2792</a>)</li>
<li><a href="f12d4d4aa8"><code>f12d4d4</code></a> refactor(lib): resolve unused import (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2889">#2889</a>)</li>
<li><a href="4545c3ef19"><code>4545c3e</code></a> docs(proto): fix typos (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2876">#2876</a>)</li>
<li><a href="f8e2a83194"><code>f8e2a83</code></a> v0.14.19</li>
<li><a href="a929df843e"><code>a929df8</code></a> docs(various): fix typos in VISION and ROADMAP (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2875">#2875</a>)</li>
<li><a href="3a755a632d"><code>3a755a6</code></a> chore(lib): update <code>tokio-util</code> to <code>0.7</code> (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2762">#2762</a>)</li>
<li><a href="4678be9e81"><code>4678be9</code></a> docs(contrib): add guide for Triaging Issues</li>
<li>Additional commits viewable in <a href="https://github.com/hyperium/hyper/compare/v0.14.18...v0.14.20">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.18&new-version=0.14.20)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

You can trigger a rebase of this PR 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>
2022-07-28 13:08:00 +00:00
.cargo .cargo/config.toml for specifying linker 2021-03-15 14:36:05 +11:00
.github Merge #1051 #1052 2022-07-18 13:37:05 +00:00
docs Change example rendezvous node to /dns4/discover.unstoppableswap.net/tcp/8888/p2p/12D3Ko... 2022-04-22 14:51:37 +02:00
monero-harness Merge #975 2022-03-20 11:05:37 +00:00
monero-rpc Update dependencies and rust-toolchain to 1.59 2022-03-12 13:05:36 +02:00
monero-wallet Update dependencies and rust-toolchain to 1.59 2022-03-12 13:05:36 +02:00
swap fix: change logs to UTC due to bug in time crate 2022-07-26 14:16:41 +02:00
.gitignore fix: change logs to UTC due to bug in time crate 2022-07-26 14:16:41 +02:00
bors.toml Remove flaky test 2021-10-07 10:00:17 +11:00
Cargo.lock Merge #1056 #1066 #1067 2022-07-28 13:08:00 +00:00
Cargo.toml Update secp256kfun and rand to latest version 2021-05-25 15:35:13 +10:00
CHANGELOG.md fix: change logs to UTC due to bug in time crate 2022-07-26 14:16:41 +02:00
CONTRIBUTING.md Create CONTRIBUTING.md 2021-06-29 10:58:00 +10:00
dprint.json Update dprint plugins to fix CI error 2022-04-09 19:39:49 +02:00
LICENSE Change license to GPLv3 2020-10-12 17:13:25 +11:00
README.md Update dependencies and rust-toolchain to 1.59 2022-03-12 13:05:36 +02:00
rust-toolchain.toml Update dependencies and rust-toolchain to 1.59 2022-03-12 13:05:36 +02:00

XMR to BTC Atomic Swap

This repository hosts an MVP for atomically swapping BTC to XMR. It implements the protocol described in section 3 of this paper.

More information about the protocol in this presentation and this blog post.

Currently, swaps are only offered in one direction with the swap CLI on the buying side (send BTC, receive XMR). We are working on implementing a protocol where XMR moves first, but are currently blocked by advances on Monero itself. You can read this blogpost for more information.

Quick Start

  1. Download the latest swap binary release for your operating system.
  2. Find a seller to swap with:
./swap --testnet list-sellers
  1. Swap with a seller:
./swap --testnet buy-xmr --receive-address <YOUR MONERO ADDRESS> --change-address <YOUR BITCOIN CHANGE ADDRESS> --seller <SELLER MULTIADDRESS>

For more detailed documentation on the CLI, see this README.

Becoming a Market Maker

Swapping of course needs two parties - and the CLI is only one of them: The taker that occasionally starts a swap with a market maker.

If you are interested in becoming a market maker you will want to run the second binary provided in this repository: asb - the Automated Swap Backend. Detailed documentation for the asb can be found in this README.

Safety

This software is using cryptography that has not been formally audited. While we do our best to make it safe, it is up to the user to evaluate whether or not it is safe to use for their purposes. Please also see section 15 and 16 of the license.

Keep in mind that swaps are complex protocols, it is recommended to not do anything fancy when moving coins in and out. It is not recommended to bump fees when swapping because it can have unpredictable side effects.

Contributing

We are encourage community contributions whether it be a bug fix or an improvement to the documentation. Please have a look at the contribution guidelines.

Rust Version Support

Please note that only the latest stable Rust toolchain is supported. All stable toolchains since 1.58 should work.

Contact

Feel free to reach out to us in the COMIT-Monero Matrix channel.