Skip to content

Test. - #3

Closed
jplevyak wants to merge 1 commit into
dfinity:masterfrom
jplevyak:test-jp
Closed

jplevyak wants to merge 1 commit into
dfinity:masterfrom
jplevyak:test-jp

Conversation

@jplevyak

Copy link
Copy Markdown
Contributor

Signed-off-by: John Plevyak [email protected]

Signed-off-by: John Plevyak <[email protected]>
dfinity-bot pushed a commit that referenced this pull request Mar 7, 2022
lint: add a negative dependency checker

Add a program that looks for undesired dependencies in the workspace
dependency graph.

Example output:
```
Found 3 dependency policy violations.

================================================================================
Found a violation of rule #1 defined in depcheck/src/main.rs:
================================================================================
'*' should not depend on 'git2'.

If you need to get data from Git, consider executing 'git' command as a
subprocess. 'git2' requires native libraries and increases compile time by ~10s,
usually providing little value.

Shortest dependency path:
depcheck:0.1.0
└── git2:0.7.2

================================================================================
Found a violation of rule #2 defined in depcheck/src/main.rs:
================================================================================
'ic-replica' should not depend on 'dfn_core'.

Replica must not depend on Rust CDK.

Shortest dependency path:
ic-replica:0.8.0
└── ic-crypto:0.8.0
    └── ic-crypto-tls-cert-validation:0.8.0
        └── dfn_core:0.8.0

================================================================================
Found a violation of rule #3 defined in depcheck/src/main.rs:
================================================================================
'ic-interfaces' should not depend on 'tokio'.

Interfaces should not depend on implementation details.

Shortest dependency path:
ic-interfaces:0.8.0
└── tokio:1.17.0

``` 

See merge request dfinity-lab/public/ic!3524
gitlab-dfinity pushed a commit that referenced this pull request May 3, 2023
… 'master'

feat(crypto) CRP-1894: Zeroize old secret key store when writing new content

The way the SKS is currently updated is as follows:

1. On startup, the SKS is read from disk, and maintained in memory.
2. If changes are made to the SKS (new key generated, old key deleted), the changes are made in memory, and then written to disk. The writing to disk is performed as follows:
    1. Write the updated SKS to a new, temporary file.
    2. Atomically replace the existing SKS by moving/renaming the new SKS to the location of the existing SKS.

To zeroize the old SKS, the proposed approach when writing the new SKS to disk is as follows:

1. Create a hard link to the old SKS - same path and filename, but with “.old” suffix
2. Write the new SKS to disk using the temporary file and rename to replace the existing SKS as above.
3. Zeroize the old SKS file using the hard link created in step #1.
4. Remove the hard link created in step #1.

In case the node/process crashes while writing the new SKS (in practice, somewhere after step #1 but before step #4), some cleanup needs to be done:

- If the crash happened after #1 but before #2, the hard link with the “.old” suffix will point to the current SKS - in this case, simply remove the hard link to the SKS, but do not zeroize it.
- If the crash happened after #2, perform steps #3 and #4 from above (zeroize the old file and delete it).
 
The cleanup can be done when opening the SKS to read it. To determine which of the two cleanup actions should be done, check to see if a hard link with “.old” suffix exists, and if so, if it points to the same file (inode) as the current SKS - if yes, zeroize and delete the “.old” file; if no, simply delete the “.old” file.

One scenario where this zeroization introduces a new security exposure is in case we crash between steps #2 and #3 above, where the new keystore has been written, but there is still a hard link to the old keystore, and the old keystore has not been zeroized. 

See merge request dfinity-lab/public/ic!10724
gitlab-dfinity pushed a commit that referenced this pull request May 2, 2024
gitlab-dfinity pushed a commit that referenced this pull request May 2, 2024
Feat(NODE-1353): Consolidate rootfs utils #3

There's still more consolidation left to do. 

See merge request dfinity-lab/public/ic!19049
mihailjianu1 added a commit that referenced this pull request Oct 7, 2025
andrewbattat added a commit that referenced this pull request Jan 21, 2026
frankdavid added a commit that referenced this pull request Jun 24, 2026
AleDema pushed a commit to AleDema/ic that referenced this pull request Aug 15, 2026
…y#11112)

## What

The second node provider reward reduction round (added in dfinity#10965 /
proposal 143260) was populated from the **July 27 smoke test alone**
rather than from the **June 13 + July 27 pair**, so it did not implement
the "failed two consecutive drills" rule established by motion 142724.

Two providers were affected:

| Provider | Jun 13 | Jul 27 | Was | Should be | Why |
|---|:--:|:--:|---|---|---|
| **MI Servers** (37 nodes) | ✅ in 24h | ❌ no reply | in round 2 |
**out** | Replied in time in June — never missed two in a row |
| **ParaFi Technologies NS LLC** (37 nodes) | ⚠️ late | ⚠️ late | absent
| **in** | Late in both, and a late reply counts as a failure |

Round 2 stays at 18 providers. **Round 1 is unchanged.**

## Why this is safe to edit rather than append

The table is append-only precisely because editing a past entry silently
rewrites days that have already been minted. That does not apply here:
round 2 starts 2026-08-01 and **no day of its window has been minted
yet** — the 2026-07-15..2026-08-15 reward period is still open. Nothing
already paid out is rewritten.

This is also why it is urgent. The next minting is due **on or just
after 2026-08-14 12:39 UTC** (governance mints every `ONE_YEAR_SECONDS /
12` = 30.4375 days; last mint was 2026-07-15 02:09 UTC per
`get_most_recent_monthly_node_provider_rewards`). After that, MI Servers
will have been paid at 50% for the first half of August and cannot be
made whole through this table, because multipliers are constrained to
`(0, 1)`.

## Duration for the 13 providers in both rounds

The 13 providers in both rounds are reduced continuously from 2026-07-15
to 2026-11-01, so 3.5 months rather than three. That is the intended
outcome, not an artefact of the overlap: they missed the May 20 + June
13 pair and then missed the June 13 + July 27 pair, and each pair of
consecutive misses starts a fresh three-month clock. Round 1's window is
therefore deliberately left as it is.

This settles the open question raised in dfinity#10965, which asked whether the
first round's `end` should instead be shortened so those providers get
three months in total. Under a restarting clock it should not, and
shortening it would in any case rewrite days that have already been
minted.

## Verification against the rule

Both rounds were re-derived from the drill results below, independently
of the code, and now match it exactly:

- **Round 1** = failed 20 May **and** 13 Jun → **19 providers** ✅
matches
- **Round 2** = failed 13 Jun **and** 27 Jul → **18 providers** ✅
matches

Before this change, round 2 was instead exactly the 27 Jul "no reply"
list.

## Full smoke test tracking table

All 79 providers that were in the population for at least one drill. A
**late (>24h) reply counts as a failure**, same as no reply.

✅ replied in 24h · ⚠️ late · ❌ no reply · – not in that drill's
population · ● in that reduction round

| Node provider | 20 May | 13 Jun | 27 Jul | R1 | R2 | Nodes |
|---|:--:|:--:|:--:|:--:|:--:|--:|
| 100 Count Holdings, LLC | ⚠️ | ⚠️ | ❌ | ● | ● | 28 |
| 43rd Big Idea Films | ❌ | ❌ | ❌ | ● | ● | 14 |
| 87m Neuron, LLC | ⚠️ | ❌ | ✅ | ● |  | 42 |
| ACCUSET SOLUTIONS | ✅ | ❌ | ❌ |  | ● | 10 |
| achermann.swiss | ✅ | ❌ | ✅ |  |  | 1 |
| Aitubi AG | ✅ | ✅ | ✅ |  |  | 1 |
| Allusion | ✅ | ✅ | ✅ |  |  | 37 |
| AlpineDC SA | ✅ | ⚠️ | ✅ |  |  | 1 |
| Anonstake | ✅ | ❌ | ❌ |  | ● | 16 |
| ANTHONY ISAAKIDIS | ✅ | ✅ | ✅ |  |  | 23 |
| ANYPOINT PTY LTD | ✅ | ❌ | ✅ |  |  | 10 |
| Arceau NP LLC | ❌ | ❌ | ❌ | ● | ● | 23 |
| Artem Horodyskyi | ✅ | ✅ | ✅ |  |  | 7 |
| Avalution AG | ✅ | ❌ | ✅ |  |  | 1 |
| Bianca-Martina Rohner | ✅ | ✅ | ✅ |  |  | 4 |
| Bigger Capital | ✅ | ✅ | ✅ |  |  | 28 |
| Bitmoon | ❌ | ❌ | ❌ | ● | ● | 3 |
| Blockchain Development Labs | ✅ | ✅ | ✅ |  |  | 42 |
| Blockchain Innovation Group | ✅ | ✅ | ✅ |  |  | 1 |
| BlockFinance | ✅ | ✅ | ✅ |  |  | 9 |
| BlockTech Ventures, LLC | ❌ | ❌ | ❌ | ● | ● | 28 |
| BLP22, LLC | ⚠️ | ❌ | ❌ | ● | ● | 14 |
| Blue Ant LLC | ❌ | ✅ | ⚠️ |  |  | 37 |
| Conic Ventures | ❌ | ❌ | ✅ | ● |  | 4 |
| CoreLedger | ✅ | ❌ | ✅ |  |  | 1 |
| Decentralized | ✅ | ❌ | ✅ |  |  | 1 |
| Decentralized Entities Foundation | ❌ | ❌ | ❌ | ● | ● | 17 |
| Extragone SA | ❌ | ❌ | ❌ | ● | ● | 37 |
| Fractal Labs AG | ✅ | ✅ | ✅ |  |  | 37 |
| Geeta Kalwani | ✅ | ✅ | ✅ |  |  | 4 |
| Geodd Pvt Ltd | ✅ | ✅ | ✅ |  |  | 6 |
| GeoNodes LLC | ✅ | ✅ | ✅ |  |  | 16 |
| George Bassadone | ✅ | ✅ | ✅ |  |  | 25 |
| Giant Leaf, LLC | ❌ | ✅ | ✅ |  |  | 37 |
| Honeycomb Capital (Pty) Ltd | ✅ | ✅ | ✅ |  |  | 12 |
| Iancu Aurel | ❌ | ❌ | ❌ | ● | ● | 28 |
| Icaria Systems Pty Ltd | ✅ | ✅ | ✅ |  |  | 18 |
| Illusions In Art (Pty) Ltd | ✅ | ✅ | ✅ |  |  | 6 |
| InfoObjects | ❌ | ❌ | ❌ | ● | ● | 4 |
| Ivanov Oleksandr | ✅ | ✅ | ✅ |  |  | 7 |
| Karel Frank | ✅ | ✅ | ✅ |  |  | 18 |
| Kontrapunt (Pty) Ltd | ✅ | ✅ | ✅ |  |  | 6 |
| Krishna Enterprises | ✅ | ⚠️ | ✅ |  |  | 15 |
| LTIN AG | ✅ | ✅ | ✅ |  |  | 1 |
| Lukas Helebrandt | ✅ | ✅ | ✅ |  |  | 6 |
| Maksym Ishchenko | ✅ | ✅ | ✅ |  |  | 7 |
| Mariano Stoll | ✅ | ✅ | ✅ |  |  | 4 |
| Marvelous Web3 | ✅ | ❌ | ✅ |  |  | 14 |
| MB Patrankos šūvis | ✅ | ✅ | ✅ |  |  | 10 |
| MI Servers **← removed** | ✅ | ✅ | ❌ |  |  | 37 |
| Neptune Partners | ❌ | ❌ | ❌ | ● | ● | 25 |
| NODAO | ✅ | ✅ | ✅ |  |  | 37 |
| NOKU SA | ✅ | ❌ | – |  |  | 1 |
| NoviSystems, LLC | ✅ | ✅ | ✅ |  |  | 3 |
| OneSixtyTwo Digital Capital | ✅ | ✅ | ✅ |  |  | 42 |
| Origin Game | ⚠️ | ✅ | ✅ |  |  | 7 |
| ParaFi Technologies NS LLC **← added** | ✅ | ⚠️ | ⚠️ |  | ● | 37 |
| Pindar Technology Limited | ❌ | ❌ | ✅ | ● |  | 36 |
| Power Meta Corporation | ❌ | ❌ | ✅ | ● |  | 5 |
| Privoxy Solutions, LLC | ✅ | ✅ | ✅ |  |  | 3 |
| Protocol16 | ✅ | ✅ | ✅ |  |  | 23 |
| Reist Telecom AG | ✅ | ❌ | ❌ |  | ● | 23 |
| Rivram Inc | ✅ | ⚠️ | ✅ |  |  | 13 |
| senseLAN | ✅ | ✅ | ✅ |  |  | 1 |
| SolNet | ✅ | ⚠️ | ✅ |  |  | 1 |
| Starbase | ✅ | ❌ | ❌ |  | ● | 38 |
| Swiss Datalink AG | ✅ | ❌ | ✅ |  |  | 1 |
| Sygnum Bank | ✅ | ✅ | ✅ |  |  | 37 |
| Tomahawk | ✅ | ✅ | – |  |  | — |
| Uvaca Labs LLC | ⚠️ | ✅ | ⚠️ |  |  | 23 |
| vestra ICT AG | ✅ | ❌ | ✅ |  |  | 1 |
| Virtual Hive Ltd | ✅ | ✅ | ✅ |  |  | 23 |
| Vladyslav Popov | ✅ | ✅ | ✅ |  |  | 14 |
| Wancloud limited | ⚠️ | ⚠️ | ✅ | ● |  | 10 |
| Web3game | ⚠️ | ✅ | ✅ |  |  | 17 |
| Wolkboer (Pty) Ltd | ✅ | ✅ | ✅ |  |  | 6 |
| Zarety LLC | ❌ | ❌ | ❌ | ● | ● | 37 |
| Zenith Code LLC | ❌ | ❌ | ✅ | ● |  | 2 |
| Zondax AG | ❌ | ❌ | ❌ | ● | ● | 2 |

**Drill participation:** dfinity#1 20 May 55/79 · dfinity#2 13 Jun 42/79 · dfinity#3 27 Jul
56/77.

Two providers left the population and are out of scope either way:
Tomahawk (left the network; replied in time in both drills it was part
of) and NOKU SA (no active nodes on 27 Jul).

## Testing

Adds `second_round_follows_the_two_consecutive_misses_rule`, which pins
both principals by name. The existing
`reward_reduction_round_membership_is_as_intended` only asserts round
sizes (19/18/13) — a one-for-one swap passes it unchanged, which is
exactly how the original error went unnoticed.

- `cargo check -p ic-node-rewards-canister --lib` — clean
- `cargo fmt --check` — clean
- clippy `--all-targets` with the repo's deny-set — clean
- `bazel build //rs/node_rewards/canister:{nrc,nrc-test}` — clean
- `bazel test` on all 5 affected targets — **5/5 pass**, 36/36 tests in
`nrc_test`

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

---------

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants