This is the latest in our series highlighting the unique features of the Filecoin network. This post takes a deep dive into gas fees — how they work, and why they’re important to the Filecoin network. Filecoin supports the blockchain economic model, where participants conduct transactions on a distributed network. The network status is updated by miners recording and processing messages in blocks. There are multiple messages, including storage loading, storage transactions, continuous proofs, token transactions, etc. However, the number of messages that can be processed in a block is limited by chain performance, scalability, and verification time. Therefore, only a portion of the messages on the network can successfully be included in a block at any given time. In addition, executing messages consumes computational and storage resources on the network. This is where "Gas" comes into play, which measures the resources consumed by information. The Gas consumed by an on-chain message directly affects the cost paid by the sender to submit the message to the blockchain. And the total GasFee usage of all messages in a block is limited.
The concept of "Gas" was first introduced on the Ethereum blockchain as a measure of the computational and storage resources consumed by a message. This is the origin of the phrase "GasUnit". Historically, in other blockchains, miners specify a GasFee in units of a native currency, and then pay priority fees to miners who generate blocks based on the "Gas" consumed by the message . However, "Gas" consumption is a cost that the entire network should bear, because each node on the network has to spend storage and computing resources to verify each message and keep the network in a consistent state. Therefore, according to the "Gas" usage of a specific message, a certain amount of "Gas" is consumed to compensate the network. Not distributing this cost will create incentive misalignment, because miners may include a message that is actually expensive to calculate for free when they produce a block, because the cost of the message is innocently borne by others. BaseFee is a concept introduced by Ethereum EIP1559. The Base fee multiplied by the Gas usage of the message is the "burn amount". Burning means that it is sent to an unusable address and removes loops on the network. It is dynamically adjusted based on the demand for network bandwidth at a given moment . As the network becomes congested, it will rise, so messages from senders with a valuation lower than the network's Base fee will remain waiting until the state of message congestion improves. The rate of change in BaseFee is designed to increase quickly to guard against potential DOS attacks, and decrease quickly as the network becomes idle. Message senders who cause the network to become more congested will also internalize the cost by paying higher fees. Fee burning also creates slow deflationary pressure that benefits all network participants. Going back to our travel analogy, think about how gasoline is used in normal traffic. If the roads are congested, such as during rush hour, and traffic is not smooth, your car will consume more gasoline. In these cases, it may make sense to wait for a while before starting a trip. The same theory applies to the Filecoin network - when network traffic is congested, GasFee will be high, and it may be a wiser choice to wait and try again later. In addition to burning fees to compensate the network, the message sender also includes a priority fee to the miner, which is independent of the GasFee consumed by the message. This is called GasPremium and can also be outside the protocol. To help readers better understand the GasFee mechanism, the following is a list of relevant Gas concepts for messages and their interactions. These fields can be set by the message sender, but are currently automated in Lotus and more tools can be developed.
The message sender only needs to specify a GasFeeCap and GasLimit for each message. As on-chain resources are consumed, GasUsage multiplied by BaseFee will be burned. Subtracting BaseFee from GasFeeCap will produce GasPremium. GasPremium multiplied by GasLimit will enter the block of the producing miner as a priority fee. Part of the difference between GasLimit and GasUsage will be consumed as an overestimation loss. The rest will be returned to the message sender. Currently, the default implementation is that miners select messages based on GasFeeCap/GasLimit to maximize their expected revenue given the GasLimit. When the network is congested and the BaseFee is high, miners can choose to package blocks to reduce the total GasLimit to reduce the BaseFee, but may be at the expense of GasPremium. The research and engineering teams are working to reduce the resource consumption of various on-chain messages to reduce gas usage and improve network performance to increase blockchain capacity. However, there are currently some messages on Filecoin (such as WindowedPoSt) that must be submitted to the chain within a relatively short time window, otherwise penalties will be incurred. In order to improve the economic structure and provide quality of service guarantees for these types of messages, we are doing more work. The Filecoin network is composed of clients, miners, developers, partners, and token holders, and will continue to work together and develop the network to a better direction. Please follow the Filecoin Lotus document and the Filecoin Improvement Agreement for future improvements. |
<<: 【Filecoin Weekly Report-69】Filecoin important version update, mainnet is getting closer!
>>: Valuable datasets stored via Filecoin Slingshot
There are more and more single men nowadays, and ...
Mole shape of a good man who can make his wife pr...
In fact, for some women, they attach great import...
Bitcoin fell below $60,000 as traders closed thei...
Some people appear to be more casual in real life...
Adam Aron, CEO of AMC Entertainment Holdings, Inc...
When people reach middle age, many people think o...
Is it true that women with high cheekbones are no...
The nasolabial folds are the skin folds on both s...
Ben Zhou, the boss of Dubai-based cryptocurrency ...
The Texas House of Representatives has just unani...
On-chain analysis company Glassnode tweeted that ...
In life, we will meet all kinds of people. Some p...
In 2001, the Global Sleep and Health Program, spo...
host First, please give a brief introduction. Li ...