NNS / SNS Update: Jan 10, 2025

Proposal 134776 – LaCosta | CodeGov

Vote: ADOPT

Reason:
Build successful and hashes match, commits look great and match the description. Found no issues. The proposal implements two features mentioned by DFINITY in the following thread.

[b5192581cc]: Creates changelog files for all canisters.

[efd5dd7151]: Adds a new function transaction_has_expected_memo that with a given transaction and a expected memo, compares it to the given transaction. The expected can be a legacy memo meaning it’s just an arbitrary number of bytes in order to distinguish similar transactions or icrc1_memo that can indicate the purpose of a transaction. The function checks if the memo is a legacy_memo and if not checks it converts the expected icrc1_memo to to the Memo type and then compares it. The commit also sees tests implemented for either a legacy memo or icrc1_memo failing or succeeding. Prior to this commit there were only checks for the legacy_memo.

Proposal 134777 – LaCosta | CodeGov

Vote: ADOPT

Reason:
Build successful and hashes match, commits look great and match the description. Found no issues.

[b5192581cc]: Creates changelog files for all canisters.

[5c6dc53561]: Script that adds entry for new release to CHANGELOG after a proposal was successfully executed.

[68e52f27bb]: This is one of the last steps from the approved proposal 132411 that decreases the voting power of an inactive neuron that or doesn’t vote or doesn’t delegate it’s vote to some other entity. The commit enables this feature by enabling the flags IS_VOTING_POWER_ADJUSTMENT_ENABLED and IS_PRUNE_FOLLOWING_ENABLED.

[194648a9fd]: Enables the Root canister to upgrade canisters using chunked wasms which allows to reconstruct a large WASM from chunks needed to upgrade or reinstall a canister. If the entire WASM does not into the 2 MiB ingress limit, then new_canister_wasm should be empty, and the field chunked_canister_wasm should be set instead.

[dfc8987d4b]: Add some logic to the script testnet/tools/nns-tools/lib/proposals.sh that if the canister has an unrelease_changelog.md file, it uses that to populate the Features & Fixes section of the upgrade proposal.

[4f3b77e0a4]: Creates changelog files to governance.

[3f4397cf56]: The previous commit d19a1b45ee set the field maturity_e8s_equivalent to the modulated amount. This fixes it by storing the original value in original_maturity and in case of the ledger being unavailable and causing an error the field is returned to it’s original value.

[a18576a759]: In order to reverse the migration from heap memory to stable memory the function adjust_neuron_storage_with_max_instructions that only allowed to migrate in one way was removed and replaced by groom_some_neurons. By using std::ops::Bound it still allows to have a MAX_NUM_INSTRUCTIONS_PER_BATCH by configuring a carry_on.

[a47dde8acf]: This commits schedules a fix for a locked neuron. The functions and logic for this fix is set to be removed after fixing the neuron state. A fix to prevent this from happening was made in commit d19a1b45ee reviewed below.

[a726b71742]: Separates the feature flag active_neurons_in_stable_memory into two new ones, allow_active_neurons_in_stable_memory and migrate_active_neurons_to_stable_memory. The feature flag active_neurons_in_stable_memory didn’t allow us to safely rollback since the rolled back version would look for active neurons only in the heap memory. With this two flags instead if needed we can first rollback migrate_active_neurons_to_stable_memory and then rollback allow_active_neurons_in_stable_memory once we confirm that no neurons were left in stable memory.

[76a634c31d]: Previously the global state was stored in a static variable, GOVERNANCE, which when using unsafe blocks to access it could lead to undefined behavior. This was changed by defining the global state with thread_local! (LocalKey<RefCell<Governance>>) which ensures that the global state is isolated and thread safe. Currently the functions governance and governance_mut remain unsafe for backwards compatibility but it’s expected to have incremental changes to migrate them to using GOVERNANCE.with().

[d19a1b45ee]: Fixes an edge case where if the ledger is unavailable during a neuron operation, the neuron can become locked. This happens since when a neuron spawns maturity_e8s_equivalent is set to 0, spawn_at_timestamp_seconds is set to None and cached_neuron_stake_e8s is updated with the new stake, however if the ledger is unavailable when trying to mint the stake the operation fails which makes the state of the neuron inconsistent. So in case of an error the fields maturity_e8s_equivalent, cached_neuron_stake_e8s and spawn_at_timestamp_seconds return to their original values.

[0ab77a13c2]: Removes a NNS maturity modulation log when the error message is Canister rkp4c-7iaaa-aaaaa-aaaca-cai not found. This pollutes test environments and most often happens because Cycle Minting Canister isn’t created in tests.

[586c57afa7]: Refactors code of the function process_machine_until_soft_limit to clarify the voting code.

[4c775dbb96]: Adds the wasm_memory_threshold to support the on_low_wasm_memory hook. This end-point is invoked when the heap usage exceeds the new heap threshold in the canister settings and this change was approved in proposal 106146.

[bdb7c71b59]: Adds a new constant NEURON_DATA_VALIDATION_INTERNVAL = 5 sec used in the schedule_neuron_data_validation that sets a timer for neuron validation.

[73f301f8ca]: Adds an optimization level argument when running rust_canbench because for some reason compiler optimizations such as loop unrolling can make benchmarks more sensitive to unrelated changes which makes it difficult to read benchmarks.

Proposal 134778 – LaCosta | CodeGov

Vote: ADOPT

image

Reason:
Build successful and hashes match, commits look great and match the description. Found no issues.

[b5192581cc]: Creates changelog files for all canisters.

[4c775dbb96]: Adds the wasm_memory_threshold to support the on_low_wasm_memory hook. This end-point is invoked when the heap usage exceeds the new heap threshold in the canister settings and this change was approved in proposal 106146.

[4d09678d23]: Sorts Rust #[derive(...)] traits to maintain a consistent style

[46e1372d21]: Unifies wasm-tools under the same version (*.212.0)

Proposal 134779 – LaCosta | CodeGov

Vote: ADOPT

image

Reason:
Build successful and hashes match, commits look great and match the description. Found no issues.

[dd459b9d5d]: Adds an additional check when trying to remove a node direcltly by not just comparing the node operators of the caller and node since this was deemed to strict to comparing the Node Provider of the caller and node.

[fc935aa768]: The previous proposal 134665 resulted in an error since a node it tried to remove was already removed moments before resulting in an error. The node retrieval logic is now handled by the function get_node that returns Option<NodeRecord>. In do_remove_nodes.rs this function is used in an added step to skip nodes that are not in the registry.

Proposal 134780 – LaCosta | CodeGov

Vote: ADOPT

Reason:
Build successful and hashes match, commits look great and match the description. Found no issues.

[194648a9fd]: Enables the Root canister to upgrade canisters using chunked wasms which allows to reconstruct a large WASM from chunks needed to upgrade or reinstall a canister. If the entire WASM does not into the 2 MiB ingress limit, then new_canister_wasm should be empty, and the field chunked_canister_wasm should be set instead.

[18b239414f]: The dfn_core library has been deprecated so this library has been replaced with ic-cdk.

[4c775dbb96]: Adds the wasm_memory_threshold to support the on_low_wasm_memory hook. This end-point is invoked when the heap usage exceeds the new heap threshold in the canister settings and this change was approved in proposal 106146.

[3e0cf89b23]: Previously the Universal Canister wasm needed to be manually changed at build time following specific instructions. Now it is treated as a run time dependency and it’s wasm is loaded during execution using an environment variable "UNIVERSAL_CANISTER_WASM_PATH": "$(rootpath //rs/universal_canister/impl:universal_canister.wasm.gz)".

[18fdb88272]: Removes the candid_one function from multiple test files and in consequence the dfn_candid crate.

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 topics and Synapse on most other 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 and KongSwap with a known neuron and credible Followees.

Learn more about CodeGov and its mission at codegov.org.

1 Like