Proposal 136310 – Zane | CodeGov
Vote: ADOPT
Reason: Build completes successfully, both hashes and reviewed commits match their descriptions, so I’ve voted to adopt.
Features:
6b953276b Changed delegation_from_nns
field’s type so that instead of only being initialized once when the replica is started, it can be updated dynamically by using a tokyo channel. In construct_ic_stack
an async tokyo task is spawned by calling start_nns_delegation_manager
and the returned asynchronous listener’s handle is then passed to the http components of the stack. The update logic is encapsulated by the newly introduced DelegationManager
struct, which is responsible for periodically fetching the NNS delegation (every 10 minutes at the moment), keeping track of related metrics and updating the listener if the value has changed.
66ffd5231 Added cycle charging in read_snapshot_data
by calling consume_cycles_for_instructions
, the number of cycles is calculated by using a baseline number of instructions, i.e DEFAULT_CANISTERS_SNAPSHOT_DATA_BASELINE_INSTRUCTIONS, adding the byte size of the data to be download to it and finally using the subnet size to scale it. If the canister doesn’t have enough cycles to cover the cost of the call then CanisterSnapshotNotEnoughCycles
variant of CanisterManagerError
is returned.
23abac589 Modified the StateMachineBuilder
struct used to create replicated state machine instances detached from the network layer, which are leveraged by tests and benchmarks, to support toggling of canister snapshot download/upload feature flags. Added two helper methods to the test StateMachine struct which conveniently wrap calls to the IC00 endpoints to read snapshot’s data/metadata. In benches/management_canister/utils.rs
the env
method that creates a test StateMachine instance has been modified to enable both flags. A new benchmark has been added to the canister snapshot benches called read_canister_snapshot_data_bench
, this measures how long it takes to read main memory data from canister snapshot by starting at a given offset, two variations are included one that just reads the data and one that also creates an on disk checkpoint immediately after. The results of this bench are stored using the read_canister_snapshot_data
bench group. Finally existing bench methods have been updated to avoid dropping the StateMachine
instance so as to avoid the time taken for this operation being counted in the bench results.
Bugfixes:
56b0c90d2 Moved response decoding from validate_reshare_dealings
to a separate method called decode_initial_dealings
and added support for new ReshareChainKeyResponse
format.
7575e49a4 Modified PAGES_PER_CHUNK
and CHUNK_SIZE
constants in wasm chunk store so that the chunk’s size is fixed, i.e 1 MiB, while pages per chunk are calculated dividing the chunk’s size by the page size, which is OS dependent, instead of doing it the other way around. chunk_size_multiple_of_os_page_size
test has been added to ensure proper memory alignment by checking CHUNK_SIZE is divisible by PAGE_SIZE with no remainder. In the take_snapshot_with_maximal_chunk_store
the feature flag for snapshot download is enabled when building the execution environment instance, when uploading the wasm chunks there is no more need for OS specific logic as a result of the new way the chunk size is defined, error logs have been marginally improved by providing an error message in case of a panic and the individual hashes are collected in a vec. Finally the rest of the test’s logic has been implemented, after the chunks have been uploaded and a snapshot is taken, read_canister_snapshot_metadata
gets called and the returned chunk hashes contained in the snapshot metadata are compared to the ones stored locally to ensure they match.
5599a9860 Modified ICRC1 ledger’s postupgrade hook to set the certified data to the root hash of the ledger state either immediately or after all migrations have completed.
79f0a7d1f Added logic in switch_to_checkpoint
to also update the snapshots’ wasm binary so that they are backed by the file from the latest checkpoint layout.
Chores:
b60e4861d Added console logs to provide better insights on whether the node operator private key was found and could be read when creating a new instance of NodeRegistration
.
6876dcac8 Improved logging in ic-replay by specifying severity/adding timestamps to some existing logs and adding new ones in get_state_hash
and verify_latest_cup
. Renamed restore
to restore_from_backup
and limited its visibility to the crate it’s defined in.
d6c72756c Cleaned up deprecated logic which was previously used to handle the in memory compilation cache from canister sandbox.
bd371e73a In monitor_and_evict_thread_collects_rss
and monitor_and_evict_thread_collects_metrics
tests moved calls to trigger the monitoring thread to happen on each iteration instead of only before the loop starts. Previously it could happen that in case the sandboxes stats/metrics weren’t updated fast enough due to async behaviour, the monitoring thread would sleep for 10 seconds, rendering many of the following iterations redundant and leading to test flakiness. The change also allowed to reduce the number of worst case iterations from 10k to 1k and decreased execution time from 100 secs to 10 in cases where the results are never received, this is possible cause previously the loop would need to wait for the monitoring thread to schedule a new execution on its own, so by waiting 10ms on each pass that’d happen ~10 times, but by manually triggering it, it’s no longer necessary.
5c0d15487 Modified binary_hash
field of ExecutionStateBits
and CanisterSnapshotBits
to no longer be optional.
896a78fbe Updated ICOS image refs.
f9a54926d In hostos-scripts/monitoring/custom-metrics.sh
added update_config_version_metric
function which reads the config version from /boot/config/config.json
json file and writes it to hostos_config_version gauge metric.
Proposal 136311 – Zane | CodeGov
Vote: ADOPT
Reason: Build completes successfully and hashes match. All commits have already been reviewed as part of 136310.
About CodeGov
CodeGov has a team of developers who review and vote independently on the following proposal topics: IC-OS Version Election, Protocol Canister Management, Subnet Management, Node Admin, and Participant Management. The CodeGov NNS known neuron is configured to follow our reviewers on these technical topics. We also have a group of Followees who vote independently on the Governance and the SNS & Neuron’s Fund topics. We strive to be a credible and reliable Followee option that votes on every proposal and every proposal topic in the NNS. We also support decentralization of SNS projects such as WaterNeuron, KongSwap, and Alice with a known neuron and credible Followees.
Learn more about CodeGov and its mission at codegov.org.