NNS Updates 2025-08-15

The DRE Team submitted the following proposals. DFINITY plans to vote on these proposals the following Monday.

Proposals to be Submitted

Node-rewards

Upgrade the Node-rewards Canister to Commit 98b37bf

__Proposer__: pietro.di.marco at dfinity.org

__Source code__: [98b37bf4ffd2f46bc968018bb850a9753540877b][new-commit]

[new-commit]: https://github.com/dfinity/ic/tree/98b37bf4ffd2f46bc968018bb850a9753540877b


## Features & Fixes

* Hourly sync nodes metrics, in preparation for performance based rewards calculation.
* Extract rewardable nodes between two timestamps, in preparation for performance based rewards calculation.
* Compute daily failure rate extrapolation in rewards-calculation lib., in preparation for performance based rewards calculation.
* Add telemetry for the canister
* Removed the registry store cleanup function, which was previously used to resynchronize registry data with timestamp to registry versions mapping.

## New Commits

```
$ git log --format="%C(auto) %h %s" 5128134d24b7a5b8e24a3d5d40c4cce9d81fd375..98b37bf4ffd2f46bc968018bb850a9753540877b --  ./rs/node_rewards/canister ./rs/node_rewards ./rs/registry/node_provider_rewards
 fe98635604 fix(NRC): Fix rewardable nodes computation (#6225)
 05530871f6 fix(NRC): Small fixes  (#6156)
 297e165f3f chore(NRC): Small fixes and Structs renaming (#6122)
 4ab350269d feat(NRC): Add telemetry  (#6085)
 c3008e0f2f feat(NPR): Add node metrics sync in timer (#6078)
 e8858013eb chore(NPR): Remove registry store cleanup (#6063)
 dbf0bfde1b feat(NPR): compute daily FR extrapolation in reward calculator (#6003)
 8f772dcafe chore(NPR): Refactor NPR to use dyn CanisterRegistryClient (#6000)
 aa078c6c1b feat(NRC): Implement RegistryClient with support for rewardable nodes computation (#5869)
 3206a4ba77 chore(nns/sns): Release notes (#5911)
```


## Current Version

__Current git hash__: 5128134d24b7a5b8e24a3d5d40c4cce9d81fd375

__Current wasm hash__: 59d76a35284b7f2dfd06e74e16841b593e24d538b323e5eca90224713258e8e6


## Verification

See the general instructions on [how to verify] proposals like this. A "quick
start" guide is provided here.

[how to verify]: https://github.com/dfinity/ic/tree/98b37bf4ffd2f46bc968018bb850a9753540877b/rs/nervous_system/docs/proposal_verification.md


### WASM Verification

See ["Building the code"][prereqs] for prerequisites.

[prereqs]: https://github.com/dfinity/ic/tree/98b37bf4ffd2f46bc968018bb850a9753540877b/README.adoc#building-the-code

```
# 1. Get a copy of the code.
git clone git@github.com:dfinity/ic.git
cd ic
# Or, if you already have a copy of the ic repo,
git fetch
git checkout 98b37bf4ffd2f46bc968018bb850a9753540877b

# 2. Build canisters.
./ci/container/build-ic.sh -c

# 3. Fingerprint the result.
sha256sum ./artifacts/canisters/node-rewards-canister.wasm.gz
```

This should match `wasm_module_hash` field of this proposal.
1 Like

proposal - [137910] Cyberowl | CodeGov

137910

Proposals:

137910

Vote: [ADOPT]

Reason & Feedback:

I successfully built and verified the hash. All the commit descriptions match their code changes.

We should prob fix this at some point

Checks:

Hash Match: [PASS]
Target Canister: [PASS]
Proposer Check: [PASS]

Commits Summary

proposal/137910 (Node-rewards)

fe98635604
Fixed rewardable nodes calc in node rewards canister by skipping the day a node gets removed from registry—stops rewarding deleted ones.

05530871f6
Switched BaseRewards to concrete types, added a timestamp-to-registry-version mapper, some renaming/refactoring for better readability. Moved test-utils public, slapped CandidType on DayUtc for serialization, and swapped metrics tests to new_test constructor.

297e165f3f
Renamed DayUTC to DayUtc for consistency, updated spots in metrics/rewards calc modules. Simplified rewards calc results.

4ab350269d
Added telemetry module to Node Rewards Canister for tracking instructions in sync ops, tossed in deps like ic-metrics-encoder and ic-nervous-system-common. Wired telemetry into registry sync/metrics updates.

c3008e0f2f
Added node metrics sync on a timer for Node Provider Rewards, shifted registry sync logic into NodeRewardsCanister struct, brought in metrics_manager for subnet metrics across versions.

e8858013eb
Removed registry store cleanup from post_upgrade in main.rs. Renamed clear_registry_store to _clear_registry_store in storage.rs as unused/deprecated.

dbf0bfde1b
Updated rewards calc to do daily failure rate (FR) extrapolation in Node Provider Rewards calculator, simplified the algo + added internal/end-to-end tests. New deps like chrono, bytecount, tabled; updated Cargo locks.

8f772dcafe
Refactored Node Provider Rewards canister to dyn trait object for CanisterRegistryClient over generic—simpler structs/methods for flexibility. Updated API methods, inners, tests to fit the dyn, no real func changes but cleaner code.

aa078c6c1b
Added RegistryClient wrapper for Node Rewards Canister to compute rewardable nodes between UTC days, uses registry store + DayUtc utils with chrono/indexmap deps. Adapted canister code to the new querier.

3206a4ba77
Updated changelogs for NNS/SNS.

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.
1 Like

Proposal 137910 | Tim - CodeGov

Screenshot 2025-08-17 180006

Vote: Adopt

Reason: This proposal upgrades the Node Rewards canister. Build is successful, hashes match, commits match descriptions and the reasoning behind the changes is sound. Commits are reviewed below.

[fe98635604]
Adapts RegistryQuerier::nodes_in_registry_between so that if a node is deleted it will be rewarded only until the day before deletion. Renames type BaseRewardsType3 to DailyBaseRewardsType3 and addds fields avg_rewards and avg_coefficient.

[05530871f6]
Various small changes, including changing the type for some fields within NodeMetricsDaily and DailyResults from Decimal to Percent, splitting the computation_log field in NodeProviderRewards into base_rewards and pub base_rewards_type3 (with associated new types), and others as listed in the description.

[297e165f3f]
Various minor changes including changing type names (DayUTC to DayUtc) and field names (subnet_assigned_fr to subnet_assigned_fr_percent and others similarly), changing some types (HashMap to BTreeMap, Decimal to Percent) and refactoring changes.

[4ab350269d]
Adds a new module, telemetry, containing a set of metrics relating to the timing and success of the last metrics sync, and characteristics of hourly query calls. This is then used in the schedule_timers function.

[c3008e0f2f]
Adds fields metrics_manager and last_metrics_update to the NodeRewardsCanister struct, along with new methods get_metrics_manager, schedule_registry_sync and schedule_metrics_sync, and related code and test changes.

[e8858013eb]
Removes code to reset the registry store and timer from the post_upgrade function, now that this has been deployed.

[dbf0bfde1b]
Extensively rewrites rewards_calculator.rs to set out the node rewards calculation as a series of numbered steps. Deletes rewards_calculator/builder.rs and moves block failure rate calculations from this file into rewards_calculator.rs. Other related code and test changes including redefining some types.

[8f772dcafe]
Several minor changes, mainly refactoring changes with respect to trait object usage in type and method definitions.

[aa078c6c1b]
Implements CanisterRegistryClient for rewardable nodes calculations, primarily through a new module register_querier, which introduces a set a methods based around computing rewardable nodes, grouped by node provider, for a given range of UTC days.

[3206a4ba77]
Updates changelog files.

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, API Boundary API Boundary Node 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 & Neurons' 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 decentralisation 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.

Adopt 137910

Proposal

  • The upgrade args correspond to the empty args.
  • The install mode is indeed upgrade.
  • The wasm hash are reproducible.

Screenshot from 2025-08-18 09-31-37

Code Review

3206a4ba77: update changelog
aa078c6c1b: Introduction opf a new RegistryClient with functionality to compute rewardable nodes based on two UTC days, serving as a wrapper for the registry store and requiring adaptations in the canister code.
8f772dcafe: Refactors NPR to use a dynamic CanisterRegistryClient, reverting trait object usage in NodeRewardsCanister and RegistryQuerier. It also updates reward computation to use REGISTRY_STORE and adds a CanisterRegistryClientExt trait for non-object-safe methods.
dbf0bfde1b: Improve NPR reward calculator by adding daily FR extrapolation and simplifying the calculation algorithm.
e8858013eb: removes call to registry store cleanup.
c3008e0f2f: This update moves registry syncing into NodeRewardsCanister and adds metrics syncing within the same canister.
4ab350269d: Add telemetry module to NRC and measure instructions spent in sync.
297e165f3f: Minor fix/ renaming.
05530871f6: update BaseRewards to return concrete types, adds a registry querier function for mapping timestamps to registry versions, and includes minor renaming/fixes. It also moves test-utils to a public module and derives CandidType for DayUTC.
fe98635604: fixes the rewardable nodes computation in NRC to exclude the day a node is removed from the registry, and adds avg_rewards and avg_coefficient fields to Type3 rewards.