Tezos网络上的天然气是什么?
1 个回答
- 投票数
-
- 2019-02-28
气体代表与交易相关的计算成本,例如基本交易的天然气约为10,000单位,而调用智能合约的更昂贵的交易可能会花费更多.当前,每个操作的固定气体限制为400,000个单位,每块固定的气体限制为4,000,000个单位.对于交易(尤其是智能合约调用)而言,这是一个相当大的限制,例如,当前一个区块只能包含约400个基本交易(4,000,000/10,000),相当于TPS约为6.66.
在我看来,天然气限额非常低,而提高限额将大大有助于改善TPS和更复杂的智能合约的可行性.
Gas represents computational cost related to a transaction, e.g. gas for basic transactions are about 10,000 units, where as more costly transactions that invoke smart contracts can cost a lot more.
Currently there is a fixed gas limit per operation of 400,000 units, and a fixed gas limit per block of 4,000,000 units. This is quite limiting for transactions (especially smart contract calls), for example currently a single block can only contain ~400 basic transactions (4,000,000 / 10,000) which equates to a TPS of about 6.66.
The gas limits are quite low in my opinion, and an increase would greatly help to improve TPS and viability of more complex smart contracts.
-
一个气体单位等于什么? 协议如何计算智能合约交易所需的天然气量?What can one gas unit be equated to? How does the protocol calculate the required amount of gas for transactions of a smart contract?
- 1
- 2019-02-28
- KD26
-
它被编码到协议中,例如气体量分配给不同的指令.可以对其进行调整,基准测试和优化.天然气成本等于计算,例如如果一条指令占用了两倍的计算时间/资源,那么它应该消耗两倍的气体.一般来说,天然气仍然需要优化,我相信初始值本质上是保守的.It's coded into the protocol, e.g. an amount of gas is assigned to different instructions. It's something that can be tweaked, benchmarked and optimized. Gas costs are meant to equate to computation, e.g. if one instruction takes twice as much computation time/resources, it should consume twice as much gas. Gas in general still needs optimizations, I believe the initial values were conservative in nature.
- 0
- 2019-02-28
- Stephen Andrews
-
天然气成本是否也直接影响XTZ的交易成本?And do gas costs also have a direct effect on transaction costs in XTZ?
- 1
- 2019-02-28
- cryptodad
-
将交易包含在区块中会计算成本-例如面包师将需要验证发件人是否有足够的余额等.天然气成本是毫微微盎司-一次基本交易的价格约为0.014泰兹.Including a transaction into a block costs computation - e.g. the baker would need to validate that the sender has enough balance etc. Gas cost is a nanotez - this comes out to being ~0.0014 tez for a basic transaction.
- 0
- 2019-02-28
- Stephen Andrews
-
@MarcB是的,您可以在此处查看tezosproto 003中成本/费用的详细信息https://tezos.stackexchange.com/questions/106/fees-in-proto-003@MarcB yes you can check here for details for costs/fees in tezos proto 003 https://tezos.stackexchange.com/questions/106/fees-in-proto-003
- 1
- 2019-03-01
- Ezy
这个问题与以下事实有关:我不知道出于什么原因需要增加气体限制,增加会产生什么影响,以及为什么无法按原样保留限制? 我想以一种相当简单但尽可能完整的形式听到答案,什么是气,以便网络的简单用户可以理解