Trying to better understand canisters

I’m new to ICP and have been going through a lot of the docs to try and wrap my head around the different types of canisters, and how they function. I’ve hit a bit of a stumbling block and am hopeful someone can clarify some stuff for me.

When I first discovered ICP, I created an Internet Identity using the web interface at http://identity.ic0.app, and that seemed simple enough. I was also able to use https://nns.ic0.app to stake some neurons, create a canister, and put cycles into that canister using the UI.

Then I moved on to the dev docs and was able to deploy a local app no problem. Now, even though I haven’t done it, I’m sure I could follow the docs and deploy a new dapp straight from the command line without a problem. Where I’m confused is, what is the canister located in the nns.ic0.app used for? Is it ONLY a cycles wallet canister?

I was thinking I should be able to deploy a dapp to that canister and use the cycles in it, but I can’t find anywhere in the docs that says I can do that. I added the principle ID from my local machine as a controller for it, but I don’t know how to designate that canister as the one I want to control from the command line and deploy to it? Is that even possible? If it’s not possible, is the main purpose of having the canister in that UI so people can top up their cycles easily? Do I need to link my dapp to it in some other way? Thanks in advance for any guidance/understanding you can give.

James

1 Like

Good questions. Will try to address some.

That canister is only for the NNS frontend dapp (the wallet + DAO voting functionality).

You cannot deploy to the canister on nns.ic0.app.

  1. You can deploy a canister to mainnet if that is your intent.

  2. You can use the NNS dapp to feed cycles to any canister you want.

Is that your intent? I want to be helpful.

Hey @diegop My initial intent was just to successfully deploy a dapp to mainnet. I got stuck because I was thinking I could deploy to the NNS frontend canister and use that UI to manage all of my canisters. I was under the mistaken impression that all of my canisters, no matter what type would show up in that interface once deployed.

Now that I know the canister in the NNS frontend dapp is only used for those two things, I can move forward. Thank you for the help!

James

1 Like

Oh good!

I routinely work on the dev docs so if you send me a link or any page you think coos have been better or was vague I know we would all appreciate it. So myself or my peers can improve it.

I think they are very comprehensive right now. I was able to get very far and gain what I think is a pretty good understanding by following along. Here are a couple things that might help someone like myself gain a better understanding of how it works.

On this page. #4 has a section that says

You may further wonder why dapps run on cycles rather than ICP tokens. The reason is that the cost of ICP tokens fluctuate with the crypto market, but cycles are predictable and relatively stable tokens which are pegged to SDR. One trillion cycles will always cost one SDR, regardless of the price of ICP.

I was able to understand what SDR is, but in a lot of other places in the docs, it’s referenced as XDR. I’m assuming XDR is just a coin pegged to SDR and is used to actually purchase cycles on the network. But I didn’t see that explanation anywhere. It’s possible I just missed it.

Also, I know the current docs explain canisters as you go along, but it would be nice to have one section that gives you an overview of everything you need to deploy a project to mainnet? Or a section that dives a little deeper into the transition from doing everything local to managing everything for mainnet?

The docs on deploying locally are great, but when I’m ready to deploy to mainnet, it gets a little more complicated, (it did for me anyway). Locally, I don’t need to keep track of a whole lot. But when I go to mainnet, I need to keep track of my principle ID, canister IDs, know what the ledger canister does, create a cycles wallet (which is another type of canister, I think), in order to fund other canisters. When I’m doing everything local, it all seems so easy because it’s done automatically.

With all of that said, the docs are great and worked well for me aside from a few stumbling points here and there. That might also be because I’m pivoting into computer science/programming after being in a totally unrelated field. So grasping some of these concepts might be way easier for someone with an extensive background in comp sci.

Thanks again for the help, I really appreciate it.

2 Likes

XDR is simply the currency code of the IMF SDR basket of currencies (just like USD is the currency code of the US dollar). So it is not a separate coin.

You are right, we could make this clearer in some of our documentation to prevent this confusion. Thanks for letting us know!

1 Like

Ah, that makes sense. Thanks for the clarification!

1 Like