Direct data onboarding: Onboarding data without built-in market deals (FIP-0076) #730
Replies: 21 comments 50 replies
-
current flow -> Direct FIL+ proposal is that right? @anorth |
Beta Was this translation helpful? Give feedback.
-
Hello @anorth!
Client payment is our network's top priority. It's essential for the network’s sustainability and overall health. Ignoring it would be a big mistake. |
Beta Was this translation helpful? Give feedback.
-
Thanks @anorth for opening this! I have a couple of questions after the first quick pass on the technical design:
|
Beta Was this translation helpful? Give feedback.
-
This proposal involves the client submitting a message to create a datacap allocation. In current flows, the SP submits the equivalent message when they publish storage deals. Submitting a message involves holding a token balance to pay gas, and interacting directly with a node; clients don't currently have to do any of that. A workflow where the SP submits all messages could be restored with the addition of a generic delegated execution capability, proposed in #738, or with implementation of explicit "voucher" handling in the datacap actor. |
Beta Was this translation helpful? Give feedback.
-
Hey @anorth are you planning to move forward with this proposal and make it a "Draft"? |
Beta Was this translation helpful? Give feedback.
-
I personally oppose to changes that are doing plus not minus on L1. The idea of 730 felt a bit hacky. An intrusive patch on an already cumbersome protocol architecture. It complicates L1 with even more unnecessary messages and complexity. |
Beta Was this translation helpful? Give feedback.
-
Please can you give some more detail as to how this affects the ability of FEVM smart contracts to be able to ascertain the status of a particular piece_cid? e.g how will the following usecase be solved: "As a smart contract, I want to be able to prove that a given piece CID has at least 3 replicas and that they are all valid for at least 6 months from now"? |
Beta Was this translation helpful? Give feedback.
-
I am drafting a FIP for this proposal at #804. Implementation is in progress on the |
Beta Was this translation helpful? Give feedback.
-
starting a thread to discussing the In FIP it mentions
my question "Peer: if the notification causes the message to fail due to ErrOutOfGas or such, I'd guess the sector activation will be reverted too? or if the actor detects the gas usage will just exit the notify loop so to ensure the message can still be successfully sent for sector activation?" and from anorth: "If >=1 notification was specified then a failure will result in "aborting the entire operation". Aborting the entire operation means no sectors are activated. No there is no handling for out-of-gas or similar. That's why notifications are restricted to the built-in market actor to start. Your concerns about notifying untrusted code are valid, but there's no attempt to solve them here. @nonsense @rjan90 I am wondering in practical, if there would be any user/use case would want to keep a sector with data activated and alive, without the deals inside actually is activated/considered started on chain? is this piece still considered practically stored on filecoin? is there any practical reason we should have user to specify if |
Beta Was this translation helpful? Give feedback.
-
also related to the above failure handling This also means if a prove commit sector message has say
I would be curious if we could attempt to make sector activation sector dependent, so that failure in sector A will always not impact sector B unless its message level abortion due to reason like out of gas. |
Beta Was this translation helpful? Give feedback.
-
my Q: "What would happen when a sector has datacap pieces onboarding without a f05 deal?" A from anorth: "the built-in market actor is notified of the sector termination if the sector has non-zero deal weight or verified deal weight another product consideration we should note is that: This will break most of the toolings & might complicate the implementation for RaaS - as verifreg allocation/claim currently doesn't have one specific state to track when an allocation/claim state is updated (an allocation is claimed, or a claim was made and active to early terminated). (cc @hammertoe plz provide builder needs and insight) should we consider adding claim/allocation state for it to contain the necessary information to serve as one of the deal abstraction MVP? |
Beta Was this translation helpful? Give feedback.
-
i support this FIP. it will allow for exploring more efficient solutions around data storage and data indexing on top of the filecoin network - without any apparent technical downside |
Beta Was this translation helpful? Give feedback.
-
The draft FIP is finally published at https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0076.md One thing I intend to add is an exported method for the built-in market that looks up the sector number for a deal |
Beta Was this translation helpful? Give feedback.
-
I have proposed adding methods for iterating the verified registry's allocations and claims collections in filecoin-project/builtin-actors#1468 (code here). @raulk left a non-editorial comment which I am moving here for discussion.
|
Beta Was this translation helpful? Give feedback.
-
Is it still true that
@dkkapur is that a reasonable limitation to shift towards? my understanding is that there are an increasing number of FIL+ datacap allocations that are associated with paid deals. Is the expectation that those payments will be out of band / separate? |
Beta Was this translation helpful? Give feedback.
-
Hi All, Here is a note analyzing the CE impacts of DDO. In this report, we identify several cases of what can happen to base_fee after DDO is implemented and look at the impacts to supply in each case. In general, from a supply perspective, DDO has a smaller effect since gas burn is a small portion of the total circulating supply. The FIP also enables higher throughput of data to be onboarded. We quantify the investment needed to support increases in data onboarding rates from the current levels. |
Beta Was this translation helpful? Give feedback.
-
@anorth The fip doesn't specify that with my gut feeling is that a similar aggregate fee should be implemented, otherwise im concerned an imbalance cost charge will be introduced again between PCS3 vs PCA, where PCS3 will charge less burn compare to PCA and creates additional unintentional disincentive to participate in built in storage market (as PCS3 doesn't support sectors with f05 deal ID/or support f05 notifictaion). |
Beta Was this translation helpful? Give feedback.
-
Synchronous Notifications versus CommitmentsCommenting for discussion (and for future readers), I had some concerns but resolved them while writing this up. So, there are two approaches to "activating" deals:
The first option has a significant benefit: it decouples notification from proving. This gives the SP quite a bit of flexibility:
Of course, it has a downside: we need to record a something on-chain and, to save space, that will involve some cryptography (likely pairings if we want constant-sized proofs). But, on further consideration, synchronous notification is actually strictly more flexible:
|
Beta Was this translation helpful? Give feedback.
-
I don't see this mentioned anywhere so... is there any reason not to remove the |
Beta Was this translation helpful? Give feedback.
-
Is there any motivation for the |
Beta Was this translation helpful? Give feedback.
-
https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0076.md#sectorcontentchanged
shouldn't this say 0042? |
Beta Was this translation helpful? Give feedback.
-
Edit: FIP-0076
Background & goals
The only mechanism today by which storage providers (SPs) are permitted to commit data in sectors is to make a deal with the built-in storage market actor. The built-in market actor is expensive in gas, and offers only basic functionality. It supports only a single, simple deal schema and policies, and does not support a range of desirable market features. Requiring its use raises costs and limits the utility and value of sectors, and the applications that can be built on Filecoin. It cannot support the expansion in usage or functionality that network participants hope for.
Publishing deals is the largest on-chain cost of QA power onboarding, and currently consumes a large fraction (~half) of total chain bandwidth. Much of this cost is unnecessary in the common case of simple FIL+ verified deals with no client payment, because the verified registry actor already records deal-like information describing the DataCap allocation terms. The built-in market plays no necessary role in allocating or accounting for QA power.
If the built-in storage market actor were bypassed for this common case, QA power could be onboarded at a significant reduction in gas cost. This requires a change in the APIs used by storage providers to onboard sectors. Such new APIs could be simply extended to also support other smart contracts acting as markets, or other data applications.
Goals
Proposal
Direct data onboarding comprises changes to the Filecoin built-in actors, and the components that interact with them, to enable gas-cheap data storage, including Filecoin Plus. Clients make DataCap allocations directly with the verified registry, and SPs claim them directly when activating sectors. The built-in storage market actor is bypassed, and the verified registry’s on-chain allocation/claim record suffices to represent a simple “deal”. Direct FIL+ doesn’t support client payments, but most deals today have no on-chain payment anyway.
The necessary changes also unlock subsequent improvements that can support cheaply-scalable FIL+, and flexibility for other data applications to efficiently implement features on top of basic data storage commitments.
In brief, the proposal requires adding new methods for committing data into sectors, alternatives to
ProveCommitAggregate
andProveReplicaUpdates
. These new methods accept additional parameters from the storage provider which specify the pieces of data activated in the sector, any FIL+ verified allocations being claimed, and the address of any actors to notify about the successful activation. Deals are possible, but not necessary.Data onboarding chain interactions – current flow
Data onboarding chain interactions – Direct FIL+ proposal
I am currently working out a detailed technical design, ahead of drafting a formal FIP.
A change similar to that discussed in discussion #719 is a pre-requisite for this work.
Direct FIL+
For a Direct FIL+ allocation, the client & SP need not publish any deals. Instead, the client allocates DataCap to specific data pieces directly with the verified registry actor. The SP then refers to these DataCap allocations when activating a sector, and receives the appropriate quality-adjusted power if the proven data matches the allocation.
The Direct FIL+ flow does not support client payments for a deal.
The built-in market
The built-in market can still be used, e.g. if a storage fee is to be paid by the client. In this case, a deal is published as usual (which creates the FIL+ verified allocation). Instead of specifying the deal IDs during sector pre-commit, the SP specifies them at activation, along with verified allocation IDs. During sector activation, the market actor is informed of the data pieces and associated deal IDs, and activates the deal if they match.
This is a change from the current flow, where deal ID are specified at pre-commit, and the miner actor fetches the deal piece information when activating a sector, failing if they do not match. The market actor is informed of the data commitment, but does not control it.
Preserving existing workflows
The existing sector onboarding methods will keep working, while the new ones are made available as options. Participants will need to move to the new methods in order to enjoy the benefits of lower cost and increased flexibility, but will not need to do so in any rush. In the long run, I expect the new methods to be widely preferred and to retire the complexity of maintaining both, but not until a large majority of participants have migrated.
Preparations for future enhancements
Changing to new sector onboarding methods involves significant work from client implementers deal clients, and storage providers. We don’t want to do it too often.
If we provision new onboarding methods to support Direct FIL+, we can take the opportunity to prepare for future enhancements that would otherwise also require changes to these methods. Fully supporting these is beyond the scope of this proposal, but we can cheaply make preparations now to ease implementation and adoption in the future. This generally involves adding a placeholder parameter to the new methods, to be specified in full in a future FIP.
Data activation notifications to smart contracts
Because the market actor is no longer an authority on sector content, the same onboarding flow can support the notification of other, user-programmed actors. This workflow also permits deals to be created on the fly during sector activation, without requiring them to be published first. This could allow future markets to have ~half the gas cost of the current built-in-storage market, even while offering similar functionality.
Scalable verified data allocations
FIL+ verified data allocations that are much larger than a sector, with ~constant size. See #708.
Re-committing verified data that has been lost
Re-onboarding verified data that has been accidentally lost, without requiring the client to allocate new DataCap.
SP selection of Window PoSt deadlines
Support for SPs to choose the Window PoSt deadline to which a sector should be assigned, giving them control over Window PoSt scheduling.
Proven deletion of data
Support for proven removal of data from sectors.
Decoupling sector lifetime from data commitment durations
Adding flexibility to sector durations while retaining strong commitments to data.
Data inspection by smart-contracts
Support for optional storage of a sector’s data commitment in chain state, permitting query of sector content by smart contracts.
Discussion
Reduced gas cost for data onboarding
Estimating by analysis of some batched deal and onboarding messages from mainnet, the potential gas savings are:
The first-order impacts of this are reduced SP onboarding costs and reduced variability in those costs, improving total returns. Reduced gas use for onboarding reduces competition for chain bandwidth, likely leading to a reduction in base fee and transaction costs for other parties.
Second-order effects of reduced gas usage and base fee include reduced base fee burn rate (which accounts for ~12.5% of net circulating supply outflows) in the near term. Reduced onboarding costs may induce more onboarding (locking pledge accounts for the other 87.5% of supply outflows) and user demand for other transactions, more likely over a longer term.
On-chain observable state
Removing the necessity of a built-in storage market deal reduces the amount of information necessarily stored and observable on-chain for verified deals. However, most of the removed information is redundant.
A verified registry claim already stores the data CID and size, client and provider addresses, sector number, and epochs describing the minimum and maximum term for which the provider has committed to store the data. The only additional information that would be carried by a built-in market deal is:
Availability of 5-year maximum term for clients
A client using Direct FIL+ can immediately specify a 5-year maximum term, despite the maximum sector commitment duration and built-in market deal duration being limited to 1.5 years (3.5 years after FIP-0052). After initially committing a sector, an SP will be able to extend that sector out to the 5-year maximum while retaining full QAP, with no further client interaction.
Beta Was this translation helpful? Give feedback.
All reactions