From b1a72940df22cd3985dcd931fb45099090270daf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 6 Feb 2024 11:53:45 +0000 Subject: [PATCH 01/27] build(deps): bump tempfile from 3.9.0 to 3.10.0 Bumps [tempfile](https://github.com/Stebalien/tempfile) from 3.9.0 to 3.10.0. - [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md) - [Commits](https://github.com/Stebalien/tempfile/compare/v3.9.0...v3.10.0) --- updated-dependencies: - dependency-name: tempfile dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2d750ec3..df62fcb0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1946,9 +1946,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.151" +version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "libgit2-sys" @@ -3316,15 +3316,6 @@ dependencies = [ "bitflags 1.3.2", ] -[[package]] -name = "redox_syscall" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" -dependencies = [ - "bitflags 1.3.2", -] - [[package]] name = "redox_users" version = "0.4.0" @@ -3542,9 +3533,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.28" +version = "0.38.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316" +checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" dependencies = [ "bitflags 2.4.0", "errno", @@ -4457,13 +4448,12 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.9.0" +version = "3.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa" +checksum = "a365e8cd18e44762ef95d87f284f4b5cd04107fec2ff3052bd6a3e6069669e67" dependencies = [ "cfg-if 1.0.0", "fastrand", - "redox_syscall 0.4.1", "rustix", "windows-sys 0.52.0", ] From 039192aeb6c659c13b3c96ccbf1b4edfc0ab0333 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 6 Feb 2024 11:54:55 +0000 Subject: [PATCH 02/27] build(deps): bump toml from 0.8.9 to 0.8.10 Bumps [toml](https://github.com/toml-rs/toml) from 0.8.9 to 0.8.10. - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.9...toml-v0.8.10) --- updated-dependencies: - dependency-name: toml 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 2d750ec3..789cf7b2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -703,7 +703,7 @@ dependencies = [ "nom", "pathdiff", "serde", - "toml 0.8.9", + "toml 0.8.10", ] [[package]] @@ -4381,7 +4381,7 @@ dependencies = [ "tokio-tar", "tokio-tungstenite", "tokio-util", - "toml 0.8.9", + "toml 0.8.10", "torut", "tracing", "tracing-appender", @@ -4757,9 +4757,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.9" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6a4b9e8023eb94392d3dca65d717c53abc5dad49c07cb65bb8fcd87115fa325" +checksum = "9a9aad4a3066010876e8dcf5a8a06e70a558751117a145c6ce2b82c2e2054290" dependencies = [ "serde", "serde_spanned", @@ -4778,9 +4778,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.21.1" +version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" +checksum = "0c9ffdf896f8daaabf9b66ba8e77ea1ed5ed0f72821b398aba62352e95062951" dependencies = [ "indexmap 2.1.0", "serde", From f12cf363647c1b8c6de893ddf6096fd7a5e75e93 Mon Sep 17 00:00:00 2001 From: Byron Hambly Date: Wed, 14 Feb 2024 22:22:35 +0200 Subject: [PATCH 03/27] ci: free up space on ubuntu test job (#1555) * ci: free up space on ubuntu test job (cherry picked from commit d234d2335f49ba5c0284fe0efd696856be2e58bf) * fixup! ci: free up space on ubuntu test job * ci use commit hash instead of malleable tag for free space action --- .github/workflows/ci.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 55ff513d..5ff9a6d7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -115,6 +115,19 @@ jobs: os: [ubuntu-latest, macos-latest] runs-on: ${{ matrix.os }} steps: + - name: (Free disk space on Ubuntu) + if: matrix.os == 'ubuntu-latest' + uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be + with: + # removing all of these takes ~10 mins, so just do as needed + android: true + dotnet: true + haskell: true + docker-images: false + large-packages: false + swap-storage: false + tool-cache: false + - name: Checkout sources uses: actions/checkout@v4.1.1 From 3d2b51998e661c3e6808b103045a736fcf06d5b6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 15 Feb 2024 04:29:12 +0000 Subject: [PATCH 04/27] build(deps): bump thomaseizinger/keep-a-changelog-new-release Bumps [thomaseizinger/keep-a-changelog-new-release](https://github.com/thomaseizinger/keep-a-changelog-new-release) from 1.3.0 to 2.0.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.3.0...2.0.0) --- updated-dependencies: - dependency-name: thomaseizinger/keep-a-changelog-new-release dependency-type: direct:production update-type: version-update:semver-major ... 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 70a623a8..d980d388 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.3.0 + uses: thomaseizinger/keep-a-changelog-new-release@2.0.0 with: version: ${{ github.event.inputs.version }} changelogPath: CHANGELOG.md From 640290023ad00581e8bd917d4fc3d1804d04842d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 15 Feb 2024 04:30:57 +0000 Subject: [PATCH 05/27] build(deps): bump thiserror from 1.0.56 to 1.0.57 Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.56 to 1.0.57. - [Release notes](https://github.com/dtolnay/thiserror/releases) - [Commits](https://github.com/dtolnay/thiserror/compare/1.0.56...1.0.57) --- updated-dependencies: - dependency-name: thiserror 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 e4612376..591593b2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4511,18 +4511,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.56" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad" +checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.56" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" +checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" dependencies = [ "proc-macro2", "quote", From 2c11f3865984c5cb8e240d5e9ee8698f418f3cd0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Feb 2024 11:59:24 +0000 Subject: [PATCH 06/27] build(deps): bump anyhow from 1.0.79 to 1.0.80 Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.79 to 1.0.80. - [Release notes](https://github.com/dtolnay/anyhow/releases) - [Commits](https://github.com/dtolnay/anyhow/compare/1.0.79...1.0.80) --- 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 591593b2..9cda5977 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -98,9 +98,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.79" +version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" +checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1" [[package]] name = "arrayref" From d8d1c4178eab7cbdcc9c5d5acb4122d72524eff9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 20 Feb 2024 11:55:23 +0000 Subject: [PATCH 07/27] build(deps): bump serde_json from 1.0.113 to 1.0.114 Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.113 to 1.0.114. - [Release notes](https://github.com/serde-rs/json/releases) - [Commits](https://github.com/serde-rs/json/compare/v1.0.113...v1.0.114) --- 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 9cda5977..bee36efd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3805,9 +3805,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.113" +version = "1.0.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79" +checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0" dependencies = [ "itoa 1.0.1", "ryu", From 344440bb5476e95d309ed276d26f5fc22c1bb72a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 20 Feb 2024 11:55:59 +0000 Subject: [PATCH 08/27] build(deps): bump serde from 1.0.196 to 1.0.197 Bumps [serde](https://github.com/serde-rs/serde) from 1.0.196 to 1.0.197. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.196...v1.0.197) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9cda5977..82ae25e0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3765,9 +3765,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.196" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" +checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" dependencies = [ "serde_derive", ] @@ -3794,9 +3794,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.196" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" +checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", From 005361c833b8fa8eefbe39b6913dbf2d76fb28b5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 22 Feb 2024 11:43:08 +0000 Subject: [PATCH 09/27] build(deps): bump hyper from 1.1.0 to 1.2.0 Bumps [hyper](https://github.com/hyperium/hyper) from 1.1.0 to 1.2.0. - [Release notes](https://github.com/hyperium/hyper/releases) - [Changelog](https://github.com/hyperium/hyper/blob/master/CHANGELOG.md) - [Commits](https://github.com/hyperium/hyper/compare/v1.1.0...v1.2.0) --- updated-dependencies: - dependency-name: hyper dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 7 +++---- swap/Cargo.toml | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 52ad6987..4deb6706 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1718,14 +1718,13 @@ dependencies = [ [[package]] name = "hyper" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5aa53871fc917b1a9ed87b683a5d86db645e23acb32c2e0785a353e522fb75" +checksum = "186548d73ac615b32a73aafe38fb4f56c0d340e110e5a200bcadbaf2e199263a" dependencies = [ "bytes", "http 1.0.0", "http-body 1.0.0", - "pin-project-lite 0.2.13", "tokio", ] @@ -4336,7 +4335,7 @@ dependencies = [ "futures", "get-port", "hex", - "hyper 1.1.0", + "hyper 1.2.0", "itertools 0.12.1", "libp2p", "mockito", diff --git a/swap/Cargo.toml b/swap/Cargo.toml index 2be46da8..c900f0b4 100644 --- a/swap/Cargo.toml +++ b/swap/Cargo.toml @@ -76,7 +76,7 @@ zip = "0.5" [dev-dependencies] bitcoin-harness = "0.2.2" get-port = "3" -hyper = "1.1" +hyper = "1.2" mockito = "1.2.0" monero-harness = { path = "../monero-harness" } port_check = "0.1" From b2ca1b5f8c2249355cf933199d1888b6065a3d44 Mon Sep 17 00:00:00 2001 From: Ian McKenzie <13459320+ikmckenz@users.noreply.github.com> Date: Fri, 23 Feb 2024 11:04:27 -0800 Subject: [PATCH 10/27] Upgrade testcontainers from 0.12 to 0.14 (#1552) * Upgrade testcontainers from 0.12 to 0.14 * minor cleanup --------- Co-authored-by: Byron Hambly --- Cargo.lock | 43 ++------------ monero-harness/Cargo.toml | 2 +- monero-harness/src/image.rs | 103 ++++++++++----------------------- monero-harness/src/lib.rs | 50 ++++++++-------- monero-wallet/Cargo.toml | 2 +- monero-wallet/src/lib.rs | 3 +- swap/Cargo.toml | 2 +- swap/tests/harness/bitcoind.rs | 65 ++++++--------------- swap/tests/harness/electrs.rs | 66 +++++++++------------ swap/tests/harness/mod.rs | 57 +++++++++--------- 10 files changed, 136 insertions(+), 257 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4deb6706..0708533b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -366,7 +366,7 @@ dependencies = [ "reqwest", "serde", "serde_json", - "testcontainers 0.14.0", + "testcontainers", "thiserror", "tokio", "tracing", @@ -896,16 +896,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "crypto-mac" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4857fd85a0c34b3c3297875b747c1e02e06b6a0ea32dd892d8192b9ce0813ea6" -dependencies = [ - "generic-array", - "subtle", -] - [[package]] name = "crypto-mac" version = "0.11.1" @@ -1598,16 +1588,6 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" -[[package]] -name = "hmac" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1441c6b1e930e2817404b5046f1f989899143a12bf92de603b69f4e0aee1e15" -dependencies = [ - "crypto-mac 0.10.0", - "digest 0.9.0", -] - [[package]] name = "hmac" version = "0.11.0" @@ -2468,7 +2448,7 @@ dependencies = [ "monero-rpc", "rand 0.7.3", "spectral", - "testcontainers 0.12.0", + "testcontainers", "tokio", "tracing", "tracing-subscriber 0.2.25", @@ -2504,7 +2484,7 @@ dependencies = [ "monero-harness", "monero-rpc", "rand 0.7.3", - "testcontainers 0.12.0", + "testcontainers", "tokio", "tracing-subscriber 0.2.25", ] @@ -4363,7 +4343,7 @@ dependencies = [ "structopt", "strum 0.26.1", "tempfile", - "testcontainers 0.12.0", + "testcontainers", "thiserror", "time 0.3.34", "tokio", @@ -4467,21 +4447,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "testcontainers" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5e3ed6e3598dbf32cba8cb356b881c085e0adea57597f387723430dd94b4084" -dependencies = [ - "hex", - "hmac 0.10.1", - "log", - "rand 0.8.3", - "serde", - "serde_json", - "sha2 0.9.8", -] - [[package]] name = "testcontainers" version = "0.14.0" diff --git a/monero-harness/Cargo.toml b/monero-harness/Cargo.toml index b659220b..6780dbd8 100644 --- a/monero-harness/Cargo.toml +++ b/monero-harness/Cargo.toml @@ -11,7 +11,7 @@ futures = "0.3" monero-rpc = { path = "../monero-rpc" } rand = "0.7" spectral = "0.6" -testcontainers = "0.12" +testcontainers = "0.14" tokio = { version = "1", default-features = false, features = [ "rt-multi-thread", "time", "macros" ] } tracing = "0.1" tracing-subscriber = { version = "0.2", default-features = false, features = [ "fmt", "ansi", "env-filter", "tracing-log" ] } diff --git a/monero-harness/src/image.rs b/monero-harness/src/image.rs index 63cc4b20..d4dd3942 100644 --- a/monero-harness/src/image.rs +++ b/monero-harness/src/image.rs @@ -1,6 +1,4 @@ -use std::collections::HashMap; -use testcontainers::core::{Container, Docker, WaitForMessage}; -use testcontainers::Image; +use testcontainers::{core::WaitFor, Image, ImageArgs}; pub const MONEROD_DAEMON_CONTAINER_NAME: &str = "monerod"; pub const MONEROD_DEFAULT_NETWORK: &str = "monero_network"; @@ -13,43 +11,22 @@ pub const MONEROD_DEFAULT_NETWORK: &str = "monero_network"; /// this doesn't matter. pub const RPC_PORT: u16 = 18081; -#[derive(Debug, Default)] -pub struct Monerod { - args: MonerodArgs, -} +#[derive(Clone, Copy, Debug, Default)] +pub struct Monerod; impl Image for Monerod { type Args = MonerodArgs; - type EnvVars = HashMap; - type Volumes = HashMap; - type EntryPoint = str; - - fn descriptor(&self) -> String { - "rinocommunity/monero:v0.18.1.2".to_owned() - } - - fn wait_until_ready(&self, container: &Container<'_, D, Self>) { - container - .logs() - .stdout - .wait_for_message("RPC server started ok") - .unwrap(); - } - - fn args(&self) -> ::Args { - self.args.clone() - } - fn volumes(&self) -> Self::Volumes { - HashMap::new() + fn name(&self) -> String { + "rinocommunity/monero".into() } - fn env_vars(&self) -> Self::EnvVars { - HashMap::new() + fn tag(&self) -> String { + "v0.18.1.2".into() } - fn with_args(self, args: ::Args) -> Self { - Self { args } + fn ready_conditions(&self) -> Vec { + vec![WaitFor::message_on_stdout("RPC server started ok")] } fn entrypoint(&self) -> Option { @@ -58,43 +35,22 @@ impl Image for Monerod { } } -#[derive(Debug, Default)] -pub struct MoneroWalletRpc { - args: MoneroWalletRpcArgs, -} +#[derive(Clone, Copy, Debug)] +pub struct MoneroWalletRpc; impl Image for MoneroWalletRpc { type Args = MoneroWalletRpcArgs; - type EnvVars = HashMap; - type Volumes = HashMap; - type EntryPoint = str; - - fn descriptor(&self) -> String { - "rinocommunity/monero:v0.18.1.2".to_owned() - } - - fn wait_until_ready(&self, container: &Container<'_, D, Self>) { - container - .logs() - .stdout - .wait_for_message("Run server thread name: RPC") - .unwrap(); - } - - fn args(&self) -> ::Args { - self.args.clone() - } - fn volumes(&self) -> Self::Volumes { - HashMap::new() + fn name(&self) -> String { + "rinocommunity/monero".into() } - fn env_vars(&self) -> Self::EnvVars { - HashMap::new() + fn tag(&self) -> String { + "v0.18.1.2".into() } - fn with_args(self, args: ::Args) -> Self { - Self { args } + fn ready_conditions(&self) -> Vec { + vec![WaitFor::message_on_stdout("Run server thread name: RPC")] } fn entrypoint(&self) -> Option { @@ -104,10 +60,9 @@ impl Image for MoneroWalletRpc { } impl MoneroWalletRpc { - pub fn new(name: &str, daemon_address: String) -> Self { - Self { - args: MoneroWalletRpcArgs::new(name, daemon_address), - } + pub fn new(name: &str, daemon_address: String) -> (Self, MoneroWalletRpcArgs) { + let args = MoneroWalletRpcArgs::new(name, daemon_address); + (Self, args) } } @@ -191,6 +146,12 @@ impl IntoIterator for MonerodArgs { } } +impl ImageArgs for MonerodArgs { + fn into_iterator(self) -> Box> { + Box::new(self.into_iter()) + } +} + #[derive(Debug, Clone)] pub struct MoneroWalletRpcArgs { pub disable_rpc_login: bool, @@ -200,12 +161,6 @@ pub struct MoneroWalletRpcArgs { pub daemon_address: String, } -impl Default for MoneroWalletRpcArgs { - fn default() -> Self { - unimplemented!("A default instance for `MoneroWalletRpc` doesn't make sense because we always need to connect to a node.") - } -} - impl MoneroWalletRpcArgs { pub fn new(wallet_name: &str, daemon_address: String) -> Self { Self { @@ -247,3 +202,9 @@ impl IntoIterator for MoneroWalletRpcArgs { args.into_iter() } } + +impl ImageArgs for MoneroWalletRpcArgs { + fn into_iterator(self) -> Box> { + Box::new(self.into_iter()) + } +} diff --git a/monero-harness/src/lib.rs b/monero-harness/src/lib.rs index 46a03002..d5f8a513 100644 --- a/monero-harness/src/lib.rs +++ b/monero-harness/src/lib.rs @@ -20,17 +20,20 @@ //! every BLOCK_TIME_SECS seconds. //! //! Also provides standalone JSON RPC clients for monerod and monero-wallet-rpc. -pub mod image; +use std::time::Duration; -use crate::image::{MONEROD_DAEMON_CONTAINER_NAME, MONEROD_DEFAULT_NETWORK, RPC_PORT}; use anyhow::{anyhow, bail, Context, Result}; +use testcontainers::clients::Cli; +use testcontainers::{Container, RunnableImage}; +use tokio::time; + use monero_rpc::monerod; use monero_rpc::monerod::MonerodRpc as _; use monero_rpc::wallet::{self, GetAddress, MoneroWalletRpc as _, Refreshed, Transfer}; -use std::time::Duration; -use testcontainers::clients::Cli; -use testcontainers::{Container, Docker, RunArgs}; -use tokio::time; + +use crate::image::{MONEROD_DAEMON_CONTAINER_NAME, MONEROD_DEFAULT_NETWORK, RPC_PORT}; + +pub mod image; /// How often we mine a block. const BLOCK_TIME_SECS: u64 = 1; @@ -56,8 +59,8 @@ impl<'c> Monero { additional_wallets: Vec<&'static str>, ) -> Result<( Self, - Container<'c, Cli, image::Monerod>, - Vec>, + Container<'c, image::Monerod>, + Vec>, )> { let prefix = format!("{}_", random_prefix()); let monerod_name = format!("{}{}", prefix, MONEROD_DAEMON_CONTAINER_NAME); @@ -221,15 +224,14 @@ impl<'c> Monerod { cli: &'c Cli, name: String, network: String, - ) -> Result<(Self, Container<'c, Cli, image::Monerod>)> { + ) -> Result<(Self, Container<'c, image::Monerod>)> { let image = image::Monerod::default(); - let run_args = RunArgs::default() - .with_name(name.clone()) + let image: RunnableImage = RunnableImage::from(image) + .with_container_name(name.clone()) .with_network(network.clone()); - let container = cli.run_with_args(image, run_args); - let monerod_rpc_port = container - .get_host_port(RPC_PORT) - .context("port not exposed")?; + + let container = cli.run(image); + let monerod_rpc_port = container.get_host_port_ipv4(RPC_PORT); Ok(( Self { @@ -262,19 +264,15 @@ impl<'c> MoneroWalletRpc { name: &str, monerod: &Monerod, prefix: String, - ) -> Result<(Self, Container<'c, Cli, image::MoneroWalletRpc>)> { + ) -> Result<(Self, Container<'c, image::MoneroWalletRpc>)> { let daemon_address = format!("{}:{}", monerod.name, RPC_PORT); - let image = image::MoneroWalletRpc::new(name, daemon_address); + let (image, args) = image::MoneroWalletRpc::new(name, daemon_address); + let image = RunnableImage::from((image, args)) + .with_container_name(format!("{}{}", prefix, name)) + .with_network(monerod.network.clone()); - let network = monerod.network.clone(); - let run_args = RunArgs::default() - // prefix the container name so we can run multiple tests - .with_name(format!("{}{}", prefix, name)) - .with_network(network.clone()); - let container = cli.run_with_args(image, run_args); - let wallet_rpc_port = container - .get_host_port(RPC_PORT) - .context("port not exposed")?; + let container = cli.run(image); + let wallet_rpc_port = container.get_host_port_ipv4(RPC_PORT); let client = wallet::Client::localhost(wallet_rpc_port)?; diff --git a/monero-wallet/Cargo.toml b/monero-wallet/Cargo.toml index f767b08e..81982c83 100644 --- a/monero-wallet/Cargo.toml +++ b/monero-wallet/Cargo.toml @@ -14,6 +14,6 @@ rand = "0.7" curve25519-dalek = "3" monero-harness = { path = "../monero-harness" } rand = "0.7" -testcontainers = "0.12" +testcontainers = "0.14" tokio = { version = "1", features = [ "rt-multi-thread", "time", "macros", "sync", "process", "fs" ] } tracing-subscriber = { version = "0.2", default-features = false, features = [ "fmt", "ansi", "env-filter", "chrono", "tracing-log" ] } diff --git a/monero-wallet/src/lib.rs b/monero-wallet/src/lib.rs index 2058f476..080c2599 100644 --- a/monero-wallet/src/lib.rs +++ b/monero-wallet/src/lib.rs @@ -61,13 +61,12 @@ mod tests { use monero_harness::image::Monerod; use monero_rpc::monerod::{Client, GetOutputsOut}; use testcontainers::clients::Cli; - use testcontainers::Docker; #[tokio::test] async fn get_outs_for_key_offsets() { let cli = Cli::default(); let container = cli.run(Monerod::default()); - let rpc_client = Client::localhost(container.get_host_port(18081).unwrap()).unwrap(); + let rpc_client = Client::localhost(container.get_host_port_ipv4(18081)).unwrap(); rpc_client.generateblocks(150, "498AVruCDWgP9Az9LjMm89VWjrBrSZ2W2K3HFBiyzzrRjUJWUcCVxvY1iitfuKoek2FdX6MKGAD9Qb1G1P8QgR5jPmmt3Vj".to_owned()).await.unwrap(); let wallet = Wallet { client: rpc_client.clone(), diff --git a/swap/Cargo.toml b/swap/Cargo.toml index c900f0b4..3c1d2336 100644 --- a/swap/Cargo.toml +++ b/swap/Cargo.toml @@ -85,7 +85,7 @@ serde_cbor = "0.11" serial_test = "3.0" spectral = "0.6" tempfile = "3" -testcontainers = "0.12" +testcontainers = "0.14" [build-dependencies] anyhow = "1" diff --git a/swap/tests/harness/bitcoind.rs b/swap/tests/harness/bitcoind.rs index 13aa5658..fc70161b 100644 --- a/swap/tests/harness/bitcoind.rs +++ b/swap/tests/harness/bitcoind.rs @@ -1,6 +1,5 @@ -use std::collections::HashMap; -use testcontainers::core::{Container, Docker, WaitForMessage}; -use testcontainers::Image; +use std::collections::BTreeMap; +use testcontainers::{core::WaitFor, Image, ImageArgs}; pub const RPC_USER: &str = "admin"; pub const RPC_PASSWORD: &str = "123"; @@ -10,57 +9,27 @@ pub const DATADIR: &str = "/home/bdk"; #[derive(Debug)] pub struct Bitcoind { - args: BitcoindArgs, entrypoint: Option, - volume: Option, + volumes: BTreeMap, } impl Image for Bitcoind { type Args = BitcoindArgs; - type EnvVars = HashMap; - type Volumes = HashMap; - type EntryPoint = str; - fn descriptor(&self) -> String { - "coblox/bitcoin-core:0.21.0".to_string() + fn name(&self) -> String { + "coblox/bitcoin-core".into() } - fn wait_until_ready(&self, container: &Container<'_, D, Self>) { - container - .logs() - .stdout - .wait_for_message("init message: Done loading") - .unwrap(); + fn tag(&self) -> String { + "0.21.0".into() } - fn args(&self) -> ::Args { - self.args.clone() + fn ready_conditions(&self) -> Vec { + vec![WaitFor::message_on_stdout("init message: Done loading")] } - fn volumes(&self) -> Self::Volumes { - let mut volumes = HashMap::new(); - match self.volume.clone() { - None => {} - Some(volume) => { - volumes.insert(volume, DATADIR.to_string()); - } - } - volumes - } - - fn env_vars(&self) -> Self::EnvVars { - HashMap::new() - } - - fn with_args(self, args: ::Args) -> Self { - Bitcoind { args, ..self } - } - - fn with_entrypoint(self, entrypoint: &Self::EntryPoint) -> Self { - Self { - entrypoint: Some(entrypoint.to_string()), - ..self - } + fn volumes(&self) -> Box + '_> { + Box::new(self.volumes.iter()) } fn entrypoint(&self) -> Option { @@ -71,16 +40,15 @@ impl Image for Bitcoind { impl Default for Bitcoind { fn default() -> Self { Bitcoind { - args: BitcoindArgs::default(), entrypoint: Some("/usr/bin/bitcoind".into()), - volume: None, + volumes: BTreeMap::default(), } } } impl Bitcoind { pub fn with_volume(mut self, volume: String) -> Self { - self.volume = Some(volume); + self.volumes.insert(volume, DATADIR.to_string()); self } } @@ -109,7 +77,6 @@ impl IntoIterator for BitcoindArgs { format!("-rpcuser={}", RPC_USER), format!("-rpcpassword={}", RPC_PASSWORD), "-printtoconsole".to_string(), - "-rest".to_string(), "-fallbackfee=0.0002".to_string(), format!("-datadir={}", DATADIR), format!("-rpcport={}", RPC_PORT), @@ -120,3 +87,9 @@ impl IntoIterator for BitcoindArgs { args.into_iter() } } + +impl ImageArgs for BitcoindArgs { + fn into_iterator(self) -> Box> { + Box::new(self.into_iter()) + } +} diff --git a/swap/tests/harness/electrs.rs b/swap/tests/harness/electrs.rs index 538fbf27..773a4e3a 100644 --- a/swap/tests/harness/electrs.rs +++ b/swap/tests/harness/electrs.rs @@ -1,8 +1,8 @@ +use std::collections::BTreeMap; + use crate::harness::bitcoind; use bitcoin::Network; -use std::collections::HashMap; -use testcontainers::core::{Container, Docker, WaitForMessage}; -use testcontainers::Image; +use testcontainers::{core::WaitFor, Image, ImageArgs}; pub const HTTP_PORT: u16 = 60401; pub const RPC_PORT: u16 = 3002; @@ -13,50 +13,25 @@ pub struct Electrs { args: ElectrsArgs, entrypoint: Option, wait_for_message: String, - volume: String, + volumes: BTreeMap, } impl Image for Electrs { type Args = ElectrsArgs; - type EnvVars = HashMap; - type Volumes = HashMap; - type EntryPoint = str; - - fn descriptor(&self) -> String { - format!("vulpemventures/electrs:{}", self.tag) - } - - fn wait_until_ready(&self, container: &Container<'_, D, Self>) { - container - .logs() - .stderr - .wait_for_message(&self.wait_for_message) - .unwrap(); + fn name(&self) -> String { + "vulpemventures/electrs".into() } - fn args(&self) -> ::Args { - self.args.clone() + fn tag(&self) -> String { + self.tag.clone() } - fn volumes(&self) -> Self::Volumes { - let mut volumes = HashMap::new(); - volumes.insert(self.volume.clone(), bitcoind::DATADIR.to_string()); - volumes + fn ready_conditions(&self) -> Vec { + vec![WaitFor::message_on_stderr(self.wait_for_message.clone())] } - fn env_vars(&self) -> Self::EnvVars { - HashMap::new() - } - - fn with_args(self, args: ::Args) -> Self { - Electrs { args, ..self } - } - - fn with_entrypoint(self, entrypoint: &Self::EntryPoint) -> Self { - Self { - entrypoint: Some(entrypoint.to_string()), - ..self - } + fn volumes(&self) -> Box + '_> { + Box::new(self.volumes.iter()) } fn entrypoint(&self) -> Option { @@ -71,7 +46,7 @@ impl Default for Electrs { args: ElectrsArgs::default(), entrypoint: Some("/build/electrs".into()), wait_for_message: "Running accept thread".to_string(), - volume: uuid::Uuid::new_v4().to_string(), + volumes: BTreeMap::default(), } } } @@ -85,7 +60,7 @@ impl Electrs { } pub fn with_volume(mut self, volume: String) -> Self { - self.volume = volume; + self.volumes.insert(volume, bitcoind::DATADIR.to_string()); self } @@ -93,6 +68,11 @@ impl Electrs { self.args.daemon_rpc_addr = name; self } + + pub fn self_and_args(self) -> (Self, ElectrsArgs) { + let args = self.args.clone(); + (self, args) + } } #[derive(Debug, Clone)] @@ -137,7 +117,7 @@ impl IntoIterator for ElectrsArgs { } args.push("-vvvvv".to_string()); - args.push(format!("--daemon-dir=={}", self.daemon_dir.as_str())); + args.push(format!("--daemon-dir={}", self.daemon_dir.as_str())); args.push(format!("--daemon-rpc-addr={}", self.daemon_rpc_addr)); args.push(format!("--cookie={}", self.cookie)); args.push(format!("--http-addr={}", self.http_addr)); @@ -147,3 +127,9 @@ impl IntoIterator for ElectrsArgs { args.into_iter() } } + +impl ImageArgs for ElectrsArgs { + fn into_iterator(self) -> Box> { + Box::new(self.into_iter()) + } +} diff --git a/swap/tests/harness/mod.rs b/swap/tests/harness/mod.rs index 4f3f5fee..bd039477 100644 --- a/swap/tests/harness/mod.rs +++ b/swap/tests/harness/mod.rs @@ -28,7 +28,7 @@ use swap::seed::Seed; use swap::{asb, bitcoin, cli, env, monero}; use tempfile::{tempdir, NamedTempFile}; use testcontainers::clients::Cli; -use testcontainers::{Container, Docker, RunArgs}; +use testcontainers::{Container, RunnableImage}; use tokio::sync::mpsc; use tokio::sync::mpsc::Receiver; use tokio::task::JoinHandle; @@ -61,10 +61,7 @@ where let alice_starting_balances = StartingBalances::new(bitcoin::Amount::ZERO, xmr_amount, Some(10)); - let electrs_rpc_port = containers - .electrs - .get_host_port(electrs::RPC_PORT) - .expect("Could not map electrs rpc port"); + let electrs_rpc_port = containers.electrs.get_host_port_ipv4(electrs::RPC_PORT); let alice_seed = Seed::random().unwrap(); let (alice_bitcoin_wallet, alice_monero_wallet) = init_test_wallets( @@ -146,14 +143,14 @@ where async fn init_containers(cli: &Cli) -> (Monero, Containers<'_>) { let prefix = random_prefix(); let bitcoind_name = format!("{}_{}", prefix, "bitcoind"); - let (bitcoind, bitcoind_url) = + let (_bitcoind, bitcoind_url, mapped_port) = init_bitcoind_container(cli, prefix.clone(), bitcoind_name.clone(), prefix.clone()) .await .expect("could not init bitcoind"); - let electrs = init_electrs_container(cli, prefix.clone(), bitcoind_name, prefix) + let electrs = init_electrs_container(cli, prefix.clone(), bitcoind_name, prefix, mapped_port) .await .expect("could not init electrs"); - let (monero, monerod_container, monero_wallet_rpc_containers) = + let (monero, _monerod_container, _monero_wallet_rpc_containers) = Monero::new(cli, vec![MONERO_WALLET_NAME_ALICE, MONERO_WALLET_NAME_BOB]) .await .unwrap(); @@ -162,9 +159,9 @@ async fn init_containers(cli: &Cli) -> (Monero, Containers<'_>) { monero, Containers { bitcoind_url, - bitcoind, - monerod_container, - monero_wallet_rpc_containers, + _bitcoind, + _monerod_container, + _monero_wallet_rpc_containers, electrs, }, ) @@ -175,29 +172,28 @@ async fn init_bitcoind_container( volume: String, name: String, network: String, -) -> Result<(Container<'_, Cli, bitcoind::Bitcoind>, Url)> { +) -> Result<(Container<'_, bitcoind::Bitcoind>, Url, u16)> { let image = bitcoind::Bitcoind::default().with_volume(volume); + let image = RunnableImage::from(image) + .with_container_name(name) + .with_network(network); - let run_args = RunArgs::default().with_name(name).with_network(network); - - let docker = cli.run_with_args(image, run_args); - let a = docker - .get_host_port(bitcoind::RPC_PORT) - .context("Could not map bitcoind rpc port")?; + let docker = cli.run(image); + let port = docker.get_host_port_ipv4(bitcoind::RPC_PORT); let bitcoind_url = { let input = format!( "http://{}:{}@localhost:{}", bitcoind::RPC_USER, bitcoind::RPC_PASSWORD, - a + port ); Url::parse(&input).unwrap() }; init_bitcoind(bitcoind_url.clone(), 5).await?; - Ok((docker, bitcoind_url.clone())) + Ok((docker, bitcoind_url.clone(), bitcoind::RPC_PORT)) } pub async fn init_electrs_container( @@ -205,16 +201,18 @@ pub async fn init_electrs_container( volume: String, bitcoind_container_name: String, network: String, -) -> Result> { - let bitcoind_rpc_addr = format!("{}:{}", bitcoind_container_name, bitcoind::RPC_PORT); + port: u16, +) -> Result> { + let bitcoind_rpc_addr = format!("{}:{}", bitcoind_container_name, port); let image = electrs::Electrs::default() .with_volume(volume) .with_daemon_rpc_addr(bitcoind_rpc_addr) .with_tag("latest"); + let image = RunnableImage::from(image.self_and_args()) + .with_network(network.clone()) + .with_container_name(format!("{}_electrs", network)); - let run_args = RunArgs::default().with_network(network); - - let docker = cli.run_with_args(image, run_args); + let docker = cli.run(image); Ok(docker) } @@ -952,13 +950,12 @@ pub async fn mint(node_url: Url, address: bitcoin::Address, amount: bitcoin::Amo } // This is just to keep the containers alive -#[allow(dead_code)] struct Containers<'a> { bitcoind_url: Url, - bitcoind: Container<'a, Cli, bitcoind::Bitcoind>, - monerod_container: Container<'a, Cli, image::Monerod>, - monero_wallet_rpc_containers: Vec>, - electrs: Container<'a, Cli, electrs::Electrs>, + _bitcoind: Container<'a, bitcoind::Bitcoind>, + _monerod_container: Container<'a, image::Monerod>, + _monero_wallet_rpc_containers: Vec>, + electrs: Container<'a, electrs::Electrs>, } pub mod alice_run_until { From 00abded1c596398effc21e73a3f87956b0688e88 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 23 Feb 2024 22:25:06 +0200 Subject: [PATCH 11/27] build(deps): bump mockito from 1.2.0 to 1.3.0 (#1561) * build(deps): bump mockito from 1.2.0 to 1.3.0 Bumps [mockito](https://github.com/lipanski/mockito) from 1.2.0 to 1.3.0. - [Release notes](https://github.com/lipanski/mockito/releases) - [Commits](https://github.com/lipanski/mockito/compare/1.2.0...1.3.0) --- updated-dependencies: - dependency-name: mockito dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * build(deps): update http to 0.2.11 --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Byron Hambly --- Cargo.lock | 54 ++++++++++++++++++++++--------------------------- swap/Cargo.toml | 2 +- 2 files changed, 25 insertions(+), 31 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0708533b..1ab5e16f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1490,7 +1490,7 @@ dependencies = [ "futures-core", "futures-sink", "futures-util", - "http 0.2.3", + "http 0.2.11", "indexmap 1.7.0", "slab", "tokio", @@ -1620,13 +1620,13 @@ dependencies = [ [[package]] name = "http" -version = "0.2.3" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7245cd7449cc792608c3c8a9eaf69bd4eabbabf802713748fd739c98b82f0747" +checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" dependencies = [ "bytes", "fnv", - "itoa 0.4.7", + "itoa", ] [[package]] @@ -1637,7 +1637,7 @@ checksum = "b32afd38673a8016f7c9ae69e5af41a58f81b1d31689040f2f1959594ce194ea" dependencies = [ "bytes", "fnv", - "itoa 1.0.1", + "itoa", ] [[package]] @@ -1647,7 +1647,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2861bd27ee074e5ee891e8b539837a9430012e249d7f0ca2d795650f579c1994" dependencies = [ "bytes", - "http 0.2.3", + "http 0.2.11", ] [[package]] @@ -1674,22 +1674,22 @@ checksum = "05842d0d43232b23ccb7060ecb0f0626922c21f30012e97b767b30afd4a5d4b9" [[package]] name = "hyper" -version = "0.14.27" +version = "0.14.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" +checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" dependencies = [ "bytes", "futures-channel", "futures-core", "futures-util", "h2", - "http 0.2.3", + "http 0.2.11", "http-body 0.4.0", "httparse", "httpdate", - "itoa 1.0.1", + "itoa", "pin-project-lite 0.2.13", - "socket2 0.4.7", + "socket2 0.5.5", "tokio", "tower-service", "tracing", @@ -1714,8 +1714,8 @@ version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0646026eb1b3eea4cd9ba47912ea5ce9cc07713d105b1a14698f4e6433d348b7" dependencies = [ - "http 0.2.3", - "hyper 0.14.27", + "http 0.2.11", + "hyper 0.14.28", "rustls 0.21.10", "tokio", "tokio-rustls 0.24.0", @@ -1847,12 +1847,6 @@ dependencies = [ "either", ] -[[package]] -name = "itoa" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736" - [[package]] name = "itoa" version = "1.0.1" @@ -2396,14 +2390,14 @@ dependencies = [ [[package]] name = "mockito" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8d3038e23466858569c2d30a537f691fa0d53b51626630ae08262943e3bbb8b" +checksum = "a8c84fe1f1d8c56dc157f79942056fad4b9efceebba374a01b222428b553facb" dependencies = [ "assert-json-diff", "colored", "futures", - "hyper 0.14.27", + "hyper 0.14.28", "log", "rand 0.8.3", "regex", @@ -2724,7 +2718,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f85842b073145726190373213c63f852020fb884c841a3a1f390637267a2fb8c" dependencies = [ "dtoa", - "itoa 1.0.1", + "itoa", "open-metrics-client-derive-text-encode", "owning_ref", ] @@ -3359,9 +3353,9 @@ dependencies = [ "futures-core", "futures-util", "h2", - "http 0.2.3", + "http 0.2.11", "http-body 0.4.0", - "hyper 0.14.27", + "hyper 0.14.28", "hyper-rustls", "ipnet", "js-sys", @@ -3788,7 +3782,7 @@ version = "1.0.114" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0" dependencies = [ - "itoa 1.0.1", + "itoa", "ryu", "serde", ] @@ -3809,7 +3803,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", - "itoa 1.0.1", + "itoa", "ryu", "serde", ] @@ -4122,7 +4116,7 @@ dependencies = [ "hashlink", "hex", "indexmap 1.7.0", - "itoa 1.0.1", + "itoa", "libc", "libsqlite3-sys", "log", @@ -4519,7 +4513,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" dependencies = [ "deranged", - "itoa 1.0.1", + "itoa", "libc", "num-conv", "num_threads", @@ -4954,7 +4948,7 @@ dependencies = [ "base64 0.13.1", "byteorder", "bytes", - "http 0.2.3", + "http 0.2.11", "httparse", "log", "rand 0.8.3", diff --git a/swap/Cargo.toml b/swap/Cargo.toml index 3c1d2336..d5e2b529 100644 --- a/swap/Cargo.toml +++ b/swap/Cargo.toml @@ -77,7 +77,7 @@ zip = "0.5" bitcoin-harness = "0.2.2" get-port = "3" hyper = "1.2" -mockito = "1.2.0" +mockito = "1.3.0" monero-harness = { path = "../monero-harness" } port_check = "0.1" proptest = "1" From 3037bbcbe4c7052a2b23fb0c2c120a41acb36c3d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 27 Feb 2024 11:36:17 +0000 Subject: [PATCH 12/27] build(deps): bump tempfile from 3.10.0 to 3.10.1 Bumps [tempfile](https://github.com/Stebalien/tempfile) from 3.10.0 to 3.10.1. - [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md) - [Commits](https://github.com/Stebalien/tempfile/compare/v3.10.0...v3.10.1) --- updated-dependencies: - dependency-name: tempfile 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 1ab5e16f..59995984 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4421,9 +4421,9 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.10.0" +version = "3.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a365e8cd18e44762ef95d87f284f4b5cd04107fec2ff3052bd6a3e6069669e67" +checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ "cfg-if 1.0.0", "fastrand", From bb596fcc090fa438e9e5913c4b85d8b3ba9ac0dc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Mar 2024 11:48:02 +0000 Subject: [PATCH 13/27] build(deps): bump base64 from 0.21.7 to 0.22.0 Bumps [base64](https://github.com/marshallpierce/rust-base64) from 0.21.7 to 0.22.0. - [Changelog](https://github.com/marshallpierce/rust-base64/blob/master/RELEASE-NOTES.md) - [Commits](https://github.com/marshallpierce/rust-base64/compare/v0.21.7...v0.22.0) --- updated-dependencies: - dependency-name: base64 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, 8 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 59995984..41d70d60 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -264,6 +264,12 @@ version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" +[[package]] +name = "base64" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9475866fec1451be56a3c2400fd081ff546538961565ccb5b7142cbd22bc7a51" + [[package]] name = "bdk" version = "0.28.0" @@ -4291,7 +4297,7 @@ dependencies = [ "async-trait", "atty", "backoff", - "base64 0.21.7", + "base64 0.22.0", "bdk", "big-bytes", "bitcoin", diff --git a/swap/Cargo.toml b/swap/Cargo.toml index d5e2b529..4c6e5dd9 100644 --- a/swap/Cargo.toml +++ b/swap/Cargo.toml @@ -14,7 +14,7 @@ async-compression = { version = "0.3", features = [ "bzip2", "tokio" ] } async-trait = "0.1" atty = "0.2" backoff = { version = "0.4", features = [ "tokio" ] } -base64 = "0.21" +base64 = "0.22" bdk = "0.28" big-bytes = "1" bitcoin = { version = "0.29", features = [ "rand", "serde" ] } From 397aa972bb6ec08b3656919f3766eb33c70da580 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Mar 2024 11:54:07 +0000 Subject: [PATCH 14/27] build(deps): bump strum from 0.26.1 to 0.26.2 Bumps [strum](https://github.com/Peternator7/strum) from 0.26.1 to 0.26.2. - [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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 41d70d60..9091c6dd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4243,9 +4243,9 @@ checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" [[package]] name = "strum" -version = "0.26.1" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "723b93e8addf9aa965ebe2d11da6d7540fa2283fcea14b3371ff055f7ba13f5f" +checksum = "5d8cec3501a5194c432b2b7976db6b7d10ec95c253208b45f83f7136aa985e29" dependencies = [ "strum_macros 0.26.1", ] @@ -4341,7 +4341,7 @@ dependencies = [ "spectral", "sqlx", "structopt", - "strum 0.26.1", + "strum 0.26.2", "tempfile", "testcontainers", "thiserror", From 6af198743ab1aae890ea9ddb5a763fe8f496f02c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Mar 2024 11:54:48 +0000 Subject: [PATCH 15/27] build(deps): bump reqwest from 0.11.24 to 0.11.25 Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.11.24 to 0.11.25. - [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.24...v0.11.25) --- updated-dependencies: - dependency-name: reqwest dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 41d70d60..c4c17895 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3349,9 +3349,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.11.24" +version = "0.11.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6920094eb85afde5e4a138be3f2de8bbdf28000f0029e72c45025a56b042251" +checksum = "0eea5a9eb898d3783f17c6407670e3592fd174cb81a10e51d4c37f49450b9946" dependencies = [ "base64 0.21.7", "bytes", @@ -4406,20 +4406,20 @@ dependencies = [ [[package]] name = "system-configuration" -version = "0.5.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +checksum = "658bc6ee10a9b4fcf576e9b0819d95ec16f4d2c02d39fd83ac1c8789785c4a42" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.0", "core-foundation", "system-configuration-sys", ] [[package]] name = "system-configuration-sys" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" dependencies = [ "core-foundation-sys", "libc", From 82eac08bfeccfb8a62d11b1dea6f8ee05e891398 Mon Sep 17 00:00:00 2001 From: Byron Hambly Date: Tue, 12 Mar 2024 14:55:52 +0200 Subject: [PATCH 16/27] ci: specify version of sqlx-cli --- .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 5ff9a6d7..ed083227 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,7 +54,7 @@ jobs: - uses: Swatinem/rust-cache@v2.7.3 - name: Install sqlx-cli - run: cargo install sqlx-cli --locked + run: cargo install --version 0.6.3 sqlx-cli - name: Run sqlite_dev_setup.sh script run: | From 28937b86932a35e312b61f09198f6989e0bc59b1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Mar 2024 13:10:43 +0000 Subject: [PATCH 17/27] build(deps): bump actions/checkout from 4.1.1 to 4.1.2 Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.1 to 4.1.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/v4.1.1...v4.1.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 | 12 ++++++------ .github/workflows/create-release.yml | 2 +- .github/workflows/draft-new-release.yml | 2 +- .github/workflows/preview-release.yml | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build-release-binaries.yml b/.github/workflows/build-release-binaries.yml index 48888845..c18c3124 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@v4.1.1 + uses: actions/checkout@v4.1.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 ed083227..69c11c72 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout sources - uses: actions/checkout@v4.1.1 + uses: actions/checkout@v4.1.2 - uses: dtolnay/rust-toolchain@master with: @@ -35,7 +35,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout sources - uses: actions/checkout@v4.1.1 + uses: actions/checkout@v4.1.2 - uses: Swatinem/rust-cache@v2.7.3 @@ -49,7 +49,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout sources - uses: actions/checkout@v4.1.1 + uses: actions/checkout@v4.1.2 - uses: Swatinem/rust-cache@v2.7.3 @@ -76,7 +76,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout sources - uses: actions/checkout@v4.1.1 + uses: actions/checkout@v4.1.2 - uses: Swatinem/rust-cache@v2.7.3 @@ -129,7 +129,7 @@ jobs: tool-cache: false - name: Checkout sources - uses: actions/checkout@v4.1.1 + uses: actions/checkout@v4.1.2 - uses: Swatinem/rust-cache@v2.7.3 @@ -166,7 +166,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout sources - uses: actions/checkout@v4.1.1 + uses: actions/checkout@v4.1.2 - uses: Swatinem/rust-cache@v2.7.3 diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index ac24fe3f..c62d47eb 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@v4.1.1 + - uses: actions/checkout@v4.1.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 d980d388..5188be0a 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@v4.1.1 + - uses: actions/checkout@v4.1.2 with: token: ${{ secrets.BOTTY_GITHUB_TOKEN }} diff --git a/.github/workflows/preview-release.yml b/.github/workflows/preview-release.yml index d27a645a..f45ff1b4 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@v4.1.1 + - uses: actions/checkout@v4.1.2 - name: Delete 'preview' release uses: larryjoelane/delete-release-action@v1.0.24 From bf262acf0088c9b8a8f2e6dbe2c15d941f2c7a37 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Mar 2024 13:11:26 +0000 Subject: [PATCH 18/27] build(deps): bump thiserror from 1.0.57 to 1.0.58 Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.57 to 1.0.58. - [Release notes](https://github.com/dtolnay/thiserror/releases) - [Commits](https://github.com/dtolnay/thiserror/compare/1.0.57...1.0.58) --- updated-dependencies: - dependency-name: thiserror 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 7ddbf1ab..4a616727 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4475,18 +4475,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.57" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b" +checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.57" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" +checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" dependencies = [ "proc-macro2", "quote", From ccff348cddc84583be862c748cb6ac8e288dbbc5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Mar 2024 13:11:35 +0000 Subject: [PATCH 19/27] build(deps): bump toml from 0.8.10 to 0.8.11 Bumps [toml](https://github.com/toml-rs/toml) from 0.8.10 to 0.8.11. - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.10...toml-v0.8.11) --- updated-dependencies: - dependency-name: toml 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 7ddbf1ab..f2eea16a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -709,7 +709,7 @@ dependencies = [ "nom", "pathdiff", "serde", - "toml 0.8.10", + "toml 0.8.11", ] [[package]] @@ -4351,7 +4351,7 @@ dependencies = [ "tokio-tar", "tokio-tungstenite", "tokio-util", - "toml 0.8.10", + "toml 0.8.11", "torut", "tracing", "tracing-appender", @@ -4711,9 +4711,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.10" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a9aad4a3066010876e8dcf5a8a06e70a558751117a145c6ce2b82c2e2054290" +checksum = "af06656561d28735e9c1cd63dfd57132c8155426aa6af24f36a00a351f88c48e" dependencies = [ "serde", "serde_spanned", @@ -4732,9 +4732,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.4" +version = "0.22.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c9ffdf896f8daaabf9b66ba8e77ea1ed5ed0f72821b398aba62352e95062951" +checksum = "18769cd1cec395d70860ceb4d932812a0b4d06b1a4bb336745a4d21b9496e992" dependencies = [ "indexmap 2.1.0", "serde", @@ -5526,9 +5526,9 @@ checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" [[package]] name = "winnow" -version = "0.5.28" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c830786f7720c2fd27a1a0e27a709dbd3c4d009b56d098fc742d4f4eab91fe2" +checksum = "dffa400e67ed5a4dd237983829e66475f0a4a26938c4b04c21baede6262215b8" dependencies = [ "memchr", ] From 46eee5ccfc867d62fffef2e9b4915c4b6f10c1e2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Mar 2024 13:11:43 +0000 Subject: [PATCH 20/27] build(deps): bump anyhow from 1.0.80 to 1.0.81 Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.80 to 1.0.81. - [Release notes](https://github.com/dtolnay/anyhow/releases) - [Commits](https://github.com/dtolnay/anyhow/compare/1.0.80...1.0.81) --- 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 7ddbf1ab..594d5c33 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -98,9 +98,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.80" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1" +checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" [[package]] name = "arrayref" From a61f7809d98eba06d27c39d494cdc2305e5f4b4b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Mar 2024 11:32:44 +0000 Subject: [PATCH 21/27] build(deps): bump reqwest from 0.11.25 to 0.11.26 Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.11.25 to 0.11.26. - [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.25...v0.11.26) --- updated-dependencies: - dependency-name: reqwest dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 275b13fe..1f5a3ac7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3349,9 +3349,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.11.25" +version = "0.11.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eea5a9eb898d3783f17c6407670e3592fd174cb81a10e51d4c37f49450b9946" +checksum = "78bf93c4af7a8bb7d879d51cebe797356ff10ae8516ace542b5182d9dcac10b2" dependencies = [ "base64 0.21.7", "bytes", @@ -4406,20 +4406,20 @@ dependencies = [ [[package]] name = "system-configuration" -version = "0.6.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "658bc6ee10a9b4fcf576e9b0819d95ec16f4d2c02d39fd83ac1c8789785c4a42" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" dependencies = [ - "bitflags 2.4.0", + "bitflags 1.3.2", "core-foundation", "system-configuration-sys", ] [[package]] name = "system-configuration-sys" -version = "0.6.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" dependencies = [ "core-foundation-sys", "libc", From fea34cc35b5fe1121fb6816aff61791a70cbf328 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Mar 2024 11:58:41 +0000 Subject: [PATCH 22/27] build(deps): bump qrcode from 0.13.0 to 0.14.0 Bumps [qrcode](https://github.com/kennytm/qrcode-rust) from 0.13.0 to 0.14.0. - [Release notes](https://github.com/kennytm/qrcode-rust/releases) - [Commits](https://github.com/kennytm/qrcode-rust/commits) --- updated-dependencies: - dependency-name: qrcode dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 29 +++++------------------------ swap/Cargo.toml | 2 +- 2 files changed, 6 insertions(+), 25 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1f5a3ac7..61d24025 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -670,12 +670,6 @@ dependencies = [ "vec_map", ] -[[package]] -name = "color_quant" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" - [[package]] name = "colored" version = "2.0.4" @@ -1766,14 +1760,12 @@ dependencies = [ [[package]] name = "image" -version = "0.24.7" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f3dfdbdd72063086ff443e297b61695500514b1e41095b6fb9a5ab48a70a711" +checksum = "a9b4f005360d32e9325029b38ba47ebd7a56f3316df09249368939562d518645" dependencies = [ "bytemuck", "byteorder", - "color_quant", - "num-rational 0.4.1", "num-traits", ] @@ -2591,7 +2583,7 @@ dependencies = [ "num-complex", "num-integer", "num-iter", - "num-rational 0.1.42", + "num-rational", "num-traits", ] @@ -2656,17 +2648,6 @@ dependencies = [ "rustc-serialize", ] -[[package]] -name = "num-rational" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - [[package]] name = "num-traits" version = "0.2.15" @@ -3117,9 +3098,9 @@ dependencies = [ [[package]] name = "qrcode" -version = "0.13.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "166f136dfdb199f98186f3649cf7a0536534a61417a1a30221b492b4fb60ce3f" +checksum = "23e719ca51966ff9f5a8436edb00d6115b3c606a0bb27c8f8ca74a38ff2b036d" dependencies = [ "image", ] diff --git a/swap/Cargo.toml b/swap/Cargo.toml index 4c6e5dd9..1cbd5ed5 100644 --- a/swap/Cargo.toml +++ b/swap/Cargo.toml @@ -36,7 +36,7 @@ monero = { version = "0.12", features = [ "serde_support" ] } monero-rpc = { path = "../monero-rpc" } pem = "3.0" proptest = "1" -qrcode = "0.13" +qrcode = "0.14" rand = "0.8" rand_chacha = "0.3" reqwest = { version = "0.11", features = [ "rustls-tls", "stream", "socks" ], default-features = false } From 3b83822a71ffbf8beadac433c761bf9e3aa57c58 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Mar 2024 11:35:06 +0000 Subject: [PATCH 23/27] build(deps): bump async-trait from 0.1.77 to 0.1.78 Bumps [async-trait](https://github.com/dtolnay/async-trait) from 0.1.77 to 0.1.78. - [Release notes](https://github.com/dtolnay/async-trait/releases) - [Commits](https://github.com/dtolnay/async-trait/compare/0.1.77...0.1.78) --- 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 61d24025..3a00c8fe 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -145,9 +145,9 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.77" +version = "0.1.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" +checksum = "461abc97219de0eaaf81fe3ef974a540158f3d079c2ab200f891f1a2ef201e85" dependencies = [ "proc-macro2", "quote", From d77f208aae00d7e8103cc83143b7f9905a56f659 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Mar 2024 11:22:48 +0000 Subject: [PATCH 24/27] build(deps): bump uuid from 1.7.0 to 1.8.0 Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.7.0 to 1.8.0. - [Release notes](https://github.com/uuid-rs/uuid/releases) - [Commits](https://github.com/uuid-rs/uuid/compare/1.7.0...1.8.0) --- updated-dependencies: - dependency-name: uuid dependency-type: direct:production update-type: version-update:semver-minor ... 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 3a00c8fe..6c9dfec1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5077,9 +5077,9 @@ checksum = "05e42f7c18b8f902290b009cde6d651262f956c98bc51bca4cd1d511c9cd85c7" [[package]] name = "uuid" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a" +checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" dependencies = [ "getrandom 0.2.11", "serde", diff --git a/swap/Cargo.toml b/swap/Cargo.toml index 1cbd5ed5..3cb84995 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.7", features = [ "serde", "v4" ] } +uuid = { version = "1.8", features = [ "serde", "v4" ] } void = "1" [target.'cfg(not(windows))'.dependencies] From 5d1b9cf4c3cb2f259a7d2f2bf477278e967dea16 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Mar 2024 11:23:48 +0000 Subject: [PATCH 25/27] build(deps): bump toml from 0.8.11 to 0.8.12 Bumps [toml](https://github.com/toml-rs/toml) from 0.8.11 to 0.8.12. - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.11...toml-v0.8.12) --- updated-dependencies: - dependency-name: toml 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 3a00c8fe..2f69f7a0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -703,7 +703,7 @@ dependencies = [ "nom", "pathdiff", "serde", - "toml 0.8.11", + "toml 0.8.12", ] [[package]] @@ -4332,7 +4332,7 @@ dependencies = [ "tokio-tar", "tokio-tungstenite", "tokio-util", - "toml 0.8.11", + "toml 0.8.12", "torut", "tracing", "tracing-appender", @@ -4692,9 +4692,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.11" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af06656561d28735e9c1cd63dfd57132c8155426aa6af24f36a00a351f88c48e" +checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3" dependencies = [ "serde", "serde_spanned", @@ -4713,9 +4713,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.7" +version = "0.22.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18769cd1cec395d70860ceb4d932812a0b4d06b1a4bb336745a4d21b9496e992" +checksum = "c12219811e0c1ba077867254e5ad62ee2c9c190b0d957110750ac0cda1ae96cd" dependencies = [ "indexmap 2.1.0", "serde", From 1901594d288cedbf0b4dff06a340d865170dc12b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Mar 2024 11:09:02 +0000 Subject: [PATCH 26/27] build(deps): bump reqwest from 0.11.26 to 0.11.27 Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.11.26 to 0.11.27. - [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.26...v0.11.27) --- updated-dependencies: - dependency-name: reqwest 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 3795cae6..c7736aea 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3330,9 +3330,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.11.26" +version = "0.11.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78bf93c4af7a8bb7d879d51cebe797356ff10ae8516ace542b5182d9dcac10b2" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" dependencies = [ "base64 0.21.7", "bytes", From eb15f477fac1872af4028ded403c511993ea2bed Mon Sep 17 00:00:00 2001 From: Ian McKenzie <13459320+ikmckenz@users.noreply.github.com> Date: Fri, 22 Mar 2024 02:18:40 -0700 Subject: [PATCH 27/27] Verify hashes of monero cli on download (#1572) * Bump Monero CLI for macos aarch64 to match other platforms * Check hash on download of monero cli * change panic to bail --------- Co-authored-by: Byron Hambly --- Cargo.lock | 1 + swap/Cargo.toml | 1 + swap/src/monero/wallet_rpc.rs | 32 +++++++++++++++++++++++++++++++- 3 files changed, 33 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index c7736aea..8c58895b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4290,6 +4290,7 @@ dependencies = [ "curve25519-dalek-ng", "data-encoding", "dialoguer", + "digest 0.10.7", "directories-next", "ecdsa_fun", "ed25519-dalek", diff --git a/swap/Cargo.toml b/swap/Cargo.toml index 3cb84995..8b60517a 100644 --- a/swap/Cargo.toml +++ b/swap/Cargo.toml @@ -25,6 +25,7 @@ conquer-once = "0.4" curve25519-dalek = { package = "curve25519-dalek-ng", version = "4" } data-encoding = "2.5" dialoguer = "0.11" +digest = "0.10.7" directories-next = "2" ecdsa_fun = { git = "https://github.com/LLFourn/secp256kfun", default-features = false, features = [ "libsecp_compat", "serde", "adaptor" ] } ed25519-dalek = "1" diff --git a/swap/src/monero/wallet_rpc.rs b/swap/src/monero/wallet_rpc.rs index e44d800e..e227c3f3 100644 --- a/swap/src/monero/wallet_rpc.rs +++ b/swap/src/monero/wallet_rpc.rs @@ -1,11 +1,13 @@ use ::monero::Network; use anyhow::{bail, Context, Error, Result}; use big_bytes::BigByte; +use data_encoding::HEXLOWER; use futures::{StreamExt, TryStreamExt}; use monero_rpc::wallet::{Client, MoneroWalletRpc as _}; use reqwest::header::CONTENT_LENGTH; use reqwest::Url; use serde::Deserialize; +use sha2::{Digest, Sha256}; use std::fmt; use std::fmt::{Debug, Display, Formatter}; use std::io::ErrorKind; @@ -45,19 +47,29 @@ compile_error!("unsupported operating system"); #[cfg(all(target_os = "macos", target_arch = "x86_64"))] const DOWNLOAD_URL: &str = "https://downloads.getmonero.org/cli/monero-mac-x64-v0.18.1.2.tar.bz2"; +#[cfg(all(target_os = "macos", target_arch = "x86_64"))] +const DOWNLOAD_HASH: &str = "ba1108c7a5e5efe15b6a628fb007c50f01c231f61137bba7427605286dbc6f01"; #[cfg(all(target_os = "macos", target_arch = "aarch64"))] -const DOWNLOAD_URL: &str = "https://downloads.getmonero.org/cli/monero-mac-armv8-v0.18.0.0.tar.bz2"; +const DOWNLOAD_URL: &str = "https://downloads.getmonero.org/cli/monero-mac-armv8-v0.18.1.2.tar.bz2"; +#[cfg(all(target_os = "macos", target_arch = "aarch64"))] +const DOWNLOAD_HASH: &str = "620b825c04f84845ed09de03b207a3230a34f74b30a8a07dde504a7d376ee4b9"; #[cfg(all(target_os = "linux", target_arch = "x86_64"))] const DOWNLOAD_URL: &str = "https://downloads.getmonero.org/cli/monero-linux-x64-v0.18.1.2.tar.bz2"; +#[cfg(all(target_os = "linux", target_arch = "x86_64"))] +const DOWNLOAD_HASH: &str = "7d51e7072351f65d0c7909e745827cfd3b00abe5e7c4cc4c104a3c9b526da07e"; #[cfg(all(target_os = "linux", target_arch = "arm"))] const DOWNLOAD_URL: &str = "https://downloads.getmonero.org/cli/monero-linux-armv7-v0.18.1.2.tar.bz2"; +#[cfg(all(target_os = "linux", target_arch = "arm"))] +const DOWNLOAD_HASH: &str = "94ece435ed60f85904114643482c2b6716f74bf97040a7af237450574a9cf06d"; #[cfg(target_os = "windows")] const DOWNLOAD_URL: &str = "https://downloads.getmonero.org/cli/monero-win-x64-v0.18.1.2.zip"; +#[cfg(target_os = "windows")] +const DOWNLOAD_HASH: &str = "0a3d4d1af7e094c05352c31b2dafcc6ccbc80edc195ca9eaedc919c36accd05a"; #[cfg(any(target_os = "macos", target_os = "linux"))] const PACKED_FILE: &str = "monero-wallet-rpc"; @@ -226,8 +238,14 @@ impl WalletRpc { DOWNLOAD_URL ); + let mut hasher = Sha256::new(); + let byte_stream = response .bytes_stream() + .map_ok(|bytes| { + hasher.update(&bytes); + bytes + }) .map_err(|err| std::io::Error::new(ErrorKind::Other, err)); #[cfg(not(target_os = "windows"))] @@ -256,6 +274,18 @@ impl WalletRpc { file.write_all(&bytes).await?; } + let result = hasher.finalize(); + let result_hash = HEXLOWER.encode(result.as_ref()); + if result_hash != DOWNLOAD_HASH { + bail!( + "SHA256 of download ({}) does not match expected ({})!", + result_hash, + DOWNLOAD_HASH + ); + } else { + tracing::debug!("Hashes match"); + } + file.flush().await?; tracing::debug!("Extracting archive");