Skip to content

Commit

Permalink
Merge pull request #1649 from dfinity/gas-fees
Browse files Browse the repository at this point in the history
Updating Gas and Cycles cost page to include itemized transaction responsibility info
  • Loading branch information
jessiemongeon1 authored Jul 5, 2023
2 parents 021114c + ff0ecbd commit 64ccb2e
Showing 1 changed file with 32 additions and 38 deletions.
70 changes: 32 additions & 38 deletions docs/developer-docs/gas-cost.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,28 +23,22 @@ If you intend to deploy canisters on high-replication subnets, your canister sho
See below for details on the cost of compute and storage transactions as well as management canister calls for new features on the Internet Computer as of December 2, 2022.
A thorough example how the cost of running a canister on a 13-node app subnet is computed can be found [here](https://medium.com/@DBOXFoundation/findings-from-calculating-the-cycle-consumption-of-messity-a-universal-example-b2af8dcd3151).

:::info
Regarding transaction fees, the **transaction sender** is responsible for covering any/all transaction fees.
:::


| Transaction | Description | Local development ([IC SDK](./setup/index.md)) | 13-node Application Subnets | 34-node Application Subnets |
| ------------------------------------ | ---------------------------------------------------------------------------------------------------------------- | ------------------------------------- | ------------------------------------- | ---------------------------------- |
| Canister Created | For creating canisters on a subnet | 100B / 13 | 100B | 100B / 13 * 34 |
| Compute Percent Allocated Per Second | For each percent of the reserved compute allocation (a scarce resource). | 10M / 13 | 10M | 10M / 13 * 34 |
| Update Message Execution | For every update message executed | 590K / 13 | 590K | 590K / 13 * 34 |
| Ten Update Instructions Execution | For every 10 instructions executed when executing update type messages | 4 / 13 | 4 | 4 / 13 * 34 |
| Xnet Call | For every inter-canister call performed (includes the cost for sending the request and receiving the response) | 260K / 13 | 260K | 260K / 13 * 34 |
| Xnet Byte Transmission | For every byte sent in an inter-canister call (for bytes sent in the request and response) | 1K / 13 | 1K | 1K / 13 * 34 |
| Ingress Message Reception | For every ingress message received | 1.2M / 13 | 1.2M | 1.2M / 13 * 34 |
| Ingress Byte Reception | For every byte received in an ingress message | 2K / 13 | 2K | 2K / 13 * 34 |
| GB Storage Per Second | For storing a GB of data per second | 127K / 13 | 127K | 127K / 13 * 34 |
| GB Storage Per Second | For storing a GB of data per second | 127K / 13 | 127K | 127K / 13 * 34 |
| | | | | |
| _HTTPS outcalls_ | | | | |
| HTTPS outcall (per call) | For sending an HTTPS outcall to a server outside the IC, per message (`http_request`) | 3,060,000 | 49,140,000 | 171,360,000 |
| HTTPS outcall request message size (per byte) | For sending an HTTPS outcall to a server outside the IC, per request byte (`http_request`) | 400 | 5,200 | 13,600 |
| HTTPS outcall response message size (per byte) | For sending an HTTPS outcall to a server outside the IC, per reserved response byte (`http_request`) | 800 | 10,400 | 27,200 |
| Transaction | Description | Who is responsible for paying the transaction fee? | Local development ([IC SDK](./setup/index.md)) | 13-node Application Subnets | 34-node Application Subnets |
| ------------------------------------ | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------- | ------------------------------------- | ------------------------------------- | ---------------------------------- |
| Canister Created | For creating canisters on a subnet | Created canister | 100B / 13 | 100B | 100B / 13 * 34 |
| Compute Percent Allocated Per Second | For each percent of the reserved compute allocation (a scarce resource). | Canister with allocation | 10M / 13 | 10M | 10M / 13 * 34 |
| Update Message Execution | For every update message executed | Target canister | 590K / 13 | 590K | 590K / 13 * 34 |
| Ten Update Instructions Execution | For every 10 instructions executed when executing update type messages | Canister executing instructions | 4 / 13 | 4 | 4 / 13 * 34 |
| Xnet Call | For every inter-canister call performed (includes the cost for sending the request and receiving the response) | Sending canister | 260K / 13 | 260K | 260K / 13 * 34 |
| Xnet Byte Transmission | For every byte sent in an inter-canister call (for bytes sent in the request and response) | Sending canister | 1K / 13 | 1K | 1K / 13 * 34 |
| Ingress Message Reception | For every ingress message received | Receiving canister | 1.2M / 13 | 1.2M | 1.2M / 13 * 34 |
| Ingress Byte Reception | For every byte received in an ingress message | Receiving canister | 2K / 13 | 2K | 2K / 13 * 34 |
| GB Storage Per Second | For storing a GB of data per second | Canister with storage | 127K / 13 | 127K | 127K / 13 * 34 |
| | | | | |
| _HTTPS outcalls_ | | | | |
| HTTPS outcall (per call) | For sending an HTTPS outcall to a server outside the IC, per message (`http_request`) | Sending canister | 3,060,000 | 49,140,000 | 171,360,000 | 27,200 |
| HTTPS outcall request message size (per byte)| For sending an HTTPS outcall to a server outside the IC, per request byte (http_request) | Sending canister | 400 | 5,200 | 13,600 |
| HTTPS outcall response message size (per byte) | For sending an HTTPS outcall to a server outside the IC, per reserved response byte (http_request)| Sending canister | 800 | 10,400 | 27,200 |

Pricing for the **Bitcoin API** is available in the [Bitcoin API documentation](./integrations/bitcoin/bitcoin-how-it-works.md).

Expand All @@ -60,22 +54,22 @@ The USD cost for transactions below is based on the above cycle costs. 1 XDR is

To derive the estimated cost for a GB Storage per month, we assume a 30 day month.

| Transaction | Description | 13-node Application Subnets | 34-node Application Subnets |
|--------------------------------------|------------------------------------------------------------------------------------------------------------------|---------------------------|-----------------------------|
| Canister Created | For creating canisters on a subnet | $0.130886 | $0.342317 |
| Compute Percent Allocated Per Second | For each percent of the reserved compute allocation (a scarce resource). | $0.0000130886 | $0.0000342317 |
| Update Message Execution | For every update message executed | $0.0000007722274 | $0.0000020196705 |
| Ten Update Instructions Execution | For every 10 instructions executed when executing update type messages | $0.000000000005235 | $0.000000000013089 |
| Xnet Call | For every inter-canister call performed (includes the cost for sending the request and receiving the response) | $0.0000003403036 | $0.0000008900248 |
| Xnet Byte Transmission | For every byte sent in an inter-canister call (for bytes sent in the request and response) | $0.00000000130886 | $0.00000000342267 |
| Ingress Message Reception | For every ingress message received | $0.000001570632 | $0.000004107806 |
| Ingress Byte Reception | For every byte received in an ingress message | $0.00000000261772 | $0.00000000684534 |
| GB Storage Per Second | For storing a GB of data per second | $0.00000016622522 | $0.00000043474178 |
| | | | |
| *HTTPS outcalls* | | | |
| HTTPS outcall (per call) | For sending an HTTPS outcall to a server outside the IC, per message (`http_request`) | $0.0000643173804 | $0.0002242862496
| HTTPS outcall request message size (per byte) | For sending an HTTPS outcall to a server outside the IC, per request byte (`http_request`) | $0.000000006806072 | $0.000000017800496
| HTTPS outcall response message size (per byte) | For sending an HTTPS outcall to a server outside the IC, per reserved response byte (`http_request`) | $0.000000013612144 | $0.000000035600992 |
| Transaction | Description | Who is responsible for paying the transaction fee? | 13-node Application Subnets | 34-node Application Subnets |
|--------------------------------------|------------------------------------------------------------------------------------------------------------------|---------------------------|---------------------------|-----------------------------|
| Canister Created | For creating canisters on a subnet | Created canister | $0.130886 | $0.342317 |
| Compute Percent Allocated Per Second | For each percent of the reserved compute allocation (a scarce resource). | Canister with allocation | $0.0000130886 | $0.0000342317 |
| Update Message Execution | For every update message executed | Target canister | $0.0000007722274 | $0.0000020196705 |
| Ten Update Instructions Execution | For every 10 instructions executed when executing update type messages | Canister executing instructions | $0.000000000005235 | $0.000000000013089 |
| Xnet Call | For every inter-canister call performed (includes the cost for sending the request and receiving the response) | Sending canister | $0.0000003403036 | $0.0000008900248 |
| Xnet Byte Transmission | For every byte sent in an inter-canister call (for bytes sent in the request and response) | Sending canister | $0.00000000130886 | $0.00000000342267 |
| Ingress Message Reception | For every ingress message received | Receiving canister | $0.000001570632 | $0.000004107806 |
| Ingress Byte Reception | For every byte received in an ingress message | Receiving canister | $0.00000000261772 | $0.00000000684534 |
| GB Storage Per Second | For storing a GB of data per second | Canister with storage | $0.00000016622522 | $0.00000043474178 |
| | | | |
| *HTTPS outcalls* | | | |
| HTTPS outcall (per call) | For sending an HTTPS outcall to a server outside the IC, per message (`http_request`) | Sending canister | $0.0000643173804 | $0.0002242862496 |
| HTTPS outcall request message size (per byte) | For sending an HTTPS outcall to a server outside the IC, per request byte (http_request) | Sending canister | $0.000000006806072 | $0.000000017800496 |
| HTTPS outcall response message size (per byte) | For sending an HTTPS outcall to a server outside the IC, per reserved response byte (http_request) | Sending canister | $0.000000013612144 | $0.000000035600992 |

Cost per Transaction in USD (XDR/USD exchange rate as of November 23, 2022):

Expand Down

0 comments on commit 64ccb2e

Please sign in to comment.