Skip to content

Commit 22a6783

Browse files
authored
chore: Bump IC types (#7078)
# Motivation Support new metrics in API. # Changes New metrics: SNS * `treasury_metrics` * `voting_power_metrics` * `genesis_timestamp_seconds` NNS * `spawning_neurons_count` # Tests This will be followed by manual tests. # Todos - [ ] Accessibility (a11y) – any impact? - [ ] Changelog – is it needed?
1 parent 0241817 commit 22a6783

File tree

13 files changed

+86
-26
lines changed

13 files changed

+86
-26
lines changed

config.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@
118118
"POCKETIC_VERSION": "3.0.1",
119119
"CARGO_SORT_VERSION": "1.0.9",
120120
"SNSDEMO_RELEASE": "release-2025-06-25",
121-
"IC_COMMIT_FOR_PROPOSALS": "release-2025-06-26_03-25-base",
122-
"IC_COMMIT_FOR_SNS_AGGREGATOR": "release-2025-07-03_03-27-base"
121+
"IC_COMMIT_FOR_PROPOSALS": "fccfa2c7c7cba9e5485ad0b48823990e24a67f40",
122+
"IC_COMMIT_FOR_SNS_AGGREGATOR": "fccfa2c7c7cba9e5485ad0b48823990e24a67f40"
123123
},
124124
"packtool": ""
125125
}

declarations/used_by_proposals/nns_governance/nns_governance.did

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! Candid for canister `nns_governance` obtained by `scripts/update_ic_commit` from: <https://raw.githubusercontent.com/dfinity/ic/release-2025-06-26_03-25-base/rs/nns/governance/canister/governance.did>
1+
//! Candid for canister `nns_governance` obtained by `scripts/update_ic_commit` from: <https://raw.githubusercontent.com/dfinity/ic/fccfa2c7c7cba9e5485ad0b48823990e24a67f40/rs/nns/governance/canister/governance.did>
22
type AccountIdentifier = record {
33
hash : blob;
44
};
@@ -376,6 +376,7 @@ type GovernanceCachedMetrics = record {
376376
not_dissolving_neurons_e8s_buckets_seed : vec record { nat64; float64 };
377377
timestamp_seconds : nat64;
378378
seed_neuron_count : nat64;
379+
spawning_neurons_count : nat64;
379380

380381
non_self_authenticating_controller_neuron_subset_metrics : opt NeuronSubsetMetrics;
381382
public_neuron_subset_metrics : opt NeuronSubsetMetrics;

declarations/used_by_proposals/nns_registry/nns_registry.did

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! Candid for canister `nns_registry` obtained by `scripts/update_ic_commit` from: <https://raw.githubusercontent.com/dfinity/ic/release-2025-06-26_03-25-base/rs/registry/canister/canister/registry.did>
1+
//! Candid for canister `nns_registry` obtained by `scripts/update_ic_commit` from: <https://raw.githubusercontent.com/dfinity/ic/fccfa2c7c7cba9e5485ad0b48823990e24a67f40/rs/registry/canister/canister/registry.did>
22
// A brief note about the history of this file: This file used to be
33
// automatically generated, but now, it is hand-crafted, because the
44
// auto-generator has some some pretty degenerate behaviors. The worst of those
@@ -73,31 +73,40 @@ type CompleteCanisterMigrationPayload = record {
7373
type CreateSubnetPayload = record {
7474
unit_delay_millis : nat64;
7575
features : SubnetFeatures;
76-
gossip_registry_poll_period_ms : nat32;
7776
max_ingress_bytes_per_message : nat64;
7877
dkg_dealings_per_block : nat64;
7978
max_block_payload_size : nat64;
8079
start_as_nns : bool;
8180
is_halted : bool;
82-
gossip_pfn_evaluation_period_ms : nat32;
8381
max_ingress_messages_per_block : nat64;
8482
max_number_of_canisters : nat64;
8583
chain_key_config : opt InitialChainKeyConfig;
86-
gossip_max_artifact_streams_per_peer : nat32;
8784
replica_version_id : text;
88-
gossip_max_duplicity : nat32;
89-
gossip_max_chunk_wait_ms : nat32;
9085
dkg_interval_length : nat64;
9186
subnet_id_override : opt principal;
9287
ssh_backup_access : vec text;
93-
ingress_bytes_per_block_soft_cap : nat64;
9488
initial_notary_delay_millis : nat64;
95-
gossip_max_chunk_size : nat32;
9689
subnet_type : SubnetType;
9790
ssh_readonly_access : vec text;
98-
gossip_retransmission_request_ms : nat32;
99-
gossip_receive_check_cache_size : nat32;
10091
node_ids : vec principal;
92+
93+
canister_cycles_cost_schedule: opt CanisterCyclesCostSchedule;
94+
95+
// TODO(NNS1-2444): The fields below are deprecated and they are not read anywhere.
96+
ingress_bytes_per_block_soft_cap : nat64;
97+
gossip_max_artifact_streams_per_peer : nat32;
98+
gossip_max_chunk_size : nat32;
99+
gossip_max_chunk_wait_ms : nat32;
100+
gossip_max_duplicity : nat32;
101+
gossip_pfn_evaluation_period_ms : nat32;
102+
gossip_receive_check_cache_size : nat32;
103+
gossip_registry_poll_period_ms : nat32;
104+
gossip_retransmission_request_ms : nat32;
105+
};
106+
107+
type CanisterCyclesCostSchedule = variant {
108+
Normal;
109+
Free;
101110
};
102111

103112
type DataCenterRecord = record {

declarations/used_by_proposals/sns_wasm/sns_wasm.did

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! Candid for canister `sns_wasm` obtained by `scripts/update_ic_commit` from: <https://raw.githubusercontent.com/dfinity/ic/release-2025-06-26_03-25-base/rs/nns/sns-wasm/canister/sns-wasm.did>
1+
//! Candid for canister `sns_wasm` obtained by `scripts/update_ic_commit` from: <https://raw.githubusercontent.com/dfinity/ic/fccfa2c7c7cba9e5485ad0b48823990e24a67f40/rs/nns/sns-wasm/canister/sns-wasm.did>
22
type AddWasmRequest = record {
33
hash : blob;
44
wasm : opt SnsWasm;

declarations/used_by_sns_aggregator/sns_governance/sns_governance.did

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! Candid for canister `sns_governance` obtained by `scripts/update_ic_commit` from: <https://raw.githubusercontent.com/dfinity/ic/release-2025-07-03_03-27-base/rs/sns/governance/canister/governance.did>
1+
//! Candid for canister `sns_governance` obtained by `scripts/update_ic_commit` from: <https://raw.githubusercontent.com/dfinity/ic/fccfa2c7c7cba9e5485ad0b48823990e24a67f40/rs/sns/governance/canister/governance.did>
22
type Account = record {
33
owner : opt principal;
44
subaccount : opt Subaccount;
@@ -254,10 +254,43 @@ type GetMetricsRequest = record {
254254
time_window_seconds : opt nat64;
255255
};
256256

257+
type TreasuryMetrics = record {
258+
// Same as, e.g., `TransferSnsTreasuryFunds.from_treasury`.
259+
treasury : int32;
260+
261+
// A human-readable identified for this treasury, e.g., "ICP".
262+
name : opt text;
263+
264+
// The source of truth for the treasury balance is this ledger canister / account.
265+
ledger_canister_id : opt principal;
266+
account : opt Account;
267+
268+
// The regularly updated amount of tokens in this treasury.
269+
amount_e8s : opt nat64;
270+
// The amount of tokens in this treasury at the end of swap finalization.
271+
original_amount_e8s : opt nat64;
272+
273+
// When the metrics were last updated.
274+
timestamp_seconds : opt nat64;
275+
};
276+
277+
type VotingPowerMetrics = record {
278+
governance_total_potential_voting_power : opt nat64;
279+
280+
// When the metrics were last updated.
281+
timestamp_seconds : opt nat64;
282+
};
283+
257284
type Metrics = record {
258285
num_recently_submitted_proposals : opt nat64;
259286
num_recently_executed_proposals: opt nat64;
287+
260288
last_ledger_block_timestamp : opt nat64;
289+
290+
// The metrics below are cached (albeit this is an implementation detail).
291+
treasury_metrics : opt vec TreasuryMetrics;
292+
voting_power_metrics : opt VotingPowerMetrics;
293+
genesis_timestamp_seconds : opt nat64;
261294
};
262295

263296
type GetMetricsResult = variant {
@@ -360,6 +393,8 @@ type GovernanceCachedMetrics = record {
360393
dissolving_neurons_count : nat64;
361394
dissolving_neurons_e8s_buckets : vec record { nat64; float64 };
362395
timestamp_seconds : nat64;
396+
treasury_metrics : vec TreasuryMetrics;
397+
voting_power_metrics : opt VotingPowerMetrics;
363398
};
364399

365400
type GovernanceError = record {
@@ -950,6 +985,7 @@ service : (Governance) -> {
950985
get_maturity_modulation : (record {}) -> (GetMaturityModulationResponse);
951986
get_metadata : (record {}) -> (GetMetadataResponse) query;
952987
get_metrics : (GetMetricsRequest) -> (GetMetricsResponse) composite_query;
988+
get_metrics_replicated : (GetMetricsRequest) -> (GetMetricsResponse);
953989
get_mode : (record {}) -> (GetModeResponse) query;
954990
get_nervous_system_parameters : (null) -> (NervousSystemParameters) query;
955991
get_neuron : (GetNeuron) -> (GetNeuronResponse) query;

declarations/used_by_sns_aggregator/sns_ledger/sns_ledger.did

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! Candid for canister `sns_ledger` obtained by `scripts/update_ic_commit` from: <https://raw.githubusercontent.com/dfinity/ic/release-2025-07-03_03-27-base/rs/ledger_suite/icrc1/ledger/ledger.did>
1+
//! Candid for canister `sns_ledger` obtained by `scripts/update_ic_commit` from: <https://raw.githubusercontent.com/dfinity/ic/fccfa2c7c7cba9e5485ad0b48823990e24a67f40/rs/ledger_suite/icrc1/ledger/ledger.did>
22
type BlockIndex = nat;
33
type Subaccount = blob;
44
// Number of nanoseconds since the UNIX epoch in UTC timezone.

declarations/used_by_sns_aggregator/sns_root/sns_root.did

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! Candid for canister `sns_root` obtained by `scripts/update_ic_commit` from: <https://raw.githubusercontent.com/dfinity/ic/release-2025-07-03_03-27-base/rs/sns/root/canister/root.did>
1+
//! Candid for canister `sns_root` obtained by `scripts/update_ic_commit` from: <https://raw.githubusercontent.com/dfinity/ic/fccfa2c7c7cba9e5485ad0b48823990e24a67f40/rs/sns/root/canister/root.did>
22
type CanisterCallError = record {
33
code : opt int32;
44
description : text;

declarations/used_by_sns_aggregator/sns_swap/sns_swap.did

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! Candid for canister `sns_swap` obtained by `scripts/update_ic_commit` from: <https://raw.githubusercontent.com/dfinity/ic/release-2025-07-03_03-27-base/rs/sns/swap/canister/swap.did>
1+
//! Candid for canister `sns_swap` obtained by `scripts/update_ic_commit` from: <https://raw.githubusercontent.com/dfinity/ic/fccfa2c7c7cba9e5485ad0b48823990e24a67f40/rs/sns/swap/canister/swap.did>
22
type BuyerState = record {
33
icp : opt TransferableAmount;
44
has_created_neuron_recipes : opt bool;

declarations/used_by_sns_aggregator/sns_wasm/sns_wasm.did

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! Candid for canister `sns_wasm` obtained by `scripts/update_ic_commit` from: <https://raw.githubusercontent.com/dfinity/ic/release-2025-07-03_03-27-base/rs/nns/sns-wasm/canister/sns-wasm.did>
1+
//! Candid for canister `sns_wasm` obtained by `scripts/update_ic_commit` from: <https://raw.githubusercontent.com/dfinity/ic/fccfa2c7c7cba9e5485ad0b48823990e24a67f40/rs/nns/sns-wasm/canister/sns-wasm.did>
22
type AddWasmRequest = record {
33
hash : blob;
44
wasm : opt SnsWasm;

rs/proposals/src/canisters/nns_governance/api.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//! Rust code created from candid by: `scripts/did2rs.sh --canister nns_governance --out api.rs --header did2rs.header --traits Serialize`
2-
//! Candid for canister `nns_governance` obtained by `scripts/update_ic_commit` from: <https://raw.githubusercontent.com/dfinity/ic/release-2025-06-26_03-25-base/rs/nns/governance/canister/governance.did>
2+
//! Candid for canister `nns_governance` obtained by `scripts/update_ic_commit` from: <https://raw.githubusercontent.com/dfinity/ic/fccfa2c7c7cba9e5485ad0b48823990e24a67f40/rs/nns/governance/canister/governance.did>
33
#![allow(clippy::all)]
44
#![allow(missing_docs)]
55
#![allow(clippy::missing_docs_in_private_items)]
@@ -560,6 +560,7 @@ pub struct GovernanceCachedMetrics {
560560
pub total_voting_power_non_self_authenticating_controller: Option<u64>,
561561
pub total_staked_maturity_e8s_equivalent: u64,
562562
pub not_dissolving_neurons_e8s_buckets_ect: Vec<(u64, f64)>,
563+
pub spawning_neurons_count: u64,
563564
pub declining_voting_power_neuron_subset_metrics: Option<NeuronSubsetMetrics>,
564565
pub total_staked_e8s_ect: u64,
565566
pub not_dissolving_neurons_staked_maturity_e8s_equivalent_sum: u64,

0 commit comments

Comments
 (0)