Skip to content

Commit

Permalink
Merge branch 'sat-ic-deps-upgrade' into 'main'
Browse files Browse the repository at this point in the history
Upgrade IC dependency

See merge request dfinity-lab/core/release!868
  • Loading branch information
sasa-tomic committed Sep 19, 2023
2 parents 991535e + cca6da3 commit 1814a81
Show file tree
Hide file tree
Showing 11 changed files with 115 additions and 123 deletions.
10 changes: 5 additions & 5 deletions WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ workspace(
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file")
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")

IC_REPO_VERSION="0062aec2efc16d6e4cadb2cd1052aaabbc9f6e48"
IC_REPO_VERSION="abac636d8a281a1e7600d876aaed10f7ce7e5040"
http_archive(
name = "ic_repo",
strip_prefix = "ic-{}".format(IC_REPO_VERSION),
sha256 = "f33b23635a55367d8999b5fc9b7dbb61991685fca22c4d0af1b2c693a4332c1d",
sha256 = "1b85209dcf456defc25ecb7f4710327ff64eaed94bff36dc5748f5bb96823400",
url = "https://github.com/dfinity/ic/archive/{}.tar.gz".format(IC_REPO_VERSION),
)

Expand Down Expand Up @@ -44,7 +44,7 @@ rust_analyzer_dependencies()
rust_register_toolchains(
edition = "2021",
versions = [
"1.66.1",
"1.71.1",
],
)

Expand All @@ -63,8 +63,8 @@ crate_repositories()
http_file(
name = "ic-icrc1-archive",
downloaded_file_path = "ic-icrc1-archive.wasm.gz",
sha256 = "7f6172eae53d892b654b059e0f4127d823b16af8f53bf051a9df1d8087a6ffe4",
url = "https://download.dfinity.systems/ic/0062aec2efc16d6e4cadb2cd1052aaabbc9f6e48/canisters/ic-icrc1-archive.wasm.gz",
sha256 = "1b85209dcf456defc25ecb7f4710327ff64eaed94bff36dc5748f5bb96823400",
url = "https://download.dfinity.systems/ic/abac636d8a281a1e7600d876aaed10f7ce7e5040/canisters/ic-icrc1-archive.wasm.gz",
)

http_archive(
Expand Down
24 changes: 12 additions & 12 deletions rs/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@ colored = "2.0.0"
log = "0.4.14"
pretty_env_logger = "0.4.0"
regex = "1.5.4"
ic-base-types = { git = "https://github.com/dfinity/ic.git", rev = "0062aec2efc16d6e4cadb2cd1052aaabbc9f6e48" }
ic-nns-constants = { git = "https://github.com/dfinity/ic.git", rev = "0062aec2efc16d6e4cadb2cd1052aaabbc9f6e48" }
ic-nns-governance = { git = "https://github.com/dfinity/ic.git", rev = "0062aec2efc16d6e4cadb2cd1052aaabbc9f6e48" }
ic-canister-client = { git = "https://github.com/dfinity/ic.git", rev = "0062aec2efc16d6e4cadb2cd1052aaabbc9f6e48" }
ic-sys = { git = "https://github.com/dfinity/ic.git", rev = "0062aec2efc16d6e4cadb2cd1052aaabbc9f6e48" }
ic-registry-nns-data-provider = { git = "https://github.com/dfinity/ic.git", rev = "0062aec2efc16d6e4cadb2cd1052aaabbc9f6e48" }
ic-registry-keys = { git = "https://github.com/dfinity/ic.git", rev = "0062aec2efc16d6e4cadb2cd1052aaabbc9f6e48" }
ic-registry-transport = { git = "https://github.com/dfinity/ic.git", rev = "0062aec2efc16d6e4cadb2cd1052aaabbc9f6e48" }
ic-protobuf = { git = "https://github.com/dfinity/ic.git", rev = "0062aec2efc16d6e4cadb2cd1052aaabbc9f6e48" }
ic-base-types = { git = "https://github.com/dfinity/ic.git", rev = "abac636d8a281a1e7600d876aaed10f7ce7e5040" }
ic-nns-constants = { git = "https://github.com/dfinity/ic.git", rev = "abac636d8a281a1e7600d876aaed10f7ce7e5040" }
ic-nns-governance = { git = "https://github.com/dfinity/ic.git", rev = "abac636d8a281a1e7600d876aaed10f7ce7e5040" }
ic-canister-client = { git = "https://github.com/dfinity/ic.git", rev = "abac636d8a281a1e7600d876aaed10f7ce7e5040" }
ic-sys = { git = "https://github.com/dfinity/ic.git", rev = "abac636d8a281a1e7600d876aaed10f7ce7e5040" }
ic-registry-nns-data-provider = { git = "https://github.com/dfinity/ic.git", rev = "abac636d8a281a1e7600d876aaed10f7ce7e5040" }
ic-registry-keys = { git = "https://github.com/dfinity/ic.git", rev = "abac636d8a281a1e7600d876aaed10f7ce7e5040" }
ic-registry-transport = { git = "https://github.com/dfinity/ic.git", rev = "abac636d8a281a1e7600d876aaed10f7ce7e5040" }
ic-protobuf = { git = "https://github.com/dfinity/ic.git", rev = "abac636d8a281a1e7600d876aaed10f7ce7e5040" }
ic-canisters = { path = "../ic-canisters" }
prost = "0.11.0"
prost = "0.12.1"
tokio = { version = "1.14.0", features = ["full"] }
strum = { version = "0.25.0", features = ["derive"] }
strum_macros = "0.25.1"
Expand All @@ -51,13 +51,13 @@ itertools = "0.11.0"
async-trait = "0.1.53"
keyring = "2.0.2"
cryptoki = "0.3.1"
candid = "0.8.4"
candid = "0.9.5"
url = "2.3.1"
clap-num = "1.0.0"
sha2 = "0.10.6"
edit = "0.1.4"
tabular = "0.2"
ic-agent = "0.23.2"
ic-agent = "0.27.0"

[dev-dependencies]
tempfile = "3.3.0"
1 change: 0 additions & 1 deletion rs/cli/src/ic_admin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,6 @@ must be identical, and must match the SHA256 from the payload of the NNS proposa
.trim()
.replace("\r(\n)?", "\n")
.split('\n')
.into_iter()
.map(|f| {
if !f.starts_with('*') {
return f.to_string();
Expand Down
2 changes: 1 addition & 1 deletion rs/decentralization/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
ic-base-types = { git = "https://github.com/dfinity/ic.git", rev = "0062aec2efc16d6e4cadb2cd1052aaabbc9f6e48" }
ic-base-types = { git = "https://github.com/dfinity/ic.git", rev = "abac636d8a281a1e7600d876aaed10f7ce7e5040" }
serde = { version = "1.0", features = ["rc"] }
serde_json = { version = "1.0" }
async-trait = "0.1.52"
Expand Down
6 changes: 3 additions & 3 deletions rs/ic-canisters/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ version = "0.1.0"
edition = "2021"

[dependencies]
ic-nns-constants = { git = "https://github.com/dfinity/ic.git", rev = "0062aec2efc16d6e4cadb2cd1052aaabbc9f6e48" }
ic-nns-constants = { git = "https://github.com/dfinity/ic.git", rev = "abac636d8a281a1e7600d876aaed10f7ce7e5040" }
url = "2.2.2"
ic-agent = "0.25.0"
ic-agent = "0.27.0"
anyhow = "1.0.44"
candid = "0.9.1"
candid = "0.9.5"
serde = { version = "1.0.130", features = ["derive"] }
serde_json = "1.0.68"

Expand Down
44 changes: 22 additions & 22 deletions rs/ic-management-backend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,53 +20,53 @@ actix-web = { version = "4.2.1", default-features = false, features = [
"compress-gzip",
"macros",
] }
ic-base-types = { git = "https://github.com/dfinity/ic.git", rev = "0062aec2efc16d6e4cadb2cd1052aaabbc9f6e48" }
ic-registry-keys = { git = "https://github.com/dfinity/ic.git", rev = "0062aec2efc16d6e4cadb2cd1052aaabbc9f6e48" }
ic-base-types = { git = "https://github.com/dfinity/ic.git", rev = "abac636d8a281a1e7600d876aaed10f7ce7e5040" }
ic-registry-keys = { git = "https://github.com/dfinity/ic.git", rev = "abac636d8a281a1e7600d876aaed10f7ce7e5040" }
anyhow = "1.0.43"
futures = "0.3.16"
serde_yaml = "0.9.11"
reqwest = { version = "0.11.4", features = ["json"] }
async-trait = "0.1.52"
enum-map = "1.1.1"
either = "1.6.1"
ic-interfaces-registry = { git = "https://github.com/dfinity/ic.git", rev = "0062aec2efc16d6e4cadb2cd1052aaabbc9f6e48" }
ic-protobuf = { git = "https://github.com/dfinity/ic.git", rev = "0062aec2efc16d6e4cadb2cd1052aaabbc9f6e48" }
ic-registry-nns-data-provider = { git = "https://github.com/dfinity/ic.git", rev = "0062aec2efc16d6e4cadb2cd1052aaabbc9f6e48" }
ic-registry-local-registry = { git = "https://github.com/dfinity/ic.git", rev = "0062aec2efc16d6e4cadb2cd1052aaabbc9f6e48" }
ic-registry-local-store = { git = "https://github.com/dfinity/ic.git", rev = "0062aec2efc16d6e4cadb2cd1052aaabbc9f6e48" }
ic-registry-common-proto = { git = "https://github.com/dfinity/ic.git", rev = "0062aec2efc16d6e4cadb2cd1052aaabbc9f6e48" }
ic-registry-subnet-type = { git = "https://github.com/dfinity/ic.git", rev = "0062aec2efc16d6e4cadb2cd1052aaabbc9f6e48" }
ic-types = { git = "https://github.com/dfinity/ic.git", rev = "0062aec2efc16d6e4cadb2cd1052aaabbc9f6e48" }
prost = "0.11.0"
ic-interfaces-registry = { git = "https://github.com/dfinity/ic.git", rev = "abac636d8a281a1e7600d876aaed10f7ce7e5040" }
ic-protobuf = { git = "https://github.com/dfinity/ic.git", rev = "abac636d8a281a1e7600d876aaed10f7ce7e5040" }
ic-registry-nns-data-provider = { git = "https://github.com/dfinity/ic.git", rev = "abac636d8a281a1e7600d876aaed10f7ce7e5040" }
ic-registry-local-registry = { git = "https://github.com/dfinity/ic.git", rev = "abac636d8a281a1e7600d876aaed10f7ce7e5040" }
ic-registry-local-store = { git = "https://github.com/dfinity/ic.git", rev = "abac636d8a281a1e7600d876aaed10f7ce7e5040" }
ic-registry-common-proto = { git = "https://github.com/dfinity/ic.git", rev = "abac636d8a281a1e7600d876aaed10f7ce7e5040" }
ic-registry-subnet-type = { git = "https://github.com/dfinity/ic.git", rev = "abac636d8a281a1e7600d876aaed10f7ce7e5040" }
ic-types = { git = "https://github.com/dfinity/ic.git", rev = "abac636d8a281a1e7600d876aaed10f7ce7e5040" }
prost = "0.12.1"
ic-management-types = { path = "../ic-management-types" }
ic-canisters = { path = "../ic-canisters" }
registry-canister = { git = "https://github.com/dfinity/ic.git", rev = "0062aec2efc16d6e4cadb2cd1052aaabbc9f6e48" }
registry-canister = { git = "https://github.com/dfinity/ic.git", rev = "abac636d8a281a1e7600d876aaed10f7ce7e5040" }
strum = "0.25.0"
strum_macros = "0.25.1"
itertools = "0.11.0"
log = "0.4.14"
env_logger = "0.10.0"
reverse_geocoder = "3.0.1"
csv = "1.1.6"
candid = "0.8.4"
ic-nns-governance = { git = "https://github.com/dfinity/ic.git", rev = "0062aec2efc16d6e4cadb2cd1052aaabbc9f6e48" }
ic-nns-common = { git = "https://github.com/dfinity/ic.git", rev = "0062aec2efc16d6e4cadb2cd1052aaabbc9f6e48" }
ic-nns-constants = { git = "https://github.com/dfinity/ic.git", rev = "0062aec2efc16d6e4cadb2cd1052aaabbc9f6e48" }
ic-agent = "0.25.0"
gitlab = "0.1601.0"
candid = "0.9.5"
ic-nns-governance = { git = "https://github.com/dfinity/ic.git", rev = "abac636d8a281a1e7600d876aaed10f7ce7e5040" }
ic-nns-common = { git = "https://github.com/dfinity/ic.git", rev = "abac636d8a281a1e7600d876aaed10f7ce7e5040" }
ic-nns-constants = { git = "https://github.com/dfinity/ic.git", rev = "abac636d8a281a1e7600d876aaed10f7ce7e5040" }
ic-agent = "0.27.0"
gitlab = "0.1603.0"
dotenv = "0.15.0"
derive_builder = "0.12.0"
lazy_static = "1.4.0"
regex = "1.5.4"
async-timer = "0.7.4"
counter = "0.5.2"
rand = "0.8.4"
phantom_newtype = { git = "https://github.com/dfinity/ic.git", rev = "0062aec2efc16d6e4cadb2cd1052aaabbc9f6e48" }
phantom_newtype = { git = "https://github.com/dfinity/ic.git", rev = "abac636d8a281a1e7600d876aaed10f7ce7e5040" }
decentralization = { path = "../decentralization" }
prometheus-http-query = "0.4.0"
ic-registry-client = { git = "https://github.com/dfinity/ic.git", rev = "0062aec2efc16d6e4cadb2cd1052aaabbc9f6e48" }
ic-registry-client-fake = { git = "https://github.com/dfinity/ic.git", rev = "0062aec2efc16d6e4cadb2cd1052aaabbc9f6e48" }
ic-registry-client-helpers = { git = "https://github.com/dfinity/ic.git", rev = "0062aec2efc16d6e4cadb2cd1052aaabbc9f6e48" }
ic-registry-client = { git = "https://github.com/dfinity/ic.git", rev = "abac636d8a281a1e7600d876aaed10f7ce7e5040" }
ic-registry-client-fake = { git = "https://github.com/dfinity/ic.git", rev = "abac636d8a281a1e7600d876aaed10f7ce7e5040" }
ic-registry-client-helpers = { git = "https://github.com/dfinity/ic.git", rev = "abac636d8a281a1e7600d876aaed10f7ce7e5040" }
dirs = "5.0.1"
backon = "0.4.1"
exitcode = "1.1.2"
Expand Down
118 changes: 56 additions & 62 deletions rs/ic-management-backend/src/proposal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,53 +128,50 @@ impl ProposalAgent {
let mut proposals = vec![];
loop {
let fetch_partial_results = || async {
Decode!(
self.agent
.query(
&ic_agent::export::Principal::from_slice(
ic_nns_constants::GOVERNANCE_CANISTER_ID.get().as_slice(),
),
"list_proposals",
)
.with_arg(
Encode!(&ListProposalInfo {
limit: 1000,
// 0, 1, 2, 3, 4, 5, 6, 8, 9, 10
exclude_topic: vec![
Topic::Unspecified,
Topic::NeuronManagement,
Topic::ExchangeRate,
Topic::NetworkEconomics,
Topic::Governance,
// Topic::NodeAdmin,
Topic::ParticipantManagement,
// Topic::SubnetManagement,
Topic::NetworkCanisterManagement,
Topic::Kyc,
Topic::NodeProviderRewards,
Topic::SnsDecentralizationSale,
// Topic::SubnetReplicaVersionManagement,
// Topic::ReplicaVersionManagement,
Topic::SnsAndCommunityFund,
]
.into_iter()
.map(|t| t.into())
.collect(),
include_status: include_status.clone().into_iter().map(|s| s.into()).collect(),
before_proposal: proposals
.last()
.map(|p: &ProposalInfo| p.id.expect("proposal should have an id")),
..Default::default()
})
.expect("encode failed")
)
.call()
.await?
.as_slice(),
ListProposalInfoResponse
)
.map(|lp| lp.proposal_info)
.map_err(|e| anyhow::format_err!("failed to decode list proposals: {}", e))
let f = self
.agent
.query(
&ic_agent::export::Principal::from_slice(
ic_nns_constants::GOVERNANCE_CANISTER_ID.get().as_slice(),
),
"list_proposals",
)
.with_arg(
Encode!(&ListProposalInfo {
limit: 1000,
// 0, 1, 2, 3, 4, 5, 6, 8, 9, 10
exclude_topic: vec![
Topic::Unspecified,
Topic::NeuronManagement,
Topic::ExchangeRate,
Topic::NetworkEconomics,
Topic::Governance,
// Topic::NodeAdmin,
Topic::ParticipantManagement,
// Topic::SubnetManagement,
Topic::NetworkCanisterManagement,
Topic::Kyc,
Topic::NodeProviderRewards,
Topic::SnsDecentralizationSale,
// Topic::SubnetReplicaVersionManagement,
// Topic::ReplicaVersionManagement,
Topic::SnsAndCommunityFund,
]
.into_iter()
.map(|t| t.into())
.collect(),
include_status: include_status.clone().into_iter().map(|s| s.into()).collect(),
before_proposal: proposals
.last()
.map(|p: &ProposalInfo| p.id.expect("proposal should have an id")),
..Default::default()
})
.expect("encode failed"),
)
.call();
Decode!(f.await?.as_slice(), ListProposalInfoResponse)
.map(|lp| lp.proposal_info)
.map_err(|e| anyhow::format_err!("failed to decode list proposals: {}", e))
};
let partial_result = fetch_partial_results.retry(&ExponentialBuilder::default()).await?;
if partial_result.is_empty() {
Expand All @@ -193,21 +190,18 @@ impl ProposalAgent {
try_join_all(empty_payload_proposals.iter().map(|p| async {
let id = p.id.expect("proposal should have id").id;
let fetch_partial_results = || async {
Decode!(
self.agent
.query(
&ic_agent::export::Principal::from_slice(
ic_nns_constants::GOVERNANCE_CANISTER_ID.get().as_slice(),
),
"get_proposal_info",
)
.with_arg(Encode!(&id).expect("encode failed"))
.call()
.await?
.as_slice(),
Option<ProposalInfo>
)
.map_err(|e| anyhow::format_err!("failed to decode list proposals: {}", e))
let f = self
.agent
.query(
&ic_agent::export::Principal::from_slice(
ic_nns_constants::GOVERNANCE_CANISTER_ID.get().as_slice(),
),
"get_proposal_info",
)
.with_arg(Encode!(&id).expect("encode failed"))
.call();
Decode!(f.await?.as_slice(), Option<ProposalInfo>)
.map_err(|e| anyhow::format_err!("failed to decode list proposals: {}", e))
};
fetch_partial_results.retry(&ExponentialBuilder::default()).await
}))
Expand Down
5 changes: 2 additions & 3 deletions rs/ic-management-backend/src/release.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ pub struct RolloutConfig {
}

mod iso_8601_date_format {
use chrono::{NaiveDate, TimeZone, Utc};
use chrono::{DateTime, NaiveDate};
use itertools::Itertools;
use serde::{self, Deserialize, Deserializer};

Expand All @@ -109,7 +109,7 @@ mod iso_8601_date_format {
Vec::deserialize(deserializer)?
.into_iter()
.map(|s: String| {
Utc.datetime_from_str(&format!("{} 00:00:00", s), FORMAT)
DateTime::parse_from_str(&format!("{} 00:00:00", s), FORMAT)
.map_err(serde::de::Error::custom)
.map(|dt| dt.date_naive())
})
Expand All @@ -121,7 +121,6 @@ impl RolloutConfig {
// Returns available rollout days. Always return at least 2 available days
fn rollout_days(&self, start: NaiveDate) -> Vec<NaiveDate> {
let candidates = (0..14)
.into_iter()
.map(|i| {
let mut d = start;
for _ in 0..i {
Expand Down
12 changes: 6 additions & 6 deletions rs/ic-management-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ actix-web = { version = "4.2.1", default-features = false, features = [
] }
chrono = { version = "0.4.19", features = ["serde"] }
float-cmp = "0.9.0"
ic-base-types = { git = "https://github.com/dfinity/ic.git", rev = "0062aec2efc16d6e4cadb2cd1052aaabbc9f6e48" }
ic-nns-governance = { git = "https://github.com/dfinity/ic.git", rev = "0062aec2efc16d6e4cadb2cd1052aaabbc9f6e48" }
ic-registry-subnet-type = { git = "https://github.com/dfinity/ic.git", rev = "0062aec2efc16d6e4cadb2cd1052aaabbc9f6e48" }
ic-types = { git = "https://github.com/dfinity/ic.git", rev = "0062aec2efc16d6e4cadb2cd1052aaabbc9f6e48" }
registry-canister = { git = "https://github.com/dfinity/ic.git", rev = "0062aec2efc16d6e4cadb2cd1052aaabbc9f6e48" }
ic-base-types = { git = "https://github.com/dfinity/ic.git", rev = "abac636d8a281a1e7600d876aaed10f7ce7e5040" }
ic-nns-governance = { git = "https://github.com/dfinity/ic.git", rev = "abac636d8a281a1e7600d876aaed10f7ce7e5040" }
ic-registry-subnet-type = { git = "https://github.com/dfinity/ic.git", rev = "abac636d8a281a1e7600d876aaed10f7ce7e5040" }
ic-types = { git = "https://github.com/dfinity/ic.git", rev = "abac636d8a281a1e7600d876aaed10f7ce7e5040" }
registry-canister = { git = "https://github.com/dfinity/ic.git", rev = "abac636d8a281a1e7600d876aaed10f7ce7e5040" }
itertools = "0.11.0"
reqwest = { version = "0.11.9", features = ["json"] }
serde = "1.0.127"
Expand All @@ -23,7 +23,7 @@ strum = "0.25.0"
strum_macros = "0.25.1"
url = "2.2.2"
anyhow = "1.0.43"
candid = "0.8.4"
candid = "0.9.5"

[lib]
path = "src/lib.rs"
Loading

0 comments on commit 1814a81

Please sign in to comment.