Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/ic-management-canister-types/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Types for calling [the IC management canister][1].

This module is a direct translation from its Candid interface description.

[1]: https://internetcomputer.org/docs/current/references/ic-interface-spec/#ic-management-canister
[1]: https://docs.internetcomputer.org/references/management-canister/

## Correctness

Expand All @@ -14,7 +14,7 @@ The test defines a dummy Canister covering all Management Canister entry points

It then asserts the equality of the dummy canister's interface with the specified interface in [`ic.did`](tests/ic.did).

The [`ic.did`](tests/ic.did) is sourced from the [Internet Computer Interface Specification](https://internetcomputer.org/docs/current/references/ic-interface-spec/#ic-candid).
The [`ic.did`](tests/ic.did) is sourced from the [Internet Computer Interface Specification](https://docs.internetcomputer.org/references/management-canister/#candid-interface).

Some methods are excluded (commented out) as follows:
- Bitcoin API: These functionalities are planned to migrate from the Management Canister to the [Bitcoin Canister](https://github.com/dfinity/bitcoin-canister).
Expand Down
126 changes: 63 additions & 63 deletions packages/ic-management-canister-types/src/lib.rs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion rs/execution_environment/src/execution/install.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! This module defines how the `install_code` IC method in mode
//! `install`/`reinstall` is executed.
//! See https://internetcomputer.org/docs/current/references/ic-interface-spec/#ic-install_code
//! See https://docs.internetcomputer.org/references/management-canister/#install_code

use crate::as_round_instructions;
use crate::canister_manager::types::{
Expand Down
2 changes: 1 addition & 1 deletion rs/execution_environment/src/execution/upgrade.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! This module defines how the `install_code` IC method in mode
//! `upgrade` is executed.
//! See https://internetcomputer.org/docs/current/references/ic-interface-spec/#ic-install_code
//! See https://docs.internetcomputer.org/references/management-canister/#install_code
//! and https://internetcomputer.org/docs/current/references/ic-interface-spec/#system-api-upgrades

use crate::as_round_instructions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use std::{
};

/// The management (virtual) canister trait, also known as IC_00.
/// Reference: https://internetcomputer.org/docs/current/references/ic-interface-spec/#ic-management-canister
/// Reference: https://docs.internetcomputer.org/references/management-canister/
///
/// This trait allows for injection of clients to canister for easier unit testing.
#[async_trait]
Expand Down
4 changes: 2 additions & 2 deletions rs/nervous_system/clients/src/update_settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use ic_nervous_system_runtime::Runtime;
use serde::Deserialize;

/// The UpdateSettings struct as defined in the ic-interface-spec
/// https://internetcomputer.org/docs/current/references/ic-interface-spec/#ic-candids
/// https://docs.internetcomputer.org/references/management-canister/#update_settings
#[derive(Clone, Eq, PartialEq, Debug, CandidType, Deserialize)]
pub struct UpdateSettings {
pub canister_id: PrincipalId,
Expand All @@ -33,7 +33,7 @@ pub enum SnapshotVisibility {
}

/// The CanisterSettings struct as defined in the ic-interface-spec
/// https://internetcomputer.org/docs/current/references/ic-interface-spec/#ic-candid
/// https://docs.internetcomputer.org/references/management-canister/#canister-settings
#[derive(Clone, Eq, PartialEq, Hash, Debug, Default, CandidType, Deserialize)]
pub struct CanisterSettings {
pub controllers: Option<Vec<PrincipalId>>,
Expand Down
2 changes: 1 addition & 1 deletion rs/nns/governance/api/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2701,7 +2701,7 @@ pub struct UpdateCanisterSettings {
}

/// The CanisterSettings struct as defined in the ic-interface-spec
/// <https://internetcomputer.org/docs/current/references/ic-interface-spec/#ic-candid.>
/// <https://docs.internetcomputer.org/references/management-canister/#canister-settings>.
#[derive(
candid::CandidType, candid::Deserialize, serde::Serialize, Clone, PartialEq, Debug, Default,
)]
Expand Down
2 changes: 1 addition & 1 deletion rs/nns/governance/src/gen/ic_nns_governance.pb.v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2819,7 +2819,7 @@ pub mod stop_or_start_canister {
}
}
/// The CanisterSettings struct as defined in the ic-interface-spec
/// <https://internetcomputer.org/docs/current/references/ic-interface-spec/#ic-candid.>
/// <https://docs.internetcomputer.org/references/management-canister/#canister-settings>.
#[derive(
candid::CandidType,
candid::Deserialize,
Expand Down
2 changes: 1 addition & 1 deletion rs/sns/governance/api/src/ic_sns_governance.pb.v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ pub struct ManageDappCanisterSettings {
/// The canister IDs of the dapp canisters to be modified.
pub canister_ids: Vec<PrincipalId>,
/// Below are fields under CanisterSettings defined at
/// <https://internetcomputer.org/docs/current/references/ic-interface-spec/#ic-candid.>
/// <https://docs.internetcomputer.org/references/management-canister/#canister-settings>.
pub compute_allocation: Option<u64>,
pub memory_allocation: Option<u64>,
pub freezing_threshold: Option<u64>,
Expand Down
2 changes: 1 addition & 1 deletion rs/sns/governance/src/gen/ic_sns_governance.pb.v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,7 @@ pub struct ManageDappCanisterSettings {
#[prost(message, repeated, tag = "1")]
pub canister_ids: ::prost::alloc::vec::Vec<::ic_base_types::PrincipalId>,
/// Below are fields under CanisterSettings defined at
/// <https://internetcomputer.org/docs/current/references/ic-interface-spec/#ic-candid.>
/// <https://docs.internetcomputer.org/references/management-canister/#canister-settings>.
#[prost(uint64, optional, tag = "2")]
pub compute_allocation: ::core::option::Option<u64>,
#[prost(uint64, optional, tag = "3")]
Expand Down
8 changes: 4 additions & 4 deletions rs/types/management_canister_types/src/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@ const KIB: usize = 1_024;

/// Maximum number of HTTP headers in the request.
///
/// Described in <https://internetcomputer.org/docs/current/references/ic-interface-spec/#ic-http_request>.
/// Described in <https://docs.internetcomputer.org/references/management-canister/#http_request>.
const HTTP_HEADERS_MAX_NUMBER: usize = 64;

/// Maximum size of all the HTTP headers in the request.
///
/// Described in <https://internetcomputer.org/docs/current/references/ic-interface-spec/#ic-http_request>.
/// Described in <https://docs.internetcomputer.org/references/management-canister/#http_request>.
const HTTP_HEADERS_TOTAL_MAX_SIZE: usize = 48 * KIB;

/// Maximum size of a single HTTP header in the request.
///
/// Described in <https://internetcomputer.org/docs/current/references/ic-interface-spec/#ic-http_request>.
/// Described in <https://docs.internetcomputer.org/references/management-canister/#http_request>.
const HTTP_HEADERS_ELEMENT_MAX_SIZE: usize = 16 * KIB; // name + value = 8KiB + 8KiB

/// The numeric representation for the Legacy pricing version.
Expand All @@ -63,7 +63,7 @@ pub const PRICING_VERSION_PAY_AS_YOU_GO: u32 = 2;
/// The default pricing version for HTTP outcalls.
///
/// If the field is missing, this is the version that will be assumed by the replica.
/// Described in <https://internetcomputer.org/docs/current/references/ic-interface-spec/#ic-http_request>.
/// Described in <https://docs.internetcomputer.org/references/management-canister/#http_request>.
pub const DEFAULT_HTTP_OUTCALLS_PRICING_VERSION: u32 = PRICING_VERSION_LEGACY;

/// A set of all allowed pricing versions for HTTP outcalls.
Expand Down
Loading