Filecoin Protocol Laboratory Juan: Application of EIP-1559 in Filecoin Network and Improvement Measures

We all know that Filecoin's gas has a deep connection with EIP-1559. On December 17, Beijing time, Hu An, the founder of Protocol Labs, gave a speech on the theme of "EIP-1559 in Filecoin". This speech mainly explained why Filecoin uses the EIP-1559 pricing structure, and EIP-1559's supply and Community influence, related improvement measures and future plans of EIP-1559 by the protocol laboratory, etc. The following are the main contents of the speech:

Regarding the frist price auction,
  
suppose there is a blockchain . From right to left, each block has a series of transactions. We can regard them as transaction fees. Assuming that the green ones have higher transaction fees, the red ones have lower For transaction fees, miners can decide which method to use, but in fact each block looks different.

Of course, this is just a simplified model. When we actually enter the block, the transactions are arranged in an orderly manner and submitted to the EVM, and then the EVM executes each transaction and changes the state tree. These transactions will consume calculations when they are executed. Resources, and the amount of calculation is measured by gas.

Therefore, gas is the resource used by the Ethereum blockchain to run blockchain calculations. The blockchain that executes transactions is to execute function calls in the virtual machine and change the state in the state tree. Every transaction needs to pay a gas fee to the miner, and every transaction needs to pay a transaction fee.
  
Many function calls will use a lot of gas, and it is difficult to predict how much gas there will be; but users must choose the gas fee and accept the frist price auction, which means that all transactions are in the available transaction pool, and miners can mine into A block is then classified by the miner and selected according to the highest fee (the one with the higher price will get).
  
The frist price auction has led to a bad user experience. For example, if there is any type of network congestion, some people will increase transaction fees to increase the processing speed as soon as possible. This is "oppressive" for most small and medium miners. of.

Insert picture description here

"Frist price auction" model network view
  
In summary, the original way of frist price auction is not the most reasonable way of resource and capital operation.
Why does Filecoin adopt EIP-1559?
  
Juan said that EIP-1559 is implemented by multiple people and may exist in multiple networks, which may be ETH1.0 or ETH2.0.
  
The reason why the Filecoin team implemented EIP-1559 in the Filecoin code and let it run in real time on the network and manage all our transactions is because the old model has a lot of problems, and Filecoin is especially suitable for very fast and requires rules. Rhythm enters certain types of transactions in the blockchain, so EIP-1559 is very attractive to Filecoin.
  
In EIP-1559, the basic cost is related to the network. At any specific time, the basic cost will rise or fall according to the network situation, so it allows these blocks to shrink by themselves. In terms of total gas, if there is a specific network congestion If there are many transactions with funds higher than the basic fee, then more funds will enter the block and the block will expand, which will cause an increase in the basic fee.
  
So for the next block, increase the price threshold for entering the transaction.
  
Eventually, the size of these blocks will begin to shrink, the utilization rate will be less than 100%, and then the basic cost will drop, so Filecoin will become a more efficient market.
  
As Juan said, "We have been studying different models, but we finally chose EIP-1559."
EIP-1559 in Filecoin network usage status
  
Juan believes that in many aspects, EIP-1559 in Filecoin works very well:
transactions on the network are very easy, and the truly important information can be communicated through the network, which helps high-value transactions. happened;
Has a more concise UX, which makes it easier for programs and tools to calculate and set up costs;
optimizing expenses, compared to frist price auction, EIP-1559 can save more for both miners and program providers expenditure.
  
Of course, Juan has also seen the very bad experience that EIP-1559 brings to users. On the blockchain browser, we can see that the gas cost has changed greatly within 24 hours. This is for miners, especially small miners. , Very unfriendly.
  
"In the community, I can feel the tremendous pain from the miners."
Each time congestion will cause gas costs to rise, which is very unfriendly and frustrating, and also makes windowpost more expensive, which means that the daily windowpost expenditures required by miners will be greatly increased.
  
As shown in the figure below, in the Filecoin network, most of the gas consumption fees are ProveCommitSector and PreCommitSector, and the remaining messages include other types of messages, such as windowpost.
 
Snapshot of the transaction
  
Although the windowpost message is small, the usage rate is high.
Other transactions also require a lot of gas usage, and these transactions will slowly flow in. Therefore, windowpost and publish transactions will occupy an increasing share over time. With the expansion of the network, there will be a problem. It is the high pricing of storage that excludes windowpost and publish transactions.

gas usage view

Of course, the gas cost of windowpost is not endlessly high, it has an upper limit, which allows miners to pass without paying expensive fees.

Establishing a really good system is very effective for the Filecoin network. We can see the red line below. Within 24 hours, the used capacity is actually 100.73%, which means that the basic cost is running well and can be gas. Use to keep it around 100%.

Of course, sometimes it will rise to 130% or even 200%. The basic cost fluctuates up and down, which is not friendly to the network. As for why this is so, whether it is too low elasticity, we think this is inherent in EIP-1559. Characteristic.
Regarding improvement measures and future plans

Juan said that they have been considering dividing gas into two independent channels, one is the operational control level, which is critical to the operation of the protocol.
  
The other is the data level, which is a new type of transaction joined by all parties. This will be a way to give priority access to certain types of transactions, which must appear within a specific time frame.
  
Regarding this point, we can imagine that ambulances on highways pass on congested highways. The reason why ambulances can do this is not because they paid expensive fees, but their operation is very important.
  
In addition, protocol labs are also considering creating a fee structure for message types, which is not just for unoccurring gas, but to start pricing and create a market to determine how we should look at which messages.
  
How are these news priced?
  
For example, it allows the network and the community to formulate some policy guidance (for example, which types of transactions should be prioritized? What are the different types of fee structures?) to help the network create some leverage to determine the network's pricing goals.
  
We also need some specific Filecoin operations, for example, leverage-oriented verification. Although we can't verify everything, we can introduce a snark and create new methods to find faults.
  
Scaling consensus is another big thing we have to do. Because the network is very congested, we need to move quickly to sharding. Many of us have already begun to do this.

future job

Data analysis: We have a lot of data about the network. We invite other interested researchers to cooperate with us, especially those in the Ethereum community. Protocol Labs looks forward to exploring important improvements with the Ethereum team;

Improve the gas model: especially the difference between the control plane and the data plane, and it is expected that measures similar to Escalator will be implemented to reduce costs over time.

Introducing the queuing concept: It is planned to introduce the queuing concept into the gas model. This concept will come into play when the network receives computational constraints and constraints; when it is not restricted, the model will leave potential broadband for access.

Establishing QoS guarantees: Establishing QoS guarantees will be very useful for certain types of transactions and certain types of transactions in the network. It will be very useful and helpful to think about how to establish certain types of transactions in certain types. It is helpful to the blockchain, which is also one of the future work.
  
To make a brief summary, the protocol laboratory fully studied multiple gas models and finally decided to use EIP-1559, and the use of EIP-1559 is indeed helpful for Filecoin. However, there is no pure gold and no one is perfect. The application of EIP-1559 on the Filecoin network has also caused the gas cost to rise and fall, which is very frustrating for miners. In this situation, the protocol laboratory has also formulated and implemented Actively promote related improvement measures to minimize the expenditure and fluctuation of gas costs.
  
History tells us that although the development process of things is tortuous, the future is bright. With the joint efforts of all of us, we believe that gas costs will gradually be reduced and the Filecoin network will become better and better.

Guess you like

Origin blog.csdn.net/weixin_49795899/article/details/113677633