Skip to content

Commit

Permalink
Merge pull request #3494 from dfinity/jessiemongeon1-patch-1
Browse files Browse the repository at this point in the history
update: Improve messaging around query call costs
  • Loading branch information
jessiemongeon1 committed Sep 18, 2024
2 parents af68a4c + a82a2d3 commit d8eedc7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/developer-docs/cost-estimations-and-examples.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ To get a rough estimate of how much your project may cost, below are common proj

- **Messaging**: Calls that are made to a canister's methods. Costs depend on the type of call being sent (query, update, inter-canister, etc), the size of the message's request and response bytes, and the total amount of messages a canister sends and receives.

:::info
Note that query calls are currently free and do not incur a cost.
:::

- **Execution**: Cycles are charged during execution of messages and tasks. There is a fixed fee for starting execution and a fee per each executed instruction.

- **Storage**: Cycles charged for canister storage, both Wasm memory and stable memory.
Expand Down
4 changes: 4 additions & 0 deletions docs/developer-docs/gas-cost.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,13 @@ The current fees are:

| Message type | Base fee | Per byte fee |
|--------------|----------|--------------|
| Query call | 0 | 0 |
| Canister-to-canister | 260K | 1K |
| User-to-canister (ingress) | 1.2M | 2K |

:::info
Note that query messages are currently free, but this may change in the future.
:::

### Execution

Expand Down Expand Up @@ -163,6 +166,7 @@ The table below details the cost of compute, storage transmissions and canister

| Canister transmission | Description | Who is responsible for paying the cycles fee? | 13-node subnets cycles cost | 13-node subnets USD cost | 34-node subnets | 34-node subnets USD cost |
| ----------------- | ------------------------------- | -------------------------------------------------- | ----------------------------------------------- | --------------------------------------- | ------------------------------------- | --------------------------- | ------------------------------------ |
| Query call| | Query information from a canister. | N/A | Free | Free | Free | Free |
| Canister creation | For creating canisters on a subnet. | Created canister | 100B | $0.133661000000 | 100B / 13 * 34 | $0.349574923077 |
| Compute percent allocated per second | For each percent of the reserved compute allocation (a scarce resource). | Canister with allocation | 10M | $0.000013366100 | 10M / 13 * 34 | $0.000034957492 |
| Update message execution | For every update message executed. | Target canister | 590K | $0.000000788600 | 590K / 13 * 34 | $0.000002062492 |
Expand Down

0 comments on commit d8eedc7

Please sign in to comment.