416: Prefer automatic links in docs r=klochowicz a=klochowicz
Automatic links (wrapped inside <>) are automatically turned into clickable
links when you generate documentation
Gets rid of the warnings when you run `cargo doc`
Co-authored-by: Mariusz Klochowicz <mariusz@klochowicz.com>
414: Initialize Cfd actors outside of Rocket r=klochowicz a=klochowicz
Allows us to use `?` instead of unwrapping.
Co-authored-by: Mariusz Klochowicz <mariusz@klochowicz.com>
413: Remove all usages of `#[allow(dead_code)]` r=thomaseizinger a=thomaseizinger
This is a legacy from not having a library crate.
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
388: Bump reqwest from 0.11.5 to 0.11.6 r=thomaseizinger a=dependabot[bot]
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.11.5 to 0.11.6.
<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.6</h2>
<ul>
<li>(wasm) Fix request bodies more.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="59bc9a9323"><code>59bc9a9</code></a> v0.11.6</li>
<li><a href="136569802e"><code>1365698</code></a> Update <code>cookie_store</code> dependency (<a href="https://github-redirect.dependabot.com/seanmonstar/reqwest/issues/1268">#1268</a>)</li>
<li><a href="bd4e0c663c"><code>bd4e0c6</code></a> fmt: wasm body (<a href="https://github-redirect.dependabot.com/seanmonstar/reqwest/issues/1359">#1359</a>)</li>
<li><a href="d35c311e6d"><code>d35c311</code></a> Update async body doc (<a href="https://github-redirect.dependabot.com/seanmonstar/reqwest/issues/1357">#1357</a>)</li>
<li><a href="bb3d102108"><code>bb3d102</code></a> wasm: don't send request body as plain uint8 array (<a href="https://github-redirect.dependabot.com/seanmonstar/reqwest/issues/1358">#1358</a>)</li>
<li><a href="fead177093"><code>fead177</code></a> Fix body to <code>JsValue</code> conversion (<a href="https://github-redirect.dependabot.com/seanmonstar/reqwest/issues/1354">#1354</a>)</li>
<li><a href="c9217d8d1b"><code>c9217d8</code></a> fix: wasm client: pass response header to builder by reference (<a href="https://github-redirect.dependabot.com/seanmonstar/reqwest/issues/1350">#1350</a>)</li>
<li><a href="597833d906"><code>597833d</code></a> docs/comments: fix some typos (<a href="https://github-redirect.dependabot.com/seanmonstar/reqwest/issues/1346">#1346</a>)</li>
<li>See full diff in <a href="https://github.com/seanmonstar/reqwest/compare/v0.11.5...v0.11.6">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.5&new-version=0.11.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>
389: Bump serde_with from 1.10.0 to 1.11.0 r=thomaseizinger a=dependabot[bot]
Bumps [serde_with](https://github.com/jonasbb/serde_with) from 1.10.0 to 1.11.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/jonasbb/serde_with/releases">serde_with's releases</a>.</em></p>
<blockquote>
<h2>serde_with v1.11.0</h2>
<h3>Added</h3>
<ul>
<li>
<p>Serialize bytes as base64 encoded strings.<br />
The character set and padding behavior can be configured.</p>
<pre lang="rust"><code>// Rust
#[serde_as(as = "serde_with::base64::Base64")]
value: Vec<u8>,
#[serde_as(as = "Base64<Bcrypt, Unpadded>")]
bcrypt_unpadded: Vec<u8>,
<p>// JSON
"value": "SGVsbG8gV29ybGQ=",
"bcrypt_unpadded": "QETqZE6eT07wZEO",
</code></pre></p>
</li>
<li>
<p>The minimal supported Rust version (MSRV) is now specified in the <code>Cargo.toml</code> via the <code>rust-version</code> field. The field is supported in Rust 1.56 and has no effect on versions before.</p>
<p>More details: <a href="https://doc.rust-lang.org/nightly/cargo/reference/manifest.html#the-rust-version-field">https://doc.rust-lang.org/nightly/cargo/reference/manifest.html#the-rust-version-field</a></p>
</li>
</ul>
<h3>Fixed</h3>
<ul>
<li>Fixed RUSTSEC-2020-0071 in the <code>time</code> v0.1 dependency, but changing the feature flags of the <code>chrono</code> dependency. This should not change anything. Crates requiring the <code>oldtime</code> feature of <code>chrono</code> can enable it separately.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="0243453497"><code>0243453</code></a> Merge <a href="https://github-redirect.dependabot.com/jonasbb/serde_with/issues/380">#380</a></li>
<li><a href="30ec108368"><code>30ec108</code></a> Bump versions to 1.11.0 and 1.5.1</li>
<li><a href="1733ae56f3"><code>1733ae5</code></a> Merge <a href="https://github-redirect.dependabot.com/jonasbb/serde_with/issues/379">#379</a></li>
<li><a href="7a9dffe26d"><code>7a9dffe</code></a> chrono insecurly uses <code>localtime_r</code></li>
<li><a href="d91731b5f5"><code>d91731b</code></a> Remove default features from chrono to get rid of the oldtime feature</li>
<li><a href="a561ac5c0c"><code>a561ac5</code></a> Merge <a href="https://github-redirect.dependabot.com/jonasbb/serde_with/issues/377">#377</a></li>
<li><a href="69c9303a49"><code>69c9303</code></a> Only pin major version in actions</li>
<li><a href="75bfa5920b"><code>75bfa59</code></a> Merge <a href="https://github-redirect.dependabot.com/jonasbb/serde_with/issues/374">#374</a></li>
<li><a href="40df0508cb"><code>40df050</code></a> Specify the MSRV in the Cargo.toml</li>
<li><a href="bb1c03a9e2"><code>bb1c03a</code></a> Merge <a href="https://github-redirect.dependabot.com/jonasbb/serde_with/issues/373">#373</a></li>
<li>Additional commits viewable in <a href="https://github.com/jonasbb/serde_with/compare/v1.10.0...v1.11.0">compare view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=serde_with&package-manager=cargo&previous-version=1.10.0&new-version=1.11.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>
406: Added tests for matrix-solver r=thomaseizinger a=DeliciousHair
Added missing tests for `CSR::matrix_solve()` and fixed some
error handling in the process.
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: DelicioiusHair <mshepit@gmail.com>
408: Bump vergen from 5.1.15 to 5.1.16 r=thomaseizinger a=dependabot[bot]
Bumps [vergen](https://github.com/rustyhorde/vergen) from 5.1.15 to 5.1.16.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/rustyhorde/vergen/releases">vergen's releases</a>.</em></p>
<blockquote>
<h2>v5.1.6</h2>
<ul>
<li>Tightened the <code>chrono</code> dependency so it doesn't pull in child dependencies with rustsec issues.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="a3fbd6dc8b"><code>a3fbd6d</code></a> version bump for next release</li>
<li><a href="dc2430ffed"><code>dc2430f</code></a> Don't require old time dependency (<a href="https://github-redirect.dependabot.com/rustyhorde/vergen/issues/91">#91</a>)</li>
<li><a href="56083900f9"><code>5608390</code></a> clippy beta lint</li>
<li><a href="fac6fc261c"><code>fac6fc2</code></a> lints update</li>
<li><a href="cb6ff75275"><code>cb6ff75</code></a> removed non_exhaustive_omitted_patterns lint as moved to unstable</li>
<li><a href="2810fda305"><code>2810fda</code></a> lints</li>
<li><a href="5aca812e81"><code>5aca812</code></a> updated lints</li>
<li><a href="a0f266d1df"><code>a0f266d</code></a> lints update</li>
<li><a href="9196cfc133"><code>9196cfc</code></a> added daily workflow run to github</li>
<li><a href="8257d904b7"><code>8257d90</code></a> lint comment cleanup</li>
<li>Additional commits viewable in <a href="https://github.com/rustyhorde/vergen/compare/5.1.15...5.1.16">compare view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=vergen&package-manager=cargo&previous-version=5.1.15&new-version=5.1.16)](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>
366: Introduce taker ActorSystem r=klochowicz a=klochowicz
The connection actor is a real actor yet, however it should be enough to
abstract away from the production I/O.
Co-authored-by: Lucas Soriano del Pino <l.soriano.del.pino@gmail.com>
Co-authored-by: Mariusz Klochowicz <mariusz@klochowicz.com>
398: Don't fail for loops r=da-kami a=da-kami
We should not fail for loops where we loop over cfds to process state updates based on information we learned / restart.
We use a macro to wrap all fallible code in the loop to just print an error and continue.
Note: I went over the codebase in search of other for loops, maybe someone else can do another grep :)
Co-authored-by: Daniel Karzel <daniel@comit.network>
402: Revise Git dependencies r=thomaseizinger a=thomaseizinger
- Change to secp256k1-zkp upstream
- Patch secp256k1-zkp via root Cargo.toml
- Depend on latest upstream HEAD instead of fork
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
390: Fix precision of Usd and Percent to 2 decimal upon serialization r=thomaseizinger a=thomaseizinger
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
401: Taker cleans up order feed r=da-kami a=da-kami
fixes https://github.com/comit-network/hermes/issues/399
The first commit was mostly added for ensuring sanity - this should also help us for scenarios where we restart the taker and the maker sends over the same current order as before. Instead of bailing in `insert` we could handle this in a less intrusive way, because in some scenarios (as the one above) it is actually expected at the moment, so we might not want to treat it as error. For now I kept it simple and just bail (otherwise the insert would fail...) - that should not cause side effects.
Co-authored-by: Daniel Karzel <daniel@comit.network>
We have a 1:1 relationship (and the fact that we don't remove cfds) between cfd and order at the moment, so once the cfd was inserted we cannot creat another cfd for the same order.
Thus, we should remove the order from the feel by sending `None`.
395: Bail only if transaction does not make it on-chain r=luckysori a=luckysori
With bd15462af7 we no longer wrongly report an error when failing to broadcast a transaction because it's already on-chain. It's also a slight improvement imo.
Additionally, I tried to simplify this function with 3e8e6bc06e, which seems a lot better to me, but I could have missed something.
Co-authored-by: Lucas Soriano del Pino <l.soriano.del.pino@gmail.com>
392: Use fork for secp256k1-zkp r=bonomat a=bonomat
Because of bug in upstream library where the release build removes the actual computation of adaptor signatures
Co-authored-by: Philipp Hoenisch <philipp@hoenisch.at>
384: Refer to correct ID when joining orders r=thomaseizinger a=thomaseizinger
Co-authored-by: Daniel Karzel <daniel@comit.network>
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
380: Treat `InvalidOrderId` from maker as `Rejected` r=luckysori a=luckysori
If the maker tells the taker that the take request was for an invalid order ID, we should do something other than panic. For example,
logging and treating the situation as if the maker had rejected the take request.
Co-authored-by: Lucas Soriano del Pino <l.soriano.del.pino@gmail.com>
If the maker tells the taker that the take request was for an invalid
order ID, we should do something other than panic. For example,
logging and treating the situation as if the maker had rejected the
take request.
374: Validate sqlx insertions r=klochowicz a=klochowicz
Validate the insertions & add a new test to check cfd feed contents
Co-authored-by: Mariusz Klochowicz <mariusz@klochowicz.com>