Replies: 15 comments 8 replies
-
quick bike shedding, I feel like |
Beta Was this translation helpful? Give feedback.
-
As in ALL contracts that emit this event? Will SP get to chose which ones they'd like to subscribe (deal with?)
So this assumes we stores whole deal proposal in the contract and SP will poll. Curious why we didn't consider to have the event has enough deal proposal info and boost can just get them from event, without pulling from the contract again? (curious about the constraints, gas usage and contract statescalability) |
Beta Was this translation helpful? Give feedback.
-
this is just sending PSD correct? |
Beta Was this translation helpful? Give feedback.
-
(Also note, this flow should work for data contracts that do but are not limited to DataDAO, simple deal client, data bounty, DataDao, perpetual storage, storage automation and so on. |
Beta Was this translation helpful? Give feedback.
-
Good q and i would argue different data platform will have different mechanism - we did some research on this problem here https://www.notion.so/pl-strflt/FilFil-PeSto-and-Filecoin-Archive-47ba9313222c4d86ac0539147b781a6c?p=9b63d39ac97240ce843b24d6b0ec994c&pm=s |
Beta Was this translation helpful? Give feedback.
-
AFAIK the location ref can also be a part of the event - which likely means you don't need eth_call to get it either? Event are then stored as a part of the message receipts. It seems to me that we should prioritize on deciding if we should take the event only approach OR a event+getter approach. |
Beta Was this translation helpful? Give feedback.
-
At the risk of further bike shedding, should we default to listening for these events? So, the configuration would actually be something like |
Beta Was this translation helpful? Give feedback.
-
Fine by me, not strongly held to the names.
This is listed as an outstanding question. It's still not clear what that stream will look like, how SP's can subscribe to certain topics, etc. Ideally, I imagine SP's are going to want to heavily filter this to relevant topics, but there needs to be some product work done to figure out what those end to end flows look like.
@nonsense may have thoughts on this? I'm not currently clear on the benefits/drawbacks of having the events hold all information, versus them being lighter and requiring a fetch aside from a lighter resource load to hold an event cache, but this is likely pretty small.
Yeah standard PSD flows that exist today. Clarified in the description.
100%. Current scenarios listed are just ones that I've heard numerous times, so using them as base use cases.
The main question we have here is that response is consistent. The error messaging can vary based on the mechanism, but being clear about what a denial (racing or otherwise) would be helpful, especially considering SP's will have had to download the data before getting to this step. If there's a high fail rate here, there is little incentive for them to burn resources fetching the data.
Agreed, we need to clarify the flow here. I'd love to get the interface calls between Lotus and Boost clarified, as this should be helpful in sussing out any potential missing bits.
@LaurenSpiegel for that to happen I think we really need to answer the event filtering problem here. If it's default, that means SP's would get ALL events. If contract deals are restricted to certain SP's, negotiated out of band, they could be getting events they can't make deals for. I'd really like to see clarity on what the end event stream looks like for SP's before defaulting to true out of the gate. We're also going to need to sort out what event retention looks like for SP's as well, which could quickly balloon and become unmanageable if there is a flood of these potential deals they need to sift through. |
Beta Was this translation helpful? Give feedback.
-
This is a rather small change on Boost side, depending how it is decided to be implemented. It is a standards question, and something to be discussed at filecoin-project/FIPs#604 At first thought, I'd probably opt for an event that contains all information rather than keep the deal proposal data in state, but this is not what the discussion is currently proposing. Not sure if events have any limitation with respect to the size of the data that they could contain. |
Beta Was this translation helpful? Give feedback.
-
Seems like we are getting at something like below is needed for client contracts:
This is the approach Im currently inclined to as well. Have the same concern on events limitation and im hoping to have some updates next week with the prototype shrenuj is working on. |
Beta Was this translation helpful? Give feedback.
-
The hope with the current interface is to enable a wide variety of data dao / smart contract use cases, which is why we have an event emitted with an id that has to be called by Boost. When an SP then calls This is why we want multiple SPs to respond if they are a fit for the emitted event. Only a subset may be picked with a non-null return. On another note, the question about what we should contain in the event is a key one. See the key / open question in the proposal:
Would love the input of the Boost team on this question based on known Boost behavior. How do Boost SPs evaluate deals currently? I am not currently a fan of including everything in the event, since that means a lot more PSDs will be submitted than the client can afford or meant to submit. The hope is that the emit (push) and the getter (pull) system allows for the PSD payload to be given only to the SPs that the client has approved to receive the payload. Ideally SPs can filter the deal proposal based on the event parameters (see open question) and the client can filter out SPs based on their selective response to |
Beta Was this translation helpful? Give feedback.
-
Intuitively submitting an EVENT with a parameter specifying the SP that is approved to receive the payload seems suboptimal. One of the benefits of submitting deal proposals via EVENTS on chain is that it increases visibility, and more SPs can potentially execute these deals... so limiting the EVENT to just one SP seems off to me. I'd rather this heuristic happen elsewhere, so that there are better controls over what set of SPs is allowed to claim a deal proposal, rather than limiting directly in the EVENT. Not only limiting in the EVENT means that the EVENT size will be larger as we need some parameter, but it also means that we would be spamming 3500 SPs and I have no idea how many other nodes with 1-to-1 messaging on chain... |
Beta Was this translation helpful? Give feedback.
-
The event log is inherently gossipy. Look at the Transfer event for an ERC20. This is an event that gets emitted across the chain for all clients to see even though it only affects the sender's and receiver's balances. This is the case for most events. Also note -- you can specify a set of SPs but the client might be more lenient. If an enterprising SP responded to a deal proposal that it was not included in, the client might approve that request regardless. However you are right that there might be better fields to include in the event parameters than a miner ID. Others are also listed as options. |
Beta Was this translation helpful? Give feedback.
-
I agree on this one. One caveat here is that usually events on Ethereum are used to show that "something happened" already. Here we are using events as a communication protocol.
I just fail to see what's the value of having an event on chain if you are specifying a concrete SP -- you might as well just submit your proposal over libp2p if that's the case.
I think the value of deal proposal events on chain should be that they are most permissionless with a certain criteria / minimal requirements for SPs how could process these proposals. As for emitting events similar to Transfer ERC20, in Filecoin that would be an event upon a successful PSD message. |
Beta Was this translation helpful? Give feedback.
-
Open questions thread: Q1: How do we share the location of the data with SPs? (link)
Q2: How are SP’s filtering events for just the contract owners they accept? (link)
Q3: What about if 2 SP’s submit proposals and only 1 is accepted?
|
Beta Was this translation helpful? Give feedback.
-
Summary
FIP Discussion 604 proposes introducing the ability for storage deal proposal generation to occur on the FVM. In order for SP's to run these deals through existing flows there will be required updates to Lotus (currently in progress) as well as Boost.
Proposal
AcceptContractDeals: true
.AcceptContractDeals
is true, Boost will subscribe toDealProposalCreated
events via the Lotus RPC apigetDealProposal
client
as per the params of the deal proposalclient
address and authorizes the deal. (Lotus Web3 Client Contract contains source code on how deals proposed on the FVM would actually be authorized by client contracts, instead of authorized through client signature verification as it works today.)Scenarios
DataDAO with HTTP hosted CARs for allowlisted SP's
makeDealProposal
for theirdatadao01.car
file hosted athttps://my.data.dao/datadao01.car
triggering a new deal eventhttps://my.data.dao/datadao01.car
DataDAO with custom data transfer (IPFS/Portable Drives/etc) for allowlisted SP's
makeDealProposal
with metadata clarifying how the SP can manually retrieve the data (if not already negotiated as part of a partnership)Awaiting Offline Transfer
Outstanding questions
location reference
is part of the Deal Proposal struct and we get it via the eth_call read-only. Is this where the location reference will be stored?Dependencies
eth_
namespace on Lotus (namelyeth_call
andeth_subscribe
) so that Boost can receive events and do read-only JSON RPC calls to fetch VM state as described above.References
Beta Was this translation helpful? Give feedback.
All reactions