Commit Graph

68 Commits (5a3675a06fcafe2dcc2ab9ff2c0096423362431c)

Author SHA1 Message Date
Byron Hambly 5a3675a06f
Update dependencies and rust-toolchain to 1.59
This commit updates the rust-toolchain to the current stable version
1.59, and fixes a number of new clippy warnings from that change.

Other changes:
    - updates backoff to 0.4
    - updates swap to 2021 edition
    - updates comfy-table to 5.0
    - updates monero-wallet to 2021 edition
    - updates moneor-harness to 2021 edition
    - updates bdk and rust_decimal
    - updates tokio-util to 0.7
    - updates workflow to use actions/setup-python@3
    - updates pem and serde_with
    - adds stable rust toolchain notice to readme
2 years ago
bors[bot] 637574af43
Merge #841 #846 #851 #880 #884 #885
841: Bump actions/checkout from 2.3.4 to 2.4.0 r=rishflab a=dependabot[bot]

Bumps [actions/checkout](https://github.com/actions/checkout) from 2.3.4 to 2.4.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/actions/checkout/releases">actions/checkout's releases</a>.</em></p>
<blockquote>
<h2>v2.4.0</h2>
<ul>
<li>Convert SSH URLs like <code>org-&lt;ORG_ID&gt;`@github.com:</code>` to <code>https://github.com/</code> - <a href="https://github-redirect.dependabot.com/actions/checkout/pull/621">pr</a></li>
</ul>
<h2>v2.3.5</h2>
<p>Update dependencies</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="ec3a7ce113"><code>ec3a7ce</code></a> set insteadOf url for org-id (<a href="https://github-redirect.dependabot.com/actions/checkout/issues/621">#621</a>)</li>
<li><a href="fd47087372"><code>fd47087</code></a> codeql should analyze lib not dist (<a href="https://github-redirect.dependabot.com/actions/checkout/issues/620">#620</a>)</li>
<li><a href="3d677ac575"><code>3d677ac</code></a> script to generate license info (<a href="https://github-redirect.dependabot.com/actions/checkout/issues/614">#614</a>)</li>
<li><a href="826ba42d6c"><code>826ba42</code></a> npm audit fix (<a href="https://github-redirect.dependabot.com/actions/checkout/issues/612">#612</a>)</li>
<li><a href="eb8a193c1d"><code>eb8a193</code></a> update dev dependencies and react to new linting rules (<a href="https://github-redirect.dependabot.com/actions/checkout/issues/611">#611</a>)</li>
<li><a href="c49af7ca1f"><code>c49af7c</code></a> Create codeql-analysis.yml (<a href="https://github-redirect.dependabot.com/actions/checkout/issues/602">#602</a>)</li>
<li><a href="1e204e9a92"><code>1e204e9</code></a> update licensed check (<a href="https://github-redirect.dependabot.com/actions/checkout/issues/606">#606</a>)</li>
<li><a href="0299a0d2b6"><code>0299a0d</code></a> update dist (<a href="https://github-redirect.dependabot.com/actions/checkout/issues/605">#605</a>)</li>
<li><a href="be0f448456"><code>be0f448</code></a> Bump ws from 5.2.2 to 5.2.3 (<a href="https://github-redirect.dependabot.com/actions/checkout/issues/604">#604</a>)</li>
<li><a href="56c00a7b1f"><code>56c00a7</code></a> Bump tmpl from 1.0.4 to 1.0.5 (<a href="https://github-redirect.dependabot.com/actions/checkout/issues/588">#588</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/actions/checkout/compare/v2.3.4...v2.4.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=2.3.4&new-version=2.4.0)](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>

846: Bump strum from 0.21.0 to 0.23.0 r=rishflab a=dependabot[bot]

Bumps [strum](https://github.com/Peternator7/strum) from 0.21.0 to 0.23.0.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/Peternator7/strum/blob/master/CHANGELOG.md">strum's changelog</a>.</em></p>
<blockquote>
<h2>0.23.0</h2>
<ul>
<li>
<p><a href="https://github-redirect.dependabot.com/Peternator7/strum/pull/185">#185</a> Adds the <code>FromRepr</code> derive that adds a <code>from_repr(x: usize) -&gt; Option&lt;Self&gt;</code>
method to your enum. This lets you convert integer values to your enum. If you specify a #[repr(..)] attribute on your enum, or use
an explicit discriminant, this will be incorporated into the derive.</p>
<ul>
<li><code>from_repr</code> will be <code>const</code> if you use a recent rust version.</li>
<li>This cannot be a trait method currently because only inherent methods support <code>const</code>.</li>
</ul>
</li>
<li>
<p><a href="https://github-redirect.dependabot.com/Peternator7/strum/pull/186">#186</a> Automatically implement <code>TryFrom&lt;str&gt;</code> for enums that implement <code>EnumString</code>.
This is only enabled for rustc &gt;= 1.34 which is when `TryFrom was stabilized.</p>
<ul>
<li>This is a small breaking change. If you had manually implemented <code>TryFrom&lt;str&gt;</code> for your enum, this will cause a conflict. You
can probably remove your manual implementation.</li>
</ul>
</li>
<li>
<p><a href="https://github-redirect.dependabot.com/Peternator7/strum/pull/189">#189</a> Use <code>core::result::Result</code> instead of <code>std::result::Result</code>. This should be
more portable in no-std environments.</p>
</li>
</ul>
<h2>0.22.0</h2>
<ul>
<li>
<p><a href="https://github-redirect.dependabot.com/Peternator7/strum/pull/180">#180</a>: Deprecates <code>ToString</code> derive. You should use <code>Display</code>
instead.</p>
</li>
<li>
<p><a href="https://github-redirect.dependabot.com/Peternator7/strum/pull/178">#178</a>: Deprecates AsStaticStr. This has been undocumented for a while.
The recommended method is to derive <code>IntoStaticStr</code> instead.</p>
</li>
<li>
<p><a href="https://github-redirect.dependabot.com/Peternator7/strum/pull/171">#171</a>: Improve <code>no-std</code> support.</p>
</li>
<li>
<p><a href="https://github-redirect.dependabot.com/Peternator7/strum/pull/170">#170</a>: enable changing the path to strum traits. This is necessary
if you re-export strum as a submodule in another crate.</p>
</li>
</ul>
<h2>0.21.1</h2>
<ul>
<li><a href="https://github-redirect.dependabot.com/Peternator7/strum/pull/164">#164</a> Improve compatibility with older versions of <code>syn</code>.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a href="https://github.com/Peternator7/strum/commits">compare view</a></li>
</ul>
</details>
<br />


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

851: Bump actions/setup-python from 2.2.2 to 2.3.1 r=rishflab a=dependabot[bot]

Bumps [actions/setup-python](https://github.com/actions/setup-python) from 2.2.2 to 2.3.1.
<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>Update actions/cache version to 1.0.8</h2>
<p>We have updated <a href="https://github.com/actions/toolkit/blob/main/packages/cache/RELEASES.md#108">actions/cache</a> dependency version to 1.0.8 to support 10GB cache upload</p>
<h2>Support caching dependencies</h2>
<p>This release introduces dependency caching support (<a href="https://github-redirect.dependabot.com/actions/setup-python/pull/266">actions/setup-python#266</a>)</p>
<h2>Caching dependencies.</h2>
<p>The action has a built-in functionality for caching and restoring pip/pipenv dependencies. The <code>cache</code> input is optional, and caching is turned off by default.</p>
<p>Besides, this release introduces dependency caching support for mono repos and repositories with complex structure.</p>
<p>By default, the action searches for the dependency file (requirements.txt for pip or Pipfile.lock for pipenv) in the whole repository. Use the <code>cache-dependency-path</code> input for cases when you want to override current behaviour and use different file for hash generation (for example requirements-dev.txt). This input supports wildcards or a list of file names for caching multiple dependencies.</p>
<h3>Caching pip dependencies:</h3>
<pre><code>steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
  with:
    python-version: '3.9'
    cache: 'pip'
- run: pip install -r requirements.txt
- run: pip test
</code></pre>
<h3>Caching pipenv dependencies:</h3>
<pre><code>steps:
- uses: actions/checkout@v2
- name: Install pipenv
  run: pipx install pipenv
- uses: actions/setup-python@v2
  with:
    python-version: '3.9'
    cache: 'pipenv'
- run: pipenv install
- run: pipenv test
</code></pre>
<h3>Change dependency file:</h3>
<pre><code>steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
  with:
    python-version: '3.9'
    cache: 'pip'
    cache-dependency-path: '**/requirements-dev.txt'
- run: pip install -r subdirectory/requirements-dev.txt
- run: pip test
&lt;/tr&gt;&lt;/table&gt; 
</code></pre>
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="f382193329"><code>f382193</code></a> Update <code>`@​actions/cache</code>` version to 1.0.8 (<a href="https://github-redirect.dependabot.com/actions/setup-python/issues/283">#283</a>)</li>
<li><a href="3ef38b826b"><code>3ef38b8</code></a> Create ADR for integrating cache functionality to setup-python action (<a href="https://github-redirect.dependabot.com/actions/setup-python/issues/247">#247</a>)</li>
<li><a href="0066b88440"><code>0066b88</code></a> Add a workflow to release a new version of the action (<a href="https://github-redirect.dependabot.com/actions/setup-python/issues/274">#274</a>)</li>
<li><a href="280924fbef"><code>280924f</code></a> Implementation of python's caching (<a href="https://github-redirect.dependabot.com/actions/setup-python/issues/266">#266</a>)</li>
<li><a href="52636cf49a"><code>52636cf</code></a> Fix consistency in README (<a href="https://github-redirect.dependabot.com/actions/setup-python/issues/250">#250</a>)</li>
<li><a href="ca5c59064f"><code>ca5c590</code></a> Update version for setup-python in package.json (<a href="https://github-redirect.dependabot.com/actions/setup-python/issues/264">#264</a>)</li>
<li><a href="feeaa3ba49"><code>feeaa3b</code></a> Add issue and pull request templates (<a href="https://github-redirect.dependabot.com/actions/setup-python/issues/258">#258</a>)</li>
<li><a href="002b1e4044"><code>002b1e4</code></a> Change python version for pypy in workflow files (<a href="https://github-redirect.dependabot.com/actions/setup-python/issues/259">#259</a>)</li>
<li><a href="d12543aa2a"><code>d12543a</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/actions/setup-python/issues/252">#252</a> from dmitry-shibanov/v-dmshib/update-dependencies</li>
<li><a href="4aa563ba8c"><code>4aa563b</code></a> update dependencies</li>
<li>Additional commits viewable in <a href="https://github.com/actions/setup-python/compare/v2.2.2...v2.3.1">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/setup-python&package-manager=github_actions&previous-version=2.2.2&new-version=2.3.1)](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>

880: Add `monero-recovery` command to print address + view/spend keys r=rishflab a=da-kami

This allows manual recovery of problems like https://github.com/comit-network/xmr-btc-swap/issues/537
Since we could not figure out what causes this issue, and it is most likely an upstream problem this is the best we can do so far to allow the user to manually interact with `monero-wallet-cli` or `monero-wallet-rpc`.

884: Bump pem from 1.0.0 to 1.0.1 r=rishflab a=dependabot[bot]

Bumps [pem](https://github.com/jcreekmore/pem-rs) from 1.0.0 to 1.0.1.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/jcreekmore/pem-rs/blob/master/CHANGELOG.md">pem's changelog</a>.</em></p>
<blockquote>
<h1>1.0.1</h1>
<ul>
<li>hide the ASCII_ARMOR symbol to work around a linking issue with 32-bit windows builds</li>
</ul>
<h1>1.0</h1>
<ul>
<li><code>pem::parse_many</code> now returns a <code>Result&lt;Vec&lt;Pem&gt;&gt;</code> instead of a <code>Vec&lt;Pem&gt;</code> that silently discarded invalid sections.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="20e9699def"><code>20e9699</code></a> (cargo-release) version 1.0.1</li>
<li><a href="5fa4dbdffb"><code>5fa4dbd</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/jcreekmore/pem-rs/issues/30">#30</a> from jcreekmore/refactor-ascii-armor</li>
<li><a href="fb15d5c679"><code>fb15d5c</code></a> hide the ASCII_ARMOR symbol</li>
<li><a href="4137641d44"><code>4137641</code></a> (cargo-release) start next development iteration 1.0.1-alpha.0</li>
<li>See full diff in <a href="https://github.com/jcreekmore/pem-rs/compare/v1.0.0...v1.0.1">compare view</a></li>
</ul>
</details>
<br />


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

885: Bump hyper from 0.14.13 to 0.14.16 r=rishflab a=dependabot[bot]

Bumps [hyper](https://github.com/hyperium/hyper) from 0.14.13 to 0.14.16.
<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.16</h2>
<h2>Features</h2>
<ul>
<li><strong>http2:</strong> add <code>http2_max_send_buf_size</code> option to client and server (<a href="bff977b73c">bff977b7</a>)</li>
<li><strong>server:</strong> add HTTP/1 header read timeout option (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2675">#2675</a>) (<a href="842c6553a5">842c6553</a>, closes <a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2457">#2457</a>)</li>
</ul>
<h2>Bug Fixes</h2>
<ul>
<li><strong>http1:</strong> return 414 when URI contains more than 65534 characters (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2706">#2706</a>) (<a href="5f938fffa6">5f938fff</a>, closes <a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2701">#2701</a>)</li>
<li><strong>http2:</strong> received <code>Body::size_hint()</code> now return 0 if implicitly empty (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2715">#2715</a>) (<a href="84b78b6c87">84b78b6c</a>)</li>
<li><strong>server:</strong> use case-insensitive comparison for Expect: 100-continue (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2709">#2709</a>) (<a href="7435cc3399">7435cc33</a>, closes <a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2708">#2708</a>)</li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/rajing"><code>`@​rajing</code></a>` made their first contribution in <a href="https://github-redirect.dependabot.com/hyperium/hyper/pull/2706">hyperium/hyper#2706</a></li>
<li><a href="https://github.com/JonathanMurray"><code>`@​JonathanMurray</code></a>` made their first contribution in <a href="https://github-redirect.dependabot.com/hyperium/hyper/pull/2709">hyperium/hyper#2709</a></li>
</ul>
<h2>v0.14.15</h2>
<h2>Bug Fixes</h2>
<ul>
<li><strong>client:</strong> cancel blocking DNS lookup if <code>GaiFuture</code> is dropped (<a href="https://github.com/hyperium/hyper/commit/174b553d">174b553d</a>)</li>
</ul>
<h2>Features</h2>
<ul>
<li><strong>http1:</strong> add <code>http1_writev(bool)</code> options to Client and Server builders, to allow forcing vectored writes (<a href="https://github.com/hyperium/hyper/commit/80627141">80627141</a>)</li>
<li><strong>upgrade:</strong> allow http upgrades with any body type (<a href="ab469eb3c6">ab469eb3</a>)</li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/luqmana"><code>`@​luqmana</code></a>` made their first contribution in <a href="https://github-redirect.dependabot.com/hyperium/hyper/pull/2680">hyperium/hyper#2680</a></li>
<li><a href="https://github.com/whentze"><code>`@​whentze</code></a>` made their first contribution in <a href="https://github-redirect.dependabot.com/hyperium/hyper/pull/2688">hyperium/hyper#2688</a></li>
<li><a href="https://github.com/ahmedsobeh"><code>`@​ahmedsobeh</code></a>` made their first contribution in <a href="https://github-redirect.dependabot.com/hyperium/hyper/pull/2689">hyperium/hyper#2689</a></li>
</ul>
<h2>v0.14.14</h2>
<h2>Bug Fixes</h2>
<ul>
<li><strong>client:</strong>
<ul>
<li>make ResponseFuture implement Sync (<a href="bd6c35b98f">bd6c35b9</a>)</li>
<li>remove ipv6 square brackets before resolving (<a href="910e02687d">910e0268</a>)</li>
</ul>
</li>
</ul>
<h2>Features</h2>
<ul>
<li><strong>http2:</strong> always include original h2 error on broken pipe (<a href="6169db250c">6169db25</a>)</li>
<li><strong>server:</strong> Remove Send + Sync requirement for Body in with_graceful_shutdown (<a href="1d553e52c6">1d553e52</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.16 (2021-12-09)</h3>
<h4>Bug Fixes</h4>
<ul>
<li><strong>http1:</strong> return 414 when URI contains more than 65534 characters (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2706">#2706</a>) (<a href="5f938fffa6">5f938fff</a>, closes <a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2701">#2701</a>)</li>
<li><strong>http2:</strong> received <code>Body::size_hint()</code> now return 0 if implicitly empty (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2715">#2715</a>) (<a href="84b78b6c87">84b78b6c</a>)</li>
<li><strong>server:</strong> use case-insensitive comparison for Expect: 100-continue (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2709">#2709</a>) (<a href="7435cc3399">7435cc33</a>, closes <a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2708">#2708</a>)</li>
</ul>
<h4>Features</h4>
<ul>
<li><strong>http2:</strong> add <code>http2_max_send_buf_size</code> option to client and server (<a href="bff977b73c">bff977b7</a>)</li>
<li><strong>server:</strong> add HTTP/1 header read timeout option (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2675">#2675</a>) (<a href="842c6553a5">842c6553</a>, closes <a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2457">#2457</a>)</li>
</ul>
<h3>v0.14.15 (2021-11-16)</h3>
<h4>Bug Fixes</h4>
<ul>
<li><strong>client:</strong> cancel blocking DNS lookup if <code>GaiFuture</code> is dropped (<a href="https://github.com/hyperium/hyper/commit/174b553d">174b553d</a></li>
</ul>
<h4>Features</h4>
<ul>
<li><strong>http1:</strong> add <code>http1_writev(bool)</code> options to Client and Server builders, to allow forcing vectored writes (<a href="https://github.com/hyperium/hyper/commit/80627141">80627141</a>)</li>
<li><strong>upgrade:</strong> allow http upgrades with any body type (<a href="ab469eb3c6">ab469eb3</a>)</li>
</ul>
<h3>v0.14.14 (2021-10-22)</h3>
<h4>Bug Fixes</h4>
<ul>
<li><strong>client:</strong>
<ul>
<li>make ResponseFuture implement Sync (<a href="bd6c35b98f">bd6c35b9</a>)</li>
<li>remove ipv6 square brackets before resolving (<a href="910e02687d">910e0268</a>)</li>
</ul>
</li>
</ul>
<h4>Features</h4>
<ul>
<li><strong>h2:</strong> always include original h2 error on broken pipe (<a href="6169db250c">6169db25</a>)</li>
<li><strong>server:</strong> Remove Send + Sync requirement for Body in with_graceful_shutdown (<a href="1d553e52c6">1d553e52</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="41dee4a79b"><code>41dee4a</code></a> v0.14.16</li>
<li><a href="bff977b73c"><code>bff977b</code></a> feat(http2): add <code>http2_max_send_buf_size</code> option to client and server</li>
<li><a href="84b78b6c87"><code>84b78b6</code></a> fix(http2): received <code>Body::size_hint()</code> now return 0 if implicitly empty (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2">#2</a>...</li>
<li><a href="ce8242571f"><code>ce82425</code></a> refactor(lib): resolve unused warnings from server-specific code (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2710">#2710</a>)</li>
<li><a href="7435cc3399"><code>7435cc3</code></a> fix(server): use case-insensitive comparison for Expect: 100-continue (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2709">#2709</a>)</li>
<li><a href="5f938fffa6"><code>5f938ff</code></a> fix(http1): return 414 when URI contains more than 65534 characters (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2706">#2706</a>)</li>
<li><a href="1010614a0d"><code>1010614</code></a> test(client): refactor client helper macro to handle options better</li>
<li><a href="842c6553a5"><code>842c655</code></a> feat(server): add HTTP/1 header read timeout option (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2675">#2675</a>)</li>
<li><a href="d0b1d9ed3a"><code>d0b1d9e</code></a> v0.14.15</li>
<li><a href="a1502e1067"><code>a1502e1</code></a> docs(http1): clarify HTTP1 preserve case option</li>
<li>Additional commits viewable in <a href="https://github.com/hyperium/hyper/compare/v0.14.13...v0.14.16">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.13&new-version=0.14.16)](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>
Co-authored-by: Daniel Karzel <daniel@comit.network>
2 years ago
Daniel Karzel df89ed68a9
Add `monero-recovery` command to print address + view/spend keys
This allows manual recovery of problems like https://github.com/comit-network/xmr-btc-swap/issues/537
Since we could not figure out what causes this issue, and it is most likely an upstream problem this is the best we can do so far to allow the user to manually interact with `monero-wallet-cli` or `monero-wallet-rpc`.
2 years ago
devbordecraft 250d25ada6 Fix electrum query failing (CloseNotify bug) and use a more stable mainnet electrum server. 2 years ago
rishflab d1f6739e59 Remove support for the sled database 3 years ago
bors[bot] 90bf702b99
Merge #805
805: Remove unused command line argument from the balance command r=rishflab a=rishflab

The target block is irrelevant when calculating the balance.

Closes #793 

Co-authored-by: rishflab <rishflab@hotmail.com>
3 years ago
rishflab 214730743f Remove unused command line argument from the balance command
The target block is irrelevant when calculating the balance.
3 years ago
rishflab e42812ba37 Add subcommand to print internal bitcoin wallet descriptor
Example:

 cargo run --package swap --bin swap -- export-bitcoin-wallet

{"descriptor":"wpkh(xprv9s21ZrQH143K2q85eUf2ppCtti2Zar6aDCW5dCC5DG9VvutJ3cpe3Qf9wZpQeraNf9JEuGem1RyJZQMEWCN2DpWyL5WbsvmSW6wbL7Jq53H/84'/0'/0'/0/*)","blockheight":0,"label":"cli-bitcoin"}
3 years ago
rishflab 394adb0a4f Add subcommand to print config
This subcommand has been introduced to make it easy for users to find
the location of the deprecated sled database in case they wish to delete
it. This feature should also resolve difficulties users were facing when
 trying to find where xmr-btc-swap was storing their data.
3 years ago
rishflab 05a28dc37a Add --sled flag to use deprecated sled db 3 years ago
rishflab f511ff093c Make --force the default behaviour for manual recovery
Remove the force flag. There is a resume command that tries to
gracefully restarts the protocol and tries to execute the happy path.
Remove e2e tests which test the --force flag.
3 years ago
devbordecraft f2df838a3c Allow withdrawing and viewing of the bitcoin balance on swap-cli 3 years ago
devbordecraft e8a6af1517 Allow withdrawing and viewing of the bitcoin balance on swap-cli
Fix formatting issue

Fix after review
3 years ago
Thomas Eizinger d21bd556ec
Remove rendezvous point default
This also fixes a bug where an empty string wasn't actually allowed
as a rendezvous point in the ASB's initial setup wizard.
3 years ago
bors[bot] 9fc53d3f84
Merge #615
615: Update default Monero node URLs and info r=thomaseizinger a=da-kami

xmr.to nodes are not served at the xmr.to domain but moved to melo.tools

Co-authored-by: Daniel Karzel <daniel@comit.network>
3 years ago
Daniel Karzel 0dc3943d9c
Update default Monero node URLs and info
xmr.to nodes are not served at the xmr.to domain but moved to melo.tools
3 years ago
Thomas Eizinger 94f089f4f2
Disallow Bitcoin legacy addresses
These cause problems during fee estimation.
3 years ago
Thomas Eizinger 367d75cab6
Reduce code duplication and make evaluation order determinisitic
The Rust compiler doesn't guarantee in which order field initialization
are executed. By extracting them, we can make sure they run in a certain
order. This will be important as we add more validations that can
fail.
3 years ago
Thomas Eizinger 714514edbc
Provide a commit-specific version output
For builds made directly on the tag, the output of `--version` will
not change. For builds not made on a tagged commit, the output will
look something like this:

```
> swap --version

swap 0.7.0-117-g93161f9
```

Fixes #409.
3 years ago
Thomas Eizinger 5c37fe6733
Make struct-opt docs more consistent
- Remove dots from the of help messages
- Unify wording
3 years ago
Thomas Eizinger 40eccd089f
Change `--data-dir` for `--data-base-dir` 3 years ago
Thomas Eizinger 3b1789fe07
Make things private if possible 3 years ago
Thomas Eizinger acfd2dd6bb
Store Monero receive address in database and load it on resume 3 years ago
Thomas Eizinger 5463bde4f8
Add a mandatory `--change-address` parameter to `buy-xmr`
Fixes #513.
3 years ago
Daniel Karzel ff10edd8a4
Add the `list-sellers` command to the CLI
This command uses a rendezvous node to find sellers (i.e. ASBs) and query them for quotes.
Sellers, that can be dialed and queried for a quote will be listed.
3 years ago
Thomas Eizinger ec4234fbb9
Merge `--seller-addr` and `--seller-peer-id` into `--seller` parameter
This simplifies the CLI's interface.
3 years ago
Thomas Eizinger 3aa028e3bf
Use or-pattern stabilized in Rust 1.53 where possible 3 years ago
Thomas Eizinger 229d840990
Introduce dedicated `ParseResult` to simplify error handling in main 3 years ago
Thomas Eizinger d43ba33e15
Lift out `Ok` wrapping from match expression 3 years ago
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
```
3 years ago
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.
3 years ago
Daniel Karzel 69cf12620d
Activate mainnet for the CLI
This includes testing CLI commandline args
Clap's `default_value_with` actually did not work on `Subcommand`s because the parent's flags were not picked up.
This was fixed by changing parameters dependent on testnet/mainnet to options.
This problem should have been detected by tests, that's why the command line parameter tests were finally (re-)added.

Thanks to @rishflab for some pre-work for this.
3 years ago
Daniel Karzel 1cdc23de32
Explicitly specify `monero-wallet-rpc` deamon port
In order to allow people to plug into public nodes / be more flexible with their own setup we now enforce specifying the monero daemon port to be used by the `monero-wallet-rpc`.
3 years ago
Daniel Karzel 343badbb4b
Remove duplication and cleanup
In the past we had problems with flags/parameter changes several times, where on instance was changed, buy another one was missed. This should mitigate this problem.
This patch introduces structs for all duplicated parameters and uses flatten to only have one point for changes.

Additionally removes all mentions of `alice` from the commands / variables. This code is on an application level and should not be concerned with swap protocol roles.
3 years ago
Daniel Karzel 4e1f3f82bd
Remove `param` from names
Did not add any value, more readable with just bitcoin and monero.
3 years ago
Daniel Karzel 657ac1e2e4
Bitcoin parameters that can be reused
Get rid of parameter duplication.
3 years ago
Daniel Karzel a489564857
Remove unused Electrum HTTP default URL 3 years ago
Philipp Hoenisch 0090e3b48e
Typo 3 years ago
Philipp Hoenisch 46e0449b8e
Add config/argument to swap/asb to configure bitcoin tx fees. 3 years ago
Daniel Karzel 69f7565746
!fixup Different default directories for CLI and ASB
Using the same default directory as data-/config-dir has caused unwanted side effects when running both applications on the same machine.
Use these directory names:
- ASB: xmr-btc-swap/asb
- CLI: xmr-btc-swap/cli

Since the functionality is now application specific the respective functions were moved into the appropriate module of the application.
3 years ago
Daniel Karzel b0ffeeab1d
Different default directories for CLI and ASB
Using the same default directory as data-/config-dir has caused unwanted side effects when running both applications on the same machine.
Use these directory names:
- ASB: xmr-btc-swap-asb
- CLI: xmr-btc-swap-cli

Since the functionality is now application specific the respective functions were moved into the appropriate module of the application.
3 years ago
Philipp Hoenisch 632293cf91
Add support for swapping through Tor.
This PR does a few things.
* It adds a TorTransport which either dials through Tor's socks5 proxy or via clearnet.
* It enables ASB to register hidden services for each network it is listening on. We assume that we only care about different ports and re-use the same onion-address for all of them. The ASB requires to have access to Tor's control port.
* It adds support to dial through a local Tor socks5 proxy. We assume that Tor is always available on localhost.  Swap cli only requires Tor to be running so that it can send messages via Tor's socks5 proxy.
* It adds a new e2e test which swaps through Tor. For this we assume that Tor is currently running on localhost. All other tests are running via clear net.
3 years ago
rishflab 9b0467d43a Remove default connection details from CLI
Connecting buyers to us by default is not consistent with our vision of
a decentralised network of sellers.

Closes #395
3 years ago
rishflab 7df93faa4b Remove unnecessary wrapper struct 3 years ago
Daniel Karzel d90496931b
Save Alice's peer-id in the db for Bob
This allows loading the seller-peer-id from the database upon resuming a swap.
Thus, the parameters `--seller-peer-id` is removed for the `resume` command.
Other than the peer-id the multi address of a seller can change and thus is
still a parameter. This parameter might become optional once we add DHT support.
3 years ago
Thomas Eizinger 393ed45b9e
Say who we are in the `--help` message
The message now says:

swap 0.3.0
The COMIT guys <hello@comit.network>
CLI for swapping BTC for XMR

USAGE:
    swap [FLAGS] [OPTIONS] <SUBCOMMAND>

...
3 years ago
Daniel Karzel 105e291e67 Update the application name for `--version` print
swap --version
xmr-btc-swap 0.3.0

asb --version
xmr-btc-asb 0.3.0
3 years ago
rishflab e5c0158597
Greatly reduce load onto the Electrum backend
We achieve our optimizations in three ways:

1. Batching calls instead of making them individually.

To get access to the batch calls, we replace all our
calls to the HTTP interface with RPC calls.

2. Never directly make network calls based on function
calls on the wallet.

Instead, inquiring about the status of a script always
just returns information based on local data. With every
call, we check when we last refreshed the local data and
do so if the data is considered to be too old. This
interval is configurable.

3. Use electrum's notification feature to get updated
with the latest blockheight.

Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
Co-authored-by: Rishab Sharma <rishflab@hotmail.com>
3 years ago
Daniel Karzel 0091b6cdaf Remove CLI config file in favour of parameters
The CLI has sensible default values for all parameters,
thus a config file is not really an advantage but just
keeps getting in our way, so re remove it.
3 years ago
rishflab f92a8ac300 Improve CLI help comments and "type" hints
The type hints are generated from the field names. This has the
unfortunate consequence of the config field becoming file_path which
does not really make sense people working on the codebase.
3 years ago