[go: nahoru, domu]

Skip to content

Commit

Permalink
add intro to wallet canister (dfinity#318)
Browse files Browse the repository at this point in the history
* add intro to wallet canister

* Update modules/developers-guide/pages/concepts/canisters-intro.adoc
  • Loading branch information
lsgunnlsgunn committed Feb 8, 2021
1 parent b28cad1 commit a5a3497
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions modules/developers-guide/pages/concepts/canisters-intro.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -125,18 +125,18 @@ A single user can have multiple public-private key pairs for accessing canisters
== Resource consumption and cycles

In general, all canisters consume resources in the form of CPU cycles for execution, bandwidth for routing messages, and memory for persisted data.
Canisters maintain an account balance to pay for the cost of communication, computation, and storage their applications consume.
The cost of computation is referred to as *cycles*.
Canisters maintain an account balance of *cycles* to pay for the cost of communication, computation, and storage that their applications consume.

Cycles reflects the real costs of operations including resources such physical hardware, rack space, energy,storage devices, and bandwidth.
In simple terms, a *unit of cycles* represents the cost of executing a single WebAssembly instruction.
Cycles are intended to reflect the real cost of operations including physical hardware, rack space, energy, storage devices, and bandwidth in a stable or deflationary way so that the cost of program execution remains the same or decreases with operational efficiency.

* Programs must be able to pay for complete execution (all or nothing), but the cost associated with a unit of cycles will make efficient programs cost-effective.
* By setting limits on how many cycles a canister can consume, the platform can prevent malicious code from draining resources
* By setting limits on how many cycles a canister can consume, the platform can prevent malicious code from draining resources.

The relative stability of operational costs makes it easier to predict the cycles required to process, for example, a million messages.

NOTE: When you deploy canisters locally or to an {IC} test network, there’s no cost associated with program execution. However, it is possible that in calculating the operations to be performed, executing a program might result in an “out of cycles” exception because the operations would exceed a predefined threshold.
The cycles available for program execution are held in a **wallet canister**. For local deployment, wallet canisters are automatically created and issued cycles. To deploy your application on the {IC} network running on external nodes and subnets, however, you'll need to provide a principal and be issued a wallet canister identifier.

NOTE: When you deploy canisters locally or to an {IC} test network, program execution consumes cycles but there are no funds associated with those cycles. However, it is possible that in calculating the operations to be performed, executing a program might result in an “out of cycles” exception because the operations would exceed a predefined threshold.
If you see this exception in testing, you can temporarily configure a higher cycles limit by setting a command-line option.

== Want to learn more?
Expand All @@ -147,4 +147,4 @@ If you are looking for more information about canisters, check out the following

* link:https://www.youtube.com/watch?v=60uHQfoA8D[What is the DFINITY Canister SDK? (video)]

* link:https://www.youtube.com/watch?v=yqIoiyuG[Deploying your first application (video)]
* link:https://www.youtube.com/watch?v=yqIoiyuG[Deploying your first application (video)]

0 comments on commit a5a3497

Please sign in to comment.