Canister does not consume cycles (local)

Hi! Please help, I don’t know why, but my canister stopped consuming cycles. With what it can be connected?

let status = await ic.canister_status({ canister_id = canisterId });
let freezingThresholdInCycles = status.memory_size * status.settings.freezing_threshold * 127000 / 1073741824;
let availableCycles = Nat.sub(status.cycles, freezingThresholdInCycles);

cycles is created with 0.5T. When availableCycles is less than 0.25T, the canister is topped up. I don’t understand at what point everything broke, I recently installed nns.


When I installed nns I had to change networks.json in part local.replica.subnet_type to “system”, so according to the documentation canisters in the local subnet no longer consume cycles for calculations.

I found post from Severin. @Severin does this mean that in order for my canisters to consume cycles for calculating and using CMC and Ledger canisters, I have to abandon nns and deploy wasm modules of the necessary canisters myself? And the second question, how can I set the canisterIds myself so that the canisterIds for the canisters from nns match the canisterIds from the mainnet?

Yes, that is right. I wish we had a better way, but it’s the best we have right now.

You can define canisters as ‘remote’. It’s probably easiest if you do dfx nns import, which will add the NNS canister definitions with the right remote field to your dfx.json.

i have problems with deploying NNS canisters and I realized that I was wasting my time… How can I get 2 subnets locally - application and system? Can I proxy requests for certain canisters to external addresses? For example, install NNS on another computer and send requests to NNS canisters to another host.

That is not possible for now, and would be a huge effort. It’s probably easiest to use a staging environment for multi-subnet tests.

No, if you run a separate IC instance then their root keys won’t match and they do not accept each other’s signatures.

1 Like

Will my canisters become available to everyone? I will spend the real cycles and can not fabricate them, since this is not the local environment?

Yes, they will be public, but discoverability is so bad for random canisters, I (personally) wouldn’t worry about it as long as you don’t supply it with more than 2-3T cycles