You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a client (using StorageClient software) or a miner (StorageProvider) I would like to make sure that I have enough funds available in the market actor for all of my current known deals, so that if I make two simultaneous deals, they both succeed.
Background:
When money is put into the SMA, it is considered "Available"
When a deal is published, funds needed for the deal are locked, and are no longer available.
Currently we use EnsureFunds, which calls MarketEnsureAvailable, which insures the amount past to it is available in the SMA.
Currently, we only submit the value of the current deal to EnsureFunds, but actually, for all deals to go through, we need to have available funds for every deal that is in a state between New and Published (and not failed)
StorageClient & StorageProvider should maintain, in a datastore, a seperate value for total funds committed for our own deals.
Recommend writing a class like StoredAsk -- maybe FundsCommittedTotal
make sure it has a mutex lock (will be accessed by multiple deals)
propobly maintain cached value like StoredAsk to avoid datastore lookup on Get
Should have AddFundsCommitted, ReleaseFundsCommitted, Get (or something like that)
Client:
In StorageClient ensure funds states, add committed funds for current deal and then call node.EnsureFunds with total commited funds
Release committed funds probably right after VerifyDealPublished (i.e. at the beginning of VerifyDealActivated) and in any error state
Provider:
On Provider, repeat the same for the provider ensure funds steps and release funds in StorageDealStaged & error states (at the beginning of handoff deal probably)
Notes:
Should probably not require changes to statemachine for the most part
Should not require changes to node interface
The text was updated successfully, but these errors were encountered:
As a client (using StorageClient software) or a miner (StorageProvider) I would like to make sure that I have enough funds available in the market actor for all of my current known deals, so that if I make two simultaneous deals, they both succeed.
Background:
When money is put into the SMA, it is considered "Available"
When a deal is published, funds needed for the deal are locked, and are no longer available.
Currently we use EnsureFunds, which calls MarketEnsureAvailable, which insures the amount past to it is available in the SMA.
Currently, we only submit the value of the current deal to EnsureFunds, but actually, for all deals to go through, we need to have available funds for every deal that is in a state between New and Published (and not failed)
StorageClient & StorageProvider should maintain, in a datastore, a seperate value for total funds committed for our own deals.
Recommend writing a class like StoredAsk -- maybe FundsCommittedTotal
Client:
Provider:
On Provider, repeat the same for the provider ensure funds steps and release funds in StorageDealStaged & error states (at the beginning of handoff deal probably)
Notes:
The text was updated successfully, but these errors were encountered: