Review and response to gas impacts of FIP-0045 #535
Replies: 2 comments 1 reply
-
@anorth |
Beta Was this translation helpful? Give feedback.
-
The batching of datacap transfers from the same verified client has been implemented in filecoin-project/builtin-actors#722. This is expected to remove most of the per-deal overheads in batched cases so that batches (with the same client) area again much cheaper, for the next upgrade (nv18). There has been some solid progress on tooling for instrumentation. Results and follow-up optimisations will be tracked in filecoin-project/builtin-actors#1020. They will probably land later if, as seems likely, they involve reorganising the state of existing built-in actors. |
Beta Was this translation helpful? Give feedback.
-
The implementation of FIP-0045—decoupling the verified registry from markets—will activate on the network in nv17, on Nov 30th at epoch 2383680. This upgrade brings many near- and long-term benefits to storage providers, the storage market, and to the network. But one less desirable effect is an increase in the gas costs associated with Filecoin Plus verified deals.
As now documented in FIP-0045, the increase is about 70M gas per deal when publishing, and a little less when subsequently submitting aggregated sector proofs or replica update (or, borne by the network cron, when submitting single-sector proofs). This is an increase of ~80% over the present gas costs of publishing a verified deal, or 30% over a replica update. The relative increase is larger for batch submissions, the per-sector cost being about constant.
Higher gas costs were not a goal of this work. These changes lay foundations for more gas-efficient markets in the future, but present tough economic conditions understandably cause storage providers to be very cost conscious now. We under-estimated the gas increase during development and thus did not devote sufficient attention to reducing it.
This is ultimately my responsibility as the lead fo these changes. I and the engineers involved have recently conducted a post-mortem on the events leading to this. A summary of notes is presented here, along with plans to both address these specific gas costs and prevent similar occurrences in the future.
Timeline
A brief timeline of the development of FIP-0045. Note that dates are generally +/- 1 day due to timezone differences between contributors.
On this timeline, and with current FVM tooling, measuring the gas impact of these changes became possible on October 6, when the migration implementation was completed. The method we do have for measurement involves performing a mock upgrade on mainnet state in order to execute the new code (see below).
With somewhat better tooling, we could have performed a fair analysis at September 28, when the implementation was complete. But with better tooling, we could have additionally gained data points and directed optimization efforts sooner still.
Discussion
Aggregated notes from post-mortem discussion between @anorth, @ZenGround0, @arajasek, @Kubuxu, @jennijuju.
Actions
A set of actions we intend to undertake to mitigate this issue and prevent its recurrence.
To be clear, we have no intentions of halting the network v17 upgrade or its inclusion of FIP-0045. While we wish the gas impacts were smaller, they do not overpower the network progress embodied in these changes. Will will improve it in a subsequent upgrade.
Closing remarks
I would like to acknowledge @jennijuju who early and repeatedly agitated for gas analysis throughout this development. You were on the right path. I wish we had had the tooling to provide this sooner.
@swift-mx contributed #722 toward the end of the nv17 development window, which would likely have reduced costs for batched calls to PublishStorageDeals. This change was in review but deprioritized in favour of simplicity and sticking to our development and network release timelines. We will of course include this in the next network upgrade.
Beta Was this translation helpful? Give feedback.
All reactions