Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
be8a4d3
perf: [DSM-144] Misc certification optimizations
alin-at-dfinity Jun 18, 2026
76df8ed
Fix pattern match for empty Blob in hash_tree
alin-at-dfinity Jun 19, 2026
a6f274f
Make clippy happy.
alin-at-dfinity Jun 19, 2026
793c4a5
Automatically fixing code for linting and formatting issues
Jun 19, 2026
8dada3e
fix: Also reduce read_ahead for dm-* devices (#10420)
alin-at-dfinity Jun 9, 2026
24ad019
fix: honor --json for ic-admin get-elected-{guestos,hostos}-versions …
pietrodimarco-dfinity Jun 9, 2026
5b3d562
chore: Update Mainnet ICOS revisions file (#10421)
pr-creation-bot-dfinity-ic[bot] Jun 9, 2026
ec4f6f6
feat: subnet deletion in PocketIC (#10407)
mraszyk Jun 10, 2026
1ff18ee
feat: [DSM-142] Improve `process_batch()` phase duration coverage (#1…
alin-at-dfinity Jun 10, 2026
9a3b105
chore: migration canister rejects canister migration from/to cloud en…
mraszyk Jun 10, 2026
5fe61d7
feat: IC-1943 Include refund shares in HTTP outcalls payload (#10310)
eichhorl Jun 10, 2026
557ddcf
feat: enable canister log memory store feature (#10160)
mraszyk Jun 10, 2026
04f4e85
chore(Core): Limit wasm locals (#10430)
michael-weigelt Jun 11, 2026
363a641
fix(NODE-1958): Make cloud GuestOS great again (#10429)
blind-oracle Jun 11, 2026
bb0e2b9
feat: increase max environment variables per canister from 20 to 32 (…
Dfinity-Bjoern Jun 11, 2026
02cccef
feat: bump bazel version to 9.1.1 (#10413)
nmattia Jun 11, 2026
0cab802
fix: deflake //rs/tests/networking:canister_http_* tests (#10441)
basvandijk Jun 11, 2026
56007f6
fix: disable canister log memory store feature (#10444)
mraszyk Jun 11, 2026
5a78636
chore: Update Base Image Refs [2026-06-11-0925] (#10437)
pr-creation-bot-dfinity-ic[bot] Jun 11, 2026
4258218
feat: hoist dosfstools and mtools out of Dockerfile (#10439)
nmattia Jun 11, 2026
a07490d
fix: bind danted to the wildcard address instead of an interface name…
basvandijk Jun 11, 2026
188c834
feat: Introduce EngineNotAllowed signals (#10432)
schneiderstefan Jun 11, 2026
0b84029
chore(systests): force testnet allocation to the local DC for all sys…
basvandijk Jun 11, 2026
242ced1
feat: allow engine-controller canister to update cloud engines direct…
NikolaMilosa Jun 12, 2026
a60aa51
feat: add IDX skills (#10454)
nmattia Jun 12, 2026
bff673d
feat: [NODE-1963] Copy only the latest few logfiles (#10425)
Bownairo Jun 12, 2026
de83a2b
fix: Fixup bare metal deployment configs (#10450)
Bownairo Jun 13, 2026
8e12eec
fix: evict dead pooled XNet connections via HTTP/2 keep-alive pings (…
basvandijk Jun 13, 2026
f8f89b3
chore(P2P): Only increment error metric if transport infos of all reg…
eichhorl Jun 15, 2026
703257b
chore: log `networkctl status enp2s0` when timing out on acquiring IP…
basvandijk Jun 15, 2026
0e9b096
fix: persistent_next_idx in log memory store for zero log memory limi…
mraszyk Jun 15, 2026
0a4faba
chore: Update Mainnet IC revisions canisters file (#10468)
pr-creation-bot-dfinity-ic[bot] Jun 15, 2026
a043ed8
fix: clean up registry after deleting subnet from PocketIC (#10428)
mraszyk Jun 15, 2026
a91ae4e
fix: gaps in canister logs (#10463)
mraszyk Jun 15, 2026
b844926
fix: deflake //rs/tests/consensus/orchestrator:ssh_access_to_nodes_te…
basvandijk Jun 15, 2026
ceadcbe
fix: filter canister log records during migration to new log memory s…
mraszyk Jun 15, 2026
0fbf8c0
chore(DSM-121): add critical_error_sync_call_unknown_certificate_stat…
mraszyk Jun 15, 2026
f555788
fix: deflake //rs/tests/cross_chain:ic_xc_cketh_test by compiling con…
basvandijk Jun 15, 2026
b7a42f9
feat: deduplicate LLVM install (#10471)
nmattia Jun 15, 2026
6e60cad
chore: Update Mainnet IC revisions canisters file (#10473)
pr-creation-bot-dfinity-ic[bot] Jun 15, 2026
24e9128
chore: Update Mainnet ICOS revisions file (#10472)
pr-creation-bot-dfinity-ic[bot] Jun 15, 2026
c0a8061
chore: use static IPv6 for GuestOS instead of RA in testnets (#10474)
basvandijk Jun 15, 2026
a50ec3f
fix: process query stats during idle epochs in PocketIC (#10451)
mraszyk Jun 15, 2026
f0a032e
chore: Update Mainnet ICOS revisions file (#10477)
pr-creation-bot-dfinity-ic[bot] Jun 15, 2026
e86ddd0
chore: Update Mainnet IC revisions canisters file (#10478)
pr-creation-bot-dfinity-ic[bot] Jun 15, 2026
4be7ff8
chore: remove mold (#10481)
nmattia Jun 16, 2026
adbc0c9
chore: upgrade UVM and P8s images (#10476)
basvandijk Jun 16, 2026
e365598
chore: harden assert_no_snapshot and get_registry_version in migratio…
mraszyk Jun 16, 2026
e6a0f28
chore: Update Mainnet ICOS revisions file (#10483)
pr-creation-bot-dfinity-ic[bot] Jun 16, 2026
7d9bbd3
feat: Enable `PATCH` for HTTP outcalls (#10453)
eichhorl Jun 16, 2026
9ae9d25
fix: use curl for fetching gh signature (#10488)
nmattia Jun 16, 2026
c808ef1
fix: Revert "chore(Core): Limit wasm locals" (#10475)
schneiderstefan Jun 16, 2026
d9c18af
feat: CON-1467 CON-1705 Add registry version to `CanisterHttpRequestC…
eichhorl Jun 16, 2026
3f387d7
chore: clarify motoko toolchains (#10480)
nmattia Jun 16, 2026
f2c0141
fix: II init args in PocketIC (#10496)
mraszyk Jun 17, 2026
5db4f9e
feat: Add delivered HTTP call contexts to subnet call context manager…
eichhorl Jun 17, 2026
c78a8f3
refactor: introduce CyclesAccountManagerSubnetConfig (#10485)
mraszyk Jun 17, 2026
3a57848
docs: add missing firewall rule scope in `ic-admin` docs (#10498)
pierugo-dfinity Jun 17, 2026
7e9db21
fix: Fix python bazel wrapper after upgrade (#10479)
Bownairo Jun 17, 2026
397aada
feat: hoist e2fsdroid (from platform-tools) from Dockerfile to Bazel …
nmattia Jun 18, 2026
ce26e69
chore(governance): Get rid of ENABLE_CREATE_CANISTER_AND_INSTALL_CODE…
daniel-wong-dfinity-org Jun 18, 2026
34e5e89
test(ICRC_Ledger): DEFI-2646: Add canbench for get_blocks in ICRC led…
mbjorkqvist Jun 18, 2026
b0ba48f
chore: Update Base Image Refs [2026-06-18-0927] (#10502)
pr-creation-bot-dfinity-ic[bot] Jun 18, 2026
47afd24
chore(Core): Pass through config for DMT (#10507)
michael-weigelt Jun 19, 2026
813418f
chore(Core): Remove unnecessary heartbeats in tests (#10508)
michael-weigelt Jun 19, 2026
6e48d35
fix: deflake //rs/consensus:cup_explorer_test (#10515)
pierugo-dfinity Jun 19, 2026
052e61d
chore: revise vulnerability disclosure process in SECURITY.md (#10516)
jwndlng Jun 19, 2026
a547cc3
feat(https-outcalls): Introduce pay-as-you-go base fee (#10501)
eichhorl Jun 19, 2026
696e58b
feat: allow unlimited number of gen4 nodes (#10448)
NikolaMilosa Jun 19, 2026
5dfdb9e
fix: CONTAINER_RUNTIME=docker ./ci/container/container-run.sh (#10521)
basvandijk Jun 19, 2026
1a7aa6c
refactor: Allow references on the RHS of left_outer_join()
alin-at-dfinity Jun 20, 2026
38688d4
chore: Clean up comments in hash_tree.rs
alin-at-dfinity Jun 20, 2026
a82b777
feat: [MR-144] Reuse unchanged canister subtree digests across `HashT…
alin-at-dfinity Jun 22, 2026
122281d
Typo
alin-at-dfinity Jun 22, 2026
17ab418
Merge branch 'master' into alin/DSM-144-tree_hash-stubbing
alin-at-dfinity Jun 22, 2026
4539c5c
Merge branch 'master' into alin/DSM-144-tree_hash-stubbing
alin-at-dfinity Jun 22, 2026
557b352
Merge branch 'master' into alin/DSM-144-tree_hash-stubbing
alin-at-dfinity Jun 22, 2026
392145b
Address review comments.
alin-at-dfinity Jun 23, 2026
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
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

55 changes: 52 additions & 3 deletions rs/canonical_state/src/lazy_tree_conversion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ use crate::{
};
use LazyTree::Blob;
use ic_canonical_state_tree_hash::{
hash_tree::HashTree,
hash_tree::{HashTree, HashTreeError, hash_lazy_tree},
lazy_tree::{
Lazy, LazyFork, LazyTree, blob, fork, materialize::materialize_partial, num, string,
Lazy, LazyFork, LazyTree, SubtreeExpander, SubtreeSource, blob, fork,
materialize::materialize_partial, num, string,
},
};
use ic_crypto_tree_hash::{Label, Witness, sparse_labeled_tree_from_paths};
Expand Down Expand Up @@ -786,7 +787,7 @@ const CANISTER_NO_MODULE_LABELS: [&[u8]; 1] = [CONTROLLERS_LABEL];

#[derive(Clone)]
struct CanisterFork<'a> {
canister: &'a CanisterState,
canister: &'a Arc<CanisterState>,
version: CertificationVersion,
}

Expand Down Expand Up @@ -849,6 +850,54 @@ impl<'a> LazyFork<'a> for CanisterFork<'a> {
fn len(&self) -> usize {
self.valid_labels().len()
}

/// A canister's certified subtree is stored as a reusable stub identified by
/// the backing `Arc<CanisterState>` and the version-specific expander. An
/// unchanged canister keeps the same `Arc` (copy-on-write) and the same
/// expander, so its precomputed digest is reused from the baseline; any
/// mutation or version change yields a mismatched [`SubtreeSource`] and a
/// rebuild.
fn subtree_source(&self) -> Option<SubtreeSource> {
Some(SubtreeSource::new(
self.canister,
select_canister_expander(self.version),
))
}
}

/// Rebuilds a canister's stubbed [subtree](`NodeKind::Stub`) for witness
/// generation, by recovering the `Arc<CanisterState>` from the stub's
/// [`SubtreeSource`] and traversing its [`CanisterFork`].
///
/// The certification version (which the canonical encoding depends on) is baked
/// in as the const parameter `V`, so the stored function pointer alone fully
/// determines the expansion — see [`select_canister_expander`].
fn expand_canister<const V: u32>(source: &SubtreeSource) -> Result<HashTree, HashTreeError> {
let canister = source.downcast::<CanisterState>();
let version = CertificationVersion::try_from(V)
.expect("const version parameter is a valid certification version");
// `canister` (and thus the borrow below) outlives `hash_lazy_tree`, which
// returns an owned `HashTree`; no borrow escapes.
hash_lazy_tree(&fork(CanisterFork {
canister: &canister,
version,
}))
}

/// Selects the [`expand_canister`] monomorphization for `version`, so the
/// resulting [`SubtreeExpander`] function pointer carries the version with it
/// (rather than replicating it in every stub).
fn select_canister_expander(version: CertificationVersion) -> SubtreeExpander {
match version {
CertificationVersion::V19 => expand_canister::<{ CertificationVersion::V19 as u32 }>,
CertificationVersion::V20 => expand_canister::<{ CertificationVersion::V20 as u32 }>,
CertificationVersion::V21 => expand_canister::<{ CertificationVersion::V21 as u32 }>,
CertificationVersion::V22 => expand_canister::<{ CertificationVersion::V22 as u32 }>,
CertificationVersion::V23 => expand_canister::<{ CertificationVersion::V23 as u32 }>,
CertificationVersion::V24 => expand_canister::<{ CertificationVersion::V24 as u32 }>,
CertificationVersion::V25 => expand_canister::<{ CertificationVersion::V25 as u32 }>,
CertificationVersion::V26 => expand_canister::<{ CertificationVersion::V26 as u32 }>,
}
}

fn api_boundary_nodes_as_tree(
Expand Down
1 change: 1 addition & 0 deletions rs/canonical_state/tree_hash/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ rust_library(
deps = [
# Keep sorted.
"//rs/crypto/tree_hash",
"//rs/utils",
"@crate_index//:itertools",
"@crate_index//:leb128",
"@crate_index//:scoped_threadpool",
Expand Down
1 change: 1 addition & 0 deletions rs/canonical_state/tree_hash/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ documentation.workspace = true

[dependencies]
ic-crypto-tree-hash = { path = "../../crypto/tree_hash" }
ic-utils = { path = "../../utils" }
itertools = { workspace = true }
leb128 = "0.2.1"
scoped_threadpool = "0.1.*"
Expand Down
Loading
Loading