From 84dcd4f3e8aedfd799f289d531c922a7e675280b Mon Sep 17 00:00:00 2001 From: Martin Raszyk Date: Fri, 11 Oct 2024 17:10:59 +0200 Subject: [PATCH 01/21] feat: new function Agent::fetch_pocketic_topology --- .github/workflows/ic-ref.yml | 16 +- CHANGELOG.md | 1 + Cargo.lock | 324 +++++++++++++++++++++++++++++- Cargo.toml | 1 + ic-agent/Cargo.toml | 2 + ic-agent/src/agent/agent_error.rs | 4 + ic-agent/src/agent/mod.rs | 12 ++ ref-tests/tests/integration.rs | 15 +- 8 files changed, 365 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ic-ref.yml b/.github/workflows/ic-ref.yml index fa699f93..56ed61df 100644 --- a/.github/workflows/ic-ref.yml +++ b/.github/workflows/ic-ref.yml @@ -28,7 +28,7 @@ jobs: - name: Install dfx uses: dfinity/setup-dfx@main with: - dfx-version: "0.22.0-beta.0" + dfx-version: "0.24.1-beta.1" - name: Cargo cache uses: actions/cache@v4 @@ -63,6 +63,20 @@ jobs: env: RUST_BACKTRACE: 1 + - name: Run Integration Tests with PocketIC + run: | + set -ex + dfx start --background --clean --pocketic + sleep 1 + export IC_REF_PORT=$(dfx info webserver-port) + export IC_UNIVERSAL_CANISTER_PATH=$HOME/canister.wasm + export IC_WALLET_CANISTER_PATH=$HOME/wallet.wasm + export POCKET_IC="yes" + cargo test --all-features -- --ignored + dfx stop + env: + RUST_BACKTRACE: 1 + - name: Install and Configure SoftHSM run: | set -ex diff --git a/CHANGELOG.md b/CHANGELOG.md index d75d85e3..6e4e2510 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +* New function `Agent::fetch_pocketic_topology` to fetch the topology of a PocketIC instance. * Make ingress_expiry required and set the default value to 3 min. * Changed `BasicIdentity`'s implmentation from `ring` to `ed25519-consensus`. * Added `AgentBuilder::with_max_polling_time` to config the maximum time to wait for a response from the replica. diff --git a/Cargo.lock b/Cargo.lock index ef4a2b5e..44988480 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -225,6 +225,12 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" +[[package]] +name = "base64" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + [[package]] name = "base64" version = "0.22.1" @@ -505,6 +511,22 @@ dependencies = [ "unicode-segmentation", ] +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + [[package]] name = "cpufeatures" version = "0.2.13" @@ -523,6 +545,15 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "crossbeam-channel" +version = "0.5.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" +dependencies = [ + "crossbeam-utils", +] + [[package]] name = "crossbeam-utils" version = "0.8.20" @@ -638,6 +669,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "dyn-clone" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" + [[package]] name = "ecdsa" version = "0.16.9" @@ -708,6 +745,15 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +[[package]] +name = "erased-serde" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c138974f9d5e7fe373eb04df7cae98833802ae4b11c24ac7039a21d5af4b26c" +dependencies = [ + "serde", +] + [[package]] name = "event-listener" version = "2.5.3" @@ -921,6 +967,9 @@ name = "hex" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +dependencies = [ + "serde", +] [[package]] name = "hmac" @@ -1015,6 +1064,7 @@ dependencies = [ "hyper", "hyper-util", "rustls", + "rustls-native-certs 0.8.0", "rustls-pki-types", "tokio", "tokio-rustls", @@ -1073,6 +1123,7 @@ dependencies = [ "p256", "pem", "pkcs8", + "pocket-ic", "rand", "rangemap", "reqwest", @@ -1099,6 +1150,33 @@ dependencies = [ "web-sys", ] +[[package]] +name = "ic-cdk" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b1da6a25b045f9da3c9459c0cb2b0700ac368ee16382975a17185a23b9c18ab" +dependencies = [ + "candid", + "ic-cdk-macros", + "ic0", + "serde", + "serde_bytes", +] + +[[package]] +name = "ic-cdk-macros" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a45800053d80a6df839a71aaea5797e723188c0b992618208ca3b941350c7355" +dependencies = [ + "candid", + "proc-macro2", + "quote", + "serde", + "serde_tokenstream", + "syn 1.0.109", +] + [[package]] name = "ic-certification" version = "2.6.0" @@ -1176,6 +1254,12 @@ dependencies = [ "sha2 0.10.8", ] +[[package]] +name = "ic0" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a54b5297861c651551676e8c43df805dad175cc33bc97dbd992edbbb85dcbcdf" + [[package]] name = "ic_bls12_381" version = "0.10.0" @@ -1228,7 +1312,7 @@ name = "icx-cert" version = "0.38.2" dependencies = [ "anyhow", - "base64", + "base64 0.22.1", "clap", "hex", "ic-certification", @@ -1351,7 +1435,7 @@ version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "507460a910eb7b32ee961886ff48539633b788a36b65692b95f225b844c82553" dependencies = [ - "regex-automata", + "regex-automata 0.4.7", ] [[package]] @@ -1440,6 +1524,15 @@ dependencies = [ "logos-codegen", ] +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata 0.1.10", +] + [[package]] name = "memchr" version = "2.7.4" @@ -1452,6 +1545,16 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" +[[package]] +name = "mime_guess" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" +dependencies = [ + "mime", + "unicase", +] + [[package]] name = "minicov" version = "0.3.5" @@ -1590,6 +1693,12 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + [[package]] name = "overload" version = "0.1.1" @@ -1658,7 +1767,7 @@ version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e459365e590736a54c3fa561947c84837534b8e9af6fc5bf781307e82658fae" dependencies = [ - "base64", + "base64 0.22.1", "serde", ] @@ -1754,6 +1863,29 @@ dependencies = [ "spki", ] +[[package]] +name = "pocket-ic" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "beff607d4dbebff8d003453ced669d2645e905de496ca93713f3d47633357e6c" +dependencies = [ + "base64 0.13.1", + "candid", + "hex", + "ic-cdk", + "reqwest", + "schemars", + "serde", + "serde_bytes", + "serde_json", + "sha2 0.10.8", + "slog", + "tokio", + "tracing", + "tracing-appender", + "tracing-subscriber", +] + [[package]] name = "powerfmt" version = "0.2.0" @@ -1953,10 +2085,19 @@ checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", - "regex-automata", + "regex-automata 0.4.7", "regex-syntax 0.8.4", ] +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax 0.6.29", +] + [[package]] name = "regex-automata" version = "0.4.7" @@ -1986,11 +2127,12 @@ version = "0.12.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8f4955649ef5c38cc7f9e8aa41761d48fb9677197daea9984dc54f56aad5e63" dependencies = [ - "base64", + "base64 0.22.1", "bytes", "futures-channel", "futures-core", "futures-util", + "h2", "http", "http-body", "http-body-util", @@ -2001,11 +2143,13 @@ dependencies = [ "js-sys", "log", "mime", + "mime_guess", "once_cell", "percent-encoding", "pin-project-lite", "quinn", "rustls", + "rustls-native-certs 0.7.3", "rustls-pemfile", "rustls-pki-types", "serde", @@ -2014,6 +2158,7 @@ dependencies = [ "sync_wrapper", "tokio", "tokio-rustls", + "tokio-socks", "tokio-util", "tower-service", "url", @@ -2076,13 +2221,39 @@ dependencies = [ "zeroize", ] +[[package]] +name = "rustls-native-certs" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5bfb394eeed242e909609f56089eecfe5fda225042e8b171791b9c95f5931e5" +dependencies = [ + "openssl-probe", + "rustls-pemfile", + "rustls-pki-types", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-native-certs" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcaf18a4f2be7326cd874a5fa579fae794320a0f388d365dca7e480e55f83f8a" +dependencies = [ + "openssl-probe", + "rustls-pemfile", + "rustls-pki-types", + "schannel", + "security-framework", +] + [[package]] name = "rustls-pemfile" version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "196fe16b00e106300d3e45ecfcb764fa292a535d7326a29a5875c579c7417425" dependencies = [ - "base64", + "base64 0.22.1", "rustls-pki-types", ] @@ -2124,6 +2295,39 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "schannel" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01227be5826fa0690321a2ba6c5cd57a19cf3f6a09e76973b58e61de6ab9d1c1" +dependencies = [ + "windows-sys 0.59.0", +] + +[[package]] +name = "schemars" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09c024468a378b7e36765cd36702b7a90cc3cba11654f6685c8f233408e89e92" +dependencies = [ + "dyn-clone", + "schemars_derive", + "serde", + "serde_json", +] + +[[package]] +name = "schemars_derive" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1eee588578aff73f856ab961cd2f79e36bc45d7ded33a7562adba4667aecc0e" +dependencies = [ + "proc-macro2", + "quote", + "serde_derive_internals", + "syn 2.0.76", +] + [[package]] name = "scoped-tls" version = "1.0.1" @@ -2150,6 +2354,29 @@ dependencies = [ "zeroize", ] +[[package]] +name = "security-framework" +version = "2.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" +dependencies = [ + "bitflags", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "semver" version = "1.0.23" @@ -2195,6 +2422,17 @@ dependencies = [ "syn 2.0.76", ] +[[package]] +name = "serde_derive_internals" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.76", +] + [[package]] name = "serde_json" version = "1.0.127" @@ -2218,6 +2456,17 @@ dependencies = [ "syn 2.0.76", ] +[[package]] +name = "serde_tokenstream" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "797ba1d80299b264f3aac68ab5d12e5825a561749db4df7cd7c8083900c5d4e9" +dependencies = [ + "proc-macro2", + "serde", + "syn 1.0.109", +] + [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -2321,6 +2570,15 @@ dependencies = [ "autocfg", ] +[[package]] +name = "slog" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8347046d4ebd943127157b94d63abb990fcf729dc4e9978927fdf4ac3c998d06" +dependencies = [ + "erased-serde", +] + [[package]] name = "smallvec" version = "1.13.2" @@ -2567,9 +2825,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.39.3" +version = "1.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9babc99b9923bfa4804bd74722ff02c0381021eafa4db9949217e3be8e84fff5" +checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" dependencies = [ "backtrace", "bytes", @@ -2605,6 +2863,18 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-socks" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d4770b8024672c1101b3f6733eab95b18007dbe0847a8afe341fcf79e06043f" +dependencies = [ + "either", + "futures-util", + "thiserror", + "tokio", +] + [[package]] name = "tokio-util" version = "0.7.11" @@ -2656,6 +2926,18 @@ dependencies = [ "tracing-core", ] +[[package]] +name = "tracing-appender" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3566e8ce28cc0a3fe42519fc80e6b4c943cc4c8cef275620eb8dac2d3d4e06cf" +dependencies = [ + "crossbeam-channel", + "thiserror", + "time", + "tracing-subscriber", +] + [[package]] name = "tracing-attributes" version = "0.1.27" @@ -2688,18 +2970,35 @@ dependencies = [ "tracing-core", ] +[[package]] +name = "tracing-serde" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc6b213177105856957181934e4920de57730fc69bf42c37ee5bb664d406d9e1" +dependencies = [ + "serde", + "tracing-core", +] + [[package]] name = "tracing-subscriber" version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" dependencies = [ + "matchers", "nu-ansi-term", + "once_cell", + "regex", + "serde", + "serde_json", "sharded-slab", "smallvec", "thread_local", + "tracing", "tracing-core", "tracing-log", + "tracing-serde", ] [[package]] @@ -2720,6 +3019,15 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +[[package]] +name = "unicase" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" +dependencies = [ + "version_check", +] + [[package]] name = "unicode-bidi" version = "0.3.15" diff --git a/Cargo.toml b/Cargo.toml index effbf262..1a577ffb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,6 +35,7 @@ futures-util = "0.3.21" hex = "0.4.3" k256 = "0.13.4" leb128 = "0.2.5" +pocket-ic = "5.0.0" p256 = "0.13.2" rand = "0.8.5" reqwest = { version = "0.12", default-features = false } diff --git a/ic-agent/Cargo.toml b/ic-agent/Cargo.toml index e6b4e47c..df91e3db 100644 --- a/ic-agent/Cargo.toml +++ b/ic-agent/Cargo.toml @@ -38,6 +38,7 @@ k256 = { workspace = true, features = ["pem"] } p256 = { workspace = true, features = ["pem"] } leb128 = { workspace = true } pkcs8 = { version = "0.10.2", features = ["std"] } +pocket-ic = { workspace = true } sec1 = { version = "0.7.2", features = ["pem"] } rand = { workspace = true } rangemap = "1.4" @@ -45,6 +46,7 @@ ring = { version = "0.17", optional = true } serde = { workspace = true, features = ["derive"] } serde_bytes = { workspace = true } serde_cbor = { workspace = true } +serde_json = { workspace = true } serde_repr = { workspace = true } sha2 = { workspace = true } simple_asn1 = "0.6.1" diff --git a/ic-agent/src/agent/agent_error.rs b/ic-agent/src/agent/agent_error.rs index b346c537..63afc8df 100644 --- a/ic-agent/src/agent/agent_error.rs +++ b/ic-agent/src/agent/agent_error.rs @@ -30,6 +30,10 @@ pub enum AgentError { #[error("Invalid CBOR data, could not deserialize: {0}")] InvalidCborData(#[from] serde_cbor::Error), + /// The data fetched was invalid JSON. + #[error("Invalid JSON data, could not deserialize: {0}")] + InvalidJsonData(#[from] serde_json::Error), + /// There was an error calculating a request ID. #[error("Cannot calculate a RequestID: {0}")] CannotCalculateRequestId(#[from] RequestIdError), diff --git a/ic-agent/src/agent/mod.rs b/ic-agent/src/agent/mod.rs index 3de2aa26..0d856ad0 100644 --- a/ic-agent/src/agent/mod.rs +++ b/ic-agent/src/agent/mod.rs @@ -251,6 +251,18 @@ impl Agent { Ok(()) } + /// This function fetches the topology of a PocketIC instance. + /// + /// *Only use this function when you are talking to a PocketIC server in tests.* + pub async fn fetch_pocketic_topology( + &self, + ) -> Result { + let endpoint = "_/topology"; + let bytes = self.execute(Method::GET, endpoint, None).await?.1; + serde_json::from_slice::(&bytes) + .map_err(AgentError::InvalidJsonData) + } + /// By default, the agent is configured to talk to the main Internet Computer, and verifies /// responses using a hard-coded public key. /// diff --git a/ref-tests/tests/integration.rs b/ref-tests/tests/integration.rs index 9ce5b53f..231071b2 100644 --- a/ref-tests/tests/integration.rs +++ b/ref-tests/tests/integration.rs @@ -19,7 +19,7 @@ use ic_utils::{ }; use ref_tests::{ create_agent, create_basic_identity, create_universal_canister, create_wallet_canister, - get_wallet_wasm_from_env, universal_canister::payload, with_universal_canister, + get_wallet_wasm_from_env, universal_canister::payload, with_agent, with_universal_canister, with_wallet_canister, }; use serde::Serialize; @@ -756,3 +756,16 @@ mod identity { }) } } + +#[ignore] +#[test] +fn topology() { + with_agent(|agent| async move { + let is_pocketic = std::env::var("POCKET_IC").is_ok(); + match agent.fetch_pocketic_topology().await { + Ok(_) => assert!(is_pocketic), + Err(_) => assert!(!is_pocketic), + }; + Ok(()) + }); +} From 2bb3e1e05e1ccf30604e5f5be3ceca5f3e545fb3 Mon Sep 17 00:00:00 2001 From: Martin Raszyk Date: Fri, 11 Oct 2024 17:58:48 +0200 Subject: [PATCH 02/21] fix tests --- .github/workflows/ic-ref.yml | 2 +- ref-tests/src/utils.rs | 18 +++++++--- ref-tests/tests/ic-ref.rs | 60 ++++++++++++++++++---------------- ref-tests/tests/integration.rs | 6 ++-- 4 files changed, 50 insertions(+), 36 deletions(-) diff --git a/.github/workflows/ic-ref.yml b/.github/workflows/ic-ref.yml index 56ed61df..df020151 100644 --- a/.github/workflows/ic-ref.yml +++ b/.github/workflows/ic-ref.yml @@ -72,7 +72,7 @@ jobs: export IC_UNIVERSAL_CANISTER_PATH=$HOME/canister.wasm export IC_WALLET_CANISTER_PATH=$HOME/wallet.wasm export POCKET_IC="yes" - cargo test --all-features -- --ignored + cargo test --all-features -- --ignored --test-threads=1 # TODO: drop --test-threads=1 dfx stop env: RUST_BACKTRACE: 1 diff --git a/ref-tests/src/utils.rs b/ref-tests/src/utils.rs index 186e7c29..11d62f3b 100644 --- a/ref-tests/src/utils.rs +++ b/ref-tests/src/utils.rs @@ -11,8 +11,18 @@ const HSM_SLOT_INDEX: &str = "HSM_SLOT_INDEX"; const HSM_KEY_ID: &str = "HSM_KEY_ID"; const HSM_PIN: &str = "HSM_PIN"; -pub fn get_effective_canister_id() -> Principal { - Principal::from_text("rwlgt-iiaaa-aaaaa-aaaaa-cai").unwrap() +pub async fn get_effective_canister_id(agent: &Agent) -> Principal { + match agent.fetch_pocketic_topology().await { + Ok(topology) => { + let app_subnet = topology.get_app_subnets()[0]; + Principal::from_slice( + &topology.0.get(&app_subnet).unwrap().canister_ranges[0] + .start + .canister_id, + ) + } + Err(_) => Principal::from_text("rwlgt-iiaaa-aaaaa-aaaaa-cai").unwrap(), + } } pub fn create_identity() -> Result, String> { @@ -149,7 +159,7 @@ pub async fn create_universal_canister(agent: &Agent) -> Result Date: Sun, 13 Oct 2024 09:32:27 +0200 Subject: [PATCH 03/21] remove fn fetch_pocketic_topology --- .github/workflows/ic-ref.yml | 2 +- CHANGELOG.md | 1 - Cargo.lock | 3 ++- ic-agent/Cargo.toml | 2 -- ic-agent/src/agent/agent_error.rs | 4 --- ic-agent/src/agent/mod.rs | 12 --------- ref-tests/Cargo.toml | 2 ++ ref-tests/src/utils.rs | 37 ++++++++++++++++----------- ref-tests/tests/ic-ref.rs | 42 +++++++++++++++---------------- ref-tests/tests/integration.rs | 15 +---------- 10 files changed, 50 insertions(+), 70 deletions(-) diff --git a/.github/workflows/ic-ref.yml b/.github/workflows/ic-ref.yml index df020151..7f90a3f1 100644 --- a/.github/workflows/ic-ref.yml +++ b/.github/workflows/ic-ref.yml @@ -71,7 +71,7 @@ jobs: export IC_REF_PORT=$(dfx info webserver-port) export IC_UNIVERSAL_CANISTER_PATH=$HOME/canister.wasm export IC_WALLET_CANISTER_PATH=$HOME/wallet.wasm - export POCKET_IC="yes" + export POCKET_IC="http://localhost:${IC_REF_PORT}" cargo test --all-features -- --ignored --test-threads=1 # TODO: drop --test-threads=1 dfx stop env: diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e4e2510..d75d85e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased -* New function `Agent::fetch_pocketic_topology` to fetch the topology of a PocketIC instance. * Make ingress_expiry required and set the default value to 3 min. * Changed `BasicIdentity`'s implmentation from `ring` to `ed25519-consensus`. * Added `AgentBuilder::with_max_polling_time` to config the maximum time to wait for a response from the replica. diff --git a/Cargo.lock b/Cargo.lock index 44988480..e5c64b40 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1123,7 +1123,6 @@ dependencies = [ "p256", "pem", "pkcs8", - "pocket-ic", "rand", "rangemap", "reqwest", @@ -2070,7 +2069,9 @@ dependencies = [ "ic-utils", "k256", "p256", + "pocket-ic", "rand", + "reqwest", "serde", "serde_cbor", "sha2 0.10.8", diff --git a/ic-agent/Cargo.toml b/ic-agent/Cargo.toml index df91e3db..e6b4e47c 100644 --- a/ic-agent/Cargo.toml +++ b/ic-agent/Cargo.toml @@ -38,7 +38,6 @@ k256 = { workspace = true, features = ["pem"] } p256 = { workspace = true, features = ["pem"] } leb128 = { workspace = true } pkcs8 = { version = "0.10.2", features = ["std"] } -pocket-ic = { workspace = true } sec1 = { version = "0.7.2", features = ["pem"] } rand = { workspace = true } rangemap = "1.4" @@ -46,7 +45,6 @@ ring = { version = "0.17", optional = true } serde = { workspace = true, features = ["derive"] } serde_bytes = { workspace = true } serde_cbor = { workspace = true } -serde_json = { workspace = true } serde_repr = { workspace = true } sha2 = { workspace = true } simple_asn1 = "0.6.1" diff --git a/ic-agent/src/agent/agent_error.rs b/ic-agent/src/agent/agent_error.rs index 63afc8df..b346c537 100644 --- a/ic-agent/src/agent/agent_error.rs +++ b/ic-agent/src/agent/agent_error.rs @@ -30,10 +30,6 @@ pub enum AgentError { #[error("Invalid CBOR data, could not deserialize: {0}")] InvalidCborData(#[from] serde_cbor::Error), - /// The data fetched was invalid JSON. - #[error("Invalid JSON data, could not deserialize: {0}")] - InvalidJsonData(#[from] serde_json::Error), - /// There was an error calculating a request ID. #[error("Cannot calculate a RequestID: {0}")] CannotCalculateRequestId(#[from] RequestIdError), diff --git a/ic-agent/src/agent/mod.rs b/ic-agent/src/agent/mod.rs index 0d856ad0..3de2aa26 100644 --- a/ic-agent/src/agent/mod.rs +++ b/ic-agent/src/agent/mod.rs @@ -251,18 +251,6 @@ impl Agent { Ok(()) } - /// This function fetches the topology of a PocketIC instance. - /// - /// *Only use this function when you are talking to a PocketIC server in tests.* - pub async fn fetch_pocketic_topology( - &self, - ) -> Result { - let endpoint = "_/topology"; - let bytes = self.execute(Method::GET, endpoint, None).await?.1; - serde_json::from_slice::(&bytes) - .map_err(AgentError::InvalidJsonData) - } - /// By default, the agent is configured to talk to the main Internet Computer, and verifies /// responses using a hard-coded public key. /// diff --git a/ref-tests/Cargo.toml b/ref-tests/Cargo.toml index 6a568013..3c8f8188 100644 --- a/ref-tests/Cargo.toml +++ b/ref-tests/Cargo.toml @@ -14,7 +14,9 @@ ic-identity-hsm = { path = "../ic-identity-hsm" } ic-utils = { path = "../ic-utils", features = ["raw"] } k256 = { workspace = true } p256 = { workspace = true } +pocket-ic = { workspace = true } rand = { workspace = true } +reqwest = { workspace = true } serde = { workspace = true, features = ["derive"] } sha2 = { workspace = true } tokio = { workspace = true, features = ["full"] } diff --git a/ref-tests/src/utils.rs b/ref-tests/src/utils.rs index 11d62f3b..4c512f1e 100644 --- a/ref-tests/src/utils.rs +++ b/ref-tests/src/utils.rs @@ -10,18 +10,27 @@ const HSM_PKCS11_LIBRARY_PATH: &str = "HSM_PKCS11_LIBRARY_PATH"; const HSM_SLOT_INDEX: &str = "HSM_SLOT_INDEX"; const HSM_KEY_ID: &str = "HSM_KEY_ID"; const HSM_PIN: &str = "HSM_PIN"; - -pub async fn get_effective_canister_id(agent: &Agent) -> Principal { - match agent.fetch_pocketic_topology().await { - Ok(topology) => { - let app_subnet = topology.get_app_subnets()[0]; - Principal::from_slice( - &topology.0.get(&app_subnet).unwrap().canister_ranges[0] - .start - .canister_id, - ) - } - Err(_) => Principal::from_text("rwlgt-iiaaa-aaaaa-aaaaa-cai").unwrap(), +const POCKET_IC: &str = "POCKET_IC"; + +pub async fn get_effective_canister_id() -> Principal { + if let Ok(pocket_ic_url) = std::env::var(POCKET_IC) { + let client = reqwest::Client::new(); + let topology: pocket_ic::common::rest::Topology = client + .get(format!("{}{}", pocket_ic_url, "/_/topology")) + .send() + .await + .unwrap() + .json() + .await + .unwrap(); + let app_subnet = topology.get_app_subnets()[0]; + Principal::from_slice( + &topology.0.get(&app_subnet).unwrap().canister_ranges[0] + .start + .canister_id, + ) + } else { + Principal::from_text("rwlgt-iiaaa-aaaaa-aaaaa-cai").unwrap() } } @@ -159,7 +168,7 @@ pub async fn create_universal_canister(agent: &Agent) -> Result assert!(is_pocketic), - Err(_) => assert!(!is_pocketic), - }; - Ok(()) - }); -} From 9775ea80e88fdc55e733d76a41123b3f476f46ef Mon Sep 17 00:00:00 2001 From: Martin Raszyk Date: Sun, 13 Oct 2024 09:50:19 +0200 Subject: [PATCH 04/21] skip unit tests for integration tests on windows --- .github/workflows/test.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c2ebcd3c..856632c8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -35,10 +35,14 @@ jobs: run: | # Test all features and no features for each package. for p in $(cargo metadata --no-deps --format-version 1 | jq -r .packages[].manifest_path); do - pushd $(dirname $p) - cargo test --all-targets --all-features - cargo test --all-targets --no-default-features - popd + # skip unit tests for integration tests on windows + # because integration tests cannot be run on windows anyway + if [[ ! ( ${{ matrix.os == 'windows-latest' }} && "$(grep ref-tests "${p}")" ) ]]; then + pushd $(dirname $p) + cargo test --all-targets --all-features + cargo test --all-targets --no-default-features + popd + fi done env: RUST_BACKTRACE: 1 From 0ba6ca2f6b14d4fae90c7e82769804a5bb5eb9e9 Mon Sep 17 00:00:00 2001 From: Martin Raszyk Date: Sun, 13 Oct 2024 09:50:38 +0200 Subject: [PATCH 05/21] run all integration tests against PocketIC --- .github/workflows/ic-ref.yml | 38 +++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ic-ref.yml b/.github/workflows/ic-ref.yml index 7f90a3f1..e20047e8 100644 --- a/.github/workflows/ic-ref.yml +++ b/.github/workflows/ic-ref.yml @@ -63,7 +63,7 @@ jobs: env: RUST_BACKTRACE: 1 - - name: Run Integration Tests with PocketIC + - name: Run Integration Tests against PocketIC run: | set -ex dfx start --background --clean --pocketic @@ -109,6 +109,30 @@ jobs: HSM_SLOT_INDEX: 0 HSM_KEY_ID: abcdef + - name: Run Integration Tests with SoftHSM against PocketIC + run: | + set -ex + softhsm2-util --init-token --slot $HSM_SLOT_INDEX --label "agent-rs-token" --so-pin $HSM_SO_PIN --pin $HSM_PIN + # create key: + pkcs11-tool -k --module $HSM_PKCS11_LIBRARY_PATH --login --slot-index $HSM_SLOT_INDEX -d $HSM_KEY_ID --key-type EC:prime256v1 --pin $HSM_PIN + + dfx start --background --clean --pocketic + sleep 1 + export IC_REF_PORT=$(dfx info webserver-port) + export IC_UNIVERSAL_CANISTER_PATH=$HOME/canister.wasm + export IC_WALLET_CANISTER_PATH=$HOME/wallet.wasm + export POCKET_IC="http://localhost:${IC_REF_PORT}" + cd ref-tests + cargo test --all-features -- --ignored --nocapture --test-threads=1 + dfx stop + env: + RUST_BACKTRACE: 1 + HSM_PKCS11_LIBRARY_PATH: /usr/lib/softhsm/libsofthsm2.so + HSM_SO_PIN: 123456 + HSM_PIN: 1234 + HSM_SLOT_INDEX: 0 + HSM_KEY_ID: abcdef + - name: Run Doc Tests run: | set -ex @@ -120,6 +144,18 @@ jobs: env: RUST_BACKTRACE: 1 + - name: Run Doc Tests against PocketIC + run: | + set -ex + dfx start --background --clean --pocketic + sleep 1 + export IC_REF_PORT=$(dfx info webserver-port) + export POCKET_IC="http://localhost:${IC_REF_PORT}" + cargo test --all-features --doc -- --ignored --test-threads=1 # TODO: drop --test-threads=1 + dfx stop + env: + RUST_BACKTRACE: 1 + aggregate: name: ic-ref:required runs-on: ubuntu-latest From ffd264444df427142a41a437960806d884b09560 Mon Sep 17 00:00:00 2001 From: Martin Raszyk Date: Sun, 13 Oct 2024 09:52:38 +0200 Subject: [PATCH 06/21] fix --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 856632c8..33d5e1f7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,7 +37,7 @@ jobs: for p in $(cargo metadata --no-deps --format-version 1 | jq -r .packages[].manifest_path); do # skip unit tests for integration tests on windows # because integration tests cannot be run on windows anyway - if [[ ! ( ${{ matrix.os == 'windows-latest' }} && "$(grep ref-tests "${p}")" ) ]]; then + if [[ ! ( ${{ matrix.os == 'windows-latest' }} && "$(echo ${p} | grep ref-tests)" ) ]]; then pushd $(dirname $p) cargo test --all-targets --all-features cargo test --all-targets --no-default-features From e409f973244c02a65d955a9c9ade58a25828875d Mon Sep 17 00:00:00 2001 From: Martin Raszyk Date: Sun, 13 Oct 2024 10:12:49 +0200 Subject: [PATCH 07/21] do not reinitialize SoftHSM --- .github/workflows/ic-ref.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/ic-ref.yml b/.github/workflows/ic-ref.yml index e20047e8..01377a3e 100644 --- a/.github/workflows/ic-ref.yml +++ b/.github/workflows/ic-ref.yml @@ -112,10 +112,6 @@ jobs: - name: Run Integration Tests with SoftHSM against PocketIC run: | set -ex - softhsm2-util --init-token --slot $HSM_SLOT_INDEX --label "agent-rs-token" --so-pin $HSM_SO_PIN --pin $HSM_PIN - # create key: - pkcs11-tool -k --module $HSM_PKCS11_LIBRARY_PATH --login --slot-index $HSM_SLOT_INDEX -d $HSM_KEY_ID --key-type EC:prime256v1 --pin $HSM_PIN - dfx start --background --clean --pocketic sleep 1 export IC_REF_PORT=$(dfx info webserver-port) From 3959a4a106f165de0d4873810fe4a6530b0dfce2 Mon Sep 17 00:00:00 2001 From: Martin Raszyk Date: Sun, 13 Oct 2024 11:35:29 +0200 Subject: [PATCH 08/21] fixes --- Cargo.lock | 4 ++++ ic-utils/Cargo.toml | 2 ++ ic-utils/src/canister.rs | 26 +++++++++++++++++++--- icx/Cargo.toml | 2 ++ icx/src/main.rs | 46 ++++++++++++++++++++++++++++++++------- ref-tests/tests/ic-ref.rs | 18 ++++++++++++--- 6 files changed, 84 insertions(+), 14 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e5c64b40..a47d2492 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1227,7 +1227,9 @@ dependencies = [ "futures-util", "ic-agent", "once_cell", + "pocket-ic", "rand", + "reqwest", "semver", "serde", "serde_bytes", @@ -1300,7 +1302,9 @@ dependencies = [ "humantime", "ic-agent", "ic-utils", + "pocket-ic", "rand", + "reqwest", "serde", "serde_json", "tokio", diff --git a/ic-utils/Cargo.toml b/ic-utils/Cargo.toml index 4ae5f8f5..35587555 100644 --- a/ic-utils/Cargo.toml +++ b/ic-utils/Cargo.toml @@ -33,7 +33,9 @@ once_cell = "1.10.0" [dev-dependencies] ed25519-consensus = { workspace = true } ic-agent = { workspace = true, default-features = true } +pocket-ic = { workspace = true } rand = { workspace = true } +reqwest = { workspace = true } tokio = { workspace = true, features = ["full"] } [features] diff --git a/ic-utils/src/canister.rs b/ic-utils/src/canister.rs index 50f88100..af84e2e1 100644 --- a/ic-utils/src/canister.rs +++ b/ic-utils/src/canister.rs @@ -393,8 +393,28 @@ mod tests { use ic_agent::identity::BasicIdentity; use rand::thread_rng; - fn get_effective_canister_id() -> Principal { - Principal::from_text("rwlgt-iiaaa-aaaaa-aaaaa-cai").unwrap() + const POCKET_IC: &str = "POCKET_IC"; + + async fn get_effective_canister_id() -> Principal { + if let Ok(pocket_ic_url) = std::env::var(POCKET_IC) { + let client = reqwest::Client::new(); + let topology: pocket_ic::common::rest::Topology = client + .get(format!("{}{}", pocket_ic_url, "/_/topology")) + .send() + .await + .unwrap() + .json() + .await + .unwrap(); + let app_subnet = topology.get_app_subnets()[0]; + Principal::from_slice( + &topology.0.get(&app_subnet).unwrap().canister_ranges[0] + .start + .canister_id, + ) + } else { + Principal::from_text("rwlgt-iiaaa-aaaaa-aaaaa-cai").unwrap() + } } #[ignore] @@ -424,7 +444,7 @@ mod tests { let (new_canister_id,) = management_canister .create_canister() .as_provisional_create_with_amount(None) - .with_effective_canister_id(get_effective_canister_id()) + .with_effective_canister_id(get_effective_canister_id().await) .call_and_wait() .await .unwrap(); diff --git a/icx/Cargo.toml b/icx/Cargo.toml index db8f197f..c1ac315c 100644 --- a/icx/Cargo.toml +++ b/icx/Cargo.toml @@ -28,7 +28,9 @@ hex = { workspace = true } humantime = "2.0.1" ic-agent = { workspace = true, default-features = true } ic-utils = { workspace = true } +pocket-ic = { workspace = true } rand = { workspace = true } +reqwest = { workspace = true } serde = { workspace = true } serde_json = { workspace = true } tokio = { workspace = true, features = ["full"] } diff --git a/icx/src/main.rs b/icx/src/main.rs index 450ba721..8d93ad30 100644 --- a/icx/src/main.rs +++ b/icx/src/main.rs @@ -268,7 +268,7 @@ pub fn get_effective_canister_id( method_name: &str, arg_value: &[u8], canister_id: Principal, -) -> Result { +) -> Result> { if is_management_canister { let method_name = MgmtMethod::from_str(method_name).with_context(|| { format!( @@ -284,7 +284,7 @@ pub fn get_effective_canister_id( MgmtMethod::InstallCode => { let install_args = Decode!(arg_value, CanisterInstall) .context("Argument is not valid for CanisterInstall")?; - Ok(install_args.canister_id) + Ok(Some(install_args.canister_id)) } MgmtMethod::StartCanister | MgmtMethod::StopCanister @@ -307,9 +307,9 @@ pub fn get_effective_canister_id( } let in_args = Decode!(arg_value, In).context("Argument is not a valid Principal")?; - Ok(in_args.canister_id) + Ok(Some(in_args.canister_id)) } - MgmtMethod::ProvisionalCreateCanisterWithCycles => Ok(Principal::management_canister()), + MgmtMethod::ProvisionalCreateCanisterWithCycles => Ok(None), MgmtMethod::UpdateSettings => { #[derive(CandidType, Deserialize)] struct In { @@ -318,7 +318,7 @@ pub fn get_effective_canister_id( } let in_args = Decode!(arg_value, In).context("Argument is not valid for UpdateSettings")?; - Ok(in_args.canister_id) + Ok(Some(in_args.canister_id)) } MgmtMethod::InstallChunkedCode => { #[derive(CandidType, Deserialize)] @@ -327,7 +327,7 @@ pub fn get_effective_canister_id( } let in_args = Decode!(arg_value, In) .context("Argument is not valid for InstallChunkedCode")?; - Ok(in_args.target_canister) + Ok(Some(in_args.target_canister)) } MgmtMethod::BitcoinGetBalance | MgmtMethod::BitcoinGetUtxos @@ -340,7 +340,7 @@ pub fn get_effective_canister_id( } } } else { - Ok(canister_id) + Ok(Some(canister_id)) } } @@ -362,6 +362,35 @@ async fn main() -> Result<()> { .build() .context("Failed to build the Agent")?; + let get_default_effective_canister_id = || async { + let client = reqwest::Client::new(); + let topology: pocket_ic::common::rest::Topology = client + .get(format!( + "{}{}", + opts.replica.trim_end_matches('/'), + "/_/topology" + )) + .send() + .await? + .json() + .await?; + let subnet = topology.get_app_subnets().into_iter().next().unwrap_or_else(|| + topology + .get_verified_app_subnets() + .into_iter() + .next() + .unwrap_or_else(|| topology.get_system_subnets().into_iter().next().unwrap_or_else(|| panic!("PocketIC topology contains no application, verified application, and system subnet."))), + ); + Ok::<_, reqwest::Error>(Principal::from_slice( + &topology.0.get(&subnet).unwrap().canister_ranges[0] + .start + .canister_id, + )) + }; + let default_effective_canister_id = get_default_effective_canister_id() + .await + .unwrap_or(Principal::management_canister()); + // You can handle information about subcommands by requesting their matches by name // (as below), requesting just the name used, or both at the same time match &opts.subcommand { @@ -384,7 +413,8 @@ async fn main() -> Result<()> { &arg, t.canister_id, ) - .context("Failed to get effective_canister_id for this call")?; + .context("Failed to get effective_canister_id for this call")? + .unwrap_or(default_effective_canister_id); if !t.serialize { let result = match &opts.subcommand { diff --git a/ref-tests/tests/ic-ref.rs b/ref-tests/tests/ic-ref.rs index 1cc6174f..15720e9e 100644 --- a/ref-tests/tests/ic-ref.rs +++ b/ref-tests/tests/ic-ref.rs @@ -764,7 +764,7 @@ mod management_canister { .await?; assert!( - result.cycles > 0_u64 && result.cycles < creation_fee, + result.cycles > 0_u64 && result.cycles < creation_fee + canister_initial_balance, "expected 0..{creation_fee}, got {}", result.cycles ); @@ -894,13 +894,25 @@ mod management_canister { #[ignore] #[test] fn subnet_metrics() { - with_universal_canister(|agent, _| async move { + with_agent(|agent| async move { + let ic00 = ManagementCanister::create(&agent); + + // create a canister on the root subnet + let registry_canister_id = Principal::from_text("rwlgt-iiaaa-aaaaa-aaaaa-cai").unwrap(); + let _ = ic00 + .create_canister() + .as_provisional_create_with_amount(None) + .with_effective_canister_id(registry_canister_id) + .call_and_wait() + .await?; + + // fetch root subnet metrics let metrics = agent .read_state_subnet_metrics(Principal::self_authenticating(&agent.read_root_key())) .await?; assert!( metrics.num_canisters >= 1, - "expected universal canister in num_canisters" + "expected a canister on the root subnet" ); Ok(()) }) From f436eff7e5841c424a4f30016edcc3cc747c43bd Mon Sep 17 00:00:00 2001 From: Martin Raszyk Date: Sun, 13 Oct 2024 11:39:20 +0200 Subject: [PATCH 09/21] clippy --- ref-tests/tests/ic-ref.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ref-tests/tests/ic-ref.rs b/ref-tests/tests/ic-ref.rs index 15720e9e..c9e2cf80 100644 --- a/ref-tests/tests/ic-ref.rs +++ b/ref-tests/tests/ic-ref.rs @@ -43,11 +43,11 @@ mod management_canister { }, Argument, }; + use ref_tests::get_effective_canister_id; use ref_tests::{ create_agent, create_basic_identity, create_prime256v1_identity, create_secp256k1_identity, with_agent, with_wallet_canister, }; - use ref_tests::{get_effective_canister_id, with_universal_canister}; use sha2::{Digest, Sha256}; use std::collections::HashSet; use std::convert::TryInto; From adbb312a63f0bacd94d8bc417bcc8b96c50629bc Mon Sep 17 00:00:00 2001 From: Martin Raszyk Date: Sun, 13 Oct 2024 12:39:41 +0200 Subject: [PATCH 10/21] cfg --- ic-utils/src/canister.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ic-utils/src/canister.rs b/ic-utils/src/canister.rs index af84e2e1..cfca30f4 100644 --- a/ic-utils/src/canister.rs +++ b/ic-utils/src/canister.rs @@ -393,8 +393,10 @@ mod tests { use ic_agent::identity::BasicIdentity; use rand::thread_rng; + #[cfg(unix)] const POCKET_IC: &str = "POCKET_IC"; + #[cfg(unix)] async fn get_effective_canister_id() -> Principal { if let Ok(pocket_ic_url) = std::env::var(POCKET_IC) { let client = reqwest::Client::new(); @@ -417,6 +419,7 @@ mod tests { } } + #[cfg(unix)] #[ignore] #[tokio::test] async fn simple() { From d29bda02e3e07d1b89c63a6035cfb0a280bc8e98 Mon Sep 17 00:00:00 2001 From: Martin Raszyk Date: Sun, 13 Oct 2024 12:49:47 +0200 Subject: [PATCH 11/21] cargo.toml --- ic-utils/Cargo.toml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ic-utils/Cargo.toml b/ic-utils/Cargo.toml index 35587555..8ca00b1a 100644 --- a/ic-utils/Cargo.toml +++ b/ic-utils/Cargo.toml @@ -33,11 +33,13 @@ once_cell = "1.10.0" [dev-dependencies] ed25519-consensus = { workspace = true } ic-agent = { workspace = true, default-features = true } -pocket-ic = { workspace = true } rand = { workspace = true } -reqwest = { workspace = true } tokio = { workspace = true, features = ["full"] } +[target.'cfg(unix)'.dev-dependencies] +pocket-ic = { workspace = true } +reqwest = { workspace = true } + [features] raw = [] From 8295cb1f796480e40bd7586d8933cf2e68bc5a61 Mon Sep 17 00:00:00 2001 From: Martin Raszyk Date: Mon, 14 Oct 2024 13:38:30 +0200 Subject: [PATCH 12/21] no cfg unix --- ic-utils/Cargo.toml | 6 ++---- ic-utils/src/canister.rs | 3 --- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/ic-utils/Cargo.toml b/ic-utils/Cargo.toml index 8ca00b1a..35587555 100644 --- a/ic-utils/Cargo.toml +++ b/ic-utils/Cargo.toml @@ -33,12 +33,10 @@ once_cell = "1.10.0" [dev-dependencies] ed25519-consensus = { workspace = true } ic-agent = { workspace = true, default-features = true } -rand = { workspace = true } -tokio = { workspace = true, features = ["full"] } - -[target.'cfg(unix)'.dev-dependencies] pocket-ic = { workspace = true } +rand = { workspace = true } reqwest = { workspace = true } +tokio = { workspace = true, features = ["full"] } [features] raw = [] diff --git a/ic-utils/src/canister.rs b/ic-utils/src/canister.rs index cfca30f4..af84e2e1 100644 --- a/ic-utils/src/canister.rs +++ b/ic-utils/src/canister.rs @@ -393,10 +393,8 @@ mod tests { use ic_agent::identity::BasicIdentity; use rand::thread_rng; - #[cfg(unix)] const POCKET_IC: &str = "POCKET_IC"; - #[cfg(unix)] async fn get_effective_canister_id() -> Principal { if let Ok(pocket_ic_url) = std::env::var(POCKET_IC) { let client = reqwest::Client::new(); @@ -419,7 +417,6 @@ mod tests { } } - #[cfg(unix)] #[ignore] #[tokio::test] async fn simple() { From 52c7a12d4f73a7dcca8de76139804ce2aa136c71 Mon Sep 17 00:00:00 2001 From: Martin Raszyk Date: Mon, 14 Oct 2024 13:39:37 +0200 Subject: [PATCH 13/21] no windows special case --- .github/workflows/test.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 33d5e1f7..c2ebcd3c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -35,14 +35,10 @@ jobs: run: | # Test all features and no features for each package. for p in $(cargo metadata --no-deps --format-version 1 | jq -r .packages[].manifest_path); do - # skip unit tests for integration tests on windows - # because integration tests cannot be run on windows anyway - if [[ ! ( ${{ matrix.os == 'windows-latest' }} && "$(echo ${p} | grep ref-tests)" ) ]]; then - pushd $(dirname $p) - cargo test --all-targets --all-features - cargo test --all-targets --no-default-features - popd - fi + pushd $(dirname $p) + cargo test --all-targets --all-features + cargo test --all-targets --no-default-features + popd done env: RUST_BACKTRACE: 1 From 41ea7584491e8c8e8fbc4b65b673dfdc72884aff Mon Sep 17 00:00:00 2001 From: Martin Raszyk Date: Fri, 25 Oct 2024 20:19:00 +0200 Subject: [PATCH 14/21] bump dfx version --- .github/workflows/ic-ref.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ic-ref.yml b/.github/workflows/ic-ref.yml index 01377a3e..7e03b896 100644 --- a/.github/workflows/ic-ref.yml +++ b/.github/workflows/ic-ref.yml @@ -28,7 +28,7 @@ jobs: - name: Install dfx uses: dfinity/setup-dfx@main with: - dfx-version: "0.24.1-beta.1" + dfx-version: "0.24.2-beta.0" - name: Cargo cache uses: actions/cache@v4 From 9f1ab39ea93cac1767261cfab5f16c6702d642cc Mon Sep 17 00:00:00 2001 From: Martin Raszyk Date: Fri, 25 Oct 2024 20:33:34 +0200 Subject: [PATCH 15/21] simplify --- Cargo.lock | 115 +++++++++++++++++++++++++++++++++------ Cargo.toml | 2 +- ic-utils/src/canister.rs | 20 ++----- icx/src/main.rs | 32 ++--------- ref-tests/src/utils.rs | 20 ++----- 5 files changed, 113 insertions(+), 76 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d8892088..af146349 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1001,6 +1001,17 @@ dependencies = [ "http", ] +[[package]] +name = "http-body-to-bytes" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17a08236c6f51c2ee95d840f45acf8fa9e339390e00b4ef640857b2f2a534d70" +dependencies = [ + "bytes", + "http-body", + "http-body-util", +] + [[package]] name = "http-body-util" version = "0.1.2" @@ -1092,6 +1103,53 @@ dependencies = [ "tracing", ] +[[package]] +name = "ic-agent" +version = "0.37.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fd3fdf5e5c4f4a9fe5ca612f0febd22dcb161d2f2b75b0142326732be5e4978" +dependencies = [ + "async-lock", + "backoff", + "cached", + "candid", + "ed25519-consensus", + "futures-util", + "hex", + "http", + "http-body", + "http-body-to-bytes", + "http-body-util", + "hyper", + "hyper-rustls", + "hyper-util", + "ic-certification", + "ic-transport-types 0.37.1", + "ic-verify-bls-signature", + "k256", + "leb128", + "p256", + "pem", + "pkcs8", + "rand", + "rangemap", + "reqwest", + "ring", + "rustls-webpki", + "sec1", + "serde", + "serde_bytes", + "serde_cbor", + "serde_repr", + "sha2 0.10.8", + "simple_asn1", + "thiserror", + "time", + "tokio", + "tower", + "url", +] + [[package]] name = "ic-agent" version = "0.39.1" @@ -1114,7 +1172,7 @@ dependencies = [ "http", "http-body", "ic-certification", - "ic-transport-types", + "ic-transport-types 0.39.1", "ic-verify-bls-signature", "js-sys", "k256", @@ -1151,9 +1209,9 @@ dependencies = [ [[package]] name = "ic-cdk" -version = "0.13.5" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b1da6a25b045f9da3c9459c0cb2b0700ac368ee16382975a17185a23b9c18ab" +checksum = "dd8ecacd682fa05a985253592963306cb9799622d7b1cce4b1edb89c6ec85be1" dependencies = [ "candid", "ic-cdk-macros", @@ -1164,16 +1222,16 @@ dependencies = [ [[package]] name = "ic-cdk-macros" -version = "0.13.2" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a45800053d80a6df839a71aaea5797e723188c0b992618208ca3b941350c7355" +checksum = "0d4d857135deef20cc7ea8f3869a30cd9cfeb1392b3a81043790b2cd82adc3e0" dependencies = [ "candid", "proc-macro2", "quote", "serde", "serde_tokenstream", - "syn 1.0.109", + "syn 2.0.76", ] [[package]] @@ -1193,13 +1251,30 @@ name = "ic-identity-hsm" version = "0.39.1" dependencies = [ "hex", - "ic-agent", + "ic-agent 0.39.1", "pkcs11", "sha2 0.10.8", "simple_asn1", "thiserror", ] +[[package]] +name = "ic-transport-types" +version = "0.37.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "875dc4704780383112e8e8b5063a1b98de114321d0c7d3e7f635dcf360a57fba" +dependencies = [ + "candid", + "hex", + "ic-certification", + "leb128", + "serde", + "serde_bytes", + "serde_repr", + "sha2 0.10.8", + "thiserror", +] + [[package]] name = "ic-transport-types" version = "0.39.1" @@ -1225,7 +1300,7 @@ dependencies = [ "candid", "ed25519-consensus", "futures-util", - "ic-agent", + "ic-agent 0.39.1", "once_cell", "pocket-ic", "rand", @@ -1257,9 +1332,9 @@ dependencies = [ [[package]] name = "ic0" -version = "0.21.1" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a54b5297861c651551676e8c43df805dad175cc33bc97dbd992edbbb85dcbcdf" +checksum = "8de254dd67bbd58073e23dc1c8553ba12fa1dc610a19de94ad2bbcd0460c067f" [[package]] name = "ic_bls12_381" @@ -1300,7 +1375,7 @@ dependencies = [ "ed25519-consensus", "hex", "humantime", - "ic-agent", + "ic-agent 0.39.1", "ic-utils", "pocket-ic", "rand", @@ -1869,20 +1944,23 @@ dependencies = [ [[package]] name = "pocket-ic" version = "5.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "beff607d4dbebff8d003453ced669d2645e905de496ca93713f3d47633357e6c" +source = "git+https://github.com/dfinity/ic?rev=3c76b9142f67da01393d9280c705f88b6e522a93#3c76b9142f67da01393d9280c705f88b6e522a93" dependencies = [ "base64 0.13.1", "candid", "hex", + "ic-agent 0.37.1", "ic-cdk", + "ic-transport-types 0.37.1", "reqwest", "schemars", "serde", "serde_bytes", + "serde_cbor", "serde_json", "sha2 0.10.8", "slog", + "thiserror", "tokio", "tracing", "tracing-appender", @@ -2067,7 +2145,7 @@ version = "0.0.0" dependencies = [ "candid", "ed25519-consensus", - "ic-agent", + "ic-agent 0.39.1", "ic-certification", "ic-identity-hsm", "ic-utils", @@ -2463,13 +2541,14 @@ dependencies = [ [[package]] name = "serde_tokenstream" -version = "0.1.7" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "797ba1d80299b264f3aac68ab5d12e5825a561749db4df7cd7c8083900c5d4e9" +checksum = "64060d864397305347a78851c51588fd283767e7e7589829e8121d65512340f1" dependencies = [ "proc-macro2", + "quote", "serde", - "syn 1.0.109", + "syn 2.0.76", ] [[package]] @@ -2906,6 +2985,7 @@ dependencies = [ "tokio", "tower-layer", "tower-service", + "tracing", ] [[package]] @@ -2926,6 +3006,7 @@ version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ + "log", "pin-project-lite", "tracing-attributes", "tracing-core", diff --git a/Cargo.toml b/Cargo.toml index 73b6df61..3c67d082 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,7 +35,7 @@ futures-util = "0.3.21" hex = "0.4.3" k256 = "0.13.4" leb128 = "0.2.5" -pocket-ic = "5.0.0" +pocket-ic = { git = "https://github.com/dfinity/ic", rev = "3c76b9142f67da01393d9280c705f88b6e522a93" } p256 = "0.13.2" rand = "0.8.5" reqwest = { version = "0.12", default-features = false } diff --git a/ic-utils/src/canister.rs b/ic-utils/src/canister.rs index 06cb57a2..e4f8bfd6 100644 --- a/ic-utils/src/canister.rs +++ b/ic-utils/src/canister.rs @@ -395,24 +395,14 @@ mod tests { const POCKET_IC: &str = "POCKET_IC"; async fn get_effective_canister_id() -> Principal { + let default_effective_canister_id = + Principal::from_text("rwlgt-iiaaa-aaaaa-aaaaa-cai").unwrap(); if let Ok(pocket_ic_url) = std::env::var(POCKET_IC) { - let client = reqwest::Client::new(); - let topology: pocket_ic::common::rest::Topology = client - .get(format!("{}{}", pocket_ic_url, "/_/topology")) - .send() + pocket_ic::nonblocking::get_default_effective_canister_id(pocket_ic_url) .await - .unwrap() - .json() - .await - .unwrap(); - let app_subnet = topology.get_app_subnets()[0]; - Principal::from_slice( - &topology.0.get(&app_subnet).unwrap().canister_ranges[0] - .start - .canister_id, - ) + .unwrap_or(default_effective_canister_id) } else { - Principal::from_text("rwlgt-iiaaa-aaaaa-aaaaa-cai").unwrap() + default_effective_canister_id } } diff --git a/icx/src/main.rs b/icx/src/main.rs index f017edf5..cd2d8666 100644 --- a/icx/src/main.rs +++ b/icx/src/main.rs @@ -352,34 +352,10 @@ async fn main() -> Result<()> { .build() .context("Failed to build the Agent")?; - let get_default_effective_canister_id = || async { - let client = reqwest::Client::new(); - let topology: pocket_ic::common::rest::Topology = client - .get(format!( - "{}{}", - opts.replica.trim_end_matches('/'), - "/_/topology" - )) - .send() - .await? - .json() - .await?; - let subnet = topology.get_app_subnets().into_iter().next().unwrap_or_else(|| - topology - .get_verified_app_subnets() - .into_iter() - .next() - .unwrap_or_else(|| topology.get_system_subnets().into_iter().next().unwrap_or_else(|| panic!("PocketIC topology contains no application, verified application, and system subnet."))), - ); - Ok::<_, reqwest::Error>(Principal::from_slice( - &topology.0.get(&subnet).unwrap().canister_ranges[0] - .start - .canister_id, - )) - }; - let default_effective_canister_id = get_default_effective_canister_id() - .await - .unwrap_or(Principal::management_canister()); + let default_effective_canister_id = + pocket_ic::nonblocking::get_default_effective_canister_id(opts.replica.clone()) + .await + .unwrap_or(Principal::management_canister()); // You can handle information about subcommands by requesting their matches by name // (as below), requesting just the name used, or both at the same time diff --git a/ref-tests/src/utils.rs b/ref-tests/src/utils.rs index 4c512f1e..254d4025 100644 --- a/ref-tests/src/utils.rs +++ b/ref-tests/src/utils.rs @@ -13,24 +13,14 @@ const HSM_PIN: &str = "HSM_PIN"; const POCKET_IC: &str = "POCKET_IC"; pub async fn get_effective_canister_id() -> Principal { + let default_effective_canister_id = + Principal::from_text("rwlgt-iiaaa-aaaaa-aaaaa-cai").unwrap(); if let Ok(pocket_ic_url) = std::env::var(POCKET_IC) { - let client = reqwest::Client::new(); - let topology: pocket_ic::common::rest::Topology = client - .get(format!("{}{}", pocket_ic_url, "/_/topology")) - .send() + pocket_ic::nonblocking::get_default_effective_canister_id(pocket_ic_url) .await - .unwrap() - .json() - .await - .unwrap(); - let app_subnet = topology.get_app_subnets()[0]; - Principal::from_slice( - &topology.0.get(&app_subnet).unwrap().canister_ranges[0] - .start - .canister_id, - ) + .unwrap_or(default_effective_canister_id) } else { - Principal::from_text("rwlgt-iiaaa-aaaaa-aaaaa-cai").unwrap() + default_effective_canister_id } } From 7cccaabf23da47a6d3357411aa944820a7577593 Mon Sep 17 00:00:00 2001 From: Martin Raszyk Date: Fri, 25 Oct 2024 20:34:44 +0200 Subject: [PATCH 16/21] simplify --- Cargo.lock | 3 --- ic-utils/Cargo.toml | 1 - icx/Cargo.toml | 1 - ref-tests/Cargo.toml | 1 - 4 files changed, 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index af146349..c0c2eca3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1304,7 +1304,6 @@ dependencies = [ "once_cell", "pocket-ic", "rand", - "reqwest", "semver", "serde", "serde_bytes", @@ -1379,7 +1378,6 @@ dependencies = [ "ic-utils", "pocket-ic", "rand", - "reqwest", "serde", "serde_json", "tokio", @@ -2153,7 +2151,6 @@ dependencies = [ "p256", "pocket-ic", "rand", - "reqwest", "serde", "serde_cbor", "sha2 0.10.8", diff --git a/ic-utils/Cargo.toml b/ic-utils/Cargo.toml index 35587555..91f314af 100644 --- a/ic-utils/Cargo.toml +++ b/ic-utils/Cargo.toml @@ -35,7 +35,6 @@ ed25519-consensus = { workspace = true } ic-agent = { workspace = true, default-features = true } pocket-ic = { workspace = true } rand = { workspace = true } -reqwest = { workspace = true } tokio = { workspace = true, features = ["full"] } [features] diff --git a/icx/Cargo.toml b/icx/Cargo.toml index c1ac315c..13e813dd 100644 --- a/icx/Cargo.toml +++ b/icx/Cargo.toml @@ -30,7 +30,6 @@ ic-agent = { workspace = true, default-features = true } ic-utils = { workspace = true } pocket-ic = { workspace = true } rand = { workspace = true } -reqwest = { workspace = true } serde = { workspace = true } serde_json = { workspace = true } tokio = { workspace = true, features = ["full"] } diff --git a/ref-tests/Cargo.toml b/ref-tests/Cargo.toml index 3c8f8188..07cc0629 100644 --- a/ref-tests/Cargo.toml +++ b/ref-tests/Cargo.toml @@ -16,7 +16,6 @@ k256 = { workspace = true } p256 = { workspace = true } pocket-ic = { workspace = true } rand = { workspace = true } -reqwest = { workspace = true } serde = { workspace = true, features = ["derive"] } sha2 = { workspace = true } tokio = { workspace = true, features = ["full"] } From 921b2722d918eececbac75897ccc030ddff6a155 Mon Sep 17 00:00:00 2001 From: Martin Raszyk Date: Sat, 2 Nov 2024 23:41:03 +0100 Subject: [PATCH 17/21] pocket-ic --- Cargo.lock | 627 +++++++++++++++++++---------------------------------- Cargo.toml | 2 +- 2 files changed, 223 insertions(+), 406 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c0c2eca3..b561cad0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,18 +4,18 @@ version = 3 [[package]] name = "addr2line" -version = "0.22.0" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ "gimli", ] [[package]] -name = "adler" -version = "1.0.2" +name = "adler2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" [[package]] name = "ahash" @@ -46,9 +46,9 @@ checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[package]] name = "anstream" -version = "0.6.15" +version = "0.6.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" +checksum = "23a1e53f0f5d86382dafe1cf314783b2044280f406e7e1506368220ad11b1338" dependencies = [ "anstyle", "anstyle-parse", @@ -61,43 +61,43 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.8" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" +checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" [[package]] name = "anstyle-parse" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" +checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" +checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.4" +version = "3.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" +checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125" dependencies = [ "anstyle", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "anyhow" -version = "1.0.86" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" +checksum = "74f37166d7d48a0284b99dd824694c26119c700b53bf0d1540cdb147dbdaaf13" dependencies = [ "backtrace", ] @@ -163,13 +163,13 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.81" +version = "0.1.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.87", ] [[package]] @@ -189,9 +189,9 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "backoff" @@ -206,17 +206,17 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.73" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cc", "cfg-if", "libc", "miniz_oxide", "object", "rustc-demangle", + "windows-targets 0.52.6", ] [[package]] @@ -325,9 +325,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.7.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" +checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" [[package]] name = "cached" @@ -336,7 +336,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8466736fe5dbcaf8b8ee24f9bbefe43c884dc3e9ff7178da70f55bffca1133c" dependencies = [ "ahash", - "hashbrown", + "hashbrown 0.14.5", "instant", "once_cell", "thiserror", @@ -374,7 +374,7 @@ dependencies = [ "lazy_static", "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.87", ] [[package]] @@ -398,9 +398,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.14" +version = "1.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d2eb3cd3d1bf4529e31c215ee6f93ec5a3d536d9f578f93d9d33ee19562932" +checksum = "67b9470d453346108f93a59222a9a1a5724db32d0a4727b7ab7ace4b4d822dc9" dependencies = [ "shlex", ] @@ -411,11 +411,17 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + [[package]] name = "clap" -version = "4.5.16" +version = "4.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed6719fffa43d0d87e5fd8caeab59be1554fb028cd30edc88fc4369b17971019" +checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8" dependencies = [ "clap_builder", "clap_derive", @@ -423,9 +429,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.15" +version = "4.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "216aec2b177652e3846684cbfe25c9964d18ec45234f0f5da5157b207ed1aab6" +checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54" dependencies = [ "anstream", "anstyle", @@ -435,14 +441,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.13" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" +checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.87", ] [[package]] @@ -463,9 +469,9 @@ dependencies = [ [[package]] name = "colorchoice" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" +checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" [[package]] name = "colored" @@ -529,9 +535,9 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" +checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" dependencies = [ "libc", ] @@ -814,9 +820,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -824,44 +830,44 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-macro" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.87", ] [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-core", "futures-io", @@ -900,9 +906,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.29.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "group" @@ -950,6 +956,12 @@ dependencies = [ "allocator-api2", ] +[[package]] +name = "hashbrown" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" + [[package]] name = "heck" version = "0.5.0" @@ -1001,17 +1013,6 @@ dependencies = [ "http", ] -[[package]] -name = "http-body-to-bytes" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17a08236c6f51c2ee95d840f45acf8fa9e339390e00b4ef640857b2f2a534d70" -dependencies = [ - "bytes", - "http-body", - "http-body-util", -] - [[package]] name = "http-body-util" version = "0.1.2" @@ -1027,9 +1028,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.9.4" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" +checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" [[package]] name = "httpdate" @@ -1045,9 +1046,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" +checksum = "bbbff0a806a4728c99295b254c8838933b5b082d75e3cb70c8dab21fdfbcfa9a" dependencies = [ "bytes", "futures-channel", @@ -1075,7 +1076,7 @@ dependencies = [ "hyper", "hyper-util", "rustls", - "rustls-native-certs 0.8.0", + "rustls-native-certs", "rustls-pki-types", "tokio", "tokio-rustls", @@ -1085,9 +1086,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.7" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde7055719c54e36e95e8719f95883f22072a48ede39db7fc17a4e1d5281e9b9" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" dependencies = [ "bytes", "futures-channel", @@ -1098,58 +1099,10 @@ dependencies = [ "pin-project-lite", "socket2", "tokio", - "tower", "tower-service", "tracing", ] -[[package]] -name = "ic-agent" -version = "0.37.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fd3fdf5e5c4f4a9fe5ca612f0febd22dcb161d2f2b75b0142326732be5e4978" -dependencies = [ - "async-lock", - "backoff", - "cached", - "candid", - "ed25519-consensus", - "futures-util", - "hex", - "http", - "http-body", - "http-body-to-bytes", - "http-body-util", - "hyper", - "hyper-rustls", - "hyper-util", - "ic-certification", - "ic-transport-types 0.37.1", - "ic-verify-bls-signature", - "k256", - "leb128", - "p256", - "pem", - "pkcs8", - "rand", - "rangemap", - "reqwest", - "ring", - "rustls-webpki", - "sec1", - "serde", - "serde_bytes", - "serde_cbor", - "serde_repr", - "sha2 0.10.8", - "simple_asn1", - "thiserror", - "time", - "tokio", - "tower", - "url", -] - [[package]] name = "ic-agent" version = "0.39.1" @@ -1207,33 +1160,6 @@ dependencies = [ "web-sys", ] -[[package]] -name = "ic-cdk" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8ecacd682fa05a985253592963306cb9799622d7b1cce4b1edb89c6ec85be1" -dependencies = [ - "candid", - "ic-cdk-macros", - "ic0", - "serde", - "serde_bytes", -] - -[[package]] -name = "ic-cdk-macros" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d4d857135deef20cc7ea8f3869a30cd9cfeb1392b3a81043790b2cd82adc3e0" -dependencies = [ - "candid", - "proc-macro2", - "quote", - "serde", - "serde_tokenstream", - "syn 2.0.76", -] - [[package]] name = "ic-certification" version = "2.6.0" @@ -1251,7 +1177,7 @@ name = "ic-identity-hsm" version = "0.39.1" dependencies = [ "hex", - "ic-agent 0.39.1", + "ic-agent", "pkcs11", "sha2 0.10.8", "simple_asn1", @@ -1300,7 +1226,7 @@ dependencies = [ "candid", "ed25519-consensus", "futures-util", - "ic-agent 0.39.1", + "ic-agent", "once_cell", "pocket-ic", "rand", @@ -1329,12 +1255,6 @@ dependencies = [ "sha2 0.10.8", ] -[[package]] -name = "ic0" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de254dd67bbd58073e23dc1c8553ba12fa1dc610a19de94ad2bbcd0460c067f" - [[package]] name = "ic_bls12_381" version = "0.10.0" @@ -1374,7 +1294,7 @@ dependencies = [ "ed25519-consensus", "hex", "humantime", - "ic-agent 0.39.1", + "ic-agent", "ic-utils", "pocket-ic", "rand", @@ -1413,12 +1333,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.4.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", - "hashbrown", + "hashbrown 0.15.0", ] [[package]] @@ -1435,9 +1355,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.9.0" +version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" [[package]] name = "is_terminal_polyfill" @@ -1462,9 +1382,9 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "js-sys" -version = "0.3.70" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" +checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" dependencies = [ "wasm-bindgen", ] @@ -1497,7 +1417,7 @@ dependencies = [ "petgraph", "pico-args", "regex", - "regex-syntax 0.8.4", + "regex-syntax 0.8.5", "string_cache", "term", "tiny-keccak", @@ -1511,7 +1431,7 @@ version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "507460a910eb7b32ee961886ff48539633b788a36b65692b95f225b844c82553" dependencies = [ - "regex-automata 0.4.7", + "regex-automata 0.4.8", ] [[package]] @@ -1528,9 +1448,9 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.158" +version = "0.2.161" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" +checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" [[package]] name = "libloading" @@ -1588,7 +1508,7 @@ dependencies = [ "proc-macro2", "quote", "regex-syntax 0.6.29", - "syn 2.0.76", + "syn 2.0.87", ] [[package]] @@ -1633,9 +1553,9 @@ dependencies = [ [[package]] name = "minicov" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c71e683cd655513b99affab7d317deb690528255a0d5f717f1024093c12b169" +checksum = "def6d99771d7c499c26ad4d40eb6645eafd3a1553b35fc26ea5a489a45e82d9a" dependencies = [ "cc", "walkdir", @@ -1643,11 +1563,11 @@ dependencies = [ [[package]] name = "miniz_oxide" -version = "0.7.4" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" dependencies = [ - "adler", + "adler2", ] [[package]] @@ -1750,18 +1670,18 @@ dependencies = [ [[package]] name = "object" -version = "0.36.3" +version = "0.36.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27b64972346851a39438c60b341ebc01bba47464ae329e55cf343eb93964efd9" +checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "opaque-debug" @@ -1804,9 +1724,9 @@ dependencies = [ [[package]] name = "parking" -version = "2.2.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" [[package]] name = "parking_lot" @@ -1887,31 +1807,11 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315" -[[package]] -name = "pin-project" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.76", -] - [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" [[package]] name = "pin-utils" @@ -1942,13 +1842,12 @@ dependencies = [ [[package]] name = "pocket-ic" version = "5.0.0" -source = "git+https://github.com/dfinity/ic?rev=3c76b9142f67da01393d9280c705f88b6e522a93#3c76b9142f67da01393d9280c705f88b6e522a93" +source = "git+https://github.com/dfinity/ic?rev=f2b767f15611fe8594a76cf21250e26524b07615#f2b767f15611fe8594a76cf21250e26524b07615" dependencies = [ "base64 0.13.1", "candid", "hex", - "ic-agent 0.37.1", - "ic-cdk", + "ic-certification", "ic-transport-types 0.37.1", "reqwest", "schemars", @@ -1958,11 +1857,14 @@ dependencies = [ "serde_json", "sha2 0.10.8", "slog", + "strum", + "strum_macros", "thiserror", "tokio", "tracing", "tracing-appender", "tracing-subscriber", + "wslpath", ] [[package]] @@ -2008,27 +1910,27 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" dependencies = [ "unicode-ident", ] [[package]] name = "psm" -version = "0.1.21" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5787f7cda34e3033a72192c018bc5883100330f362ef279a8cbccfce8bb4e874" +checksum = "aa37f80ca58604976033fae9515a8a2989fc13797d953f7c04fb8fa36a11f205" dependencies = [ "cc", ] [[package]] name = "quinn" -version = "0.11.3" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b22d8e7369034b9a7132bc2008cac12f2013c8132b45e0554e6e20e2617f2156" +checksum = "8c7c5fdde3cdae7203427dc4f0a68fe0ed09833edc525a03456b153b79828684" dependencies = [ "bytes", "pin-project-lite", @@ -2061,15 +1963,16 @@ dependencies = [ [[package]] name = "quinn-udp" -version = "0.5.4" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bffec3605b73c6f1754535084a85229fa8a30f86014e6c81aeec4abb68b0285" +checksum = "e346e016eacfff12233c243718197ca12f148c84e1e84268a896699b41c71780" dependencies = [ + "cfg_aliases", "libc", "once_cell", "socket2", "tracing", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2119,9 +2022,9 @@ checksum = "f60fcc7d6849342eff22c4350c8b9a989ee8ceabc4b481253e8946b9fe83d684" [[package]] name = "redox_syscall" -version = "0.5.3" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" +checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" dependencies = [ "bitflags", ] @@ -2143,7 +2046,7 @@ version = "0.0.0" dependencies = [ "candid", "ed25519-consensus", - "ic-agent 0.39.1", + "ic-agent", "ic-certification", "ic-identity-hsm", "ic-utils", @@ -2159,14 +2062,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.6" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.7", - "regex-syntax 0.8.4", + "regex-automata 0.4.8", + "regex-syntax 0.8.5", ] [[package]] @@ -2180,13 +2083,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.4", + "regex-syntax 0.8.5", ] [[package]] @@ -2197,15 +2100,15 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" -version = "0.12.7" +version = "0.12.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8f4955649ef5c38cc7f9e8aa41761d48fb9677197daea9984dc54f56aad5e63" +checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f" dependencies = [ "base64 0.22.1", "bytes", @@ -2229,7 +2132,7 @@ dependencies = [ "pin-project-lite", "quinn", "rustls", - "rustls-native-certs 0.7.3", + "rustls-native-certs", "rustls-pemfile", "rustls-pki-types", "serde", @@ -2289,9 +2192,9 @@ checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" [[package]] name = "rustls" -version = "0.23.14" +version = "0.23.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "415d9944693cb90382053259f89fbb077ea730ad7273047ec63b19bc9b160ba8" +checksum = "eee87ff5d9b36712a58574e12e9f0ea80f915a5b0ac518d322b24a465617925e" dependencies = [ "once_cell", "ring", @@ -2301,19 +2204,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "rustls-native-certs" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5bfb394eeed242e909609f56089eecfe5fda225042e8b171791b9c95f5931e5" -dependencies = [ - "openssl-probe", - "rustls-pemfile", - "rustls-pki-types", - "schannel", - "security-framework", -] - [[package]] name = "rustls-native-certs" version = "0.8.0" @@ -2329,19 +2219,18 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "2.1.3" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "196fe16b00e106300d3e45ecfcb764fa292a535d7326a29a5875c579c7417425" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" dependencies = [ - "base64 0.22.1", "rustls-pki-types", ] [[package]] name = "rustls-pki-types" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e696e35370c65c9c541198af4543ccd580cf17fc25d8e05c5a242b202488c55" +checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" [[package]] name = "rustls-webpki" @@ -2356,9 +2245,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" +checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" [[package]] name = "ryu" @@ -2405,7 +2294,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.76", + "syn 2.0.87", ] [[package]] @@ -2465,9 +2354,9 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.209" +version = "1.0.214" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" +checksum = "f55c3193aca71c12ad7890f1785d2b73e1b9f63a0bbc353c08ef26fe03fc56b5" dependencies = [ "serde_derive", ] @@ -2493,13 +2382,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.209" +version = "1.0.214" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" +checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.87", ] [[package]] @@ -2510,14 +2399,14 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.87", ] [[package]] name = "serde_json" -version = "1.0.127" +version = "1.0.132" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad" +checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" dependencies = [ "itoa", "memchr", @@ -2533,19 +2422,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", -] - -[[package]] -name = "serde_tokenstream" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64060d864397305347a78851c51588fd283767e7e7589829e8121d65512340f1" -dependencies = [ - "proc-macro2", - "quote", - "serde", - "syn 2.0.76", + "syn 2.0.87", ] [[package]] @@ -2694,15 +2571,15 @@ dependencies = [ [[package]] name = "stacker" -version = "0.1.16" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a5daa25ea337c85ed954c0496e3bdd2c7308cc3b24cf7b50d04876654c579f" +checksum = "799c883d55abdb5e98af1a7b3f23b9b6de8ecada0ecac058672d7635eb48ca7b" dependencies = [ "cc", "cfg-if", "libc", "psm", - "windows-sys 0.36.1", + "windows-sys 0.59.0", ] [[package]] @@ -2741,6 +2618,9 @@ name = "strum" version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" +dependencies = [ + "strum_macros", +] [[package]] name = "strum_macros" @@ -2752,7 +2632,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.76", + "syn 2.0.87", ] [[package]] @@ -2780,9 +2660,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.76" +version = "2.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578e081a14e0cefc3279b0472138c513f37b41a08d5a3cca9b6e4e8ceb6cd525" +checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" dependencies = [ "proc-macro2", "quote", @@ -2820,22 +2700,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.63" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" +checksum = "5d171f59dbaa811dbbb1aee1e73db92ec2b122911a48e1390dfe327a821ddede" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.63" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" +checksum = "b08be0f17bd307950653ce45db00cd31200d82b624b36e181337d9c7d92765b5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.87", ] [[package]] @@ -2906,9 +2786,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.40.0" +version = "1.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" +checksum = "145f3413504347a2be84393cc8a7d2fb4d863b375909ea59f2158261aa258bbb" dependencies = [ "backtrace", "bytes", @@ -2930,7 +2810,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.87", ] [[package]] @@ -2958,9 +2838,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.11" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" +checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" dependencies = [ "bytes", "futures-core", @@ -2969,28 +2849,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "tower" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" -dependencies = [ - "futures-core", - "futures-util", - "pin-project", - "pin-project-lite", - "tokio", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "tower-layer" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" - [[package]] name = "tower-service" version = "0.3.3" @@ -3003,7 +2861,6 @@ version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "log", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -3029,7 +2886,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.87", ] [[package]] @@ -3104,51 +2961,48 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "unicase" -version = "2.7.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" -dependencies = [ - "version_check", -] +checksum = "7e51b68083f157f853b6379db119d1c1be0e6e4dec98101079dec41f6f5cf6df" [[package]] name = "unicode-bidi" -version = "0.3.15" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" +checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-normalization" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" dependencies = [ "tinyvec", ] [[package]] name = "unicode-segmentation" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "unicode-width" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" [[package]] name = "unicode-xid" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "229730647fbc343e3a80e463c1db7f78f3855d3f3739bee0dda773c9a037c90a" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "untrusted" @@ -3212,9 +3066,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" +checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" dependencies = [ "cfg-if", "once_cell", @@ -3223,24 +3077,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" +checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.87", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.43" +version = "0.4.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" +checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" dependencies = [ "cfg-if", "js-sys", @@ -3250,9 +3104,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" +checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3260,28 +3114,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" +checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.87", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" +checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" [[package]] name = "wasm-bindgen-test" -version = "0.3.43" +version = "0.3.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68497a05fb21143a08a7d24fc81763384a3072ee43c44e86aad1744d6adef9d9" +checksum = "d381749acb0943d357dcbd8f0b100640679883fcdeeef04def49daf8d33a5426" dependencies = [ "console_error_panic_hook", "js-sys", @@ -3294,20 +3148,20 @@ dependencies = [ [[package]] name = "wasm-bindgen-test-macro" -version = "0.3.43" +version = "0.3.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b8220be1fa9e4c889b30fd207d4906657e7e90b12e0e6b0c8b8d8709f5de021" +checksum = "c97b2ef2c8d627381e51c071c2ab328eac606d3f69dd82bcbca20a9e389d95f0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.87", ] [[package]] name = "wasm-streams" -version = "0.4.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129" +checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65" dependencies = [ "futures-util", "js-sys", @@ -3318,9 +3172,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.70" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" +checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" dependencies = [ "js-sys", "wasm-bindgen", @@ -3328,9 +3182,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.26.3" +version = "0.26.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd7c23921eeb1713a4e851530e9b9756e4fb0e89978582942612524cf09f01cd" +checksum = "841c67bff177718f1d4dfefde8d8f0e78f9b6589319ba88312f567fc5841a958" dependencies = [ "rustls-pki-types", ] @@ -3396,19 +3250,6 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "windows-sys" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" -dependencies = [ - "windows_aarch64_msvc 0.36.1", - "windows_i686_gnu 0.36.1", - "windows_i686_msvc 0.36.1", - "windows_x86_64_gnu 0.36.1", - "windows_x86_64_msvc 0.36.1", -] - [[package]] name = "windows-sys" version = "0.48.0" @@ -3479,12 +3320,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" -[[package]] -name = "windows_aarch64_msvc" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" - [[package]] name = "windows_aarch64_msvc" version = "0.48.5" @@ -3497,12 +3332,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" -[[package]] -name = "windows_i686_gnu" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" - [[package]] name = "windows_i686_gnu" version = "0.48.5" @@ -3521,12 +3350,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" -[[package]] -name = "windows_i686_msvc" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" - [[package]] name = "windows_i686_msvc" version = "0.48.5" @@ -3539,12 +3362,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" -[[package]] -name = "windows_x86_64_gnu" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" - [[package]] name = "windows_x86_64_gnu" version = "0.48.5" @@ -3569,12 +3386,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" -[[package]] -name = "windows_x86_64_msvc" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" - [[package]] name = "windows_x86_64_msvc" version = "0.48.5" @@ -3587,6 +3398,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +[[package]] +name = "wslpath" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04a2ecdf2cc4d33a6a93d71bcfbc00bb1f635cdb8029a2cc0709204a045ec7a3" + [[package]] name = "zerocopy" version = "0.7.35" @@ -3605,7 +3422,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.87", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 3c67d082..8232a11f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,7 +35,7 @@ futures-util = "0.3.21" hex = "0.4.3" k256 = "0.13.4" leb128 = "0.2.5" -pocket-ic = { git = "https://github.com/dfinity/ic", rev = "3c76b9142f67da01393d9280c705f88b6e522a93" } +pocket-ic = { git = "https://github.com/dfinity/ic", rev = "f2b767f15611fe8594a76cf21250e26524b07615" } p256 = "0.13.2" rand = "0.8.5" reqwest = { version = "0.12", default-features = false } From 35bd37f6e70a9d87604709a7491e9da2bbb2db1a Mon Sep 17 00:00:00 2001 From: Martin Raszyk Date: Fri, 15 Nov 2024 16:24:41 +0100 Subject: [PATCH 18/21] deps --- .github/workflows/ic-ref.yml | 6 +- Cargo.lock | 478 ++++++++++++++++++++--------------- Cargo.toml | 2 +- 3 files changed, 280 insertions(+), 206 deletions(-) diff --git a/.github/workflows/ic-ref.yml b/.github/workflows/ic-ref.yml index 7e03b896..8cdbe00c 100644 --- a/.github/workflows/ic-ref.yml +++ b/.github/workflows/ic-ref.yml @@ -28,7 +28,7 @@ jobs: - name: Install dfx uses: dfinity/setup-dfx@main with: - dfx-version: "0.24.2-beta.0" + dfx-version: "0.24.1" - name: Cargo cache uses: actions/cache@v4 @@ -72,7 +72,7 @@ jobs: export IC_UNIVERSAL_CANISTER_PATH=$HOME/canister.wasm export IC_WALLET_CANISTER_PATH=$HOME/wallet.wasm export POCKET_IC="http://localhost:${IC_REF_PORT}" - cargo test --all-features -- --ignored --test-threads=1 # TODO: drop --test-threads=1 + cargo test --all-features -- --ignored dfx stop env: RUST_BACKTRACE: 1 @@ -147,7 +147,7 @@ jobs: sleep 1 export IC_REF_PORT=$(dfx info webserver-port) export POCKET_IC="http://localhost:${IC_REF_PORT}" - cargo test --all-features --doc -- --ignored --test-threads=1 # TODO: drop --test-threads=1 + cargo test --all-features --doc -- --ignored dfx stop env: RUST_BACKTRACE: 1 diff --git a/Cargo.lock b/Cargo.lock index b561cad0..011cedf0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,18 +4,18 @@ version = 3 [[package]] name = "addr2line" -version = "0.24.2" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" +checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" dependencies = [ "gimli", ] [[package]] -name = "adler2" -version = "2.0.0" +name = "adler" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "ahash" @@ -46,9 +46,9 @@ checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[package]] name = "anstream" -version = "0.6.17" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23a1e53f0f5d86382dafe1cf314783b2044280f406e7e1506368220ad11b1338" +checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" dependencies = [ "anstyle", "anstyle-parse", @@ -61,43 +61,43 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.10" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" +checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" [[package]] name = "anstyle-parse" -version = "0.2.6" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" +checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.2" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" +checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.6" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125" +checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" dependencies = [ "anstyle", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] name = "anyhow" -version = "1.0.92" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74f37166d7d48a0284b99dd824694c26119c700b53bf0d1540cdb147dbdaaf13" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" dependencies = [ "backtrace", ] @@ -163,13 +163,13 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.83" +version = "0.1.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" +checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.76", ] [[package]] @@ -189,9 +189,9 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" -version = "1.4.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "backoff" @@ -206,17 +206,17 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.74" +version = "0.3.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" +checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" dependencies = [ "addr2line", + "cc", "cfg-if", "libc", "miniz_oxide", "object", "rustc-demangle", - "windows-targets 0.52.6", ] [[package]] @@ -325,9 +325,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.8.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" +checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" [[package]] name = "cached" @@ -336,7 +336,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8466736fe5dbcaf8b8ee24f9bbefe43c884dc3e9ff7178da70f55bffca1133c" dependencies = [ "ahash", - "hashbrown 0.14.5", + "hashbrown", "instant", "once_cell", "thiserror", @@ -374,7 +374,7 @@ dependencies = [ "lazy_static", "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.76", ] [[package]] @@ -398,9 +398,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.34" +version = "1.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b9470d453346108f93a59222a9a1a5724db32d0a4727b7ab7ace4b4d822dc9" +checksum = "50d2eb3cd3d1bf4529e31c215ee6f93ec5a3d536d9f578f93d9d33ee19562932" dependencies = [ "shlex", ] @@ -411,17 +411,11 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -[[package]] -name = "cfg_aliases" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" - [[package]] name = "clap" -version = "4.5.20" +version = "4.5.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8" +checksum = "ed6719fffa43d0d87e5fd8caeab59be1554fb028cd30edc88fc4369b17971019" dependencies = [ "clap_builder", "clap_derive", @@ -429,9 +423,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.20" +version = "4.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54" +checksum = "216aec2b177652e3846684cbfe25c9964d18ec45234f0f5da5157b207ed1aab6" dependencies = [ "anstream", "anstyle", @@ -441,14 +435,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.18" +version = "4.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" +checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.76", ] [[package]] @@ -469,9 +463,9 @@ dependencies = [ [[package]] name = "colorchoice" -version = "1.0.3" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" +checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" [[package]] name = "colored" @@ -535,9 +529,9 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.14" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" +checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" dependencies = [ "libc", ] @@ -820,9 +814,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.31" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ "futures-core", "futures-sink", @@ -830,44 +824,44 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.31" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] name = "futures-io" -version = "0.3.31" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] name = "futures-macro" -version = "0.3.31" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.76", ] [[package]] name = "futures-sink" -version = "0.3.31" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" [[package]] name = "futures-task" -version = "0.3.31" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-util" -version = "0.3.31" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ "futures-core", "futures-io", @@ -906,9 +900,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.31.1" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" [[package]] name = "group" @@ -956,12 +950,6 @@ dependencies = [ "allocator-api2", ] -[[package]] -name = "hashbrown" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" - [[package]] name = "heck" version = "0.5.0" @@ -1028,9 +1016,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.9.5" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" +checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" [[package]] name = "httpdate" @@ -1046,9 +1034,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "1.5.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbbff0a806a4728c99295b254c8838933b5b082d75e3cb70c8dab21fdfbcfa9a" +checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" dependencies = [ "bytes", "futures-channel", @@ -1086,9 +1074,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.10" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" +checksum = "cde7055719c54e36e95e8719f95883f22072a48ede39db7fc17a4e1d5281e9b9" dependencies = [ "bytes", "futures-channel", @@ -1099,6 +1087,7 @@ dependencies = [ "pin-project-lite", "socket2", "tokio", + "tower", "tower-service", "tracing", ] @@ -1333,12 +1322,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.6.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" +checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c" dependencies = [ "equivalent", - "hashbrown 0.15.0", + "hashbrown", ] [[package]] @@ -1355,9 +1344,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.10.1" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "is_terminal_polyfill" @@ -1382,9 +1371,9 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "js-sys" -version = "0.3.72" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" dependencies = [ "wasm-bindgen", ] @@ -1417,7 +1406,7 @@ dependencies = [ "petgraph", "pico-args", "regex", - "regex-syntax 0.8.5", + "regex-syntax 0.8.4", "string_cache", "term", "tiny-keccak", @@ -1431,7 +1420,7 @@ version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "507460a910eb7b32ee961886ff48539633b788a36b65692b95f225b844c82553" dependencies = [ - "regex-automata 0.4.8", + "regex-automata 0.4.7", ] [[package]] @@ -1448,9 +1437,9 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.161" +version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "libloading" @@ -1508,7 +1497,7 @@ dependencies = [ "proc-macro2", "quote", "regex-syntax 0.6.29", - "syn 2.0.87", + "syn 2.0.76", ] [[package]] @@ -1553,9 +1542,9 @@ dependencies = [ [[package]] name = "minicov" -version = "0.3.6" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "def6d99771d7c499c26ad4d40eb6645eafd3a1553b35fc26ea5a489a45e82d9a" +checksum = "5c71e683cd655513b99affab7d317deb690528255a0d5f717f1024093c12b169" dependencies = [ "cc", "walkdir", @@ -1563,11 +1552,11 @@ dependencies = [ [[package]] name = "miniz_oxide" -version = "0.8.0" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" dependencies = [ - "adler2", + "adler", ] [[package]] @@ -1670,18 +1659,18 @@ dependencies = [ [[package]] name = "object" -version = "0.36.5" +version = "0.36.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" +checksum = "27b64972346851a39438c60b341ebc01bba47464ae329e55cf343eb93964efd9" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.20.2" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "opaque-debug" @@ -1724,9 +1713,9 @@ dependencies = [ [[package]] name = "parking" -version = "2.2.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" +checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" [[package]] name = "parking_lot" @@ -1807,11 +1796,31 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315" +[[package]] +name = "pin-project" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.76", +] + [[package]] name = "pin-project-lite" -version = "0.2.15" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pin-utils" @@ -1841,8 +1850,9 @@ dependencies = [ [[package]] name = "pocket-ic" -version = "5.0.0" -source = "git+https://github.com/dfinity/ic?rev=f2b767f15611fe8594a76cf21250e26524b07615#f2b767f15611fe8594a76cf21250e26524b07615" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "124a2380ca6f557adf8b02517cbfd2f564113230e14cda6f6aadd3dfe156293c" dependencies = [ "base64 0.13.1", "candid", @@ -1910,27 +1920,27 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.89" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "psm" -version = "0.1.23" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa37f80ca58604976033fae9515a8a2989fc13797d953f7c04fb8fa36a11f205" +checksum = "5787f7cda34e3033a72192c018bc5883100330f362ef279a8cbccfce8bb4e874" dependencies = [ "cc", ] [[package]] name = "quinn" -version = "0.11.5" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c7c5fdde3cdae7203427dc4f0a68fe0ed09833edc525a03456b153b79828684" +checksum = "b22d8e7369034b9a7132bc2008cac12f2013c8132b45e0554e6e20e2617f2156" dependencies = [ "bytes", "pin-project-lite", @@ -1963,16 +1973,15 @@ dependencies = [ [[package]] name = "quinn-udp" -version = "0.5.6" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e346e016eacfff12233c243718197ca12f148c84e1e84268a896699b41c71780" +checksum = "8bffec3605b73c6f1754535084a85229fa8a30f86014e6c81aeec4abb68b0285" dependencies = [ - "cfg_aliases", "libc", "once_cell", "socket2", "tracing", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -2022,9 +2031,9 @@ checksum = "f60fcc7d6849342eff22c4350c8b9a989ee8ceabc4b481253e8946b9fe83d684" [[package]] name = "redox_syscall" -version = "0.5.7" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" +checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" dependencies = [ "bitflags", ] @@ -2062,14 +2071,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.11.1" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.8", - "regex-syntax 0.8.5", + "regex-automata 0.4.7", + "regex-syntax 0.8.4", ] [[package]] @@ -2083,13 +2092,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.8" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.5", + "regex-syntax 0.8.4", ] [[package]] @@ -2100,9 +2109,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.5" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "reqwest" @@ -2192,9 +2201,9 @@ checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" [[package]] name = "rustls" -version = "0.23.16" +version = "0.23.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eee87ff5d9b36712a58574e12e9f0ea80f915a5b0ac518d322b24a465617925e" +checksum = "415d9944693cb90382053259f89fbb077ea730ad7273047ec63b19bc9b160ba8" dependencies = [ "once_cell", "ring", @@ -2219,18 +2228,19 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "2.2.0" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" +checksum = "196fe16b00e106300d3e45ecfcb764fa292a535d7326a29a5875c579c7417425" dependencies = [ + "base64 0.22.1", "rustls-pki-types", ] [[package]] name = "rustls-pki-types" -version = "1.10.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" +checksum = "0e696e35370c65c9c541198af4543ccd580cf17fc25d8e05c5a242b202488c55" [[package]] name = "rustls-webpki" @@ -2245,9 +2255,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.18" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" [[package]] name = "ryu" @@ -2294,7 +2304,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.87", + "syn 2.0.76", ] [[package]] @@ -2338,9 +2348,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.12.0" +version = "2.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" +checksum = "fa39c7303dc58b5543c94d22c1766b0d31f2ee58306363ea622b10bbc075eaa2" dependencies = [ "core-foundation-sys", "libc", @@ -2354,9 +2364,9 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.214" +version = "1.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f55c3193aca71c12ad7890f1785d2b73e1b9f63a0bbc353c08ef26fe03fc56b5" +checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" dependencies = [ "serde_derive", ] @@ -2382,13 +2392,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.214" +version = "1.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766" +checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.76", ] [[package]] @@ -2399,14 +2409,14 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.76", ] [[package]] name = "serde_json" -version = "1.0.132" +version = "1.0.127" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" +checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad" dependencies = [ "itoa", "memchr", @@ -2422,7 +2432,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.76", ] [[package]] @@ -2571,15 +2581,15 @@ dependencies = [ [[package]] name = "stacker" -version = "0.1.17" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "799c883d55abdb5e98af1a7b3f23b9b6de8ecada0ecac058672d7635eb48ca7b" +checksum = "95a5daa25ea337c85ed954c0496e3bdd2c7308cc3b24cf7b50d04876654c579f" dependencies = [ "cc", "cfg-if", "libc", "psm", - "windows-sys 0.59.0", + "windows-sys 0.36.1", ] [[package]] @@ -2632,7 +2642,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.87", + "syn 2.0.76", ] [[package]] @@ -2660,9 +2670,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.87" +version = "2.0.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" +checksum = "578e081a14e0cefc3279b0472138c513f37b41a08d5a3cca9b6e4e8ceb6cd525" dependencies = [ "proc-macro2", "quote", @@ -2700,22 +2710,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.66" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d171f59dbaa811dbbb1aee1e73db92ec2b122911a48e1390dfe327a821ddede" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.66" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b08be0f17bd307950653ce45db00cd31200d82b624b36e181337d9c7d92765b5" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.76", ] [[package]] @@ -2786,9 +2796,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.41.0" +version = "1.41.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "145f3413504347a2be84393cc8a7d2fb4d863b375909ea59f2158261aa258bbb" +checksum = "22cfb5bee7a6a52939ca9224d6ac897bb669134078daa8735560897f69de4d33" dependencies = [ "backtrace", "bytes", @@ -2810,7 +2820,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.76", ] [[package]] @@ -2838,9 +2848,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.12" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" +checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" dependencies = [ "bytes", "futures-core", @@ -2849,6 +2859,27 @@ dependencies = [ "tokio", ] +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "pin-project", + "pin-project-lite", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + [[package]] name = "tower-service" version = "0.3.3" @@ -2886,7 +2917,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.76", ] [[package]] @@ -2967,42 +2998,42 @@ checksum = "7e51b68083f157f853b6379db119d1c1be0e6e4dec98101079dec41f6f5cf6df" [[package]] name = "unicode-bidi" -version = "0.3.17" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" -version = "1.0.13" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" -version = "0.1.24" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" dependencies = [ "tinyvec", ] [[package]] name = "unicode-segmentation" -version = "1.12.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" +checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" [[package]] name = "unicode-width" -version = "0.1.14" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" +checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" [[package]] name = "unicode-xid" -version = "0.2.6" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" +checksum = "229730647fbc343e3a80e463c1db7f78f3855d3f3739bee0dda773c9a037c90a" [[package]] name = "untrusted" @@ -3066,9 +3097,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.95" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ "cfg-if", "once_cell", @@ -3077,24 +3108,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.95" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.76", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.45" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" +checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" dependencies = [ "cfg-if", "js-sys", @@ -3104,9 +3135,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.95" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3114,28 +3145,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.95" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.76", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.95" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "wasm-bindgen-test" -version = "0.3.45" +version = "0.3.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d381749acb0943d357dcbd8f0b100640679883fcdeeef04def49daf8d33a5426" +checksum = "68497a05fb21143a08a7d24fc81763384a3072ee43c44e86aad1744d6adef9d9" dependencies = [ "console_error_panic_hook", "js-sys", @@ -3148,20 +3179,20 @@ dependencies = [ [[package]] name = "wasm-bindgen-test-macro" -version = "0.3.45" +version = "0.3.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c97b2ef2c8d627381e51c071c2ab328eac606d3f69dd82bcbca20a9e389d95f0" +checksum = "4b8220be1fa9e4c889b30fd207d4906657e7e90b12e0e6b0c8b8d8709f5de021" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.76", ] [[package]] name = "wasm-streams" -version = "0.4.2" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65" +checksum = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129" dependencies = [ "futures-util", "js-sys", @@ -3172,9 +3203,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.72" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" +checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" dependencies = [ "js-sys", "wasm-bindgen", @@ -3182,9 +3213,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.26.6" +version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841c67bff177718f1d4dfefde8d8f0e78f9b6589319ba88312f567fc5841a958" +checksum = "bd7c23921eeb1713a4e851530e9b9756e4fb0e89978582942612524cf09f01cd" dependencies = [ "rustls-pki-types", ] @@ -3250,6 +3281,19 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-sys" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" +dependencies = [ + "windows_aarch64_msvc 0.36.1", + "windows_i686_gnu 0.36.1", + "windows_i686_msvc 0.36.1", + "windows_x86_64_gnu 0.36.1", + "windows_x86_64_msvc 0.36.1", +] + [[package]] name = "windows-sys" version = "0.48.0" @@ -3320,6 +3364,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +[[package]] +name = "windows_aarch64_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" + [[package]] name = "windows_aarch64_msvc" version = "0.48.5" @@ -3332,6 +3382,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +[[package]] +name = "windows_i686_gnu" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" + [[package]] name = "windows_i686_gnu" version = "0.48.5" @@ -3350,6 +3406,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +[[package]] +name = "windows_i686_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" + [[package]] name = "windows_i686_msvc" version = "0.48.5" @@ -3362,6 +3424,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +[[package]] +name = "windows_x86_64_gnu" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" + [[package]] name = "windows_x86_64_gnu" version = "0.48.5" @@ -3386,6 +3454,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +[[package]] +name = "windows_x86_64_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" + [[package]] name = "windows_x86_64_msvc" version = "0.48.5" @@ -3422,7 +3496,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.76", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 8232a11f..e2e9cffa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,7 +35,7 @@ futures-util = "0.3.21" hex = "0.4.3" k256 = "0.13.4" leb128 = "0.2.5" -pocket-ic = { git = "https://github.com/dfinity/ic", rev = "f2b767f15611fe8594a76cf21250e26524b07615" } +pocket-ic = "6.0.0" p256 = "0.13.2" rand = "0.8.5" reqwest = { version = "0.12", default-features = false } From 1a7865025a88f4a269cc82144321b4618c2a03a5 Mon Sep 17 00:00:00 2001 From: Martin Raszyk Date: Fri, 15 Nov 2024 16:25:37 +0100 Subject: [PATCH 19/21] dfx --- .github/workflows/ic-ref.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ic-ref.yml b/.github/workflows/ic-ref.yml index 8cdbe00c..2ae11986 100644 --- a/.github/workflows/ic-ref.yml +++ b/.github/workflows/ic-ref.yml @@ -28,7 +28,7 @@ jobs: - name: Install dfx uses: dfinity/setup-dfx@main with: - dfx-version: "0.24.1" + dfx-version: "0.24.2" - name: Cargo cache uses: actions/cache@v4 From a5a08947354f3f036dd4eaf2fc6b628c4e835d7e Mon Sep 17 00:00:00 2001 From: Martin Raszyk Date: Fri, 15 Nov 2024 16:45:57 +0100 Subject: [PATCH 20/21] ci --- .github/workflows/ic-ref.yml | 80 ++++++++++++++---------------------- 1 file changed, 31 insertions(+), 49 deletions(-) diff --git a/.github/workflows/ic-ref.yml b/.github/workflows/ic-ref.yml index 2ae11986..e3498bfb 100644 --- a/.github/workflows/ic-ref.yml +++ b/.github/workflows/ic-ref.yml @@ -12,6 +12,7 @@ jobs: strategy: matrix: build: [linux-stable] + pocket-ic: ["0", "1"] include: - build: linux-stable ic-hs-ref: "3d71032e" @@ -53,25 +54,20 @@ jobs: - name: Run Integration Tests run: | set -ex - dfx start --background --clean - sleep 1 - export IC_REF_PORT=$(dfx info replica-port) - export IC_UNIVERSAL_CANISTER_PATH=$HOME/canister.wasm - export IC_WALLET_CANISTER_PATH=$HOME/wallet.wasm - cargo test --all-features -- --ignored - dfx stop - env: - RUST_BACKTRACE: 1 - - - name: Run Integration Tests against PocketIC - run: | - set -ex - dfx start --background --clean --pocketic + if [[ "${{ matrix.pocket-ic }}" == "0" ]] + then + dfx start --background --clean + else + dfx start --background --clean --pocketic + fi sleep 1 export IC_REF_PORT=$(dfx info webserver-port) export IC_UNIVERSAL_CANISTER_PATH=$HOME/canister.wasm export IC_WALLET_CANISTER_PATH=$HOME/wallet.wasm - export POCKET_IC="http://localhost:${IC_REF_PORT}" + if [[ "${{ matrix.pocket-ic }}" == "1" ]] + then + export POCKET_IC="http://localhost:${IC_REF_PORT}" + fi cargo test --all-features -- --ignored dfx stop env: @@ -93,31 +89,20 @@ jobs: # create key: pkcs11-tool -k --module $HSM_PKCS11_LIBRARY_PATH --login --slot-index $HSM_SLOT_INDEX -d $HSM_KEY_ID --key-type EC:prime256v1 --pin $HSM_PIN - dfx start --background --clean - sleep 1 - export IC_REF_PORT=$(dfx info replica-port) - export IC_UNIVERSAL_CANISTER_PATH=$HOME/canister.wasm - export IC_WALLET_CANISTER_PATH=$HOME/wallet.wasm - cd ref-tests - cargo test --all-features -- --ignored --nocapture --test-threads=1 - dfx stop - env: - RUST_BACKTRACE: 1 - HSM_PKCS11_LIBRARY_PATH: /usr/lib/softhsm/libsofthsm2.so - HSM_SO_PIN: 123456 - HSM_PIN: 1234 - HSM_SLOT_INDEX: 0 - HSM_KEY_ID: abcdef - - - name: Run Integration Tests with SoftHSM against PocketIC - run: | - set -ex - dfx start --background --clean --pocketic + if [[ "${{ matrix.pocket-ic }}" == "0" ]] + then + dfx start --background --clean + else + dfx start --background --clean --pocketic + fi sleep 1 export IC_REF_PORT=$(dfx info webserver-port) export IC_UNIVERSAL_CANISTER_PATH=$HOME/canister.wasm export IC_WALLET_CANISTER_PATH=$HOME/wallet.wasm - export POCKET_IC="http://localhost:${IC_REF_PORT}" + if [[ "${{ matrix.pocket-ic }}" == "1" ]] + then + export POCKET_IC="http://localhost:${IC_REF_PORT}" + fi cd ref-tests cargo test --all-features -- --ignored --nocapture --test-threads=1 dfx stop @@ -132,21 +117,18 @@ jobs: - name: Run Doc Tests run: | set -ex - dfx start --background --clean - sleep 1 - export IC_REF_PORT=$(dfx info replica-port) - cargo test --all-features --doc -- --ignored - dfx stop - env: - RUST_BACKTRACE: 1 - - - name: Run Doc Tests against PocketIC - run: | - set -ex - dfx start --background --clean --pocketic + if [[ "${{ matrix.pocket-ic }}" == "0" ]] + then + dfx start --background --clean + else + dfx start --background --clean --pocketic + fi sleep 1 export IC_REF_PORT=$(dfx info webserver-port) - export POCKET_IC="http://localhost:${IC_REF_PORT}" + if [[ "${{ matrix.pocket-ic }}" == "1" ]] + then + export POCKET_IC="http://localhost:${IC_REF_PORT}" + fi cargo test --all-features --doc -- --ignored dfx stop env: From c1dfce83dd8fb6164cfed9ccae2651b0253018b5 Mon Sep 17 00:00:00 2001 From: Martin Raszyk Date: Fri, 15 Nov 2024 16:48:20 +0100 Subject: [PATCH 21/21] ci --- .github/workflows/ic-ref.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ic-ref.yml b/.github/workflows/ic-ref.yml index e3498bfb..eb94f4ef 100644 --- a/.github/workflows/ic-ref.yml +++ b/.github/workflows/ic-ref.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: build: [linux-stable] - pocket-ic: ["0", "1"] + pocket-ic: ["replica", "pocketic"] include: - build: linux-stable ic-hs-ref: "3d71032e" @@ -54,7 +54,7 @@ jobs: - name: Run Integration Tests run: | set -ex - if [[ "${{ matrix.pocket-ic }}" == "0" ]] + if [[ "${{ matrix.pocket-ic }}" == "replica" ]] then dfx start --background --clean else @@ -64,7 +64,7 @@ jobs: export IC_REF_PORT=$(dfx info webserver-port) export IC_UNIVERSAL_CANISTER_PATH=$HOME/canister.wasm export IC_WALLET_CANISTER_PATH=$HOME/wallet.wasm - if [[ "${{ matrix.pocket-ic }}" == "1" ]] + if [[ "${{ matrix.pocket-ic }}" == "pocketic" ]] then export POCKET_IC="http://localhost:${IC_REF_PORT}" fi @@ -89,7 +89,7 @@ jobs: # create key: pkcs11-tool -k --module $HSM_PKCS11_LIBRARY_PATH --login --slot-index $HSM_SLOT_INDEX -d $HSM_KEY_ID --key-type EC:prime256v1 --pin $HSM_PIN - if [[ "${{ matrix.pocket-ic }}" == "0" ]] + if [[ "${{ matrix.pocket-ic }}" == "replica" ]] then dfx start --background --clean else @@ -99,7 +99,7 @@ jobs: export IC_REF_PORT=$(dfx info webserver-port) export IC_UNIVERSAL_CANISTER_PATH=$HOME/canister.wasm export IC_WALLET_CANISTER_PATH=$HOME/wallet.wasm - if [[ "${{ matrix.pocket-ic }}" == "1" ]] + if [[ "${{ matrix.pocket-ic }}" == "pocketic" ]] then export POCKET_IC="http://localhost:${IC_REF_PORT}" fi @@ -117,7 +117,7 @@ jobs: - name: Run Doc Tests run: | set -ex - if [[ "${{ matrix.pocket-ic }}" == "0" ]] + if [[ "${{ matrix.pocket-ic }}" == "replica" ]] then dfx start --background --clean else @@ -125,7 +125,7 @@ jobs: fi sleep 1 export IC_REF_PORT=$(dfx info webserver-port) - if [[ "${{ matrix.pocket-ic }}" == "1" ]] + if [[ "${{ matrix.pocket-ic }}" == "pocketic" ]] then export POCKET_IC="http://localhost:${IC_REF_PORT}" fi