Skip to content

test this - #2

Closed
Ali-Piccioni wants to merge 1 commit into
masterfrom
ali-does-pr-work
Closed

Ali-Piccioni wants to merge 1 commit into
masterfrom
ali-does-pr-work

Conversation

@Ali-Piccioni

Copy link
Copy Markdown
Contributor

No description provided.

@Ali-Piccioni
Ali-Piccioni deleted the ali-does-pr-work branch December 10, 2021 15:50
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 Mar 3, 2023
…aster'

perf: [EXC-1119] optimise Scheduler::execute_round by removing excessive canister state lookups

This MR removes an extra lookups for canister state and metric updates.

Optimisation #1. Canister metric update.

Before this MR in order to record the metric there is a loop that iterates over all the canister IDs, looks up their state in states and modifies the state. When the number of canisters is big then the lookup introduces a significant factor to an O(n) iteration. Eg. for a subnet with 100k total and 100 active canisters it might be ~10% of `execute_round` function time.

This MR moves the metric update to the already existing loop with a lookup in a previous step `apply_scheduling_strategy`.

Optimisation #2. Canister state update.

Both `canister_states` and `round_states` contain the elements in the same order, but when iterating over `round_states` it requires to do an expensive canister state lookup. The optimisation iterates over those two collections simultaneously (relying on the same elements order) which get the canister state for free.

On a testnet with 100k total and 100 active canisters this optimisation saves 4.8-5.2% of DSM critical path (scheduling step, no optimisation 7.5-8.2%, with optimisation 2.7-3%). 

See merge request dfinity-lab/public/ic!11052
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 Apr 30, 2024
gitlab-dfinity pushed a commit that referenced this pull request Apr 30, 2024
Feat(NODE-1353): Consolidate rootfs utils #2

There's still more consolidation left to do. This is a big enough chunk though. 

See merge request dfinity-lab/public/ic!18997
github-merge-queue Bot pushed a commit that referenced this pull request Aug 23, 2024
#977)

This PR is the first step towards enabling the `SnsW.get_wasm_metadata`
endpoint in production. For that, we need a way to store the metadata in
the stable memory, as recomputing it each time is expensive (because
canister WASMs stored in SNS-W are often compressed).

Unlike the [first attempt](#956), this
PR makes it harder to represent disallowed states in the type system,
e.g., there cannot metadata that does not belong to any WASM stored in
SNS-W.

---------

Co-authored-by: IDX GitHub Automation <[email protected]>
Co-authored-by: Carly Gundy <[email protected]>
Co-authored-by: Mathias Björkqvist <[email protected]>
Co-authored-by: tim gretler <[email protected]>
mihailjianu1 added a commit that referenced this pull request Nov 7, 2024
mihailjianu1 added a commit that referenced this pull request Jan 22, 2025
mihailjianu1 added a commit that referenced this pull request Feb 5, 2025
mihailjianu1 added a commit that referenced this pull request Mar 20, 2025
gbrel added a commit that referenced this pull request Mar 28, 2025
gbrel added a commit that referenced this pull request Apr 22, 2025
mihailjianu1 added a commit that referenced this pull request May 7, 2025
github-merge-queue Bot pushed a commit that referenced this pull request Jun 6, 2025
https://dfinity.atlassian.net/browse/NODE-1619

bbfb096 - Fix grub backwards
compatibility by continuing to pass extra_boot_args

d7533c0 - Create boot_args.template for
hostos and guestos

ba50c70 - Create requires_root_signing
bool

9e7d432 - Move boot_args.template files
to bootloader/
basvandijk added a commit that referenced this pull request Jun 6, 2025
andrewbattat added a commit that referenced this pull request Jun 6, 2025
Bownairo pushed a commit that referenced this pull request Jun 9, 2025
https://dfinity.atlassian.net/browse/NODE-1619

bbfb096 - Fix grub backwards
compatibility by continuing to pass extra_boot_args

d7533c0 - Create boot_args.template for
hostos and guestos

ba50c70 - Create requires_root_signing
bool

9e7d432 - Move boot_args.template files
to bootloader/
github-merge-queue Bot pushed a commit that referenced this pull request Jun 11, 2025
aterga pushed a commit that referenced this pull request Jun 17, 2025
mihailjianu1 added a commit that referenced this pull request Oct 7, 2025
mihailjianu1 added a commit that referenced this pull request Oct 21, 2025
kpop-dfinity added a commit that referenced this pull request Dec 30, 2025
andrewbattat added a commit that referenced this pull request Jan 21, 2026
NikolaMilosa added a commit that referenced this pull request Apr 29, 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 Jul 25, 2026
Essentially reverts this revert:
dfinity#10475
Metrics show that this is almost twice the max of existing canisters
over all subnets.
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.

1 participant