[Governance] Couldn't update maturity modulation. Error: Canister rkp4c-7iaaa-aaaaa-aaaca-cai is stopped

Do the NNS Governance and CMC canisters require a specific installation order? And if yes, which one?

I’m installing (creating + deploy code) the NNS Governance and CMC canisters in parallel, assuming the canisters are independent when deployed on a brand new replica. So far, this approach has worked. However, as I try to update to the latest version of the NNS Governance canister, I’ve started encountering race conditions when canisters are mounted, notably the following issue:

[Canister rrkah-fqaaa-aaaaa-aaaaq-cai] [Governance] Couldn’t update maturity modulation. Error: Canister rkp4c-7iaaa-aaaaa-aaaca-cai is stopped

This seems to indicate that the Governance canister depends on the CMC canister being available at startup but, not sure if it is effectively the case and why it happens.

Alright, gotta move forward. It does look like according manual testing that the CMC must now be deployed before the NNS Governance canister but the Governance must still be deployed before the CMC installation can be finalized via a proposal.

I added an exception for those two canisters in this PR. The downside is that it slows down the boot process (spinning up canisters serially is slower than doing it in parallel), which impacts the DX. But at least it no longer throws the error mentioned above.

1 Like

Update: Turns out there’s also now, it seems, an order to respect after installation when setting a specific ICP/XDR rate.

First, the CMC should be allowed to spin up canisters in the subnet and only after that can the rate be set. Doing it the other way around doesn’t work.

That said, this step might no longer be mandatory. When it failed, the system defaulted to a rate of 1 ICP = 1 T Cycles instead of my custom 1 ICP = 4.1388 T Cycles.

Anyway updated the PR accordingly. If interesting this is the CMC proposal’s code and this one is the Governance one.

Now everything looks okay I think. It took probably half a day to upgrade the Governance canister, hopefully this will be useful to someone else someday!

Logs order “it does not work”:

Logs “it works”: