From 70994c8546b27e22ae54765ad7302f44256d8e7e Mon Sep 17 00:00:00 2001 From: Jost Schulte Date: Mon, 11 Mar 2024 11:35:44 -0600 Subject: [PATCH] refactor!: adapt to new holochain websocket (#51) * ci: revert addition of main-rcs * ci: restore/save caches individually * refactor: adapt to new holochain websocket * test: do not fail fast * revert string url -> socket addr * refactor: increase admin ws default timeout to 2 mins * refactor: increase admin ws default timeout to 3 mins * refactor: change url string param to socket addr in websockets --- .github/workflows/test.yml | 46 ++- CHANGELOG.md | 1 + Cargo.lock | 570 ++++++++++++++++++----------------- Cargo.toml | 19 +- fixture/zomes/foo/Cargo.toml | 4 +- flake.lock | 32 +- src/admin_websocket.rs | 41 +-- src/app_agent_websocket.rs | 18 +- src/app_websocket.rs | 52 ++-- src/error.rs | 5 +- tests/admin.rs | 10 +- tests/app.rs | 8 +- tests/clone_cell.rs | 8 +- 13 files changed, 423 insertions(+), 391 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0d6dd68..e77e4ef 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,7 +3,7 @@ name: Test on: pull_request: push: - branches: [develop, main, main-rcs] + branches: [develop, main] env: CARGO_TERM_COLOR: always @@ -15,6 +15,7 @@ concurrency: jobs: test: strategy: + fail-fast: false matrix: os: [ubuntu-latest, macos-latest] runs-on: ${{ matrix.os }} @@ -30,35 +31,50 @@ jobs: with: name: holochain-ci - - name: Cache fixture - uses: actions/cache@v4 + - name: Install nix packages + run: nix develop -c $SHELL -c "holochain --version" + + - name: Restore fixture + uses: actions/cache/restore@v4 env: cache-name: fixture with: path: fixture/zomes/foo/target key: ${{ matrix.os }}-build-${{ env.cache-name }}-${{ hashFiles('fixture/zomes/foo/Cargo.lock') }} - - name: Cache client build - uses: actions/cache@v4 - if: always() - env: - cache-name: client - with: - path: target - key: ${{ matrix.os }}-cargo-${{ env.cache-name }}-${{ hashFiles('Cargo.lock') }} - - - name: Install nix packages - run: nix develop -c $SHELL -c "holochain --version" - - name: Build fixture run: nix develop -c $SHELL -c "./build-fixture.sh" + - name: Save fixture to cache + uses: actions/cache/save@v4 + env: + cache-name: fixture + with: + path: fixture/zomes/foo/target + key: ${{ matrix.os }}-build-${{ env.cache-name }}-${{ hashFiles('fixture/zomes/foo/Cargo.lock') }} + - name: Clean up nix files to prevent insufficient disk space run: nix-collect-garbage -d + - name: Restore client build + uses: actions/cache/restore@v4 + env: + cache-name: client + with: + path: target + key: ${{ matrix.os }}-cargo-${{ env.cache-name }}-${{ hashFiles('Cargo.lock') }} + - name: Build client run: cargo build -p holochain_client + - name: Save client build to cache + uses: actions/cache/save@v4 + env: + cache-name: client + with: + path: target + key: ${{ matrix.os }}-cargo-${{ env.cache-name }}-${{ hashFiles('Cargo.lock') }} + - name: Lint run: cargo clippy --all-features -- -D warnings diff --git a/CHANGELOG.md b/CHANGELOG.md index f8eb62e..dbf38e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Added ### Changed +- **BREAKING**: The underlying package `holochain_websocket` changed. All websockets in this client follow the new `connect` function and take a socket address that implements `ToSocketAddr` instead of a URL `String`. Examples for the new parameter are `"localhost:30000"` and `([127.0.0.1], 30000)`. See trait [`ToSocketAddr`](https://doc.rust-lang.org/std/net/trait.ToSocketAddrs.html#tymethod.to_socket_addrs). ### Fixed ### Removed diff --git a/Cargo.lock b/Cargo.lock index 76711ae..aac3bec 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -74,9 +74,9 @@ dependencies = [ [[package]] name = "ahash" -version = "0.8.10" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b79b82693f705137f8fb9b37871d99e4f9a7df12b917eed79c3d3954830a60b" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if 1.0.0", "getrandom 0.2.12", @@ -96,9 +96,9 @@ dependencies = [ [[package]] name = "aitia" -version = "0.2.0-beta-dev.4" +version = "0.2.0-beta-dev.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b7727811da0629a829afd06fa888685c2dc209bea3ade3f58351ac73c5a20a7" +checksum = "361de711e26de0bd918ceea7e5bdd2bb2ecac74dc8169cc4a848e993304d8890" dependencies = [ "anyhow", "derive_more", @@ -538,9 +538,9 @@ dependencies = [ [[package]] name = "backon" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c79c8ef183b8b663e8cb19cf92fb7d98c56739977bd47eae2de2717bd5de2c2c" +checksum = "c491fa80d69c03084223a4e73c378dd9f9a1e612eb54051213f88b2d5249b458" dependencies = [ "fastrand 2.0.1", "futures-core", @@ -713,9 +713,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.15.3" +version = "3.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea184aa71bb362a1157c896979544cc23974e08fd265f29ea96b59f0b4a555b" +checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa" [[package]] name = "bytecheck" @@ -818,10 +818,11 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.88" +version = "1.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02f341c093d19155a6e41631ce5971aac4e9a868262212153124c15fa22d1cdc" +checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" dependencies = [ + "jobserver", "libc", ] @@ -855,9 +856,9 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.34" +version = "0.4.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bc015644b92d5890fab7489e49d21f879d5c990186827d42ec511919404f38b" +checksum = "8eaf5903dcbc0a39312feb77df2ff4c76387d591b9fc7b04a238dcf8bb62639a" dependencies = [ "android-tzdata", "iana-time-zone", @@ -895,9 +896,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.1" +version = "4.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c918d541ef2913577a0f9566e9ce27cb35b6df072075769e0b26cb5a554520da" +checksum = "b230ab84b0ffdf890d5a10abdbc8b83ae1c4918275daea1ab8801f71536b2651" dependencies = [ "clap_builder", "clap_derive", @@ -905,9 +906,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.1" +version = "4.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f3e7391dad68afb0c2ede1bf619f579a3dc9c2ec67f089baa397123a2f3d1eb" +checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" dependencies = [ "anstream", "anstyle", @@ -1895,9 +1896,9 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "fixt" -version = "0.3.0-beta-dev.1" +version = "0.3.0-beta-dev.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e3aad400ffc4383425f55f1f035a1f5ab4474853276167db1b385de3f28a8e6" +checksum = "a05f34f3e013b62b7214ec62fca3d668e0e0b0836855280a036cd678e9750b20" dependencies = [ "holochain_serialized_bytes", "lazy_static", @@ -2208,16 +2209,6 @@ dependencies = [ "tracing-futures", ] -[[package]] -name = "ghost_actor" -version = "0.4.0-alpha.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52cb0746ab4cf003d75cdbaaae2cf95139ec9607ae46bd5c68721bda2ca0c824" -dependencies = [ - "futures", - "tracing", -] - [[package]] name = "gimli" version = "0.26.2" @@ -2275,8 +2266,8 @@ dependencies = [ "futures-core", "futures-sink", "futures-util", - "http", - "indexmap 2.2.4", + "http 0.2.12", + "indexmap 2.2.5", "slab", "tokio", "tokio-util", @@ -2308,7 +2299,7 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ - "ahash 0.8.10", + "ahash 0.8.11", ] [[package]] @@ -2317,7 +2308,7 @@ version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" dependencies = [ - "ahash 0.8.10", + "ahash 0.8.11", "allocator-api2", ] @@ -2347,9 +2338,9 @@ dependencies = [ [[package]] name = "hc_sleuth" -version = "0.2.0-beta-dev.7" +version = "0.2.0-beta-dev.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f300f336046513296e815584a02dd89ef842092cff7070fe28a5bb5fd1b69d2" +checksum = "1ba995e5a3a4e3194b34d998f0e0843ed92629d432e0c9dd8a0be3a757fa6b3d" dependencies = [ "aitia", "anyhow", @@ -2370,9 +2361,9 @@ dependencies = [ [[package]] name = "hdi" -version = "0.4.0-beta-dev.28" +version = "0.4.0-beta-dev.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f4429629b6ad49e1dcf225e4e39eff8bf461843f96a996878cb1ad5fe546b6" +checksum = "c31dfc1fec80d7d9292e04e26e94528b0a0cc9baf982d1fb18e3af3e7625cb90" dependencies = [ "getrandom 0.2.12", "hdk_derive", @@ -2388,9 +2379,9 @@ dependencies = [ [[package]] name = "hdk" -version = "0.3.0-beta-dev.32" +version = "0.3.0-beta-dev.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b9388c15ea758b687d4c5348354636306a8ca6867bc40b3fc8525901fb96735" +checksum = "99a6ccefa8f3aa8cd8a0f7ab40f3939610133bd32a14785d4d62440f92ab6a11" dependencies = [ "getrandom 0.2.12", "hdi", @@ -2408,9 +2399,9 @@ dependencies = [ [[package]] name = "hdk_derive" -version = "0.3.0-beta-dev.26" +version = "0.3.0-beta-dev.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36e4d54bf7b14580cac156b1cb22480b59972df2ebaed56f1375f39cdf8ded6a" +checksum = "fcfd466d96f2d19530b1419646b0a52c3bc833b0e7dacad4329cb90708db8665" dependencies = [ "darling 0.14.4", "heck 0.4.1", @@ -2431,7 +2422,7 @@ dependencies = [ "base64 0.21.7", "bytes", "headers-core", - "http", + "http 0.2.12", "httpdate", "mime", "sha1", @@ -2443,7 +2434,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7f66481bfee273957b1f20485a4ff3362987f85b2c236580d81b4eb7a326429" dependencies = [ - "http", + "http 0.2.12", ] [[package]] @@ -2499,9 +2490,9 @@ dependencies = [ [[package]] name = "holo_hash" -version = "0.3.0-beta-dev.22" +version = "0.3.0-beta-dev.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8775ba0e9b8ebbbe089794c399cb6acd659f8213261fdee0febc2f4fff229d4" +checksum = "050e53c0258e6235145fe949b74cedd48c24f4d92e1e7b7e39581a9a2b6996e7" dependencies = [ "arbitrary", "base64 0.13.1", @@ -2525,9 +2516,9 @@ dependencies = [ [[package]] name = "holochain" -version = "0.3.0-beta-dev.38" +version = "0.3.0-beta-dev.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76a5e0f8f8840ea26033fe585a7b414297b0f82691159b903667185d7c0d8f99" +checksum = "0e17f5a4135fe8b3bde1a7c9077957a6d0b9a9bb3699593180154ebca7b6a032" dependencies = [ "aitia", "anyhow", @@ -2550,7 +2541,7 @@ dependencies = [ "futures", "get_if_addrs", "getrandom 0.2.12", - "ghost_actor 0.3.0-alpha.6", + "ghost_actor", "hc_sleuth", "hdk", "holo_hash", @@ -2634,9 +2625,9 @@ dependencies = [ [[package]] name = "holochain_cascade" -version = "0.3.0-beta-dev.37" +version = "0.3.0-beta-dev.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a805507ac3c892f20350ba61b8d9a7d80ea00165e3861f7459af0d3cdf4dbc16" +checksum = "fd5458dc0c17d419adc76095465e72811d8ed95e1d8df55795d38b236204dd6f" dependencies = [ "async-trait", "derive_more", @@ -2644,7 +2635,7 @@ dependencies = [ "fallible-iterator", "fixt", "futures", - "ghost_actor 0.3.0-alpha.6", + "ghost_actor", "hdk", "hdk_derive", "holo_hash", @@ -2679,7 +2670,6 @@ dependencies = [ "async-trait", "ed25519-dalek 2.1.1", "event-emitter-rs", - "futures", "holo_hash", "holochain", "holochain_conductor_api", @@ -2694,14 +2684,13 @@ dependencies = [ "rand 0.8.5", "serde", "tokio", - "url 2.5.0", ] [[package]] name = "holochain_conductor_api" -version = "0.3.0-beta-dev.37" +version = "0.3.0-beta-dev.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4857069b40dc3988f93a3629fc022891acf56a4d32ff6fa60d8b1c8949afaf7e" +checksum = "1ac28f924e24cf9276b7b66140a76b1e9a01bb0cb81ef7b6a4820363c78cd436" dependencies = [ "derive_more", "directories", @@ -2725,9 +2714,9 @@ dependencies = [ [[package]] name = "holochain_conductor_services" -version = "0.2.0-beta-dev.8" +version = "0.2.0-beta-dev.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45da56ae35c5fdb3f13e744f7a7ae1c7ca65b3dcc6862416054a7fb5376b0739" +checksum = "8c13a9426f1d135582a3d909814557eafd868d5a3628d61d3f590a9e59424c37" dependencies = [ "anyhow", "async-trait", @@ -2743,9 +2732,9 @@ dependencies = [ [[package]] name = "holochain_integrity_types" -version = "0.3.0-beta-dev.26" +version = "0.3.0-beta-dev.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7508886f8c4f7e3d03634e62094200bd1361210a2c73491a8b3211588b71bd64" +checksum = "3a76306ea0c825e6bc8f040df4a3fe1ab82f187c108a91e81df957ae4f76efda" dependencies = [ "arbitrary", "derive_builder", @@ -2766,9 +2755,9 @@ dependencies = [ [[package]] name = "holochain_keystore" -version = "0.3.0-beta-dev.29" +version = "0.3.0-beta-dev.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7287531357a0756dfcf400c3a87b3b7c354a591a58cb0887f448da00978de46" +checksum = "db732e26f52b77e71f10bc6424b397a2891da75a7e956070be21772e996a183e" dependencies = [ "base64 0.13.1", "derive_more", @@ -2795,9 +2784,9 @@ dependencies = [ [[package]] name = "holochain_metrics" -version = "0.3.0-beta-dev.8" +version = "0.3.0-beta-dev.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b78c3e37ed8f53aff7eab740754b7384194cf5539c4e7525bdeff76d884930a" +checksum = "37a65c793858a03b5272e3408bc216cfdd0a21129a3e05fe0bee43ec6d37f0ce" dependencies = [ "influxive", "opentelemetry_api", @@ -2808,9 +2797,9 @@ dependencies = [ [[package]] name = "holochain_nonce" -version = "0.3.0-beta-dev.24" +version = "0.3.0-beta-dev.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54cb17e2abda28da552adea75f02b06c3b14a0e52376bc1823d3ceee9e2345a9" +checksum = "c1fa99c5d38bb8fe463dd0284e2123ad14405f2a62146c4aaa809d5b24134711" dependencies = [ "getrandom 0.2.12", "holochain_secure_primitive", @@ -2819,16 +2808,16 @@ dependencies = [ [[package]] name = "holochain_p2p" -version = "0.3.0-beta-dev.36" +version = "0.3.0-beta-dev.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67977d97cb7251f911424ecc72287ae6a03822ee4898c822ff11bb05def6f972" +checksum = "e4824866996d6cbc277ce61adb7341de974b67132d98e0e093bac10e11974f77" dependencies = [ "aitia", "async-trait", "derive_more", "fixt", "futures", - "ghost_actor 0.3.0-alpha.6", + "ghost_actor", "hc_sleuth", "holo_hash", "holochain_keystore", @@ -2852,9 +2841,9 @@ dependencies = [ [[package]] name = "holochain_secure_primitive" -version = "0.3.0-beta-dev.21" +version = "0.3.0-beta-dev.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0ae856ba625c5609e536456461463d13607eda623f7cc4e4b3a54dbb43ac052" +checksum = "dcc25ba91f7898688245db538693d7b26504f91df24709111bb3b1d7506af01a" dependencies = [ "paste", "serde", @@ -2891,9 +2880,9 @@ dependencies = [ [[package]] name = "holochain_sqlite" -version = "0.3.0-beta-dev.34" +version = "0.3.0-beta-dev.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b521f1bffea7e037d26747596efa3bc0961a76ad9c204a219726dd756c92488" +checksum = "93d5ff0f25f26914552c14a91744babbabcbc3d1d55c0cea51e63ae2075a95ca" dependencies = [ "anyhow", "async-trait", @@ -2936,9 +2925,9 @@ dependencies = [ [[package]] name = "holochain_state" -version = "0.3.0-beta-dev.36" +version = "0.3.0-beta-dev.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfb7692a09b3a19f829d88cc2c61ab6949b37661bb725a91839d42271d31852a" +checksum = "6cf0fea28fc15c5aeaed396cf285bf122d77d5cf65a6307523595b3a1ac08da8" dependencies = [ "aitia", "async-recursion", @@ -2981,9 +2970,9 @@ dependencies = [ [[package]] name = "holochain_state_types" -version = "0.3.0-beta-dev.33" +version = "0.3.0-beta-dev.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e3753669665ea1271ff3a18bb41fba3d0148a976edab4c202bee1059d4c6bf8" +checksum = "025c62656b1ff2dea34f711d77f7410a885d53f7a197f2783765a4e626acc04e" dependencies = [ "holo_hash", "holochain_integrity_types", @@ -2992,9 +2981,9 @@ dependencies = [ [[package]] name = "holochain_test_wasm_common" -version = "0.3.0-beta-dev.32" +version = "0.3.0-beta-dev.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "552b7675a8f37d8490769abe7565444a93a36d5e94f9cc49854d5b2348dc4a5c" +checksum = "838d7b0ece7b0aa1bf0efd3b4ee5646c158c2eba4b022074914ec6ce972d53f5" dependencies = [ "hdk", "serde", @@ -3002,9 +2991,9 @@ dependencies = [ [[package]] name = "holochain_trace" -version = "0.3.0-beta-dev.6" +version = "0.3.0-beta-dev.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70f32929393eb74339c5ab1a4cfcde33d4b77ebaa1feceb02c851640170e6aaa" +checksum = "4b7a5fcca77738957ac4619743f0bd761468057bf3be49852153ee0d5d2bb708" dependencies = [ "chrono", "derive_more", @@ -3020,9 +3009,9 @@ dependencies = [ [[package]] name = "holochain_types" -version = "0.3.0-beta-dev.34" +version = "0.3.0-beta-dev.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48237d704634ccfc7e337f1cd9136dcde386f8ef1c2820720c77643094da51af" +checksum = "40515fd0eef3af0aac447dc3881656a686c34c73ff25afbbcc9e8ab00993b145" dependencies = [ "anyhow", "arbitrary", @@ -3081,9 +3070,9 @@ dependencies = [ [[package]] name = "holochain_util" -version = "0.3.0-beta-dev.4" +version = "0.3.0-beta-dev.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6be1f887f88ecb44975694b2d46c3a1ad4840e009d56f7be54c3af3f2d60b931" +checksum = "14d6225aded80caf004c2214e38b39fb2459ee9a7a8fcd0d09146f49ae0771f0" dependencies = [ "backtrace", "cfg-if 0.1.10", @@ -3100,9 +3089,9 @@ dependencies = [ [[package]] name = "holochain_wasm_test_utils" -version = "0.3.0-beta-dev.35" +version = "0.3.0-beta-dev.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d624a9549581d7d6bb6e0dcb47e089a4bc65d2d0286714fbe6b60b19bbdcae2" +checksum = "0ada8f35eed0e0c83c0e021f8ade588d8d2fd7a47a2b51210d683234755b4807" dependencies = [ "holochain_types", "holochain_util", @@ -3161,34 +3150,24 @@ dependencies = [ [[package]] name = "holochain_websocket" -version = "0.3.0-beta-dev.14" +version = "0.3.0-beta-dev.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "744892bdd8ad2050e9a4a4f0ba1a23ee2a4e08d22ea8221f1144ba4a94b5b3d5" +checksum = "0195ee3c2ba62d5d6b905b287edb618528f9b75274a463072459c9da784b2c2f" dependencies = [ "futures", - "ghost_actor 0.4.0-alpha.5", "holochain_serialized_bytes", - "must_future", - "nanoid 0.3.0", - "net2", "serde", "serde_bytes", - "stream-cancel", - "thiserror", "tokio", - "tokio-stream", - "tokio-tungstenite 0.13.0", + "tokio-tungstenite 0.21.0", "tracing", - "tracing-futures", - "tungstenite 0.12.0", - "url2", ] [[package]] name = "holochain_zome_types" -version = "0.3.0-beta-dev.28" +version = "0.3.0-beta-dev.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80857b41991c430a5bf10ba54215712d990f70604610f3cc1582cce4611c7d10" +checksum = "c1d1b165dcf3d1ae412edf952b1ae4e57a5b5c4a97c11eb97b5fb4fdf06cc6a4" dependencies = [ "arbitrary", "contrafact", @@ -3246,9 +3225,20 @@ dependencies = [ [[package]] name = "http" -version = "0.2.11" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" dependencies = [ "bytes", "fnv", @@ -3262,7 +3252,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", - "http", + "http 0.2.12", "pin-project-lite", ] @@ -3305,7 +3295,7 @@ dependencies = [ "futures-core", "futures-util", "h2", - "http", + "http 0.2.12", "http-body", "httparse", "httpdate", @@ -3320,15 +3310,16 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.23.2" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ - "http", + "futures-util", + "http 0.2.12", "hyper", - "rustls 0.20.9", + "rustls 0.21.10", "tokio", - "tokio-rustls", + "tokio-rustls 0.24.1", ] [[package]] @@ -3442,9 +3433,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.4" +version = "2.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "967d6dd42f16dbf0eb8040cb9e477933562684d3918f7d253f2ff9087fb3e7a3" +checksum = "7b0b929d511467233429c45a44ac1dcaa21ba0f5ba11e4879e6ed28ddb4f9df4" dependencies = [ "equivalent", "hashbrown 0.14.3", @@ -3456,13 +3447,13 @@ version = "0.11.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "321f0f839cd44a4686e9504b0a62b4d69a50b62072144c71c68f5873c167b8d9" dependencies = [ - "ahash 0.8.10", - "clap 4.5.1", + "ahash 0.8.11", + "clap 4.5.2", "crossbeam-channel", "crossbeam-utils", "dashmap 5.5.3", "env_logger", - "indexmap 2.2.4", + "indexmap 2.2.5", "is-terminal", "itoa", "log", @@ -3481,7 +3472,7 @@ checksum = "601aa12a5876c044ea2a94a9443d0f086e6fc1f7bb4264bd7120e63c1462d1c8" dependencies = [ "chrono", "futures-util", - "http", + "http 0.2.12", "lazy_static", "regex", "reqwest", @@ -3585,15 +3576,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "input_buffer" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f97967975f448f1a7ddb12b0bc41069d09ed6a1c161a92687e057325db35d413" -dependencies = [ - "bytes", -] - [[package]] name = "instant" version = "0.1.12" @@ -3718,20 +3700,29 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" +[[package]] +name = "jobserver" +version = "0.1.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab46a6e9526ddef3ae7f787c06f0f2600639ba80ea3eade3d8e670a2230f51d6" +dependencies = [ + "libc", +] + [[package]] name = "js-sys" -version = "0.3.68" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "406cda4b368d531c842222cf9d2600a9a4acce8d29423695379c6868a143a9ee" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" dependencies = [ "wasm-bindgen", ] [[package]] name = "kitsune_p2p" -version = "0.3.0-beta-dev.31" +version = "0.3.0-beta-dev.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf040944a2caa9820c53c1281fc5fc8d1cec34f3c05bb62e20a7c40e564d858e" +checksum = "21ef9c61bf50f75121c2471267d553f7ef13a757b0e51c23a38251628d83baf4" dependencies = [ "arrayref", "base64 0.21.7", @@ -3741,7 +3732,7 @@ dependencies = [ "derive_more", "fixt", "futures", - "ghost_actor 0.3.0-alpha.6", + "ghost_actor", "governor", "holochain_trace", "itertools 0.11.0", @@ -3776,9 +3767,9 @@ dependencies = [ [[package]] name = "kitsune_p2p_bin_data" -version = "0.3.0-beta-dev.16" +version = "0.3.0-beta-dev.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe2bc530cd368de90546ff0cc3d53c321834b91c5a1bd4d67518222339f1a95c" +checksum = "9c89fb7f069f4a90794dff2669cc832a71c9fd93554e92b0f17de97d753283f4" dependencies = [ "arbitrary", "base64 0.13.1", @@ -3795,9 +3786,9 @@ dependencies = [ [[package]] name = "kitsune_p2p_block" -version = "0.3.0-beta-dev.18" +version = "0.3.0-beta-dev.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76c69802ed069a0cd074f100df770840adca5a33c218eff3b03ac1366bc56a59" +checksum = "a32470626b779dd5e36e516d64f8bdde1eac1faec944654d2b85f200b0ac3cee" dependencies = [ "kitsune_p2p_bin_data", "kitsune_p2p_timestamp", @@ -3806,11 +3797,11 @@ dependencies = [ [[package]] name = "kitsune_p2p_bootstrap" -version = "0.2.0-beta-dev.21" +version = "0.2.0-beta-dev.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "705907be42b52c0d1e608b2eb3974b5722cfe74dd6c5e1b4a1493f82e229f3a6" +checksum = "9b9b206e371f9ff2e951bfdb4cf4228c1c1c6d54e46df4f3e733b3cb7950e500" dependencies = [ - "clap 4.5.1", + "clap 4.5.2", "futures", "kitsune_p2p_bin_data", "kitsune_p2p_types", @@ -3826,9 +3817,9 @@ dependencies = [ [[package]] name = "kitsune_p2p_bootstrap_client" -version = "0.3.0-beta-dev.27" +version = "0.3.0-beta-dev.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0c5528ad3f1710db65bf8e4033a8c9d322b746ce4a1fd1a521f45f927c3338b" +checksum = "c17816778c98f5156475fa6a994b3e9a68fadb4183654984148bfac7bc16ca4b" dependencies = [ "ed25519-dalek 1.0.1", "kitsune_p2p_bin_data", @@ -3844,9 +3835,9 @@ dependencies = [ [[package]] name = "kitsune_p2p_dht" -version = "0.3.0-beta-dev.17" +version = "0.3.0-beta-dev.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a621c87fc3707bb889c3a7430a6e53a8218d4bf71c9fcdbb55695fd827f7dc" +checksum = "b4b6c6664798fd5f34a9ee0cf4c7af16565891ad8f94a193c1468f4d5829f941" dependencies = [ "arbitrary", "colored", @@ -3869,9 +3860,9 @@ dependencies = [ [[package]] name = "kitsune_p2p_dht_arc" -version = "0.3.0-beta-dev.15" +version = "0.3.0-beta-dev.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c95e91172d17d87a9409d0e30b478f06e5f406a167d1fadde9f4fbac858b8c3" +checksum = "1aaba5f7fcb2c0b7faa3f859a3de5c4b893fbf9cfea51530549d11e9738fbfac" dependencies = [ "arbitrary", "derive_more", @@ -3887,13 +3878,13 @@ dependencies = [ [[package]] name = "kitsune_p2p_fetch" -version = "0.3.0-beta-dev.24" +version = "0.3.0-beta-dev.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "632c1a8f64d3b02f33ddb5c67c082da8374519a0f6c7d091601e1ada1b58c05a" +checksum = "c42d7a2d5c9f2d27ac88809f8e040d8856fb3e989abbb2dae981f32111a124c4" dependencies = [ "backon", "derive_more", - "indexmap 2.2.4", + "indexmap 2.2.5", "kitsune_p2p_timestamp", "kitsune_p2p_types", "serde", @@ -3903,9 +3894,9 @@ dependencies = [ [[package]] name = "kitsune_p2p_mdns" -version = "0.3.0-beta-dev.1" +version = "0.3.0-beta-dev.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e5a9fb5ba86891846d7896648cdf4f3fca943f5ee6f11257f9a433525882a99" +checksum = "432a37bef5d393debb90db429fce674603f761817652da8dae41033006047915" dependencies = [ "base64 0.21.7", "err-derive 0.3.1", @@ -3918,9 +3909,9 @@ dependencies = [ [[package]] name = "kitsune_p2p_proxy" -version = "0.3.0-beta-dev.21" +version = "0.3.0-beta-dev.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c42573db43ddb31426f1d07002b4ffcff381fb555d062c50ebed1a25dd808545" +checksum = "48a0106013d08267ea6e2398deae4c30733befd68704cbf37a401ef1f706df4f" dependencies = [ "base64 0.21.7", "derive_more", @@ -3936,9 +3927,9 @@ dependencies = [ [[package]] name = "kitsune_p2p_timestamp" -version = "0.3.0-beta-dev.7" +version = "0.3.0-beta-dev.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9bd32418f929b981aa54f217302ae03b1eb983f9bb688e2ff06bba40600fe4e" +checksum = "c4d587124090ca8e4ab28f3dd3d65aa35fcc72403b7dad4fc790751efd04fbe3" dependencies = [ "arbitrary", "chrono", @@ -3952,9 +3943,9 @@ dependencies = [ [[package]] name = "kitsune_p2p_transport_quic" -version = "0.3.0-beta-dev.21" +version = "0.3.0-beta-dev.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f78a1a7edf6c172014e617412d0e4caa82b0e4059c39b2b565317dff2f21ed24" +checksum = "16bd847614dd15575f66a6a841f1aa3b9eac1750dcc21d881e33deccbb2e6f95" dependencies = [ "blake2b_simd 1.0.2", "futures", @@ -3968,16 +3959,16 @@ dependencies = [ [[package]] name = "kitsune_p2p_types" -version = "0.3.0-beta-dev.21" +version = "0.3.0-beta-dev.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cd476bddfa2603da380e1308eee8fce27cd1b52368e397068dde52c083dba61" +checksum = "9c16710587d583bc82597b99c14aded83c317b8697e0e6a2333ba14012ce3830" dependencies = [ "arbitrary", "base64 0.21.7", "derive_more", "fixt", "futures", - "ghost_actor 0.3.0-alpha.6", + "ghost_actor", "holochain_trace", "kitsune_p2p_bin_data", "kitsune_p2p_dht", @@ -4097,12 +4088,12 @@ dependencies = [ [[package]] name = "libloading" -version = "0.8.1" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c571b676ddfc9a8c12f1f3d3085a7b163966a8fd8098a90640953ce5f6170161" +checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" dependencies = [ "cfg-if 1.0.0", - "windows-sys 0.48.0", + "windows-targets 0.52.4", ] [[package]] @@ -4369,9 +4360,9 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.10" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", "wasi 0.11.0+wasi-snapshot-preview1", @@ -4413,9 +4404,9 @@ checksum = "7843ec2de400bcbc6a6328c958dc38e5359da6e93e72e37bc5246bf1ae776389" [[package]] name = "mr_bundle" -version = "0.3.0-beta-dev.6" +version = "0.3.0-beta-dev.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1266ebffcd7e38c98abed6d8f4e09ef50c8e3fac7010471a5d861b1936c7af3" +checksum = "b57f5a7ac4af14c37915b66cb01ac7a981d6bbfedab3af9cce740f2718a028c9" dependencies = [ "arbitrary", "bytes", @@ -4445,7 +4436,7 @@ dependencies = [ "bytes", "encoding_rs", "futures-util", - "http", + "http 0.2.12", "httparse", "log", "memchr", @@ -4773,9 +4764,9 @@ dependencies = [ [[package]] name = "opaque-debug" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "openssl" @@ -5052,9 +5043,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.7" +version = "2.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "219c0dcc30b6a27553f9cc242972b67f75b60eb0db71f0b5462f38b058c41546" +checksum = "56f8023d0fb78c8e03784ea1c7f3fa36e68a723138990b8d5a47d916b651e7a8" dependencies = [ "memchr", "thiserror", @@ -5068,24 +5059,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap 2.2.4", + "indexmap 2.2.5", "quickcheck", ] [[package]] name = "pin-project" -version = "1.1.4" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0302c4a0442c456bd56f841aee5c3bfd17967563f6fadc9ceb9f9c23cf3807e0" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.4" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266c042b60c9c76b8d53061e52b2e0d1116abc57cefc8c5cd671619a56ac3690" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2 1.0.78", "quote 1.0.35", @@ -5815,7 +5806,7 @@ checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.5", + "regex-automata 0.4.6", "regex-syntax 0.8.2", ] @@ -5830,9 +5821,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" dependencies = [ "aho-corasick", "memchr", @@ -5874,9 +5865,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.11.17" +version = "0.11.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13293b639a097af28fc8a90f22add145a9c954e49d77da06263d58cf44d5fb91" +checksum = "c6920094eb85afde5e4a138be3f2de8bbdf28000f0029e72c45025a56b042251" dependencies = [ "base64 0.21.7", "bytes", @@ -5884,7 +5875,7 @@ dependencies = [ "futures-core", "futures-util", "h2", - "http", + "http 0.2.12", "http-body", "hyper", "hyper-rustls", @@ -5897,14 +5888,16 @@ dependencies = [ "once_cell", "percent-encoding 2.3.1", "pin-project-lite", - "rustls 0.20.9", + "rustls 0.21.10", "rustls-pemfile 1.0.4", "serde", "serde_json", "serde_urlencoded", + "sync_wrapper", + "system-configuration", "tokio", "tokio-native-tls", - "tokio-rustls", + "tokio-rustls 0.24.1", "tokio-util", "tower-service", "url 2.5.0", @@ -5912,7 +5905,7 @@ dependencies = [ "wasm-bindgen-futures", "wasm-streams", "web-sys", - "webpki-roots 0.22.6", + "webpki-roots 0.25.4", "winreg", ] @@ -6124,6 +6117,18 @@ dependencies = [ "webpki", ] +[[package]] +name = "rustls" +version = "0.21.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" +dependencies = [ + "log", + "ring 0.17.8", + "rustls-webpki 0.101.7", + "sct", +] + [[package]] name = "rustls" version = "0.22.2" @@ -6184,6 +6189,16 @@ dependencies = [ "untrusted 0.7.1", ] +[[package]] +name = "rustls-webpki" +version = "0.101.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring 0.17.8", + "untrusted 0.9.0", +] + [[package]] name = "rustls-webpki" version = "0.102.2" @@ -6400,7 +6415,7 @@ version = "1.0.114" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0" dependencies = [ - "indexmap 2.2.4", + "indexmap 2.2.5", "itoa", "ryu", "serde", @@ -6455,26 +6470,13 @@ version = "0.9.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fd075d994154d4a774f95b51fb96bdc2832b0ea48425c92546073816cda1f2f" dependencies = [ - "indexmap 2.2.4", + "indexmap 2.2.5", "itoa", "ryu", "serde", "unsafe-libyaml", ] -[[package]] -name = "sha-1" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" -dependencies = [ - "block-buffer 0.9.0", - "cfg-if 1.0.0", - "cpufeatures", - "digest 0.9.0", - "opaque-debug", -] - [[package]] name = "sha-1" version = "0.10.1" @@ -6739,17 +6741,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9091b6114800a5f2141aee1d1b9d6ca3592ac062dc5decb3764ec5895a47b4eb" -[[package]] -name = "stream-cancel" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f9fbf9bd71e4cf18d68a8a0951c0e5b7255920c0cd992c4ff51cddd6ef514a3" -dependencies = [ - "futures-core", - "pin-project", - "tokio", -] - [[package]] name = "strsim" version = "0.8.0" @@ -6910,6 +6901,12 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + [[package]] name = "synstructure" version = "0.12.6" @@ -6952,6 +6949,27 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "system-configuration" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "tap" version = "1.0.1" @@ -7068,7 +7086,7 @@ dependencies = [ "hex", "num-traits", "serde", - "sha-1 0.10.1", + "sha-1", "test-fuzz-internal", ] @@ -7246,30 +7264,25 @@ dependencies = [ ] [[package]] -name = "tokio-stream" -version = "0.1.14" +name = "tokio-rustls" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "futures-core", - "pin-project-lite", + "rustls 0.21.10", "tokio", - "tokio-util", ] [[package]] -name = "tokio-tungstenite" -version = "0.13.0" +name = "tokio-stream" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1a5f475f1b9d077ea1017ecbc60890fda8e54942d680ca0b1d2b47cfa2d861b" +checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" dependencies = [ - "futures-util", - "log", - "native-tls", - "pin-project", + "futures-core", + "pin-project-lite", "tokio", - "tokio-native-tls", - "tungstenite 0.12.0", + "tokio-util", ] [[package]] @@ -7283,7 +7296,7 @@ dependencies = [ "rustls 0.20.9", "rustls-native-certs", "tokio", - "tokio-rustls", + "tokio-rustls 0.23.4", "tungstenite 0.18.0", "webpki", ] @@ -7300,6 +7313,18 @@ dependencies = [ "tungstenite 0.20.1", ] +[[package]] +name = "tokio-tungstenite" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c83b561d025642014097b66e6c1bb422783339e0909e4429cde4749d1990bc38" +dependencies = [ + "futures-util", + "log", + "tokio", + "tungstenite 0.21.0", +] + [[package]] name = "tokio-util" version = "0.7.10" @@ -7362,7 +7387,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.2.4", + "indexmap 2.2.5", "serde", "serde_spanned", "toml_datetime", @@ -7375,7 +7400,7 @@ version = "0.22.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c1b5fd4128cc8d3e0cb74d4ed9a9cc7c7284becd4df68f5f940e1ad123606f6" dependencies = [ - "indexmap 2.2.4", + "indexmap 2.2.5", "serde", "serde_spanned", "toml_datetime", @@ -7500,55 +7525,54 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "tungstenite" -version = "0.12.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ada8297e8d70872fa9a551d93250a9f407beb9f37ef86494eb20012a2ff7c24" +checksum = "30ee6ab729cd4cf0fd55218530c4522ed30b7b6081752839b68fcec8d0960788" dependencies = [ "base64 0.13.1", "byteorder", "bytes", - "http", + "http 0.2.12", "httparse", - "input_buffer", "log", - "native-tls", "rand 0.8.5", - "sha-1 0.9.8", + "rustls 0.20.9", + "sha1", + "thiserror", "url 2.5.0", "utf-8", + "webpki", ] [[package]] name = "tungstenite" -version = "0.18.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30ee6ab729cd4cf0fd55218530c4522ed30b7b6081752839b68fcec8d0960788" +checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" dependencies = [ - "base64 0.13.1", "byteorder", "bytes", - "http", + "data-encoding", + "http 0.2.12", "httparse", "log", "rand 0.8.5", - "rustls 0.20.9", "sha1", "thiserror", "url 2.5.0", "utf-8", - "webpki", ] [[package]] name = "tungstenite" -version = "0.20.1" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" +checksum = "9ef1a641ea34f399a848dea702823bbecfb4c486f911735368f1f137cb8257e1" dependencies = [ "byteorder", "bytes", "data-encoding", - "http", + "http 1.1.0", "httparse", "log", "rand 0.8.5", @@ -7674,7 +7698,7 @@ dependencies = [ "sha2 0.10.8", "socket2 0.5.6", "tokio", - "tokio-rustls", + "tokio-rustls 0.23.4", "tokio-tungstenite 0.18.0", "tracing", "tx5-core", @@ -7688,7 +7712,7 @@ version = "0.0.7-alpha" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "283dcaaa1f389612615fed7d1844d459862d771e2c31c2d3137a34ab584519b5" dependencies = [ - "clap 4.5.1", + "clap 4.5.2", "dirs", "futures", "if-addrs 0.10.2", @@ -7968,9 +7992,9 @@ checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" [[package]] name = "walkdir" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" dependencies = [ "same-file", "winapi-util", @@ -7995,7 +8019,7 @@ dependencies = [ "futures-channel", "futures-util", "headers", - "http", + "http 0.2.12", "hyper", "log", "mime", @@ -8030,9 +8054,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1e124130aee3fb58c5bdd6b639a0509486b0338acaaae0c84a5124b0f588b7f" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" dependencies = [ "cfg-if 1.0.0", "wasm-bindgen-macro", @@ -8040,9 +8064,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9e7e1900c352b609c8488ad12639a311045f40a35491fb69ba8c12f758af70b" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" dependencies = [ "bumpalo", "log", @@ -8055,9 +8079,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.41" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877b9c3f61ceea0e56331985743b13f3d25c406a7098d45180fb5f09bc19ed97" +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" dependencies = [ "cfg-if 1.0.0", "js-sys", @@ -8067,9 +8091,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b30af9e2d358182b5c7449424f017eba305ed32a7010509ede96cdc4696c46ed" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" dependencies = [ "quote 1.0.35", "wasm-bindgen-macro-support", @@ -8077,9 +8101,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2 1.0.78", "quote 1.0.35", @@ -8090,9 +8114,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f186bd2dcf04330886ce82d6f33dd75a7bfcf69ecf5763b89fcde53b6ac9838" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] name = "wasm-encoder" @@ -8105,9 +8129,9 @@ dependencies = [ [[package]] name = "wasm-streams" -version = "0.2.3" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bbae3363c08332cadccd13b67db371814cd214c2524020932f0804b8cf7c078" +checksum = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129" dependencies = [ "futures-util", "js-sys", @@ -8305,9 +8329,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.68" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96565907687f7aceb35bc5fc03770a8a0471d82e479f25832f54a0e3f4b28446" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" dependencies = [ "js-sys", "wasm-bindgen", @@ -8325,21 +8349,18 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.22.6" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" +checksum = "b03058f88386e5ff5310d9111d53f48b17d732b401aeb83a8d5190f2ac459338" dependencies = [ - "webpki", + "rustls-webpki 0.100.3", ] [[package]] name = "webpki-roots" -version = "0.23.1" +version = "0.25.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b03058f88386e5ff5310d9111d53f48b17d732b401aeb83a8d5190f2ac459338" -dependencies = [ - "rustls-webpki 0.100.3", -] +checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] name = "webpki-roots" @@ -8673,11 +8694,12 @@ dependencies = [ [[package]] name = "winreg" -version = "0.10.1" +version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ - "winapi 0.3.9", + "cfg-if 1.0.0", + "windows-sys 0.48.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 9e08494..dc93119 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,29 +22,28 @@ again = "0.1" anyhow = "1.0" ed25519-dalek = { version = "2.1", features = ["rand_core"] } serde = "1.0.193" -url = "2.2" event-emitter-rs = "0.1" -futures = "0.3" rand = { version = "0.8" } async-trait = "0.1" parking_lot = "0.12.1" -holo_hash = { version = "0.3.0-beta-dev.20", features = ["encoding"] } -holochain_conductor_api = "0.3.0-beta-dev.34" -holochain_websocket = "0.3.0-beta-dev.11" +holo_hash = { version = "0.3.0-beta-dev.23", features = ["encoding"] } +holochain_conductor_api = "0.3.0-beta-dev.38" +holochain_websocket = "0.3.0-beta-dev.15" holochain_serialized_bytes = "0.0.53" -holochain_types = "0.3.0-beta-dev.31" -holochain_nonce = "0.3.0-beta-dev.22" +holochain_types = "0.3.0-beta-dev.35" +holochain_nonce = "0.3.0-beta-dev.25" holochain_zome_types = { workspace = true } lair_keystore_api = { version = "0.4.0", optional = true } +tokio = { version = "1.36", features = ["rt"] } + [dev-dependencies] arbitrary = "1.2" -holochain = { version = "0.3.0-beta-dev.38", features = ["test_utils"] } +holochain = { version = "0.3.0-beta-dev.39", features = ["test_utils"] } rand = "0.8" -tokio = { version = "1.3", features = ["full"] } -kitsune_p2p_types = "0.3.0-beta-dev.14" +kitsune_p2p_types = "0.3.0-beta-dev.21" [features] default = ["lair_signing"] diff --git a/fixture/zomes/foo/Cargo.toml b/fixture/zomes/foo/Cargo.toml index 2f2c782..9aadc30 100644 --- a/fixture/zomes/foo/Cargo.toml +++ b/fixture/zomes/foo/Cargo.toml @@ -9,6 +9,6 @@ crate-type = ["cdylib", "rlib"] name = "test_wasm_foo" [dependencies] -hdi = "0.4.0-beta-dev.25" -hdk = "0.3.0-beta-dev.29" +hdi = "0.4.0-beta-dev.29" +hdk = "0.3.0-beta-dev.33" serde = "1.0.193" diff --git a/flake.lock b/flake.lock index e9fe6a9..22b9c0d 100644 --- a/flake.lock +++ b/flake.lock @@ -141,16 +141,16 @@ "holochain": { "flake": false, "locked": { - "lastModified": 1709081329, - "narHash": "sha256-QP7WKySgEFbgNaSc7BNBBOWCVKuycXSp4HAfD4GTug8=", + "lastModified": 1709687030, + "narHash": "sha256-aaixbhm+R0urE900zRpIhHWQUOtQCP2gAAxz+jcx80s=", "owner": "holochain", "repo": "holochain", - "rev": "547c63a442e61be805887b644c78cf6f970d631b", + "rev": "cb671524080332983281baa2db7c1851344e79d2", "type": "github" }, "original": { "owner": "holochain", - "ref": "holochain-0.3.0-beta-dev.38", + "ref": "holochain-0.3.0-beta-dev.39", "repo": "holochain", "type": "github" } @@ -190,11 +190,11 @@ ] }, "locked": { - "lastModified": 1709620314, - "narHash": "sha256-d7vekpj538VqdDrChFbVQpSVGDMnU1nSksbSzacKvyM=", + "lastModified": 1709967512, + "narHash": "sha256-p/W6TEAGNhV3uANigkQlqmGLT1rhFVuwHzTiqqVG3zs=", "owner": "holochain", "repo": "holochain", - "rev": "392bdfd729fb6ce50f78f9e7f1c757dc392675f4", + "rev": "a29e8ca0aa1d333fb2a8c272265facb604c6da0f", "type": "github" }, "original": { @@ -254,11 +254,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1709479366, - "narHash": "sha256-n6F0n8UV6lnTZbYPl1A9q1BS0p4hduAv1mGAP17CVd0=", + "lastModified": 1709703039, + "narHash": "sha256-6hqgQ8OK6gsMu1VtcGKBxKQInRLHtzulDo9Z5jxHEFY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b8697e57f10292a6165a20f03d2f42920dfaf973", + "rev": "9df3e30ce24fd28c7b3e2de0d986769db5d6225d", "type": "github" }, "original": { @@ -332,11 +332,11 @@ ] }, "locked": { - "lastModified": 1709604635, - "narHash": "sha256-le4fwmWmjGRYWwkho0Gr7mnnZndOOe4XGbLw68OvF40=", + "lastModified": 1709950089, + "narHash": "sha256-JjZINymxtnDY9EDdxnVPideZvHPR2Cm/GdKAptCWLI4=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "e86c0fb5d3a22a5f30d7f64ecad88643fe26449d", + "rev": "d3a05d053b145349b8ad395741c5951f332280ef", "type": "github" }, "original": { @@ -386,11 +386,11 @@ }, "locked": { "dir": "versions/weekly", - "lastModified": 1709620314, - "narHash": "sha256-d7vekpj538VqdDrChFbVQpSVGDMnU1nSksbSzacKvyM=", + "lastModified": 1709967512, + "narHash": "sha256-p/W6TEAGNhV3uANigkQlqmGLT1rhFVuwHzTiqqVG3zs=", "owner": "holochain", "repo": "holochain", - "rev": "392bdfd729fb6ce50f78f9e7f1c757dc392675f4", + "rev": "a29e8ca0aa1d333fb2a8c272265facb604c6da0f", "type": "github" }, "original": { diff --git a/src/admin_websocket.rs b/src/admin_websocket.rs index 65ae5e9..9dae326 100644 --- a/src/admin_websocket.rs +++ b/src/admin_websocket.rs @@ -1,25 +1,20 @@ -use std::sync::Arc; - -use anyhow::{Context, Result}; +use crate::error::{ConductorApiError, ConductorApiResult}; +use anyhow::Result; use holo_hash::DnaHash; use holochain_conductor_api::{AdminRequest, AdminResponse, AppInfo, AppStatusFilter, StorageInfo}; use holochain_types::{ dna::AgentPubKey, prelude::{CellId, DeleteCloneCellPayload, InstallAppPayload, UpdateCoordinatorsPayload}, }; -use holochain_websocket::{connect, WebsocketConfig, WebsocketReceiver, WebsocketSender}; +use holochain_websocket::{connect, WebsocketConfig, WebsocketSender}; use holochain_zome_types::{ capability::GrantedFunctions, prelude::{DnaDef, GrantZomeCallCapabilityPayload, Record}, }; use serde::{Deserialize, Serialize}; -use url::Url; - -use crate::error::{ConductorApiError, ConductorApiResult}; - +use std::{net::ToSocketAddrs, sync::Arc}; pub struct AdminWebsocket { tx: WebsocketSender, - rx: WebsocketReceiver, } #[derive(Clone, Debug, Serialize, Deserialize)] @@ -35,22 +30,28 @@ pub struct AuthorizeSigningCredentialsPayload { } impl AdminWebsocket { - pub async fn connect(admin_url: String) -> Result { - let url = Url::parse(&admin_url).context("invalid ws:// URL")?; - let websocket_config = Arc::new(WebsocketConfig::default()); - let (tx, rx) = again::retry(|| { + pub async fn connect(socket_addr: impl ToSocketAddrs) -> Result { + let addr = socket_addr + .to_socket_addrs()? + .next() + .expect("invalid websocket address"); + // app installation takes > 2 min on CI at the moment, hence the high + // request timeout + let websocket_config = Arc::new(WebsocketConfig { + default_request_timeout: std::time::Duration::from_secs(180), + ..Default::default() + }); + let (tx, mut rx) = again::retry(|| { let websocket_config = Arc::clone(&websocket_config); - connect(url.clone().into(), websocket_config) + connect(websocket_config, addr) }) .await?; - Ok(Self { tx, rx }) - } + // WebsocketReceiver needs to be polled in order to receive responses + // from remote to sender requests. + tokio::task::spawn(async move { while rx.recv::().await.is_ok() {} }); - pub fn close(&mut self) { - if let Some(h) = self.rx.take_handle() { - h.close() - } + Ok(Self { tx }) } pub async fn generate_agent_pub_key(&mut self) -> ConductorApiResult { diff --git a/src/app_agent_websocket.rs b/src/app_agent_websocket.rs index 7791778..a5a77ca 100644 --- a/src/app_agent_websocket.rs +++ b/src/app_agent_websocket.rs @@ -1,5 +1,7 @@ -use std::{ops::DerefMut, sync::Arc}; - +use crate::{ + signing::{sign_zome_call, AgentSigner}, + AppWebsocket, ConductorApiError, ConductorApiResult, +}; use anyhow::{anyhow, Result}; use holo_hash::AgentPubKey; use holochain_conductor_api::{AppInfo, CellInfo, ProvisionedCell}; @@ -12,12 +14,8 @@ use holochain_zome_types::{ clone::ClonedCell, prelude::{CellId, ExternIO, FunctionName, RoleName, Timestamp, ZomeCallUnsigned, ZomeName}, }; -use std::ops::Deref; - -use crate::{ - signing::{sign_zome_call, AgentSigner}, - AppWebsocket, ConductorApiError, ConductorApiResult, -}; +use std::{net::ToSocketAddrs, ops::Deref}; +use std::{ops::DerefMut, sync::Arc}; #[derive(Clone)] pub struct AppAgentWebsocket { @@ -29,11 +27,11 @@ pub struct AppAgentWebsocket { impl AppAgentWebsocket { pub async fn connect( - url: String, + socket_addr: impl ToSocketAddrs, app_id: InstalledAppId, signer: Arc>, ) -> Result { - let app_ws = AppWebsocket::connect(url).await?; + let app_ws = AppWebsocket::connect(socket_addr).await?; AppAgentWebsocket::from_existing(app_ws, app_id, signer).await } diff --git a/src/app_websocket.rs b/src/app_websocket.rs index 34f7ef3..a4fba47 100644 --- a/src/app_websocket.rs +++ b/src/app_websocket.rs @@ -1,12 +1,6 @@ -use std::sync::Arc; - -use anyhow::{Context, Result}; +use crate::error::{ConductorApiError, ConductorApiResult}; +use anyhow::Result; use event_emitter_rs::EventEmitter; -use futures::lock::Mutex; -use futures::stream::StreamExt; -use holochain_zome_types::clone::ClonedCell; -use url::Url; - use holochain_conductor_api::{AppInfo, AppRequest, AppResponse, NetworkInfo, ZomeCall}; use holochain_types::{ app::InstalledAppId, @@ -16,47 +10,49 @@ use holochain_types::{ }, signal::Signal, }; -use holochain_websocket::{connect, Respond, WebsocketConfig, WebsocketSender}; - -use crate::error::{ConductorApiError, ConductorApiResult}; +use holochain_websocket::{connect, WebsocketConfig, WebsocketSender}; +use holochain_zome_types::clone::ClonedCell; +use std::{net::ToSocketAddrs, sync::Arc}; +use tokio::sync::Mutex; #[derive(Clone)] pub struct AppWebsocket { tx: WebsocketSender, - event_emitter_mutex: Arc>, + event_emitter: Arc>, } impl AppWebsocket { - pub async fn connect(app_url: String) -> Result { - let url = Url::parse(&app_url).context("invalid ws:// URL")?; + pub async fn connect(socket_addr: impl ToSocketAddrs) -> Result { + let addr = socket_addr + .to_socket_addrs()? + .next() + .expect("invalid websocket address"); let websocket_config = Arc::new(WebsocketConfig::default()); let (tx, mut rx) = again::retry(|| { let websocket_config = Arc::clone(&websocket_config); - connect(url.clone().into(), websocket_config) + connect(websocket_config, addr) }) .await?; let event_emitter = EventEmitter::new(); let mutex = Arc::new(Mutex::new(event_emitter)); - std::thread::spawn({ + tokio::task::spawn({ let mutex = mutex.clone(); - move || { - futures::executor::block_on(async { - while let Some((msg, resp)) = rx.next().await { - if let Respond::Signal = resp { - let mut event_emitter = mutex.lock().await; - let signal = Signal::try_from(msg).expect("Malformed signal"); - event_emitter.emit("signal", signal); - } + async move { + while let Ok(msg) = rx.recv::().await { + if let holochain_websocket::ReceiveMessage::Signal(signal_bytes) = msg { + let mut event_emitter = mutex.lock().await; + let signal = Signal::try_from_vec(signal_bytes).expect("Malformed signal"); + event_emitter.emit("signal", signal); } - }); + } } }); Ok(Self { tx, - event_emitter_mutex: mutex, + event_emitter: mutex, }) } @@ -64,8 +60,8 @@ impl AppWebsocket { &mut self, handler: F, ) -> Result { - let mut ee = self.event_emitter_mutex.lock().await; - let id = ee.on("signal", handler); + let mut event_emitter = self.event_emitter.lock().await; + let id = event_emitter.on("signal", handler); Ok(id) } diff --git a/src/error.rs b/src/error.rs index bb24a6c..59428a5 100644 --- a/src/error.rs +++ b/src/error.rs @@ -1,7 +1,6 @@ -use std::error::Error; - use holochain_conductor_api::ExternalApiWireError; -use holochain_websocket::WebsocketError; +use holochain_websocket::Error as WebsocketError; +use std::error::Error; #[derive(Debug)] pub enum ConductorApiError { diff --git a/tests/admin.rs b/tests/admin.rs index 93d4b9d..1dbb8f7 100644 --- a/tests/admin.rs +++ b/tests/admin.rs @@ -12,7 +12,7 @@ use std::{collections::HashMap, path::PathBuf}; async fn app_interfaces() { let conductor = SweetConductor::from_standard_config().await; let admin_port = conductor.get_arbitrary_admin_websocket_port().unwrap(); - let mut admin_ws = AdminWebsocket::connect(format!("ws://localhost:{}", admin_port)) + let mut admin_ws = AdminWebsocket::connect(format!("127.0.0.1:{}", admin_port)) .await .unwrap(); @@ -25,7 +25,7 @@ async fn app_interfaces() { async fn signed_zome_call() { let conductor = SweetConductor::from_standard_config().await; let admin_port = conductor.get_arbitrary_admin_websocket_port().unwrap(); - let mut admin_ws = AdminWebsocket::connect(format!("ws://localhost:{}", admin_port)) + let mut admin_ws = AdminWebsocket::connect(format!("127.0.0.1:{}", admin_port)) .await .unwrap(); let app_id: InstalledAppId = "test-app".into(); @@ -42,7 +42,7 @@ async fn signed_zome_call() { .unwrap(); admin_ws.enable_app(app_id.clone()).await.unwrap(); let app_ws_port = admin_ws.attach_app_interface(30000).await.unwrap(); - let mut app_ws = AppWebsocket::connect(format!("ws://localhost:{}", app_ws_port)) + let mut app_ws = AppWebsocket::connect(format!("127.0.0.1:{}", app_ws_port)) .await .unwrap(); let installed_app = app_ws.app_info(app_id.clone()).await.unwrap().unwrap(); @@ -91,7 +91,7 @@ async fn signed_zome_call() { async fn storage_info() { let conductor = SweetConductor::from_standard_config().await; let admin_port = conductor.get_arbitrary_admin_websocket_port().unwrap(); - let mut admin_ws = AdminWebsocket::connect(format!("ws://localhost:{}", admin_port)) + let mut admin_ws = AdminWebsocket::connect(format!("127.0.0.1:{}", admin_port)) .await .unwrap(); let app_id: InstalledAppId = "test-app".into(); @@ -124,7 +124,7 @@ async fn storage_info() { async fn dump_network_stats() { let conductor = SweetConductor::from_standard_config().await; let admin_port = conductor.get_arbitrary_admin_websocket_port().unwrap(); - let mut admin_ws = AdminWebsocket::connect(format!("ws://localhost:{}", admin_port)) + let mut admin_ws = AdminWebsocket::connect(format!("127.0.0.1:{}", admin_port)) .await .unwrap(); let app_id: InstalledAppId = "test-app".into(); diff --git a/tests/app.rs b/tests/app.rs index f22a08a..5314cdb 100644 --- a/tests/app.rs +++ b/tests/app.rs @@ -20,7 +20,7 @@ use std::{ async fn network_info() { let conductor = SweetConductor::from_standard_config().await; let admin_port = conductor.get_arbitrary_admin_websocket_port().unwrap(); - let mut admin_ws = AdminWebsocket::connect(format!("ws://localhost:{}", admin_port)) + let mut admin_ws = AdminWebsocket::connect(format!("127.0.0.1:{}", admin_port)) .await .unwrap(); @@ -40,7 +40,7 @@ async fn network_info() { admin_ws.enable_app(app_id.clone()).await.unwrap(); let app_ws_port = 33000; admin_ws.attach_app_interface(app_ws_port).await.unwrap(); - let mut app_ws = AppWebsocket::connect(format!("ws://localhost:{}", app_ws_port)) + let mut app_ws = AppWebsocket::connect(format!("127.0.0.1:{}", app_ws_port)) .await .unwrap(); @@ -78,7 +78,7 @@ async fn network_info() { async fn handle_signal() { let conductor = SweetConductor::from_standard_config().await; let admin_port = conductor.get_arbitrary_admin_websocket_port().unwrap(); - let mut admin_ws = AdminWebsocket::connect(format!("ws://localhost:{}", admin_port)) + let mut admin_ws = AdminWebsocket::connect(format!("127.0.0.1:{}", admin_port)) .await .unwrap(); @@ -98,7 +98,7 @@ async fn handle_signal() { admin_ws.enable_app(app_id.clone()).await.unwrap(); let app_ws_port = 33001; admin_ws.attach_app_interface(app_ws_port).await.unwrap(); - let mut app_ws = AppWebsocket::connect(format!("ws://localhost:{}", app_ws_port)) + let mut app_ws = AppWebsocket::connect(format!("127.0.0.1:{}", app_ws_port)) .await .unwrap(); diff --git a/tests/clone_cell.rs b/tests/clone_cell.rs index 9d0f458..33c3ee2 100644 --- a/tests/clone_cell.rs +++ b/tests/clone_cell.rs @@ -17,7 +17,7 @@ use holochain_zome_types::{dependencies::holochain_integrity_types::ExternIO, pr async fn clone_cell_management() { let conductor = SweetConductor::from_standard_config().await; let admin_port = conductor.get_arbitrary_admin_websocket_port().unwrap(); - let mut admin_ws = AdminWebsocket::connect(format!("ws://localhost:{}", admin_port)) + let mut admin_ws = AdminWebsocket::connect(format!("127.0.0.1:{}", admin_port)) .await .unwrap(); let app_id: InstalledAppId = "test-app".into(); @@ -35,7 +35,7 @@ async fn clone_cell_management() { .unwrap(); admin_ws.enable_app(app_id.clone()).await.unwrap(); let app_api_port = admin_ws.attach_app_interface(0).await.unwrap(); - let mut app_ws = AppWebsocket::connect(format!("ws://localhost:{}", app_api_port)) + let mut app_ws = AppWebsocket::connect(format!("127.0.0.1:{}", app_api_port)) .await .unwrap(); let clone_cell = { @@ -158,7 +158,7 @@ async fn clone_cell_management() { pub async fn app_info_refresh() { let conductor = SweetConductor::from_standard_config().await; let admin_port = conductor.get_arbitrary_admin_websocket_port().unwrap(); - let mut admin_ws = AdminWebsocket::connect(format!("ws://localhost:{}", admin_port)) + let mut admin_ws = AdminWebsocket::connect(format!("127.0.0.1:{}", admin_port)) .await .unwrap(); let app_id: InstalledAppId = "test-app".into(); @@ -185,7 +185,7 @@ pub async fn app_info_refresh() { // Create an app interface and connect an app agent to it let app_api_port = admin_ws.attach_app_interface(0).await.unwrap(); let mut app_agent_ws = AppAgentWebsocket::connect( - format!("ws://localhost:{}", app_api_port), + format!("127.0.0.1:{}", app_api_port), app_id.clone(), signer.clone().into(), )