From ab1fa6752577c13938ee39b3a0a3638f3d11c5ac Mon Sep 17 00:00:00 2001 From: icy-ux <> Date: Sun, 16 Jan 2022 20:11:35 +0000 Subject: [PATCH 01/35] update option documentation to specify amount format --- swap/src/asb/command.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swap/src/asb/command.rs b/swap/src/asb/command.rs index 7780fc56..9355568e 100644 --- a/swap/src/asb/command.rs +++ b/swap/src/asb/command.rs @@ -276,7 +276,7 @@ pub enum RawCommand { WithdrawBtc { #[structopt( long = "amount", - help = "Optionally specify the amount of Bitcoin to be withdrawn. If not specified the wallet will be drained." + help = "Optionally specify the amount of Bitcoin to be withdrawn. If not specified the wallet will be drained. Amount must be specified in quotes with denomination, e.g `--amount '0.1 BTC'`" )] amount: Option, #[structopt(long = "address", help = "The address to receive the Bitcoin.")] From 8a21d9b62343908ab59459e91db0b831c22d7cea Mon Sep 17 00:00:00 2001 From: binarybaron <86064887+binarybaron@users.noreply.github.com> Date: Fri, 11 Feb 2022 20:26:51 +0100 Subject: [PATCH 02/35] 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 --- monero-harness/src/image.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/monero-harness/src/image.rs b/monero-harness/src/image.rs index f7cc21ed..8422b16e 100644 --- a/monero-harness/src/image.rs +++ b/monero-harness/src/image.rs @@ -25,7 +25,7 @@ impl Image for Monerod { type EntryPoint = str; fn descriptor(&self) -> String { - "xmrto/monero:v0.17.2.0".to_owned() + "melotools/monero:v0.17.2.0".to_owned() } fn wait_until_ready(&self, container: &Container<'_, D, Self>) { @@ -78,7 +78,7 @@ impl Image for MoneroWalletRpc { type EntryPoint = str; fn descriptor(&self) -> String { - "xmrto/monero:v0.17.2.0".to_owned() + "melotools/monero:v0.17.2.0".to_owned() } fn wait_until_ready(&self, container: &Container<'_, D, Self>) { From 3e1966d0f37b2558c03d9cda172f5427ac1ccaed Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 22 Feb 2022 13:31:40 +0000 Subject: [PATCH 03/35] 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] --- Cargo.lock | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 341a6006..d9cfbd2d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1050,6 +1050,15 @@ dependencies = [ "syn", ] +[[package]] +name = "fastrand" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3fcf0cee53519c866c09b5de1f6c56ff9d647101f81c1964fa632e148896cdf" +dependencies = [ + "instant", +] + [[package]] name = "filetime" version = "0.2.14" @@ -4059,13 +4068,13 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.2.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22" +checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" dependencies = [ "cfg-if 1.0.0", + "fastrand", "libc", - "rand 0.8.3", "redox_syscall", "remove_dir_all", "winapi 0.3.9", From db1892b610ebb94675bccae7e9519eeedc434b62 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 23 Feb 2022 04:57:15 +0000 Subject: [PATCH 04/35] 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] --- .github/workflows/build-release-binaries.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-release-binaries.yml b/.github/workflows/build-release-binaries.yml index 08aed6ee..9be24a8b 100644 --- a/.github/workflows/build-release-binaries.yml +++ b/.github/workflows/build-release-binaries.yml @@ -67,7 +67,7 @@ jobs: run: target/${{ matrix.target }}/release/${{ matrix.bin }} --help # Remove once python 3 is the default - - uses: actions/setup-python@v2.3.1 + - uses: actions/setup-python@v2.3.2 with: python-version: '3.x' From cb855795efd821a8e2a56f4d73c06a2d24ebd82f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 23 Feb 2022 04:58:05 +0000 Subject: [PATCH 05/35] 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] --- Cargo.lock | 11 +++++------ swap/Cargo.toml | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 341a6006..a023dfec 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -601,13 +601,13 @@ checksum = "e763eef8846b13b380f37dfecda401770b0ca4e56e95170237bd7c25c7db3582" [[package]] name = "console" -version = "0.14.1" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3993e6445baa160675931ec041a5e03ca84b9c6e32a056150d3aa2bdda0a1f45" +checksum = "a28b32d32ca44b70c3e4acd7db1babf555fa026e385fb95f18028f88848b3c31" dependencies = [ "encode_unicode", - "lazy_static", "libc", + "once_cell", "regex", "terminal_size", "unicode-width", @@ -891,12 +891,11 @@ dependencies = [ [[package]] name = "dialoguer" -version = "0.8.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9dd058f8b65922819fabb4a41e7d1964e56344042c26efbccd465202c23fa0c" +checksum = "349d6b4fabcd9e97e1df1ae15395ac7e49fb144946a0d453959dc2696273b9da" dependencies = [ "console", - "lazy_static", "tempfile", "zeroize", ] diff --git a/swap/Cargo.toml b/swap/Cargo.toml index 151cff7a..7981e645 100644 --- a/swap/Cargo.toml +++ b/swap/Cargo.toml @@ -24,7 +24,7 @@ config = { version = "0.11", default-features = false, features = [ "toml" ] } conquer-once = "0.3" curve25519-dalek = { package = "curve25519-dalek-ng", version = "4" } data-encoding = "2.3" -dialoguer = "0.8" +dialoguer = "0.10" directories-next = "2" ecdsa_fun = { git = "https://github.com/LLFourn/secp256kfun", default-features = false, features = [ "libsecp_compat", "serde" ] } ed25519-dalek = "1" From 141d1558ac1561a2bf3e1d7c7d524ec682d2dcec Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 23 Feb 2022 04:58:41 +0000 Subject: [PATCH 06/35] 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] --- Cargo.lock | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 341a6006..4693cc78 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4195,11 +4195,10 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.12.0" +version = "1.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2c2416fdedca8443ae44b4527de1ea633af61d8f7169ffa6e72c5b53d24efcc" +checksum = "0c27a64b625de6d309e8c57716ba93021dccf1b3b5c97edd6d3dd2d2135afc0a" dependencies = [ - "autocfg 1.0.1", "bytes", "libc", "memchr", @@ -4215,9 +4214,9 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "1.1.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "caf7b11a536f46a809a8a9f0bb4237020f70ecbf115b842360afb127ea2fda57" +checksum = "b557f72f448c511a979e2564e55d74e6c4432fc96ff4f6241bc6bded342643b7" dependencies = [ "proc-macro2", "quote", From 38f5830f4dab06b108fbbf6581595b42f807a2a3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 23 Feb 2022 04:58:52 +0000 Subject: [PATCH 07/35] 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] --- Cargo.lock | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 341a6006..6db64153 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1741,9 +1741,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.101" +version = "0.2.119" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cb00336871be5ed2c8ed44b60ae9959dc5b9f08539422ed43f09e34ecaeba21" +checksum = "1bf2e165bb3457c8e098ea76f3e3bc9db55f87aa90d52d0e6be741470916aaa4" [[package]] name = "libgit2-sys" @@ -2480,6 +2480,15 @@ dependencies = [ "libc", ] +[[package]] +name = "num_threads" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97ba99ba6393e2c3734791401b66902d981cb03bf190af674ca69949b6d5fb15" +dependencies = [ + "libc", +] + [[package]] name = "once_cell" version = "1.7.2" @@ -4015,7 +4024,7 @@ dependencies = [ "tempfile", "testcontainers 0.12.0", "thiserror", - "time 0.3.3", + "time 0.3.7", "tokio", "tokio-socks", "tokio-tar", @@ -4162,11 +4171,12 @@ dependencies = [ [[package]] name = "time" -version = "0.3.3" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde1cf55178e0293453ba2cca0d5f8392a922e52aa958aee9c28ed02becc6d03" +checksum = "004cbc98f30fa233c61a38bc77e96a9106e65c88f2d3bef182ae952027e5753d" dependencies = [ "libc", + "num_threads", ] [[package]] From 1a3ca054f98b45d79daf8a73e152311227f7b4e9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 23 Feb 2022 04:59:28 +0000 Subject: [PATCH 08/35] 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] --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 341a6006..5a999a00 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4326,9 +4326,9 @@ dependencies = [ [[package]] name = "torut" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecb506186a6ad032c4b50bd92c35307a32f95146e7d07ee28b93cc1410dfc384" +checksum = "99febc413f26cf855b3a309c5872edff5c31e0ffe9c2fce5681868761df36f69" dependencies = [ "base32", "base64 0.13.0", From 093c1b0aae8494b81d6ac521b75c41db383221c1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 23 Feb 2022 05:16:41 +0000 Subject: [PATCH 09/35] 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] --- Cargo.lock | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 341a6006..1be3b506 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1050,6 +1050,15 @@ dependencies = [ "syn", ] +[[package]] +name = "fastrand" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3fcf0cee53519c866c09b5de1f6c56ff9d647101f81c1964fa632e148896cdf" +dependencies = [ + "instant", +] + [[package]] name = "filetime" version = "0.2.14" @@ -1335,9 +1344,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.9" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f072413d126e57991455e0a922b31e4c8ba7c2ffbebf6b78b4f8521397d65cd" +checksum = "d9f1f717ddc7b2ba36df7e871fd88db79326551d3d6f1fc406fbfd28b582ff8e" dependencies = [ "bytes", "fnv", @@ -3140,15 +3149,16 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.11.7" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07bea77bc708afa10e59905c3d4af7c8fd43c9214251673095ff8b14345fcbc5" +checksum = "87f242f1488a539a79bac6dbe7c8609ae43b7914b7736210f239a37cccb32525" dependencies = [ "base64 0.13.0", "bytes", "encoding_rs", "futures-core", "futures-util", + "h2", "http", "http-body", "hyper", @@ -3173,7 +3183,7 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots 0.21.0", + "webpki-roots 0.22.2", "winreg 0.7.0", ] @@ -4059,13 +4069,13 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.2.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22" +checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" dependencies = [ "cfg-if 1.0.0", + "fastrand", "libc", - "rand 0.8.3", "redox_syscall", "remove_dir_all", "winapi 0.3.9", @@ -4841,6 +4851,15 @@ dependencies = [ "webpki 0.21.4", ] +[[package]] +name = "webpki-roots" +version = "0.22.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "552ceb903e957524388c4d3475725ff2c8b7960922063af6ce53c9a43da07449" +dependencies = [ + "webpki 0.22.0", +] + [[package]] name = "which" version = "4.0.2" From 407b98d3a2cfe6e457a87f8a77ec9206ddc9e76b Mon Sep 17 00:00:00 2001 From: binarybaron <86064887+binarybaron@users.noreply.github.com> Date: Tue, 18 Jan 2022 22:34:47 +0100 Subject: [PATCH 10/35] Always write logs as JSON to files --- CHANGELOG.md | 1 + swap/src/cli/tracing.rs | 27 +++++++++++---------------- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c65088c1..d6722ea7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Revert logs to use rfc3339 local time formatting. +- Always write logs as JSON to files ## [0.10.2] - 2021-12-25 diff --git a/swap/src/cli/tracing.rs b/swap/src/cli/tracing.rs index 5ed58231..3bafc229 100644 --- a/swap/src/cli/tracing.rs +++ b/swap/src/cli/tracing.rs @@ -20,27 +20,22 @@ pub fn init(debug: bool, json: bool, dir: impl AsRef, swap_id: Option Date: Thu, 24 Feb 2022 02:12:45 +0100 Subject: [PATCH 11/35] Adjust quote based on Bitcoin balance --- CHANGELOG.md | 7 +++++- swap/src/asb/event_loop.rs | 39 +++++++++++++++++++++++++++++--- swap/src/bin/swap.rs | 46 +++++++++++++++++++++++++++++++++++--- swap/src/monero.rs | 38 +++++++++++++++++++++++++++++++ swap/src/network/quote.rs | 4 ++++ 5 files changed, 127 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d6722ea7..5421b912 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Revert logs to use rfc3339 local time formatting. - Always write logs as JSON to files +### Added + +- Adjust quote based on Bitcoin balance. + If the max_buy_btc in the ASB config is higher than the available balance to trade it will return the max available balance discounting the locking fees for monero, in the case the balance is lower than the min_buy_btc config it will return 0 to the CLI. If the ASB returns a quote of 0 the CLI will not allow you continue with a trade. + ## [0.10.2] - 2021-12-25 ### Changed @@ -305,7 +310,7 @@ It is possible to migrate critical data from the old db to the sqlite but there - Fixed an issue where Alice would not verify if Bob's Bitcoin lock transaction is semantically correct, i.e. pays the agreed upon amount to an output owned by both of them. Fixing this required a **breaking change** on the network layer and hence old versions are not compatible with this version. -[Unreleased]: https://github.com/comit-network/xmr-btc-swap/compare/0.10.2...HEAD +[unreleased]: https://github.com/comit-network/xmr-btc-swap/compare/0.10.2...HEAD [0.10.2]: https://github.com/comit-network/xmr-btc-swap/compare/0.10.1...0.10.2 [0.10.1]: https://github.com/comit-network/xmr-btc-swap/compare/0.10.0...0.10.1 [0.10.0]: https://github.com/comit-network/xmr-btc-swap/compare/0.9.0...0.10.0 diff --git a/swap/src/asb/event_loop.rs b/swap/src/asb/event_loop.rs index a5ad678f..1a06d95f 100644 --- a/swap/src/asb/event_loop.rs +++ b/swap/src/asb/event_loop.rs @@ -319,13 +319,46 @@ where min_buy: bitcoin::Amount, max_buy: bitcoin::Amount, ) -> Result { - let rate = self + let ask_price = self .latest_rate .latest_rate() - .context("Failed to get latest rate")?; + .context("Failed to get latest rate")? + .ask() + .context("Failed to compute asking price")?; + + let max_bitcoin_for_monero = self + .monero_wallet + .get_balance() + .await? + .max_bitcoin_for_price(ask_price); + + if min_buy > max_bitcoin_for_monero { + tracing::warn!( + "Your Monero balance is too low to initiate a swap, as your minimum swap amount is {}. You could at most swap {}", + min_buy, max_bitcoin_for_monero + ); + + return Ok(BidQuote { + price: ask_price, + min_quantity: bitcoin::Amount::ZERO, + max_quantity: bitcoin::Amount::ZERO, + }); + } + + if max_buy > max_bitcoin_for_monero { + tracing::warn!( + "Your Monero balance is too low to initiate a swap with the maximum swap amount {} that you have specified in your config. You can at most swap {}", + max_buy, max_bitcoin_for_monero + ); + return Ok(BidQuote { + price: ask_price, + min_quantity: min_buy, + max_quantity: max_bitcoin_for_monero, + }); + } Ok(BidQuote { - price: rate.ask().context("Failed to compute asking price")?, + price: ask_price, min_quantity: min_buy, max_quantity: max_buy, }) diff --git a/swap/src/bin/swap.rs b/swap/src/bin/swap.rs index bac3ae94..81ec69e3 100644 --- a/swap/src/bin/swap.rs +++ b/swap/src/bin/swap.rs @@ -29,7 +29,7 @@ use swap::cli::{list_sellers, EventLoop, SellerStatus}; use swap::database::open_db; use swap::env::Config; use swap::libp2p_ext::MultiAddrExt; -use swap::network::quote::BidQuote; +use swap::network::quote::{BidQuote, ZeroQuoteReceived}; use swap::network::swarm; use swap::protocol::bob; use swap::protocol::bob::{BobState, Swap}; @@ -99,7 +99,7 @@ async fn main() -> Result<()> { let event_loop = tokio::spawn(event_loop.run()); let max_givable = || bitcoin_wallet.max_giveable(TxLock::script_size()); - let (amount, fees) = determine_btc_to_swap( + let (amount, fees) = match determine_btc_to_swap( json, event_loop_handle.request_quote(), bitcoin_wallet.new_address(), @@ -107,7 +107,16 @@ async fn main() -> Result<()> { max_givable, || bitcoin_wallet.sync(), ) - .await?; + .await + { + Ok(val) => val, + Err(error) => match error.downcast::() { + Ok(_) => { + bail!("Seller's XMR balance is currently too low to initiate a swap, please try again later") + } + Err(other) => bail!(other), + }, + }; tracing::info!(%amount, %fees, "Determined swap amount"); @@ -556,6 +565,11 @@ where { tracing::debug!("Requesting quote"); let bid_quote = bid_quote.await?; + + if bid_quote.max_quantity == bitcoin::Amount::ZERO { + bail!(ZeroQuoteReceived) + } + tracing::info!( price = %bid_quote.price, minimum_amount = %bid_quote.min_quantity, @@ -915,6 +929,32 @@ mod tests { ); } + #[tokio::test] + async fn given_bid_quote_max_amount_0_return_errorq() { + let givable = Arc::new(Mutex::new(MaxGiveable::new(vec![ + Amount::from_btc(0.0001).unwrap(), + Amount::from_btc(0.01).unwrap(), + ]))); + + let determination_error = determine_btc_to_swap( + true, + async { Ok(quote_with_max(0.00)) }, + get_dummy_address(), + || async { Ok(Amount::from_btc(0.0101)?) }, + || async { + let mut result = givable.lock().unwrap(); + result.give() + }, + || async { Ok(()) }, + ) + .await + .err() + .unwrap() + .to_string(); + + assert_eq!("Received quote of 0", determination_error); + } + struct MaxGiveable { amounts: Vec, call_counter: usize, diff --git a/swap/src/monero.rs b/swap/src/monero.rs index 86c97eba..bf3045ce 100644 --- a/swap/src/monero.rs +++ b/swap/src/monero.rs @@ -99,6 +99,20 @@ impl Amount { self.0 } + pub fn max_bitcoin_for_price(&self, ask_price: bitcoin::Amount) -> bitcoin::Amount { + let piconero_minus_fee = self.as_piconero().saturating_sub(MONERO_FEE.as_piconero()); + + if piconero_minus_fee == 0 { + return bitcoin::Amount::ZERO; + } + + // There needs to be an offset for difference in zeroes beetween Piconeros and + // Satoshis + let piconero_calc = (piconero_minus_fee * ask_price.as_sat()) / PICONERO_OFFSET; + + bitcoin::Amount::from_sat(piconero_calc) + } + pub fn from_monero(amount: f64) -> Result { let decimal = Decimal::try_from(amount)?; Self::from_decimal(decimal) @@ -360,6 +374,30 @@ mod tests { ); } + #[test] + fn geting_max_bitcoin_to_trade() { + let amount = Amount::parse_monero("10").unwrap(); + let bitcoin_price_sats = bitcoin::Amount::from_sat(382_900); + + let monero_max_from_bitcoin = amount.max_bitcoin_for_price(bitcoin_price_sats); + + assert_eq!( + bitcoin::Amount::from_sat(3_828_988), + monero_max_from_bitcoin + ); + } + + #[test] + fn geting_max_bitcoin_to_trade_with_balance_smaller_than_locking_fee() { + let monero = "0.00001"; + let amount = Amount::parse_monero(monero).unwrap(); + let bitcoin_price_sats = bitcoin::Amount::from_sat(382_900); + + let monero_max_from_bitcoin = amount.max_bitcoin_for_price(bitcoin_price_sats); + + assert_eq!(bitcoin::Amount::ZERO, monero_max_from_bitcoin); + } + use rand::rngs::OsRng; use serde::{Deserialize, Serialize}; diff --git a/swap/src/network/quote.rs b/swap/src/network/quote.rs index 67640d65..caf99e09 100644 --- a/swap/src/network/quote.rs +++ b/swap/src/network/quote.rs @@ -37,6 +37,10 @@ pub struct BidQuote { pub max_quantity: bitcoin::Amount, } +#[derive(Clone, Copy, Debug, thiserror::Error)] +#[error("Received quote of 0")] +pub struct ZeroQuoteReceived; + /// Constructs a new instance of the `quote` behaviour to be used by the ASB. /// /// The ASB is always listening and only supports inbound connections, i.e. From 5a3675a06fcafe2dcc2ab9ff2c0096423362431c Mon Sep 17 00:00:00 2001 From: Byron Hambly Date: Sat, 12 Mar 2022 13:05:36 +0200 Subject: [PATCH 12/35] 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 --- .github/workflows/build-release-binaries.yml | 4 +- Cargo.lock | 237 ++++++++++++------- README.md | 5 + monero-harness/Cargo.toml | 2 +- monero-harness/src/image.rs | 20 +- monero-harness/src/lib.rs | 12 +- monero-rpc/Cargo.toml | 2 +- monero-rpc/src/wallet.rs | 9 +- monero-wallet/Cargo.toml | 2 +- monero-wallet/src/lib.rs | 4 +- rust-toolchain.toml | 2 +- swap/Cargo.toml | 10 +- swap/src/bin/swap.rs | 7 +- swap/src/bitcoin.rs | 6 +- swap/src/bitcoin/lock.rs | 7 +- swap/src/bitcoin/redeem.rs | 2 +- swap/src/bitcoin/refund.rs | 2 +- swap/src/bitcoin/wallet.rs | 6 +- swap/src/cli/command.rs | 77 ++++-- swap/src/cli/event_loop.rs | 5 +- swap/src/cli/list_sellers.rs | 4 +- swap/src/env.rs | 2 +- swap/src/kraken.rs | 8 +- swap/src/proptest.rs | 2 +- swap/tests/harness/bitcoind.rs | 2 +- swap/tests/harness/electrs.rs | 2 - swap/tests/harness/mod.rs | 10 +- 27 files changed, 265 insertions(+), 186 deletions(-) diff --git a/.github/workflows/build-release-binaries.yml b/.github/workflows/build-release-binaries.yml index 9be24a8b..a4a651e5 100644 --- a/.github/workflows/build-release-binaries.yml +++ b/.github/workflows/build-release-binaries.yml @@ -67,9 +67,9 @@ jobs: run: target/${{ matrix.target }}/release/${{ matrix.bin }} --help # Remove once python 3 is the default - - uses: actions/setup-python@v2.3.2 + - uses: actions/setup-python@v3 with: - python-version: '3.x' + python-version: "3.x" - id: create-archive-name shell: python # Use python to have a prettier name for the archive on Windows. diff --git a/Cargo.lock b/Cargo.lock index 75f7355c..97cb88ce 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -74,9 +74,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.52" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84450d0b4a8bd1ba4144ce8ce718fbc5d071358b1e5384bace6536b3d1f2d5b3" +checksum = "4361135be9122e0870de935d7c439aef945b9f9ddd4199a553b5270b49c82a27" [[package]] name = "arrayref" @@ -90,6 +90,12 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" +[[package]] +name = "arrayvec" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" + [[package]] name = "asn1_der" version = "0.7.4" @@ -105,7 +111,7 @@ dependencies = [ "bzip2", "futures-core", "memchr", - "pin-project-lite 0.2.6", + "pin-project-lite 0.2.8", "tokio", ] @@ -130,7 +136,7 @@ dependencies = [ "futures-sink", "futures-util", "memchr", - "pin-project-lite 0.2.6", + "pin-project-lite 0.2.8", ] [[package]] @@ -176,14 +182,14 @@ checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" [[package]] name = "backoff" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fe17f59a06fe8b87a6fc8bf53bb70b3aba76d7685f432487a68cd5552853625" +checksum = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1" dependencies = [ "futures-core", "getrandom 0.2.2", "instant", - "pin-project 1.0.5", + "pin-project-lite 0.2.8", "rand 0.8.3", "tokio", ] @@ -235,9 +241,9 @@ dependencies = [ [[package]] name = "bdk" -version = "0.12.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecf7e997526ceefbab7dd99fc0da6834ed8853bd051f53523415ed1dc82b870d" +checksum = "3face7de38293a2f7e2a9f69a48b442f28e864da0fc7a6a977388e31bdc367d7" dependencies = [ "async-trait", "bdk-macros", @@ -364,9 +370,9 @@ dependencies = [ [[package]] name = "bitflags" -version = "1.2.1" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "blake2" @@ -562,13 +568,13 @@ checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" [[package]] name = "comfy-table" -version = "4.1.1" +version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11e95a3e867422fd8d04049041f5671f94d53c32a9dcd82e2be268714942f3f3" +checksum = "b103d85ca6e209388771bfb7aa6b68a7aeec4afbf6f0a0264bfbf50360e5212e" dependencies = [ "crossterm", - "strum 0.21.0", - "strum_macros 0.21.0", + "strum", + "strum_macros", "unicode-width", ] @@ -729,15 +735,15 @@ dependencies = [ [[package]] name = "crossterm" -version = "0.20.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0ebde6a9dd5e331cd6c6f48253254d117642c31653baa475e394657c59c1f7d" +checksum = "77b75a27dc8d220f1f8521ea69cd55a34d720a200ebb3a624d9aa19193d3b432" dependencies = [ "bitflags", "crossterm_winapi", "libc", "mio", - "parking_lot", + "parking_lot 0.12.0", "signal-hook", "signal-hook-mio", "winapi 0.3.9", @@ -745,9 +751,9 @@ dependencies = [ [[package]] name = "crossterm_winapi" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a6966607622438301997d3dac0d2f6e9a90c68bb6bc1785ea98456ab93c0507" +checksum = "2ae1b35a484aa10e07fe0638d02301c5ad24de82d310ccbd2f3693da5f09bf1c" dependencies = [ "winapi 0.3.9", ] @@ -1184,7 +1190,7 @@ checksum = "62007592ac46aa7c2b6416f7deb9a8a8f63a01e0f1d6e1787d5630170db2b63e" dependencies = [ "futures-core", "lock_api", - "parking_lot", + "parking_lot 0.11.2", ] [[package]] @@ -1249,7 +1255,7 @@ dependencies = [ "futures-sink", "futures-task", "memchr", - "pin-project-lite 0.2.6", + "pin-project-lite 0.2.8", "pin-utils", "proc-macro-hack", "proc-macro-nested", @@ -1356,7 +1362,7 @@ dependencies = [ "indexmap", "slab", "tokio", - "tokio-util", + "tokio-util 0.6.9", "tracing", ] @@ -1515,7 +1521,7 @@ dependencies = [ "httparse", "httpdate", "itoa 0.4.7", - "pin-project-lite 0.2.6", + "pin-project-lite 0.2.8", "socket2 0.4.0", "tokio", "tower-service", @@ -1740,7 +1746,7 @@ version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21f866863575d0e1d654fbeeabdc927292fdf862873dc3c96c6f753357e13374" dependencies = [ - "arrayvec", + "arrayvec 0.5.2", "bitflags", "cfg-if 1.0.0", "ryu", @@ -1788,7 +1794,7 @@ dependencies = [ "libp2p-websocket", "libp2p-yamux", "multiaddr", - "parking_lot", + "parking_lot 0.11.2", "pin-project 1.0.5", "smallvec", "wasm-timer", @@ -1812,7 +1818,7 @@ dependencies = [ "multiaddr", "multihash", "multistream-select", - "parking_lot", + "parking_lot 0.11.2", "pin-project 1.0.5", "prost", "prost-build", @@ -1861,7 +1867,7 @@ dependencies = [ "libp2p-core", "log", "nohash-hasher", - "parking_lot", + "parking_lot 0.11.2", "rand 0.7.3", "smallvec", "unsigned-varint", @@ -2005,7 +2011,7 @@ source = "git+https://github.com/libp2p/rust-libp2p.git#6d3ab8a3debe8d69dcd00417 dependencies = [ "futures", "libp2p-core", - "parking_lot", + "parking_lot 0.11.2", "thiserror", "yamux", ] @@ -2089,9 +2095,9 @@ checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3" [[package]] name = "lock_api" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712a4d093c9976e24e7dbca41db895dabcbac38eb5f4045393d17a95bdfb1109" +checksum = "88943dd7ef4a2e5a4bfa2753aaab3013e34ce2533d1996fb18ef591e315e2b3b" dependencies = [ "scopeguard", ] @@ -2555,7 +2561,17 @@ checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" dependencies = [ "instant", "lock_api", - "parking_lot_core", + "parking_lot_core 0.8.5", +] + +[[package]] +name = "parking_lot" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87f5ec2493a61ac0506c0f4199f99070cbe83857b0337006a30f3e6719b8ef58" +dependencies = [ + "lock_api", + "parking_lot_core 0.9.1", ] [[package]] @@ -2573,14 +2589,25 @@ dependencies = [ ] [[package]] -name = "pem" -version = "1.0.1" +name = "parking_lot_core" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06673860db84d02a63942fa69cd9543f2624a5df3aea7f33173048fa7ad5cf1a" +checksum = "28141e0cc4143da2443301914478dc976a61ffdb3f043058310c70df2fed8954" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "redox_syscall", + "smallvec", + "windows-sys", +] + +[[package]] +name = "pem" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9a3b09a20e374558580a4914d3b7d89bd61b954a5a5e1dcbea98753addb1947" dependencies = [ "base64 0.13.0", - "once_cell", - "regex", ] [[package]] @@ -2656,9 +2683,9 @@ checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777" [[package]] name = "pin-project-lite" -version = "0.2.6" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc0e1f259c92177c30a4c9d177246edd0a3568b25756a977d0632cf8fa37e905" +checksum = "e280fbe77cc62c91527259e9442153f4688736748d24660126286329742b4c6c" [[package]] name = "pin-utils" @@ -3177,7 +3204,7 @@ dependencies = [ "log", "mime", "percent-encoding", - "pin-project-lite 0.2.6", + "pin-project-lite 0.2.8", "rustls 0.20.2", "rustls-pemfile", "serde", @@ -3186,7 +3213,7 @@ dependencies = [ "tokio", "tokio-rustls 0.23.1", "tokio-socks", - "tokio-util", + "tokio-util 0.6.9", "url", "wasm-bindgen", "wasm-bindgen-futures", @@ -3222,20 +3249,20 @@ dependencies = [ [[package]] name = "rust_decimal" -version = "1.18.0" +version = "1.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71b5a9625a7e6060b23db692facf49082cc78889a7e6ac94a735356ae49db4b0" +checksum = "d37baa70cf8662d2ba1c1868c5983dda16ef32b105cce41fb5c47e72936a90b3" dependencies = [ - "arrayvec", + "arrayvec 0.7.2", "num-traits", "serde", ] [[package]] name = "rust_decimal_macros" -version = "1.18.0" +version = "1.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2a71e447554613b11da876d63d04e78fc3e8e86769488d3b58887671e23bc86" +checksum = "184abaf7b434800e1a5a8aad3ebc8cd7498df33af72d65371d797a264713a59b" dependencies = [ "quote", "rust_decimal", @@ -3541,9 +3568,9 @@ dependencies = [ [[package]] name = "serde_with" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad6056b4cb69b6e43e3a0f055def223380baecc99da683884f205bf347f7c4b3" +checksum = "ec1e6ec4d8950e5b1e894eac0d360742f3b1407a6078a604a731c4b3f49cefbc" dependencies = [ "rustversion", "serde", @@ -3624,9 +3651,9 @@ dependencies = [ [[package]] name = "signal-hook" -version = "0.3.9" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "470c5a6397076fae0094aaf06a08e6ba6f37acb77d3b1b91ea92b4d6c8650c39" +checksum = "647c97df271007dcea485bb74ffdb57f2e683f1306c854f468a0c244badabf2d" dependencies = [ "libc", "signal-hook-registry", @@ -3677,7 +3704,7 @@ dependencies = [ "fxhash", "libc", "log", - "parking_lot", + "parking_lot 0.11.2", ] [[package]] @@ -3818,7 +3845,7 @@ dependencies = [ "log", "memchr", "once_cell", - "parking_lot", + "parking_lot 0.11.2", "percent-encoding", "rustls 0.19.0", "serde", @@ -3926,31 +3953,13 @@ dependencies = [ "syn", ] -[[package]] -name = "strum" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aaf86bbcfd1fa9670b7a129f64fc0c9fcbbfe4f1bc4210e9e98fe71ffc12cde2" - [[package]] name = "strum" version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cae14b91c7d11c9a851d3fbc80a963198998c2a64eec840477fa92d8ce9b70bb" dependencies = [ - "strum_macros 0.23.0", -] - -[[package]] -name = "strum_macros" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb076d8b589fde927ec90d05920d610554ca3a4d9dddb177481cadd071a19c2e" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn", + "strum_macros", ] [[package]] @@ -4029,7 +4038,7 @@ dependencies = [ "spectral", "sqlx", "structopt", - "strum 0.23.0", + "strum", "tempfile", "testcontainers 0.12.0", "thiserror", @@ -4038,7 +4047,7 @@ dependencies = [ "tokio-socks", "tokio-tar", "tokio-tungstenite", - "tokio-util", + "tokio-util 0.7.0", "toml", "torut", "tracing", @@ -4214,18 +4223,19 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.16.1" +version = "1.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c27a64b625de6d309e8c57716ba93021dccf1b3b5c97edd6d3dd2d2135afc0a" +checksum = "b9d0183f6f6001549ab68f8c7585093bb732beefbcf6d23a10b9b95c73a1dd49" dependencies = [ + "autocfg 1.0.1", "bytes", "libc", "memchr", "mio", "num_cpus", "once_cell", - "parking_lot", - "pin-project-lite 0.2.6", + "parking_lot 0.11.2", + "pin-project-lite 0.2.8", "signal-hook-registry", "tokio-macros", "winapi 0.3.9", @@ -4283,7 +4293,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c535f53c0cfa1acace62995a8994fc9cc1f12d202420da96ff306ee24d576469" dependencies = [ "futures-core", - "pin-project-lite 0.2.6", + "pin-project-lite 0.2.8", "tokio", ] @@ -4321,15 +4331,29 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.6.8" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d3725d3efa29485e87311c5b699de63cde14b00ed4d256b8318aa30ca452cd" +checksum = "9e99e1983e5d376cd8eb4b66604d2e99e79f5bd988c3055891dcd8c9e2604cc0" dependencies = [ "bytes", "futures-core", "futures-sink", "log", - "pin-project-lite 0.2.6", + "pin-project-lite 0.2.8", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64910e1b9c1901aaf5375561e35b9c057d95ff41a44ede043a03e09279eabaf1" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "log", + "pin-project-lite 0.2.8", "tokio", ] @@ -4373,7 +4397,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "375a639232caf30edfc78e8d89b2d4c375515393e7af7e16f01cd96917fb2105" dependencies = [ "cfg-if 1.0.0", - "pin-project-lite 0.2.6", + "pin-project-lite 0.2.8", "tracing-attributes", "tracing-core", ] @@ -4500,7 +4524,7 @@ dependencies = [ "lazy_static", "log", "lru-cache", - "parking_lot", + "parking_lot 0.11.2", "resolv-conf", "smallvec", "thiserror", @@ -4804,7 +4828,7 @@ checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f" dependencies = [ "futures", "js-sys", - "parking_lot", + "parking_lot 0.11.2", "pin-utils", "wasm-bindgen", "wasm-bindgen-futures", @@ -4928,6 +4952,49 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-sys" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3df6e476185f92a12c072be4a189a0210dcdcf512a1891d6dff9edb874deadc6" +dependencies = [ + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_msvc" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8e92753b1c443191654ec532f14c199742964a061be25d77d7a96f09db20bf5" + +[[package]] +name = "windows_i686_gnu" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a711c68811799e017b6038e0922cb27a5e2f43a2ddb609fe0b6f3eeda9de615" + +[[package]] +name = "windows_i686_msvc" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "146c11bb1a02615db74680b32a68e2d61f553cc24c4eb5b4ca10311740e44172" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c912b12f7454c6620635bbff3450962753834be2a594819bd5e945af18ec64bc" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "504a2476202769977a040c6364301a3f65d0cc9e3fb08600b2bda150a0488316" + [[package]] name = "winreg" version = "0.6.2" @@ -4985,7 +5052,7 @@ dependencies = [ "futures", "log", "nohash-hasher", - "parking_lot", + "parking_lot 0.11.2", "rand 0.8.3", "static_assertions", ] diff --git a/README.md b/README.md index 9b03089a..5a8e39ec 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,11 @@ It is not recommended to bump fees when swapping because it can have unpredictab We are encourage community contributions whether it be a bug fix or an improvement to the documentation. Please have a look at the [contribution guidelines](./CONTRIBUTING.md). +## Rust Version Support + +Please note that only the latest stable Rust toolchain is supported. +All stable toolchains since 1.58 _should_ work. + ## Contact Feel free to reach out to us in the [COMIT-Monero Matrix channel](https://matrix.to/#/#comit-monero:matrix.org). diff --git a/monero-harness/Cargo.toml b/monero-harness/Cargo.toml index b30066c8..b659220b 100644 --- a/monero-harness/Cargo.toml +++ b/monero-harness/Cargo.toml @@ -2,7 +2,7 @@ name = "monero-harness" version = "0.1.0" authors = [ "CoBloX Team " ] -edition = "2018" +edition = "2021" publish = false [dependencies] diff --git a/monero-harness/src/image.rs b/monero-harness/src/image.rs index 8422b16e..6bfd7c3c 100644 --- a/monero-harness/src/image.rs +++ b/monero-harness/src/image.rs @@ -13,7 +13,7 @@ pub const MONEROD_DEFAULT_NETWORK: &str = "monero_network"; /// this doesn't matter. pub const RPC_PORT: u16 = 18081; -#[derive(Debug)] +#[derive(Debug, Default)] pub struct Monerod { args: MonerodArgs, } @@ -58,15 +58,7 @@ impl Image for Monerod { } } -impl Default for Monerod { - fn default() -> Self { - Self { - args: MonerodArgs::default(), - } - } -} - -#[derive(Debug)] +#[derive(Debug, Default)] pub struct MoneroWalletRpc { args: MoneroWalletRpcArgs, } @@ -111,14 +103,6 @@ impl Image for MoneroWalletRpc { } } -impl Default for MoneroWalletRpc { - fn default() -> Self { - Self { - args: MoneroWalletRpcArgs::default(), - } - } -} - impl MoneroWalletRpc { pub fn new(name: &str, daemon_address: String) -> Self { Self { diff --git a/monero-harness/src/lib.rs b/monero-harness/src/lib.rs index 0fc42880..0267c754 100644 --- a/monero-harness/src/lib.rs +++ b/monero-harness/src/lib.rs @@ -71,7 +71,7 @@ impl<'c> Monero { let miner = "miner"; tracing::info!("Starting miner wallet: {}", miner); let (miner_wallet, miner_container) = - MoneroWalletRpc::new(cli, &miner, &monerod, prefix.clone()).await?; + MoneroWalletRpc::new(cli, miner, &monerod, prefix.clone()).await?; wallets.push(miner_wallet); containers.push(miner_container); @@ -83,7 +83,7 @@ impl<'c> Monero { // trying for 5 minutes let (wallet, container) = tokio::time::timeout(Duration::from_secs(300), async { loop { - let result = MoneroWalletRpc::new(cli, &wallet, &monerod, prefix.clone()).await; + let result = MoneroWalletRpc::new(cli, wallet, &monerod, prefix.clone()).await; match result { Ok(tuple) => { return tuple; } @@ -188,7 +188,6 @@ fn random_prefix() -> String { #[derive(Clone, Debug)] pub struct Monerod { - rpc_port: u16, name: String, network: String, client: monerod::Client, @@ -196,9 +195,7 @@ pub struct Monerod { #[derive(Clone, Debug)] pub struct MoneroWalletRpc { - rpc_port: u16, name: String, - network: String, client: wallet::Client, } @@ -220,7 +217,6 @@ impl<'c> Monerod { Ok(( Self { - rpc_port: monerod_rpc_port, name, network, client: monerod::Client::localhost(monerod_rpc_port)?, @@ -252,7 +248,7 @@ impl<'c> MoneroWalletRpc { prefix: String, ) -> Result<(Self, Container<'c, Cli, image::MoneroWalletRpc>)> { let daemon_address = format!("{}:{}", monerod.name, RPC_PORT); - let image = image::MoneroWalletRpc::new(&name, daemon_address); + let image = image::MoneroWalletRpc::new(name, daemon_address); let network = monerod.network.clone(); let run_args = RunArgs::default() @@ -272,9 +268,7 @@ impl<'c> MoneroWalletRpc { Ok(( Self { - rpc_port: wallet_rpc_port, name: name.to_string(), - network, client, }, container, diff --git a/monero-rpc/Cargo.toml b/monero-rpc/Cargo.toml index 758e843b..6bd76ad4 100644 --- a/monero-rpc/Cargo.toml +++ b/monero-rpc/Cargo.toml @@ -2,7 +2,7 @@ name = "monero-rpc" version = "0.1.0" authors = [ "CoBloX Team " ] -edition = "2018" +edition = "2021" [dependencies] anyhow = "1" diff --git a/monero-rpc/src/wallet.rs b/monero-rpc/src/wallet.rs index db4e318d..b0f59b82 100644 --- a/monero-rpc/src/wallet.rs +++ b/monero-rpc/src/wallet.rs @@ -184,12 +184,7 @@ pub struct Refreshed { #[derive(Debug, Clone, Deserialize)] pub struct SweepAll { - amount_list: Vec, - fee_list: Vec, - multisig_txset: String, pub tx_hash_list: Vec, - unsigned_txset: String, - weight_list: Vec, } #[derive(Debug, Copy, Clone, Deserialize)] @@ -244,7 +239,7 @@ mod tests { } }"#; - let _: Response = serde_json::from_str(&response).unwrap(); + let _: Response = serde_json::from_str(response).unwrap(); } #[test] @@ -256,6 +251,6 @@ mod tests { } }"#; - let _: Response = serde_json::from_str(&response).unwrap(); + let _: Response = serde_json::from_str(response).unwrap(); } } diff --git a/monero-wallet/Cargo.toml b/monero-wallet/Cargo.toml index 4e97bbe8..f767b08e 100644 --- a/monero-wallet/Cargo.toml +++ b/monero-wallet/Cargo.toml @@ -2,7 +2,7 @@ name = "monero-wallet" version = "0.1.0" authors = [ "CoBloX Team " ] -edition = "2018" +edition = "2021" [dependencies] anyhow = "1" diff --git a/monero-wallet/src/lib.rs b/monero-wallet/src/lib.rs index 292e828e..2058f476 100644 --- a/monero-wallet/src/lib.rs +++ b/monero-wallet/src/lib.rs @@ -77,8 +77,8 @@ mod tests { let result = rpc_client .get_outs( key_offsets - .to_vec() - .into_iter() + .iter() + .cloned() .map(|varint| GetOutputsOut { amount: 0, index: varint.0, diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 5c4233dd..04d5285c 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] -channel = "1.53" +channel = "1.59" components = ["clippy"] targets = ["armv7-unknown-linux-gnueabihf"] diff --git a/swap/Cargo.toml b/swap/Cargo.toml index 7981e645..c631260a 100644 --- a/swap/Cargo.toml +++ b/swap/Cargo.toml @@ -2,7 +2,7 @@ name = "swap" version = "0.10.2" authors = [ "The COMIT guys " ] -edition = "2018" +edition = "2021" description = "XMR/BTC trustless atomic swaps." [lib] @@ -13,13 +13,13 @@ anyhow = "1" async-compression = { version = "0.3", features = [ "bzip2", "tokio" ] } async-trait = "0.1" atty = "0.2" -backoff = { version = "0.3", features = [ "tokio" ] } +backoff = { version = "0.4", features = [ "tokio" ] } base64 = "0.13" -bdk = "0.12" +bdk = "0.16" big-bytes = "1" bitcoin = { version = "0.27", features = [ "rand", "use-serde" ] } bmrng = "0.5" -comfy-table = "4.1.1" +comfy-table = "5.0" config = { version = "0.11", default-features = false, features = [ "toml" ] } conquer-once = "0.3" curve25519-dalek = { package = "curve25519-dalek-ng", version = "4" } @@ -56,7 +56,7 @@ time = "0.3" tokio = { version = "1", features = [ "rt-multi-thread", "time", "macros", "sync", "process", "fs", "net" ] } tokio-socks = "0.5" tokio-tungstenite = { version = "0.15", features = [ "rustls-tls" ] } -tokio-util = { version = "0.6", features = [ "io" ] } +tokio-util = { version = "0.7", features = [ "io", "codec" ] } toml = "0.5" torut = { version = "0.2", default-features = false, features = [ "v3", "control" ] } tracing = { version = "0.1", features = [ "attributes" ] } diff --git a/swap/src/bin/swap.rs b/swap/src/bin/swap.rs index 81ec69e3..92010783 100644 --- a/swap/src/bin/swap.rs +++ b/swap/src/bin/swap.rs @@ -47,7 +47,7 @@ async fn main() -> Result<()> { json, cmd, } = match parse_args_and_apply_defaults(env::args_os())? { - ParseResult::Arguments(args) => args, + ParseResult::Arguments(args) => *args, ParseResult::PrintAndExitZero { message } => { println!("{}", message); std::process::exit(0); @@ -95,7 +95,7 @@ async fn main() -> Result<()> { tracing::debug!(peer_id = %swarm.local_peer_id(), "Network layer initialized"); let (event_loop, mut event_loop_handle) = - EventLoop::new(swap_id, swarm, seller_peer_id, env_config)?; + EventLoop::new(swap_id, swarm, seller_peer_id)?; let event_loop = tokio::spawn(event_loop.run()); let max_givable = || bitcoin_wallet.max_giveable(TxLock::script_size()); @@ -276,8 +276,7 @@ async fn main() -> Result<()> { .add_address(seller_peer_id, seller_address); } - let (event_loop, event_loop_handle) = - EventLoop::new(swap_id, swarm, seller_peer_id, env_config)?; + let (event_loop, event_loop_handle) = EventLoop::new(swap_id, swarm, seller_peer_id)?; let handle = tokio::spawn(event_loop.run()); let monero_receive_address = db.get_monero_address(swap_id).await?; diff --git a/swap/src/bitcoin.rs b/swap/src/bitcoin.rs index 53fc5197..cc9095e3 100644 --- a/swap/src/bitcoin.rs +++ b/swap/src/bitcoin.rs @@ -171,7 +171,7 @@ pub fn verify_sig( ) -> Result<()> { let ecdsa = ECDSA::verify_only(); - if ecdsa.verify(&verification_key.0, &transaction_sighash.into_inner(), &sig) { + if ecdsa.verify(&verification_key.0, &transaction_sighash.into_inner(), sig) { Ok(()) } else { bail!(InvalidSignature) @@ -194,7 +194,7 @@ pub fn verify_encsig( &verification_key.0, &encryption_key.0, &digest.into_inner(), - &encsig, + encsig, ) { Ok(()) } else { @@ -213,7 +213,7 @@ pub fn build_shared_output_descriptor(A: Point, B: Point) -> Descriptor::from_str(&miniscript) diff --git a/swap/src/bitcoin/lock.rs b/swap/src/bitcoin/lock.rs index ea6c5cdd..c9efff2b 100644 --- a/swap/src/bitcoin/lock.rs +++ b/swap/src/bitcoin/lock.rs @@ -200,9 +200,10 @@ mod tests { #[tokio::test] async fn bob_can_fund_without_a_change_output() { let (A, B) = alice_and_bob(); - let fees = 610; + let fees = 300; let agreed_amount = Amount::from_sat(10000); - let wallet = WalletBuilder::new(agreed_amount.as_sat() + fees).build(); + let amount = agreed_amount.as_sat() + fees; + let wallet = WalletBuilder::new(amount).build(); let psbt = bob_make_psbt(A, B, &wallet, agreed_amount).await; assert_eq!( @@ -262,7 +263,7 @@ mod tests { amount: Amount, ) -> PartiallySignedTransaction { let change = wallet.new_address().await.unwrap(); - TxLock::new(&wallet, amount, A, B, change) + TxLock::new(wallet, amount, A, B, change) .await .unwrap() .into() diff --git a/swap/src/bitcoin/redeem.rs b/swap/src/bitcoin/redeem.rs index a244b0cd..8c8b502e 100644 --- a/swap/src/bitcoin/redeem.rs +++ b/swap/src/bitcoin/redeem.rs @@ -128,7 +128,7 @@ impl TxRedeem { let sig = sigs .into_iter() - .find(|sig| verify_sig(&B, &self.digest(), &sig).is_ok()) + .find(|sig| verify_sig(&B, &self.digest(), sig).is_ok()) .context("Neither signature on witness stack verifies against B")?; Ok(sig) diff --git a/swap/src/bitcoin/refund.rs b/swap/src/bitcoin/refund.rs index 6f6cade0..f5fb44c5 100644 --- a/swap/src/bitcoin/refund.rs +++ b/swap/src/bitcoin/refund.rs @@ -132,7 +132,7 @@ impl TxRefund { let sig = sigs .into_iter() - .find(|sig| verify_sig(&B, &self.digest(), &sig).is_ok()) + .find(|sig| verify_sig(&B, &self.digest(), sig).is_ok()) .context("Neither signature on witness stack verifies against B")?; Ok(sig) diff --git a/swap/src/bitcoin/wallet.rs b/swap/src/bitcoin/wallet.rs index d9631bf9..fc615911 100644 --- a/swap/src/bitcoin/wallet.rs +++ b/swap/src/bitcoin/wallet.rs @@ -102,7 +102,7 @@ impl Wallet { self.wallet .lock() .await - .broadcast(transaction) + .broadcast(&transaction) .with_context(|| { format!("Failed to broadcast Bitcoin {} transaction {}", kind, txid) })?; @@ -152,13 +152,13 @@ impl Wallet { ScriptStatus::Retrying } }; - + if new_status != ScriptStatus::Retrying { last_status = Some(print_status_change(txid, last_status, new_status)); let all_receivers_gone = sender.send(new_status).is_err(); - + if all_receivers_gone { tracing::debug!(%txid, "All receivers gone, removing subscription"); client.lock().await.subscriptions.remove(&(txid, script)); diff --git a/swap/src/cli/command.rs b/swap/src/cli/command.rs index f2d57ceb..7b1e34fb 100644 --- a/swap/src/cli/command.rs +++ b/swap/src/cli/command.rs @@ -41,7 +41,7 @@ pub struct Arguments { #[derive(Debug, PartialEq)] pub enum ParseResult { /// The arguments we were invoked in. - Arguments(Arguments), + Arguments(Box), /// A flag or command was given that does not need further processing other /// than printing the provided message. /// @@ -260,7 +260,7 @@ where }, }; - Ok(ParseResult::Arguments(arguments)) + Ok(ParseResult::Arguments(Box::new(arguments))) } #[derive(Debug, PartialEq)] @@ -693,7 +693,8 @@ mod tests { MULTI_ADDRESS, ]; - let expected_args = ParseResult::Arguments(Arguments::buy_xmr_mainnet_defaults()); + let expected_args = + ParseResult::Arguments(Arguments::buy_xmr_mainnet_defaults().into_boxed()); let args = parse_args_and_apply_defaults(raw_ars).unwrap(); assert_eq!(expected_args, args); @@ -717,7 +718,7 @@ mod tests { assert_eq!( args, - ParseResult::Arguments(Arguments::buy_xmr_testnet_defaults()) + ParseResult::Arguments(Arguments::buy_xmr_testnet_defaults().into_boxed()) ); } @@ -778,7 +779,7 @@ mod tests { assert_eq!( args, - ParseResult::Arguments(Arguments::resume_mainnet_defaults()) + ParseResult::Arguments(Arguments::resume_mainnet_defaults().into_boxed()) ); } @@ -790,7 +791,7 @@ mod tests { assert_eq!( args, - ParseResult::Arguments(Arguments::resume_testnet_defaults()) + ParseResult::Arguments(Arguments::resume_testnet_defaults().into_boxed()) ); } @@ -802,7 +803,7 @@ mod tests { assert_eq!( args, - ParseResult::Arguments(Arguments::cancel_mainnet_defaults()) + ParseResult::Arguments(Arguments::cancel_mainnet_defaults().into_boxed()) ); } @@ -814,7 +815,7 @@ mod tests { assert_eq!( args, - ParseResult::Arguments(Arguments::cancel_testnet_defaults()) + ParseResult::Arguments(Arguments::cancel_testnet_defaults().into_boxed()) ); } @@ -826,7 +827,7 @@ mod tests { assert_eq!( args, - ParseResult::Arguments(Arguments::refund_mainnet_defaults()) + ParseResult::Arguments(Arguments::refund_mainnet_defaults().into_boxed()) ); } @@ -838,7 +839,7 @@ mod tests { assert_eq!( args, - ParseResult::Arguments(Arguments::refund_testnet_defaults()) + ParseResult::Arguments(Arguments::refund_testnet_defaults().into_boxed()) ); } @@ -866,6 +867,7 @@ mod tests { ParseResult::Arguments( Arguments::buy_xmr_mainnet_defaults() .with_data_dir(PathBuf::from_str(data_dir).unwrap().join("mainnet")) + .into_boxed() ) ); @@ -890,6 +892,7 @@ mod tests { ParseResult::Arguments( Arguments::buy_xmr_testnet_defaults() .with_data_dir(PathBuf::from_str(data_dir).unwrap().join("testnet")) + .into_boxed() ) ); @@ -909,6 +912,7 @@ mod tests { ParseResult::Arguments( Arguments::resume_mainnet_defaults() .with_data_dir(PathBuf::from_str(data_dir).unwrap().join("mainnet")) + .into_boxed() ) ); @@ -929,6 +933,7 @@ mod tests { ParseResult::Arguments( Arguments::resume_testnet_defaults() .with_data_dir(PathBuf::from_str(data_dir).unwrap().join("testnet")) + .into_boxed() ) ); } @@ -950,7 +955,11 @@ mod tests { let args = parse_args_and_apply_defaults(raw_ars).unwrap(); assert_eq!( args, - ParseResult::Arguments(Arguments::buy_xmr_mainnet_defaults().with_debug()) + ParseResult::Arguments( + Arguments::buy_xmr_mainnet_defaults() + .with_debug() + .into_boxed() + ) ); let raw_ars = vec![ @@ -969,7 +978,11 @@ mod tests { let args = parse_args_and_apply_defaults(raw_ars).unwrap(); assert_eq!( args, - ParseResult::Arguments(Arguments::buy_xmr_testnet_defaults().with_debug()) + ParseResult::Arguments( + Arguments::buy_xmr_testnet_defaults() + .with_debug() + .into_boxed() + ) ); let raw_ars = vec![BINARY_NAME, "--debug", "resume", "--swap-id", SWAP_ID]; @@ -977,7 +990,11 @@ mod tests { let args = parse_args_and_apply_defaults(raw_ars).unwrap(); assert_eq!( args, - ParseResult::Arguments(Arguments::resume_mainnet_defaults().with_debug()) + ParseResult::Arguments( + Arguments::resume_mainnet_defaults() + .with_debug() + .into_boxed() + ) ); let raw_ars = vec![ @@ -992,7 +1009,11 @@ mod tests { let args = parse_args_and_apply_defaults(raw_ars).unwrap(); assert_eq!( args, - ParseResult::Arguments(Arguments::resume_testnet_defaults().with_debug()) + ParseResult::Arguments( + Arguments::resume_testnet_defaults() + .with_debug() + .into_boxed() + ) ); } @@ -1013,7 +1034,11 @@ mod tests { let args = parse_args_and_apply_defaults(raw_ars).unwrap(); assert_eq!( args, - ParseResult::Arguments(Arguments::buy_xmr_mainnet_defaults().with_json()) + ParseResult::Arguments( + Arguments::buy_xmr_mainnet_defaults() + .with_json() + .into_boxed() + ) ); let raw_ars = vec![ @@ -1032,7 +1057,11 @@ mod tests { let args = parse_args_and_apply_defaults(raw_ars).unwrap(); assert_eq!( args, - ParseResult::Arguments(Arguments::buy_xmr_testnet_defaults().with_json()) + ParseResult::Arguments( + Arguments::buy_xmr_testnet_defaults() + .with_json() + .into_boxed() + ) ); let raw_ars = vec![BINARY_NAME, "--json", "resume", "--swap-id", SWAP_ID]; @@ -1040,7 +1069,11 @@ mod tests { let args = parse_args_and_apply_defaults(raw_ars).unwrap(); assert_eq!( args, - ParseResult::Arguments(Arguments::resume_mainnet_defaults().with_json()) + ParseResult::Arguments( + Arguments::resume_mainnet_defaults() + .with_json() + .into_boxed() + ) ); let raw_ars = vec![ @@ -1055,7 +1088,11 @@ mod tests { let args = parse_args_and_apply_defaults(raw_ars).unwrap(); assert_eq!( args, - ParseResult::Arguments(Arguments::resume_testnet_defaults().with_json()) + ParseResult::Arguments( + Arguments::resume_testnet_defaults() + .with_json() + .into_boxed() + ) ); } @@ -1303,6 +1340,10 @@ mod tests { self.json = true; self } + + pub fn into_boxed(self) -> Box { + Box::new(self) + } } fn data_dir_path_cli() -> PathBuf { diff --git a/swap/src/cli/event_loop.rs b/swap/src/cli/event_loop.rs index d8c0d453..3d376449 100644 --- a/swap/src/cli/event_loop.rs +++ b/swap/src/cli/event_loop.rs @@ -1,10 +1,10 @@ use crate::bitcoin::EncryptedSignature; use crate::cli::behaviour::{Behaviour, OutEvent}; +use crate::monero; use crate::network::encrypted_signature; use crate::network::quote::BidQuote; use crate::network::swap_setup::bob::NewSwap; use crate::protocol::bob::State2; -use crate::{env, monero}; use anyhow::{Context, Result}; use futures::future::{BoxFuture, OptionFuture}; use futures::{FutureExt, StreamExt}; @@ -50,7 +50,6 @@ impl EventLoop { swap_id: Uuid, swarm: Swarm, alice_peer_id: PeerId, - env_config: env::Config, ) -> Result<(Self, EventLoopHandle)> { let execution_setup = bmrng::channel_with_timeout(1, Duration::from_secs(60)); let transfer_proof = bmrng::channel_with_timeout(1, Duration::from_secs(60)); @@ -76,7 +75,6 @@ impl EventLoop { transfer_proof: transfer_proof.1, encrypted_signature: encrypted_signature.0, quote: quote.0, - env_config, }; Ok((event_loop, handle)) @@ -220,7 +218,6 @@ pub struct EventLoopHandle { transfer_proof: bmrng::RequestReceiver, encrypted_signature: bmrng::RequestSender, quote: bmrng::RequestSender<(), BidQuote>, - env_config: env::Config, } impl EventLoopHandle { diff --git a/swap/src/cli/list_sellers.rs b/swap/src/cli/list_sellers.rs index 84a9887d..90816e2f 100644 --- a/swap/src/cli/list_sellers.rs +++ b/swap/src/cli/list_sellers.rs @@ -271,7 +271,7 @@ impl EventLoop { QuoteStatus::Received(Status::Online(quote)) => { let address = self .reachable_asb_address - .get(&peer_id) + .get(peer_id) .expect("if we got a quote we must have stored an address"); Ok(Seller { @@ -282,7 +282,7 @@ impl EventLoop { QuoteStatus::Received(Status::Unreachable) => { let address = self .unreachable_asb_address - .get(&peer_id) + .get(peer_id) .expect("if we got a quote we must have stored an address"); Ok(Seller { diff --git a/swap/src/env.rs b/swap/src/env.rs index 273eec49..8ed861b4 100644 --- a/swap/src/env.rs +++ b/swap/src/env.rs @@ -138,7 +138,7 @@ mod monero_network { Network::Stagenet => "stagenet", Network::Testnet => "testnet", }; - s.serialize_str(&str) + s.serialize_str(str) } } diff --git a/swap/src/kraken.rs b/swap/src/kraken.rs index 4a47bf9c..9e43ac2c 100644 --- a/swap/src/kraken.rs +++ b/swap/src/kraken.rs @@ -45,7 +45,7 @@ pub fn connect(price_ticker_ws_url: Url) -> Result { } } - Err(backoff::Error::Transient(anyhow!("stream ended"))) + Err(backoff::Error::transient(anyhow!("stream ended"))) } }, |error, next: Duration| { @@ -108,8 +108,8 @@ fn to_backoff(e: connection::Error) -> backoff::Error { match e { // Connection closures and websocket errors will be retried - connection::Error::ConnectionClosed => Transient(anyhow::Error::from(e)), - connection::Error::WebSocket(_) => Transient(anyhow::Error::from(e)), + connection::Error::ConnectionClosed => backoff::Error::transient(anyhow::Error::from(e)), + connection::Error::WebSocket(_) => backoff::Error::transient(anyhow::Error::from(e)), // Failures while parsing a message are permanent because they most likely present a // programmer error @@ -275,8 +275,6 @@ mod wire { pub struct TickerData { #[serde(rename = "a")] ask: Vec, - #[serde(rename = "b")] - bid: Vec, } #[derive(Debug, Deserialize)] diff --git a/swap/src/proptest.rs b/swap/src/proptest.rs index 41b28785..0a7ab460 100644 --- a/swap/src/proptest.rs +++ b/swap/src/proptest.rs @@ -6,7 +6,7 @@ pub mod ecdsa_fun { use ::ecdsa_fun::fun::{Point, Scalar, G}; pub fn point() -> impl Strategy { - scalar().prop_map(|mut scalar| Point::from_scalar_mul(&G, &mut scalar).mark::()) + scalar().prop_map(|mut scalar| Point::from_scalar_mul(G, &mut scalar).mark::()) } pub fn scalar() -> impl Strategy { diff --git a/swap/tests/harness/bitcoind.rs b/swap/tests/harness/bitcoind.rs index 9f1fcd03..13aa5658 100644 --- a/swap/tests/harness/bitcoind.rs +++ b/swap/tests/harness/bitcoind.rs @@ -29,7 +29,7 @@ impl Image for Bitcoind { container .logs() .stdout - .wait_for_message(&"init message: Done loading") + .wait_for_message("init message: Done loading") .unwrap(); } diff --git a/swap/tests/harness/electrs.rs b/swap/tests/harness/electrs.rs index 46eff15a..538fbf27 100644 --- a/swap/tests/harness/electrs.rs +++ b/swap/tests/harness/electrs.rs @@ -14,7 +14,6 @@ pub struct Electrs { entrypoint: Option, wait_for_message: String, volume: String, - bitcoind_container_name: String, } impl Image for Electrs { @@ -73,7 +72,6 @@ impl Default for Electrs { entrypoint: Some("/build/electrs".into()), wait_for_message: "Running accept thread".to_string(), volume: uuid::Uuid::new_v4().to_string(), - bitcoind_container_name: uuid::Uuid::new_v4().to_string(), } } } diff --git a/swap/tests/harness/mod.rs b/swap/tests/harness/mod.rs index e50cfe2f..b23201e0 100644 --- a/swap/tests/harness/mod.rs +++ b/swap/tests/harness/mod.rs @@ -146,14 +146,14 @@ async fn init_containers(cli: &Cli) -> (Monero, Containers<'_>) { let prefix = random_prefix(); let bitcoind_name = format!("{}_{}", prefix, "bitcoind"); let (bitcoind, bitcoind_url) = - init_bitcoind_container(&cli, prefix.clone(), bitcoind_name.clone(), prefix.clone()) + init_bitcoind_container(cli, prefix.clone(), bitcoind_name.clone(), prefix.clone()) .await .expect("could not init bitcoind"); - let electrs = init_electrs_container(&cli, prefix.clone(), bitcoind_name, prefix) + let electrs = init_electrs_container(cli, prefix.clone(), bitcoind_name, prefix) .await .expect("could not init electrs"); let (monero, monerod_container, monero_wallet_rpc_containers) = - Monero::new(&cli, vec![MONERO_WALLET_NAME_ALICE, MONERO_WALLET_NAME_BOB]) + Monero::new(cli, vec![MONERO_WALLET_NAME_ALICE, MONERO_WALLET_NAME_BOB]) .await .unwrap(); @@ -237,7 +237,7 @@ async fn start_alice( let resume_only = false; let mut swarm = swarm::asb( - &seed, + seed, min_buy, max_buy, latest_rate, @@ -485,7 +485,7 @@ impl BobParams { .behaviour_mut() .add_address(self.alice_peer_id, self.alice_address.clone()); - cli::EventLoop::new(swap_id, swarm, self.alice_peer_id, self.env_config) + cli::EventLoop::new(swap_id, swarm, self.alice_peer_id) } } From a8fe817d9e5af491ca9bac4afb3e64c08bab2caf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Mar 2022 11:24:56 +0000 Subject: [PATCH 13/35] Bump async-compression from 0.3.8 to 0.3.12 Bumps [async-compression](https://github.com/Nemo157/async-compression) from 0.3.8 to 0.3.12. - [Release notes](https://github.com/Nemo157/async-compression/releases) - [Commits](https://github.com/Nemo157/async-compression/compare/0.3.8...0.3.12) --- updated-dependencies: - dependency-name: async-compression dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 97cb88ce..3e450e08 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -104,9 +104,9 @@ checksum = "9d6e24d2cce90c53b948c46271bfb053e4bdc2db9b5d3f65e20f8cf28a1b7fc3" [[package]] name = "async-compression" -version = "0.3.8" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443ccbb270374a2b1055fc72da40e1f237809cd6bb0e97e66d264cd138473a6" +checksum = "f2bf394cfbbe876f0ac67b13b6ca819f9c9f2fb9ec67223cceb1555fbab1c31a" dependencies = [ "bzip2", "futures-core", From 61177afcdbb42697d8383e349b18a04e4776345d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Mar 2022 11:25:12 +0000 Subject: [PATCH 14/35] 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] --- Cargo.lock | 53 ++++++++++++++++++----------------------------------- 1 file changed, 18 insertions(+), 35 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 97cb88ce..64865659 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1141,9 +1141,9 @@ checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" [[package]] name = "futures" -version = "0.3.17" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12aa0eb539080d55c3f2d45a67c3b58b6b0773c1a3ca2dfec66d58c97fd66ca" +checksum = "f73fe65f54d1e12b726f517d3e2135ca3125a437b6d998caf1962961f7172d9e" dependencies = [ "futures-channel", "futures-core", @@ -1156,9 +1156,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.17" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5da6ba8c3bb3c165d3c7319fc1cc8304facf1fb8db99c5de877183c08a273888" +checksum = "c3083ce4b914124575708913bca19bfe887522d6e2e6d0952943f5eac4a74010" dependencies = [ "futures-core", "futures-sink", @@ -1166,15 +1166,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.17" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d1c26957f23603395cd326b0ffe64124b818f4449552f960d815cfba83a53d" +checksum = "0c09fd04b7e4073ac7156a9539b57a484a8ea920f79c7c675d05d289ab6110d3" [[package]] name = "futures-executor" -version = "0.3.17" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45025be030969d763025784f7f355043dc6bc74093e4ecc5000ca4dc50d8745c" +checksum = "9420b90cfa29e327d0429f19be13e7ddb68fa1cccb09d65e5706b8c7a749b8a6" dependencies = [ "futures-core", "futures-task", @@ -1195,18 +1195,16 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.17" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "522de2a0fe3e380f1bc577ba0474108faf3f6b18321dbf60b3b9c39a75073377" +checksum = "fc4045962a5a5e935ee2fdedaa4e08284547402885ab326734432bed5d12966b" [[package]] name = "futures-macro" -version = "0.3.17" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18e4a4b95cea4b4ccbcf1c5675ca7c4ee4e9e75eb79944d07defde18068f79bb" +checksum = "33c1e13800337f4d4d7a316bf45a567dbcb6ffe087f16424852d97e97a91f512" dependencies = [ - "autocfg 1.0.1", - "proc-macro-hack", "proc-macro2", "quote", "syn", @@ -1225,15 +1223,15 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.17" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36ea153c13024fe480590b3e3d4cad89a0cfacecc24577b68f86c6ced9c2bc11" +checksum = "21163e139fa306126e6eedaf49ecdb4588f939600f0b1e770f4205ee4b7fa868" [[package]] name = "futures-task" -version = "0.3.17" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d3d00f4eddb73e498a54394f228cd55853bdf059259e8e7bc6e69d408892e99" +checksum = "57c66a976bf5909d801bbef33416c41372779507e7a6b3a5e25e4749c58f776a" [[package]] name = "futures-timer" @@ -1243,11 +1241,10 @@ checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" [[package]] name = "futures-util" -version = "0.3.17" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36568465210a3a6ee45e1f165136d68671471a501e632e9a98d96872222b5481" +checksum = "d8b7abd5d659d9b90c8cba917f6ec750a74e2dc23902ef9cd4cc8c8b22e6036a" dependencies = [ - "autocfg 1.0.1", "futures-channel", "futures-core", "futures-io", @@ -1257,8 +1254,6 @@ dependencies = [ "memchr", "pin-project-lite 0.2.8", "pin-utils", - "proc-macro-hack", - "proc-macro-nested", "slab", ] @@ -2777,18 +2772,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "proc-macro-hack" -version = "0.5.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" - -[[package]] -name = "proc-macro-nested" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" - [[package]] name = "proc-macro2" version = "1.0.27" From d7d6f9c3b5968d31e8abd7569f3b42cb3bf4fd44 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Mar 2022 11:25:43 +0000 Subject: [PATCH 15/35] 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] --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 97cb88ce..076b045c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3931,9 +3931,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "structopt" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40b9788f4202aa75c240ecc9c15c65185e6a39ccdeb0fd5d008b98825464c87c" +checksum = "0c6b5c64445ba8094a6ab0c3cd2ad323e07171012d9c98b0b15651daf1787a10" dependencies = [ "clap", "lazy_static", From fad5ffce347b4f69c6b3beb94a18f0e99eaf7d40 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Mar 2022 11:25:52 +0000 Subject: [PATCH 16/35] 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] --- Cargo.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 97cb88ce..853e89a2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3504,9 +3504,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.133" +version = "1.0.136" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97565067517b60e2d1ea8b268e59ce036de907ac523ad83a0475da04e818989a" +checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789" dependencies = [ "serde_derive", ] @@ -3533,9 +3533,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.133" +version = "1.0.136" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed201699328568d8d08208fdd080e3ff594e6c422e438b6705905da01005d537" +checksum = "08597e7152fcd306f41838ed3e37be9eaeed2b61c42e2117266a554fab4662f9" dependencies = [ "proc-macro2", "quote", From 5c23abfb29c49cb41f418905fd5af5fc5ce3e5cd Mon Sep 17 00:00:00 2001 From: leonardo Date: Tue, 8 Mar 2022 18:15:05 +0100 Subject: [PATCH 17/35] Change to rino nodes --- CHANGELOG.md | 3 ++- docs/asb/README.md | 2 +- monero-harness/src/image.rs | 4 ++-- swap/src/cli/command.rs | 4 ++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d6722ea7..fd52457b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- Change Monero nodes to [Rino tool nodes](https://community.rino.io/nodes.html) - Revert logs to use rfc3339 local time formatting. - Always write logs as JSON to files @@ -305,7 +306,7 @@ It is possible to migrate critical data from the old db to the sqlite but there - Fixed an issue where Alice would not verify if Bob's Bitcoin lock transaction is semantically correct, i.e. pays the agreed upon amount to an output owned by both of them. Fixing this required a **breaking change** on the network layer and hence old versions are not compatible with this version. -[Unreleased]: https://github.com/comit-network/xmr-btc-swap/compare/0.10.2...HEAD +[unreleased]: https://github.com/comit-network/xmr-btc-swap/compare/0.10.2...HEAD [0.10.2]: https://github.com/comit-network/xmr-btc-swap/compare/0.10.1...0.10.2 [0.10.1]: https://github.com/comit-network/xmr-btc-swap/compare/0.10.0...0.10.1 [0.10.0]: https://github.com/comit-network/xmr-btc-swap/compare/0.9.0...0.10.0 diff --git a/docs/asb/README.md b/docs/asb/README.md index 60fcdcf3..e39375a9 100644 --- a/docs/asb/README.md +++ b/docs/asb/README.md @@ -12,7 +12,7 @@ This quickstart guide assumes that you are running the software on testnet (i.e. 3. Run the ASB in terminal: `./asb --testnet start` 4. Follow the setup wizard in the terminal -Public Monero nodes for running the Monero Wallet RPC can be found [here](https://melo.tools/nodes.html). +Public Monero nodes for running the Monero Wallet RPC can be found [here](https://community.rino.io/nodes.html). Run `./asb --help` for more information. diff --git a/monero-harness/src/image.rs b/monero-harness/src/image.rs index 8422b16e..cf7efa47 100644 --- a/monero-harness/src/image.rs +++ b/monero-harness/src/image.rs @@ -25,7 +25,7 @@ impl Image for Monerod { type EntryPoint = str; fn descriptor(&self) -> String { - "melotools/monero:v0.17.2.0".to_owned() + "rinocommunity/monero:v0.17.2.0".to_owned() } fn wait_until_ready(&self, container: &Container<'_, D, Self>) { @@ -78,7 +78,7 @@ impl Image for MoneroWalletRpc { type EntryPoint = str; fn descriptor(&self) -> String { - "melotools/monero:v0.17.2.0".to_owned() + "rinocommunity/monero:v0.17.2.0".to_owned() } fn wait_until_ready(&self, container: &Container<'_, D, Self>) { diff --git a/swap/src/cli/command.rs b/swap/src/cli/command.rs index f2d57ceb..7899de18 100644 --- a/swap/src/cli/command.rs +++ b/swap/src/cli/command.rs @@ -15,8 +15,8 @@ use url::Url; use uuid::Uuid; // See: https://moneroworld.com/ -pub const DEFAULT_MONERO_DAEMON_ADDRESS: &str = "node.melo.tools:18081"; -pub const DEFAULT_MONERO_DAEMON_ADDRESS_STAGENET: &str = "stagenet.melo.tools:38081"; +pub const DEFAULT_MONERO_DAEMON_ADDRESS: &str = "node.community.rino.io:18081"; +pub const DEFAULT_MONERO_DAEMON_ADDRESS_STAGENET: &str = "stagenet.community.rino.io:38081"; // See: https://1209k.com/bitcoin-eye/ele.php?chain=btc const DEFAULT_ELECTRUM_RPC_URL: &str = "ssl://blockstream.info:700"; From 3133c7254b75b5af461ecdc8ad37ecef0f85fe48 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 23 Mar 2022 11:51:45 +0000 Subject: [PATCH 18/35] 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] --- Cargo.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 97cb88ce..eb7e7c81 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1495,9 +1495,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.5.1" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acd94fdbe1d4ff688b67b04eee2e17bd50995534a61539e45adfefb45e5e5503" +checksum = "9100414882e15fb7feccb4897e5f0ff0ff1ca7d1a86a23208ada4d7a18e6c6c4" [[package]] name = "httpdate" @@ -1507,9 +1507,9 @@ checksum = "05842d0d43232b23ccb7060ecb0f0626922c21f30012e97b767b30afd4a5d4b9" [[package]] name = "hyper" -version = "0.14.16" +version = "0.14.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7ec3e62bdc98a2f0393a5048e4c30ef659440ea6e0e572965103e72bd836f55" +checksum = "b26ae0a80afebe130861d90abf98e3814a4f28a4c6ffeb5ab8ebb2be311e0ef2" dependencies = [ "bytes", "futures-channel", @@ -1520,7 +1520,7 @@ dependencies = [ "http-body", "httparse", "httpdate", - "itoa 0.4.7", + "itoa 1.0.1", "pin-project-lite 0.2.8", "socket2 0.4.0", "tokio", From abcc553e50745653d4638793a654caf4529c7097 Mon Sep 17 00:00:00 2001 From: binarybaron <86064887+binarybaron@users.noreply.github.com> Date: Sat, 9 Apr 2022 19:39:49 +0200 Subject: [PATCH 19/35] Update dprint plugins to fix CI error --- dprint.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dprint.json b/dprint.json index c73d9690..3f1eab87 100644 --- a/dprint.json +++ b/dprint.json @@ -18,8 +18,8 @@ "includes": ["**/*.{md}", "**/*.{toml}", "**/*.{rs}"], "excludes": [ "target/" ], "plugins": [ - "https://plugins.dprint.dev/markdown-0.6.1.wasm", + "https://plugins.dprint.dev/markdown-0.13.1.wasm", "https://github.com/thomaseizinger/dprint-plugin-cargo-toml/releases/download/0.1.0/cargo-toml-0.1.0.wasm", - "https://plugins.dprint.dev/rustfmt-0.4.0.exe-plugin@c6bb223ef6e5e87580177f6461a0ab0554ac9ea6b54f78ea7ae8bf63b14f5bc2" + "https://plugins.dprint.dev/rustfmt-0.6.1.exe-plugin@99b89a0599fd3a63e597e03436862157901f3facae2f0c2fbd0b9f656cdbc2a5" ] } From ac186de4c969e2c70c4623cf666835b15eac327e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Apr 2022 12:09:59 +0000 Subject: [PATCH 20/35] Bump strum from 0.23.0 to 0.24.0 Bumps [strum](https://github.com/Peternator7/strum) from 0.23.0 to 0.24.0. - [Release notes](https://github.com/Peternator7/strum/releases) - [Changelog](https://github.com/Peternator7/strum/blob/master/CHANGELOG.md) - [Commits](https://github.com/Peternator7/strum/commits) --- updated-dependencies: - dependency-name: strum dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 118 ++++++++++++++++++++++++++---------------------- swap/Cargo.toml | 2 +- 2 files changed, 64 insertions(+), 56 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 97cb88ce..af58c4dc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -573,8 +573,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b103d85ca6e209388771bfb7aa6b68a7aeec4afbf6f0a0264bfbf50360e5212e" dependencies = [ "crossterm", - "strum", - "strum_macros", + "strum 0.23.0", + "strum_macros 0.23.0", "unicode-width", ] @@ -1029,7 +1029,7 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c5f0096a91d210159eceb2ff5e1c4da18388a170e1e3ce948aac9c8fdbbf595" dependencies = [ - "heck", + "heck 0.3.2", "proc-macro2", "quote", "syn", @@ -1141,9 +1141,9 @@ checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" [[package]] name = "futures" -version = "0.3.17" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12aa0eb539080d55c3f2d45a67c3b58b6b0773c1a3ca2dfec66d58c97fd66ca" +checksum = "f73fe65f54d1e12b726f517d3e2135ca3125a437b6d998caf1962961f7172d9e" dependencies = [ "futures-channel", "futures-core", @@ -1156,9 +1156,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.17" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5da6ba8c3bb3c165d3c7319fc1cc8304facf1fb8db99c5de877183c08a273888" +checksum = "c3083ce4b914124575708913bca19bfe887522d6e2e6d0952943f5eac4a74010" dependencies = [ "futures-core", "futures-sink", @@ -1166,15 +1166,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.17" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d1c26957f23603395cd326b0ffe64124b818f4449552f960d815cfba83a53d" +checksum = "0c09fd04b7e4073ac7156a9539b57a484a8ea920f79c7c675d05d289ab6110d3" [[package]] name = "futures-executor" -version = "0.3.17" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45025be030969d763025784f7f355043dc6bc74093e4ecc5000ca4dc50d8745c" +checksum = "9420b90cfa29e327d0429f19be13e7ddb68fa1cccb09d65e5706b8c7a749b8a6" dependencies = [ "futures-core", "futures-task", @@ -1195,18 +1195,16 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.17" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "522de2a0fe3e380f1bc577ba0474108faf3f6b18321dbf60b3b9c39a75073377" +checksum = "fc4045962a5a5e935ee2fdedaa4e08284547402885ab326734432bed5d12966b" [[package]] name = "futures-macro" -version = "0.3.17" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18e4a4b95cea4b4ccbcf1c5675ca7c4ee4e9e75eb79944d07defde18068f79bb" +checksum = "33c1e13800337f4d4d7a316bf45a567dbcb6ffe087f16424852d97e97a91f512" dependencies = [ - "autocfg 1.0.1", - "proc-macro-hack", "proc-macro2", "quote", "syn", @@ -1225,15 +1223,15 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.17" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36ea153c13024fe480590b3e3d4cad89a0cfacecc24577b68f86c6ced9c2bc11" +checksum = "21163e139fa306126e6eedaf49ecdb4588f939600f0b1e770f4205ee4b7fa868" [[package]] name = "futures-task" -version = "0.3.17" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d3d00f4eddb73e498a54394f228cd55853bdf059259e8e7bc6e69d408892e99" +checksum = "57c66a976bf5909d801bbef33416c41372779507e7a6b3a5e25e4749c58f776a" [[package]] name = "futures-timer" @@ -1243,11 +1241,10 @@ checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" [[package]] name = "futures-util" -version = "0.3.17" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36568465210a3a6ee45e1f165136d68671471a501e632e9a98d96872222b5481" +checksum = "d8b7abd5d659d9b90c8cba917f6ec750a74e2dc23902ef9cd4cc8c8b22e6036a" dependencies = [ - "autocfg 1.0.1", "futures-channel", "futures-core", "futures-io", @@ -1257,8 +1254,6 @@ dependencies = [ "memchr", "pin-project-lite 0.2.8", "pin-utils", - "proc-macro-hack", - "proc-macro-nested", "slab", ] @@ -1399,6 +1394,12 @@ dependencies = [ "unicode-segmentation", ] +[[package]] +name = "heck" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" + [[package]] name = "hermit-abi" version = "0.1.18" @@ -1495,9 +1496,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.5.1" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acd94fdbe1d4ff688b67b04eee2e17bd50995534a61539e45adfefb45e5e5503" +checksum = "9100414882e15fb7feccb4897e5f0ff0ff1ca7d1a86a23208ada4d7a18e6c6c4" [[package]] name = "httpdate" @@ -1507,9 +1508,9 @@ checksum = "05842d0d43232b23ccb7060ecb0f0626922c21f30012e97b767b30afd4a5d4b9" [[package]] name = "hyper" -version = "0.14.16" +version = "0.14.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7ec3e62bdc98a2f0393a5048e4c30ef659440ea6e0e572965103e72bd836f55" +checksum = "b26ae0a80afebe130861d90abf98e3814a4f28a4c6ffeb5ab8ebb2be311e0ef2" dependencies = [ "bytes", "futures-channel", @@ -1520,7 +1521,7 @@ dependencies = [ "http-body", "httparse", "httpdate", - "itoa 0.4.7", + "itoa 1.0.1", "pin-project-lite 0.2.8", "socket2 0.4.0", "tokio", @@ -2777,18 +2778,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "proc-macro-hack" -version = "0.5.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" - -[[package]] -name = "proc-macro-nested" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" - [[package]] name = "proc-macro2" version = "1.0.27" @@ -2835,7 +2824,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "355f634b43cdd80724ee7848f95770e7e70eefa6dcf14fea676216573b8fd603" dependencies = [ "bytes", - "heck", + "heck 0.3.2", "itertools", "log", "multimap", @@ -3504,9 +3493,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.133" +version = "1.0.136" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97565067517b60e2d1ea8b268e59ce036de907ac523ad83a0475da04e818989a" +checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789" dependencies = [ "serde_derive", ] @@ -3533,9 +3522,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.133" +version = "1.0.136" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed201699328568d8d08208fdd080e3ff594e6c422e438b6705905da01005d537" +checksum = "08597e7152fcd306f41838ed3e37be9eaeed2b61c42e2117266a554fab4662f9" dependencies = [ "proc-macro2", "quote", @@ -3870,7 +3859,7 @@ checksum = "584866c833511b1a152e87a7ee20dee2739746f60c858b3c5209150bc4b466f5" dependencies = [ "dotenv", "either", - "heck", + "heck 0.3.2", "hex", "once_cell", "proc-macro2", @@ -3931,9 +3920,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "structopt" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40b9788f4202aa75c240ecc9c15c65185e6a39ccdeb0fd5d008b98825464c87c" +checksum = "0c6b5c64445ba8094a6ab0c3cd2ad323e07171012d9c98b0b15651daf1787a10" dependencies = [ "clap", "lazy_static", @@ -3946,7 +3935,7 @@ version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcb5ae327f9cc13b68763b5749770cb9e048a99bd9dfdfa58d0cf05d5f64afe0" dependencies = [ - "heck", + "heck 0.3.2", "proc-macro-error", "proc-macro2", "quote", @@ -3958,8 +3947,14 @@ name = "strum" version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cae14b91c7d11c9a851d3fbc80a963198998c2a64eec840477fa92d8ce9b70bb" + +[[package]] +name = "strum" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e96acfc1b70604b8b2f1ffa4c57e59176c7dbb05d556c71ecd2f5498a1dee7f8" dependencies = [ - "strum_macros", + "strum_macros 0.24.0", ] [[package]] @@ -3968,7 +3963,20 @@ version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00ad150e9d51e33e8142984f577662c1324d49f3be45ed37bac8645fdcbe0fe5" dependencies = [ - "heck", + "heck 0.3.2", + "proc-macro2", + "quote", + "rustversion", + "syn", +] + +[[package]] +name = "strum_macros" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6878079b17446e4d3eba6192bb0a2950d5b14f0ed8424b852310e5a94345d0ef" +dependencies = [ + "heck 0.4.0", "proc-macro2", "quote", "rustversion", @@ -4038,7 +4046,7 @@ dependencies = [ "spectral", "sqlx", "structopt", - "strum", + "strum 0.24.0", "tempfile", "testcontainers 0.12.0", "thiserror", diff --git a/swap/Cargo.toml b/swap/Cargo.toml index c631260a..e05b0645 100644 --- a/swap/Cargo.toml +++ b/swap/Cargo.toml @@ -50,7 +50,7 @@ sha2 = "0.9" sigma_fun = { git = "https://github.com/LLFourn/secp256kfun", default-features = false, features = [ "ed25519", "serde" ] } sqlx = { version = "0.5", features = [ "sqlite", "runtime-tokio-rustls", "offline" ] } structopt = "0.3" -strum = { version = "0.23", features = [ "derive" ] } +strum = { version = "0.24", features = [ "derive" ] } thiserror = "1" time = "0.3" tokio = { version = "1", features = [ "rt-multi-thread", "time", "macros", "sync", "process", "fs", "net" ] } From 13aee8fe573c4df96cd78e2ed250987dcc0629e7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Apr 2022 12:10:06 +0000 Subject: [PATCH 21/35] Bump serde_with from 1.12.0 to 1.12.1 Bumps [serde_with](https://github.com/jonasbb/serde_with) from 1.12.0 to 1.12.1. - [Release notes](https://github.com/jonasbb/serde_with/releases) - [Commits](https://github.com/jonasbb/serde_with/compare/v1.12.0...v1.12.1) --- updated-dependencies: - dependency-name: serde_with dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 79 +++++++++++++++++++++--------------------------------- 1 file changed, 31 insertions(+), 48 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 97cb88ce..743348c2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1141,9 +1141,9 @@ checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" [[package]] name = "futures" -version = "0.3.17" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12aa0eb539080d55c3f2d45a67c3b58b6b0773c1a3ca2dfec66d58c97fd66ca" +checksum = "f73fe65f54d1e12b726f517d3e2135ca3125a437b6d998caf1962961f7172d9e" dependencies = [ "futures-channel", "futures-core", @@ -1156,9 +1156,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.17" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5da6ba8c3bb3c165d3c7319fc1cc8304facf1fb8db99c5de877183c08a273888" +checksum = "c3083ce4b914124575708913bca19bfe887522d6e2e6d0952943f5eac4a74010" dependencies = [ "futures-core", "futures-sink", @@ -1166,15 +1166,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.17" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d1c26957f23603395cd326b0ffe64124b818f4449552f960d815cfba83a53d" +checksum = "0c09fd04b7e4073ac7156a9539b57a484a8ea920f79c7c675d05d289ab6110d3" [[package]] name = "futures-executor" -version = "0.3.17" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45025be030969d763025784f7f355043dc6bc74093e4ecc5000ca4dc50d8745c" +checksum = "9420b90cfa29e327d0429f19be13e7ddb68fa1cccb09d65e5706b8c7a749b8a6" dependencies = [ "futures-core", "futures-task", @@ -1195,18 +1195,16 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.17" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "522de2a0fe3e380f1bc577ba0474108faf3f6b18321dbf60b3b9c39a75073377" +checksum = "fc4045962a5a5e935ee2fdedaa4e08284547402885ab326734432bed5d12966b" [[package]] name = "futures-macro" -version = "0.3.17" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18e4a4b95cea4b4ccbcf1c5675ca7c4ee4e9e75eb79944d07defde18068f79bb" +checksum = "33c1e13800337f4d4d7a316bf45a567dbcb6ffe087f16424852d97e97a91f512" dependencies = [ - "autocfg 1.0.1", - "proc-macro-hack", "proc-macro2", "quote", "syn", @@ -1225,15 +1223,15 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.17" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36ea153c13024fe480590b3e3d4cad89a0cfacecc24577b68f86c6ced9c2bc11" +checksum = "21163e139fa306126e6eedaf49ecdb4588f939600f0b1e770f4205ee4b7fa868" [[package]] name = "futures-task" -version = "0.3.17" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d3d00f4eddb73e498a54394f228cd55853bdf059259e8e7bc6e69d408892e99" +checksum = "57c66a976bf5909d801bbef33416c41372779507e7a6b3a5e25e4749c58f776a" [[package]] name = "futures-timer" @@ -1243,11 +1241,10 @@ checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" [[package]] name = "futures-util" -version = "0.3.17" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36568465210a3a6ee45e1f165136d68671471a501e632e9a98d96872222b5481" +checksum = "d8b7abd5d659d9b90c8cba917f6ec750a74e2dc23902ef9cd4cc8c8b22e6036a" dependencies = [ - "autocfg 1.0.1", "futures-channel", "futures-core", "futures-io", @@ -1257,8 +1254,6 @@ dependencies = [ "memchr", "pin-project-lite 0.2.8", "pin-utils", - "proc-macro-hack", - "proc-macro-nested", "slab", ] @@ -1495,9 +1490,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.5.1" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acd94fdbe1d4ff688b67b04eee2e17bd50995534a61539e45adfefb45e5e5503" +checksum = "9100414882e15fb7feccb4897e5f0ff0ff1ca7d1a86a23208ada4d7a18e6c6c4" [[package]] name = "httpdate" @@ -1507,9 +1502,9 @@ checksum = "05842d0d43232b23ccb7060ecb0f0626922c21f30012e97b767b30afd4a5d4b9" [[package]] name = "hyper" -version = "0.14.16" +version = "0.14.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7ec3e62bdc98a2f0393a5048e4c30ef659440ea6e0e572965103e72bd836f55" +checksum = "b26ae0a80afebe130861d90abf98e3814a4f28a4c6ffeb5ab8ebb2be311e0ef2" dependencies = [ "bytes", "futures-channel", @@ -1520,7 +1515,7 @@ dependencies = [ "http-body", "httparse", "httpdate", - "itoa 0.4.7", + "itoa 1.0.1", "pin-project-lite 0.2.8", "socket2 0.4.0", "tokio", @@ -2777,18 +2772,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "proc-macro-hack" -version = "0.5.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" - -[[package]] -name = "proc-macro-nested" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" - [[package]] name = "proc-macro2" version = "1.0.27" @@ -3504,9 +3487,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.133" +version = "1.0.136" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97565067517b60e2d1ea8b268e59ce036de907ac523ad83a0475da04e818989a" +checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789" dependencies = [ "serde_derive", ] @@ -3533,9 +3516,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.133" +version = "1.0.136" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed201699328568d8d08208fdd080e3ff594e6c422e438b6705905da01005d537" +checksum = "08597e7152fcd306f41838ed3e37be9eaeed2b61c42e2117266a554fab4662f9" dependencies = [ "proc-macro2", "quote", @@ -3568,9 +3551,9 @@ dependencies = [ [[package]] name = "serde_with" -version = "1.12.0" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec1e6ec4d8950e5b1e894eac0d360742f3b1407a6078a604a731c4b3f49cefbc" +checksum = "946fa04a8ac43ff78a1f4b811990afb9ddbdf5890b46d6dda0ba1998230138b7" dependencies = [ "rustversion", "serde", @@ -3931,9 +3914,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "structopt" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40b9788f4202aa75c240ecc9c15c65185e6a39ccdeb0fd5d008b98825464c87c" +checksum = "0c6b5c64445ba8094a6ab0c3cd2ad323e07171012d9c98b0b15651daf1787a10" dependencies = [ "clap", "lazy_static", From c24841df3625fec09e214b13bb1b3569cd7a9dd4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Apr 2022 12:10:12 +0000 Subject: [PATCH 22/35] Bump rust_decimal_macros from 1.22.0 to 1.23.1 Bumps [rust_decimal_macros](https://github.com/paupino/rust-decimal) from 1.22.0 to 1.23.1. - [Release notes](https://github.com/paupino/rust-decimal/releases) - [Commits](https://github.com/paupino/rust-decimal/compare/1.22.0...1.23.1) --- updated-dependencies: - dependency-name: rust_decimal_macros dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 83 ++++++++++++++++++++++-------------------------------- 1 file changed, 33 insertions(+), 50 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 97cb88ce..796d9c23 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1141,9 +1141,9 @@ checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" [[package]] name = "futures" -version = "0.3.17" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12aa0eb539080d55c3f2d45a67c3b58b6b0773c1a3ca2dfec66d58c97fd66ca" +checksum = "f73fe65f54d1e12b726f517d3e2135ca3125a437b6d998caf1962961f7172d9e" dependencies = [ "futures-channel", "futures-core", @@ -1156,9 +1156,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.17" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5da6ba8c3bb3c165d3c7319fc1cc8304facf1fb8db99c5de877183c08a273888" +checksum = "c3083ce4b914124575708913bca19bfe887522d6e2e6d0952943f5eac4a74010" dependencies = [ "futures-core", "futures-sink", @@ -1166,15 +1166,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.17" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d1c26957f23603395cd326b0ffe64124b818f4449552f960d815cfba83a53d" +checksum = "0c09fd04b7e4073ac7156a9539b57a484a8ea920f79c7c675d05d289ab6110d3" [[package]] name = "futures-executor" -version = "0.3.17" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45025be030969d763025784f7f355043dc6bc74093e4ecc5000ca4dc50d8745c" +checksum = "9420b90cfa29e327d0429f19be13e7ddb68fa1cccb09d65e5706b8c7a749b8a6" dependencies = [ "futures-core", "futures-task", @@ -1195,18 +1195,16 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.17" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "522de2a0fe3e380f1bc577ba0474108faf3f6b18321dbf60b3b9c39a75073377" +checksum = "fc4045962a5a5e935ee2fdedaa4e08284547402885ab326734432bed5d12966b" [[package]] name = "futures-macro" -version = "0.3.17" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18e4a4b95cea4b4ccbcf1c5675ca7c4ee4e9e75eb79944d07defde18068f79bb" +checksum = "33c1e13800337f4d4d7a316bf45a567dbcb6ffe087f16424852d97e97a91f512" dependencies = [ - "autocfg 1.0.1", - "proc-macro-hack", "proc-macro2", "quote", "syn", @@ -1225,15 +1223,15 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.17" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36ea153c13024fe480590b3e3d4cad89a0cfacecc24577b68f86c6ced9c2bc11" +checksum = "21163e139fa306126e6eedaf49ecdb4588f939600f0b1e770f4205ee4b7fa868" [[package]] name = "futures-task" -version = "0.3.17" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d3d00f4eddb73e498a54394f228cd55853bdf059259e8e7bc6e69d408892e99" +checksum = "57c66a976bf5909d801bbef33416c41372779507e7a6b3a5e25e4749c58f776a" [[package]] name = "futures-timer" @@ -1243,11 +1241,10 @@ checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" [[package]] name = "futures-util" -version = "0.3.17" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36568465210a3a6ee45e1f165136d68671471a501e632e9a98d96872222b5481" +checksum = "d8b7abd5d659d9b90c8cba917f6ec750a74e2dc23902ef9cd4cc8c8b22e6036a" dependencies = [ - "autocfg 1.0.1", "futures-channel", "futures-core", "futures-io", @@ -1257,8 +1254,6 @@ dependencies = [ "memchr", "pin-project-lite 0.2.8", "pin-utils", - "proc-macro-hack", - "proc-macro-nested", "slab", ] @@ -1495,9 +1490,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.5.1" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acd94fdbe1d4ff688b67b04eee2e17bd50995534a61539e45adfefb45e5e5503" +checksum = "9100414882e15fb7feccb4897e5f0ff0ff1ca7d1a86a23208ada4d7a18e6c6c4" [[package]] name = "httpdate" @@ -1507,9 +1502,9 @@ checksum = "05842d0d43232b23ccb7060ecb0f0626922c21f30012e97b767b30afd4a5d4b9" [[package]] name = "hyper" -version = "0.14.16" +version = "0.14.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7ec3e62bdc98a2f0393a5048e4c30ef659440ea6e0e572965103e72bd836f55" +checksum = "b26ae0a80afebe130861d90abf98e3814a4f28a4c6ffeb5ab8ebb2be311e0ef2" dependencies = [ "bytes", "futures-channel", @@ -1520,7 +1515,7 @@ dependencies = [ "http-body", "httparse", "httpdate", - "itoa 0.4.7", + "itoa 1.0.1", "pin-project-lite 0.2.8", "socket2 0.4.0", "tokio", @@ -2777,18 +2772,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "proc-macro-hack" -version = "0.5.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" - -[[package]] -name = "proc-macro-nested" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" - [[package]] name = "proc-macro2" version = "1.0.27" @@ -3249,9 +3232,9 @@ dependencies = [ [[package]] name = "rust_decimal" -version = "1.22.0" +version = "1.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d37baa70cf8662d2ba1c1868c5983dda16ef32b105cce41fb5c47e72936a90b3" +checksum = "22dc69eadbf0ee2110b8d20418c0c6edbaefec2811c4963dc17b6344e11fe0f8" dependencies = [ "arrayvec 0.7.2", "num-traits", @@ -3260,9 +3243,9 @@ dependencies = [ [[package]] name = "rust_decimal_macros" -version = "1.22.0" +version = "1.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "184abaf7b434800e1a5a8aad3ebc8cd7498df33af72d65371d797a264713a59b" +checksum = "a4c70be9367d4bc095d10b48d41b819d09ed4dafc528765a144d32ed1d530654" dependencies = [ "quote", "rust_decimal", @@ -3504,9 +3487,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.133" +version = "1.0.136" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97565067517b60e2d1ea8b268e59ce036de907ac523ad83a0475da04e818989a" +checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789" dependencies = [ "serde_derive", ] @@ -3533,9 +3516,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.133" +version = "1.0.136" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed201699328568d8d08208fdd080e3ff594e6c422e438b6705905da01005d537" +checksum = "08597e7152fcd306f41838ed3e37be9eaeed2b61c42e2117266a554fab4662f9" dependencies = [ "proc-macro2", "quote", @@ -3931,9 +3914,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "structopt" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40b9788f4202aa75c240ecc9c15c65185e6a39ccdeb0fd5d008b98825464c87c" +checksum = "0c6b5c64445ba8094a6ab0c3cd2ad323e07171012d9c98b0b15651daf1787a10" dependencies = [ "clap", "lazy_static", From 38744b8780ee7e1482aa0cb835f5d044ab426106 Mon Sep 17 00:00:00 2001 From: binarybaron <86064887+binarybaron@users.noreply.github.com> Date: Sat, 29 Jan 2022 14:27:04 +0100 Subject: [PATCH 23/35] 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. --- swap/src/protocol/bob/state.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/swap/src/protocol/bob/state.rs b/swap/src/protocol/bob/state.rs index baedbdba..90e5f9f8 100644 --- a/swap/src/protocol/bob/state.rs +++ b/swap/src/protocol/bob/state.rs @@ -659,8 +659,7 @@ impl State6 { pub async fn publish_refund_btc(&self, bitcoin_wallet: &bitcoin::Wallet) -> Result<()> { let signed_tx_refund = self.signed_refund_transaction()?; - let (_, subscription) = bitcoin_wallet.broadcast(signed_tx_refund, "refund").await?; - subscription.wait_until_final().await?; + bitcoin_wallet.broadcast(signed_tx_refund, "refund").await?; Ok(()) } From a82498669da3e61faf1f77c358190cef2813fdc3 Mon Sep 17 00:00:00 2001 From: binarybaron Date: Sun, 16 Jan 2022 14:29:12 +0100 Subject: [PATCH 24/35] Reduce required confirmations for Bitcoin transactions from 2 to 1 --- CHANGELOG.md | 1 + swap/src/env.rs | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c80f2fc..6c09cdce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Adjust quote based on Bitcoin balance. If the max_buy_btc in the ASB config is higher than the available balance to trade it will return the max available balance discounting the locking fees for monero, in the case the balance is lower than the min_buy_btc config it will return 0 to the CLI. If the ASB returns a quote of 0 the CLI will not allow you continue with a trade. +- Reduce required confirmations for Bitcoin transactions from 2 to 1 ## [0.10.2] - 2021-12-25 diff --git a/swap/src/env.rs b/swap/src/env.rs index 8ed861b4..73c6d665 100644 --- a/swap/src/env.rs +++ b/swap/src/env.rs @@ -48,7 +48,7 @@ impl GetConfig for Mainnet { Config { bitcoin_lock_mempool_timeout: 3.std_minutes(), bitcoin_lock_confirmed_timeout: 2.std_hours(), - bitcoin_finality_confirmations: 2, + bitcoin_finality_confirmations: 1, bitcoin_avg_block_time: 10.std_minutes(), bitcoin_cancel_timelock: CancelTimelock::new(72), bitcoin_punish_timelock: PunishTimelock::new(72), @@ -65,7 +65,7 @@ impl GetConfig for Testnet { Config { bitcoin_lock_mempool_timeout: 3.std_minutes(), bitcoin_lock_confirmed_timeout: 1.std_hours(), - bitcoin_finality_confirmations: 2, + bitcoin_finality_confirmations: 1, bitcoin_avg_block_time: 10.std_minutes(), bitcoin_cancel_timelock: CancelTimelock::new(12), bitcoin_punish_timelock: PunishTimelock::new(6), From 3660a08b96feefe6a37795c19b0063973c9dc917 Mon Sep 17 00:00:00 2001 From: binarybaron Date: Fri, 7 Jan 2022 01:17:36 +0100 Subject: [PATCH 25/35] Inform Bob that he has been punished --- swap/src/protocol/bob/swap.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/swap/src/protocol/bob/swap.rs b/swap/src/protocol/bob/swap.rs index f8367ca9..c82bf10e 100644 --- a/swap/src/protocol/bob/swap.rs +++ b/swap/src/protocol/bob/swap.rs @@ -278,9 +278,12 @@ async fn next_state( state.publish_refund_btc(bitcoin_wallet).await?; BobState::BtcRefunded(state) } - ExpiredTimelocks::Punish => BobState::BtcPunished { - tx_lock_id: state.tx_lock_id(), - }, + ExpiredTimelocks::Punish => { + tracing::info!("You have been punished for not refunding in time"); + BobState::BtcPunished { + tx_lock_id: state.tx_lock_id(), + } + } } } BobState::BtcRefunded(state4) => BobState::BtcRefunded(state4), From 3aa0082285d06b96b97a7d462e23e274102880e4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Apr 2022 10:46:08 +0000 Subject: [PATCH 26/35] Bump Swatinem/rust-cache from 1.3.0 to 1.4.0 Bumps [Swatinem/rust-cache](https://github.com/Swatinem/rust-cache) from 1.3.0 to 1.4.0. - [Release notes](https://github.com/Swatinem/rust-cache/releases) - [Changelog](https://github.com/Swatinem/rust-cache/blob/v1/CHANGELOG.md) - [Commits](https://github.com/Swatinem/rust-cache/compare/v1.3.0...v1.4.0) --- updated-dependencies: - dependency-name: Swatinem/rust-cache dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/build-release-binaries.yml | 2 +- .github/workflows/ci.yml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-release-binaries.yml b/.github/workflows/build-release-binaries.yml index a4a651e5..0296e1f5 100644 --- a/.github/workflows/build-release-binaries.yml +++ b/.github/workflows/build-release-binaries.yml @@ -50,7 +50,7 @@ jobs: ref: ${{ github.event.release.target_commitish }} token: ${{ secrets.BOTTY_GITHUB_TOKEN }} - - uses: Swatinem/rust-cache@v1.3.0 + - uses: Swatinem/rust-cache@v1.4.0 - name: Install compiler for armhf arch if: matrix.target == 'armv7-unknown-linux-gnueabihf' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 46246c84..bb837a7b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: - name: Checkout sources uses: actions/checkout@v2.4.0 - - uses: Swatinem/rust-cache@v1.3.0 + - uses: Swatinem/rust-cache@v1.4.0 - name: Check formatting uses: dprint/check@v2.0 @@ -44,7 +44,7 @@ jobs: - name: Checkout sources uses: actions/checkout@v2.4.0 - - uses: Swatinem/rust-cache@v1.3.0 + - uses: Swatinem/rust-cache@v1.4.0 - name: Install compiler for armhf arch if: matrix.target == 'armv7-unknown-linux-gnueabihf' @@ -77,7 +77,7 @@ jobs: - name: Checkout sources uses: actions/checkout@v2.4.0 - - uses: Swatinem/rust-cache@v1.3.0 + - uses: Swatinem/rust-cache@v1.4.0 - name: Build tests run: cargo build --tests --workspace --all-features @@ -113,7 +113,7 @@ jobs: - name: Checkout sources uses: actions/checkout@v2.4.0 - - uses: Swatinem/rust-cache@v1.3.0 + - uses: Swatinem/rust-cache@v1.4.0 - name: Run test ${{ matrix.test_name }} run: cargo test --package swap --all-features --test ${{ matrix.test_name }} -- --nocapture From ef3b0913beacddcb09015ee63c67d3e7ad05a231 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Apr 2022 10:46:14 +0000 Subject: [PATCH 27/35] Bump actions/checkout from 2.4.0 to 3.0.0 Bumps [actions/checkout](https://github.com/actions/checkout) from 2.4.0 to 3.0.0. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2.4.0...v3.0.0) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/build-release-binaries.yml | 2 +- .github/workflows/ci.yml | 8 ++++---- .github/workflows/create-release.yml | 2 +- .github/workflows/draft-new-release.yml | 2 +- .github/workflows/preview-release.yml | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-release-binaries.yml b/.github/workflows/build-release-binaries.yml index a4a651e5..9d7cc639 100644 --- a/.github/workflows/build-release-binaries.yml +++ b/.github/workflows/build-release-binaries.yml @@ -45,7 +45,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout tagged commit - uses: actions/checkout@v2.4.0 + uses: actions/checkout@v3.0.0 with: ref: ${{ github.event.release.target_commitish }} token: ${{ secrets.BOTTY_GITHUB_TOKEN }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 46246c84..52de60be 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout sources - uses: actions/checkout@v2.4.0 + uses: actions/checkout@v3.0.0 - uses: Swatinem/rust-cache@v1.3.0 @@ -42,7 +42,7 @@ jobs: steps: - name: Checkout sources - uses: actions/checkout@v2.4.0 + uses: actions/checkout@v3.0.0 - uses: Swatinem/rust-cache@v1.3.0 @@ -75,7 +75,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout sources - uses: actions/checkout@v2.4.0 + uses: actions/checkout@v3.0.0 - uses: Swatinem/rust-cache@v1.3.0 @@ -111,7 +111,7 @@ jobs: steps: - name: Checkout sources - uses: actions/checkout@v2.4.0 + uses: actions/checkout@v3.0.0 - uses: Swatinem/rust-cache@v1.3.0 diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index ee95935f..1e0209e9 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -11,7 +11,7 @@ jobs: if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release/') runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2.4.0 + - uses: actions/checkout@v3.0.0 - name: Extract version from branch name id: extract-version diff --git a/.github/workflows/draft-new-release.yml b/.github/workflows/draft-new-release.yml index bab5c85a..99d5a8b4 100644 --- a/.github/workflows/draft-new-release.yml +++ b/.github/workflows/draft-new-release.yml @@ -12,7 +12,7 @@ jobs: name: "Draft a new release" runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2.4.0 + - uses: actions/checkout@v3.0.0 with: token: ${{ secrets.BOTTY_GITHUB_TOKEN }} diff --git a/.github/workflows/preview-release.yml b/.github/workflows/preview-release.yml index a8207201..bdb4a639 100644 --- a/.github/workflows/preview-release.yml +++ b/.github/workflows/preview-release.yml @@ -10,7 +10,7 @@ jobs: name: Create preview release runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2.4.0 + - uses: actions/checkout@v3.0.0 - name: Delete 'preview' release uses: larryjoelane/delete-release-action@v1.0.24 From 173ff2a004b7665d2609b03aaf9455761242c11e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Apr 2022 10:46:32 +0000 Subject: [PATCH 28/35] Bump tracing from 0.1.29 to 0.1.33 Bumps [tracing](https://github.com/tokio-rs/tracing) from 0.1.29 to 0.1.33. - [Release notes](https://github.com/tokio-rs/tracing/releases) - [Commits](https://github.com/tokio-rs/tracing/compare/tracing-0.1.29...tracing-0.1.33) --- updated-dependencies: - dependency-name: tracing dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 72ee11dc..619f828a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4375,9 +4375,9 @@ checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" [[package]] name = "tracing" -version = "0.1.29" +version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "375a639232caf30edfc78e8d89b2d4c375515393e7af7e16f01cd96917fb2105" +checksum = "80b9fa4360528139bc96100c160b7ae879f5567f49f1782b0b02035b0358ebf3" dependencies = [ "cfg-if 1.0.0", "pin-project-lite 0.2.8", @@ -4398,9 +4398,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.18" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f480b8f81512e825f337ad51e94c1eb5d3bbdf2b363dcd01e2b19a9ffe3f8e" +checksum = "2e65ce065b4b5c53e73bb28912318cb8c9e9ad3921f1d669eb0e68b4c8143a2b" dependencies = [ "proc-macro2", "quote", @@ -4409,11 +4409,12 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.21" +version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f4ed65637b8390770814083d20756f87bfa2c21bf2f110babdc5438351746e4" +checksum = "6dfce9f3241b150f36e8e54bb561a742d5daa1a47b5dd9a5ce369fd4a4db2210" dependencies = [ "lazy_static", + "valuable", ] [[package]] @@ -4666,6 +4667,12 @@ dependencies = [ "serde", ] +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + [[package]] name = "vcpkg" version = "0.2.11" From e54ccc5c15be5e4ca045128e89af0d926d9d7ccf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Apr 2022 10:51:35 +0000 Subject: [PATCH 29/35] Bump serde_json from 1.0.74 to 1.0.79 Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.74 to 1.0.79. - [Release notes](https://github.com/serde-rs/json/releases) - [Commits](https://github.com/serde-rs/json/compare/v1.0.74...v1.0.79) --- updated-dependencies: - dependency-name: serde_json dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 72ee11dc..4ed49384 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3527,9 +3527,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.74" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee2bb9cd061c5865d345bb02ca49fcef1391741b672b54a0bf7b679badec3142" +checksum = "8e8d9fa5c3b304765ce1fd9c4c8a3de2c8db365a5b91be52f186efc675681d95" dependencies = [ "indexmap", "itoa 1.0.1", From 5dff9698bba91033bbc14cfe941e0c61ce24c636 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Apr 2022 10:53:03 +0000 Subject: [PATCH 30/35] Bump thomaseizinger/keep-a-changelog-new-release from 1.2.1 to 1.3.0 Bumps [thomaseizinger/keep-a-changelog-new-release](https://github.com/thomaseizinger/keep-a-changelog-new-release) from 1.2.1 to 1.3.0. - [Release notes](https://github.com/thomaseizinger/keep-a-changelog-new-release/releases) - [Changelog](https://github.com/thomaseizinger/keep-a-changelog-new-release/blob/master/CHANGELOG.md) - [Commits](https://github.com/thomaseizinger/keep-a-changelog-new-release/compare/1.2.1...1.3.0) --- updated-dependencies: - dependency-name: thomaseizinger/keep-a-changelog-new-release dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/draft-new-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/draft-new-release.yml b/.github/workflows/draft-new-release.yml index bab5c85a..493aeb72 100644 --- a/.github/workflows/draft-new-release.yml +++ b/.github/workflows/draft-new-release.yml @@ -20,7 +20,7 @@ jobs: run: git checkout -b release/${{ github.event.inputs.version }} - name: Update changelog - uses: thomaseizinger/keep-a-changelog-new-release@1.2.1 + uses: thomaseizinger/keep-a-changelog-new-release@1.3.0 with: version: ${{ github.event.inputs.version }} changelogPath: CHANGELOG.md From 249d0ac39dec022db7a52b5332ec19fcaf434849 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Apr 2022 14:10:19 +0000 Subject: [PATCH 31/35] Bump time from 0.3.7 to 0.3.9 Bumps [time](https://github.com/time-rs/time) from 0.3.7 to 0.3.9. - [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.7...v0.3.9) --- updated-dependencies: - dependency-name: time dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 88 +++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 60 insertions(+), 28 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 72ee11dc..77b285ad 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -104,9 +104,9 @@ checksum = "9d6e24d2cce90c53b948c46271bfb053e4bdc2db9b5d3f65e20f8cf28a1b7fc3" [[package]] name = "async-compression" -version = "0.3.8" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443ccbb270374a2b1055fc72da40e1f237809cd6bb0e97e66d264cd138473a6" +checksum = "f2bf394cfbbe876f0ac67b13b6ca819f9c9f2fb9ec67223cceb1555fbab1c31a" dependencies = [ "bzip2", "futures-core", @@ -573,8 +573,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b103d85ca6e209388771bfb7aa6b68a7aeec4afbf6f0a0264bfbf50360e5212e" dependencies = [ "crossterm", - "strum", - "strum_macros", + "strum 0.23.0", + "strum_macros 0.23.0", "unicode-width", ] @@ -1029,7 +1029,7 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c5f0096a91d210159eceb2ff5e1c4da18388a170e1e3ce948aac9c8fdbbf595" dependencies = [ - "heck", + "heck 0.3.2", "proc-macro2", "quote", "syn", @@ -1394,6 +1394,12 @@ dependencies = [ "unicode-segmentation", ] +[[package]] +name = "heck" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" + [[package]] name = "hermit-abi" version = "0.1.18" @@ -2818,7 +2824,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "355f634b43cdd80724ee7848f95770e7e70eefa6dcf14fea676216573b8fd603" dependencies = [ "bytes", - "heck", + "heck 0.3.2", "itertools", "log", "multimap", @@ -3232,9 +3238,9 @@ dependencies = [ [[package]] name = "rust_decimal" -version = "1.22.0" +version = "1.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d37baa70cf8662d2ba1c1868c5983dda16ef32b105cce41fb5c47e72936a90b3" +checksum = "22dc69eadbf0ee2110b8d20418c0c6edbaefec2811c4963dc17b6344e11fe0f8" dependencies = [ "arrayvec 0.7.2", "num-traits", @@ -3243,9 +3249,9 @@ dependencies = [ [[package]] name = "rust_decimal_macros" -version = "1.22.0" +version = "1.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "184abaf7b434800e1a5a8aad3ebc8cd7498df33af72d65371d797a264713a59b" +checksum = "a4c70be9367d4bc095d10b48d41b819d09ed4dafc528765a144d32ed1d530654" dependencies = [ "quote", "rust_decimal", @@ -3527,9 +3533,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.74" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee2bb9cd061c5865d345bb02ca49fcef1391741b672b54a0bf7b679badec3142" +checksum = "8e8d9fa5c3b304765ce1fd9c4c8a3de2c8db365a5b91be52f186efc675681d95" dependencies = [ "indexmap", "itoa 1.0.1", @@ -3551,9 +3557,9 @@ dependencies = [ [[package]] name = "serde_with" -version = "1.12.0" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec1e6ec4d8950e5b1e894eac0d360742f3b1407a6078a604a731c4b3f49cefbc" +checksum = "946fa04a8ac43ff78a1f4b811990afb9ddbdf5890b46d6dda0ba1998230138b7" dependencies = [ "rustversion", "serde", @@ -3853,7 +3859,7 @@ checksum = "584866c833511b1a152e87a7ee20dee2739746f60c858b3c5209150bc4b466f5" dependencies = [ "dotenv", "either", - "heck", + "heck 0.3.2", "hex", "once_cell", "proc-macro2", @@ -3929,7 +3935,7 @@ version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcb5ae327f9cc13b68763b5749770cb9e048a99bd9dfdfa58d0cf05d5f64afe0" dependencies = [ - "heck", + "heck 0.3.2", "proc-macro-error", "proc-macro2", "quote", @@ -3941,8 +3947,14 @@ name = "strum" version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cae14b91c7d11c9a851d3fbc80a963198998c2a64eec840477fa92d8ce9b70bb" + +[[package]] +name = "strum" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e96acfc1b70604b8b2f1ffa4c57e59176c7dbb05d556c71ecd2f5498a1dee7f8" dependencies = [ - "strum_macros", + "strum_macros 0.24.0", ] [[package]] @@ -3951,7 +3963,20 @@ version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00ad150e9d51e33e8142984f577662c1324d49f3be45ed37bac8645fdcbe0fe5" dependencies = [ - "heck", + "heck 0.3.2", + "proc-macro2", + "quote", + "rustversion", + "syn", +] + +[[package]] +name = "strum_macros" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6878079b17446e4d3eba6192bb0a2950d5b14f0ed8424b852310e5a94345d0ef" +dependencies = [ + "heck 0.4.0", "proc-macro2", "quote", "rustversion", @@ -4021,11 +4046,11 @@ dependencies = [ "spectral", "sqlx", "structopt", - "strum", + "strum 0.24.0", "tempfile", "testcontainers 0.12.0", "thiserror", - "time 0.3.7", + "time 0.3.9", "tokio", "tokio-socks", "tokio-tar", @@ -4172,9 +4197,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.7" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "004cbc98f30fa233c61a38bc77e96a9106e65c88f2d3bef182ae952027e5753d" +checksum = "c2702e08a7a860f005826c6815dcac101b19b5eb330c27fe4a5928fec1d20ddd" dependencies = [ "libc", "num_threads", @@ -4375,9 +4400,9 @@ checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" [[package]] name = "tracing" -version = "0.1.29" +version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "375a639232caf30edfc78e8d89b2d4c375515393e7af7e16f01cd96917fb2105" +checksum = "80b9fa4360528139bc96100c160b7ae879f5567f49f1782b0b02035b0358ebf3" dependencies = [ "cfg-if 1.0.0", "pin-project-lite 0.2.8", @@ -4398,9 +4423,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.18" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f480b8f81512e825f337ad51e94c1eb5d3bbdf2b363dcd01e2b19a9ffe3f8e" +checksum = "2e65ce065b4b5c53e73bb28912318cb8c9e9ad3921f1d669eb0e68b4c8143a2b" dependencies = [ "proc-macro2", "quote", @@ -4409,11 +4434,12 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.21" +version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f4ed65637b8390770814083d20756f87bfa2c21bf2f110babdc5438351746e4" +checksum = "6dfce9f3241b150f36e8e54bb561a742d5daa1a47b5dd9a5ce369fd4a4db2210" dependencies = [ "lazy_static", + "valuable", ] [[package]] @@ -4666,6 +4692,12 @@ dependencies = [ "serde", ] +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + [[package]] name = "vcpkg" version = "0.2.11" From d093bd027fcb1b62be4a7050c5f5ae3e6284a968 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Apr 2022 14:11:10 +0000 Subject: [PATCH 32/35] Bump reqwest from 0.11.9 to 0.11.10 Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.11.9 to 0.11.10. - [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.9...v0.11.10) --- updated-dependencies: - dependency-name: reqwest dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 102 +++++++++++++++++++++++++++++++++++------------------ 1 file changed, 67 insertions(+), 35 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 72ee11dc..1d3207f8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -104,9 +104,9 @@ checksum = "9d6e24d2cce90c53b948c46271bfb053e4bdc2db9b5d3f65e20f8cf28a1b7fc3" [[package]] name = "async-compression" -version = "0.3.8" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443ccbb270374a2b1055fc72da40e1f237809cd6bb0e97e66d264cd138473a6" +checksum = "f2bf394cfbbe876f0ac67b13b6ca819f9c9f2fb9ec67223cceb1555fbab1c31a" dependencies = [ "bzip2", "futures-core", @@ -573,8 +573,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b103d85ca6e209388771bfb7aa6b68a7aeec4afbf6f0a0264bfbf50360e5212e" dependencies = [ "crossterm", - "strum", - "strum_macros", + "strum 0.23.0", + "strum_macros 0.23.0", "unicode-width", ] @@ -1029,7 +1029,7 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c5f0096a91d210159eceb2ff5e1c4da18388a170e1e3ce948aac9c8fdbbf595" dependencies = [ - "heck", + "heck 0.3.2", "proc-macro2", "quote", "syn", @@ -1394,6 +1394,12 @@ dependencies = [ "unicode-segmentation", ] +[[package]] +name = "heck" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" + [[package]] name = "hermit-abi" version = "0.1.18" @@ -2818,7 +2824,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "355f634b43cdd80724ee7848f95770e7e70eefa6dcf14fea676216573b8fd603" dependencies = [ "bytes", - "heck", + "heck 0.3.2", "itertools", "log", "multimap", @@ -3167,9 +3173,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.11.9" +version = "0.11.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f242f1488a539a79bac6dbe7c8609ae43b7914b7736210f239a37cccb32525" +checksum = "46a1f7aa4f35e5e8b4160449f51afc758f0ce6454315a9fa7d0d113e958c41eb" dependencies = [ "base64 0.13.0", "bytes", @@ -3202,7 +3208,7 @@ dependencies = [ "wasm-bindgen-futures", "web-sys", "webpki-roots 0.22.2", - "winreg 0.7.0", + "winreg 0.10.1", ] [[package]] @@ -3232,9 +3238,9 @@ dependencies = [ [[package]] name = "rust_decimal" -version = "1.22.0" +version = "1.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d37baa70cf8662d2ba1c1868c5983dda16ef32b105cce41fb5c47e72936a90b3" +checksum = "22dc69eadbf0ee2110b8d20418c0c6edbaefec2811c4963dc17b6344e11fe0f8" dependencies = [ "arrayvec 0.7.2", "num-traits", @@ -3243,9 +3249,9 @@ dependencies = [ [[package]] name = "rust_decimal_macros" -version = "1.22.0" +version = "1.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "184abaf7b434800e1a5a8aad3ebc8cd7498df33af72d65371d797a264713a59b" +checksum = "a4c70be9367d4bc095d10b48d41b819d09ed4dafc528765a144d32ed1d530654" dependencies = [ "quote", "rust_decimal", @@ -3324,9 +3330,9 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "0.2.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5eebeaeb360c87bfb72e84abdb3447159c0eaececf1bef2aecd65a8be949d1c9" +checksum = "1ee86d63972a7c661d1536fefe8c3c8407321c3df668891286de28abcd087360" dependencies = [ "base64 0.13.0", ] @@ -3527,9 +3533,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.74" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee2bb9cd061c5865d345bb02ca49fcef1391741b672b54a0bf7b679badec3142" +checksum = "8e8d9fa5c3b304765ce1fd9c4c8a3de2c8db365a5b91be52f186efc675681d95" dependencies = [ "indexmap", "itoa 1.0.1", @@ -3539,21 +3545,21 @@ dependencies = [ [[package]] name = "serde_urlencoded" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edfa57a7f8d9c1d260a549e7224100f6c43d43f9103e06dd8b4095a9b2b43ce9" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", - "itoa 0.4.7", + "itoa 1.0.1", "ryu", "serde", ] [[package]] name = "serde_with" -version = "1.12.0" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec1e6ec4d8950e5b1e894eac0d360742f3b1407a6078a604a731c4b3f49cefbc" +checksum = "946fa04a8ac43ff78a1f4b811990afb9ddbdf5890b46d6dda0ba1998230138b7" dependencies = [ "rustversion", "serde", @@ -3853,7 +3859,7 @@ checksum = "584866c833511b1a152e87a7ee20dee2739746f60c858b3c5209150bc4b466f5" dependencies = [ "dotenv", "either", - "heck", + "heck 0.3.2", "hex", "once_cell", "proc-macro2", @@ -3929,7 +3935,7 @@ version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcb5ae327f9cc13b68763b5749770cb9e048a99bd9dfdfa58d0cf05d5f64afe0" dependencies = [ - "heck", + "heck 0.3.2", "proc-macro-error", "proc-macro2", "quote", @@ -3941,8 +3947,14 @@ name = "strum" version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cae14b91c7d11c9a851d3fbc80a963198998c2a64eec840477fa92d8ce9b70bb" + +[[package]] +name = "strum" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e96acfc1b70604b8b2f1ffa4c57e59176c7dbb05d556c71ecd2f5498a1dee7f8" dependencies = [ - "strum_macros", + "strum_macros 0.24.0", ] [[package]] @@ -3951,7 +3963,20 @@ version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00ad150e9d51e33e8142984f577662c1324d49f3be45ed37bac8645fdcbe0fe5" dependencies = [ - "heck", + "heck 0.3.2", + "proc-macro2", + "quote", + "rustversion", + "syn", +] + +[[package]] +name = "strum_macros" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6878079b17446e4d3eba6192bb0a2950d5b14f0ed8424b852310e5a94345d0ef" +dependencies = [ + "heck 0.4.0", "proc-macro2", "quote", "rustversion", @@ -4021,7 +4046,7 @@ dependencies = [ "spectral", "sqlx", "structopt", - "strum", + "strum 0.24.0", "tempfile", "testcontainers 0.12.0", "thiserror", @@ -4375,9 +4400,9 @@ checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" [[package]] name = "tracing" -version = "0.1.29" +version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "375a639232caf30edfc78e8d89b2d4c375515393e7af7e16f01cd96917fb2105" +checksum = "80b9fa4360528139bc96100c160b7ae879f5567f49f1782b0b02035b0358ebf3" dependencies = [ "cfg-if 1.0.0", "pin-project-lite 0.2.8", @@ -4398,9 +4423,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.18" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f480b8f81512e825f337ad51e94c1eb5d3bbdf2b363dcd01e2b19a9ffe3f8e" +checksum = "2e65ce065b4b5c53e73bb28912318cb8c9e9ad3921f1d669eb0e68b4c8143a2b" dependencies = [ "proc-macro2", "quote", @@ -4409,11 +4434,12 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.21" +version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f4ed65637b8390770814083d20756f87bfa2c21bf2f110babdc5438351746e4" +checksum = "6dfce9f3241b150f36e8e54bb561a742d5daa1a47b5dd9a5ce369fd4a4db2210" dependencies = [ "lazy_static", + "valuable", ] [[package]] @@ -4666,6 +4692,12 @@ dependencies = [ "serde", ] +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + [[package]] name = "vcpkg" version = "0.2.11" @@ -4989,9 +5021,9 @@ dependencies = [ [[package]] name = "winreg" -version = "0.7.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69" +checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" dependencies = [ "winapi 0.3.9", ] From 739f36f768d5b0f016fc3e1721e92c963f3376b4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 15 Apr 2022 11:08:12 +0000 Subject: [PATCH 33/35] Bump actions/checkout from 3.0.0 to 3.0.1 Bumps [actions/checkout](https://github.com/actions/checkout) from 3.0.0 to 3.0.1. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3.0.0...v3.0.1) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/build-release-binaries.yml | 2 +- .github/workflows/ci.yml | 8 ++++---- .github/workflows/create-release.yml | 2 +- .github/workflows/draft-new-release.yml | 2 +- .github/workflows/preview-release.yml | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-release-binaries.yml b/.github/workflows/build-release-binaries.yml index 0d2693f6..ddaecbde 100644 --- a/.github/workflows/build-release-binaries.yml +++ b/.github/workflows/build-release-binaries.yml @@ -45,7 +45,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout tagged commit - uses: actions/checkout@v3.0.0 + uses: actions/checkout@v3.0.1 with: ref: ${{ github.event.release.target_commitish }} token: ${{ secrets.BOTTY_GITHUB_TOKEN }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9ab4e128..fddb8a4d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout sources - uses: actions/checkout@v3.0.0 + uses: actions/checkout@v3.0.1 - uses: Swatinem/rust-cache@v1.4.0 @@ -42,7 +42,7 @@ jobs: steps: - name: Checkout sources - uses: actions/checkout@v3.0.0 + uses: actions/checkout@v3.0.1 - uses: Swatinem/rust-cache@v1.4.0 @@ -75,7 +75,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout sources - uses: actions/checkout@v3.0.0 + uses: actions/checkout@v3.0.1 - uses: Swatinem/rust-cache@v1.4.0 @@ -111,7 +111,7 @@ jobs: steps: - name: Checkout sources - uses: actions/checkout@v3.0.0 + uses: actions/checkout@v3.0.1 - uses: Swatinem/rust-cache@v1.4.0 diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 1e0209e9..46976cb4 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -11,7 +11,7 @@ jobs: if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release/') runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3.0.0 + - uses: actions/checkout@v3.0.1 - name: Extract version from branch name id: extract-version diff --git a/.github/workflows/draft-new-release.yml b/.github/workflows/draft-new-release.yml index 6d8bd9e0..7df02c4e 100644 --- a/.github/workflows/draft-new-release.yml +++ b/.github/workflows/draft-new-release.yml @@ -12,7 +12,7 @@ jobs: name: "Draft a new release" runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3.0.0 + - uses: actions/checkout@v3.0.1 with: token: ${{ secrets.BOTTY_GITHUB_TOKEN }} diff --git a/.github/workflows/preview-release.yml b/.github/workflows/preview-release.yml index bdb4a639..ea072bae 100644 --- a/.github/workflows/preview-release.yml +++ b/.github/workflows/preview-release.yml @@ -10,7 +10,7 @@ jobs: name: Create preview release runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3.0.0 + - uses: actions/checkout@v3.0.1 - name: Delete 'preview' release uses: larryjoelane/delete-release-action@v1.0.24 From d8689f36f803b604101cad1c1cf3cef69977fa33 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 15 Apr 2022 11:09:12 +0000 Subject: [PATCH 34/35] Bump tracing from 0.1.33 to 0.1.34 Bumps [tracing](https://github.com/tokio-rs/tracing) from 0.1.33 to 0.1.34. - [Release notes](https://github.com/tokio-rs/tracing/releases) - [Commits](https://github.com/tokio-rs/tracing/compare/tracing-0.1.33...tracing-0.1.34) --- updated-dependencies: - dependency-name: tracing dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c9186c58..18b8d709 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4400,9 +4400,9 @@ checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" [[package]] name = "tracing" -version = "0.1.33" +version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80b9fa4360528139bc96100c160b7ae879f5567f49f1782b0b02035b0358ebf3" +checksum = "5d0ecdcb44a79f0fe9844f0c4f33a342cbcbb5117de8001e6ba0dc2351327d09" dependencies = [ "cfg-if 1.0.0", "pin-project-lite 0.2.8", From 878a45eafd958b0af4a09f7417861c4f27ff4f2e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 15 Apr 2022 11:09:43 +0000 Subject: [PATCH 35/35] Bump toml from 0.5.8 to 0.5.9 Bumps [toml](https://github.com/alexcrichton/toml-rs) from 0.5.8 to 0.5.9. - [Release notes](https://github.com/alexcrichton/toml-rs/releases) - [Commits](https://github.com/alexcrichton/toml-rs/compare/0.5.8...0.5.9) --- updated-dependencies: - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c9186c58..1432f57e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4367,9 +4367,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.5.8" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" +checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7" dependencies = [ "serde", ]