Commit Graph

246 Commits (master)

Author SHA1 Message Date
yamabiiko 5ff46be279
RPC server for API Interface (#1276)
* saving: implementing internal api shared by cli and rpc server

* writing async rpc methods and using arc for shared struct references

* cleaning up, renamed Init to Context

* saving: cleaning up and initial work for tests

* Respond with bitcoin withdraw txid

* Print RPC server address

* Cleanup, formatting, add `get_seller`, `get_swap_start_date` RPC endpoints

* fixing tests in cli module

* uncommenting and fixing more tests

* split api module and propagate errors with rpc server

* moving methods to api and validating addresses for rpc

* add broadcast channel to handle shutdowns gracefully and prepare for RPC server test

* added files

* Update rpc.rs

* adding new unfinished RPC tests

* updating rpc-server tests

* fixing warnings

* fixing formatting and cargo clippy warnings

* fix missing import in test

* fix: add data_dir to config to make config command work

* set server listen address manually and return file locations in JSON on Config

* Add called api method and swap_id to tracing for context, reduced boilerplate

* Pass server_address properly to RpcServer

* Update Cargo.lock

* dprint fmt

* Add cancel_refund RPC endpoint

* Combine Cmd and Params

* Disallow concurrent swaps

* Use RwLock instead of Mutex to allow for parallel reads and add get_current_swap endpoint

* Return wallet descriptor to RPC API caller

* Append all cli logs to single log file

After careful consideration, I've concluded that it's not practical/possible to ensure that the previous behaviour (one log file per swap) is preserved due to limitations of the tracing-subscriber crate and a big in the built in JSON formatter

* Add get_swap_expired_timelock timelock, other small refactoring

- Add get_swap_expired_timelock endpoint to return expired timelock if one exists. Fails if bitcoin lock tx has not yet published or if swap is already finished.
- Rename current_epoch to expired_timelock to enforce consistent method names
- Add blocks left until current expired timelock expires (next timelock expires) to ExpiredTimelock struct
- Change .expect() to .unwrap() in rpc server method register because those will only fail if we register the same method twice which will never happen

* initiating swaps in a separate task and handling shutdown signals with broadcast queues

* Replace get_swap_start_date, get_seller, get_expired_timelock with one get_swap_info rpc method

* WIP: Struct for concurrent swaps manager

* Ensure correct tracing spans

* Add note regarding Request, Method structs

* Update request.rs

* Add tracing span attribute log_reference_id to logs caused by rpc call

* Sync bitcoin wallet before initial max_giveable call

* use Span::current() to pass down to tracing span to spawned tasks

* Remove unused shutdown channel

* Add `get_monero_recovery_info` RPC endpoint

- Add `get_monero_recovery_info` RPC endpoint
- format PrivateViewKey using Display

* Rename `Method::RawHistory` to `Method::GetRawStates`

* Wait for swap to be suspended after sending signal

* Remove notes

* Add tracing span attribute log_reference_id to logs caused by rpc call

* Sync bitcoin wallet before initial max_giveable call

* use Span::current() to pass down to tracing span to spawned tasks

* Remove unused shutdown channel

* Add `get_monero_recovery_info` RPC endpoint

- Add `get_monero_recovery_info` RPC endpoint
- format PrivateViewKey using Display

* Rename `Method::RawHistory` to `Method::GetRawStates`

* Wait for swap to be suspended after sending signal

* Return additonal info on GetSwapInfo

* Update wallet.rs

* fix compile issues for tests and use serial_test crate

* fix rpc tests, only check for RPC errors and not returned values

* Rename `get_raw_history` tp `get_raw_states`

* Fix typo in rpc server stopped tracing log

* Remove unnecessary success property on suspend_current_swap response

* fixing test_cli_arguments and other tests

* WIP: RPC server integration tests

* WIP: Integration tests for RPC server

* Update rpc tests

* fix compile and warnings in tests/rpc.rs

* test: fix assert

* clippy --fix

* remove otp file

* cargo clippy fixes

* move resume swap initialization code out of spawned task

* Use `in_current_span` to pass down tracing span to spawned tasks

* moving buy_xmr initialization code out of spawned tasks

* cargo fmt

* Moving swap initialization code inside tokio select block to handle swap lock release logic

* Remove unnecessary swap suspension listener from determine_btc_to_swap call in BuyXmr

* Spawn event loop before requesting quote

* Release swap lock after receiving shutdown signal

* Remove inner tokio::select in BuyXmr and Resume

* Improve debug text for swap resume

* Return error to API caller if bid quote request fails

* Print error if one occurs during process invoked by API call

* Return bid quote to API caller

* Use type safe query! macro for database retrieval of states

* Return tx_lock_fee to API caller on GetSwapInfo call

Update request.rs

* Allow API caller to retrieve last synced bitcoin balane and avoid costly sync

* Return restore height on MoneroRecovery command to API Caller

* Include entire error cause-chain in API response

* Add span to bitcoin wallet logs

* Log event loop connection properties as tracing fields

* Wait for background tasks to complete before exiting CLI

* clippy

* specify sqlx patch version explicitly

* remove mem::forget and replace with _guard

* ci: add rpc test job

* test: wrap rpc test in #[cfg(test)]

* add missing tokio::test attribute

* fix and merge rpc tests, parse uuuid and multiaddr from serde_json value

* default Tor socks port to 9050, Cargo fmt

* Update swap/sqlite_dev_setup.sh: add version

Co-authored-by: Byron Hambly <byron@hambly.dev>

* ci: free up space on ubuntu test job

* Update swap/src/bitcoin/wallet.rs

Co-authored-by: Byron Hambly <byron@hambly.dev>

* Update swap/src/bitcoin/wallet.rs

Co-authored-by: Byron Hambly <byron@hambly.dev>

* fmt

---------

Co-authored-by: binarybaron <86064887+binarybaron@users.noreply.github.com>
Co-authored-by: Byron Hambly <byron@hambly.dev>
2 weeks ago
binarybaron 3467523849 Dynamically choose monero daemon to connect to 9 months ago
binarybaron 2e1909685d
Revert "Refresh monero monitoring wallet at startup to ensure daemon is is av…" 9 months ago
binarybaron 844ebc7de3 Refresh monero monitoring wallet at startup to ensure daemon is is available 9 months ago
Byron Hambly 5e192acac2
feat(asb): allow asb to register with mulitple rendezvous nodes 10 months ago
Byron Hambly f39e1de964
feat(swap): merge cancel/refund commands into one command 1 year ago
binarybaron b6201192c2 Allow asb to set a bitcoin address that is controlled by the asb itself to redeem/punish Bitcoin to 1 year ago
Byron Hambly 55e7d3f425
Merge branch 'master' into monero-unlocked-balance 2 years ago
Byron Hambly 08426d8171
fixup! fix(asb): use unlocked monero balance for quotes 2 years ago
Byron Hambly cd3ba4905a
feat: add wallet database migration from older bdk
- upgrades to bdk 0.24 #1198
- adds a regression test for opening older wallets #1183
- adds a migration for older wallets that encounter the ChecksumMismatch
  error #1182
2 years ago
Byron Hambly f224c49584
fix(asb): use unlocked monero balance for quotes 2 years ago
Byron Hambly 4b09ffd4df
refactor: check for latest release
DRYs up the code for checking latest release from github.
2 years ago
Byron Hambly 493324ce1b
Merge remote-tracking branch 'upstream/master' into latest_version_check 2 years ago
Byron Hambly dc706c584a
feat(swap): show min deposit required for min_quantity 2 years ago
binarybaron 9e96ef64d3 Implement Identify protocol to make network and version of ASB available to peers 2 years ago
dependabot[bot] 8fc9b05a66 Check if binary is latest version
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.130 to 1.0.133.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.130...v1.0.133)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Add rfc3339 removal changelog entry

Bump anyhow from 1.0.51 to 1.0.52

Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.51 to 1.0.52.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.51...1.0.52)

---
updated-dependencies:
- dependency-name: anyhow
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Bump serde_json from 1.0.68 to 1.0.74

Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.68 to 1.0.74.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.68...v1.0.74)

---
updated-dependencies:
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Fix failing CI tests due to deleted xmrto docker hub images

Fix failing CI tests due to deleted xmrto docker hub images by moving to the docker images provided by melotools

Bump tempfile from 3.2.0 to 3.3.0

Bumps [tempfile](https://github.com/Stebalien/tempfile) from 3.2.0 to 3.3.0.
- [Release notes](https://github.com/Stebalien/tempfile/releases)
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/NEWS)
- [Commits](https://github.com/Stebalien/tempfile/compare/v3.2.0...v3.3.0)

---
updated-dependencies:
- dependency-name: tempfile
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Bump tempfile from 3.2.0 to 3.3.0

Bumps [tempfile](https://github.com/Stebalien/tempfile) from 3.2.0 to 3.3.0.
- [Release notes](https://github.com/Stebalien/tempfile/releases)
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/NEWS)
- [Commits](https://github.com/Stebalien/tempfile/compare/v3.2.0...v3.3.0)

---
updated-dependencies:
- dependency-name: tempfile
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Always write logs as JSON to files

Bump torut from 0.2.0 to 0.2.1

Bumps [torut](https://github.com/teawithsand/torut) from 0.2.0 to 0.2.1.
- [Release notes](https://github.com/teawithsand/torut/releases)
- [Commits](https://github.com/teawithsand/torut/commits)

---
updated-dependencies:
- dependency-name: torut
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Bump time from 0.3.3 to 0.3.7

Bumps [time](https://github.com/time-rs/time) from 0.3.3 to 0.3.7.
- [Release notes](https://github.com/time-rs/time/releases)
- [Changelog](https://github.com/time-rs/time/blob/main/CHANGELOG.md)
- [Commits](https://github.com/time-rs/time/compare/v0.3.3...v0.3.7)

---
updated-dependencies:
- dependency-name: time
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Bump tokio from 1.12.0 to 1.16.1

Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.12.0 to 1.16.1.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.12.0...tokio-1.16.1)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Bump dialoguer from 0.8.0 to 0.10.0

Bumps [dialoguer](https://github.com/mitsuhiko/dialoguer) from 0.8.0 to 0.10.0.
- [Release notes](https://github.com/mitsuhiko/dialoguer/releases)
- [Changelog](https://github.com/mitsuhiko/dialoguer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mitsuhiko/dialoguer/compare/0.8.0...v0.10.0)

---
updated-dependencies:
- dependency-name: dialoguer
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Bump reqwest from 0.11.7 to 0.11.9

Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.11.7 to 0.11.9.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.11.7...v0.11.9)

---
updated-dependencies:
- dependency-name: reqwest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Bump actions/setup-python from 2.3.1 to 2.3.2

Bumps [actions/setup-python](https://github.com/actions/setup-python) from 2.3.1 to 2.3.2.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v2.3.1...v2.3.2)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

 Adjust quote based on Bitcoin balance

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

Change to rino nodes

Update dprint plugins to fix CI error

Bump futures from 0.3.17 to 0.3.21

Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.17 to 0.3.21.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.17...0.3.21)

---
updated-dependencies:
- dependency-name: futures
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Bump structopt from 0.3.25 to 0.3.26

Bumps [structopt](https://github.com/TeXitoi/structopt) from 0.3.25 to 0.3.26.
- [Release notes](https://github.com/TeXitoi/structopt/releases)
- [Changelog](https://github.com/TeXitoi/structopt/blob/master/CHANGELOG.md)
- [Commits](https://github.com/TeXitoi/structopt/compare/v0.3.25...v0.3.26)

---
updated-dependencies:
- dependency-name: structopt
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Bump serde from 1.0.133 to 1.0.136

Bumps [serde](https://github.com/serde-rs/serde) from 1.0.133 to 1.0.136.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.133...v1.0.136)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Bump hyper from 0.14.16 to 0.14.18

Bumps [hyper](https://github.com/hyperium/hyper) from 0.14.16 to 0.14.18.
- [Release notes](https://github.com/hyperium/hyper/releases)
- [Changelog](https://github.com/hyperium/hyper/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hyperium/hyper/compare/v0.14.16...v0.14.18)

---
updated-dependencies:
- dependency-name: hyper
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Inform Bob that he has been punished

Reduce required confirmations for Bitcoin transactions from 2 to 1

Don't wait for refund transaction to receive confirmations

Don't wait for refund transaction to receive confirmations to mitigate a scenario where the swap is stuck in `BtcCancelled` because it's not resumable.

Check if binary is latest version

Check if binary is latest version
2 years ago
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
leonardo d224c2910b Adjust quote based on Bitcoin balance 2 years ago
Daniel Karzel a9b10717ba
Record the monero-wallet-restore blockcheight before locking BTC
This solves issues where the CLI went offline after sending the BTC transaction, and the monero wallet restore blockheight being recorded after Alice locked the Monero, resulting in the generated XMR redeem wallet not detecting the transaction and reporting `No unlocked balance in the specified account`.
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
binarybaron e03865e172 Properly format output of commands history, config, balance and list-sellers using tracing 3 years ago
rishflab d1f6739e59 Remove support for the sled database 3 years ago
rishflab ea08a2a694 Remove duplicate log message 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 8fb15ba7aa Init db after tracing 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 0f7876c107 Add auto-migration from sled to sqlite on startup 3 years ago
rishflab a738c9df8a Remove multiple occurrences of db initialisation 3 years ago
rishflab da9d09aa5e Create Database trait
Use domain types in database API to prevent leaking of database types.
This trait will allow us to smoothly introduce the sqlite database.
3 years ago
rishflab a94c320021 Reorganise modules for multiple database implementations 3 years ago
rishflab ee6524a75f Timestamp logs by default on the ASB
Disable timestamps using the command line flag
3 years ago
rishflab 679b155db1 Enable log timestamps using explicit command line flag
Previously logs were only timestamped when the ASB was run in an
interactive terminal or if the logs were output as JSON. JSON logs and
ASB output in an interactive terminal are no longer timestamped by
default.
3 years ago
bors[bot] 1a2b42ccd1
Merge #721
721: Make --force the default behaviour for manual recovery r=rishflab a=rishflab

Also removed the --force flag

Co-authored-by: rishflab <rishflab@hotmail.com>
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
rishflab 0afe83e4e8 Move "swap started" UI message after swap confirmed with ASB
The "swap started" message was being too early, before the ASB had
confirmed they could perform the swap. This was leading to a confusing
scenario where the UI incorrectly indicated to the user that the swap
had started. Users were trying to resume or refund the swaps but there
was no swap id in the db. Moving this message after the swap setup
should resolve this problem. Closes #756, #729, #560.
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
bors[bot] 238e52228e
Merge #618
618: Don't spam on transaction status change r=da-kami a=thomaseizinger



Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
3 years ago
bors[bot] b7a832eb7a
Merge #616
616: Don't spam the user while waiting for BTC to be deposited r=thomaseizinger a=thomaseizinger



Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
3 years ago
Thomas Eizinger 2c8bbe4913
Remove left-over "half" of log message
With the move to using tracing's fields, this log message was not
properly updated.
3 years ago
Thomas Eizinger 2eb7fab0c3
Make `capture_logs` available for the whole crate 3 years ago
Daniel Karzel 6abf83f4ad
Sort seller list inside of `list_sellers`
By sorting the list inside we have a more deterministic output that makes processing in JSON easier.
3 years ago
Thomas Eizinger cacfc50fb2
Don't spam the user while waiting for BTC 3 years ago
Thomas Eizinger 56a48e71ef
Add failing test that shows spamming of output 3 years ago
Thomas Eizinger 56ea23c2a3
Assert log output for `determine_btc_to_swap` 3 years ago
Thomas Eizinger a347dd8b97
Move helper structs below tests 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 987f8abb9d
Include unreachable nodes in table output
We emit an `info!` log for every peer that we discover but only ever
emitted a `debug!` log if we fail to connect. This leads to a situation
where the user would run `swap list-sellers`, the logs would say
"Discovered XYZ at ABC" but then get a potentially empty table.

To not confuse the user, we include unreachable nodes in the table output.
For example:

```
Connected to rendezvous point, discovering nodes in 'xmr-btc-swap-testnet' namespace ...
Discovered peer 12D3KooWPZ69DRp4wbGB3wJsxxsg1XW1EVZ2evtVwcARCF3a1nrx at /dns4/ac4hgzmsmekwekjbdl77brufqqbylddugzze4tel6qsnlympgmr46iid.onion/tcp/8765
+-------+--------------+--------------+-------------+----------------------------------------------------------------------------------------------------------------------------------------+
| PRICE | MIN_QUANTITY | MAX_QUANTITY | STATUS      | ADDRESS                                                                                                                                |
+============================================================================================================================================================================================+
| ???   | ???          | ???          | Unreachable | /dns4/ac4hgzmsmekwekjbdl77brufqqbylddugzze4tel6qsnlympgmr46iid.onion/tcp/8765/p2p/12D3KooWPZ69DRp4wbGB3wJsxxsg1XW1EVZ2evtVwcARCF3a1nrx |
+-------+--------------+--------------+-------------+----------------------------------------------------------------------------------------------------------------------------------------+
```
3 years ago
Thomas Eizinger 9119ce5cc4
Tidy up log messages across the codebase
1. Clearly separate the log messages from any fields that are
captured. The log message itself should be meaningful because it
depends on the underlying formatter, how/if the fields are displayed.
2. Some log messages had very little context, expand that.
3. Wording of errors was inconsistent, hopefully all errors should
now start with `Failed to ...`.
4. Some log messages were duplicated across multiple layers (like opening
the database).
5. Some log messages were split into two where one part is now an `error!`
and the 2nd part is an `info!` on what is happening next.
6. Where appropriate, punctuation has been removed to not interrupt
the reader's flow.
3 years ago