Skip to content

feat: temporary 50% node provider reward reduction (proposal 142724) - #10746

Merged
pietrodimarco-dfinity merged 7 commits into
masterfrom
node-provider-reward-reduction-prop-142724
Jul 13, 2026
Merged

pietrodimarco-dfinity merged 7 commits into
masterfrom
node-provider-reward-reduction-prop-142724

Conversation

@bjoernek

@bjoernek bjoernek commented Jul 13, 2026 •

Copy link
Copy Markdown
Contributor

What

Implements the temporary 50% node provider reward reduction mandated by NNS motion "Follow-up on Node Provider Standards, Incident Response Readiness" (proposal 142724), for the node providers that failed to respond to both incident-response smoke tests.

How

The reduction is applied in the node rewards canister (rs/node_rewards/canister/src/canister/mod.rs), immediately after the performance-based reward calculation returns its DailyResults, on top of the performance multiplier:

final = base * performance_multiplier * 0.5

For each affected provider within the window, every node's adjusted_rewards_xdr_permyriad is scaled by 0.5 and the provider total is recomputed from the scaled node values, so the per-node breakdown stays consistent with the total. Base rewards are untouched.

Key properties:

  • Applied at the canister boundary, not inside the versioned algorithm, so the reward-calculation algorithm stays pure and historically reproducible.
  • Fixed UTC date window: 2026-07-15 (inclusive) to 2026-10-15 (exclusive), covering three reward periods. The reduction reverts automatically at the end of the window without a further upgrade.
  • Reproducible history: because the window is fixed calendar dates and calculation is deterministic from stored daily metrics, querying any past day always returns the same result.
  • No interface change: the reduction rides on the existing total_adjusted_rewards_xdr_permyriad (and per-node adjusted) fields; no candid/API changes.
  • Only the performance-based reward path is covered (the live minting path); the legacy v0 path is not touched.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a temporary, date-windowed 50% reduction in performance-based node provider rewards (per NNS motion proposal 142724) by post-processing DailyResults at the node rewards canister boundary. It also includes separate changes in the registry canister to grant elevated (10x) rate limits to a hardcoded allowlist of node providers, along with stable-memory plumbing and changelog updates.

Changes:

  • Apply a temporary 0.5 multiplier to affected providers’ per-node adjusted rewards (and recompute provider totals) for a fixed UTC window in rs/node_rewards/canister.
  • Add elevated node-provider/node-operator rate limiters (stable-memory backed) gated by a hardcoded allowlist in rs/registry/canister.
  • Add rust_decimal dependency wiring (Cargo + Bazel) and tests for the reward-reduction and allowlist logic.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
rs/node_rewards/canister/src/canister/mod.rs Adds reward-reduction post-processing logic and unit tests.
rs/node_rewards/canister/Cargo.toml Adds rust_decimal dependency for Decimal arithmetic.
rs/node_rewards/canister/BUILD.bazel Adds Bazel deps for rust_decimal across library/canister/test targets.
Cargo.lock Records the new rust_decimal dependency in the lockfile.
rs/registry/canister/src/rate_limits.rs Adds allowlisted “elevated” rate limiters and tests.
rs/registry/canister/src/storage.rs Adds new stable memory IDs + getters for elevated limiters.
rs/registry/canister/unreleased_changelog.md Documents the registry rate-limit allowlist change.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Apply a temporary 50% reduction to node provider rewards for the
providers that failed both incident-response smoke tests, per NNS
motion "Follow-up on Node Provider Standards, Incident Response
Readiness" (proposal 142724).

The reduction is applied in the node rewards canister, after the
performance-based reward calculation, on top of the performance
multiplier (final = base * performance_multiplier * 0.5). It is gated
by a fixed UTC date window (2026-07-14 inclusive to 2026-10-14
exclusive) aligned to a reward-period boundary, so whole monthly
payouts are reduced, historical per-day queries remain reproducible,
and the reduction reverts automatically at the end of the window
without a further upgrade.

The list of affected node providers is intentionally left empty for
now (a no-op) and will be populated in a follow-up commit.
@bjoernek
bjoernek force-pushed the node-provider-reward-reduction-prop-142724 branch from 772f73b to eef8ca9 Compare July 13, 2026 10:47
Parse REDUCED_NODE_PROVIDERS into a thread_local set once and reuse it
across reward calculations, instead of reparsing and reallocating on
every call. Addresses PR review feedback.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.

Bjoern Assmann added 2 commits July 13, 2026 13:56
Use a deterministic BTreeSet for the reduction allowlist instead of a
HashSet (avoids randomized hashing in canister code), and add a unit
test asserting every REDUCED_NODE_PROVIDERS entry parses as a
PrincipalId so CI fails fast when the list is populated. Addresses PR
review feedback.
Populate REDUCED_NODE_PROVIDERS with the 19 node providers that failed
to respond within 24h in both incident-response smoke tests (May 20 and
June 13, 2026), per motion proposal 142724. A late (>24h) response is
treated as a failure. Principals were taken from the node provider
registry and cross-checked against the on-chain list_node_providers.
@bjoernek
bjoernek marked this pull request as ready for review July 13, 2026 13:29
@bjoernek
bjoernek requested a review from a team as a code owner July 13, 2026 13:29
@github-actions github-actions Bot added the @dre label Jul 13, 2026
@pietrodimarco-dfinity
pietrodimarco-dfinity added this pull request to the merge queue Jul 13, 2026
@pietrodimarco-dfinity
pietrodimarco-dfinity removed this pull request from the merge queue due to a manual request Jul 13, 2026
Move REWARD_REDUCTION_START from 2026-07-14 to 2026-07-15 (end date
unchanged at 2026-10-14, exclusive). Realign the unit tests to the
[2026-07-15, 2026-10-14) window and update the window comments (the
start is no longer the reward-period boundary, so the boundary-alignment
note is dropped).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Move REWARD_REDUCTION_END from 2026-10-14 to 2026-10-15 (exclusive),
restoring the full three-reward-period window length now that the start
moved to 2026-07-15. Window is now [2026-07-15, 2026-10-15). Realign the
end-boundary unit tests accordingly.

Co-Authored-By: Claude Opus 4.8 <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 4 changed files in this pull request and generated 4 comments.

Co-authored-by: Copilot Autofix powered by AI <[email protected]>
@pietrodimarco-dfinity
pietrodimarco-dfinity added this pull request to the merge queue Jul 13, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 13, 2026
@pietrodimarco-dfinity
pietrodimarco-dfinity added this pull request to the merge queue Jul 13, 2026
Merged via the queue into master with commit 92faaf9 Jul 13, 2026
37 checks passed
@pietrodimarco-dfinity
pietrodimarco-dfinity deleted the node-provider-reward-reduction-prop-142724 branch July 13, 2026 15:49
pull Bot pushed a commit to bit-cook/ic that referenced this pull request Jul 30, 2026
…ohort (dfinity#10965)

## What

Adds a second temporary node provider reward reduction round — 50% from
**2026-08-01** (inclusive) to **2026-11-01** (exclusive) — and
generalizes the mechanism added in dfinity#10746 from a single hardcoded window
to an append-only table of rounds.

No new motion proposal is needed: proposal 142724 established the
mechanism, not the set of providers it applies to. Each round's cohort
and window are set by this canister upgrade.

## Provider changes relative to the first round (proposal 142724)

**Remain penalized throughout (13)** — in both rounds, so reduced
continuously from 2026-07-15 to 2026-11-01:

43rd Big Idea Films · 100 Count Holdings · Arceau NP · Bitmoon · BLP22 ·
BlockTech Ventures · Decentralized Entities Foundation · Extragone SA ·
Iancu Aurel · InfoObjects · Neptune Partners · Zarety · Zondax AG

**Recovered (6)** — absent from the new round, so their reduction ends
with the first round's window on 2026-10-15 and they are rewarded in
full from the second half of October on:

87m Neuron · Conic Ventures · Pindar Technology Limited · Power Meta
Corporation · Wancloud limited · Zenith Code LLC

**Newly added (5)**:

| Provider | Principal |
|---|---|
| ACCUSET SOLUTIONS |
`cp5ib-twnmx-h4dvd-isef2-tu44u-kb2ka-fise5-m4hta-hnxoq-k45mm-hqe` |
| Anonstake |
`kos24-5xact-6aror-uofg2-tnvt6-dq3bk-c2c5z-jtptt-jbqvc-lmegy-qae` |
| MI Servers |
`izmhk-lpjum-uo4oy-lviba-yctpc-arg4b-2ywim-vgoiu-gqaj2-gskmw-2qe` |
| Reist Telecom AG |
`ma7dp-gz4tg-3c2wv-pgnsv-wna7u-czvhu-fpu47-t4dr6-gzxql-wr2m2-qae` |
| Starbase |
`sixix-2nyqd-t2k2v-vlsyz-dssko-ls4hl-hyij4-y7mdp-ja6cj-nsmpf-yae` |

All principals were resolved against the on-chain `list_node_providers`;
the 13 carry-over principals are unchanged from dfinity#10746.

## How

`REWARD_REDUCTION_START`/`END`/`REDUCED_NODE_PROVIDERS` are replaced by
an append-only `const REWARD_REDUCTIONS: &[RewardReduction]`, where each
entry carries its own UTC date window, multiplier, and provider set.
Everything else about the mechanism is unchanged: it still runs at the
canister boundary right after the versioned algorithm returns its
`DailyResults`, still scales per-node `adjusted_rewards_xdr_permyriad`
and recomputes the provider total from the scaled node values, and still
leaves base rewards and the legacy v0 path untouched.

Key properties:

- **Overlapping rounds do not compound.** The smallest multiplier
applicable on a given day wins, so a provider caught by both 50% rounds
is reduced to 50% — not 25% — on the overlapping days.
- **The first round is left byte-identical.** Nothing in this canister
persists computed rewards: every query recomputes the requested days
from the stored raw metrics using the table compiled into the running
Wasm. Editing or deleting a past entry would therefore silently rewrite
the canister's account of days that have already been minted. The design
notes in the code state that the table is append-only, and why.
- **No already-minted day is affected.** The new window starts in the
future. More generally an entry's `start` must not predate the current,
not-yet-minted reward period: governance advances its reward period past
every day it has minted and never recomputes those days, so a reduction
reaching further back would be a no-op in terms of tokens while still
claiming a penalty that was never applied. This is documented alongside
the table.
- **Parse-time validation.** Malformed dates, empty windows, and
multipliers outside (0, 1) now fail loudly rather than silently paying
out the wrong amount.
- **No interface change.** The reduction still rides on the existing
`total_adjusted_rewards_xdr_permyriad` (and per-node adjusted) fields.

## Testing

13 unit tests, all passing. Beyond the tests carried over from dfinity#10746:

- overlapping windows resolve to 0.5 rather than 0.25, with the union of
the two windows reduced and nothing outside it;
- the smallest multiplier wins when rounds differ (0.5 + 0.25 → 0.25,
not 0.125);
- three tests against the real compiled-in table: a continuing provider
is halved continuously Jul 15 → Nov 1, a recovered provider returns to
full rewards on Oct 15, and a newly added provider is untouched before
Aug 1;
- round membership is pinned at 19 / 18 / 13-in-both, with no duplicates
within a round.

`cargo check --all-targets --all-features`, clippy with the repo's `-D
warnings` set, `bazel build //rs/node_rewards/canister:{nrc,nrc-test}`,
and all 5 affected Bazel test targets pass locally.

## Open question for review

The 13 continuing providers end up penalized for 3.5 months (2026-07-15
→ 2026-11-01) rather than a fresh three, because the first round is
preserved as-is. If the intent is instead "three months total, ending
2026-11-01" for them, the alternative is shortening the first round's
`end` — which rewrites already-minted days and is what the append-only
rule is there to prevent. Flagging it as a policy call rather than
deciding it here.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Bjoern Tackmann <[email protected]>
Co-authored-by: Claude Opus 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants