Skip to content

Commit 94553a8

Browse files
committed
Merge branch 'bump-ic-agent-version' into 'master'
chore: [NET-1402] bump IC-agent version to 0.24 closes NET-1402 This MR is needed in order to upgrade IC-agent to version 0.24. The new ic-agent version is needed as part of a larger work item, where we are planning on changing the response body of rejected call requests, see the according [interface spec change](dfinity/interface-spec#143). This MR also bumps the dependencies of `k256` and `p256` to `0.13.2` and adds them as workspace dependencies. The new version of `ic-agent` requires a type `SecretKey` in some of its APIs, where `SecretKey` is introduced in the newer versions of `k256` and `p256`. An example function of such as function is [from_private_key(private_key: SecretKey)](https://docs.rs/ic-agent/latest/ic_agent/identity/struct.Secp256k1Identity.html#method.from_private_key). Closes NET-1402 See merge request dfinity-lab/public/ic!12595
2 parents 91318ff + 062fa13 commit 94553a8

File tree

44 files changed

+4220
-2767
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+4220
-2767
lines changed

Cargo.Bazel.StaticOpenSSL.json.lock

Lines changed: 1434 additions & 901 deletions
Large diffs are not rendered by default.

Cargo.Bazel.StaticOpenSSL.toml.lock

Lines changed: 478 additions & 368 deletions
Large diffs are not rendered by default.

Cargo.Bazel.json.lock

Lines changed: 1434 additions & 901 deletions
Large diffs are not rendered by default.

Cargo.Bazel.toml.lock

Lines changed: 478 additions & 368 deletions
Large diffs are not rendered by default.

Cargo.lock

Lines changed: 193 additions & 69 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,17 @@ ciborium = { git = "https://github.com/enarx/ciborium", rev = "e719537c99b564c36
361361
pprof = { git = "https://github.com/tikv/pprof-rs", rev = "059d3c80395c74e9f82ca1f9cbb3c013acfffb75" }
362362

363363
[workspace.dependencies]
364-
ic-agent = "0.23"
364+
ic-agent = "0.24.1"
365365
ic-btc-interface = { git = "https://github.com/dfinity/bitcoin-canister", rev = "e4e89f2caedffbe0cfdec6f9d4a77f66dcb9119e" }
366-
ic-utils = "0.23"
366+
ic-utils = "0.24.1"
367+
k256 = { version = "0.13", default_features = false, features = [
368+
"arithmetic",
369+
"ecdsa",
370+
"pkcs8",
371+
] }
372+
p256 = { version = "0.13", default_features = false, features = [
373+
"arithmetic",
374+
"ecdsa",
375+
"pem",
376+
"pkcs8",
377+
] }

bazel/external_crates.bzl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ def external_crates_repository(name, static_openssl, cargo_lockfile, lockfile):
448448
version = "0.18.9",
449449
),
450450
"ic-agent": crate.spec(
451-
version = "^0.23.0",
451+
version = "^0.24.1",
452452
features = [
453453
"hyper",
454454
],
@@ -490,7 +490,7 @@ def external_crates_repository(name, static_openssl, cargo_lockfile, lockfile):
490490
version = "^2.2.0",
491491
),
492492
"ic-utils": crate.spec(
493-
version = "^0.23.0",
493+
version = "^0.24.1",
494494
features = [
495495
"raw",
496496
],
@@ -549,7 +549,7 @@ def external_crates_repository(name, static_openssl, cargo_lockfile, lockfile):
549549
version = "^0.4.1",
550550
),
551551
"k256": crate.spec(
552-
version = "^0.12.0",
552+
version = "^0.13.1",
553553
features = [
554554
"arithmetic",
555555
"ecdsa",
@@ -691,7 +691,7 @@ def external_crates_repository(name, static_openssl, cargo_lockfile, lockfile):
691691
version = "^0.11.0",
692692
),
693693
"p256": crate.spec(
694-
version = "^0.12.0",
694+
version = "^0.13.2",
695695
features = [
696696
"arithmetic",
697697
"ecdsa",
@@ -936,7 +936,7 @@ def external_crates_repository(name, static_openssl, cargo_lockfile, lockfile):
936936
version = "^0.8.0",
937937
),
938938
"sev": crate.spec(
939-
version = "^1.1.0",
939+
version = "=1.1.0", # Pinned to 1.1.0. The crate broke semantic verisioning with breaking changes in 1.2.0 (https://github.com/virtee/sev/issues/81).
940940
features = [
941941
"openssl",
942942
],

packages/ic-starter-tests/src/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,7 @@ pub async fn start_replica(
194194
Ok(status) => {
195195
ok = status.replica_health_status == Some("healthy".to_string());
196196
if let Some(root_key) = status.root_key.as_ref() {
197-
agent
198-
.set_root_key(root_key.clone())
199-
.context("failed to set agent root key")?;
197+
agent.set_root_key(root_key.clone());
200198
}
201199
last_status = Some(status);
202200
}

packages/icrc-ledger-agent/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use candid::{Decode, Encode, Nat, Principal};
2-
use ic_agent::hash_tree::LookupResult;
2+
use ic_agent::hash_tree::{Label, LookupResult};
33
use ic_agent::{Agent, Certificate};
44
use icrc_ledger_types::icrc::generic_metadata_value::MetadataValue as Value;
55
use icrc_ledger_types::icrc::generic_value::Hash;
@@ -192,14 +192,14 @@ impl Icrc1Agent {
192192
/// 2. Check whether the certified data at path ["canister", ledger_canister_id, "certified_data"] is equal to root_hash.
193193
pub async fn verify_root_hash(
194194
&self,
195-
certificate: &Certificate<'_>,
195+
certificate: &Certificate,
196196
root_hash: &Hash,
197197
) -> Result<(), Icrc1AgentError> {
198198
self.agent
199199
.verify(certificate, self.ledger_canister_id)
200200
.map_err(Icrc1AgentError::AgentError)?;
201201

202-
let certified_data_path = [
202+
let certified_data_path: [Label<Vec<u8>>; 3] = [
203203
"canister".into(),
204204
self.ledger_canister_id.as_slice().into(),
205205
"certified_data".into(),

rs/boundary_node/certificate_issuance/certificate_issuer/src/certificate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ impl<T: Export> Export for WithVerify<T> {
205205
) -> Result<(Vec<Package>, IcCertificate), ExportError> {
206206
let (pkgs, iccert) = self.0.export(key.clone(), limit).await?;
207207

208-
let (cert, tree): (Certificate, HashTree) = (
208+
let (cert, tree): (Certificate, HashTree<Vec<u8>>) = (
209209
serde_cbor::from_slice(&iccert.cert).context("failed to cbor-decode ic certificate")?,
210210
serde_cbor::from_slice(&iccert.tree).context("failed to cbor-decode tree")?,
211211
);

0 commit comments

Comments
 (0)