-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Research I/O gas measurement #1160
Comments
I suggest the first starting point for this issue should be to review the description and request clarity on any point that is not clear. Also if you have other paths to investigate then please add them in the comments and we can update the description. |
Another idea I had was to charge less for overwriting existing storage slots than inserting into fresh ones. This could incentivize more state reuse and penalize state growth. |
For refunds on state deletion, one idea I had for mitigating congestion was to scale the amount of any potential refund by a running average of recent I/O usage. For example, if the average number of IOPS for the last 50 blocks is maxed out (based on EBS provisioning etc), then removing state would cost the user gas. If average recent IOPs is low, then a user might be eligible for a refund by reclaiming storage space while the network isn't busy. However, refunds are complex if we allow users to pay fees in other tokens like ETH or USDC. |
Yeh I think it's hard to overcome gaming issues with things like running averages. Refunds is my least favorite idea due to it's potential for unintended incentivisations. |
1. State of the art solutions for costing state storage and bandwidth on blockchains
2. Latest research in state rentNot researching this in depth, ultimately the UX overhead of users paying rent seems more complex and risky than we want to navigate. It’s also more difficult to automate if users hold their funds in UTXOs, as rent fees can’t be automatically deducted from account balances. 3. Arweave model for "one price forever"Arweave bases their one price forever by estimating the cost to store a gigabyte of data for one hour. Given the assumption that over time, the ratio of HDDsz / HDDprice follows a predictable decreasing curve, they then approximate the forever cost to be the sum of all Pgbh * data stored over an infinite time horizon. The price of storage is then converted into an estimated market value of their token at the current time. There's also a fallback mechanism for incentivizing nodes to continue holding that data through a “Storage Endowment” if the cost of storing the data isn’t being adequately covered by new fees (i.e. forever storage price). The endowment is an inflationary reward based on the current amount of data stored on the network vs the profit the nodes are already making in other areas. This seems to be a reasonable approach if the only goal is to adequately cover storage costs, regardless of how much state growth occurs. However it’s likely an inadequate deterrent for preventing undesirable state bloat in a smart contract platform such as Fuel. If we have an ideal hardware target in mind (such as not exceeding 1/2 tb of growth per year on a full-node at max TPS), we likely need a model which keeps prices in line with a target state growth rate instead. Another downside is that it’s heavily dependent on strong assumptions about external factors such as the Arweave token value in USD terms, and the price of storage in USD terms. This could destabilize the Arweave economy if there’s unexpected periods of USD inflation or a contraction in HDD supply due to geopolitical reasons or natural disasters affecting the production of NAND chips used in SSDs (covid, tsunamis etc). https://www.arweave.org/yellow-paper.pdf 4. Data pruning
5. Charging for witness dataThe original rationale for excluding witness data from fees was the following:
However, there are some negative consequences to this approach, namely that people could DOS our block space for free! Some counterpoints to the above:
Suggested course of action:In the near term, choose a set of fixed parameters based on a 1D gas price and assuming no pruning initially. In terms of storage costs I suggest the following as a starting point which we can upgrade from later:
This is far from an ideal solution, but as a start it should get us within a general cost region to mitigate DOS. This can be extended with Arbitrum style 2d fees once the DA layer is online. I also think we should add a In the future, we should aim to adopt a multi-dimensional EIP1559 style approach as outlined in section 1. This will allow the gas prices for storage to be largely self-correcting based on our target state growth rate and DA costs. We could even have different prices for prunable datatypes (i.e. blockspace consumed) vs persistent state (coins / storage) vs DA capacity which are autoregulated. The reason I don't suggest we dive straight into this approach is that it will take some time to revamp the mempool, sdks, UI/UX and so on to support a more advanced fee model and this can be improved on later. |
After discussing with @xgreenx we came up with the following plan:
|
Started a PR here to describe how policies could be implemented for the transaction format: FuelLabs/fuel-specs#514 |
Investigate State-of-the-Art Solutions for Costing State Storage and Bandwidth on Blockchains
This issue aims to research and analyze the current state of the art solutions for costing state storage and bandwidth on blockchains. Consider the trade-offs for each point, focusing on security, scalability, and implementation complexity. The analysis will cover topics such as state rent, the Arweave model, data pruning, and witness data charging.
Look for any undesired outcomes like people arbitraging bogus state to profit off state refunds.
1. State of the art solutions for costing state storage and bandwidth on blockchains
2. Latest research in state rent
3. Arweave model for "one price forever"
4. Data pruning
5. Charging for witness data
Goal:
The goal of this issue is to gain a comprehensive understanding of the current state of the art solutions for costing state storage and bandwidth on blockchains, and to evaluate the trade-offs for each point, focusing on implementation complexity.
Completion Criteria:
This issue is considered complete when the following criteria are met:
Once these criteria are met, we should have a clear understanding of the best course of action for our system in terms of state storage and bandwidth costing.
The text was updated successfully, but these errors were encountered: