mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-03-19 12:56:18 -04:00
Upgrade libp2p and stabilized the version
#dependency-type: direct:production # update-type: version-update:semver-patch #dependency-type: direct:production # update-type: version-update:semver-patch # dependency-type: direct:production #update-type: version-update:semver-patch Fix failing CI tests due to deleted xmrto docker hub images Fix failing CI tests due to deleted xmrto docker hub images by moving to the docker images provided by melotools Bump tempfile from 3.2.0 to 3.3.0 Bumps [tempfile](https://github.com/Stebalien/tempfile) from 3.2.0 to 3.3.0. - [Release notes](https://github.com/Stebalien/tempfile/releases) - [Changelog](https://github.com/Stebalien/tempfile/blob/master/NEWS) - [Commits](https://github.com/Stebalien/tempfile/compare/v3.2.0...v3.3.0) --- updated-dependencies: - dependency-name: tempfile dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Always write logs as JSON to files Bump torut from 0.2.0 to 0.2.1 Bumps [torut](https://github.com/teawithsand/torut) from 0.2.0 to 0.2.1. - [Release notes](https://github.com/teawithsand/torut/releases) - [Commits](https://github.com/teawithsand/torut/commits) --- updated-dependencies: - dependency-name: torut dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Bump time from 0.3.3 to 0.3.7 Bumps [time](https://github.com/time-rs/time) from 0.3.3 to 0.3.7. - [Release notes](https://github.com/time-rs/time/releases) - [Changelog](https://github.com/time-rs/time/blob/main/CHANGELOG.md) - [Commits](https://github.com/time-rs/time/compare/v0.3.3...v0.3.7) --- updated-dependencies: - dependency-name: time dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Bump tokio from 1.12.0 to 1.16.1 Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.12.0 to 1.16.1. - [Release notes](https://github.com/tokio-rs/tokio/releases) - [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.12.0...tokio-1.16.1) --- updated-dependencies: - dependency-name: tokio dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Bump dialoguer from 0.8.0 to 0.10.0 Bumps [dialoguer](https://github.com/mitsuhiko/dialoguer) from 0.8.0 to 0.10.0. - [Release notes](https://github.com/mitsuhiko/dialoguer/releases) - [Changelog](https://github.com/mitsuhiko/dialoguer/blob/master/CHANGELOG.md) - [Commits](https://github.com/mitsuhiko/dialoguer/compare/0.8.0...v0.10.0) --- updated-dependencies: - dependency-name: dialoguer dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Bump reqwest from 0.11.7 to 0.11.9 Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.11.7 to 0.11.9. - [Release notes](https://github.com/seanmonstar/reqwest/releases) - [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md) - [Commits](https://github.com/seanmonstar/reqwest/compare/v0.11.7...v0.11.9) --- updated-dependencies: - dependency-name: reqwest dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Bump actions/setup-python from 2.3.1 to 2.3.2 Bumps [actions/setup-python](https://github.com/actions/setup-python) from 2.3.1 to 2.3.2. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/v2.3.1...v2.3.2) --- updated-dependencies: - dependency-name: actions/setup-python dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Adjust quote based on Bitcoin balance Update dependencies and rust-toolchain to 1.59 This commit updates the rust-toolchain to the current stable version 1.59, and fixes a number of new clippy warnings from that change. Other changes: - updates backoff to 0.4 - updates swap to 2021 edition - updates comfy-table to 5.0 - updates monero-wallet to 2021 edition - updates moneor-harness to 2021 edition - updates bdk and rust_decimal - updates tokio-util to 0.7 - updates workflow to use actions/setup-python@3 - updates pem and serde_with - adds stable rust toolchain notice to readme Change to rino nodes Update dprint plugins to fix CI error Bump futures from 0.3.17 to 0.3.21 Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.17 to 0.3.21. - [Release notes](https://github.com/rust-lang/futures-rs/releases) - [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.17...0.3.21) --- updated-dependencies: - dependency-name: futures dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Bump structopt from 0.3.25 to 0.3.26 Bumps [structopt](https://github.com/TeXitoi/structopt) from 0.3.25 to 0.3.26. - [Release notes](https://github.com/TeXitoi/structopt/releases) - [Changelog](https://github.com/TeXitoi/structopt/blob/master/CHANGELOG.md) - [Commits](https://github.com/TeXitoi/structopt/compare/v0.3.25...v0.3.26) --- updated-dependencies: - dependency-name: structopt dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Bump serde from 1.0.133 to 1.0.136 Bumps [serde](https://github.com/serde-rs/serde) from 1.0.133 to 1.0.136. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.133...v1.0.136) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Bump hyper from 0.14.16 to 0.14.18 Bumps [hyper](https://github.com/hyperium/hyper) from 0.14.16 to 0.14.18. - [Release notes](https://github.com/hyperium/hyper/releases) - [Changelog](https://github.com/hyperium/hyper/blob/master/CHANGELOG.md) - [Commits](https://github.com/hyperium/hyper/compare/v0.14.16...v0.14.18) --- updated-dependencies: - dependency-name: hyper dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Inform Bob that he has been punished Reduce required confirmations for Bitcoin transactions from 2 to 1 Don't wait for refund transaction to receive confirmations Don't wait for refund transaction to receive confirmations to mitigate a scenario where the swap is stuck in `BtcCancelled` because it's not resumable. Add dial_as_listener to tor transport Upgrade to libp2p and stabilized version Updated dprint rustfmt pluging and 2021 Add dial_as_listener to tor transport Upgrade to libp2p and stabilized version Updated dprint rustfmt pluging and 2021 Update dprint plugins to fix CI error Bump futures from 0.3.17 to 0.3.21 Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.17 to 0.3.21. - [Release notes](https://github.com/rust-lang/futures-rs/releases) - [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.17...0.3.21) --- updated-dependencies: - dependency-name: futures dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Bump structopt from 0.3.25 to 0.3.26 Bumps [structopt](https://github.com/TeXitoi/structopt) from 0.3.25 to 0.3.26. - [Release notes](https://github.com/TeXitoi/structopt/releases) - [Changelog](https://github.com/TeXitoi/structopt/blob/master/CHANGELOG.md) - [Commits](https://github.com/TeXitoi/structopt/compare/v0.3.25...v0.3.26) --- updated-dependencies: - dependency-name: structopt dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Bump serde from 1.0.133 to 1.0.136 Bumps [serde](https://github.com/serde-rs/serde) from 1.0.133 to 1.0.136. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.133...v1.0.136) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Bump hyper from 0.14.16 to 0.14.18 Bumps [hyper](https://github.com/hyperium/hyper) from 0.14.16 to 0.14.18. - [Release notes](https://github.com/hyperium/hyper/releases) - [Changelog](https://github.com/hyperium/hyper/blob/master/CHANGELOG.md) - [Commits](https://github.com/hyperium/hyper/compare/v0.14.16...v0.14.18) --- updated-dependencies: - dependency-name: hyper dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Inform Bob that he has been punished Reduce required confirmations for Bitcoin transactions from 2 to 1 Don't wait for refund transaction to receive confirmations Don't wait for refund transaction to receive confirmations to mitigate a scenario where the swap is stuck in `BtcCancelled` because it's not resumable. Add dial_as_listener to tor transport Updated dprint rustfmt pluging and 2021 Updated dprint rustfmt pluging and 2021 fix in redial fix connecting to peer message gichange in formating Update dprint plugins to fix CI error Bump futures from 0.3.17 to 0.3.21 Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.17 to 0.3.21. - [Release notes](https://github.com/rust-lang/futures-rs/releases) - [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.17...0.3.21) --- updated-dependencies: - dependency-name: futures dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Bump structopt from 0.3.25 to 0.3.26 Bumps [structopt](https://github.com/TeXitoi/structopt) from 0.3.25 to 0.3.26. - [Release notes](https://github.com/TeXitoi/structopt/releases) - [Changelog](https://github.com/TeXitoi/structopt/blob/master/CHANGELOG.md) - [Commits](https://github.com/TeXitoi/structopt/compare/v0.3.25...v0.3.26) --- updated-dependencies: - dependency-name: structopt dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Bump serde from 1.0.133 to 1.0.136 Bumps [serde](https://github.com/serde-rs/serde) from 1.0.133 to 1.0.136. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.133...v1.0.136) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Bump hyper from 0.14.16 to 0.14.18 Bumps [hyper](https://github.com/hyperium/hyper) from 0.14.16 to 0.14.18. - [Release notes](https://github.com/hyperium/hyper/releases) - [Changelog](https://github.com/hyperium/hyper/blob/master/CHANGELOG.md) - [Commits](https://github.com/hyperium/hyper/compare/v0.14.16...v0.14.18) --- updated-dependencies: - dependency-name: hyper dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Inform Bob that he has been punished Reduce required confirmations for Bitcoin transactions from 2 to 1 Don't wait for refund transaction to receive confirmations Don't wait for refund transaction to receive confirmations to mitigate a scenario where the swap is stuck in `BtcCancelled` because it's not resumable. 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] <support@github.com> 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] <support@github.com> 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] <support@github.com> update option documentation to specify amount format 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] <support@github.com> 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] <support@github.com> 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] <support@github.com> 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] <support@github.com> 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] <support@github.com> 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] <support@github.com> 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] <support@github.com> 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] <support@github.com> 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] <support@github.com> 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] <support@github.com> 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] <support@github.com> 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] <support@github.com> 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] <support@github.com> Update from monero v17.2.0 to monero v17.3.0 Implement Identify protocol to make network and version of ASB available to peers 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] <support@github.com> Update dprint plugins to fix CI error Bump futures from 0.3.17 to 0.3.21 Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.17 to 0.3.21. - [Release notes](https://github.com/rust-lang/futures-rs/releases) - [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.17...0.3.21) --- updated-dependencies: - dependency-name: futures dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Bump structopt from 0.3.25 to 0.3.26 Bumps [structopt](https://github.com/TeXitoi/structopt) from 0.3.25 to 0.3.26. - [Release notes](https://github.com/TeXitoi/structopt/releases) - [Changelog](https://github.com/TeXitoi/structopt/blob/master/CHANGELOG.md) - [Commits](https://github.com/TeXitoi/structopt/compare/v0.3.25...v0.3.26) --- updated-dependencies: - dependency-name: structopt dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Bump serde from 1.0.133 to 1.0.136 Bumps [serde](https://github.com/serde-rs/serde) from 1.0.133 to 1.0.136. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.133...v1.0.136) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Bump hyper from 0.14.16 to 0.14.18 Bumps [hyper](https://github.com/hyperium/hyper) from 0.14.16 to 0.14.18. - [Release notes](https://github.com/hyperium/hyper/releases) - [Changelog](https://github.com/hyperium/hyper/blob/master/CHANGELOG.md) - [Commits](https://github.com/hyperium/hyper/compare/v0.14.16...v0.14.18) --- updated-dependencies: - dependency-name: hyper dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Inform Bob that he has been punished Don't wait for refund transaction to receive confirmations Don't wait for refund transaction to receive confirmations to mitigate a scenario where the swap is stuck in `BtcCancelled` because it's not resumable. 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] <support@github.com> 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] <support@github.com> 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] <support@github.com> update option documentation to specify amount format 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] <support@github.com> 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] <support@github.com> 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] <support@github.com> 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] <support@github.com> 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] <support@github.com> 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] <support@github.com> 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] <support@github.com> 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] <support@github.com> 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] <support@github.com> 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] <support@github.com> 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] <support@github.com> Update dprint plugins to fix CI error Bump futures from 0.3.17 to 0.3.21 Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.17 to 0.3.21. - [Release notes](https://github.com/rust-lang/futures-rs/releases) - [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.17...0.3.21) --- updated-dependencies: - dependency-name: futures dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Bump structopt from 0.3.25 to 0.3.26 Bumps [structopt](https://github.com/TeXitoi/structopt) from 0.3.25 to 0.3.26. - [Release notes](https://github.com/TeXitoi/structopt/releases) - [Changelog](https://github.com/TeXitoi/structopt/blob/master/CHANGELOG.md) - [Commits](https://github.com/TeXitoi/structopt/compare/v0.3.25...v0.3.26) --- updated-dependencies: - dependency-name: structopt dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Bump serde from 1.0.133 to 1.0.136 Bumps [serde](https://github.com/serde-rs/serde) from 1.0.133 to 1.0.136. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.133...v1.0.136) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Bump hyper from 0.14.16 to 0.14.18 Bumps [hyper](https://github.com/hyperium/hyper) from 0.14.16 to 0.14.18. - [Release notes](https://github.com/hyperium/hyper/releases) - [Changelog](https://github.com/hyperium/hyper/blob/master/CHANGELOG.md) - [Commits](https://github.com/hyperium/hyper/compare/v0.14.16...v0.14.18) --- updated-dependencies: - dependency-name: hyper dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Inform Bob that he has been punished Don't wait for refund transaction to receive confirmations Don't wait for refund transaction to receive confirmations to mitigate a scenario where the swap is stuck in `BtcCancelled` because it's not resumable. 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] <support@github.com> 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] <support@github.com> update option documentation to specify amount format 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] <support@github.com> 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] <support@github.com> 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] <support@github.com> 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] <support@github.com> 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] <support@github.com> 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] <support@github.com> 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] <support@github.com> 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] <support@github.com> 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] <support@github.com> 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] <support@github.com> 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] <support@github.com> Checking for rendezvous peer
This commit is contained in:
parent
f4d2e8fc8c
commit
8bb1900c2c
4
.github/workflows/build-release-binaries.yml
vendored
4
.github/workflows/build-release-binaries.yml
vendored
@ -45,12 +45,12 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout tagged commit
|
||||
uses: actions/checkout@v2.4.0
|
||||
uses: actions/checkout@v3.0.1
|
||||
with:
|
||||
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'
|
||||
|
33
.github/workflows/ci.yml
vendored
33
.github/workflows/ci.yml
vendored
@ -4,18 +4,18 @@ on:
|
||||
pull_request: # Need to run on pull-requests, otherwise PRs from forks don't run
|
||||
push:
|
||||
branches:
|
||||
- 'staging' # Bors uses this branch
|
||||
- 'trying' # Bors uses this branch
|
||||
- 'master' # Always build head of master for the badge in the README
|
||||
- "staging" # Bors uses this branch
|
||||
- "trying" # Bors uses this branch
|
||||
- "master" # Always build head of master for the badge in the README
|
||||
|
||||
jobs:
|
||||
static_analysis:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v2.4.0
|
||||
uses: actions/checkout@v3.0.1
|
||||
|
||||
- uses: Swatinem/rust-cache@v1.3.0
|
||||
- uses: Swatinem/rust-cache@v1.4.0
|
||||
|
||||
- name: Check formatting
|
||||
uses: dprint/check@v2.0
|
||||
@ -40,11 +40,10 @@ jobs:
|
||||
os: windows-latest
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v2.4.0
|
||||
uses: actions/checkout@v3.0.1
|
||||
|
||||
- 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'
|
||||
@ -71,13 +70,13 @@ jobs:
|
||||
test:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ ubuntu-latest, macos-latest ]
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v2.4.0
|
||||
uses: actions/checkout@v3.0.1
|
||||
|
||||
- uses: Swatinem/rust-cache@v1.3.0
|
||||
- uses: Swatinem/rust-cache@v1.4.0
|
||||
|
||||
- name: Build tests
|
||||
run: cargo build --tests --workspace --all-features
|
||||
@ -92,7 +91,8 @@ jobs:
|
||||
docker_tests:
|
||||
strategy:
|
||||
matrix:
|
||||
test_name: [
|
||||
test_name:
|
||||
[
|
||||
happy_path,
|
||||
happy_path_restart_bob_after_xmr_locked,
|
||||
happy_path_restart_bob_before_xmr_locked,
|
||||
@ -105,15 +105,14 @@ jobs:
|
||||
alice_refunds_after_restart_bob_refunded,
|
||||
ensure_same_swap_id,
|
||||
concurrent_bobs_before_xmr_lock_proof_sent,
|
||||
alice_manually_redeems_after_enc_sig_learned
|
||||
]
|
||||
alice_manually_redeems_after_enc_sig_learned,
|
||||
]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v2.4.0
|
||||
uses: actions/checkout@v3.0.1
|
||||
|
||||
- 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
|
||||
|
2
.github/workflows/create-release.yml
vendored
2
.github/workflows/create-release.yml
vendored
@ -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.1
|
||||
|
||||
- name: Extract version from branch name
|
||||
id: extract-version
|
||||
|
6
.github/workflows/draft-new-release.yml
vendored
6
.github/workflows/draft-new-release.yml
vendored
@ -4,7 +4,7 @@ on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: 'The new version in X.Y.Z format.'
|
||||
description: "The new version in X.Y.Z format."
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
@ -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.1
|
||||
with:
|
||||
token: ${{ secrets.BOTTY_GITHUB_TOKEN }}
|
||||
|
||||
@ -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
|
||||
|
2
.github/workflows/preview-release.yml
vendored
2
.github/workflows/preview-release.yml
vendored
@ -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.1
|
||||
|
||||
- name: Delete 'preview' release
|
||||
uses: larryjoelane/delete-release-action@v1.0.24
|
||||
|
@ -17,6 +17,9 @@ 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
|
||||
- Update from monero v17.2.0 to monero v17.3.0
|
||||
- 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
|
||||
|
||||
|
627
Cargo.lock
generated
627
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
13
dprint.json
13
dprint.json
@ -2,13 +2,12 @@
|
||||
"$schema": "https://dprint.dev/schemas/v0.json",
|
||||
"projectType": "openSource",
|
||||
"incremental": true,
|
||||
"markdown": {
|
||||
},
|
||||
"markdown": {},
|
||||
"rustfmt": {
|
||||
"edition": 2018,
|
||||
"edition": 2021,
|
||||
"condense_wildcard_suffixes": true,
|
||||
"format_macro_matchers": true,
|
||||
"imports_granularity" : "Module",
|
||||
"imports_granularity": "Module",
|
||||
"use_field_init_shorthand": true,
|
||||
"format_code_in_doc_comments": true,
|
||||
"normalize_comments": true,
|
||||
@ -16,10 +15,10 @@
|
||||
"overflow_delimited_expr": true
|
||||
},
|
||||
"includes": ["**/*.{md}", "**/*.{toml}", "**/*.{rs}"],
|
||||
"excludes": [ "target/" ],
|
||||
"excludes": ["target/"],
|
||||
"plugins": [
|
||||
"https://plugins.dprint.dev/markdown-0.6.1.wasm",
|
||||
"https://plugins.dprint.dev/markdown-0.13.1.wasm",
|
||||
"https://github.com/thomaseizinger/dprint-plugin-cargo-toml/releases/download/0.1.0/cargo-toml-0.1.0.wasm",
|
||||
"https://plugins.dprint.dev/rustfmt-0.4.0.exe-plugin@c6bb223ef6e5e87580177f6461a0ab0554ac9ea6b54f78ea7ae8bf63b14f5bc2"
|
||||
"https://plugins.dprint.dev/rustfmt-0.6.1.exe-plugin@99b89a0599fd3a63e597e03436862157901f3facae2f0c2fbd0b9f656cdbc2a5"
|
||||
]
|
||||
}
|
||||
|
@ -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 = { version = "0.42.2", 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"
|
||||
@ -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" ] }
|
||||
@ -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]
|
||||
@ -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"
|
||||
|
@ -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<Amount>,
|
||||
#[structopt(long = "address", help = "The address to receive the Bitcoin.")]
|
||||
|
@ -13,11 +13,13 @@ 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::dial_opts::PeerCondition;
|
||||
use libp2p::swarm::{
|
||||
DialPeerCondition, IntoProtocolsHandler, NetworkBehaviour, NetworkBehaviourAction,
|
||||
PollParameters, ProtocolsHandler,
|
||||
IntoProtocolsHandler, NetworkBehaviour, NetworkBehaviourAction, PollParameters,
|
||||
ProtocolsHandler,
|
||||
};
|
||||
use libp2p::tcp::TokioTcpConfig;
|
||||
use libp2p::websocket::WsConfig;
|
||||
@ -106,11 +108,12 @@ pub mod behaviour {
|
||||
where
|
||||
LR: LatestRate + Send + 'static,
|
||||
{
|
||||
pub rendezvous: libp2p::swarm::toggle::Toggle<rendezous::Behaviour>,
|
||||
pub rendezvous: libp2p::swarm::behaviour::toggle::Toggle<rendezous::Behaviour>,
|
||||
pub quote: quote::Behaviour,
|
||||
pub swap_setup: alice::Behaviour<LR>,
|
||||
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,10 +131,16 @@ 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(
|
||||
rendezvous: libp2p::swarm::behaviour::toggle::Toggle::from(rendezvous_params.map(
|
||||
|(identity, rendezvous_peer_id, rendezvous_address, namespace)| {
|
||||
rendezous::Behaviour::new(
|
||||
identity,
|
||||
@ -153,6 +162,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 +173,12 @@ pub mod behaviour {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<IdentifyEvent> for OutEvent {
|
||||
fn from(_: IdentifyEvent) -> Self {
|
||||
OutEvent::Other
|
||||
}
|
||||
}
|
||||
|
||||
impl From<libp2p::rendezvous::client::Event> for OutEvent {
|
||||
fn from(event: libp2p::rendezvous::client::Event) -> Self {
|
||||
OutEvent::Rendezvous(event)
|
||||
@ -172,6 +188,7 @@ pub mod behaviour {
|
||||
|
||||
pub mod rendezous {
|
||||
use super::*;
|
||||
use libp2p::swarm::dial_opts::DialOpts;
|
||||
use libp2p::swarm::DialError;
|
||||
use std::pin::Pin;
|
||||
|
||||
@ -277,12 +294,14 @@ pub mod rendezous {
|
||||
|
||||
fn inject_dial_failure(
|
||||
&mut self,
|
||||
peer_id: &PeerId,
|
||||
peer_id: Option<PeerId>,
|
||||
_handler: Self::ProtocolsHandler,
|
||||
_error: DialError,
|
||||
_error: &DialError,
|
||||
) {
|
||||
if peer_id == &self.rendezvous_peer_id {
|
||||
self.connection_status = ConnectionStatus::Disconnected;
|
||||
if let Some(id) = peer_id {
|
||||
if id == self.rendezvous_peer_id {
|
||||
self.connection_status = ConnectionStatus::Disconnected;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -297,9 +316,11 @@ pub mod rendezous {
|
||||
ConnectionStatus::Disconnected => {
|
||||
self.connection_status = ConnectionStatus::Dialling;
|
||||
|
||||
return Poll::Ready(NetworkBehaviourAction::DialPeer {
|
||||
peer_id: self.rendezvous_peer_id,
|
||||
condition: DialPeerCondition::Disconnected,
|
||||
return Poll::Ready(NetworkBehaviourAction::Dial {
|
||||
opts: DialOpts::peer_id(self.rendezvous_peer_id)
|
||||
.condition(PeerCondition::Disconnected)
|
||||
.build(),
|
||||
|
||||
handler: Self::ProtocolsHandler::new(Duration::from_secs(30)),
|
||||
});
|
||||
}
|
||||
@ -320,9 +341,10 @@ pub mod rendezous {
|
||||
self.registration_status =
|
||||
RegistrationStatus::RegisterOnNextConnection;
|
||||
|
||||
return Poll::Ready(NetworkBehaviourAction::DialPeer {
|
||||
peer_id: self.rendezvous_peer_id,
|
||||
condition: DialPeerCondition::Disconnected,
|
||||
return Poll::Ready(NetworkBehaviourAction::Dial {
|
||||
opts: DialOpts::peer_id(self.rendezvous_peer_id)
|
||||
.condition(PeerCondition::Disconnected)
|
||||
.build(),
|
||||
handler: Self::ProtocolsHandler::new(Duration::from_secs(30)),
|
||||
});
|
||||
}
|
||||
|
@ -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() {
|
||||
|
@ -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();
|
||||
|
@ -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<bitcoin::Wallet>,
|
||||
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<PingEvent> for OutEvent {
|
||||
OutEvent::Other
|
||||
}
|
||||
}
|
||||
|
||||
impl From<IdentifyEvent> for OutEvent {
|
||||
fn from(_: IdentifyEvent) -> Self {
|
||||
OutEvent::Other
|
||||
}
|
||||
}
|
||||
|
@ -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,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
@ -9,6 +9,7 @@ use anyhow::{Context, Result};
|
||||
use futures::future::{BoxFuture, OptionFuture};
|
||||
use futures::{FutureExt, StreamExt};
|
||||
use libp2p::request_response::{RequestId, ResponseChannel};
|
||||
use libp2p::swarm::dial_opts::DialOpts;
|
||||
use libp2p::swarm::SwarmEvent;
|
||||
use libp2p::{PeerId, Swarm};
|
||||
use std::collections::HashMap;
|
||||
@ -81,7 +82,7 @@ impl EventLoop {
|
||||
}
|
||||
|
||||
pub async fn run(mut self) {
|
||||
match self.swarm.dial(&self.alice_peer_id) {
|
||||
match self.swarm.dial(DialOpts::from(self.alice_peer_id)) {
|
||||
Ok(()) => {}
|
||||
Err(e) => {
|
||||
tracing::error!("Failed to initiate dial to Alice: {}", e);
|
||||
@ -167,12 +168,13 @@ impl EventLoop {
|
||||
tracing::info!("Successfully closed connection to Alice");
|
||||
return;
|
||||
}
|
||||
SwarmEvent::UnreachableAddr { peer_id, address, attempts_remaining, error } if peer_id == self.alice_peer_id && attempts_remaining == 0 => {
|
||||
tracing::warn!(%address, "Failed to dial Alice: {}", error);
|
||||
SwarmEvent::OutgoingConnectionError { peer_id, error } if matches!(peer_id, Some(alice_peer_id) if alice_peer_id == self.alice_peer_id) => {
|
||||
tracing::warn!( "Failed to dial Alice: {}", error);
|
||||
|
||||
if let Some(duration) = self.swarm.behaviour_mut().redial.until_next_redial() {
|
||||
tracing::info!("Next redial attempt in {}s", duration.as_secs());
|
||||
}
|
||||
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ use futures::StreamExt;
|
||||
use libp2p::multiaddr::Protocol;
|
||||
use libp2p::ping::{Ping, PingConfig, PingEvent};
|
||||
use libp2p::request_response::{RequestResponseEvent, RequestResponseMessage};
|
||||
use libp2p::swarm::dial_opts::DialOpts;
|
||||
use libp2p::swarm::SwarmEvent;
|
||||
use libp2p::{identity, rendezvous, Multiaddr, PeerId, Swarm};
|
||||
use serde::Serialize;
|
||||
@ -43,7 +44,7 @@ pub async fn list_sellers(
|
||||
.quote
|
||||
.add_address(&rendezvous_node_peer_id, rendezvous_node_addr.clone());
|
||||
swarm
|
||||
.dial(&rendezvous_node_peer_id)
|
||||
.dial(DialOpts::from(rendezvous_node_peer_id))
|
||||
.context("Failed to dial rendezvous node")?;
|
||||
|
||||
let event_loop = EventLoop::new(
|
||||
@ -164,30 +165,42 @@ impl EventLoop {
|
||||
self.reachable_asb_address.insert(peer_id, address.clone());
|
||||
}
|
||||
}
|
||||
SwarmEvent::UnreachableAddr { peer_id, error, address, .. } => {
|
||||
if address == self.rendezvous_addr {
|
||||
SwarmEvent::OutgoingConnectionError { peer_id, error } => {
|
||||
if let Some(peer_id_from_error) = peer_id {
|
||||
|
||||
if &peer_id_from_error == &self.rendezvous_peer_id {
|
||||
tracing::error!(
|
||||
"Failed to connect to rendezvous point at {}: {}",
|
||||
address,
|
||||
&self.rendezvous_addr,
|
||||
error
|
||||
);
|
||||
|
||||
// if the rendezvous node is unreachable we just stop
|
||||
return Vec::new();
|
||||
} else {
|
||||
tracing::debug!(
|
||||
"Failed to connect to peer at {}: {}",
|
||||
address,
|
||||
tracing::error!(
|
||||
"You connected to the wrong Peer: {} Error: {}",
|
||||
&peer_id_from_error,
|
||||
error
|
||||
);
|
||||
self.unreachable_asb_address.insert(peer_id, address.clone());
|
||||
// if for some reason the peer is not the same it will return empty too.
|
||||
// this is just for the CLI to not get stuck
|
||||
return Vec::new();
|
||||
}
|
||||
} else {
|
||||
tracing::debug!(
|
||||
"Failed to connect to peer at {}: {}",
|
||||
&self.rendezvous_addr,
|
||||
error
|
||||
);
|
||||
self.unreachable_asb_address.insert(self.rendezvous_peer_id, self.rendezvous_addr.clone());
|
||||
|
||||
match self.asb_quote_status.entry(peer_id) {
|
||||
match self.asb_quote_status.entry(self.rendezvous_peer_id) {
|
||||
Entry::Occupied(mut entry) => {
|
||||
entry.insert(QuoteStatus::Received(Status::Unreachable));
|
||||
},
|
||||
_ => {
|
||||
tracing::debug!(%peer_id, %error, "Connection error with unexpected peer")
|
||||
tracing::debug!(%self.rendezvous_peer_id, %error, "Connection error with unexpected peer")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ impl GetConfig for Mainnet {
|
||||
Config {
|
||||
bitcoin_lock_mempool_timeout: 3.std_minutes(),
|
||||
bitcoin_lock_confirmed_timeout: 2.std_hours(),
|
||||
bitcoin_finality_confirmations: 2,
|
||||
bitcoin_finality_confirmations: 1,
|
||||
bitcoin_avg_block_time: 10.std_minutes(),
|
||||
bitcoin_cancel_timelock: CancelTimelock::new(72),
|
||||
bitcoin_punish_timelock: PunishTimelock::new(72),
|
||||
@ -65,7 +65,7 @@ impl GetConfig for Testnet {
|
||||
Config {
|
||||
bitcoin_lock_mempool_timeout: 3.std_minutes(),
|
||||
bitcoin_lock_confirmed_timeout: 1.std_hours(),
|
||||
bitcoin_finality_confirmations: 2,
|
||||
bitcoin_finality_confirmations: 1,
|
||||
bitcoin_avg_block_time: 10.std_minutes(),
|
||||
bitcoin_cancel_timelock: CancelTimelock::new(12),
|
||||
bitcoin_punish_timelock: PunishTimelock::new(6),
|
||||
|
@ -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";
|
||||
|
@ -4,8 +4,9 @@ use backoff::ExponentialBackoff;
|
||||
use futures::future::FutureExt;
|
||||
use libp2p::core::connection::ConnectionId;
|
||||
use libp2p::core::Multiaddr;
|
||||
use libp2p::swarm::dial_opts::{DialOpts, PeerCondition};
|
||||
use libp2p::swarm::protocols_handler::DummyProtocolsHandler;
|
||||
use libp2p::swarm::{DialPeerCondition, NetworkBehaviour, NetworkBehaviourAction, PollParameters};
|
||||
use libp2p::swarm::{NetworkBehaviour, NetworkBehaviourAction, PollParameters};
|
||||
use libp2p::PeerId;
|
||||
use std::pin::Pin;
|
||||
use std::task::{Context, Poll};
|
||||
@ -112,9 +113,10 @@ impl NetworkBehaviour for Behaviour {
|
||||
|
||||
self.sleep = Some(Box::pin(tokio::time::sleep(next_dial_in)));
|
||||
|
||||
Poll::Ready(NetworkBehaviourAction::DialPeer {
|
||||
peer_id: self.peer,
|
||||
condition: DialPeerCondition::Disconnected,
|
||||
Poll::Ready(NetworkBehaviourAction::Dial {
|
||||
opts: DialOpts::peer_id(self.peer)
|
||||
.condition(PeerCondition::Disconnected)
|
||||
.build(),
|
||||
handler: Self::ProtocolsHandler::default(),
|
||||
})
|
||||
}
|
||||
|
@ -27,3 +27,13 @@ impl From<XmrBtcNamespace> for Namespace {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl XmrBtcNamespace {
|
||||
pub fn from_is_testnet(testnet: bool) -> XmrBtcNamespace {
|
||||
if testnet {
|
||||
XmrBtcNamespace::Testnet
|
||||
} else {
|
||||
XmrBtcNamespace::Mainnet
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -16,14 +16,15 @@ pub fn asb<LR>(
|
||||
latest_rate: LR,
|
||||
resume_only: bool,
|
||||
env_config: env::Config,
|
||||
rendezvous_params: Option<(Multiaddr, XmrBtcNamespace)>,
|
||||
namespace: XmrBtcNamespace,
|
||||
rendezvous_point: Option<Multiaddr>,
|
||||
) -> Result<Swarm<asb::Behaviour<LR>>>
|
||||
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,
|
||||
);
|
||||
|
||||
|
@ -129,8 +129,9 @@ where
|
||||
<T as NetworkBehaviour>::OutEvent: Debug,
|
||||
{
|
||||
let addr_to_dial = other.external_addresses().next().unwrap().addr.clone();
|
||||
let local_peer_id = *other.local_peer_id();
|
||||
|
||||
self.dial_addr(addr_to_dial.clone()).unwrap();
|
||||
self.dial(addr_to_dial).unwrap();
|
||||
|
||||
let mut dialer_done = false;
|
||||
let mut listener_done = false;
|
||||
@ -144,8 +145,8 @@ where
|
||||
SwarmEvent::ConnectionEstablished { .. } => {
|
||||
dialer_done = true;
|
||||
}
|
||||
SwarmEvent::UnknownPeerUnreachableAddr { address, error } if address == addr_to_dial => {
|
||||
panic!("Failed to dial address {}: {}", addr_to_dial, error)
|
||||
SwarmEvent::OutgoingConnectionError { peer_id, error } if matches!(peer_id, Some(alice_peer_id) if alice_peer_id == local_peer_id) => {
|
||||
panic!("Failed to dial address {}: {}", peer_id.unwrap(), error)
|
||||
}
|
||||
other => {
|
||||
tracing::debug!("Ignoring {:?}", other);
|
||||
|
@ -60,6 +60,28 @@ impl Transport for TorDialOnlyTransport {
|
||||
fn address_translation(&self, _: &Multiaddr, _: &Multiaddr) -> Option<Multiaddr> {
|
||||
None
|
||||
}
|
||||
fn dial_as_listener(self, addr: Multiaddr) -> Result<Self::Dial, TransportError<Self::Error>> {
|
||||
let address = TorCompatibleAddress::from_multiaddr(Cow::Borrowed(&addr))?;
|
||||
|
||||
if address.is_certainly_not_reachable_via_tor_daemon() {
|
||||
return Err(TransportError::MultiaddrNotSupported(addr));
|
||||
}
|
||||
|
||||
let dial_future = async move {
|
||||
tracing::debug!(address = %addr, "Establishing connection through Tor proxy");
|
||||
|
||||
let stream =
|
||||
Socks5Stream::connect((Ipv4Addr::LOCALHOST, self.socks_port), address.to_string())
|
||||
.await
|
||||
.map_err(|e| io::Error::new(io::ErrorKind::ConnectionRefused, e))?;
|
||||
|
||||
tracing::debug!("Connection through Tor established");
|
||||
|
||||
Ok(TcpStream(stream.into_inner()))
|
||||
};
|
||||
|
||||
Ok(dial_future.boxed())
|
||||
}
|
||||
}
|
||||
|
||||
/// Represents an address that is _compatible_ with Tor, i.e. can be resolved by
|
||||
|
@ -659,8 +659,7 @@ impl State6 {
|
||||
|
||||
pub async fn publish_refund_btc(&self, bitcoin_wallet: &bitcoin::Wallet) -> Result<()> {
|
||||
let signed_tx_refund = self.signed_refund_transaction()?;
|
||||
let (_, subscription) = bitcoin_wallet.broadcast(signed_tx_refund, "refund").await?;
|
||||
subscription.wait_until_final().await?;
|
||||
bitcoin_wallet.broadcast(signed_tx_refund, "refund").await?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
@ -278,9 +278,12 @@ async fn next_state(
|
||||
state.publish_refund_btc(bitcoin_wallet).await?;
|
||||
BobState::BtcRefunded(state)
|
||||
}
|
||||
ExpiredTimelocks::Punish => BobState::BtcPunished {
|
||||
tx_lock_id: state.tx_lock_id(),
|
||||
},
|
||||
ExpiredTimelocks::Punish => {
|
||||
tracing::info!("You have been punished for not refunding in time");
|
||||
BobState::BtcPunished {
|
||||
tx_lock_id: state.tx_lock_id(),
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
BobState::BtcRefunded(state4) => BobState::BtcRefunded(state4),
|
||||
|
@ -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());
|
||||
|
Loading…
x
Reference in New Issue
Block a user