以太坊gas limit什么意思

访客 阅读:16 2024-07-11 10:20:38 评论:0
美化布局示例

欧易(OKX)最新版本

【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   全球官网 大陆官网

币安(Binance)最新版本

币安交易所app【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址

火币HTX最新版本

火币老牌交易所【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址
展开全部

一、智能合约这么好,可不是白用的

"Strong" one, smart contracts are so good, they're not for nothing.

智能合约,顾名思义,是指计算机代码可以自动执行的合同;以太坊虚拟机是用来执行智能合约的;智能账户是智能合约能够被执行的载体。换句话说,智能账户,这个“账户”是可以被以太坊虚拟机操控的,依据什么操控呢,依据智能合约来操控。

Smart contracts, by definition, refer to contracts in which computer codes can be executed automatically; Ether's virtual machine is used to execute smart contracts; smart accounts are vehicles in which smart contracts can be executed. In other words, smart accounts, this “account” can be controlled by a Tai's virtual machine, based on what, and by which, smart contracts.

天下没有免费的午餐,智能合约这个功能这么好,可不是白用的,你在以太坊进行交易的时候也要付给矿工手续费的,那么在以太坊系统上,你要付出的手续费是怎么回事,

There's no free lunch in the world, there's no such thing as a smart contract, it's not for nothing, you pay a fee to a miner when you're dealing in Ether, so what's the charge on the Ether system?

Gas和手续费之间又有什么关联呢?

What's the connection between Gas and the fees?

二、 以太坊 Gas 是怎么回事?

以太坊Gas类似于汽车燃油,智能合约的驱动,需要以太坊Gas。Gas是一个英文单词,中文意思是:瓦斯、汽油,这个东西在日常生活中,是一种消耗品。以太坊为什么会产生“燃料”呢?

Gas, which is like car fuel, is driven by a smart contract. Gas is an English word, meaning: gas, gasoline, this is a consumer in everyday life. Why does Etheria produce "fuels"?

以太坊里面的Gas是什么意思呢?其实,以太坊的Gas和交易费息息相关。以太坊交易需要手续费,这个Gas就是以太坊手续费的计算模式。

What do you mean, Gas? In fact, Gas is related to transaction costs. This Gas is a method of calculating fees.

在以太坊的设定中,交易费类似于一种加密的燃料,也就是Gas,这个东西可以驱动智能合约的运动。当以太坊在区块链上执行交易时,燃料将按照特点的规则而逐渐被消耗。

In Ether's setting, the transaction fee is similar to an encrypted fuel, Gas, which drives the intelligent contract movement. When Ether carries out the transaction on the block chain, the fuel will gradually be consumed according to the characteristic rules.

从这一点看呢,Gas真的是和它的本意一样,像汽车燃油一样,想要发动汽车,必须需要燃油。

From this point of view, Gas is really what it was meant to be, like car fuel, to start a car, it had to be fueled.

三、 以太坊 Gas 和比特币交易费有哪不同?

III,   what difference does it make between the trade fees in Ethio Gas and Bitcoin?

说到手续费,大家可能很熟悉。天下没有免费的午餐,无论是以太坊,还是比特币,都需要手续费,但是二者的手续费模式是不一样的。比特币是直接支付比特币作为转账手续费的,以太坊却不是这样的。

As far as fees are concerned, they may be familiar. No free lunches in the world, whether in Etheria or Bitcoin, require fees, but they are in a different way. Bitcoins pay Bitcoin directly as a transfer charge, not in Ethio.

以太坊本质上是一个虚拟机,这个虚拟机是去中心化的,全世界各国人民各自掌控的虚拟机,联合起来形成一个“世界级的计算网络”。当你发送token,执行合约、转移以太坊,或者在区块上做其他事情时,计算机在处理这笔交易时,需要进行计算,这个计算过程需要消耗网络资源。这样一来,你必须支付“燃料费”(也就是Gas),才能让计算机为你工作,让矿工为你处理交易。

In essence, Ether is a virtual machine, which is decentralized, a virtual machine owned by the peoples of the world, that unites to form a “world-class computing network.” When you send token, execute contracts, transfer Ether, or do something else on the block, the computer has to calculate the transaction, and the calculation process has to consume network resources. In this way, you have to pay “fuel fees” (that is, Gas) in order for the computer to work for you and for the miners to handle the transaction for you.

通常情况下,发送方愿意支付的Gas价格越高,矿工从交易中获得的价值就越大,矿工们也就越有可能选择这个交易。通过这种方式,矿工可以自由地选择交易。为了给发送者设置Gas 价格做参考,矿工们可以直接提出他们执行交易所需的最低Gas 价格。

Typically, the higher the price the sender is willing to pay for Gas, the greater the value the miners get from the transaction, the more likely the miners are to choose the transaction. In this way, miners are free to choose the transaction.

四、 以太坊 Gas 的消耗量该如何计算?

iv,   how do you calculate the consumption of tas?

以太坊虚拟机处理交易时,虚拟机会根据交易中确定的一个一个的操作指令进行逐个处理,而每个操作指令都有明文规定的Gas消耗量。

When dealing with transactions with the Taiwan virtual machine, the virtual opportunity is handled on a case-by-case basis on the basis of one of the operational instructions identified in the transaction, each of which has a specified level of Gas consumption.

以太坊系统规定了两个账户:一个是正常账户,一个是智能账户。

The Etherbank system provides for two accounts: one is a normal account and one is a smart account.

普通的转账交易,也就是调用“正常账户”,所需要的Gas是固定的21000;

(a) The normal transfer transaction, i.e. the call to the “normal account”, requires that the Gas be fixed at 21,000;

而调用“智能账户”的的话,因为智能合约的复杂程度不同,使得所需要的Gas也不同。处理交易占用的资源(计算量、内存等)越多,那么所需要的Gas也就越多,比如:执行一次加法运算将消耗 3Gas,如果执行更复杂的运算,那么消耗的Gas就更多。

The more resources (calculations, memory, etc.) are needed to handle a transaction, the more Gas is needed, for example, to run a one-up operation that will consume 3 Gas, and if more complex calculations are performed, the more Gas is consumed.

那么大家可能会问一个问题:当用户的交易涉及一个恶意的智能合约,这个合约超级复杂,执行这个合约要消耗无限的燃料,怎么办呢?以太坊系统的方案是:为了避免恶意

So you might ask one question: when a user's deal involves a malicious smart contract, which is so complicated, what happens when the contract is executed with unlimited fuel? The idea of the Etherwood system is to avoid malice.

智能合约引起无限的Gas消耗,用户需要在发送交易时设定允许消耗的燃料上限,即

Smart contracts cause unlimited gas consumption, and users need to set a maximum allowable fuel consumption limit at the time of the transaction, i.e.,

GasLimit,这样一来,就算有恶意智能合约,最坏情况也只是消耗 GasLimit 所规定的燃料范围之内。

GasLimit, even with malicious intelligence contracts, the worst-case scenario is to consume the fuel range specified by GasLimit.

五、以太坊 Gas 和交易手续费有什么关系?

What does it have to do with the transaction fee?

以太坊上,你所支付的手续费等于:GasPrice 乘以GasUsed。

By the way, the fee you pay is equal to: GasPrice multiplied by GasUsed.

你可以把 GasPrice 理解为是燃油单价, GasUsed 理解为汽车所需多少升燃油。

You can interpret GasPrice as the unit price of fuel, and GasUsed as how many litres of fuel would be needed for cars.

对于汽车,假如说每升汽油是20块钱,一万升汽油就是20万块钱。对于以太坊,每

For cars, if every litre of gasoline is 20 dollars, 10,000 litres of gasoline is 200,000 dollars.

Gas是20吉伟(吉伟是以太币的数量单位),一万个 Gas 就是:20乘以一万,等于20 万吉伟,2万吉伟等于0.0002以太坊,也就是说,本次交易手续为 0.0002以太坊。

Gas is 20 gigabytes, 10,000 of which is: 20 times 10,000, which is 200,000 gigabytes, and 20,000 gigabytes, which means that the transaction is 0.0002 and 0.0002.

具体的兑换值见下表:

The specific exchange values are shown in the table below:

请点击输入图片描述

Please click to enter a description of the picture

(注释:以太币数量的基础单位是“伟”,以太币的数量单位有“伟、芬尼、以太”,其中,“以太”被用作普通交易;“芬尼”被用作微交易;“萨博”和“伟”被用作进行关于费用和合约实施。)由此我们可以发现,Gas并不是以太坊,它是一种单独的体系,它的汇率与以太坊成一定的比例,经过了比例兑换,最终形成交易费。

(Note: The base unit for the size of the Tai currency is “Wei” and the number of “Weith, Finny, Ether” is used for ordinary transactions; the term “Fenni” is used for micro-trading; and the terms “Sabo” and “Wei” are used for cost and contract enforcement.) Thus, we can see that Gas is not Ethako, it is a separate system, and its exchange rate is proportional to that of Ether, which ultimately results in transaction costs.

具体的汇率查询,可以查看以下网站:

For specific exchange rate queries, the following Web sites are available:

https://jin10086.github.io/etherconVerter/ 

Gas价格和以太币价格都是由市场自由调节的,但是二者是不一样的,他们的不同之处在于:以太币的价格是根据市场情况波动,而Gas的价格由矿工决定的,如果燃料价格低于矿工们的最低要求,矿工就会拒绝处理交易。Gas和以太坊分离,可以保护系统免受随着以太坊价格的快速变化而可能出现的波动。

Gas prices are freely regulated by the market, but the difference between them is that the price of the talisman is subject to market fluctuations, while Gas prices are determined by the miners, who refuse to deal if the fuel price is below the minimum requirements of the miners. Gas and Etheria are separated from each other, protecting the system from possible fluctuations as the prices of the tatais change rapidly.

通常来讲,大部分矿工都会选择利益优先,处理交易时候,他们会按Gas价格从高到底排列,优先处理Gas价格高的,如果你很着急交易 ,就需要提高Gas价格,让矿工早点看到你;如果你不着急呢,你只需要设定一个Gas价格,这个价格在矿工设置的Gas价格底线之上就行了。

Usually, most miners choose to prioritize their interests, and when dealing with transactions, they prioritize Gas prices from the top to the bottom. If you're in a rush, you need to raise Gas prices so that the miners can see you earlier. If you're not in a hurry, you just have to set a Gas price, which is above the Gas price line set by the miners.

六、 Gas 是怎么获取的呢?

6; nbsp; how did Gas get it?

实际上,Gas就是从矿工那里购买的以太币,用户自己账户中的以太币就可以向矿工购买Gas,以太坊客户端根据指定的交易最大支出限额,自动用以太坊购买Gas。

In fact, Gas was purchased from miners in NT, so that users could buy Gas from miners in NT in their own accounts and automatically use it to buy Gas from the TP clients on the basis of a specified maximum spending limit for the transaction.

七、 Gas 最后去了哪里?

每笔交易,交易发起方都要设置交易的Gas限定和 Gas价格,不同的操作会产生不同的Gas成本,Gas用完时矿工将停止执行,使用的Gas会作为奖励,奖励给挖矿的矿工,这将涉及到几下几种情况:

For each transaction, the trade sponsors set trading limits and Gas prices, different operations would result in different Gas costs, gas miners would cease to do so when they ran out of time, and the use of Gas would provide incentives to miners, which would involve several scenarios:

第一种情况是,如果有剩余Gas,那么这些剩余的Gas会退还给交易发起方或智能合约创建者,比如我发送1个以太坊给依依,我设置的 Gas limit 是 5万,正常需要消耗的Gas是21000,,那么,剩下没有被消耗的29000会返还给我。

In the first case, if there is a surplus of Gas, then the remaining Gas will be returned to the starter of the transaction or to the creator of the intelligent contract, for example, I will send an Ether-Ey, I set up the Gas Limited is 50,000, the normal need to consume Gas is 21,000, and the remaining 29,000, which is not consumed, will be returned to me.

第二种情况是,如果我设置的Gas limit太低,或者我账号中的以太坊不足以支付我的Gas消耗,那么,这笔交易会因为Gas不足而被取消,并且用于计算的Gas不会退回到我的账户。

In the second case, if I set Gas limit too low, or if the Ithaya in my account is not enough to pay for my Gas consumption, then the transaction will be cancelled because Gas is inadequate and Gas will not be returned to my account.

第三种情况是,如果交易失败,我也必须为已经占用的计算资源来支付手续费。

In the third case, if the transaction fails, I will also have to pay for the calculation resources already occupied.

八、 怎么设置合理的 Gas 价格?

8 & nbsp; how to set reasonable Gas prices?

每次交易之前,可以查询这个网站来确认需要设置的Gas价格: https://ethGasstation.info/ 总结一下,这篇文章我们主要介绍了以太坊的Gas和手续费:Gas相当于燃油,你在以太坊虚拟机上处理交易,会消耗计算资源,也就是Gas。在以太坊上,你所支付的手续费等于:GasPrice 乘以GasUsed,也就是:Gas的单价乘以消耗掉的Gas总量。操作的复杂程度不同,产生的Gas成本也不同,Gas用完时,矿工将停止执行,使用的Gas会作为奖励,奖励给挖矿的矿工,矿工会优先选择Gas价格出的高的交易者。

Before each transaction, this site can be consulted to confirm the price of Gas that needs to be set: https://ethGasstation.info/  in summary, the article focuses on Gas and fees in the Tailings: Gas is the equivalent of fuel, you handle the transaction on the Taifu virtual machine, and you consume resources, or Gas. At the Ether House, the fee you pay is equivalent to: GasPrice multiplied by GasUSed, or Gas's unit price multiplied by the total amount of Gas consumed. The complexity of the operation is different, and the cost of Gas is different.

展开全部
gas limit
气体的限制

文字格式和图片示例

注册有任何问题请添加 微信:MVIP619 拉你进入群

弹窗与图片大小一致 文章转载注明 网址:
https://netpsp.com/?id=70044

美化布局示例

欧易(OKX)最新版本

【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   全球官网 大陆官网

币安(Binance)最新版本

币安交易所app【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址

火币HTX最新版本

火币老牌交易所【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址
可以去百度分享获取分享代码输入这里。
声明

1.本站遵循行业规范,任何转载的稿件都会明确标注作者和来源;2.本站的原创文章,请转载时务必注明文章作者和来源,不尊重原创的行为我们将追究责任;3.作者投稿可能会经我们编辑修改或补充。

发表评论
平台列表
美化布局示例

欧易(OKX)

  全球官网 大陆官网

币安(Binance)

  官网

火币(HTX)

  官网

Gate.io

  官网

Bitget

  官网

deepcoin

  官网
关注我们

若遇到问题,加微信客服---清歌

搜索
排行榜
扫一扫,加我为微信好友加我为微信好友