2.4「Dfinity」canister cycles相关问题

2.4「Dfinity」canister cycles相关问题

一、使用dfx创建canister自定义cycles充值数量

创建 canister 时可以指定给每个canister分配多少cycles,比如分配1T:

dfx deploy --with-cycles=1000000000000

二、可以从不用的canister回收cycles

dfx canister --network=ic stop --all或canisterID
dfx canister --network=ic delete --all或canisterID

三、创建canister的手续费

每个canister的手续费为0.1T cycles,从转移到canister的cycles中自动扣除。

附cycles花费详情表:

Cycles Cost per Transaction (as of July 26, 2021)

Transaction Description All Application Subnets
Canister Created For creating canisters on a subnet 100,000,000,000
Compute Percent Allocated Per Second For each percent of the reserved compute allocation (a scarce resource). 100,000
Update Message Execution For every update message executed 590,000
Ten Update Instructions Execution For every 10 instructions executed when executing update type messages 4
Xnet Call For every inter-canister call performed (includes the cost for sending the request and receiving the response) 260,000
Xnet Byte Transmission For every byte sent in an inter-canister call (for bytes sent in the request and response) 1,000
Ingress Message Reception For every ingress message received 1,200,000
Ingress Byte Reception For every byte received in an ingress message 2,000
GB Storage Per Second For storing a GB of data per second 127,000

Cost per Transaction in $USD (as of July 26, 2021)

Transaction Description All Application Subnets
Canister Created For creating canisters on a subnet $0.142
Compute Percent Allocated Per Second For each percent of the reserved compute allocation (a scarce resource). $0.000000142
Update Message Execution For every update message executed $0.0000008378
Ten Update Instructions Execution For every 10 instructions executed when executing update type messages $0.00000000000568
Xnet Call For every inter-canister call performed (includes the cost for sending the request and receiving the response) $0.0000003692
Xnet Byte Transmission For every byte sent in an inter-canister call (for bytes sent in the request and response) $0.00000000142
Ingress Message Reception For every ingress message received $0.000001704
Ingress Byte Reception For every byte received in an ingress message $0.00000000284
GB Storage Per Second For storing a GB of data per second $0.00000018034

Assuming a 30 day month —

GB Storage Per Month For storing a GB of data per month $0.467

PS:使用Bucket上传4GB文件的update花费只有大约0.0195美元。

猜你喜欢

转载自blog.csdn.net/qq_29810031/article/details/123248496