Internet Computer Identity — a Journey of Discovery

Dfinity — Internet Computer

The Importance of the IC Identity

If a developer gets rid of the IC identity he/she can lose control over the deployed canisters by losing the ability to give the canister more cycles. This causes either the freeze of the canisters or the canisters cannot be updated anymore. Both options are not desirable. The current threshold limit for a running canister is around 2.592.000 cycles. Especially in a production scenario it is very important to keep an eye on having control over the canisters.

Article Overview

Explanation of the IC Identity

When you start with the IC development you will receive a so-called identity. This identity will be created automatically through several dfx actions. At the end, there will be an identity named default. This identity should not be confused with IC identity itself. The IC identity is an anonymous blockchain authentication framework supported by the IC.

Elements of an identity
  • Name; The name is simply a name on the local machine and has no further use.
  • Principal Identifier; The principal identifier represents a unique identifier for the particular identity. This identifier will be visible for the developer and represents the current user. It can also be seen as the public key in a special hash format.
  • Account Identifier; The account identifier is the link to the ledger canister. This identifier is needed to get some ICPs for the cycle conversion.
Request envelope

Controller and Custodian Roles

A user principal or a canister principal can be assigned to a canister as a controller or custodian role. According to the official documentation a controller is the most privileged role and a principal assigned to the controller role can perform privileged tasks, including the following:

  • Add and remove other principals as controllers;
  • Authorise and deauthorize other principals as custodians;
  • Add entries to the cycles wallet address book;
  • Access the cycles wallet balance and all other wallet-related information;
  • Send cycles to other canisters;
  • Accept receipt of cycles from other canisters;
  • Rename the cycleswallet;
  • Create canisters and additional cycles wallets.
  • Access the cycles wallet balance and all other wallet-related information;
  • Send cycles to other canisters;
  • Accept receipt of cycles from other canisters;
  • Create canisters.

Cycles Wallet

A cycles wallet is a special type of canister. The cycles wallet holds the cycles required to perform operations such as creating new canisters or other operations associated with the canister. Different operations need a different amount of cycles. Here you can get a first impression about the Computation-and-storage-costs.

Way to get some cycles
  • There are two possibilities to get some ICPs. Either you buy some ICPs on an exchange of your choice or you swap existing coins to ICP.
  • With ICPs you can use the account identifier to convert some cycles and deposit them into a cycles wallet.
  • The cycles wallet can supply the canister with enough cycles to operate properly. One cycles wallet can be used for different projects.
  1. Use the dfx wallet command.
  2. Use the dfx canister command.
  3. Use the canisters GUI.
Cycles wallet GUI

Key Findings

In this article you have discovered the IC identity from a developer perspective. Let me summarise, finally, the key findings:

  • Always make a backup of the identity folder.
  • The principal identifier represents the textual representation of the private key and can also be seen as the public key.
  • The account identifier is the link to the IC mainnet ledger.
  • Be careful who you assign to the controllers and custodian roles.
  • Watch the account balance of the canisters to avoid falling below the threshold limit.
  • Use different identities for different projects in the case you work for different clients.

Additional Links

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Bole Roland

Bole Roland

CEO sdg - samlinux development group and focused on the Internet Computer and Cloud Computing Engineering.