454: Bump bdk from 0.12.0 to 0.13.0 r=klochowicz a=dependabot[bot]
Bumps [bdk](https://github.com/bitcoindevkit/bdk) from 0.12.0 to 0.13.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/bitcoindevkit/bdk/releases">bdk's releases</a>.</em></p>
<blockquote>
<h2>v0.13.0</h2>
<p>This release of BDK adds new the <code>Wallet::get_tx()</code> function which returns a single transactions made and received by the wallet. It also includes dependency updates to fix recent build and audit issues.</p>
<h2>What's Changed</h2>
<ul>
<li>Downgrade tiny-bip39 to version prior to 0.8.0 by <a href="https://github.com/notmandatory"><code>`@notmandatory</code></a>` in <a href="https://github-redirect.dependabot.com/bitcoindevkit/bdk/pull/444">bitcoindevkit/bdk#444</a></li>
<li>Release/0.12.0 by <a href="https://github.com/notmandatory"><code>`@notmandatory</code></a>` in <a href="https://github-redirect.dependabot.com/bitcoindevkit/bdk/pull/445">bitcoindevkit/bdk#445</a></li>
<li>Expose get_tx() method from <code>DB</code> to <code>Wallet</code> by <a href="https://github.com/rajarshimaitra"><code>`@rajarshimaitra</code></a>` in <a href="https://github-redirect.dependabot.com/bitcoindevkit/bdk/pull/443">bitcoindevkit/bdk#443</a></li>
<li>Pin ahash version to 0.7.4 for sqlite feature by <a href="https://github.com/notmandatory"><code>`@notmandatory</code></a>` in <a href="https://github-redirect.dependabot.com/bitcoindevkit/bdk/pull/449">bitcoindevkit/bdk#449</a></li>
<li>Make MemoryDatabase Send + Sync by <a href="https://github.com/artfuldev"><code>`@artfuldev</code></a>` in <a href="https://github-redirect.dependabot.com/bitcoindevkit/bdk/pull/448">bitcoindevkit/bdk#448</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/artfuldev"><code>`@artfuldev</code></a>` made their first contribution in <a href="https://github-redirect.dependabot.com/bitcoindevkit/bdk/pull/448">bitcoindevkit/bdk#448</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/bitcoindevkit/bdk/compare/v0.12.0...v0.13.0">https://github.com/bitcoindevkit/bdk/compare/v0.12.0...v0.13.0</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/bitcoindevkit/bdk/blob/v0.13.0/CHANGELOG.md">bdk's changelog</a>.</em></p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="5cb0726780"><code>5cb0726</code></a> Bump version to 0.13.0</li>
<li><a href="8781599740"><code>8781599</code></a> Switch back to rust-bitcoin/rust-bitcoincore-rpc</li>
<li><a href="ee8b992f8b"><code>ee8b992</code></a> Update dev-dependencies electrsd to 0.12</li>
<li><a href="a2e26f1b57"><code>a2e26f1</code></a> Pin version of <code>ureq</code> to maintain our MSRV</li>
<li><a href="5f5744e897"><code>5f5744e</code></a> Pin version of <code>backtrace</code> to maintain our MSRV</li>
<li><a href="e106136227"><code>e106136</code></a> [ci] Update the stable version to 1.56</li>
<li><a href="b638039655"><code>b638039</code></a> Fix CHANGELOG for Unreleased, v0.13.0</li>
<li><a href="7e085a86dd"><code>7e085a8</code></a> Bump version to 0.13.0-rc.1</li>
<li><a href="59f795f176"><code>59f795f</code></a> Make MemoryDatabase Send + Sync</li>
<li><a href="2da10382e7"><code>2da1038</code></a> Pin ahash version to 0.7.4 for sqlite feature</li>
<li>Additional commits viewable in <a href="https://github.com/bitcoindevkit/bdk/compare/v0.12.0...v0.13.0">compare view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=bdk&package-manager=cargo&previous-version=0.12.0&new-version=0.13.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>
462: Add `withdraw` subcommand to taker and maker r=da-kami a=da-kami
Withdraw is an optional subcommand of the network subcommand, so the command reads like this, e.g. taker:
`./taker mainnet withdraw --address ...`
Internally, we use the wallet actor for withdrawing for now (simplifies the implementation, otherwise we would have to extract the wallet construction outside the actor).
ToDo inside the wallet actor:
- [x] wallet drain if no amount is given
- [x] construct transaction based on amount and address
- [x] broadcast transaction and return `Txid`
Co-authored-by: Daniel Karzel <daniel@comit.network>
Withdraw is an optional subcommand of the network subcommand, so the command reads like this, e.g. taker:
`./taker mainnet withdraw --address ...`
Internally, we use the wallet actor for withdrawing for now (simplifies the implementation, otherwise we would have to extract the wallet construction outside the actor).
Fee rate can either be passed by user or is set to default fee rate of `1.0`.
We enable RBF (replace by fee) signalling so that users can bump the transaction fee.
371: Bump clap from 3.0.0-beta.4 to 3.0.0-beta.5 r=da-kami a=dependabot[bot]
Bumps [clap](https://github.com/clap-rs/clap) from 3.0.0-beta.4 to 3.0.0-beta.5.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/clap-rs/clap/blob/master/CHANGELOG.md">clap's changelog</a>.</em></p>
<blockquote>
<h2>v3.0.0-beta.5 (2021-10-18)</h2>
<h4>BREAKING CHANGES</h4>
<ul>
<li><strong>Renamed Features</strong>
<ul>
<li><code>unicode_help</code> to <code>unicode</code> to encompass more functionality</li>
</ul>
</li>
<li><strong>Gated behind features</strong>
<ul>
<li><code>App::replace</code> is now gated behind <code>unstable-replace</code></li>
</ul>
</li>
<li><strong>Removed <code>derive</code> requirement</strong>
<ul>
<li><code>clap::ArgEnum</code></li>
<li><code>clap::Args</code></li>
<li><code>clap::FromArgMatches</code></li>
<li><code>clap::IntoApp</code></li>
<li><code>clap::Subcommand</code></li>
</ul>
</li>
<li><strong>Renamed Traits</strong>
<ul>
<li><code>clap::Clap</code> => <code>clap::Parser</code></li>
</ul>
</li>
<li><strong>Renamed Methods</strong>
<ul>
<li><code>App::generate_usage</code> => <code>App::render_usage</code></li>
</ul>
</li>
<li><strong>Removed Settings</strong>
<ul>
<li><code>AppSettings::DisableVersionForSubcommands</code> is now default behaviour</li>
<li><code>AppSettings::ColoredHelp</code>: we are now relying solely on the <code>color</code> feature flag and <code>App::color</code> method</li>
<li><code>AppSettings::StrictUtf8</code> is now default behaviour</li>
<li><code>AppSettings::AllowInvalidUtf8</code> in favor of <code>ArgSettings::AllowInvalidUtf8</code></li>
<li><code>AppSettings::UnifiedHelpMessage</code> is now default behaviour</li>
<li><code>AppSettings::ColorAlways</code> in favor of <code>App::color</code></li>
<li><code>AppSettings::ColorNever</code> in favor of <code>App::color</code></li>
<li><code>AppSettings::ColorAuto</code> in favor of <code>App::color</code></li>
</ul>
</li>
<li><strong>Removed methods</strong>
<ul>
<li><strong>App</strong>
<ul>
<li><code>App::get_flags</code></li>
<li><code>App::get_positionals_with_no_heading</code></li>
<li><code>App::get_flags_with_no_heading</code></li>
<li><code>App::get_opts_with_no_heading</code></li>
<li><code>App::stop_custom_headings</code> in favor of <code>App:help_heading(None)</code></li>
</ul>
</li>
<li><strong>Error</strong>
<ul>
<li><code>Error::with_description</code> in favor of <code>App::error</code></li>
</ul>
</li>
<li><strong>ArgEnum</strong>
<ul>
<li><code>ArgEnum::as_arg</code> in favor of <code>ArgEnum::to_arg_value</code></li>
</ul>
</li>
<li><strong>clap_generate::Generator</strong>
<ul>
<li><code>Generator::all_subcommands</code></li>
<li><code>Generator::find_subcommand_with_path</code></li>
<li><code>Generator::subcommands</code></li>
<li><code>Generator::shorts_and_visible_aliases</code></li>
<li><code>Generator::longs_and_visible_aliases</code></li>
<li><code>Generator::flags</code></li>
</ul>
</li>
</ul>
</li>
<li><strong>Removed</strong>
<ul>
<li><code>ArgEnum::VARIANTS</code> in favor of <code>ArgEnum::value_variants</code></li>
</ul>
</li>
<li><strong>Deprecated</strong>
<ul>
<li><code>clap::clap_app!</code> in favor of other builders</li>
</ul>
</li>
<li><strong>Changed</strong></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a href="https://github.com/clap-rs/clap/commits">compare view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=clap&package-manager=cargo&previous-version=3.0.0-beta.4&new-version=3.0.0-beta.5)](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>
461: Add a feature flag to opt-in for long-running integration tests r=klochowicz a=klochowicz
This allows opting-in for longer-running tests by enabling "expensive_tests"
feature, instead of waiting for a few minutes after starting `cargo test`.
Amend the CI to run all the tests (including expensive ones) on every run.
Co-authored-by: Mariusz Klochowicz <mariusz@klochowicz.com>
This allows opting-in for longer-running tests by enabling "expensive_tests"
feature, instead of waiting for a few minutes after starting `cargo test`.
Amend the CI to run all the tests (including expensive ones) on every run.
452: Encrypt network communication using the noise protocol r=rishflab a=rishflab
The messages which contain CET's do not fit into the
65535 byte message size limit of the noise protocol.
These messages are chunked to allow compatibility
with noise.
More research is required into the NOISE_PARAMS and
whether they can be used to configure snow elegantly
handle authentication.
Co-authored-by: rishflab <rishflab@hotmail.com>
458: Roll-out usage of a mocking framework in actor tests r=klochowicz a=klochowicz
Mockall is a mocking framework that removes the need for writing more actors,
making tests easier to write.
Summary:
- add one more layer of indirection (a trait per actor type: Wallet, Oracle, Monitor)
- Mocks implementing the actor traits (with default stubbed implementations if no extra
behaviour needed)
- references to the mocks are being passed into the tests (via Arc<Mutex>>), allowing
for dynamically changing the behaviour and adding assertions. This also
aids readability, as the mock setup can be collocated with a particular
test, if the test needs something extra
Co-authored-by: Mariusz Klochowicz <mariusz@klochowicz.com>
Mockall is a mocking framework that removes the need for writing more actors,
making tests easier to write.
Summary:
- add one more layer of indirection (a trait per actor type: Wallet, Oracle, Monitor)
- Mocks implementing the actor traits (with default stubbed implementations if no extra
behaviour needed)
- references to the mocks are being passed into the tests (via Arc<Mutex>>), allowing
for dynamically changing the behaviour and adding assertions. This also
aids readability, as the mock setup can be collocated with a particular
test, if the test needs something extra
Fixes#450
The which do not fit into the 65535 byte message size
limit of the noise protocol are chunked before
encryption. This feature was introduced to handle the
very large messages which contained the CET's.
More research is required into the NOISE_PARAMS and
whether they can be used to configure snow elegantly
handle authentication.
432: Bump time from 0.3.3 to 0.3.4 r=da-kami a=dependabot[bot]
Bumps [time](https://github.com/time-rs/time) from 0.3.3 to 0.3.4.
<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.4 [2021-10-26]</h2>
<h3>Added</h3>
<ul>
<li><code>error::DifferentVariant</code> and <code>Error::DifferentVariant</code></li>
<li><code>impl From<Component> for FormatItem<'_></code></li>
<li><code>impl TryFrom<FormatItem<'_>> for Component</code></li>
<li><code>impl<'a> From<&'a [FormatItem<'_>]> for FormatItem<'a></code></li>
<li><code>impl<'a> TryFrom<FormatItem<'a>> for &[FormatItem<'a>]</code></li>
<li><code>impl PartialEq<Component> for FormatItem<'_></code></li>
<li><code>impl PartialEq<FormatItem<'_>> for Component</code></li>
<li><code>impl PartialEq<&[FormatItem<'_>]> for FormatItem<'_></code></li>
<li><code>impl PartialEq<FormatItem<'_>> for &[FormatItem<'_>]</code></li>
<li><code>impl TryFrom<Error> for error::TryFromParsed</code></li>
<li><code>impl TryFrom<Error> for error::Parse</code></li>
<li><code>impl TryFrom<Error> for error::ParseFromDescription</code></li>
<li><code>impl TryFrom<Error> for error::InvalidFormatDescription</code></li>
<li><code>impl TryFrom<Error> for error::IndeterminateOffset</code></li>
<li><code>impl TryFrom<Error> for error::Format</code></li>
<li><code>impl TryFrom<Error> for error::ConversionRange</code></li>
<li><code>impl TryFrom<Error> for error::ComponentRange</code></li>
<li><code>impl TryFrom<error::TryFromParsed> for error::ComponentRange</code></li>
<li><code>impl TryFrom<error::Parse> for error::TryFromParsed</code></li>
<li><code>impl TryFrom<error::Parse> for error::ParseFromDescription</code></li>
<li><code>impl TryFrom<error::Format> for std::io::Error</code></li>
<li><code>impl Sum for Duration</code></li>
<li><code>impl Sum<&Duration> for Duration</code></li>
<li>A <code>const fn default()</code> has been added to all modifiers that are <code>struct</code>s. These methods exist to
permit construction in <code>const</code> contexts and may be removed (without being considered a breaking
change) once <code>impl const Default</code> is stabilized.</li>
<li><code>FormatItem::Optional</code>, which will consume the contained value if present but still succeed
otherwise.</li>
<li><code>FormatItem::First</code>, which will consume the first successful parse, ignoring any prior errors.</li>
</ul>
<h3>Fixed</h3>
<ul>
<li>Cross-building to Windows now succeeds.</li>
<li>A parse error on a <code>UtcOffset</code> component now indicates the error comes from the offset.</li>
<li>Some arithmetic no longer panics in edge cases.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="8ec5f4ef2f"><code>8ec5f4e</code></a> v0.3.4 release</li>
<li><a href="9514bd0937"><code>9514bd0</code></a> Implement <code>FormatItem::First</code></li>
<li><a href="32ed115bb3"><code>32ed115</code></a> Fix error in changelog</li>
<li><a href="bcde313a74"><code>bcde313</code></a> Eliminate more panics in edge cases</li>
<li><a href="ea8e71c278"><code>ea8e71c</code></a> Avoid panics on checked, saturating arithmetic</li>
<li><a href="421788218e"><code>4217882</code></a> Fix error when parsing <code>UtcOffset</code></li>
<li><a href="974be79f42"><code>974be79</code></a> Update CI</li>
<li><a href="a28507f4d3"><code>a28507f</code></a> Lowercase lib name in Windows link attribute (<a href="https://github-redirect.dependabot.com/time-rs/time/issues/355">#355</a>)</li>
<li><a href="a63b31dbff"><code>a63b31d</code></a> Remove doc-hidden modifier default methods</li>
<li><a href="f850171132"><code>f850171</code></a> Lazily mutate <code>self</code> when parsing</li>
<li>Additional commits viewable in <a href="https://github.com/time-rs/time/compare/v0.3.3...v0.3.4">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.3&new-version=0.3.4)](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>
453: Actor test accept r=da-kami a=da-kami
passing accept test - might want to merge this work with `@klochowicz` work :)
draft for having a look. commits not cleaned up
Co-authored-by: Daniel Karzel <daniel@comit.network>
448: Revert "Encrypt network communication using the noise protocol" r=rishflab a=rishflab
Reverts comit-network/hermes#445
This PR broke hermes because noise does not support the massive messages that sent between the maker and taker
Co-authored-by: rishflab <rishflab@hotmail.com>
439: Send higher precision Usd and Price over the wire and trim it for the UI purposes r=klochowicz a=klochowicz
Fixes#438
Co-authored-by: Mariusz Klochowicz <mariusz@klochowicz.com>
Create newtypes for Price and Usd that are sent to the UI with 2 digits precision.
Store and send higher precision prices between maker and taker; currently 24
digits, it can be changed with one constant.
Round percents visible in the UI to single digit.
445: Encrypt network communication using the noise protocol r=rishflab a=rishflab
https://github.com/comit-network/hermes/pull/429 renamed the branch to accurately reflect what the PR was doing so I had to reopen the PR
moved the handshake implementation details into the noise module
Co-authored-by: rishflab <rishflab@hotmail.com>
446: Remove turbofish syntax when Rust can infer the type r=klochowicz a=klochowicz
Remove superfluous type annotations for readability
I decided to give it a shot... and it compiled. :)
Co-authored-by: Mariusz Klochowicz <mariusz@klochowicz.com>
442: Nanoseconds begone! r=DeliciousHair a=DeliciousHair
Created new Timestamp struct that only uses seconds (as i64 in order to play nice with both `sqlx` and `chrono`) and removed use of `SytemTime::now()` throughout in the process.
This PR addresses #352 but also had the effect of doing a better job of addressing #434, making #435 pointless.
Co-authored-by: DelicioiusHair <mshepit@gmail.com>
Created new Timestamp struct that only uses seconds (as i64 in order
to play nice with both sqlx and chrono) and removed use of SytemTime::now()
throughout in the process.
This PR addresses #352 but also had the effect of doing a better job of
addressing #434, making #435 pointless.
437: Test reject order r=da-kami a=da-kami
There is several improvements that can be done on top of this, but we can merge this work and go on from here.
I opted for writing specific helper functions for `next_cfd` and `next_order` that handle both maker and taker channel. I think that reads nicer and it makes it easier to use (internally it uses the generic impls so we avoid code duplication).
Co-authored-by: Daniel Karzel <daniel@comit.network>
444: Bump trybuild from 1.0.50 to 1.0.52 r=da-kami a=dependabot[bot]
Bumps [trybuild](https://github.com/dtolnay/trybuild) from 1.0.50 to 1.0.52.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/dtolnay/trybuild/releases">trybuild's releases</a>.</em></p>
<blockquote>
<h2>1.0.52</h2>
<ul>
<li>Display full path of test files (<a href="https://github-redirect.dependabot.com/dtolnay/trybuild/issues/139">#139</a>, thanks <a href="https://github.com/taiki-e"><code>`@taiki-e</code></a>)</li>`
</ul>
<h2>1.0.51</h2>
<ul>
<li>Strip line numbers from every file other than the one that was the argument to <code>fn compile_fail</code> (<a href="https://github-redirect.dependabot.com/dtolnay/trybuild/issues/136">#136</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="2ee6ca1e0e"><code>2ee6ca1</code></a> Release 1.0.52</li>
<li><a href="a71eef7eca"><code>a71eef7</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/dtolnay/trybuild/issues/139">#139</a> from taiki-e/path</li>
<li><a href="6170650b47"><code>6170650</code></a> Always display path of test files</li>
<li><a href="f74cd93e28"><code>f74cd93</code></a> Release 1.0.51</li>
<li><a href="0895db4ea7"><code>0895db4</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/dtolnay/trybuild/issues/138">#138</a> from dtolnay/inputfile</li>
<li><a href="ae88a100fc"><code>ae88a10</code></a> Link to issue 86 in dropshot test</li>
<li><a href="362c606914"><code>362c606</code></a> Set appropriate input path on test cases to match prev result</li>
<li><a href="9db3ce59d8"><code>9db3ce5</code></a> Strip line numbers outside of the one input file</li>
<li><a href="d8c5756cbe"><code>d8c5756</code></a> Add input file path to context for normalization</li>
<li><a href="db6e88014d"><code>db6e880</code></a> Add test for issue 136</li>
<li>See full diff in <a href="https://github.com/dtolnay/trybuild/compare/1.0.50...1.0.52">compare view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=trybuild&package-manager=cargo&previous-version=1.0.50&new-version=1.0.52)](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>
443: Bump syn from 1.0.80 to 1.0.81 r=da-kami a=dependabot[bot]
Bumps [syn](https://github.com/dtolnay/syn) from 1.0.80 to 1.0.81.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/dtolnay/syn/releases">syn's releases</a>.</em></p>
<blockquote>
<h2>1.0.81</h2>
<ul>
<li>Support arbitrary precision negative literal tokens on rustc 1.56+ (<a href="https://github-redirect.dependabot.com/dtolnay/syn/issues/1087">#1087</a>, <a href="https://github-redirect.dependabot.com/dtolnay/syn/issues/1088">#1088</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="6044282060"><code>6044282</code></a> Release 1.0.81</li>
<li><a href="f39a581ef7"><code>f39a581</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/dtolnay/syn/issues/1088">#1088</a> from dtolnay/literalparse</li>
<li><a href="0ca31d1e12"><code>0ca31d1</code></a> Delete lit overflow test</li>
<li><a href="793b1c395e"><code>793b1c3</code></a> Pull in proc-macro2 negative literal support</li>
<li><a href="36093340a3"><code>3609334</code></a> Link to rustc PR for negative literal parse</li>
<li><a href="a7eedc1e7e"><code>a7eedc1</code></a> Locally ignore unnecessary_wraps pedantic clippy lint</li>
<li><a href="d9a9ff4398"><code>d9a9ff4</code></a> Bypass negative literal workaround on 1.56+</li>
<li><a href="30984ec11f"><code>30984ec</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/dtolnay/syn/issues/1087">#1087</a> from dtolnay/literalparse</li>
<li><a href="0fda5ad1a0"><code>0fda5ad</code></a> Use 'FromStr for Literal' instead of TokenStream workaround</li>
<li><a href="68e7ab85ab"><code>68e7ab8</code></a> Suppress no_effect_underscore_binding pedantic Clippy lint in test suite</li>
<li>Additional commits viewable in <a href="https://github.com/dtolnay/syn/compare/1.0.80...1.0.81">compare view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=syn&package-manager=cargo&previous-version=1.0.80&new-version=1.0.81)](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>
433: Rename Buy and Sell to Long and Short r=da-kami a=DeliciousHair
Addresses #373. Change made for consistency of language and removes some ambiguity in the business logic as a side-effect.
Co-authored-by: DelicioiusHair <mshepit@gmail.com>
436: Consume both feeds in test r=da-kami a=da-kami
Minor changes on the test we already have. When creating another test I noticed that it reads nicer to just join on both channels. We might even pack the join into the `next` function at some point and return from both - I did not go that far yet.
Note that this is also closer to what we do in the production code, because we now send the message with `do_send_async` which is what we do there.
Co-authored-by: Daniel Karzel <daniel@comit.network>
440: Only transition maker to `ContractSetup` if we succeed to contract taker r=da-kami a=da-kami
Stumbled on this when writing actor tests.
We cannot create a failing test for this code at the moment, because our current test framework does not allow us to test at this granulairty level.
Nevertheless, we should fix this.
Rational:
If the maker is unable to contact the taker about the contract setup we fail now (previously we tried to continue).
This means, that we should only transition the maker's cfd to the new state if we are able to contact the maker.
Co-authored-by: Daniel Karzel <daniel@comit.network>
Stumbled on this when writing actor tests.
We cannot create a failing test for this code at the moment, because our current test framework does not allow us to test at this granulairty level.
Nevertheless, we should fix this.
Rational:
If the maker is unable to contact the taker about the contract setup we fail now (previously we tried to continue).
This means, that we should only transition the maker's cfd to the new state if we are able to contact the maker.
424: Rename `term` to `settlement_time_interval` and `announcement_lookahead` r=da-kami a=da-kami
Follow up for #419
Depending on the context, this makes it more explicit what we mean by `term` in the context of the `Cfd` and the `Oracle`.
Co-authored-by: Daniel Karzel <daniel@comit.network>
405: Fix price type r=da-kami a=DeliciousHair
Replacement of structs with public data to ones with private data
Addresses #357 and #365. Although not a very large change, this PR ends up touching rather a lot of code.
* Converted types `Usd`, `Leverage` and `Percent` to something that is appropriate to this application
* Created new types `Price` and `InversePrice` to use for BTC/USD exchange rate with appropriate algebraic ops implemented as well.
* Added new positive tests
* The function `daemon::model::calculate_profit()` has been changed substantially as the updated types make the existing workflow needlessly complex
* Some tests (mostly in `cfd.rs` required updating) in order to make use of the new types.
* Minor edit to `.gitignore` to avoid accidental pushing of DB to repository--should have been it's own item, added here to fix a problem that arose during this work.
NOTE:
* There may be an excess of algebraic ops implemented, some pruning may be appropriate.
Co-authored-by: DelicioiusHair <mshepit@gmail.com>
Addresses #357 and #365. Although not a very large change, this PR ends up touching rather a lot of code.
* Converted types `Usd`, `Leverage` and `Percent` to something that is appropriate to this application
* Created new types `Price` and `InversePrice` to use for BTC/USD exchange rate with appropriate algebraic ops implemented as well.
* Added new positive tests
* The function `daemon::model::calculate_profit()` has been changed substantially as the updated types make the existing workflow needlessly complex
* Some tests (mostly in `cfd.rs` required updating) in order to make use of the new types.
* Minor edit to `.gitignore` to avoid accidental pushing of DB to repository--should have been it's own item, added here to fix a problem that arose during this work.
NOTE:
* There may be an excess of algebraic ops implemented, some pruning may be appropriate.
419: Ensure we always know about Order::Term * announcements r=da-kami a=bonomat
When looking into https://github.com/comit-network/hermes/issues/360 I realized we forgot to trigger `FetchAnnouncement` when receiving a roll-over request.
This is fixed with this PR.
I found this a bit cumbersome to have to do this manually. Instead, we should sync regularly and ensure we have attestations for the next 24h.
This is also related to the discussion `@da-kami` and `@thomaseizinger` had in https://github.com/comit-network/hermes/issues/349
Co-authored-by: Philipp Hoenisch <philipp@hoenisch.at>
Fetching new events all over the place is cumbersome and it is likely that we will forget about doing so (e.g. atm we forgot doing this when receiving a roll-over request at the maker). Hence, we now fetch on a regular interval for a fixed timespan:
When starting up we fetch oracle events for the next 24h. Afterwards we check every 5 minutes again if there is a new event to check. This should ensure that we always know about needed events.
428: Actor tests r=da-kami a=da-kami
TODOs:
- [x] Test code does not clippy, there are two annoying warnings
- [x] Rebase on `master` 😬
Once that is done I'd say we get this work in and then add more tests and extract the test framework into a test module as needed.
Co-authored-by: Daniel Karzel <daniel@comit.network>
Co-authored-by: Mariusz Klochowicz <mariusz@klochowicz.com>