How long after stopping a canister before cycles stop decreasing?

20 minutes later and still decreasing quickly :sweat_smile:

You get charged for the data you’re storing. See here for the fees. If you want to throw away all data, you’ll have to uninstall-code so you don’t have any data in it anymore

makes sense :slight_smile:

this is just a token canister with way less data than my NFT canister which isn’t decreasing as fast as the stopped token canister

are there cycle logs to help make sense of this?

1 Like

No, there are no logs visible for that. Can you do dfx canister --network ic status <canister name/id> and check what the memory size of them is (looks like this: Memory Size: Nat(9068615))? That would be the relevant value to calculate storage cost AFAIK.

Thank you for the help with this :slight_smile:
Are there any plans to add cycle logs to the UI in future?

Memory allocation: 0
Compute allocation: 0
Freezing threshold: 2_592_000
Memory Size: Nat(749358)

No, I don’t think so. What UI are you talking about btw?

If you also have the Memory Size of the other canister then we can compare and maybe figure out why they use cycles at a different rate

WALLET-CANISTER-ID.raw.ic0.app

the asset canister is Memory Size: Nat(7273172)
so somethings definitely up :sweat_smile:

So from that I would expect this canister (let’s call it A until you give me a better name for it)

to use less cycles than this one (is that one called the wallet or is it a different one?)

Comparing with my own wallet:

Memory Size: Nat(11453954)

and a fresh wallet on a local network:

Memory Size: Nat(7456258)

It all seems to be within reasonable ranges, although I would expect canister A to use about 10x times fewer cycles per time because it has the smaller memory foot print. (Side note: update calls (including dfx canister status cost cycles that get charged to the canister. So if you get its status more often, then it will cost more cycles).

using dfx canister --network ic status --all
to measure the status of both at the same time
a token canister and frontend web_site canister in one project

stopped and started both and measured before sleep
and the results compared to this morning are more in line with what should be expected :slight_smile:

Where’s the best place to vote up a cycles usage web dashboard,
logging dashboard, optimized specific purpose database, caching and real value asset platform level systems, etc… ?

these general purpose canisters are very powerful but it would be odd not to optimize certain well standardized systems :thinking:

Glad to hear it’s more reasonable now.

Just build it. This is something that can be done by anyone, so we expect that somebody create such a system. We (DFINITY) try to only build what only we can do (e.g. really hard crypto stuff) and let the rest happen organically.

Also I’m sure there’s some projects out there that already do at least parts of what you want to have. I just don’t know them good enough.

these systems must be implemented below the canister level

has DFINITY opened contributions at a platform level?

Some maybe. But certainly not all you suggested:

  • cycles usage web dashboard: Anything that’s web-something will have to be an asset canister.
  • specific purpose database: that’s a userland feature. Take a look at e.g. Sudograph or CanDB
  • real value asset platform level system: what is that meant to be? The ICP Ledger is actually NOT a part of the platform. It’s implemented as a normal canister.

Not really, but if you have a nice contribution to make there’s always a way to do it. Just reach out in case you have something.

Thanks for all the info :slight_smile:

I just assumed the ledger was, so why are there already so many wrapped versions of ICP?

The wrapped versions exist so it’s easier (and safer) to do token swaps. If you want to transfer non-wrapped ICP, you’ll have to work with asynchronous, non-reversible transfers, which makes it super easy to miss a corner case.

If you have wrapped ICP plus some other wrapped token in e.g. a DEX, the DEX canister can just say

balance_of_AVOlight -= 5 Token
balance_of_Severin += 5 Token
balance_of_AVOlight += 4 ICP
balance_of_Severin -= 4 ICP

and the whole transaction is executed atomically, or not. No need to handle any other errors within the transaction. Of course, you’ll still have to have a solid deposit/withdraw flow, but that is easier to do than a 100% correct swap logic with asynchronous, non-reversible transfers.

personally I prefer a trustless model :thinking: