From ab1fa6752577c13938ee39b3a0a3638f3d11c5ac Mon Sep 17 00:00:00 2001 From: icy-ux <> Date: Sun, 16 Jan 2022 20:11:35 +0000 Subject: [PATCH 01/56] 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 fb32d87114c9691f2aefc652c16c41efa356b0cc Mon Sep 17 00:00:00 2001 From: devbordecraft Date: Sun, 23 Jan 2022 14:37:09 +0100 Subject: [PATCH 02/56] Update from monero v17.2.0 to monero v17.3.0 --- CHANGELOG.md | 1 + swap/src/monero/wallet_rpc.rs | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c65088c1..1fa95a5d 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. +- Update from monero v17.2.0 to monero v17.3.0 ## [0.10.2] - 2021-12-25 diff --git a/swap/src/monero/wallet_rpc.rs b/swap/src/monero/wallet_rpc.rs index 18d66064..f3fbec90 100644 --- a/swap/src/monero/wallet_rpc.rs +++ b/swap/src/monero/wallet_rpc.rs @@ -18,17 +18,17 @@ use tokio_util::io::StreamReader; compile_error!("unsupported operating system"); #[cfg(target_os = "macos")] -const DOWNLOAD_URL: &str = "http://downloads.getmonero.org/cli/monero-mac-x64-v0.17.2.0.tar.bz2"; +const DOWNLOAD_URL: &str = "http://downloads.getmonero.org/cli/monero-mac-x64-v0.17.3.0.tar.bz2"; #[cfg(all(target_os = "linux", target_arch = "x86_64"))] -const DOWNLOAD_URL: &str = "https://downloads.getmonero.org/cli/monero-linux-x64-v0.17.2.0.tar.bz2"; +const DOWNLOAD_URL: &str = "https://downloads.getmonero.org/cli/monero-linux-x64-v0.17.3.0.tar.bz2"; #[cfg(all(target_os = "linux", target_arch = "arm"))] const DOWNLOAD_URL: &str = - "https://downloads.getmonero.org/cli/monero-linux-armv7-v0.17.2.0.tar.bz2"; + "https://downloads.getmonero.org/cli/monero-linux-armv7-v0.17.3.0.tar.bz2"; #[cfg(target_os = "windows")] -const DOWNLOAD_URL: &str = "https://downloads.getmonero.org/cli/monero-win-x64-v0.17.2.0.zip"; +const DOWNLOAD_URL: &str = "https://downloads.getmonero.org/cli/monero-win-x64-v0.17.3.0.zip"; #[cfg(any(target_os = "macos", target_os = "linux"))] const PACKED_FILE: &str = "monero-wallet-rpc"; 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 03/56] 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 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 04/56] 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 05/56] 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 06/56] 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 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 07/56] 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 08/56] 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 09/56] 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 10/56] 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 11/56] 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 234a50dfb4f837f0b156faa7e2da505e19e97a00 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Apr 2022 13:18:52 +0000 Subject: [PATCH 12/56] Bump tokio-util from 0.7.0 to 0.7.1 Bumps [tokio-util](https://github.com/tokio-rs/tokio) from 0.7.0 to 0.7.1. - [Release notes](https://github.com/tokio-rs/tokio/releases) - [Commits](https://github.com/tokio-rs/tokio/compare/tokio-util-0.7.0...tokio-util-0.7.1) --- updated-dependencies: - dependency-name: tokio-util 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 72ee11dc..b444dad9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4030,7 +4030,7 @@ dependencies = [ "tokio-socks", "tokio-tar", "tokio-tungstenite", - "tokio-util 0.7.0", + "tokio-util 0.7.1", "toml", "torut", "tracing", @@ -4328,16 +4328,16 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64910e1b9c1901aaf5375561e35b9c057d95ff41a44ede043a03e09279eabaf1" +checksum = "0edfdeb067411dba2044da6d1cb2df793dd35add7888d73c16e3381ded401764" dependencies = [ "bytes", "futures-core", "futures-sink", - "log", "pin-project-lite 0.2.8", "tokio", + "tracing", ] [[package]] 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 13/56] 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 14/56] 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 15/56] 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 16/56] 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 17/56] 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", ] From 4860a08145c91fc1d0950d876fbf1f292084edcc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 16 Apr 2022 12:13:23 +0000 Subject: [PATCH 18/56] Bump vergen from 6.0.0 to 7.0.0 Bumps [vergen](https://github.com/rustyhorde/vergen) from 6.0.0 to 7.0.0. - [Release notes](https://github.com/rustyhorde/vergen/releases) - [Commits](https://github.com/rustyhorde/vergen/compare/6.0.0...7.0.0) --- updated-dependencies: - dependency-name: vergen dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- Cargo.lock | 7 ++++--- swap/Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 535c5bd4..01c5ed43 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4201,6 +4201,7 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2702e08a7a860f005826c6815dcac101b19b5eb330c27fe4a5928fec1d20ddd" dependencies = [ + "itoa 1.0.1", "libc", "num_threads", ] @@ -4712,18 +4713,18 @@ checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" [[package]] name = "vergen" -version = "6.0.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd0c9f8387e118573859ae0e6c6fbdfa41bd1f4fbea451b0b8c5a81a3b8bc9e0" +checksum = "4db743914c971db162f35bf46601c5a63ec4452e61461937b4c1ab817a60c12e" dependencies = [ "anyhow", "cfg-if 1.0.0", - "chrono", "enum-iterator", "getset", "git2", "rustversion", "thiserror", + "time 0.3.9", ] [[package]] diff --git a/swap/Cargo.toml b/swap/Cargo.toml index e05b0645..0eda78ee 100644 --- a/swap/Cargo.toml +++ b/swap/Cargo.toml @@ -86,5 +86,5 @@ tempfile = "3" testcontainers = "0.12" [build-dependencies] -vergen = { version = "6", default-features = false, features = [ "git", "build" ] } +vergen = { version = "7", default-features = false, features = [ "git", "build" ] } anyhow = "1" From 9e96ef64d3d5c6444dcf8cda92eba232186614e4 Mon Sep 17 00:00:00 2001 From: binarybaron <86064887+binarybaron@users.noreply.github.com> Date: Sun, 17 Apr 2022 19:57:34 +0200 Subject: [PATCH 19/56] Implement Identify protocol to make network and version of ASB available to peers --- CHANGELOG.md | 1 + Cargo.lock | 29 ++++++++++++++++++++++++++++- swap/Cargo.toml | 2 +- swap/src/asb/network.rs | 15 +++++++++++++++ swap/src/bin/asb.rs | 14 ++++---------- swap/src/bin/swap.rs | 16 ++++++++++++++-- swap/src/cli/behaviour.rs | 18 +++++++++++++++++- swap/src/cli/command.rs | 18 +++++++++--------- swap/src/network/rendezvous.rs | 10 ++++++++++ swap/src/network/swarm.rs | 6 ++++-- swap/tests/harness/mod.rs | 11 +++++------ 11 files changed, 108 insertions(+), 32 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a34c1d3..e49dd774 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,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 +- Both the ASB and CLI now support the [Identify](https://github.com/libp2p/specs/blob/master/identify/README.md) protocol. This makes its version and network (testnet/mainnet) avaliable to others ## [0.10.2] - 2021-12-25 diff --git a/Cargo.lock b/Cargo.lock index 8a58e2bc..6f66e617 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1783,6 +1783,7 @@ dependencies = [ "lazy_static", "libp2p-core", "libp2p-dns", + "libp2p-identify", "libp2p-metrics", "libp2p-mplex", "libp2p-noise", @@ -1846,12 +1847,29 @@ dependencies = [ "trust-dns-resolver", ] +[[package]] +name = "libp2p-identify" +version = "0.31.0" +source = "git+https://github.com/libp2p/rust-libp2p.git#6d3ab8a3debe8d69dcd004173999732f12d0da96" +dependencies = [ + "futures", + "libp2p-core", + "libp2p-swarm", + "log", + "lru 0.6.6", + "prost", + "prost-build", + "smallvec", + "wasm-timer", +] + [[package]] name = "libp2p-metrics" version = "0.1.0" source = "git+https://github.com/libp2p/rust-libp2p.git#6d3ab8a3debe8d69dcd004173999732f12d0da96" dependencies = [ "libp2p-core", + "libp2p-identify", "libp2p-ping", "libp2p-swarm", "open-metrics-client", @@ -1941,7 +1959,7 @@ dependencies = [ "libp2p-core", "libp2p-swarm", "log", - "lru", + "lru 0.7.0", "rand 0.7.3", "smallvec", "unsigned-varint", @@ -2112,6 +2130,15 @@ dependencies = [ "cfg-if 1.0.0", ] +[[package]] +name = "lru" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ea2d928b485416e8908cff2d97d621db22b27f7b3b6729e438bcf42c671ba91" +dependencies = [ + "hashbrown", +] + [[package]] name = "lru" version = "0.7.0" diff --git a/swap/Cargo.toml b/swap/Cargo.toml index 0eda78ee..0aab53a0 100644 --- a/swap/Cargo.toml +++ b/swap/Cargo.toml @@ -31,7 +31,7 @@ ed25519-dalek = "1" futures = { version = "0.3", default-features = false } hex = "0.4" itertools = "0.10" -libp2p = { git = "https://github.com/libp2p/rust-libp2p.git", default-features = false, features = [ "tcp-tokio", "yamux", "mplex", "dns-tokio", "noise", "request-response", "websocket", "ping", "rendezvous" ] } +libp2p = { git = "https://github.com/libp2p/rust-libp2p.git", default-features = false, features = [ "tcp-tokio", "yamux", "mplex", "dns-tokio", "noise", "request-response", "websocket", "ping", "rendezvous", "identify" ] } monero = { version = "0.12", features = [ "serde_support" ] } monero-rpc = { path = "../monero-rpc" } pem = "1.0" diff --git a/swap/src/asb/network.rs b/swap/src/asb/network.rs index d24660b9..70c7f861 100644 --- a/swap/src/asb/network.rs +++ b/swap/src/asb/network.rs @@ -13,6 +13,7 @@ use libp2p::core::connection::ConnectionId; use libp2p::core::muxing::StreamMuxerBox; use libp2p::core::transport::Boxed; use libp2p::dns::TokioDnsConfig; +use libp2p::identify::{Identify, IdentifyConfig, IdentifyEvent}; use libp2p::ping::{Ping, PingConfig, PingEvent}; use libp2p::request_response::{RequestId, ResponseChannel}; use libp2p::swarm::{ @@ -111,6 +112,7 @@ pub mod behaviour { pub swap_setup: alice::Behaviour, pub transfer_proof: transfer_proof::Behaviour, pub encrypted_signature: encrypted_signature::Behaviour, + pub identify: Identify, /// Ping behaviour that ensures that the underlying network connection /// is still alive. If the ping fails a connection close event @@ -128,8 +130,14 @@ pub mod behaviour { latest_rate: LR, resume_only: bool, env_config: env::Config, + identify_params: (identity::Keypair, XmrBtcNamespace), rendezvous_params: Option<(identity::Keypair, PeerId, Multiaddr, XmrBtcNamespace)>, ) -> Self { + let agentVersion = format!("asb/{} ({})", env!("CARGO_PKG_VERSION"), identify_params.1); + let protocolVersion = "/comit/xmr/btc/1.0.0".to_string(); + let identifyConfig = IdentifyConfig::new(protocolVersion, identify_params.0.public()) + .with_agent_version(agentVersion); + Self { rendezvous: libp2p::swarm::toggle::Toggle::from(rendezvous_params.map( |(identity, rendezvous_peer_id, rendezvous_address, namespace)| { @@ -153,6 +161,7 @@ pub mod behaviour { transfer_proof: transfer_proof::alice(), encrypted_signature: encrypted_signature::alice(), ping: Ping::new(PingConfig::new().with_keep_alive(true)), + identify: Identify::new(identifyConfig), } } } @@ -163,6 +172,12 @@ pub mod behaviour { } } + impl From for OutEvent { + fn from(_: IdentifyEvent) -> Self { + OutEvent::Other + } + } + impl From for OutEvent { fn from(event: libp2p::rendezvous::client::Event) -> Self { OutEvent::Rendezvous(event) diff --git a/swap/src/bin/asb.rs b/swap/src/bin/asb.rs index 23300f20..a0e9b5e3 100644 --- a/swap/src/bin/asb.rs +++ b/swap/src/bin/asb.rs @@ -136,6 +136,8 @@ async fn main() -> Result<()> { }; let kraken_rate = KrakenRate::new(config.maker.ask_spread, kraken_price_updates); + let namespace = XmrBtcNamespace::from_is_testnet(testnet); + let mut swarm = swarm::asb( &seed, config.maker.min_buy_btc, @@ -143,16 +145,8 @@ async fn main() -> Result<()> { kraken_rate.clone(), resume_only, env_config, - config.network.rendezvous_point.map(|rendezvous_point| { - ( - rendezvous_point, - if testnet { - XmrBtcNamespace::Testnet - } else { - XmrBtcNamespace::Mainnet - }, - ) - }), + namespace, + config.network.rendezvous_point, )?; for listen in config.network.listen.clone() { diff --git a/swap/src/bin/swap.rs b/swap/src/bin/swap.rs index 92010783..a1188759 100644 --- a/swap/src/bin/swap.rs +++ b/swap/src/bin/swap.rs @@ -63,6 +63,7 @@ async fn main() -> Result<()> { monero_receive_address, monero_daemon_address, tor_socks5_port, + namespace, } => { let swap_id = Uuid::new_v4(); @@ -87,7 +88,12 @@ async fn main() -> Result<()> { .context("Seller address must contain peer ID")?; db.insert_address(seller_peer_id, seller.clone()).await?; - let behaviour = cli::Behaviour::new(seller_peer_id, env_config, bitcoin_wallet.clone()); + let behaviour = cli::Behaviour::new( + seller_peer_id, + env_config, + bitcoin_wallet.clone(), + (seed.derive_libp2p_identity(), namespace), + ); let mut swarm = swarm::cli(seed.derive_libp2p_identity(), tor_socks5_port, behaviour).await?; swarm.behaviour_mut().add_address(seller_peer_id, seller); @@ -243,6 +249,7 @@ async fn main() -> Result<()> { bitcoin_target_block, monero_daemon_address, tor_socks5_port, + namespace, } => { cli::tracing::init(debug, json, data_dir.join("logs"), Some(swap_id))?; let db = open_db(data_dir.join("sqlite")).await?; @@ -264,7 +271,12 @@ async fn main() -> Result<()> { let seller_peer_id = db.get_peer_id(swap_id).await?; let seller_addresses = db.get_addresses(seller_peer_id).await?; - let behaviour = cli::Behaviour::new(seller_peer_id, env_config, bitcoin_wallet.clone()); + let behaviour = cli::Behaviour::new( + seller_peer_id, + env_config, + bitcoin_wallet.clone(), + (seed.derive_libp2p_identity(), namespace), + ); let mut swarm = swarm::cli(seed.derive_libp2p_identity(), tor_socks5_port, behaviour).await?; let our_peer_id = swarm.local_peer_id(); diff --git a/swap/src/cli/behaviour.rs b/swap/src/cli/behaviour.rs index 716b7951..2ca8448f 100644 --- a/swap/src/cli/behaviour.rs +++ b/swap/src/cli/behaviour.rs @@ -1,13 +1,15 @@ use crate::network::quote::BidQuote; +use crate::network::rendezvous::XmrBtcNamespace; use crate::network::swap_setup::bob; use crate::network::{encrypted_signature, quote, redial, transfer_proof}; use crate::protocol::bob::State2; use crate::{bitcoin, env}; use anyhow::{anyhow, Error, Result}; use libp2p::core::Multiaddr; +use libp2p::identify::{Identify, IdentifyConfig, IdentifyEvent}; use libp2p::ping::{Ping, PingConfig, PingEvent}; use libp2p::request_response::{RequestId, ResponseChannel}; -use libp2p::{NetworkBehaviour, PeerId}; +use libp2p::{identity, NetworkBehaviour, PeerId}; use std::sync::Arc; use std::time::Duration; @@ -64,6 +66,7 @@ pub struct Behaviour { pub transfer_proof: transfer_proof::Behaviour, pub encrypted_signature: encrypted_signature::Behaviour, pub redial: redial::Behaviour, + pub identify: Identify, /// Ping behaviour that ensures that the underlying network connection is /// still alive. If the ping fails a connection close event will be @@ -76,7 +79,13 @@ impl Behaviour { alice: PeerId, env_config: env::Config, bitcoin_wallet: Arc, + identify_params: (identity::Keypair, XmrBtcNamespace), ) -> Self { + let agentVersion = format!("cli/{} ({})", env!("CARGO_PKG_VERSION"), identify_params.1); + let protocolVersion = "/comit/xmr/btc/1.0.0".to_string(); + let identifyConfig = IdentifyConfig::new(protocolVersion, identify_params.0.public()) + .with_agent_version(agentVersion); + Self { quote: quote::cli(), swap_setup: bob::Behaviour::new(env_config, bitcoin_wallet), @@ -84,6 +93,7 @@ impl Behaviour { encrypted_signature: encrypted_signature::bob(), redial: redial::Behaviour::new(alice, Duration::from_secs(2)), ping: Ping::new(PingConfig::new().with_keep_alive(true)), + identify: Identify::new(identifyConfig), } } @@ -100,3 +110,9 @@ impl From for OutEvent { OutEvent::Other } } + +impl From for OutEvent { + fn from(_: IdentifyEvent) -> Self { + OutEvent::Other + } +} diff --git a/swap/src/cli/command.rs b/swap/src/cli/command.rs index ae793e1d..631cc00e 100644 --- a/swap/src/cli/command.rs +++ b/swap/src/cli/command.rs @@ -99,6 +99,7 @@ where monero_receive_address, monero_daemon_address, tor_socks5_port, + namespace: XmrBtcNamespace::from_is_testnet(is_testnet), }, } } @@ -179,6 +180,7 @@ where bitcoin_target_block, monero_daemon_address, tor_socks5_port, + namespace: XmrBtcNamespace::from_is_testnet(is_testnet), }, } } @@ -230,8 +232,8 @@ where data_dir: data::data_dir_from(data, is_testnet)?, cmd: Command::ListSellers { rendezvous_point, - namespace: rendezvous_namespace_from(is_testnet), tor_socks5_port, + namespace: XmrBtcNamespace::from_is_testnet(is_testnet), }, }, RawCommand::ExportBitcoinWallet { bitcoin } => { @@ -273,6 +275,7 @@ pub enum Command { monero_receive_address: monero::Address, monero_daemon_address: String, tor_socks5_port: u16, + namespace: XmrBtcNamespace, }, History, Config, @@ -292,6 +295,7 @@ pub enum Command { bitcoin_target_block: usize, monero_daemon_address: String, tor_socks5_port: u16, + namespace: XmrBtcNamespace, }, Cancel { swap_id: Uuid, @@ -562,14 +566,6 @@ mod data { } } -fn rendezvous_namespace_from(is_testnet: bool) -> XmrBtcNamespace { - if is_testnet { - XmrBtcNamespace::Testnet - } else { - XmrBtcNamespace::Mainnet - } -} - fn env_config_from(testnet: bool) -> env::Config { if testnet { env::Testnet::get_config() @@ -1212,6 +1208,7 @@ mod tests { .unwrap(), monero_daemon_address: DEFAULT_MONERO_DAEMON_ADDRESS_STAGENET.to_string(), tor_socks5_port: DEFAULT_SOCKS5_PORT, + namespace: XmrBtcNamespace::Testnet, }, } } @@ -1231,6 +1228,7 @@ mod tests { .unwrap(), monero_daemon_address: DEFAULT_MONERO_DAEMON_ADDRESS.to_string(), tor_socks5_port: DEFAULT_SOCKS5_PORT, + namespace: XmrBtcNamespace::Mainnet, }, } } @@ -1248,6 +1246,7 @@ mod tests { bitcoin_target_block: DEFAULT_BITCOIN_CONFIRMATION_TARGET_TESTNET, monero_daemon_address: DEFAULT_MONERO_DAEMON_ADDRESS_STAGENET.to_string(), tor_socks5_port: DEFAULT_SOCKS5_PORT, + namespace: XmrBtcNamespace::Testnet, }, } } @@ -1264,6 +1263,7 @@ mod tests { bitcoin_target_block: DEFAULT_BITCOIN_CONFIRMATION_TARGET, monero_daemon_address: DEFAULT_MONERO_DAEMON_ADDRESS.to_string(), tor_socks5_port: DEFAULT_SOCKS5_PORT, + namespace: XmrBtcNamespace::Mainnet, }, } } diff --git a/swap/src/network/rendezvous.rs b/swap/src/network/rendezvous.rs index 5f8727c5..86a698a2 100644 --- a/swap/src/network/rendezvous.rs +++ b/swap/src/network/rendezvous.rs @@ -27,3 +27,13 @@ impl From for Namespace { } } } + +impl XmrBtcNamespace { + pub fn from_is_testnet(testnet: bool) -> XmrBtcNamespace { + if testnet { + XmrBtcNamespace::Testnet + } else { + XmrBtcNamespace::Mainnet + } + } +} diff --git a/swap/src/network/swarm.rs b/swap/src/network/swarm.rs index 8d4c7703..21bbfc4d 100644 --- a/swap/src/network/swarm.rs +++ b/swap/src/network/swarm.rs @@ -16,14 +16,15 @@ pub fn asb( latest_rate: LR, resume_only: bool, env_config: env::Config, - rendezvous_params: Option<(Multiaddr, XmrBtcNamespace)>, + namespace: XmrBtcNamespace, + rendezvous_point: Option, ) -> Result>> where LR: LatestRate + Send + 'static + Debug + Clone, { let identity = seed.derive_libp2p_identity(); - let rendezvous_params = if let Some((address, namespace)) = rendezvous_params { + let rendezvous_params = if let Some(address) = rendezvous_point { let peer_id = address .extract_peer_id() .context("Rendezvous node address must contain peer ID")?; @@ -39,6 +40,7 @@ where latest_rate, resume_only, env_config, + (identity.clone(), namespace), rendezvous_params, ); diff --git a/swap/tests/harness/mod.rs b/swap/tests/harness/mod.rs index b23201e0..e7971e66 100644 --- a/swap/tests/harness/mod.rs +++ b/swap/tests/harness/mod.rs @@ -19,6 +19,7 @@ use swap::bitcoin::{CancelTimelock, PunishTimelock, TxCancel, TxPunish, TxRedeem use swap::database::SqliteDatabase; use swap::env::{Config, GetConfig}; use swap::fs::ensure_directory_exists; +use swap::network::rendezvous::XmrBtcNamespace; use swap::network::swarm; use swap::protocol::alice::{AliceState, Swap}; use swap::protocol::bob::BobState; @@ -243,6 +244,7 @@ async fn start_alice( latest_rate, resume_only, env_config, + XmrBtcNamespace::Testnet, None, ) .unwrap(); @@ -469,18 +471,15 @@ impl BobParams { ) -> Result<(cli::EventLoop, cli::EventLoopHandle)> { let tor_socks5_port = get_port() .expect("We don't care about Tor in the tests so we get a free port to disable it."); + let identity = self.seed.derive_libp2p_identity(); let behaviour = cli::Behaviour::new( self.alice_peer_id, self.env_config, self.bitcoin_wallet.clone(), + (identity.clone(), XmrBtcNamespace::Testnet), ); - let mut swarm = swarm::cli( - self.seed.derive_libp2p_identity(), - tor_socks5_port, - behaviour, - ) - .await?; + let mut swarm = swarm::cli(identity.clone(), tor_socks5_port, behaviour).await?; swarm .behaviour_mut() .add_address(self.alice_peer_id, self.alice_address.clone()); From e650a2151ecdb87a3387997ca29f14554a93073d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Apr 2022 14:56:10 +0000 Subject: [PATCH 20/56] Bump uuid from 0.8.2 to 1.0.0 Bumps [uuid](https://github.com/uuid-rs/uuid) from 0.8.2 to 1.0.0. - [Release notes](https://github.com/uuid-rs/uuid/releases) - [Commits](https://github.com/uuid-rs/uuid/compare/0.8.2...1.0.0) --- updated-dependencies: - dependency-name: uuid dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- swap/Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6f66e617..4fdee21a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4712,9 +4712,9 @@ checksum = "05e42f7c18b8f902290b009cde6d651262f956c98bc51bca4cd1d511c9cd85c7" [[package]] name = "uuid" -version = "0.8.2" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" +checksum = "8cfcd319456c4d6ea10087ed423473267e1a071f3bc0aa89f80d60997843c6f0" dependencies = [ "getrandom 0.2.2", "serde", diff --git a/swap/Cargo.toml b/swap/Cargo.toml index 0aab53a0..b2fdd741 100644 --- a/swap/Cargo.toml +++ b/swap/Cargo.toml @@ -64,7 +64,7 @@ tracing-appender = "0.1" tracing-futures = { version = "0.2", features = [ "std-future", "futures-03" ] } tracing-subscriber = { version = "0.2", default-features = false, features = [ "fmt", "ansi", "env-filter", "chrono", "tracing-log", "json" ] } url = { version = "2", features = [ "serde" ] } -uuid = { version = "0.8", features = [ "serde", "v4" ] } +uuid = { version = "1.0", features = [ "serde", "v4" ] } void = "1" [target.'cfg(not(windows))'.dependencies] From c538231b6ce274222db4c1944b6f1b3d4a03caa5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 Apr 2022 11:11:09 +0000 Subject: [PATCH 21/56] Bump actions/checkout from 3.0.1 to 3.0.2 Bumps [actions/checkout](https://github.com/actions/checkout) from 3.0.1 to 3.0.2. - [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.1...v3.0.2) --- 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 ddaecbde..d21ed1f2 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.1 + uses: actions/checkout@v3.0.2 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 fddb8a4d..d7fa4eac 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.1 + uses: actions/checkout@v3.0.2 - uses: Swatinem/rust-cache@v1.4.0 @@ -42,7 +42,7 @@ jobs: steps: - name: Checkout sources - uses: actions/checkout@v3.0.1 + uses: actions/checkout@v3.0.2 - 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.1 + uses: actions/checkout@v3.0.2 - uses: Swatinem/rust-cache@v1.4.0 @@ -111,7 +111,7 @@ jobs: steps: - name: Checkout sources - uses: actions/checkout@v3.0.1 + uses: actions/checkout@v3.0.2 - uses: Swatinem/rust-cache@v1.4.0 diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 46976cb4..a87f323b 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.1 + - uses: actions/checkout@v3.0.2 - 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 7df02c4e..d27791be 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.1 + - uses: actions/checkout@v3.0.2 with: token: ${{ secrets.BOTTY_GITHUB_TOKEN }} diff --git a/.github/workflows/preview-release.yml b/.github/workflows/preview-release.yml index ea072bae..8499248f 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.1 + - uses: actions/checkout@v3.0.2 - name: Delete 'preview' release uses: larryjoelane/delete-release-action@v1.0.24 From 36912f57d4ccf85926f734eca13e9d76ab49133e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 Apr 2022 11:12:16 +0000 Subject: [PATCH 22/56] Bump anyhow from 1.0.56 to 1.0.57 Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.56 to 1.0.57. - [Release notes](https://github.com/dtolnay/anyhow/releases) - [Commits](https://github.com/dtolnay/anyhow/compare/1.0.56...1.0.57) --- updated-dependencies: - dependency-name: anyhow 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 4fdee21a..840e1bf0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -74,9 +74,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.56" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4361135be9122e0870de935d7c439aef945b9f9ddd4199a553b5270b49c82a27" +checksum = "08f9b8508dccb7687a1d6c4ce66b2b0ecef467c94667de27d8d7fe1f8d2a9cdc" [[package]] name = "arrayref" From 9c8fe87ca3c80f1440e8be3fff67932b81712d91 Mon Sep 17 00:00:00 2001 From: binarybaron <86064887+binarybaron@users.noreply.github.com> Date: Fri, 22 Apr 2022 14:50:48 +0200 Subject: [PATCH 23/56] Change example rendezvous node to `/dns4/discover.unstoppableswap.net/tcp/8888/p2p/12D3Ko...` The rendezvous node that was provided for testing purposes by the COMIT team will be shutdown. --- docs/asb/README.md | 2 +- docs/cli/README.md | 2 +- docs/cli/discover_and_take.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/asb/README.md b/docs/asb/README.md index e39375a9..e0991d8d 100644 --- a/docs/asb/README.md +++ b/docs/asb/README.md @@ -48,7 +48,7 @@ For example: ```toml [network] -rendezvous_point = "/dnsaddr/rendezvous.coblox.tech/p2p/12D3KooWQUt9DkNZxEn2R5ymJzWj15MpG6mTW84kyd8vDaRZi46o" +rendezvous_point = "/dns4/discover.unstoppableswap.net/tcp/8888/p2p/12D3KooWA6cnqJpVnreBVnoro8midDL9Lpzmg8oJPoAGi7YYaamE" external_addresses = ["/dns4/example.com/tcp/9939"] ``` diff --git a/docs/cli/README.md b/docs/cli/README.md index 82de15d4..d95d90ef 100644 --- a/docs/cli/README.md +++ b/docs/cli/README.md @@ -100,7 +100,7 @@ OPTIONS: --tor-socks5-port Your local Tor socks5 proxy port [default: 9050] ``` -Running `swap --testnet list-sellers --rendezvous-point /dnsaddr/rendezvous.coblox.tech/p2p/12D3KooWQUt9DkNZxEn2R5ymJzWj15MpG6mTW84kyd8vDaRZi46o` will give you something like: +Running `swap --testnet list-sellers --rendezvous-point /dns4/discover.unstoppableswap.net/tcp/8888/p2p/12D3KooWA6cnqJpVnreBVnoro8midDL9Lpzmg8oJPoAGi7YYaamE` will give you something like: ``` Connected to rendezvous point, discovering nodes in 'xmr-btc-swap-testnet' namespace ... diff --git a/docs/cli/discover_and_take.sh b/docs/cli/discover_and_take.sh index af250951..6aca6475 100755 --- a/docs/cli/discover_and_take.sh +++ b/docs/cli/discover_and_take.sh @@ -8,7 +8,7 @@ # 4th param: Your bech32 Bitcoin testnet address that will be used for any change output (e.g. refund scenario or when swapping an amount smaller than the transferred BTC) # # Example usage: -# discover_and_take.sh "PATH/TO/swap" "/dnsaddr/rendezvous.coblox.tech/p2p/12D3KooWQUt9DkNZxEn2R5ymJzWj15MpG6mTW84kyd8vDaRZi46o" "YOUR_XMR_STAGENET_ADDRESS" "YOUR_BECH32_BITCOIN_TESTNET_ADDRESS" +# discover_and_take.sh "PATH/TO/swap" "/dns4/discover.unstoppableswap.net/tcp/8888/p2p/12D3KooWA6cnqJpVnreBVnoro8midDL9Lpzmg8oJPoAGi7YYaamE" "YOUR_XMR_STAGENET_ADDRESS" "YOUR_BECH32_BITCOIN_TESTNET_ADDRESS" CLI_PATH=$1 RENDEZVOUS_POINT=$2 From 1663c45071d6d2a81518b8c59b3ad996774aee89 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Apr 2022 11:09:59 +0000 Subject: [PATCH 24/56] Bump serde_with from 1.12.1 to 1.13.0 Bumps [serde_with](https://github.com/jonasbb/serde_with) from 1.12.1 to 1.13.0. - [Release notes](https://github.com/jonasbb/serde_with/releases) - [Commits](https://github.com/jonasbb/serde_with/compare/v1.12.1...v1.13.0) --- updated-dependencies: - dependency-name: serde_with dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 840e1bf0..6fc47d6a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -832,9 +832,9 @@ dependencies = [ [[package]] name = "darling" -version = "0.13.0" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "757c0ded2af11d8e739c4daea1ac623dd1624b06c844cf3f5a39f1bdbd99bb12" +checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" dependencies = [ "darling_core", "darling_macro", @@ -842,9 +842,9 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.13.0" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c34d8efb62d0c2d7f60ece80f75e5c63c1588ba68032740494b0b9a996466e3" +checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" dependencies = [ "fnv", "ident_case", @@ -856,9 +856,9 @@ dependencies = [ [[package]] name = "darling_macro" -version = "0.13.0" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ade7bff147130fe5e6d39f089c6bd49ec0250f35d70b2eebf72afdfc919f15cc" +checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" dependencies = [ "darling_core", "quote", @@ -3584,9 +3584,9 @@ dependencies = [ [[package]] name = "serde_with" -version = "1.12.1" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "946fa04a8ac43ff78a1f4b811990afb9ddbdf5890b46d6dda0ba1998230138b7" +checksum = "b827f2113224f3f19a665136f006709194bdfdcb1fdc1e4b2b5cbac8e0cced54" dependencies = [ "rustversion", "serde", @@ -3595,9 +3595,9 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "1.5.0" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98c1fcca18d55d1763e1c16873c4bde0ac3ef75179a28c7b372917e0494625be" +checksum = "e182d6ec6f05393cc0e5ed1bf81ad6db3a8feedf8ee515ecdd369809bcce8082" dependencies = [ "darling", "proc-macro2", From 051f541f7f200b07e0abb3cd1e3ea3b81fe8d2b2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 9 Jun 2022 11:07:50 +0000 Subject: [PATCH 25/56] Bump actions/setup-python from 3 to 4 Bumps [actions/setup-python](https://github.com/actions/setup-python) from 3 to 4. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/setup-python dependency-type: direct:production update-type: version-update:semver-major ... 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 d21ed1f2..0cbaa9db 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@v3 + - uses: actions/setup-python@v4 with: python-version: "3.x" From d885f491d52afa205bf23b9d947af63887f6b964 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Jul 2022 11:16:26 +0000 Subject: [PATCH 26/56] Bump Swatinem/rust-cache from 1.4.0 to 2.0.0 Bumps [Swatinem/rust-cache](https://github.com/Swatinem/rust-cache) from 1.4.0 to 2.0.0. - [Release notes](https://github.com/Swatinem/rust-cache/releases) - [Changelog](https://github.com/Swatinem/rust-cache/blob/master/CHANGELOG.md) - [Commits](https://github.com/Swatinem/rust-cache/compare/v1.4.0...v2.0.0) --- updated-dependencies: - dependency-name: Swatinem/rust-cache 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 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-release-binaries.yml b/.github/workflows/build-release-binaries.yml index 0cbaa9db..d3832088 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.4.0 + - uses: Swatinem/rust-cache@v2.0.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 d7fa4eac..678d3305 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: - name: Checkout sources uses: actions/checkout@v3.0.2 - - uses: Swatinem/rust-cache@v1.4.0 + - uses: Swatinem/rust-cache@v2.0.0 - name: Check formatting uses: dprint/check@v2.0 @@ -44,7 +44,7 @@ jobs: - name: Checkout sources uses: actions/checkout@v3.0.2 - - uses: Swatinem/rust-cache@v1.4.0 + - uses: Swatinem/rust-cache@v2.0.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@v3.0.2 - - uses: Swatinem/rust-cache@v1.4.0 + - uses: Swatinem/rust-cache@v2.0.0 - name: Build tests run: cargo build --tests --workspace --all-features @@ -113,7 +113,7 @@ jobs: - name: Checkout sources uses: actions/checkout@v3.0.2 - - uses: Swatinem/rust-cache@v1.4.0 + - uses: Swatinem/rust-cache@v2.0.0 - name: Run test ${{ matrix.test_name }} run: cargo test --package swap --all-features --test ${{ matrix.test_name }} -- --nocapture From db3bb3db54bf82c06ff563fb6a0db38e0c9cf63c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Jul 2022 11:16:29 +0000 Subject: [PATCH 27/56] Bump dprint/check from 2.0 to 2.1 Bumps [dprint/check](https://github.com/dprint/check) from 2.0 to 2.1. - [Release notes](https://github.com/dprint/check/releases) - [Commits](https://github.com/dprint/check/compare/v2.0...v2.1) --- updated-dependencies: - dependency-name: dprint/check dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d7fa4eac..cb17d104 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: - uses: Swatinem/rust-cache@v1.4.0 - name: Check formatting - uses: dprint/check@v2.0 + uses: dprint/check@v2.1 - name: Run clippy with default features run: cargo clippy --workspace --all-targets -- -D warnings From 3d85c1f05e58147ca7c0d59ba4aad7dff50e0af2 Mon Sep 17 00:00:00 2001 From: Byron Hambly Date: Thu, 21 Jul 2022 14:14:58 +0200 Subject: [PATCH 28/56] deps: bump serde, serde_json, pin-project #1053 #1045 --- Cargo.lock | 42 ++++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6fc47d6a..c71c1706 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2665,11 +2665,11 @@ dependencies = [ [[package]] name = "pin-project" -version = "0.4.27" +version = "0.4.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ffbc8e94b38ea3d2d8ba92aea2983b503cd75d0888d75b86bb37970b5698e15" +checksum = "3ef0f924a5ee7ea9cbcea77529dba45f8a9ba9f622419fe3386ca581a3ae9d5a" dependencies = [ - "pin-project-internal 0.4.27", + "pin-project-internal 0.4.30", ] [[package]] @@ -2683,9 +2683,9 @@ dependencies = [ [[package]] name = "pin-project-internal" -version = "0.4.27" +version = "0.4.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65ad2ae56b6abe3a1ee25f15ee605bacadb9a764edaba9c2bf4103800d4a1895" +checksum = "851c8d0ce9bebe43790dedfc86614c23494ac9f423dd618d3a61fc693eafe61e" dependencies = [ "proc-macro2", "quote", @@ -2807,11 +2807,11 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.27" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0d8caf72986c1a598726adc988bb5984792ef84f5ee5aa50209145ee8077038" +checksum = "dd96a1e8ed2596c337f8eae5f24924ec83f5ad5ab21ea8e455d3566c69fbcaf7" dependencies = [ - "unicode-xid", + "unicode-ident", ] [[package]] @@ -3389,7 +3389,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4da5fcb054c46f5a5dff833b129285a93d3f0179531735e6c866e8cc307d2020" dependencies = [ "futures", - "pin-project 0.4.27", + "pin-project 0.4.30", "static_assertions", ] @@ -3520,9 +3520,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.136" +version = "1.0.140" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789" +checksum = "fc855a42c7967b7c369eb5860f7164ef1f6f81c20c7cc1141f2a604e18723b03" dependencies = [ "serde_derive", ] @@ -3549,9 +3549,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.136" +version = "1.0.140" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08597e7152fcd306f41838ed3e37be9eaeed2b61c42e2117266a554fab4662f9" +checksum = "6f2122636b9fe3b81f1cb25099fcf2d3f542cdb1d45940d56c713158884a05da" dependencies = [ "proc-macro2", "quote", @@ -3560,9 +3560,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.79" +version = "1.0.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e8d9fa5c3b304765ce1fd9c4c8a3de2c8db365a5b91be52f186efc675681d95" +checksum = "82c2c1fdcd807d1098552c5b9a36e425e42e9fbd7c6a37a8425f390f781f7fa7" dependencies = [ "indexmap", "itoa 1.0.1", @@ -4098,13 +4098,13 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.73" +version = "1.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f71489ff30030d2ae598524f61326b902466f72a0fb1a8564c001cc63425bcc7" +checksum = "c50aef8a904de4c23c788f104b7dddc7d6f79c647c7c8ce4cc8f73eb0ca773dd" dependencies = [ "proc-macro2", "quote", - "unicode-xid", + "unicode-ident", ] [[package]] @@ -4630,6 +4630,12 @@ dependencies = [ "matches", ] +[[package]] +name = "unicode-ident" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15c61ba63f9235225a22310255a29b806b907c9b8c964bcbd0a2c70f3f2deea7" + [[package]] name = "unicode-normalization" version = "0.1.17" From 8c408321e4f084ca644ec2e513d01c87c1874e9a Mon Sep 17 00:00:00 2001 From: Byron Hambly Date: Thu, 21 Jul 2022 14:20:56 +0200 Subject: [PATCH 29/56] deps: bump thiserror to 10.31 #1030 --- Cargo.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c71c1706..a24b00cc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4185,18 +4185,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.30" +version = "1.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417" +checksum = "bd829fe32373d27f76265620b5309d0340cb8550f523c1dda251d6298069069a" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.30" +version = "1.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b" +checksum = "0396bc89e626244658bef819e22d0cc459e795a5ebe878e6ec336d1674a8d79a" dependencies = [ "proc-macro2", "quote", From 6bf472fc126582529013a001756b9d3e5d637a8f Mon Sep 17 00:00:00 2001 From: Byron Hambly Date: Thu, 21 Jul 2022 14:23:05 +0200 Subject: [PATCH 30/56] deps: bump async-trait to 0.1.56 #1039 --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a24b00cc..903b7695 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -117,9 +117,9 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.52" +version = "0.1.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "061a7acccaa286c011ddc30970520b98fa40e00c9d644633fb26b5fc63a265e3" +checksum = "96cf8829f67d2eab0b2dfa42c5d0ef737e0724e4a82b01b3e292456202b19716" dependencies = [ "proc-macro2", "quote", From 7928c9f5c49e3379d4202513e5dd8d20b5024d75 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 Jul 2022 11:13:38 +0000 Subject: [PATCH 31/56] Bump rust_decimal_macros from 1.23.1 to 1.25.0 Bumps [rust_decimal_macros](https://github.com/paupino/rust-decimal) from 1.23.1 to 1.25.0. - [Release notes](https://github.com/paupino/rust-decimal/releases) - [Changelog](https://github.com/paupino/rust-decimal/blob/master/CHANGELOG.md) - [Commits](https://github.com/paupino/rust-decimal/compare/1.23.1...1.25.0) --- updated-dependencies: - dependency-name: rust_decimal_macros dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 903b7695..ad7f8911 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3265,9 +3265,9 @@ dependencies = [ [[package]] name = "rust_decimal" -version = "1.23.1" +version = "1.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22dc69eadbf0ee2110b8d20418c0c6edbaefec2811c4963dc17b6344e11fe0f8" +checksum = "34a3bb58e85333f1ab191bf979104b586ebd77475bc6681882825f4532dfe87c" dependencies = [ "arrayvec 0.7.2", "num-traits", @@ -3276,9 +3276,9 @@ dependencies = [ [[package]] name = "rust_decimal_macros" -version = "1.23.1" +version = "1.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c70be9367d4bc095d10b48d41b819d09ed4dafc528765a144d32ed1d530654" +checksum = "d1467556c7c115165aa0346bcf45bc947203bcc880efad85a09ba24ea17926c4" dependencies = [ "quote", "rust_decimal", From 02bbacac549609dd33fe87f966e6fd444cd9030b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 Jul 2022 11:13:46 +0000 Subject: [PATCH 32/56] Bump reqwest from 0.11.10 to 0.11.11 Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.11.10 to 0.11.11. - [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.10...v0.11.11) --- updated-dependencies: - dependency-name: reqwest dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 903b7695..819d8dd1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3200,9 +3200,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.11.10" +version = "0.11.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46a1f7aa4f35e5e8b4160449f51afc758f0ce6454315a9fa7d0d113e958c41eb" +checksum = "b75aa69a3f06bbcc66ede33af2af253c6f7a86b1ca0033f60c580a27074fbf92" dependencies = [ "base64 0.13.0", "bytes", @@ -3229,7 +3229,8 @@ dependencies = [ "tokio", "tokio-rustls 0.23.1", "tokio-socks", - "tokio-util 0.6.9", + "tokio-util 0.7.1", + "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", @@ -3357,9 +3358,9 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "0.3.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee86d63972a7c661d1536fefe8c3c8407321c3df668891286de28abcd087360" +checksum = "e7522c9de787ff061458fe9a829dc790a3f5b22dc571694fc5883f448b94d9a9" dependencies = [ "base64 0.13.0", ] From 8eff499a630f951bbcca563268eed7b5d7b06fcc Mon Sep 17 00:00:00 2001 From: Byron Hambly Date: Tue, 26 Jul 2022 14:08:55 +0200 Subject: [PATCH 33/56] fix: change logs to UTC due to bug in time crate On Linux and macOS, no program output was being observed. This is referenced in the [LocalTime] docs for `tracing-subscriber`, which links to this [unsoundness issue] in the time crate. Rather than introducing a possible vector for undefined behaviour and segfaults, I have just changed the logging to use UTC time instead. When running the ASB as a systemd service, one would generally use the `--disable-timestamps` flag anyway as systemd adds its own timestamps which can be local to the server. If the situation with `tracing-subscriber` and the time crate is fixed then this can be updated. This commit also updates the `tracing-subscriber` and `tracing-appender` dependencies, closing #987. [LocalTime]: https://docs.rs/tracing-subscriber/latest/tracing_subscriber/fmt/time/struct.LocalTime.html [unsoundness issue]: https://github.com/time-rs/time/issues/293#issuecomment-748151025 --- .gitignore | 3 ++ CHANGELOG.md | 2 +- Cargo.lock | 66 ++++++++++++++++++++++++++++------------- swap/Cargo.toml | 4 +-- swap/src/asb/tracing.rs | 4 +-- swap/src/cli/tracing.rs | 13 ++++---- swap/src/tracing_ext.rs | 2 +- 7 files changed, 62 insertions(+), 32 deletions(-) diff --git a/.gitignore b/.gitignore index c0b0db30..905e678b 100644 --- a/.gitignore +++ b/.gitignore @@ -157,3 +157,6 @@ flycheck_*.el .swap-db/ # End of https://www.toptal.com/developers/gitignore/api/rust,clion+all,emacs + +*.log +.vscode \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index e49dd774..a2bce431 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,9 +10,9 @@ 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. - Update from monero v17.2.0 to monero v17.3.0 - Always write logs as JSON to files +- Change to UTC time for log messages, due to a bug causing no logging at all to be printed (linux/macos), and an [unsoundness issue](https://docs.rs/tracing-subscriber/latest/tracing_subscriber/fmt/time/struct.LocalTime.html) with local time in [the time crate](https://github.com/time-rs/time/issues/293#issuecomment-748151025) ### Added diff --git a/Cargo.lock b/Cargo.lock index 903b7695..4a1d3c0f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -523,7 +523,6 @@ dependencies = [ "libc", "num-integer", "num-traits", - "time 0.1.43", "winapi 0.3.9", ] @@ -2172,6 +2171,15 @@ dependencies = [ "regex-automata", ] +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata", +] + [[package]] name = "matches" version = "0.1.8" @@ -2285,7 +2293,7 @@ dependencies = [ "testcontainers 0.12.0", "tokio", "tracing", - "tracing-subscriber", + "tracing-subscriber 0.2.25", ] [[package]] @@ -2319,7 +2327,7 @@ dependencies = [ "rand 0.7.3", "testcontainers 0.12.0", "tokio", - "tracing-subscriber", + "tracing-subscriber 0.2.25", ] [[package]] @@ -2533,9 +2541,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.7.2" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af8b08b04175473088b46763e51ee54da5f9a164bc162f615b91bc179dbf15a3" +checksum = "18a6dbe30758c9f83eb00cbea4ac95966305f5a7772f3f42ebfc7fc7eddbd8e1" [[package]] name = "opaque-debug" @@ -4088,7 +4096,7 @@ dependencies = [ "tracing", "tracing-appender", "tracing-futures", - "tracing-subscriber", + "tracing-subscriber 0.3.15", "url", "uuid", "vergen", @@ -4205,9 +4213,9 @@ dependencies = [ [[package]] name = "thread_local" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8018d24e04c95ac8790716a5987d0fec4f8b27249ffa0f7d33f1369bdfb88cbd" +checksum = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180" dependencies = [ "once_cell", ] @@ -4428,9 +4436,9 @@ checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" [[package]] name = "tracing" -version = "0.1.34" +version = "0.1.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d0ecdcb44a79f0fe9844f0c4f33a342cbcbb5117de8001e6ba0dc2351327d09" +checksum = "a400e31aa60b9d44a52a8ee0343b5b18566b03a8321e0d321f695cf56e940160" dependencies = [ "cfg-if 1.0.0", "pin-project-lite 0.2.8", @@ -4440,13 +4448,13 @@ dependencies = [ [[package]] name = "tracing-appender" -version = "0.1.2" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9965507e507f12c8901432a33e31131222abac31edd90cabbcf85cf544b7127a" +checksum = "09d48f71a791638519505cefafe162606f706c25592e4bde4d97600c0195312e" dependencies = [ - "chrono", "crossbeam-channel", - "tracing-subscriber", + "time 0.3.9", + "tracing-subscriber 0.3.15", ] [[package]] @@ -4462,11 +4470,11 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.25" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dfce9f3241b150f36e8e54bb561a742d5daa1a47b5dd9a5ce369fd4a4db2210" +checksum = "7b7358be39f2f274f322d2aaed611acc57f382e8eb1e5b48cb9ae30933495ce7" dependencies = [ - "lazy_static", + "once_cell", "valuable", ] @@ -4495,9 +4503,9 @@ dependencies = [ [[package]] name = "tracing-serde" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb65ea441fbb84f9f6748fd496cf7f63ec9af5bca94dd86456978d055e8eb28b" +checksum = "bc6b213177105856957181934e4920de57730fc69bf42c37ee5bb664d406d9e1" dependencies = [ "serde", "tracing-core", @@ -4512,12 +4520,30 @@ dependencies = [ "ansi_term 0.12.1", "chrono", "lazy_static", - "matchers", + "matchers 0.0.1", + "regex", + "sharded-slab", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60db860322da191b40952ad9affe65ea23e7dd6a5c442c2c42865810c6ab8e6b" +dependencies = [ + "ansi_term 0.12.1", + "matchers 0.1.0", + "once_cell", "regex", "serde", "serde_json", "sharded-slab", "thread_local", + "time 0.3.9", "tracing", "tracing-core", "tracing-log", diff --git a/swap/Cargo.toml b/swap/Cargo.toml index b2fdd741..b708a84e 100644 --- a/swap/Cargo.toml +++ b/swap/Cargo.toml @@ -60,9 +60,9 @@ 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" ] } -tracing-appender = "0.1" +tracing-appender = "0.2" tracing-futures = { version = "0.2", features = [ "std-future", "futures-03" ] } -tracing-subscriber = { version = "0.2", default-features = false, features = [ "fmt", "ansi", "env-filter", "chrono", "tracing-log", "json" ] } +tracing-subscriber = { version = "0.3", default-features = false, features = [ "fmt", "ansi", "env-filter", "time", "tracing-log", "json" ] } url = { version = "2", features = [ "serde" ] } uuid = { version = "1.0", features = [ "serde", "v4" ] } void = "1" diff --git a/swap/src/asb/tracing.rs b/swap/src/asb/tracing.rs index dc3f7cca..c21c1e70 100644 --- a/swap/src/asb/tracing.rs +++ b/swap/src/asb/tracing.rs @@ -1,6 +1,6 @@ use anyhow::Result; use tracing_subscriber::filter::LevelFilter; -use tracing_subscriber::fmt::time::ChronoLocal; +use tracing_subscriber::fmt::time::UtcTime; use tracing_subscriber::FmtSubscriber; pub fn init(level: LevelFilter, json_format: bool, timestamp: bool) -> Result<()> { @@ -14,7 +14,7 @@ pub fn init(level: LevelFilter, json_format: bool, timestamp: bool) -> Result<() .with_env_filter(format!("asb={},swap={}", level, level)) .with_writer(std::io::stderr) .with_ansi(is_terminal) - .with_timer(ChronoLocal::with_format("%F %T".to_owned())) + .with_timer(UtcTime::rfc_3339()) .with_target(false); match (json_format, timestamp) { diff --git a/swap/src/cli/tracing.rs b/swap/src/cli/tracing.rs index 3bafc229..e759e0d0 100644 --- a/swap/src/cli/tracing.rs +++ b/swap/src/cli/tracing.rs @@ -1,10 +1,11 @@ use anyhow::Result; use std::option::Option::Some; use std::path::Path; +use time::format_description::well_known::Rfc3339; use tracing::subscriber::set_global_default; use tracing::{Event, Level, Subscriber}; use tracing_subscriber::fmt::format::{DefaultFields, Format, JsonFields}; -use tracing_subscriber::fmt::time::ChronoLocal; +use tracing_subscriber::fmt::time::UtcTime; use tracing_subscriber::layer::{Context, SubscriberExt}; use tracing_subscriber::{fmt, EnvFilter, FmtSubscriber, Layer, Registry}; use uuid::Uuid; @@ -47,7 +48,7 @@ pub fn init(debug: bool, json: bool, dir: impl AsRef, swap_id: Option = tracing_subscriber::fmt::Layer< fn() -> std::io::Stderr, >; -fn debug_terminal_printer() -> StdErrPrinter> { +fn debug_terminal_printer() -> StdErrPrinter>> { let is_terminal = atty::is(atty::Stream::Stderr); StdErrPrinter { inner: fmt::layer() .with_ansi(is_terminal) .with_target(false) - .with_timer(ChronoLocal::with_format("%F %T".to_owned())) + .with_timer(UtcTime::rfc_3339()) .with_writer(std::io::stderr), level: Level::DEBUG, } } -fn debug_json_terminal_printer() -> StdErrPrinter> { +fn debug_json_terminal_printer() -> StdErrPrinter>> { let is_terminal = atty::is(atty::Stream::Stderr); StdErrPrinter { inner: fmt::layer() .with_ansi(is_terminal) .with_target(false) - .with_timer(ChronoLocal::with_format("%F %T".to_owned())) + .with_timer(UtcTime::rfc_3339()) .json() .with_writer(std::io::stderr), level: Level::DEBUG, diff --git a/swap/src/tracing_ext.rs b/swap/src/tracing_ext.rs index 912187fd..6fd7eaba 100644 --- a/swap/src/tracing_ext.rs +++ b/swap/src/tracing_ext.rs @@ -41,7 +41,7 @@ impl MakeCapturingWriter { } } -impl MakeWriter for MakeCapturingWriter { +impl<'a> MakeWriter<'a> for MakeCapturingWriter { type Writer = CapturingWriter; fn make_writer(&self) -> Self::Writer { From a7e3f0ac2f059d0ce25249a8e61ed2eb3922a6a2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 28 Jul 2022 11:24:59 +0000 Subject: [PATCH 34/56] Bump time from 0.3.9 to 0.3.11 Bumps [time](https://github.com/time-rs/time) from 0.3.9 to 0.3.11. - [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.9...v0.3.11) --- updated-dependencies: - dependency-name: time dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4a1d3c0f..4da44dd4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4085,7 +4085,7 @@ dependencies = [ "tempfile", "testcontainers 0.12.0", "thiserror", - "time 0.3.9", + "time 0.3.11", "tokio", "tokio-socks", "tokio-tar", @@ -4232,9 +4232,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.9" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2702e08a7a860f005826c6815dcac101b19b5eb330c27fe4a5928fec1d20ddd" +checksum = "72c91f41dcb2f096c05f0873d667dceec1087ce5bcf984ec8ffb19acddbb3217" dependencies = [ "itoa 1.0.1", "libc", @@ -4453,7 +4453,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09d48f71a791638519505cefafe162606f706c25592e4bde4d97600c0195312e" dependencies = [ "crossbeam-channel", - "time 0.3.9", + "time 0.3.11", "tracing-subscriber 0.3.15", ] @@ -4543,7 +4543,7 @@ dependencies = [ "serde_json", "sharded-slab", "thread_local", - "time 0.3.9", + "time 0.3.11", "tracing", "tracing-core", "tracing-log", @@ -4783,7 +4783,7 @@ dependencies = [ "git2", "rustversion", "thiserror", - "time 0.3.9", + "time 0.3.11", ] [[package]] From 8e7bd85f317bcd609e585cfa9d425337fe4e8b8b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 28 Jul 2022 11:59:28 +0000 Subject: [PATCH 35/56] Bump async-compression from 0.3.12 to 0.3.14 Bumps [async-compression](https://github.com/Nemo157/async-compression) from 0.3.12 to 0.3.14. - [Release notes](https://github.com/Nemo157/async-compression/releases) - [Commits](https://github.com/Nemo157/async-compression/compare/0.3.12...0.3.14) --- updated-dependencies: - dependency-name: async-compression dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4a1d3c0f..8d9ce2e8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -104,9 +104,9 @@ checksum = "9d6e24d2cce90c53b948c46271bfb053e4bdc2db9b5d3f65e20f8cf28a1b7fc3" [[package]] name = "async-compression" -version = "0.3.12" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2bf394cfbbe876f0ac67b13b6ca819f9c9f2fb9ec67223cceb1555fbab1c31a" +checksum = "345fd392ab01f746c717b1357165b76f0b67a60192007b234058c9045fdcf695" dependencies = [ "bzip2", "futures-core", @@ -3208,9 +3208,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.11.10" +version = "0.11.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46a1f7aa4f35e5e8b4160449f51afc758f0ce6454315a9fa7d0d113e958c41eb" +checksum = "b75aa69a3f06bbcc66ede33af2af253c6f7a86b1ca0033f60c580a27074fbf92" dependencies = [ "base64 0.13.0", "bytes", @@ -3237,7 +3237,8 @@ dependencies = [ "tokio", "tokio-rustls 0.23.1", "tokio-socks", - "tokio-util 0.6.9", + "tokio-util 0.7.1", + "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", @@ -3273,9 +3274,9 @@ dependencies = [ [[package]] name = "rust_decimal" -version = "1.23.1" +version = "1.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22dc69eadbf0ee2110b8d20418c0c6edbaefec2811c4963dc17b6344e11fe0f8" +checksum = "34a3bb58e85333f1ab191bf979104b586ebd77475bc6681882825f4532dfe87c" dependencies = [ "arrayvec 0.7.2", "num-traits", @@ -3284,9 +3285,9 @@ dependencies = [ [[package]] name = "rust_decimal_macros" -version = "1.23.1" +version = "1.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c70be9367d4bc095d10b48d41b819d09ed4dafc528765a144d32ed1d530654" +checksum = "d1467556c7c115165aa0346bcf45bc947203bcc880efad85a09ba24ea17926c4" dependencies = [ "quote", "rust_decimal", @@ -3365,9 +3366,9 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "0.3.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee86d63972a7c661d1536fefe8c3c8407321c3df668891286de28abcd087360" +checksum = "e7522c9de787ff061458fe9a829dc790a3f5b22dc571694fc5883f448b94d9a9" dependencies = [ "base64 0.13.0", ] From 61f9f8a02ccbd6715316667a833c549e7cf06817 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 28 Jul 2022 11:59:44 +0000 Subject: [PATCH 36/56] Bump hyper from 0.14.18 to 0.14.20 Bumps [hyper](https://github.com/hyperium/hyper) from 0.14.18 to 0.14.20. - [Release notes](https://github.com/hyperium/hyper/releases) - [Changelog](https://github.com/hyperium/hyper/blob/v0.14.20/CHANGELOG.md) - [Commits](https://github.com/hyperium/hyper/compare/v0.14.18...v0.14.20) --- updated-dependencies: - dependency-name: hyper dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4a1d3c0f..017e765d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1507,9 +1507,9 @@ checksum = "05842d0d43232b23ccb7060ecb0f0626922c21f30012e97b767b30afd4a5d4b9" [[package]] name = "hyper" -version = "0.14.18" +version = "0.14.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b26ae0a80afebe130861d90abf98e3814a4f28a4c6ffeb5ab8ebb2be311e0ef2" +checksum = "02c929dc5c39e335a03c405292728118860721b10190d98c2a0f0efd5baafbac" dependencies = [ "bytes", "futures-channel", @@ -3208,9 +3208,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.11.10" +version = "0.11.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46a1f7aa4f35e5e8b4160449f51afc758f0ce6454315a9fa7d0d113e958c41eb" +checksum = "b75aa69a3f06bbcc66ede33af2af253c6f7a86b1ca0033f60c580a27074fbf92" dependencies = [ "base64 0.13.0", "bytes", @@ -3237,7 +3237,8 @@ dependencies = [ "tokio", "tokio-rustls 0.23.1", "tokio-socks", - "tokio-util 0.6.9", + "tokio-util 0.7.1", + "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", @@ -3273,9 +3274,9 @@ dependencies = [ [[package]] name = "rust_decimal" -version = "1.23.1" +version = "1.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22dc69eadbf0ee2110b8d20418c0c6edbaefec2811c4963dc17b6344e11fe0f8" +checksum = "34a3bb58e85333f1ab191bf979104b586ebd77475bc6681882825f4532dfe87c" dependencies = [ "arrayvec 0.7.2", "num-traits", @@ -3284,9 +3285,9 @@ dependencies = [ [[package]] name = "rust_decimal_macros" -version = "1.23.1" +version = "1.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c70be9367d4bc095d10b48d41b819d09ed4dafc528765a144d32ed1d530654" +checksum = "d1467556c7c115165aa0346bcf45bc947203bcc880efad85a09ba24ea17926c4" dependencies = [ "quote", "rust_decimal", @@ -3365,9 +3366,9 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "0.3.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee86d63972a7c661d1536fefe8c3c8407321c3df668891286de28abcd087360" +checksum = "e7522c9de787ff061458fe9a829dc790a3f5b22dc571694fc5883f448b94d9a9" dependencies = [ "base64 0.13.0", ] From 39e34a608b93e3960e43b49c96f58318ea0e59e0 Mon Sep 17 00:00:00 2001 From: Byron Hambly Date: Thu, 28 Jul 2022 14:37:07 +0200 Subject: [PATCH 37/56] fix: fix potential overflow in `max_bitcoin_for_price` In testing, ASB panicked in `max_bitcoin_for_price` when the Monero balance x Bitcoin price was enough to overflow `u64`. This commit changes the function to do the piconero offset division first, and then to use `checked_mul` to return None if the calculation would overflow. This required changing the function return signature to an `Option`. Additional tests for the function were also added. MONERO_FEE was changed from 0.000030 to 0.000016, which is still double the current median transaction fee listed at https://www.monero.how/monero-transaction-fees as of 2022-07-28. --- CHANGELOG.md | 2 ++ swap/src/asb/event_loop.rs | 14 ++++++---- swap/src/monero.rs | 54 ++++++++++++++++++++++++++------------ 3 files changed, 48 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a2bce431..7a5f8cec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Update from monero v17.2.0 to monero v17.3.0 - Always write logs as JSON to files - Change to UTC time for log messages, due to a bug causing no logging at all to be printed (linux/macos), and an [unsoundness issue](https://docs.rs/tracing-subscriber/latest/tracing_subscriber/fmt/time/struct.LocalTime.html) with local time in [the time crate](https://github.com/time-rs/time/issues/293#issuecomment-748151025) +- Fix potential integer overflow in ASB when calculating maximum Bitcoin amount for Monero balance +- Reduce Monero locking transaction fee amount from 0.000030 to 0.000016 XMR, which is still double the current median fee as reported at [monero.how](https://www.monero.how/monero-transaction-fees) ### Added diff --git a/swap/src/asb/event_loop.rs b/swap/src/asb/event_loop.rs index 1a06d95f..b819682d 100644 --- a/swap/src/asb/event_loop.rs +++ b/swap/src/asb/event_loop.rs @@ -326,11 +326,15 @@ where .ask() .context("Failed to compute asking price")?; - let max_bitcoin_for_monero = self - .monero_wallet - .get_balance() - .await? - .max_bitcoin_for_price(ask_price); + let xmr = self.monero_wallet.get_balance().await?; + + let max_bitcoin_for_monero = xmr.max_bitcoin_for_price(ask_price).ok_or_else(|| { + anyhow::anyhow!( + "Bitcoin price ({}) x Monero ({}) calculation overflow", + ask_price, + xmr, + ) + })?; if min_buy > max_bitcoin_for_monero { tracing::warn!( diff --git a/swap/src/monero.rs b/swap/src/monero.rs index bf3045ce..6d595cf0 100644 --- a/swap/src/monero.rs +++ b/swap/src/monero.rs @@ -81,8 +81,8 @@ pub struct PublicViewKey(PublicKey); #[derive(Debug, Copy, Clone, Deserialize, Serialize, PartialEq, PartialOrd)] pub struct Amount(u64); -// Median tx fees on Monero as found here: https://www.monero.how/monero-transaction-fees, XMR 0.000_015 * 2 (to be on the safe side) -pub const MONERO_FEE: Amount = Amount::from_piconero(30000000); +// Median tx fees on Monero as found here: https://www.monero.how/monero-transaction-fees, XMR 0.000_008 * 2 (to be on the safe side) +pub const MONERO_FEE: Amount = Amount::from_piconero(16_000_000); impl Amount { pub const ZERO: Self = Self(0); @@ -99,18 +99,18 @@ impl Amount { self.0 } - pub fn max_bitcoin_for_price(&self, ask_price: bitcoin::Amount) -> bitcoin::Amount { + pub fn max_bitcoin_for_price(&self, ask_price: bitcoin::Amount) -> Option { let piconero_minus_fee = self.as_piconero().saturating_sub(MONERO_FEE.as_piconero()); if piconero_minus_fee == 0 { - return bitcoin::Amount::ZERO; + return Some(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; + // divide first to reduce chance of multiplication overflow + let xmr = piconero_minus_fee / PICONERO_OFFSET; + let satoshi = xmr.checked_mul(ask_price.as_sat())?; - bitcoin::Amount::from_sat(piconero_calc) + Some(bitcoin::Amount::from_sat(satoshi)) } pub fn from_monero(amount: f64) -> Result { @@ -375,16 +375,36 @@ 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); + fn max_bitcoin_to_trade() { + // sanity check: if the asking price is 1 BTC / 1 XMR + // and we have 1 XMR + fee + // then max BTC we can buy is 1 + let xmr = Amount::parse_monero("1.0").unwrap() + MONERO_FEE; + let ask = bitcoin::Amount::from_btc(1.0).unwrap(); + let btc = xmr.max_bitcoin_for_price(ask).unwrap(); - let monero_max_from_bitcoin = amount.max_bitcoin_for_price(bitcoin_price_sats); + assert_eq!(ask, btc); - assert_eq!( - bitcoin::Amount::from_sat(3_828_988), - monero_max_from_bitcoin - ); + let xmr = Amount::parse_monero("10").unwrap(); + let ask = bitcoin::Amount::from_sat(382_900); + let btc = xmr.max_bitcoin_for_price(ask).unwrap(); + + assert_eq!(bitcoin::Amount::from_sat(3_446_100), btc); + } + + #[test] + fn max_bitcoin_to_trade_overflow() { + let xmr = Amount::from_monero(30.0).unwrap(); + let ask = bitcoin::Amount::from_sat(728_688); + let btc = xmr.max_bitcoin_for_price(ask).unwrap(); + + assert_eq!(bitcoin::Amount::from_sat(21_131_952), btc); + + let xmr = Amount::from_piconero(u64::MAX); + let ask = bitcoin::Amount::from_sat(u64::MAX); + let btc = xmr.max_bitcoin_for_price(ask); + + assert!(btc.is_none()); } #[test] @@ -393,7 +413,7 @@ mod tests { 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); + let monero_max_from_bitcoin = amount.max_bitcoin_for_price(bitcoin_price_sats).unwrap(); assert_eq!(bitcoin::Amount::ZERO, monero_max_from_bitcoin); } From 6d7c7871972a28b37b124bb76c9335eeb2a872a8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 28 Jul 2022 13:33:08 +0000 Subject: [PATCH 38/56] Bump dialoguer from 0.10.0 to 0.10.1 Bumps [dialoguer](https://github.com/mitsuhiko/dialoguer) from 0.10.0 to 0.10.1. - [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/v0.10.0...v0.10.1) --- updated-dependencies: - dependency-name: dialoguer dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 104c9332..83f4a7d2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -104,9 +104,9 @@ checksum = "9d6e24d2cce90c53b948c46271bfb053e4bdc2db9b5d3f65e20f8cf28a1b7fc3" [[package]] name = "async-compression" -version = "0.3.12" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2bf394cfbbe876f0ac67b13b6ca819f9c9f2fb9ec67223cceb1555fbab1c31a" +checksum = "345fd392ab01f746c717b1357165b76f0b67a60192007b234058c9045fdcf695" dependencies = [ "bzip2", "futures-core", @@ -896,9 +896,9 @@ dependencies = [ [[package]] name = "dialoguer" -version = "0.10.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349d6b4fabcd9e97e1df1ae15395ac7e49fb144946a0d453959dc2696273b9da" +checksum = "d8c8ae48e400addc32a8710c8d62d55cb84249a7d58ac4cd959daecfbaddc545" dependencies = [ "console", "tempfile", @@ -1507,9 +1507,9 @@ checksum = "05842d0d43232b23ccb7060ecb0f0626922c21f30012e97b767b30afd4a5d4b9" [[package]] name = "hyper" -version = "0.14.18" +version = "0.14.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b26ae0a80afebe130861d90abf98e3814a4f28a4c6ffeb5ab8ebb2be311e0ef2" +checksum = "02c929dc5c39e335a03c405292728118860721b10190d98c2a0f0efd5baafbac" dependencies = [ "bytes", "futures-channel", @@ -4086,7 +4086,7 @@ dependencies = [ "tempfile", "testcontainers 0.12.0", "thiserror", - "time 0.3.9", + "time 0.3.11", "tokio", "tokio-socks", "tokio-tar", @@ -4233,9 +4233,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.9" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2702e08a7a860f005826c6815dcac101b19b5eb330c27fe4a5928fec1d20ddd" +checksum = "72c91f41dcb2f096c05f0873d667dceec1087ce5bcf984ec8ffb19acddbb3217" dependencies = [ "itoa 1.0.1", "libc", @@ -4454,7 +4454,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09d48f71a791638519505cefafe162606f706c25592e4bde4d97600c0195312e" dependencies = [ "crossbeam-channel", - "time 0.3.9", + "time 0.3.11", "tracing-subscriber 0.3.15", ] @@ -4544,7 +4544,7 @@ dependencies = [ "serde_json", "sharded-slab", "thread_local", - "time 0.3.9", + "time 0.3.11", "tracing", "tracing-core", "tracing-log", @@ -4784,7 +4784,7 @@ dependencies = [ "git2", "rustversion", "thiserror", - "time 0.3.9", + "time 0.3.11", ] [[package]] From 6234675707d322c7094d5c9fa47efcea283b6952 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 28 Jul 2022 13:33:20 +0000 Subject: [PATCH 39/56] Bump tokio-util from 0.7.1 to 0.7.2 Bumps [tokio-util](https://github.com/tokio-rs/tokio) from 0.7.1 to 0.7.2. - [Release notes](https://github.com/tokio-rs/tokio/releases) - [Commits](https://github.com/tokio-rs/tokio/compare/tokio-util-0.7.1...tokio-util-0.7.2) --- updated-dependencies: - dependency-name: tokio-util dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 104c9332..df6a9c8b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -104,9 +104,9 @@ checksum = "9d6e24d2cce90c53b948c46271bfb053e4bdc2db9b5d3f65e20f8cf28a1b7fc3" [[package]] name = "async-compression" -version = "0.3.12" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2bf394cfbbe876f0ac67b13b6ca819f9c9f2fb9ec67223cceb1555fbab1c31a" +checksum = "345fd392ab01f746c717b1357165b76f0b67a60192007b234058c9045fdcf695" dependencies = [ "bzip2", "futures-core", @@ -1507,9 +1507,9 @@ checksum = "05842d0d43232b23ccb7060ecb0f0626922c21f30012e97b767b30afd4a5d4b9" [[package]] name = "hyper" -version = "0.14.18" +version = "0.14.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b26ae0a80afebe130861d90abf98e3814a4f28a4c6ffeb5ab8ebb2be311e0ef2" +checksum = "02c929dc5c39e335a03c405292728118860721b10190d98c2a0f0efd5baafbac" dependencies = [ "bytes", "futures-channel", @@ -3237,7 +3237,7 @@ dependencies = [ "tokio", "tokio-rustls 0.23.1", "tokio-socks", - "tokio-util 0.7.1", + "tokio-util 0.7.2", "tower-service", "url", "wasm-bindgen", @@ -4086,12 +4086,12 @@ dependencies = [ "tempfile", "testcontainers 0.12.0", "thiserror", - "time 0.3.9", + "time 0.3.11", "tokio", "tokio-socks", "tokio-tar", "tokio-tungstenite", - "tokio-util 0.7.1", + "tokio-util 0.7.2", "toml", "torut", "tracing", @@ -4233,9 +4233,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.9" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2702e08a7a860f005826c6815dcac101b19b5eb330c27fe4a5928fec1d20ddd" +checksum = "72c91f41dcb2f096c05f0873d667dceec1087ce5bcf984ec8ffb19acddbb3217" dependencies = [ "itoa 1.0.1", "libc", @@ -4390,9 +4390,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0edfdeb067411dba2044da6d1cb2df793dd35add7888d73c16e3381ded401764" +checksum = "f988a1a1adc2fb21f9c12aa96441da33a1728193ae0b95d2be22dbd17fcb4e5c" dependencies = [ "bytes", "futures-core", @@ -4454,7 +4454,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09d48f71a791638519505cefafe162606f706c25592e4bde4d97600c0195312e" dependencies = [ "crossbeam-channel", - "time 0.3.9", + "time 0.3.11", "tracing-subscriber 0.3.15", ] @@ -4544,7 +4544,7 @@ dependencies = [ "serde_json", "sharded-slab", "thread_local", - "time 0.3.9", + "time 0.3.11", "tracing", "tracing-core", "tracing-log", @@ -4784,7 +4784,7 @@ dependencies = [ "git2", "rustversion", "thiserror", - "time 0.3.9", + "time 0.3.11", ] [[package]] From 723655701f8ac762ec99effd9e0cb87f16c568a9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 28 Jul 2022 13:33:27 +0000 Subject: [PATCH 40/56] Bump pem from 1.0.2 to 1.1.0 Bumps [pem](https://github.com/jcreekmore/pem-rs) from 1.0.2 to 1.1.0. - [Release notes](https://github.com/jcreekmore/pem-rs/releases) - [Changelog](https://github.com/jcreekmore/pem-rs/blob/master/CHANGELOG.md) - [Commits](https://github.com/jcreekmore/pem-rs/compare/v1.0.2...v1.1.0) --- updated-dependencies: - dependency-name: pem dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 24 ++++++++++++------------ swap/Cargo.toml | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 104c9332..3adf5636 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -104,9 +104,9 @@ checksum = "9d6e24d2cce90c53b948c46271bfb053e4bdc2db9b5d3f65e20f8cf28a1b7fc3" [[package]] name = "async-compression" -version = "0.3.12" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2bf394cfbbe876f0ac67b13b6ca819f9c9f2fb9ec67223cceb1555fbab1c31a" +checksum = "345fd392ab01f746c717b1357165b76f0b67a60192007b234058c9045fdcf695" dependencies = [ "bzip2", "futures-core", @@ -1507,9 +1507,9 @@ checksum = "05842d0d43232b23ccb7060ecb0f0626922c21f30012e97b767b30afd4a5d4b9" [[package]] name = "hyper" -version = "0.14.18" +version = "0.14.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b26ae0a80afebe130861d90abf98e3814a4f28a4c6ffeb5ab8ebb2be311e0ef2" +checksum = "02c929dc5c39e335a03c405292728118860721b10190d98c2a0f0efd5baafbac" dependencies = [ "bytes", "futures-channel", @@ -2639,9 +2639,9 @@ dependencies = [ [[package]] name = "pem" -version = "1.0.2" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9a3b09a20e374558580a4914d3b7d89bd61b954a5a5e1dcbea98753addb1947" +checksum = "03c64931a1a212348ec4f3b4362585eca7159d0d09cbdf4a7f74f02173596fd4" dependencies = [ "base64 0.13.0", ] @@ -4086,7 +4086,7 @@ dependencies = [ "tempfile", "testcontainers 0.12.0", "thiserror", - "time 0.3.9", + "time 0.3.11", "tokio", "tokio-socks", "tokio-tar", @@ -4233,9 +4233,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.9" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2702e08a7a860f005826c6815dcac101b19b5eb330c27fe4a5928fec1d20ddd" +checksum = "72c91f41dcb2f096c05f0873d667dceec1087ce5bcf984ec8ffb19acddbb3217" dependencies = [ "itoa 1.0.1", "libc", @@ -4454,7 +4454,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09d48f71a791638519505cefafe162606f706c25592e4bde4d97600c0195312e" dependencies = [ "crossbeam-channel", - "time 0.3.9", + "time 0.3.11", "tracing-subscriber 0.3.15", ] @@ -4544,7 +4544,7 @@ dependencies = [ "serde_json", "sharded-slab", "thread_local", - "time 0.3.9", + "time 0.3.11", "tracing", "tracing-core", "tracing-log", @@ -4784,7 +4784,7 @@ dependencies = [ "git2", "rustversion", "thiserror", - "time 0.3.9", + "time 0.3.11", ] [[package]] diff --git a/swap/Cargo.toml b/swap/Cargo.toml index b708a84e..cb6d87c4 100644 --- a/swap/Cargo.toml +++ b/swap/Cargo.toml @@ -34,7 +34,7 @@ itertools = "0.10" libp2p = { git = "https://github.com/libp2p/rust-libp2p.git", default-features = false, features = [ "tcp-tokio", "yamux", "mplex", "dns-tokio", "noise", "request-response", "websocket", "ping", "rendezvous", "identify" ] } monero = { version = "0.12", features = [ "serde_support" ] } monero-rpc = { path = "../monero-rpc" } -pem = "1.0" +pem = "1.1" proptest = "1" qrcode = "0.12" rand = "0.8" From ce1ab192ac19499167ba7232b32fcfd87baca661 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 28 Jul 2022 16:03:36 +0000 Subject: [PATCH 41/56] Bump uuid from 1.0.0 to 1.1.2 Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.0.0 to 1.1.2. - [Release notes](https://github.com/uuid-rs/uuid/releases) - [Commits](https://github.com/uuid-rs/uuid/compare/1.0.0...1.1.2) --- updated-dependencies: - dependency-name: uuid dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- swap/Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bd516249..fb1c02f0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -896,9 +896,9 @@ dependencies = [ [[package]] name = "dialoguer" -version = "0.10.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349d6b4fabcd9e97e1df1ae15395ac7e49fb144946a0d453959dc2696273b9da" +checksum = "d8c8ae48e400addc32a8710c8d62d55cb84249a7d58ac4cd959daecfbaddc545" dependencies = [ "console", "tempfile", @@ -4745,9 +4745,9 @@ checksum = "05e42f7c18b8f902290b009cde6d651262f956c98bc51bca4cd1d511c9cd85c7" [[package]] name = "uuid" -version = "1.0.0" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cfcd319456c4d6ea10087ed423473267e1a071f3bc0aa89f80d60997843c6f0" +checksum = "dd6469f4314d5f1ffec476e05f17cc9a78bc7a27a6a857842170bdf8d6f98d2f" dependencies = [ "getrandom 0.2.2", "serde", diff --git a/swap/Cargo.toml b/swap/Cargo.toml index b708a84e..82acd5cc 100644 --- a/swap/Cargo.toml +++ b/swap/Cargo.toml @@ -64,7 +64,7 @@ tracing-appender = "0.2" tracing-futures = { version = "0.2", features = [ "std-future", "futures-03" ] } tracing-subscriber = { version = "0.3", default-features = false, features = [ "fmt", "ansi", "env-filter", "time", "tracing-log", "json" ] } url = { version = "2", features = [ "serde" ] } -uuid = { version = "1.0", features = [ "serde", "v4" ] } +uuid = { version = "1.1", features = [ "serde", "v4" ] } void = "1" [target.'cfg(not(windows))'.dependencies] From 182e553c48b2cb4eef77ed826d75a39a32485244 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 28 Jul 2022 16:30:59 +0000 Subject: [PATCH 42/56] Bump serde_with from 1.13.0 to 1.14.0 Bumps [serde_with](https://github.com/jonasbb/serde_with) from 1.13.0 to 1.14.0. - [Release notes](https://github.com/jonasbb/serde_with/releases) - [Commits](https://github.com/jonasbb/serde_with/compare/v1.13.0...v1.14.0) --- updated-dependencies: - dependency-name: serde_with dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 83f4a7d2..447f74e0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3237,7 +3237,7 @@ dependencies = [ "tokio", "tokio-rustls 0.23.1", "tokio-socks", - "tokio-util 0.7.1", + "tokio-util 0.7.2", "tower-service", "url", "wasm-bindgen", @@ -3593,11 +3593,10 @@ dependencies = [ [[package]] name = "serde_with" -version = "1.13.0" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b827f2113224f3f19a665136f006709194bdfdcb1fdc1e4b2b5cbac8e0cced54" +checksum = "678b5a069e50bf00ecd22d0cd8ddf7c236f68581b03db652061ed5eb13a312ff" dependencies = [ - "rustversion", "serde", "serde_with_macros", ] @@ -4091,7 +4090,7 @@ dependencies = [ "tokio-socks", "tokio-tar", "tokio-tungstenite", - "tokio-util 0.7.1", + "tokio-util 0.7.2", "toml", "torut", "tracing", @@ -4390,9 +4389,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0edfdeb067411dba2044da6d1cb2df793dd35add7888d73c16e3381ded401764" +checksum = "f988a1a1adc2fb21f9c12aa96441da33a1728193ae0b95d2be22dbd17fcb4e5c" dependencies = [ "bytes", "futures-core", From 71bc2cad3930b16db1a38d9b67c6065100380702 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 28 Jul 2022 17:28:16 +0000 Subject: [PATCH 43/56] Bump strum from 0.24.0 to 0.24.1 Bumps [strum](https://github.com/Peternator7/strum) from 0.24.0 to 0.24.1. - [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-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 40ba91e7..34751349 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3986,9 +3986,9 @@ checksum = "cae14b91c7d11c9a851d3fbc80a963198998c2a64eec840477fa92d8ce9b70bb" [[package]] name = "strum" -version = "0.24.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e96acfc1b70604b8b2f1ffa4c57e59176c7dbb05d556c71ecd2f5498a1dee7f8" +checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" dependencies = [ "strum_macros 0.24.0", ] @@ -4082,7 +4082,7 @@ dependencies = [ "spectral", "sqlx", "structopt", - "strum 0.24.0", + "strum 0.24.1", "tempfile", "testcontainers 0.12.0", "thiserror", @@ -4745,9 +4745,9 @@ checksum = "05e42f7c18b8f902290b009cde6d651262f956c98bc51bca4cd1d511c9cd85c7" [[package]] name = "uuid" -version = "1.0.0" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cfcd319456c4d6ea10087ed423473267e1a071f3bc0aa89f80d60997843c6f0" +checksum = "dd6469f4314d5f1ffec476e05f17cc9a78bc7a27a6a857842170bdf8d6f98d2f" dependencies = [ "getrandom 0.2.2", "serde", From 60a11fe34b1ec9e81821f74d8dcde457f84d3838 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 28 Jul 2022 17:53:14 +0000 Subject: [PATCH 44/56] Bump anyhow from 1.0.57 to 1.0.58 Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.57 to 1.0.58. - [Release notes](https://github.com/dtolnay/anyhow/releases) - [Commits](https://github.com/dtolnay/anyhow/compare/1.0.57...1.0.58) --- updated-dependencies: - dependency-name: anyhow dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b7883573..3fabd2b9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -74,9 +74,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.57" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f9b8508dccb7687a1d6c4ce66b2b0ecef467c94667de27d8d7fe1f8d2a9cdc" +checksum = "bb07d2053ccdbe10e2af2995a2f116c1330396493dc1269f6a91d0ae82e19704" [[package]] name = "arrayref" @@ -3593,11 +3593,10 @@ dependencies = [ [[package]] name = "serde_with" -version = "1.13.0" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b827f2113224f3f19a665136f006709194bdfdcb1fdc1e4b2b5cbac8e0cced54" +checksum = "678b5a069e50bf00ecd22d0cd8ddf7c236f68581b03db652061ed5eb13a312ff" dependencies = [ - "rustversion", "serde", "serde_with_macros", ] From db507a79db9ddca497b993c44193850cc04e7b61 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 29 Jul 2022 11:09:41 +0000 Subject: [PATCH 45/56] build(deps): bump dialoguer from 0.10.1 to 0.10.2 Bumps [dialoguer](https://github.com/mitsuhiko/dialoguer) from 0.10.1 to 0.10.2. - [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/v0.10.1...v0.10.2) --- updated-dependencies: - dependency-name: dialoguer 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 66bb32b8..69a78388 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -896,9 +896,9 @@ dependencies = [ [[package]] name = "dialoguer" -version = "0.10.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8c8ae48e400addc32a8710c8d62d55cb84249a7d58ac4cd959daecfbaddc545" +checksum = "a92e7e37ecef6857fdc0c0c5d42fd5b0938e46590c2183cc92dd310a6d078eb1" dependencies = [ "console", "tempfile", From dc706c584a16811c26de71e4b3e69adc88fd6c8f Mon Sep 17 00:00:00 2001 From: Byron Hambly Date: Sun, 31 Jul 2022 14:42:49 +0200 Subject: [PATCH 46/56] feat(swap): show min deposit required for min_quantity --- CHANGELOG.md | 3 +- swap/src/bin/swap.rs | 59 +++++++++++++++++++++++++++++----------- swap/src/bitcoin/lock.rs | 5 ++++ swap/src/cli/tracing.rs | 10 +++---- 4 files changed, 55 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a5f8cec..41243c57 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,9 +19,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### 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. + 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 Monero locking fees. 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 - Both the ASB and CLI now support the [Identify](https://github.com/libp2p/specs/blob/master/identify/README.md) protocol. This makes its version and network (testnet/mainnet) avaliable to others +- Display minimum BTC deposit required to cover the minimum quantity plus fee in the Swap CLI ## [0.10.2] - 2021-12-25 diff --git a/swap/src/bin/swap.rs b/swap/src/bin/swap.rs index a1188759..2acfb61a 100644 --- a/swap/src/bin/swap.rs +++ b/swap/src/bin/swap.rs @@ -105,6 +105,8 @@ async fn main() -> Result<()> { let event_loop = tokio::spawn(event_loop.run()); let max_givable = || bitcoin_wallet.max_giveable(TxLock::script_size()); + let estimate_fee = |amount| bitcoin_wallet.estimate_fee(TxLock::weight(), amount); + let (amount, fees) = match determine_btc_to_swap( json, event_loop_handle.request_quote(), @@ -112,6 +114,7 @@ async fn main() -> Result<()> { || bitcoin_wallet.balance(), max_givable, || bitcoin_wallet.sync(), + estimate_fee, ) .await { @@ -558,13 +561,14 @@ fn qr_code(value: &impl ToString) -> Result { Ok(qr_code) } -async fn determine_btc_to_swap( +async fn determine_btc_to_swap( json: bool, bid_quote: impl Future>, get_new_address: impl Future>, balance: FB, max_giveable_fn: FMG, sync: FS, + estimate_fee: FFE, ) -> Result<(bitcoin::Amount, bitcoin::Amount)> where TB: Future>, @@ -573,6 +577,8 @@ where FMG: Fn() -> TMG, TS: Future>, FS: Fn() -> TS, + FFE: Fn(bitcoin::Amount) -> TFE, + TFE: Future>, { tracing::debug!("Requesting quote"); let bid_quote = bid_quote.await?; @@ -600,8 +606,17 @@ where } loop { + let min_outstanding = bid_quote.min_quantity - max_giveable; + let min_fee = estimate_fee(min_outstanding).await?; + let min_deposit = min_outstanding + min_fee; + + tracing::info!( + "Deposit at least {} to cover the min quantity with fee!", + min_deposit + ); tracing::info!( %deposit_address, + %min_deposit, %max_giveable, %minimum_amount, %maximum_amount, @@ -633,9 +648,7 @@ where let balance = balance().await?; let fees = balance - max_giveable; - let max_accepted = bid_quote.max_quantity; - let btc_swap_amount = min(max_giveable, max_accepted); Ok((btc_swap_amount, fees)) @@ -668,6 +681,7 @@ mod tests { result.give() }, || async { Ok(()) }, + |_| async { Ok(Amount::from_sat(1000)) }, ) .await .unwrap(); @@ -679,7 +693,8 @@ mod tests { assert_eq!( writer.captured(), r" INFO swap: Received quote price=0.00100000 BTC minimum_amount=0.00000000 BTC maximum_amount=0.01000000 BTC - INFO swap: Waiting for Bitcoin deposit deposit_address=1PdfytjS7C8wwd9Lq5o4x9aXA2YRqaCpH6 max_giveable=0.00000000 BTC minimum_amount=0.00000000 BTC maximum_amount=0.01000000 BTC + INFO swap: Deposit at least 0.00001000 BTC to cover the min quantity with fee! + INFO swap: Waiting for Bitcoin deposit deposit_address=1PdfytjS7C8wwd9Lq5o4x9aXA2YRqaCpH6 min_deposit=0.00001000 BTC max_giveable=0.00000000 BTC minimum_amount=0.00000000 BTC maximum_amount=0.01000000 BTC INFO swap: Received Bitcoin new_balance=0.00100000 BTC max_giveable=0.00090000 BTC " ); @@ -703,6 +718,7 @@ mod tests { result.give() }, || async { Ok(()) }, + |_| async { Ok(Amount::from_sat(1000)) }, ) .await .unwrap(); @@ -714,14 +730,15 @@ mod tests { assert_eq!( writer.captured(), r" INFO swap: Received quote price=0.00100000 BTC minimum_amount=0.00000000 BTC maximum_amount=0.01000000 BTC - INFO swap: Waiting for Bitcoin deposit deposit_address=1PdfytjS7C8wwd9Lq5o4x9aXA2YRqaCpH6 max_giveable=0.00000000 BTC minimum_amount=0.00000000 BTC maximum_amount=0.01000000 BTC + INFO swap: Deposit at least 0.00001000 BTC to cover the min quantity with fee! + INFO swap: Waiting for Bitcoin deposit deposit_address=1PdfytjS7C8wwd9Lq5o4x9aXA2YRqaCpH6 min_deposit=0.00001000 BTC max_giveable=0.00000000 BTC minimum_amount=0.00000000 BTC maximum_amount=0.01000000 BTC INFO swap: Received Bitcoin new_balance=0.10010000 BTC max_giveable=0.10000000 BTC " ); } #[tokio::test] - async fn given_initial_balance_below_max_quantity_swaps_max_givable() { + async fn given_initial_balance_below_max_quantity_swaps_max_giveable() { let writer = capture_logs(LevelFilter::INFO); let givable = Arc::new(Mutex::new(MaxGiveable::new(vec![ Amount::from_btc(0.0049).unwrap(), @@ -738,6 +755,7 @@ mod tests { result.give() }, || async { Ok(()) }, + |_| async { Ok(Amount::from_sat(1000)) }, ) .await .unwrap(); @@ -748,8 +766,7 @@ mod tests { assert_eq!((amount, fees), (expected_amount, expected_fees)); assert_eq!( writer.captured(), - r" INFO swap: Received quote price=0.00100000 BTC minimum_amount=0.00000000 BTC maximum_amount=0.01000000 BTC -" + " INFO swap: Received quote price=0.00100000 BTC minimum_amount=0.00000000 BTC maximum_amount=0.01000000 BTC\n" ); } @@ -771,6 +788,7 @@ mod tests { result.give() }, || async { Ok(()) }, + |_| async { Ok(Amount::from_sat(1000)) }, ) .await .unwrap(); @@ -781,8 +799,7 @@ mod tests { assert_eq!((amount, fees), (expected_amount, expected_fees)); assert_eq!( writer.captured(), - r" INFO swap: Received quote price=0.00100000 BTC minimum_amount=0.00000000 BTC maximum_amount=0.01000000 BTC -" + " INFO swap: Received quote price=0.00100000 BTC minimum_amount=0.00000000 BTC maximum_amount=0.01000000 BTC\n" ); } @@ -804,6 +821,7 @@ mod tests { result.give() }, || async { Ok(()) }, + |_| async { Ok(Amount::from_sat(1000)) }, ) .await .unwrap(); @@ -815,7 +833,8 @@ mod tests { assert_eq!( writer.captured(), r" INFO swap: Received quote price=0.00100000 BTC minimum_amount=0.01000000 BTC maximum_amount=184467440737.09551615 BTC - INFO swap: Waiting for Bitcoin deposit deposit_address=1PdfytjS7C8wwd9Lq5o4x9aXA2YRqaCpH6 max_giveable=0.00000000 BTC minimum_amount=0.01000000 BTC maximum_amount=184467440737.09551615 BTC + INFO swap: Deposit at least 0.01001000 BTC to cover the min quantity with fee! + INFO swap: Waiting for Bitcoin deposit deposit_address=1PdfytjS7C8wwd9Lq5o4x9aXA2YRqaCpH6 min_deposit=0.01001000 BTC max_giveable=0.00000000 BTC minimum_amount=0.01000000 BTC maximum_amount=184467440737.09551615 BTC INFO swap: Received Bitcoin new_balance=0.01010000 BTC max_giveable=0.01000000 BTC " ); @@ -839,6 +858,7 @@ mod tests { result.give() }, || async { Ok(()) }, + |_| async { Ok(Amount::from_sat(1000)) }, ) .await .unwrap(); @@ -850,7 +870,8 @@ mod tests { assert_eq!( writer.captured(), r" INFO swap: Received quote price=0.00100000 BTC minimum_amount=0.01000000 BTC maximum_amount=184467440737.09551615 BTC - INFO swap: Waiting for Bitcoin deposit deposit_address=1PdfytjS7C8wwd9Lq5o4x9aXA2YRqaCpH6 max_giveable=0.00010000 BTC minimum_amount=0.01000000 BTC maximum_amount=184467440737.09551615 BTC + INFO swap: Deposit at least 0.00991000 BTC to cover the min quantity with fee! + INFO swap: Waiting for Bitcoin deposit deposit_address=1PdfytjS7C8wwd9Lq5o4x9aXA2YRqaCpH6 min_deposit=0.00991000 BTC max_giveable=0.00010000 BTC minimum_amount=0.01000000 BTC maximum_amount=184467440737.09551615 BTC INFO swap: Received Bitcoin new_balance=0.01010000 BTC max_giveable=0.01000000 BTC " ); @@ -879,6 +900,7 @@ mod tests { result.give() }, || async { Ok(()) }, + |_| async { Ok(Amount::from_sat(1000)) }, ), ) .await @@ -888,10 +910,12 @@ mod tests { assert_eq!( writer.captured(), r" INFO swap: Received quote price=0.00100000 BTC minimum_amount=0.10000000 BTC maximum_amount=184467440737.09551615 BTC - INFO swap: Waiting for Bitcoin deposit deposit_address=1PdfytjS7C8wwd9Lq5o4x9aXA2YRqaCpH6 max_giveable=0.00000000 BTC minimum_amount=0.10000000 BTC maximum_amount=184467440737.09551615 BTC + INFO swap: Deposit at least 0.10001000 BTC to cover the min quantity with fee! + INFO swap: Waiting for Bitcoin deposit deposit_address=1PdfytjS7C8wwd9Lq5o4x9aXA2YRqaCpH6 min_deposit=0.10001000 BTC max_giveable=0.00000000 BTC minimum_amount=0.10000000 BTC maximum_amount=184467440737.09551615 BTC INFO swap: Received Bitcoin new_balance=0.01010000 BTC max_giveable=0.01000000 BTC INFO swap: Deposited amount is less than `min_quantity` - INFO swap: Waiting for Bitcoin deposit deposit_address=1PdfytjS7C8wwd9Lq5o4x9aXA2YRqaCpH6 max_giveable=0.01000000 BTC minimum_amount=0.10000000 BTC maximum_amount=184467440737.09551615 BTC + INFO swap: Deposit at least 0.09001000 BTC to cover the min quantity with fee! + INFO swap: Waiting for Bitcoin deposit deposit_address=1PdfytjS7C8wwd9Lq5o4x9aXA2YRqaCpH6 min_deposit=0.09001000 BTC max_giveable=0.01000000 BTC minimum_amount=0.10000000 BTC maximum_amount=184467440737.09551615 BTC " ); } @@ -925,6 +949,7 @@ mod tests { result.give() }, || async { Ok(()) }, + |_| async { Ok(Amount::from_sat(1000)) }, ), ) .await @@ -934,14 +959,15 @@ mod tests { assert_eq!( writer.captured(), r" INFO swap: Received quote price=0.00100000 BTC minimum_amount=0.10000000 BTC maximum_amount=184467440737.09551615 BTC - INFO swap: Waiting for Bitcoin deposit deposit_address=1PdfytjS7C8wwd9Lq5o4x9aXA2YRqaCpH6 max_giveable=0.00000000 BTC minimum_amount=0.10000000 BTC maximum_amount=184467440737.09551615 BTC + INFO swap: Deposit at least 0.10001000 BTC to cover the min quantity with fee! + INFO swap: Waiting for Bitcoin deposit deposit_address=1PdfytjS7C8wwd9Lq5o4x9aXA2YRqaCpH6 min_deposit=0.10001000 BTC max_giveable=0.00000000 BTC minimum_amount=0.10000000 BTC maximum_amount=184467440737.09551615 BTC INFO swap: Received Bitcoin new_balance=0.21000000 BTC max_giveable=0.20000000 BTC " ); } #[tokio::test] - async fn given_bid_quote_max_amount_0_return_errorq() { + async fn given_bid_quote_max_amount_0_return_error() { let givable = Arc::new(Mutex::new(MaxGiveable::new(vec![ Amount::from_btc(0.0001).unwrap(), Amount::from_btc(0.01).unwrap(), @@ -957,6 +983,7 @@ mod tests { result.give() }, || async { Ok(()) }, + |_| async { Ok(Amount::from_sat(1000)) }, ) .await .err() diff --git a/swap/src/bitcoin/lock.rs b/swap/src/bitcoin/lock.rs index c9efff2b..2f195ff7 100644 --- a/swap/src/bitcoin/lock.rs +++ b/swap/src/bitcoin/lock.rs @@ -11,6 +11,7 @@ use bitcoin::Script; use serde::{Deserialize, Serialize}; const SCRIPT_SIZE: usize = 34; +const TX_LOCK_WEIGHT: usize = 485; #[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] pub struct TxLock { @@ -161,6 +162,10 @@ impl TxLock { output: vec![tx_out], } } + + pub fn weight() -> usize { + TX_LOCK_WEIGHT + } } impl From for PartiallySignedTransaction { diff --git a/swap/src/cli/tracing.rs b/swap/src/cli/tracing.rs index e759e0d0..a1cd77fb 100644 --- a/swap/src/cli/tracing.rs +++ b/swap/src/cli/tracing.rs @@ -16,7 +16,8 @@ pub fn init(debug: bool, json: bool, dir: impl AsRef, swap_id: Option, swap_id: Option, swap_id: Option { From 6a7686768fccbbe5a6d9d4a856f7cd46f5cb164e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Aug 2022 11:16:01 +0000 Subject: [PATCH 47/56] build(deps): bump async-trait from 0.1.56 to 0.1.57 Bumps [async-trait](https://github.com/dtolnay/async-trait) from 0.1.56 to 0.1.57. - [Release notes](https://github.com/dtolnay/async-trait/releases) - [Commits](https://github.com/dtolnay/async-trait/compare/0.1.56...0.1.57) --- updated-dependencies: - dependency-name: async-trait 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 69a78388..17cb50fd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -117,9 +117,9 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.56" +version = "0.1.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96cf8829f67d2eab0b2dfa42c5d0ef737e0724e4a82b01b3e292456202b19716" +checksum = "76464446b8bc32758d7e88ee1a804d9914cd9b1cb264c029899680b0be29826f" dependencies = [ "proc-macro2", "quote", From 86d57453cfddbbb69fd10db289777bb5e74d7ef4 Mon Sep 17 00:00:00 2001 From: Byron Hambly Date: Wed, 3 Aug 2022 12:30:51 +0200 Subject: [PATCH 48/56] fix: fix btc for xmr calculation error The calculation overflow fix in #1068 did not account for XMR < 1 which resulted in truncation when dividing by the PICO_OFFSET. This commit uses `Decimal` to do the calculation at fixed precision and adds a number of test values to verify the calculation. Closes #1084 --- swap/src/asb/event_loop.rs | 8 ++-- swap/src/monero.rs | 85 ++++++++++++++++++++++++++++++-------- 2 files changed, 70 insertions(+), 23 deletions(-) diff --git a/swap/src/asb/event_loop.rs b/swap/src/asb/event_loop.rs index b819682d..9248a324 100644 --- a/swap/src/asb/event_loop.rs +++ b/swap/src/asb/event_loop.rs @@ -329,13 +329,11 @@ where let xmr = self.monero_wallet.get_balance().await?; let max_bitcoin_for_monero = xmr.max_bitcoin_for_price(ask_price).ok_or_else(|| { - anyhow::anyhow!( - "Bitcoin price ({}) x Monero ({}) calculation overflow", - ask_price, - xmr, - ) + anyhow::anyhow!("Bitcoin price ({}) x Monero ({}) overflow", ask_price, xmr) })?; + tracing::debug!(%ask_price, %xmr, %max_bitcoin_for_monero); + 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 {}", diff --git a/swap/src/monero.rs b/swap/src/monero.rs index 6d595cf0..94555c8a 100644 --- a/swap/src/monero.rs +++ b/swap/src/monero.rs @@ -95,20 +95,28 @@ impl Amount { Amount(amount) } + /// Return Monero Amount as Piconero. pub fn as_piconero(&self) -> u64 { self.0 } + /// Calculate the maximum amount of Bitcoin that can be bought at a given + /// asking price for this amount of Monero including the median fee. pub fn max_bitcoin_for_price(&self, ask_price: bitcoin::Amount) -> Option { - let piconero_minus_fee = self.as_piconero().saturating_sub(MONERO_FEE.as_piconero()); + let pico_minus_fee = self.as_piconero().saturating_sub(MONERO_FEE.as_piconero()); - if piconero_minus_fee == 0 { + if pico_minus_fee == 0 { return Some(bitcoin::Amount::ZERO); } - // divide first to reduce chance of multiplication overflow - let xmr = piconero_minus_fee / PICONERO_OFFSET; - let satoshi = xmr.checked_mul(ask_price.as_sat())?; + // safely convert the BTC/XMR rate to sat/pico + let ask_sats = Decimal::from(ask_price.as_sat()); + let pico_per_xmr = Decimal::from(PICONERO_OFFSET); + let ask_sats_per_pico = ask_sats / pico_per_xmr; + + let pico = Decimal::from(pico_minus_fee); + let max_sats = pico.checked_mul(ask_sats_per_pico)?; + let satoshi = max_sats.to_u64()?; Some(bitcoin::Amount::from_sat(satoshi)) } @@ -377,19 +385,62 @@ mod tests { #[test] fn max_bitcoin_to_trade() { // sanity check: if the asking price is 1 BTC / 1 XMR - // and we have 1 XMR + fee - // then max BTC we can buy is 1 - let xmr = Amount::parse_monero("1.0").unwrap() + MONERO_FEE; + // and we have μ XMR + fee + // then max BTC we can buy is μ let ask = bitcoin::Amount::from_btc(1.0).unwrap(); + + let xmr = Amount::parse_monero("1.0").unwrap() + MONERO_FEE; let btc = xmr.max_bitcoin_for_price(ask).unwrap(); - assert_eq!(ask, btc); + assert_eq!(btc, bitcoin::Amount::from_btc(1.0).unwrap()); + + let xmr = Amount::parse_monero("0.5").unwrap() + MONERO_FEE; + let btc = xmr.max_bitcoin_for_price(ask).unwrap(); + + assert_eq!(btc, bitcoin::Amount::from_btc(0.5).unwrap()); + + let xmr = Amount::parse_monero("2.5").unwrap() + MONERO_FEE; + let btc = xmr.max_bitcoin_for_price(ask).unwrap(); + + assert_eq!(btc, bitcoin::Amount::from_btc(2.5).unwrap()); + + let xmr = Amount::parse_monero("420").unwrap() + MONERO_FEE; + let btc = xmr.max_bitcoin_for_price(ask).unwrap(); + + assert_eq!(btc, bitcoin::Amount::from_btc(420.0).unwrap()); + + let xmr = Amount::parse_monero("0.00001").unwrap() + MONERO_FEE; + let btc = xmr.max_bitcoin_for_price(ask).unwrap(); + + assert_eq!(btc, bitcoin::Amount::from_btc(0.00001).unwrap()); + + // other ask prices + + let ask = bitcoin::Amount::from_btc(0.5).unwrap(); + let xmr = Amount::parse_monero("2").unwrap() + MONERO_FEE; + let btc = xmr.max_bitcoin_for_price(ask).unwrap(); + + assert_eq!(btc, bitcoin::Amount::from_btc(1.0).unwrap()); + + let ask = bitcoin::Amount::from_btc(2.0).unwrap(); + let xmr = Amount::parse_monero("1").unwrap() + MONERO_FEE; + let btc = xmr.max_bitcoin_for_price(ask).unwrap(); + + assert_eq!(btc, bitcoin::Amount::from_btc(2.0).unwrap()); - let xmr = Amount::parse_monero("10").unwrap(); let ask = bitcoin::Amount::from_sat(382_900); + let xmr = Amount::parse_monero("10").unwrap(); let btc = xmr.max_bitcoin_for_price(ask).unwrap(); - assert_eq!(bitcoin::Amount::from_sat(3_446_100), btc); + assert_eq!(btc, bitcoin::Amount::from_sat(3_828_993)); + + // example from https://github.com/comit-network/xmr-btc-swap/issues/1084 + // with rate from kraken at that time + let ask = bitcoin::Amount::from_sat(685_800); + let xmr = Amount::parse_monero("0.826286435921").unwrap(); + let btc = xmr.max_bitcoin_for_price(ask).unwrap(); + + assert_eq!(btc, bitcoin::Amount::from_sat(566_656)); } #[test] @@ -398,7 +449,7 @@ mod tests { let ask = bitcoin::Amount::from_sat(728_688); let btc = xmr.max_bitcoin_for_price(ask).unwrap(); - assert_eq!(bitcoin::Amount::from_sat(21_131_952), btc); + assert_eq!(bitcoin::Amount::from_sat(21_860_628), btc); let xmr = Amount::from_piconero(u64::MAX); let ask = bitcoin::Amount::from_sat(u64::MAX); @@ -409,13 +460,11 @@ mod tests { #[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 ask = bitcoin::Amount::from_sat(382_900); + let xmr = Amount::parse_monero("0.00001").unwrap(); + let btc = xmr.max_bitcoin_for_price(ask).unwrap(); - let monero_max_from_bitcoin = amount.max_bitcoin_for_price(bitcoin_price_sats).unwrap(); - - assert_eq!(bitcoin::Amount::ZERO, monero_max_from_bitcoin); + assert_eq!(bitcoin::Amount::ZERO, btc); } use rand::rngs::OsRng; From 7e4af68cba13c90a6693c24e870e922417f9fc18 Mon Sep 17 00:00:00 2001 From: Byron Hambly Date: Wed, 3 Aug 2022 13:56:04 +0200 Subject: [PATCH 49/56] feat: add debugging info for failed to fetch transaction Add the jsonrpc error message and data to tracing calls to try debug #1061 "monero-wallet-rpc failed to fetch transaction" --- swap/src/monero/wallet.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/swap/src/monero/wallet.rs b/swap/src/monero/wallet.rs index 859b451b..0d3d3389 100644 --- a/swap/src/monero/wallet.rs +++ b/swap/src/monero/wallet.rs @@ -314,8 +314,13 @@ async fn wait_for_confirmations proof, - Err(jsonrpc::Error::JsonRpc(jsonrpc::JsonRpcError { code: -1, .. })) => { - tracing::warn!(%txid, "`monero-wallet-rpc` failed to fetch transaction, may need to be restarted"); + Err(jsonrpc::Error::JsonRpc(jsonrpc::JsonRpcError { + code: -1, + message, + data, + })) => { + tracing::debug!(message, ?data); + tracing::warn!(%txid, message, "`monero-wallet-rpc` failed to fetch transaction, may need to be restarted"); continue; } // TODO: Implement this using a generic proxy for each function call once https://github.com/thomaseizinger/rust-jsonrpc-client/issues/47 is fixed. From 0d31c55fb3bbdf954f12777220bc91413a194c48 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 Aug 2022 13:56:17 +0000 Subject: [PATCH 50/56] build(deps): bump tracing from 0.1.35 to 0.1.36 Bumps [tracing](https://github.com/tokio-rs/tracing) from 0.1.35 to 0.1.36. - [Release notes](https://github.com/tokio-rs/tracing/releases) - [Commits](https://github.com/tokio-rs/tracing/compare/tracing-0.1.35...tracing-0.1.36) --- updated-dependencies: - dependency-name: tracing dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 69a78388..3624ec22 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -111,15 +111,15 @@ dependencies = [ "bzip2", "futures-core", "memchr", - "pin-project-lite 0.2.8", + "pin-project-lite 0.2.9", "tokio", ] [[package]] name = "async-trait" -version = "0.1.56" +version = "0.1.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96cf8829f67d2eab0b2dfa42c5d0ef737e0724e4a82b01b3e292456202b19716" +checksum = "76464446b8bc32758d7e88ee1a804d9914cd9b1cb264c029899680b0be29826f" dependencies = [ "proc-macro2", "quote", @@ -136,7 +136,7 @@ dependencies = [ "futures-sink", "futures-util", "memchr", - "pin-project-lite 0.2.8", + "pin-project-lite 0.2.9", ] [[package]] @@ -189,7 +189,7 @@ dependencies = [ "futures-core", "getrandom 0.2.2", "instant", - "pin-project-lite 0.2.8", + "pin-project-lite 0.2.9", "rand 0.8.3", "tokio", ] @@ -1251,7 +1251,7 @@ dependencies = [ "futures-sink", "futures-task", "memchr", - "pin-project-lite 0.2.8", + "pin-project-lite 0.2.9", "pin-utils", "slab", ] @@ -1521,7 +1521,7 @@ dependencies = [ "httparse", "httpdate", "itoa 1.0.1", - "pin-project-lite 0.2.8", + "pin-project-lite 0.2.9", "socket2 0.4.0", "tokio", "tower-service", @@ -2639,9 +2639,9 @@ dependencies = [ [[package]] name = "pem" -version = "1.0.2" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9a3b09a20e374558580a4914d3b7d89bd61b954a5a5e1dcbea98753addb1947" +checksum = "03c64931a1a212348ec4f3b4362585eca7159d0d09cbdf4a7f74f02173596fd4" dependencies = [ "base64 0.13.0", ] @@ -2719,9 +2719,9 @@ checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777" [[package]] name = "pin-project-lite" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e280fbe77cc62c91527259e9442153f4688736748d24660126286329742b4c6c" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" [[package]] name = "pin-utils" @@ -3228,7 +3228,7 @@ dependencies = [ "log", "mime", "percent-encoding", - "pin-project-lite 0.2.8", + "pin-project-lite 0.2.9", "rustls 0.20.2", "rustls-pemfile", "serde", @@ -4279,7 +4279,7 @@ dependencies = [ "num_cpus", "once_cell", "parking_lot 0.11.2", - "pin-project-lite 0.2.8", + "pin-project-lite 0.2.9", "signal-hook-registry", "tokio-macros", "winapi 0.3.9", @@ -4337,7 +4337,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c535f53c0cfa1acace62995a8994fc9cc1f12d202420da96ff306ee24d576469" dependencies = [ "futures-core", - "pin-project-lite 0.2.8", + "pin-project-lite 0.2.9", "tokio", ] @@ -4383,7 +4383,7 @@ dependencies = [ "futures-core", "futures-sink", "log", - "pin-project-lite 0.2.8", + "pin-project-lite 0.2.9", "tokio", ] @@ -4396,7 +4396,7 @@ dependencies = [ "bytes", "futures-core", "futures-sink", - "pin-project-lite 0.2.8", + "pin-project-lite 0.2.9", "tokio", "tracing", ] @@ -4436,12 +4436,12 @@ checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" [[package]] name = "tracing" -version = "0.1.35" +version = "0.1.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a400e31aa60b9d44a52a8ee0343b5b18566b03a8321e0d321f695cf56e940160" +checksum = "2fce9567bd60a67d08a16488756721ba392f24f29006402881e43b19aac64307" dependencies = [ "cfg-if 1.0.0", - "pin-project-lite 0.2.8", + "pin-project-lite 0.2.9", "tracing-attributes", "tracing-core", ] @@ -4459,9 +4459,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.20" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e65ce065b4b5c53e73bb28912318cb8c9e9ad3921f1d669eb0e68b4c8143a2b" +checksum = "11c75893af559bc8e10716548bdef5cb2b983f8e637db9d0e15126b61b484ee2" dependencies = [ "proc-macro2", "quote", @@ -4470,9 +4470,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.28" +version = "0.1.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b7358be39f2f274f322d2aaed611acc57f382e8eb1e5b48cb9ae30933495ce7" +checksum = "5aeea4303076558a00714b823f9ad67d58a3bbda1df83d8827d21193156e22f7" dependencies = [ "once_cell", "valuable", From fd78e3d3316ef15caa9ee9e2d8dcff3de6a052a4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 Aug 2022 13:56:49 +0000 Subject: [PATCH 51/56] build(deps): bump serde from 1.0.140 to 1.0.142 Bumps [serde](https://github.com/serde-rs/serde) from 1.0.140 to 1.0.142. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.140...v1.0.142) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 69a78388..350af6c8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -117,9 +117,9 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.56" +version = "0.1.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96cf8829f67d2eab0b2dfa42c5d0ef737e0724e4a82b01b3e292456202b19716" +checksum = "76464446b8bc32758d7e88ee1a804d9914cd9b1cb264c029899680b0be29826f" dependencies = [ "proc-macro2", "quote", @@ -2639,9 +2639,9 @@ dependencies = [ [[package]] name = "pem" -version = "1.0.2" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9a3b09a20e374558580a4914d3b7d89bd61b954a5a5e1dcbea98753addb1947" +checksum = "03c64931a1a212348ec4f3b4362585eca7159d0d09cbdf4a7f74f02173596fd4" dependencies = [ "base64 0.13.0", ] @@ -3529,9 +3529,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.140" +version = "1.0.142" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc855a42c7967b7c369eb5860f7164ef1f6f81c20c7cc1141f2a604e18723b03" +checksum = "e590c437916fb6b221e1d00df6e3294f3fccd70ca7e92541c475d6ed6ef5fee2" dependencies = [ "serde_derive", ] @@ -3558,9 +3558,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.140" +version = "1.0.142" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f2122636b9fe3b81f1cb25099fcf2d3f542cdb1d45940d56c713158884a05da" +checksum = "34b5b8d809babe02f538c2cfec6f2c1ed10804c0e5a6a041a049a4f5588ccc2e" dependencies = [ "proc-macro2", "quote", From 945876522c3d5d16db09b2a347ccc863797f6b17 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 Aug 2022 15:58:23 +0000 Subject: [PATCH 52/56] build(deps): bump serde_json from 1.0.82 to 1.0.83 Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.82 to 1.0.83. - [Release notes](https://github.com/serde-rs/json/releases) - [Commits](https://github.com/serde-rs/json/compare/v1.0.82...v1.0.83) --- updated-dependencies: - dependency-name: serde_json dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ba5b0f19..80e0aeb2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -111,7 +111,7 @@ dependencies = [ "bzip2", "futures-core", "memchr", - "pin-project-lite 0.2.8", + "pin-project-lite 0.2.9", "tokio", ] @@ -136,7 +136,7 @@ dependencies = [ "futures-sink", "futures-util", "memchr", - "pin-project-lite 0.2.8", + "pin-project-lite 0.2.9", ] [[package]] @@ -189,7 +189,7 @@ dependencies = [ "futures-core", "getrandom 0.2.2", "instant", - "pin-project-lite 0.2.8", + "pin-project-lite 0.2.9", "rand 0.8.3", "tokio", ] @@ -1251,7 +1251,7 @@ dependencies = [ "futures-sink", "futures-task", "memchr", - "pin-project-lite 0.2.8", + "pin-project-lite 0.2.9", "pin-utils", "slab", ] @@ -1521,7 +1521,7 @@ dependencies = [ "httparse", "httpdate", "itoa 1.0.1", - "pin-project-lite 0.2.8", + "pin-project-lite 0.2.9", "socket2 0.4.0", "tokio", "tower-service", @@ -2719,9 +2719,9 @@ checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777" [[package]] name = "pin-project-lite" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e280fbe77cc62c91527259e9442153f4688736748d24660126286329742b4c6c" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" [[package]] name = "pin-utils" @@ -3228,7 +3228,7 @@ dependencies = [ "log", "mime", "percent-encoding", - "pin-project-lite 0.2.8", + "pin-project-lite 0.2.9", "rustls 0.20.2", "rustls-pemfile", "serde", @@ -3529,9 +3529,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.140" +version = "1.0.142" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc855a42c7967b7c369eb5860f7164ef1f6f81c20c7cc1141f2a604e18723b03" +checksum = "e590c437916fb6b221e1d00df6e3294f3fccd70ca7e92541c475d6ed6ef5fee2" dependencies = [ "serde_derive", ] @@ -3558,9 +3558,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.140" +version = "1.0.142" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f2122636b9fe3b81f1cb25099fcf2d3f542cdb1d45940d56c713158884a05da" +checksum = "34b5b8d809babe02f538c2cfec6f2c1ed10804c0e5a6a041a049a4f5588ccc2e" dependencies = [ "proc-macro2", "quote", @@ -3569,9 +3569,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.82" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82c2c1fdcd807d1098552c5b9a36e425e42e9fbd7c6a37a8425f390f781f7fa7" +checksum = "38dd04e3c8279e75b31ef29dbdceebfe5ad89f4d0937213c53f7d49d01b3d5a7" dependencies = [ "indexmap", "itoa 1.0.1", @@ -4279,7 +4279,7 @@ dependencies = [ "num_cpus", "once_cell", "parking_lot 0.11.2", - "pin-project-lite 0.2.8", + "pin-project-lite 0.2.9", "signal-hook-registry", "tokio-macros", "winapi 0.3.9", @@ -4337,7 +4337,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c535f53c0cfa1acace62995a8994fc9cc1f12d202420da96ff306ee24d576469" dependencies = [ "futures-core", - "pin-project-lite 0.2.8", + "pin-project-lite 0.2.9", "tokio", ] @@ -4383,7 +4383,7 @@ dependencies = [ "futures-core", "futures-sink", "log", - "pin-project-lite 0.2.8", + "pin-project-lite 0.2.9", "tokio", ] @@ -4396,7 +4396,7 @@ dependencies = [ "bytes", "futures-core", "futures-sink", - "pin-project-lite 0.2.8", + "pin-project-lite 0.2.9", "tokio", "tracing", ] @@ -4436,12 +4436,12 @@ checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" [[package]] name = "tracing" -version = "0.1.35" +version = "0.1.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a400e31aa60b9d44a52a8ee0343b5b18566b03a8321e0d321f695cf56e940160" +checksum = "2fce9567bd60a67d08a16488756721ba392f24f29006402881e43b19aac64307" dependencies = [ "cfg-if 1.0.0", - "pin-project-lite 0.2.8", + "pin-project-lite 0.2.9", "tracing-attributes", "tracing-core", ] @@ -4459,9 +4459,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.20" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e65ce065b4b5c53e73bb28912318cb8c9e9ad3921f1d669eb0e68b4c8143a2b" +checksum = "11c75893af559bc8e10716548bdef5cb2b983f8e637db9d0e15126b61b484ee2" dependencies = [ "proc-macro2", "quote", @@ -4470,9 +4470,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.28" +version = "0.1.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b7358be39f2f274f322d2aaed611acc57f382e8eb1e5b48cb9ae30933495ce7" +checksum = "5aeea4303076558a00714b823f9ad67d58a3bbda1df83d8827d21193156e22f7" dependencies = [ "once_cell", "valuable", From 2e2531c041cbf7fbc897ff9b016f99c7c2e93da4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 Aug 2022 15:58:37 +0000 Subject: [PATCH 53/56] build(deps): bump anyhow from 1.0.58 to 1.0.59 Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.58 to 1.0.59. - [Release notes](https://github.com/dtolnay/anyhow/releases) - [Commits](https://github.com/dtolnay/anyhow/compare/1.0.58...1.0.59) --- updated-dependencies: - dependency-name: anyhow dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ba5b0f19..eb3bba5c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -74,9 +74,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.58" +version = "1.0.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb07d2053ccdbe10e2af2995a2f116c1330396493dc1269f6a91d0ae82e19704" +checksum = "c91f1f46651137be86f3a2b9a8359f9ab421d04d941c62b5982e1ca21113adf9" [[package]] name = "arrayref" @@ -111,7 +111,7 @@ dependencies = [ "bzip2", "futures-core", "memchr", - "pin-project-lite 0.2.8", + "pin-project-lite 0.2.9", "tokio", ] @@ -136,7 +136,7 @@ dependencies = [ "futures-sink", "futures-util", "memchr", - "pin-project-lite 0.2.8", + "pin-project-lite 0.2.9", ] [[package]] @@ -189,7 +189,7 @@ dependencies = [ "futures-core", "getrandom 0.2.2", "instant", - "pin-project-lite 0.2.8", + "pin-project-lite 0.2.9", "rand 0.8.3", "tokio", ] @@ -1251,7 +1251,7 @@ dependencies = [ "futures-sink", "futures-task", "memchr", - "pin-project-lite 0.2.8", + "pin-project-lite 0.2.9", "pin-utils", "slab", ] @@ -1521,7 +1521,7 @@ dependencies = [ "httparse", "httpdate", "itoa 1.0.1", - "pin-project-lite 0.2.8", + "pin-project-lite 0.2.9", "socket2 0.4.0", "tokio", "tower-service", @@ -2719,9 +2719,9 @@ checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777" [[package]] name = "pin-project-lite" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e280fbe77cc62c91527259e9442153f4688736748d24660126286329742b4c6c" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" [[package]] name = "pin-utils" @@ -3228,7 +3228,7 @@ dependencies = [ "log", "mime", "percent-encoding", - "pin-project-lite 0.2.8", + "pin-project-lite 0.2.9", "rustls 0.20.2", "rustls-pemfile", "serde", @@ -3529,9 +3529,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.140" +version = "1.0.142" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc855a42c7967b7c369eb5860f7164ef1f6f81c20c7cc1141f2a604e18723b03" +checksum = "e590c437916fb6b221e1d00df6e3294f3fccd70ca7e92541c475d6ed6ef5fee2" dependencies = [ "serde_derive", ] @@ -3558,9 +3558,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.140" +version = "1.0.142" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f2122636b9fe3b81f1cb25099fcf2d3f542cdb1d45940d56c713158884a05da" +checksum = "34b5b8d809babe02f538c2cfec6f2c1ed10804c0e5a6a041a049a4f5588ccc2e" dependencies = [ "proc-macro2", "quote", @@ -4279,7 +4279,7 @@ dependencies = [ "num_cpus", "once_cell", "parking_lot 0.11.2", - "pin-project-lite 0.2.8", + "pin-project-lite 0.2.9", "signal-hook-registry", "tokio-macros", "winapi 0.3.9", @@ -4337,7 +4337,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c535f53c0cfa1acace62995a8994fc9cc1f12d202420da96ff306ee24d576469" dependencies = [ "futures-core", - "pin-project-lite 0.2.8", + "pin-project-lite 0.2.9", "tokio", ] @@ -4383,7 +4383,7 @@ dependencies = [ "futures-core", "futures-sink", "log", - "pin-project-lite 0.2.8", + "pin-project-lite 0.2.9", "tokio", ] @@ -4396,7 +4396,7 @@ dependencies = [ "bytes", "futures-core", "futures-sink", - "pin-project-lite 0.2.8", + "pin-project-lite 0.2.9", "tokio", "tracing", ] @@ -4436,12 +4436,12 @@ checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" [[package]] name = "tracing" -version = "0.1.35" +version = "0.1.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a400e31aa60b9d44a52a8ee0343b5b18566b03a8321e0d321f695cf56e940160" +checksum = "2fce9567bd60a67d08a16488756721ba392f24f29006402881e43b19aac64307" dependencies = [ "cfg-if 1.0.0", - "pin-project-lite 0.2.8", + "pin-project-lite 0.2.9", "tracing-attributes", "tracing-core", ] @@ -4459,9 +4459,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.20" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e65ce065b4b5c53e73bb28912318cb8c9e9ad3921f1d669eb0e68b4c8143a2b" +checksum = "11c75893af559bc8e10716548bdef5cb2b983f8e637db9d0e15126b61b484ee2" dependencies = [ "proc-macro2", "quote", @@ -4470,9 +4470,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.28" +version = "0.1.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b7358be39f2f274f322d2aaed611acc57f382e8eb1e5b48cb9ae30933495ce7" +checksum = "5aeea4303076558a00714b823f9ad67d58a3bbda1df83d8827d21193156e22f7" dependencies = [ "once_cell", "valuable", From 27d32de482270efaaaea586cd9b7ab182fa56f3d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 Aug 2022 17:56:52 +0000 Subject: [PATCH 54/56] build(deps): bump thiserror from 1.0.31 to 1.0.32 Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.31 to 1.0.32. - [Release notes](https://github.com/dtolnay/thiserror/releases) - [Commits](https://github.com/dtolnay/thiserror/compare/1.0.31...1.0.32) --- updated-dependencies: - dependency-name: thiserror dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2e27ca8a..fa5ac925 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -74,9 +74,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.58" +version = "1.0.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb07d2053ccdbe10e2af2995a2f116c1330396493dc1269f6a91d0ae82e19704" +checksum = "c91f1f46651137be86f3a2b9a8359f9ab421d04d941c62b5982e1ca21113adf9" [[package]] name = "arrayref" @@ -3569,9 +3569,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.82" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82c2c1fdcd807d1098552c5b9a36e425e42e9fbd7c6a37a8425f390f781f7fa7" +checksum = "38dd04e3c8279e75b31ef29dbdceebfe5ad89f4d0937213c53f7d49d01b3d5a7" dependencies = [ "indexmap", "itoa 1.0.1", @@ -4193,18 +4193,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.31" +version = "1.0.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd829fe32373d27f76265620b5309d0340cb8550f523c1dda251d6298069069a" +checksum = "f5f6586b7f764adc0231f4c79be7b920e766bb2f3e51b3661cdb263828f19994" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.31" +version = "1.0.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0396bc89e626244658bef819e22d0cc459e795a5ebe878e6ec336d1674a8d79a" +checksum = "12bafc5b54507e0149cdf1b145a5d80ab80a90bcd9275df43d4fff68460f6c21" dependencies = [ "proc-macro2", "quote", From c6d638743882044501918947f46e9bf63fd1c3f1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 5 Aug 2022 11:10:18 +0000 Subject: [PATCH 55/56] build(deps): bump rust_decimal_macros from 1.25.0 to 1.26.0 Bumps [rust_decimal_macros](https://github.com/paupino/rust-decimal) from 1.25.0 to 1.26.0. - [Release notes](https://github.com/paupino/rust-decimal/releases) - [Changelog](https://github.com/paupino/rust-decimal/blob/master/CHANGELOG.md) - [Commits](https://github.com/paupino/rust-decimal/compare/1.25.0...1.26.0) --- updated-dependencies: - dependency-name: rust_decimal_macros dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fa5ac925..25487a28 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3274,9 +3274,9 @@ dependencies = [ [[package]] name = "rust_decimal" -version = "1.25.0" +version = "1.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34a3bb58e85333f1ab191bf979104b586ebd77475bc6681882825f4532dfe87c" +checksum = "8fc129ab6000ab4037e7718703cdeab82a12c4ee23a238658f55372d80ef2b05" dependencies = [ "arrayvec 0.7.2", "num-traits", @@ -3285,9 +3285,9 @@ dependencies = [ [[package]] name = "rust_decimal_macros" -version = "1.25.0" +version = "1.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1467556c7c115165aa0346bcf45bc947203bcc880efad85a09ba24ea17926c4" +checksum = "56a77009c5812aeb7843b43a997ac268bd9c524b4331bf57b48ef097f30c9ad7" dependencies = [ "quote", "rust_decimal", From b956ea44969f9040bca639f344b9459a7979f419 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 5 Aug 2022 11:10:38 +0000 Subject: [PATCH 56/56] build(deps): bump rust_decimal from 1.25.0 to 1.26.0 Bumps [rust_decimal](https://github.com/paupino/rust-decimal) from 1.25.0 to 1.26.0. - [Release notes](https://github.com/paupino/rust-decimal/releases) - [Changelog](https://github.com/paupino/rust-decimal/blob/master/CHANGELOG.md) - [Commits](https://github.com/paupino/rust-decimal/compare/1.25.0...1.26.0) --- updated-dependencies: - dependency-name: rust_decimal dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fa5ac925..2a9db238 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3274,9 +3274,9 @@ dependencies = [ [[package]] name = "rust_decimal" -version = "1.25.0" +version = "1.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34a3bb58e85333f1ab191bf979104b586ebd77475bc6681882825f4532dfe87c" +checksum = "8fc129ab6000ab4037e7718703cdeab82a12c4ee23a238658f55372d80ef2b05" dependencies = [ "arrayvec 0.7.2", "num-traits",