diff --git a/Cargo.Bazel.json.lock b/Cargo.Bazel.json.lock index f229b4d129d8..d82c6a58e793 100644 --- a/Cargo.Bazel.json.lock +++ b/Cargo.Bazel.json.lock @@ -1,5 +1,5 @@ { - "checksum": "4205d77f306af6cdd08fc713c9bf5f9418d2cd94957dba1378151826506709d5", + "checksum": "7369d3a17a3c748c861ec3504b3c16eb05cb917279ed2b32d559c915257b09e5", "crates": { "abnf 0.12.0": { "name": "abnf", @@ -11735,7 +11735,7 @@ "target": "serde" }, { - "id": "serde_bytes 0.11.15", + "id": "serde_bytes 0.11.17", "target": "serde_bytes" }, { @@ -21041,7 +21041,7 @@ "target": "ic_sha3" }, { - "id": "ic-stable-structures 0.6.8", + "id": "ic-stable-structures 0.6.9", "target": "ic_stable_structures" }, { @@ -21571,7 +21571,7 @@ "target": "serde_bytes_repr" }, { - "id": "serde_bytes 0.11.15", + "id": "serde_bytes 0.11.17", "target": "serde_bytes" }, { @@ -21674,6 +21674,10 @@ "id": "stubborn-io 0.3.2", "target": "stubborn_io" }, + { + "id": "subnet_rental_canister 0.1.0", + "target": "subnet_rental_canister" + }, { "id": "subtle 2.6.1", "target": "subtle" @@ -33467,7 +33471,7 @@ "target": "serde" }, { - "id": "serde_bytes 0.11.15", + "id": "serde_bytes 0.11.17", "target": "serde_bytes" }, { @@ -33849,7 +33853,7 @@ "target": "serde" }, { - "id": "serde_bytes 0.11.15", + "id": "serde_bytes 0.11.17", "target": "serde_bytes" } ], @@ -33971,7 +33975,7 @@ "target": "serde" }, { - "id": "serde_bytes 0.11.15", + "id": "serde_bytes 0.11.17", "target": "serde_bytes" }, { @@ -34117,7 +34121,7 @@ "target": "serde" }, { - "id": "serde_bytes 0.11.15", + "id": "serde_bytes 0.11.17", "target": "serde_bytes" }, { @@ -34343,7 +34347,7 @@ "target": "serde" }, { - "id": "serde_bytes 0.11.15", + "id": "serde_bytes 0.11.17", "target": "serde_bytes" }, { @@ -34496,7 +34500,7 @@ "target": "serde" }, { - "id": "serde_bytes 0.11.15", + "id": "serde_bytes 0.11.17", "target": "serde_bytes" }, { @@ -34551,7 +34555,7 @@ "target": "serde" }, { - "id": "serde_bytes 0.11.15", + "id": "serde_bytes 0.11.17", "target": "serde_bytes" }, { @@ -35135,6 +35139,77 @@ ], "license_file": null }, + "ic-ledger-types 0.15.0": { + "name": "ic-ledger-types", + "version": "0.15.0", + "package_url": "https://github.com/dfinity/cdk-rs", + "repository": { + "Http": { + "url": "https://static.crates.io/crates/ic-ledger-types/0.15.0/download", + "sha256": "feb52826a353b583012628af6da762b52672350686c3275234febfadeca965ea" + } + }, + "targets": [ + { + "Library": { + "crate_name": "ic_ledger_types", + "crate_root": "src/lib.rs", + "srcs": { + "allow_empty": true, + "include": [ + "**/*.rs" + ] + } + } + } + ], + "library_target_name": "ic_ledger_types", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "candid 0.10.17", + "target": "candid" + }, + { + "id": "crc32fast 1.3.2", + "target": "crc32fast" + }, + { + "id": "hex 0.4.3", + "target": "hex" + }, + { + "id": "ic-cdk 0.18.7", + "target": "ic_cdk" + }, + { + "id": "serde 1.0.219", + "target": "serde" + }, + { + "id": "serde_bytes 0.11.17", + "target": "serde_bytes" + }, + { + "id": "sha2 0.10.9", + "target": "sha2" + } + ], + "selects": {} + }, + "edition": "2021", + "version": "0.15.0" + }, + "license": "Apache-2.0", + "license_ids": [ + "Apache-2.0" + ], + "license_file": "LICENSE" + }, "ic-management-canister-types 0.3.3": { "name": "ic-management-canister-types", "version": "0.3.3", @@ -35175,7 +35250,7 @@ "target": "serde" }, { - "id": "serde_bytes 0.11.15", + "id": "serde_bytes 0.11.17", "target": "serde_bytes" } ], @@ -35433,14 +35508,14 @@ ], "license_file": "LICENSE" }, - "ic-stable-structures 0.6.8": { + "ic-stable-structures 0.6.9": { "name": "ic-stable-structures", - "version": "0.6.8", + "version": "0.6.9", "package_url": "https://github.com/dfinity/stable-structures", "repository": { "Http": { - "url": "https://static.crates.io/crates/ic-stable-structures/0.6.8/download", - "sha256": "f0f5684f577e0146738cd11afed789109c4f51ba963c75823c48c1501dc53278" + "url": "https://static.crates.io/crates/ic-stable-structures/0.6.9/download", + "sha256": "4d30d4cf17aff1024e13133897048bcba580e063c9000571ab766ca37e2996f4" } }, "targets": [ @@ -35497,7 +35572,7 @@ ] } }, - "version": "0.6.8" + "version": "0.6.9" }, "license": "Apache-2.0", "license_ids": [ @@ -35621,7 +35696,7 @@ "target": "serde" }, { - "id": "serde_bytes 0.11.15", + "id": "serde_bytes 0.11.17", "target": "serde_bytes" } ], @@ -35688,7 +35763,7 @@ "target": "serde" }, { - "id": "serde_bytes 0.11.15", + "id": "serde_bytes 0.11.17", "target": "serde_bytes" }, { @@ -35776,7 +35851,7 @@ "target": "serde" }, { - "id": "serde_bytes 0.11.15", + "id": "serde_bytes 0.11.17", "target": "serde_bytes" }, { @@ -35874,7 +35949,7 @@ "target": "serde" }, { - "id": "serde_bytes 0.11.15", + "id": "serde_bytes 0.11.17", "target": "serde_bytes" }, { @@ -36155,7 +36230,7 @@ "target": "serde" }, { - "id": "serde_bytes 0.11.15", + "id": "serde_bytes 0.11.17", "target": "serde_bytes" }, { @@ -36565,6 +36640,183 @@ ], "license_file": "LICENSE" }, + "icrc-cbor 0.1.0": { + "name": "icrc-cbor", + "version": "0.1.0", + "package_url": "https://github.com/dfinity/ic", + "repository": { + "Http": { + "url": "https://static.crates.io/crates/icrc-cbor/0.1.0/download", + "sha256": "90569d2894d9536c5416943556ac6339df249f06611b3c41029196b39e0dd119" + } + }, + "targets": [ + { + "Library": { + "crate_name": "icrc_cbor", + "crate_root": "src/lib.rs", + "srcs": { + "allow_empty": true, + "include": [ + "**/*.rs" + ] + } + } + } + ], + "library_target_name": "icrc_cbor", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "default" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "candid 0.10.17", + "target": "candid" + }, + { + "id": "minicbor 0.19.1", + "target": "minicbor" + }, + { + "id": "num-bigint 0.4.6", + "target": "num_bigint" + }, + { + "id": "num-traits 0.2.19", + "target": "num_traits" + } + ], + "selects": {} + }, + "edition": "2021", + "version": "0.1.0" + }, + "license": "Apache-2.0", + "license_ids": [ + "Apache-2.0" + ], + "license_file": "LICENSE" + }, + "icrc-ledger-types 0.1.10": { + "name": "icrc-ledger-types", + "version": "0.1.10", + "package_url": "https://github.com/dfinity/ic", + "repository": { + "Http": { + "url": "https://static.crates.io/crates/icrc-ledger-types/0.1.10/download", + "sha256": "87c31beeee0e5ab964861a3d5ea2b5ed7b688b2b22400367a832b1fcf0db1fa4" + } + }, + "targets": [ + { + "Library": { + "crate_name": "icrc_ledger_types", + "crate_root": "src/lib.rs", + "srcs": { + "allow_empty": true, + "include": [ + "**/*.rs" + ] + } + } + } + ], + "library_target_name": "icrc_ledger_types", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "base32 0.4.0", + "target": "base32" + }, + { + "id": "candid 0.10.17", + "target": "candid" + }, + { + "id": "crc32fast 1.3.2", + "target": "crc32fast" + }, + { + "id": "hex 0.4.3", + "target": "hex" + }, + { + "id": "ic-stable-structures 0.6.9", + "target": "ic_stable_structures" + }, + { + "id": "icrc-cbor 0.1.0", + "target": "icrc_cbor" + }, + { + "id": "itertools 0.12.0", + "target": "itertools" + }, + { + "id": "minicbor 0.19.1", + "target": "minicbor" + }, + { + "id": "num-bigint 0.4.6", + "target": "num_bigint" + }, + { + "id": "num-traits 0.2.19", + "target": "num_traits" + }, + { + "id": "serde 1.0.219", + "target": "serde" + }, + { + "id": "serde_bytes 0.11.17", + "target": "serde_bytes" + }, + { + "id": "sha2 0.10.9", + "target": "sha2" + }, + { + "id": "strum 0.26.3", + "target": "strum" + }, + { + "id": "time 0.3.36", + "target": "time" + } + ], + "selects": {} + }, + "edition": "2021", + "proc_macro_deps": { + "common": [ + { + "id": "strum_macros 0.26.4", + "target": "strum_macros" + } + ], + "selects": {} + }, + "version": "0.1.10" + }, + "license": "Apache-2.0", + "license_ids": [ + "Apache-2.0" + ], + "license_file": "LICENSE" + }, "icrc1-test-env 0.1.1": { "name": "icrc1-test-env", "version": "0.1.1", @@ -56027,7 +56279,7 @@ "target": "serde" }, { - "id": "serde_bytes 0.11.15", + "id": "serde_bytes 0.11.17", "target": "serde_bytes" }, { @@ -69991,14 +70243,14 @@ ], "license_file": "LICENSE" }, - "serde_bytes 0.11.15": { + "serde_bytes 0.11.17": { "name": "serde_bytes", - "version": "0.11.15", + "version": "0.11.17", "package_url": "https://github.com/serde-rs/bytes", "repository": { "Http": { - "url": "https://static.crates.io/crates/serde_bytes/0.11.15/download", - "sha256": "387cc504cb06bb40a96c8e04e951fe01854cf6bc921053c954e4a606d9675c6a" + "url": "https://static.crates.io/crates/serde_bytes/0.11.17/download", + "sha256": "8437fd221bde2d4ca316d61b90e337e9e702b3820b87d63caa9ba6c02bd06d96" } }, "targets": [ @@ -70037,7 +70289,7 @@ "selects": {} }, "edition": "2018", - "version": "0.11.15" + "version": "0.11.17" }, "license": "MIT OR Apache-2.0", "license_ids": [ @@ -71132,7 +71384,7 @@ "target": "serde_big_array" }, { - "id": "serde_bytes 0.11.15", + "id": "serde_bytes 0.11.17", "target": "serde_bytes" }, { @@ -75149,6 +75401,100 @@ ], "license_file": "LICENSE" }, + "subnet_rental_canister 0.1.0": { + "name": "subnet_rental_canister", + "version": "0.1.0", + "package_url": null, + "repository": { + "Git": { + "remote": "https://github.com/dfinity/subnet-rental-canister", + "commitish": { + "Rev": "9e370001a5d51271f797b6b85295780701989cc6" + }, + "strip_prefix": "src/subnet_rental_canister" + } + }, + "targets": [ + { + "Library": { + "crate_name": "subnet_rental_canister", + "crate_root": "src/lib.rs", + "srcs": { + "allow_empty": true, + "include": [ + "**/*.rs" + ] + } + } + } + ], + "library_target_name": "subnet_rental_canister", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "candid 0.10.17", + "target": "candid" + }, + { + "id": "hex 0.4.3", + "target": "hex" + }, + { + "id": "ic-cdk 0.18.7", + "target": "ic_cdk" + }, + { + "id": "ic-cdk-timers 0.12.2", + "target": "ic_cdk_timers" + }, + { + "id": "ic-ledger-types 0.15.0", + "target": "ic_ledger_types" + }, + { + "id": "ic-stable-structures 0.6.9", + "target": "ic_stable_structures" + }, + { + "id": "ic-xrc-types 1.2.0", + "target": "ic_xrc_types" + }, + { + "id": "icrc-ledger-types 0.1.10", + "target": "icrc_ledger_types" + }, + { + "id": "itertools 0.14.0", + "target": "itertools" + }, + { + "id": "serde 1.0.219", + "target": "serde" + }, + { + "id": "serde_bytes 0.11.17", + "target": "serde_bytes" + }, + { + "id": "sha2 0.10.9", + "target": "sha2" + } + ], + "selects": {} + }, + "edition": "2021", + "version": "0.1.0" + }, + "license": "Apache-2.0", + "license_ids": [ + "Apache-2.0" + ], + "license_file": null + }, "subtle 2.6.1": { "name": "subtle", "version": "2.6.1", @@ -94972,7 +95318,7 @@ "ic-metrics-encoder 1.1.1", "ic-response-verification 3.0.3", "ic-sha3 1.0.0", - "ic-stable-structures 0.6.8", + "ic-stable-structures 0.6.9", "ic-stable-structures 0.7.0", "ic-test-state-machine-client 3.0.1", "ic-transport-types 0.40.1", @@ -95110,7 +95456,7 @@ "semver 1.0.26", "serde 1.0.219", "serde-bytes-repr 0.1.5", - "serde_bytes 0.11.15", + "serde_bytes 0.11.17", "serde_cbor 0.11.2", "serde_json 1.0.132", "serde_regex 1.1.0", @@ -95137,6 +95483,7 @@ "strum 0.26.3", "strum_macros 0.26.4", "stubborn-io 0.3.2", + "subnet_rental_canister 0.1.0", "subtle 2.6.1", "syn 1.0.109", "syn 2.0.101", diff --git a/Cargo.Bazel.toml.lock b/Cargo.Bazel.toml.lock index ac76f16762ec..dd4daac5d635 100644 --- a/Cargo.Bazel.toml.lock +++ b/Cargo.Bazel.toml.lock @@ -3608,7 +3608,7 @@ dependencies = [ "ic-metrics-encoder", "ic-response-verification", "ic-sha3", - "ic-stable-structures 0.6.8", + "ic-stable-structures 0.6.9", "ic-stable-structures 0.7.0", "ic-test-state-machine-client", "ic-transport-types 0.40.1", @@ -3773,6 +3773,7 @@ dependencies = [ "strum 0.26.3", "strum_macros 0.26.4", "stubborn-io", + "subnet_rental_canister", "subtle", "syn 1.0.109", "syn 2.0.101", @@ -6112,6 +6113,21 @@ dependencies = [ "thiserror 2.0.12", ] +[[package]] +name = "ic-ledger-types" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "feb52826a353b583012628af6da762b52672350686c3275234febfadeca965ea" +dependencies = [ + "candid", + "crc32fast", + "hex", + "ic-cdk", + "serde", + "serde_bytes", + "sha2 0.10.9", +] + [[package]] name = "ic-management-canister-types" version = "0.3.3" @@ -6174,9 +6190,9 @@ dependencies = [ [[package]] name = "ic-stable-structures" -version = "0.6.8" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f5684f577e0146738cd11afed789109c4f51ba963c75823c48c1501dc53278" +checksum = "4d30d4cf17aff1024e13133897048bcba580e063c9000571ab766ca37e2996f4" dependencies = [ "ic_principal", ] @@ -6379,6 +6395,42 @@ dependencies = [ "thiserror 1.0.68", ] +[[package]] +name = "icrc-cbor" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90569d2894d9536c5416943556ac6339df249f06611b3c41029196b39e0dd119" +dependencies = [ + "candid", + "minicbor", + "num-bigint 0.4.6", + "num-traits", +] + +[[package]] +name = "icrc-ledger-types" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87c31beeee0e5ab964861a3d5ea2b5ed7b688b2b22400367a832b1fcf0db1fa4" +dependencies = [ + "base32", + "candid", + "crc32fast", + "hex", + "ic-stable-structures 0.6.9", + "icrc-cbor", + "itertools 0.12.0", + "minicbor", + "num-bigint 0.4.6", + "num-traits", + "serde", + "serde_bytes", + "sha2 0.10.9", + "strum 0.26.3", + "strum_macros 0.26.4", + "time", +] + [[package]] name = "icrc1-test-env" version = "0.1.1" @@ -11721,9 +11773,9 @@ dependencies = [ [[package]] name = "serde_bytes" -version = "0.11.15" +version = "0.11.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "387cc504cb06bb40a96c8e04e951fe01854cf6bc921053c954e4a606d9675c6a" +checksum = "8437fd221bde2d4ca316d61b90e337e9e702b3820b87d63caa9ba6c02bd06d96" dependencies = [ "serde", ] @@ -12592,6 +12644,25 @@ dependencies = [ "tokio", ] +[[package]] +name = "subnet_rental_canister" +version = "0.1.0" +source = "git+https://github.com/dfinity/subnet-rental-canister?rev=9e370001a5d51271f797b6b85295780701989cc6#9e370001a5d51271f797b6b85295780701989cc6" +dependencies = [ + "candid", + "hex", + "ic-cdk", + "ic-cdk-timers", + "ic-ledger-types", + "ic-stable-structures 0.6.9", + "ic-xrc-types", + "icrc-ledger-types", + "itertools 0.14.0", + "serde", + "serde_bytes", + "sha2 0.10.9", +] + [[package]] name = "subtle" version = "2.6.1" diff --git a/Cargo.lock b/Cargo.lock index d9794dc4021e..c43b5cf69eac 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2233,7 +2233,7 @@ dependencies = [ "ic-cdk", "ic-cdk-timers", "ic-certified-map", - "ic-stable-structures 0.6.8", + "ic-stable-structures 0.6.9", "mockall", "priority-queue", "prometheus 0.13.4", @@ -2250,7 +2250,7 @@ version = "0.9.0" dependencies = [ "addr", "candid", - "ic-stable-structures 0.6.8", + "ic-stable-structures 0.6.9", "serde", "serde_bytes", "thiserror 2.0.12", @@ -3450,7 +3450,7 @@ dependencies = [ "ic-types-test-utils", "ic-xrc-types", "icp-ledger", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "lazy_static", "maplit", "on_wire", @@ -4781,7 +4781,7 @@ dependencies = [ "ic-registry-subnet-type", "ic-system-test-driver", "icrc-ledger-agent", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "leb128", "on_wire", "serde_cbor", @@ -6810,7 +6810,7 @@ dependencies = [ "ic-management-canister-types", "ic-metrics-assert", "ic-metrics-encoder", - "ic-stable-structures 0.6.8", + "ic-stable-structures 0.6.9", "ic-test-utilities-load-wasm", "ic-types", "ic-universal-canister", @@ -7292,7 +7292,7 @@ dependencies = [ "ic-ckbtc-minter", "ic-http-types", "ic-icrc1", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "num-traits", ] @@ -7331,14 +7331,14 @@ dependencies = [ "ic-metrics-assert", "ic-metrics-encoder", "ic-secp256k1 0.2.0", - "ic-stable-structures 0.6.8", + "ic-stable-structures 0.6.9", "ic-state-machine-tests", "ic-test-utilities-load-wasm", "ic-types", "ic-utils-ensure", "ic0", "icrc-ledger-client-cdk", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "lazy_static", "maplit", "minicbor", @@ -7386,12 +7386,12 @@ dependencies = [ "ic-metrics-encoder", "ic-secp256k1 0.2.0", "ic-sha3 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ic-stable-structures 0.6.8", + "ic-stable-structures 0.6.9", "ic-state-machine-tests", "ic-utils-ensure", - "icrc-cbor", + "icrc-cbor 0.1.0", "icrc-ledger-client-cdk", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "maplit", "minicbor", "minicbor-derive", @@ -7437,7 +7437,7 @@ dependencies = [ "ic-state-machine-tests", "ic-test-utilities-load-wasm", "ic-types", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "num-traits", "serde", "serde_bytes", @@ -9724,7 +9724,7 @@ dependencies = [ "ic-ledger-core", "ic-ledger-test-utils", "ic-metrics-encoder", - "ic-stable-structures 0.6.8", + "ic-stable-structures 0.6.9", "icp-ledger", "pocket-ic", "serde", @@ -9749,11 +9749,11 @@ dependencies = [ "ic-ledger-suite-state-machine-tests", "ic-ledger-test-utils", "ic-metrics-encoder", - "ic-stable-structures 0.6.8", + "ic-stable-structures 0.6.9", "ic-state-machine-tests", "ic-test-utilities-load-wasm", "icp-ledger", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "num-traits", "scopeguard", "serde", @@ -9777,7 +9777,7 @@ dependencies = [ "ic-rosetta-test-utils", "ic-secp256k1 0.2.0", "icp-ledger", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "num-bigint 0.4.6", "pocket-ic", "reqwest 0.12.15", @@ -9833,7 +9833,7 @@ dependencies = [ "ic-test-utilities-load-wasm", "ic-utils 0.40.1", "icrc-ledger-agent", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "indicatif", "lazy_static", "num-bigint 0.4.6", @@ -9876,7 +9876,7 @@ dependencies = [ "ic-icrc-rosetta-runner", "ic-rosetta-api", "ic-secp256k1 0.2.0", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "num-bigint 0.4.6", "pocket-ic", "reqwest 0.12.15", @@ -9893,7 +9893,7 @@ version = "0.1.0" dependencies = [ "anyhow", "candid", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "pocket-ic", "reqwest 0.12.15", "tempfile", @@ -9925,7 +9925,7 @@ dependencies = [ "ic-state-machine-tests", "ic-test-utilities-load-wasm", "ic-types", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "lazy_static", "leb128", "num-bigint 0.4.6", @@ -9955,10 +9955,10 @@ dependencies = [ "ic-ledger-core", "ic-ledger-suite-state-machine-tests", "ic-metrics-encoder", - "ic-stable-structures 0.6.8", + "ic-stable-structures 0.6.9", "ic-state-machine-tests", "ic-test-utilities-load-wasm", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "serde", ] @@ -9988,11 +9988,11 @@ dependencies = [ "ic-metrics-encoder", "ic-registry-subnet-type", "ic-rosetta-test-utils", - "ic-stable-structures 0.6.8", + "ic-stable-structures 0.6.9", "ic-state-machine-tests", "ic-test-utilities-load-wasm", "ic-types", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "num-traits", "proptest", "scopeguard", @@ -10031,10 +10031,10 @@ dependencies = [ "ic-ledger-suite-state-machine-tests", "ic-ledger-suite-state-machine-tests-constants", "ic-metrics-encoder", - "ic-stable-structures 0.6.8", + "ic-stable-structures 0.6.9", "ic-state-machine-tests", "ic-test-utilities-load-wasm", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "leb128", "minicbor", "num-bigint 0.4.6", @@ -10058,7 +10058,7 @@ dependencies = [ "ic-ledger-hash-of", "ic-secp256k1 0.2.0", "ic-types", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "num-traits", "proptest", "rand 0.8.5", @@ -10078,8 +10078,8 @@ dependencies = [ "ethnum", "hex", "ic-ledger-core", - "ic-stable-structures 0.6.8", - "icrc-cbor", + "ic-stable-structures 0.6.9", + "icrc-cbor 0.1.0", "minicbor", "num-bigint 0.4.6", "num-traits", @@ -10095,7 +10095,7 @@ dependencies = [ "candid", "ciborium", "ic-ledger-core", - "ic-stable-structures 0.6.8", + "ic-stable-structures 0.6.9", "minicbor", "num-traits", "proptest", @@ -10120,7 +10120,7 @@ dependencies = [ "ic-ledger-suite-state-machine-tests", "ic-state-machine-tests", "ic-test-utilities-load-wasm", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "leb128", "num-traits", "serde_bytes", @@ -10350,7 +10350,7 @@ dependencies = [ "ic-ledger-hash-of", "ic-limits", "ic-management-canister-types-private", - "ic-stable-structures 0.6.8", + "ic-stable-structures 0.6.9", "ic-utils 0.9.0", "serde", ] @@ -10361,7 +10361,7 @@ version = "0.9.0" dependencies = [ "candid", "ic-ledger-hash-of", - "ic-stable-structures 0.6.8", + "ic-stable-structures 0.6.9", "minicbor", "num-traits", "proptest", @@ -10403,10 +10403,10 @@ dependencies = [ "ic-management-canister-types", "ic-management-canister-types-private", "ic-metrics-encoder", - "ic-stable-structures 0.6.8", + "ic-stable-structures 0.6.9", "ic-state-machine-tests", "ic0", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "maplit", "mockall", "num-traits", @@ -10439,7 +10439,7 @@ dependencies = [ "ic-test-utilities-load-wasm", "ic-types", "ic-universal-canister", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "paste", "proptest", ] @@ -10476,7 +10476,7 @@ dependencies = [ "ic-types", "ic-universal-canister", "icp-ledger", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "icrc1-test-env", "icrc1-test-suite", "num-bigint 0.4.6", @@ -10503,12 +10503,27 @@ dependencies = [ "ic-nns-constants", "ic-state-machine-tests", "icp-ledger", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "on_wire", "pocket-ic", "serde", ] +[[package]] +name = "ic-ledger-types" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "feb52826a353b583012628af6da762b52672350686c3275234febfadeca965ea" +dependencies = [ + "candid", + "crc32fast", + "hex", + "ic-cdk", + "serde", + "serde_bytes", + "sha2 0.10.9", +] + [[package]] name = "ic-limits" version = "0.9.0" @@ -10760,7 +10775,7 @@ dependencies = [ "ic-sns-wasm", "ic-state-machine-tests", "icp-ledger", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "itertools 0.12.1", "pocket-ic", "pretty_assertions", @@ -10795,7 +10810,7 @@ dependencies = [ "ic-registry-fetch-large-record-test-canister", "ic-registry-transport", "icp-ledger", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "mockall", "pocket-ic", "prost 0.13.4", @@ -10808,7 +10823,7 @@ name = "ic-nervous-system-chunks" version = "0.9.0" dependencies = [ "ic-crypto-sha2", - "ic-stable-structures 0.6.8", + "ic-stable-structures 0.6.9", "lazy_static", "prost 0.13.4", ] @@ -10833,7 +10848,7 @@ dependencies = [ "ic-utils 0.9.0", "icrc-ledger-client", "icrc-ledger-client-cdk", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "num-traits", "rand 0.8.5", "serde", @@ -10868,9 +10883,9 @@ dependencies = [ "ic-nervous-system-runtime", "ic-nns-constants", "ic-nns-gtc", - "ic-stable-structures 0.6.8", + "ic-stable-structures 0.6.9", "icp-ledger", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "json5", "lazy_static", "maplit", @@ -10930,7 +10945,7 @@ dependencies = [ "ic-nervous-system-common", "ic-wasm", "icp-ledger", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "libflate", "prometheus-parse", ] @@ -10944,7 +10959,7 @@ name = "ic-nervous-system-governance" version = "0.0.1" dependencies = [ "ic-base-types", - "ic-stable-structures 0.6.8", + "ic-stable-structures 0.6.9", "ic_principal", "maplit", "num-traits", @@ -10979,7 +10994,7 @@ dependencies = [ "candid", "ic-base-types", "ic-nervous-system-runtime", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "lazy_static", "num-bigint 0.4.6", "tokio", @@ -11063,7 +11078,7 @@ dependencies = [ "ic-types-test-utils", "ic-xrc-types", "icp-ledger", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "itertools 0.12.1", "lazy_static", "lifeline", @@ -11322,7 +11337,7 @@ dependencies = [ "ic-protobuf", "ic-registry-keys", "ic-registry-transport", - "ic-stable-structures 0.6.8", + "ic-stable-structures 0.6.9", "ic-test-utilities-compare-dirs", "ic-types", "lazy_static", @@ -11465,12 +11480,12 @@ dependencies = [ "ic-sns-root", "ic-sns-swap", "ic-sns-wasm", - "ic-stable-structures 0.6.8", + "ic-stable-structures 0.6.9", "ic-test-utilities-compare-dirs", "ic-types", "ic-utils 0.9.0", "icp-ledger", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "itertools 0.12.1", "lazy_static", "local_key", @@ -11492,6 +11507,7 @@ dependencies = [ "serde_json", "strum 0.26.3", "strum_macros 0.26.4", + "subnet_rental_canister", "tempfile", "tla_instrumentation", "tla_instrumentation_proc_macros", @@ -11526,6 +11542,7 @@ dependencies = [ "serde_bytes", "strum 0.26.3", "strum_macros 0.26.4", + "subnet_rental_canister", ] [[package]] @@ -11766,7 +11783,7 @@ dependencies = [ "ic-sns-root", "ic-sns-swap", "ic-sns-wasm", - "ic-stable-structures 0.6.8", + "ic-stable-structures 0.6.9", "ic-state-machine-tests", "ic-test-utilities", "ic-test-utilities-metrics", @@ -11774,7 +11791,7 @@ dependencies = [ "ic-types-test-utils", "ic-xrc-types", "icp-ledger", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "itertools 0.12.1", "lazy_static", "lifeline", @@ -11857,7 +11874,7 @@ dependencies = [ "ic-utils 0.9.0", "ic-xrc-types", "icp-ledger", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "lifeline", "maplit", "num-traits", @@ -11927,7 +11944,7 @@ dependencies = [ "ic-registry-canister-client", "ic-registry-keys", "ic-registry-node-provider-rewards", - "ic-stable-structures 0.6.8", + "ic-stable-structures 0.6.9", "ic-types", "itertools 0.12.1", "maplit", @@ -12314,7 +12331,7 @@ dependencies = [ "ic-cdk", "ic-nervous-system-chunks", "ic-registry-transport", - "ic-stable-structures 0.6.8", + "ic-stable-structures 0.6.9", "lazy_static", "prost 0.13.4", ] @@ -12334,7 +12351,7 @@ dependencies = [ "ic-nns-constants", "ic-registry-keys", "ic-registry-transport", - "ic-stable-structures 0.6.8", + "ic-stable-structures 0.6.9", "ic-types", "itertools 0.12.1", "prost 0.13.4", @@ -13008,7 +13025,7 @@ dependencies = [ "ic-types", "icp-ledger", "icrc-ledger-agent", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "lazy_static", "num-bigint 0.4.6", "num-traits", @@ -13303,14 +13320,14 @@ dependencies = [ "ic-sns-governance-protobuf-generator", "ic-sns-governance-token-valuation", "ic-sns-test-utils", - "ic-stable-structures 0.6.8", + "ic-stable-structures 0.6.9", "ic-test-utilities-compare-dirs", "ic-test-utilities-types", "ic-types", "ic-utils 0.9.0", "icp-ledger", "icrc-ledger-client", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "itertools 0.12.1", "lazy_static", "maplit", @@ -13365,7 +13382,7 @@ version = "0.9.0" dependencies = [ "ic-nervous-system-common", "ic-sns-governance-api", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "maplit", ] @@ -13384,7 +13401,7 @@ dependencies = [ "ic-base-types", "ic-nervous-system-common", "ic-sns-governance-token-valuation", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "lazy_static", "num-traits", "rust_decimal", @@ -13414,7 +13431,7 @@ dependencies = [ "ic-nervous-system-runtime", "ic-nns-constants", "ic-sns-swap-proto-library", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "lazy_static", "maplit", "mockall", @@ -13444,7 +13461,7 @@ dependencies = [ "ic-sns-root", "ic-sns-swap", "ic-test-utilities-compare-dirs", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "isocountry", "lazy_static", "maplit", @@ -13505,13 +13522,13 @@ dependencies = [ "ic-sns-swap", "ic-sns-test-utils", "ic-sns-wasm", - "ic-stable-structures 0.6.8", + "ic-stable-structures 0.6.9", "ic-state-machine-tests", "ic-test-utilities-load-wasm", "ic-types", "ic-universal-canister", "icp-ledger", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "itertools 0.12.1", "lazy_static", "maplit", @@ -13557,7 +13574,7 @@ dependencies = [ "ic-sns-root-protobuf-generator", "ic-sns-swap", "ic-test-utilities-compare-dirs", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "maplit", "prost 0.13.4", "serde", @@ -13603,11 +13620,11 @@ dependencies = [ "ic-neurons-fund", "ic-sns-governance", "ic-sns-swap-protobuf-generator", - "ic-stable-structures 0.6.8", + "ic-stable-structures 0.6.9", "ic-test-utilities-compare-dirs", "ic-utils 0.9.0", "icp-ledger", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "itertools 0.12.1", "lazy_static", "maplit", @@ -13682,7 +13699,7 @@ dependencies = [ "ic-utils 0.9.0", "icp-ledger", "icrc-ledger-client", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "lazy_static", "maplit", "num-traits", @@ -13723,7 +13740,7 @@ dependencies = [ "ic-sns-swap", "ic-sns-wasm", "icp-ledger", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "k256 0.13.4", "lazy_static", "pocket-ic", @@ -13781,7 +13798,7 @@ dependencies = [ "ic-utils 0.9.0", "ic-wasm", "icp-ledger", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "maplit", "pretty_assertions", "prost 0.13.4", @@ -13803,9 +13820,9 @@ dependencies = [ [[package]] name = "ic-stable-structures" -version = "0.6.8" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f5684f577e0146738cd11afed789109c4f51ba963c75823c48c1501dc53278" +checksum = "4d30d4cf17aff1024e13133897048bcba580e063c9000571ab766ca37e2996f4" dependencies = [ "ic_principal", ] @@ -14179,7 +14196,7 @@ dependencies = [ "ic-universal-canister", "ic-utils 0.40.1", "icp-ledger", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "itertools 0.12.1", "json5", "k8s-openapi", @@ -14571,7 +14588,7 @@ dependencies = [ "ic_consensus_threshold_sig_system_test_utils", "icp-ledger", "icrc-ledger-agent", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "k256 0.13.4", "rand 0.8.5", "rand_chacha 0.3.1", @@ -14612,7 +14629,7 @@ dependencies = [ "ic-wasm-types", "ic_consensus_system_test_utils", "ic_consensus_threshold_sig_system_test_utils", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "reqwest 0.12.15", "serde_json", "slog", @@ -15458,10 +15475,10 @@ dependencies = [ "ic-ledger-test-utils", "ic-nns-constants", "ic-nns-test-utils-golden-nns-state", - "ic-stable-structures 0.6.8", + "ic-stable-structures 0.6.9", "ic-state-machine-tests", "ic-test-utilities-compare-dirs", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "lazy_static", "ledger-canister-protobuf-generator", "maplit", @@ -15493,7 +15510,7 @@ dependencies = [ "ic-sender-canister", "ic-test-utilities-load-wasm", "icp-ledger", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "ledger-canister", "num-traits", "pocket-ic", @@ -15516,6 +15533,18 @@ dependencies = [ "proptest", ] +[[package]] +name = "icrc-cbor" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90569d2894d9536c5416943556ac6339df249f06611b3c41029196b39e0dd119" +dependencies = [ + "candid", + "minicbor", + "num-bigint 0.4.6", + "num-traits", +] + [[package]] name = "icrc-ledger-agent" version = "0.1.1" @@ -15526,7 +15555,7 @@ dependencies = [ "ic-agent", "ic-cbor", "ic-certification 3.0.3", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "leb128", ] @@ -15536,7 +15565,7 @@ version = "0.1.4" dependencies = [ "async-trait", "candid", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", ] [[package]] @@ -15558,8 +15587,8 @@ dependencies = [ "candid", "crc32fast", "hex", - "ic-stable-structures 0.6.8", - "icrc-cbor", + "ic-stable-structures 0.6.9", + "icrc-cbor 0.1.0", "itertools 0.12.1", "minicbor", "num-bigint 0.4.6", @@ -15573,6 +15602,30 @@ dependencies = [ "time", ] +[[package]] +name = "icrc-ledger-types" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87c31beeee0e5ab964861a3d5ea2b5ed7b688b2b22400367a832b1fcf0db1fa4" +dependencies = [ + "base32", + "candid", + "crc32fast", + "hex", + "ic-stable-structures 0.6.9", + "icrc-cbor 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "itertools 0.12.1", + "minicbor", + "num-bigint 0.4.6", + "num-traits", + "serde", + "serde_bytes", + "sha2 0.10.9", + "strum 0.26.3", + "strum_macros 0.26.4", + "time", +] + [[package]] name = "icrc1-test-env" version = "0.1.1" @@ -16544,11 +16597,11 @@ dependencies = [ "ic-ledger-suite-state-machine-tests-constants", "ic-limits", "ic-metrics-encoder", - "ic-stable-structures 0.6.8", + "ic-stable-structures 0.6.9", "ic-state-machine-tests", "ic-test-utilities-load-wasm", "icp-ledger", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "intmap", "lazy_static", "minicbor", @@ -17766,7 +17819,7 @@ dependencies = [ "ic-utils 0.40.1", "ic_consensus_system_test_utils", "icp-ledger", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "lazy_static", "libflate", "nns_dapp", @@ -19073,7 +19126,7 @@ dependencies = [ "ic-registry-proto-data-provider", "ic-transport-types", "ic-vetkeys", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "k256 0.13.4", "reqwest 0.12.15", "schemars", @@ -19211,7 +19264,7 @@ version = "0.9.0" dependencies = [ "candid", "ic-cdk", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "serde", "serde_bytes", ] @@ -20265,7 +20318,7 @@ dependencies = [ "ic-cdk-timers", "ic-http-types", "ic-nns-constants", - "ic-stable-structures 0.6.8", + "ic-stable-structures 0.6.9", "mockall", "prometheus 0.13.4", "rand_chacha 0.3.1", @@ -20514,7 +20567,7 @@ dependencies = [ "ic-registry-subnet-type", "ic-registry-transport", "ic-replica-tests", - "ic-stable-structures 0.6.8", + "ic-stable-structures 0.6.9", "ic-test-utilities", "ic-test-utilities-compare-dirs", "ic-test-utilities-types", @@ -20908,7 +20961,7 @@ dependencies = [ "ic-secp256k1 0.2.0", "ic-types", "icp-ledger", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "lazy_static", "num-bigint 0.4.6", "prometheus 0.13.4", @@ -21484,7 +21537,7 @@ dependencies = [ "ic-cdk-timers", "ic-http-types", "ic-nns-constants", - "ic-stable-structures 0.6.8", + "ic-stable-structures 0.6.9", "prometheus 0.13.4", "salt-sharing-api", "serde", @@ -21800,10 +21853,11 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.219" +version = "1.0.225" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" +checksum = "fd6c24dee235d0da097043389623fb913daddf92c76e9f5a1db88607a0bcbd1d" dependencies = [ + "serde_core", "serde_derive", ] @@ -21850,11 +21904,12 @@ dependencies = [ [[package]] name = "serde_bytes" -version = "0.11.15" +version = "0.11.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "387cc504cb06bb40a96c8e04e951fe01854cf6bc921053c954e4a606d9675c6a" +checksum = "a5d440709e79d88e51ac01c4b72fc6cb7314017bb7da9eeff678aa94c10e3ea8" dependencies = [ "serde", + "serde_core", ] [[package]] @@ -21867,11 +21922,20 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_core" +version = "1.0.225" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "659356f9a0cb1e529b24c01e43ad2bdf520ec4ceaf83047b83ddcc2251f96383" +dependencies = [ + "serde_derive", +] + [[package]] name = "serde_derive" -version = "1.0.219" +version = "1.0.225" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" +checksum = "0ea936adf78b1f766949a4977b91d2f5595825bd6ec079aa9543ad2685fc4516" dependencies = [ "proc-macro2", "quote", @@ -22495,7 +22559,7 @@ dependencies = [ "ic_consensus_system_test_utils", "icp-ledger", "icrc-ledger-agent", - "icrc-ledger-types", + "icrc-ledger-types 0.1.10", "rand 0.8.5", "rand_chacha 0.3.1", "rosetta-core", @@ -22640,7 +22704,7 @@ version = "0.9.0" dependencies = [ "candid", "ic-cdk", - "ic-stable-structures 0.6.8", + "ic-stable-structures 0.6.9", "serde", ] @@ -22842,6 +22906,25 @@ dependencies = [ "tokio", ] +[[package]] +name = "subnet_rental_canister" +version = "0.1.0" +source = "git+https://github.com/dfinity/subnet-rental-canister?rev=9e370001a5d51271f797b6b85295780701989cc6#9e370001a5d51271f797b6b85295780701989cc6" +dependencies = [ + "candid", + "hex", + "ic-cdk", + "ic-cdk-timers", + "ic-ledger-types", + "ic-stable-structures 0.6.9", + "ic-xrc-types", + "icrc-ledger-types 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "itertools 0.14.0", + "serde", + "serde_bytes", + "sha2 0.10.9", +] + [[package]] name = "subtle" version = "2.6.1" @@ -24189,7 +24272,7 @@ version = "1.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ - "cfg-if 0.1.10", + "cfg-if 1.0.0", "static_assertions", ] diff --git a/Cargo.toml b/Cargo.toml index 8d47fd2a2bf4..6ee7bcb99ac1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -680,7 +680,7 @@ ic-management-canister-types = "0.3.0" ic-response-verification = "3" ic-secp256k1 = "0.2.0" ic-sha3 = "1.0.0" -ic-stable-structures = "0.6.8" +ic-stable-structures = "0.6.9" ic-transport-types = { version = "0.40.1" } ic-utils = { version = "0.40.1", features = ["raw"] } ic-vetkeys = "0.4.0" @@ -830,6 +830,7 @@ ssh2 = "0.9.4" static_assertions = "1.1.0" strum = { version = "0.26.3", features = ["derive"] } strum_macros = "0.26.4" +subnet_rental_canister = { git = "https://github.com/dfinity/subnet-rental-canister", rev = "9e370001a5d51271f797b6b85295780701989cc6", default-feature = false } # DO NOT MERGE subtle = "2.6.1" syn = { version = "1.0.109", features = ["fold", "full"] } sys-mount = "3.0" @@ -895,4 +896,3 @@ zstd = "0.13.2" default-features = false features = ["exe"] version = "^0.8.1" - diff --git a/bazel/external_crates.bzl b/bazel/external_crates.bzl index 30e29b851d20..a998d4d64670 100644 --- a/bazel/external_crates.bzl +++ b/bazel/external_crates.bzl @@ -715,7 +715,7 @@ def external_crates_repository(name, cargo_lockfile, lockfile): version = "^1.0.0", ), "ic-stable-structures": crate.spec( - version = "^0.6.8", + version = "^0.6.9", ), "ic-stable-structures-next": crate.spec( package = "ic-stable-structures", @@ -1376,6 +1376,12 @@ def external_crates_repository(name, cargo_lockfile, lockfile): "stubborn-io": crate.spec( version = "^0.3.2", ), + "subnet_rental_canister": crate.spec( + git = "https://github.com/dfinity/subnet-rental-canister", + rev = "9e370001a5d51271f797b6b85295780701989cc6", # DO NOT MERGEs + # This is to disable the "canister" feature. + default_features = False, + ), "subtle": crate.spec( version = "^2.6.1", ), diff --git a/rs/nns/governance/BUILD.bazel b/rs/nns/governance/BUILD.bazel index 1ede521c556c..3497a47f778e 100644 --- a/rs/nns/governance/BUILD.bazel +++ b/rs/nns/governance/BUILD.bazel @@ -107,6 +107,7 @@ DEPENDENCIES = [ "@crate_index//:serde_bytes", "@crate_index//:serde_json", "@crate_index//:strum", + "@crate_index//:subnet_rental_canister", ] + select({ "@rules_rust//rust/platform:wasm32-unknown-unknown": [], "//conditions:default": [ diff --git a/rs/nns/governance/Cargo.toml b/rs/nns/governance/Cargo.toml index 091cd2a7e167..5611c2373e7e 100644 --- a/rs/nns/governance/Cargo.toml +++ b/rs/nns/governance/Cargo.toml @@ -93,6 +93,7 @@ rand_chacha = { workspace = true } registry-canister = { path = "../../registry/canister" } strum_macros = { workspace = true } strum = { workspace = true } +subnet_rental_canister = { workspace = true } comparable = { version = "0.5", features = ["derive"] } canbench-rs = { workspace = true, optional = true } diff --git a/rs/nns/governance/api/BUILD.bazel b/rs/nns/governance/api/BUILD.bazel index 2fa7d5888140..6e829dcf8254 100644 --- a/rs/nns/governance/api/BUILD.bazel +++ b/rs/nns/governance/api/BUILD.bazel @@ -27,6 +27,7 @@ DEPENDENCIES = [ "@crate_index//:serde", "@crate_index//:serde_bytes", "@crate_index//:strum", + "@crate_index//:subnet_rental_canister", ] MACRO_DEPENDENCIES = [ diff --git a/rs/nns/governance/api/Cargo.toml b/rs/nns/governance/api/Cargo.toml index f2d358e133b4..123771348f9c 100644 --- a/rs/nns/governance/api/Cargo.toml +++ b/rs/nns/governance/api/Cargo.toml @@ -34,3 +34,4 @@ serde = { workspace = true } serde_bytes = { workspace = true } strum = { workspace = true } strum_macros = { workspace = true } +subnet_rental_canister = { workspace = true } diff --git a/rs/nns/governance/api/src/subnet_rental.rs b/rs/nns/governance/api/src/subnet_rental.rs index 55ee0c3931ed..105dc14b390b 100644 --- a/rs/nns/governance/api/src/subnet_rental.rs +++ b/rs/nns/governance/api/src/subnet_rental.rs @@ -1,40 +1,13 @@ +// DO NOT MERGE use ic_base_types::PrincipalId; -use std::str::FromStr; +use subnet_rental_canister::RentalConditionId; /// A proposal payload for a subnet rental request, /// used to deserialize `ExecuteNnsFunction.payload`, /// where `ExecuteNnsFunction.nns_function == NnsFunction::SubnetRentalRequest as i32`. /// Also used to serialize the subnet rental request payload in `ic-admin`. -#[derive(Clone, Debug, candid::CandidType, candid::Deserialize, serde::Serialize)] +#[derive(Clone, Debug, candid::CandidType, candid::Deserialize)] pub struct SubnetRentalRequest { pub user: PrincipalId, pub rental_condition_id: RentalConditionId, } - -// The following two Subnet Rental Canister types are copied -// from the Subnet Rental Canister's repository and used -// to serialize the payload passed to Subnet Rental Canister's -// method `execute_rental_request_proposal`. -#[derive(Copy, Clone, Debug, candid::CandidType, candid::Deserialize, serde::Serialize)] -pub enum RentalConditionId { - App13CH, -} - -impl FromStr for RentalConditionId { - type Err = String; - - fn from_str(s: &str) -> Result { - match s { - "App13CH" => Ok(Self::App13CH), - other => Err(format!("Unknown rental condition ID {other}")), - } - } -} - -#[derive(candid::CandidType, candid::Deserialize)] -pub struct SubnetRentalProposalPayload { - pub user: PrincipalId, - pub rental_condition_id: RentalConditionId, - pub proposal_id: u64, - pub proposal_creation_time_seconds: u64, -} diff --git a/rs/nns/governance/canbench/canbench_results.yml b/rs/nns/governance/canbench/canbench_results.yml index 6784df13b39b..0e85255d0f26 100644 --- a/rs/nns/governance/canbench/canbench_results.yml +++ b/rs/nns/governance/canbench/canbench_results.yml @@ -51,7 +51,7 @@ benches: distribute_rewards_with_stable_neurons: total: calls: 1 - instructions: 2780559 + instructions: 2120000 heap_increase: 0 stable_memory_increase: 256 scopes: {} @@ -100,7 +100,7 @@ benches: neuron_data_validation: total: calls: 1 - instructions: 205505866 + instructions: 178000000 heap_increase: 0 stable_memory_increase: 0 scopes: {} @@ -121,7 +121,7 @@ benches: record_known_neuron_vote: total: calls: 1 - instructions: 178465 + instructions: 159000 heap_increase: 0 stable_memory_increase: 128 scopes: {} @@ -180,7 +180,7 @@ benches: voting_power_snapshots_latest_snapshot_timestamp_seconds: total: calls: 1 - instructions: 7626 + instructions: 7165 heap_increase: 0 stable_memory_increase: 0 scopes: {} diff --git a/rs/nns/governance/src/canister_state.rs b/rs/nns/governance/src/canister_state.rs index 34ca17a87e4b..c46e30651aa0 100644 --- a/rs/nns/governance/src/canister_state.rs +++ b/rs/nns/governance/src/canister_state.rs @@ -3,7 +3,7 @@ use crate::governance::{ Environment, Governance, HeapGrowthPotential, RandomnessGenerator, RngError, }; use async_trait::async_trait; -use candid::{Decode, Encode}; +use candid::{Decode, Encode, Principal}; use ic_base_types::CanisterId; use ic_nervous_system_canisters::cmc::CMCCanister; use ic_nervous_system_canisters::ledger::IcpLedgerCanister; @@ -15,7 +15,6 @@ use ic_nns_common::types::ProposalId; use ic_nns_constants::LEDGER_CANISTER_ID; use ic_nns_governance_api::bitcoin::BitcoinNetwork; use ic_nns_governance_api::bitcoin::BitcoinSetConfigProposal; -use ic_nns_governance_api::subnet_rental::SubnetRentalProposalPayload; use ic_nns_governance_api::subnet_rental::SubnetRentalRequest; use ic_sns_wasm::pb::v1::{AddWasmRequest, SnsWasm}; use rand::{RngCore, SeedableRng}; @@ -25,6 +24,7 @@ use std::str::FromStr; use std::sync::Arc; #[cfg(any(test, feature = "test"))] use std::sync::RwLock; +use subnet_rental_canister::SubnetRentalProposalPayload; thread_local! { pub(crate) static GOVERNANCE: RefCell = RefCell::new(Governance::new_uninitialized( @@ -333,6 +333,7 @@ fn get_effective_payload( user, rental_condition_id, } = payload; + let user = Principal::from(user); let proposal_creation_time_seconds = proposal_timestamp_seconds; let encoded_payload = Encode!(&SubnetRentalProposalPayload { user, diff --git a/rs/nns/governance/src/proposals/fulfill_subnet_rental_request.rs b/rs/nns/governance/src/proposals/fulfill_subnet_rental_request.rs index 44803e196039..c17e227b8a92 100644 --- a/rs/nns/governance/src/proposals/fulfill_subnet_rental_request.rs +++ b/rs/nns/governance/src/proposals/fulfill_subnet_rental_request.rs @@ -3,7 +3,7 @@ use crate::{ governance::{Environment, LOG_PREFIX}, pb::v1::{FulfillSubnetRentalRequest, GovernanceError, governance_error::ErrorType}, }; -use candid::{CandidType, Decode, Deserialize, Encode, Principal}; +use candid::{Decode, Encode, Principal}; use ic_base_types::{NodeId, PrincipalId, SubnetId}; #[allow(unused)] use ic_cdk::println; @@ -19,8 +19,8 @@ use ic_registry_subnet_type::SubnetType; use registry_canister::mutations::do_create_subnet::{ CanisterCyclesCostSchedule, CreateSubnetPayload, NewSubnet, }; -use serde::Serialize; use std::sync::Arc; +use subnet_rental_canister::{CreateRentalAgreementPayload, RentalRequest}; const ABSURDLY_LARGE_NUMBER_OF_NODES_IN_A_SUBNET: usize = 1000; @@ -149,14 +149,6 @@ impl FulfillSubnetRentalRequest { ) })?; - // TODO(NNS1-3965): Source definition from an official Subnet Rental - // canister library. - #[derive(CandidType, Deserialize, Serialize)] - struct RentalRequest { - user: Principal, - // The real thing actually has a bunch of other fields, but we only - // use `user`, so this is good enough for our purposes... - } let rental_requests = Decode!(&rental_requests, Vec).map_err(|err| { GovernanceError::new_with_message( ErrorType::External, @@ -328,14 +320,6 @@ impl FulfillSubnetRentalRequest { let proposal_id = proposal_id.id; // Assemble the request. - // TODO(NNS1-3965): Source definition from an official Subnet Rental - // canister library. - #[derive(CandidType, Deserialize, Serialize)] - struct CreateRentalAgreementPayload { - user: Principal, - subnet_id: Principal, - proposal_id: u64, - } let request = Encode!(&CreateRentalAgreementPayload { user, subnet_id, diff --git a/rs/registry/admin/BUILD.bazel b/rs/registry/admin/BUILD.bazel index 14ba3365735d..8d213ad18c81 100644 --- a/rs/registry/admin/BUILD.bazel +++ b/rs/registry/admin/BUILD.bazel @@ -61,6 +61,7 @@ DEPENDENCIES = [ "@crate_index//:serde", "@crate_index//:serde_json", "@crate_index//:strum", + "@crate_index//:subnet_rental_canister", "@crate_index//:tempfile", "@crate_index//:tokio", "@crate_index//:url", diff --git a/rs/registry/admin/src/main.rs b/rs/registry/admin/src/main.rs index 6911031392a7..45138c106e4e 100644 --- a/rs/registry/admin/src/main.rs +++ b/rs/registry/admin/src/main.rs @@ -60,7 +60,6 @@ use ic_nns_governance_api::{ decode_make_proposal_response, }, stop_or_start_canister::CanisterAction as GovernanceCanisterAction, - subnet_rental::{RentalConditionId, SubnetRentalRequest}, update_canister_settings::{ CanisterSettings, Controllers, LogVisibility as GovernanceLogVisibility, }, @@ -164,6 +163,7 @@ use std::{ sync::Arc, time::SystemTime, }; +use subnet_rental_canister::{RentalConditionId, RentalRequest as SubnetRentalRequest}; use types::{ LogVisibility, NodeDetails, ProposalAction, ProposalMetadata, ProposalPayload, ProvisionalWhitelistRecord, Registry, RegistryRecord, RegistryValue, SubnetDescriptor, @@ -5244,7 +5244,7 @@ async fn print_and_get_last_value( /// Extracts a proposal payload from the provided command and uses it to submit /// a proposal to the governance canister. async fn propose_external_proposal_from_command< - C: CandidType + Serialize + Debug, + C: CandidType /* DO NOT MERGE - + Serialize */ + Debug, Command: ProposalMetadata + ProposalTitle + ProposalPayload, >( cmd: Command,