Eric Mastro
37004e0e1f
[marketplace] Allow client to withdraw when cancelled
...
Adds ability for client to withdraw funds from a cancelled storage request.
Tests to check if request has timed out, if the client address is requesting withdraw, if the request state is new, and the funds were successfully transferred.
2022-09-20 15:59:03 +10:00
Eric Mastro
1933ed489a
[marketplace] set request state to started once fulfilled
...
Once all slots are filled, the request state is set to Started.
2022-09-20 15:59:03 +10:00
Eric Mastro
08a3fbb12b
[chore] clean up bytes32 parameters
...
Change the names of some bytes32 parameters to `slotId` and `requestId` to avoid confusion.
2022-08-26 11:03:56 +10:00
Mark Spanbroek
9ab65ae5a6
[marketplace] Specify size per slot, instead of total size
...
Reasoning: it was unclear exactly how much storage a
host should have available for a slot. The division
size/slots can have a non-integer value.
2022-08-08 11:51:14 +02:00
Mark Spanbroek
3e9fffb526
[marketplace] Reward is paid out per second per slot
2022-08-08 11:51:14 +02:00
Mark Spanbroek
1d951ef8f8
[marketplace] Rename Erasure.totalNodes -> Ask.slots
2022-08-08 11:51:14 +02:00
Mark Spanbroek
b3fededbad
[marketplace] Remove nodeId from Request
...
No longer needed now that we have slots.
2022-08-08 11:51:14 +02:00
Mark Spanbroek
9a76c04d45
[marketplace] Emit RequestFulfilled when all slots are filled
2022-08-08 11:51:14 +02:00
Mark Spanbroek
f32974b496
[marketplace] Remove fulfillRequest()
2022-08-08 11:51:14 +02:00
Mark Spanbroek
80f0cc6005
[storage] Slash based on slots
2022-08-08 11:51:14 +02:00
Mark Spanbroek
9bc84dafe0
[marketplace] payout reward for a slot
2022-08-08 11:51:14 +02:00
Mark Spanbroek
141abce186
[marketplace] Add slots
2022-08-08 11:51:14 +02:00
Mark Spanbroek
389f5299d6
[marketplace] Rename maxPrice -> reward
2022-07-20 11:12:00 +02:00
Mark Spanbroek
8d7b7aed1d
[marketplace] remove `offer`, `select` and `startContract`
...
Contract is started when first proof is submitted.
2022-07-20 11:12:00 +02:00
Mark Spanbroek
f3b969fd7c
[marketplace] require storage proofs when fulfilling request
2022-07-20 11:12:00 +02:00
Mark Spanbroek
83291ef06b
[marketplace] fulfill request by presenting proof of storage
2022-07-20 11:12:00 +02:00
Mark Spanbroek
6aa2894521
[marketplace] Use dynamically sized arrays for PoR
...
ABI encoding sometimes fails on large byte arrays of fixed size.
2022-04-11 12:10:57 +02:00
Mark Spanbroek
b8ce6c3682
[marketplace] Add erasure coding and PoR attributes to request
2022-04-11 12:10:57 +02:00
Mark Spanbroek
c606b455d6
Disallow starting an offer that was not selected
2022-03-22 12:41:13 +01:00
Mark Spanbroek
07d0e33789
Disable solhint about relying on timestamp
2022-03-15 10:01:12 +01:00
Mark Spanbroek
ee4683e50c
Add proof probability to Request
2022-03-15 10:01:12 +01:00
Mark Spanbroek
036a214427
Proof period and proof timeout are network constants now
2022-03-15 10:01:12 +01:00
Mark Spanbroek
e818d70b85
Remove Contracts in favor of Marketplace
2022-03-15 10:01:12 +01:00
Mark Spanbroek
7e7134b99d
Allow events to be filtered by request id
2022-03-15 10:01:12 +01:00
Mark Spanbroek
c835ac1cc4
Emit event when offer is selected
2022-03-15 10:01:12 +01:00
Mark Spanbroek
05fbd244e2
Formatting
2022-03-15 10:01:12 +01:00
Mark Spanbroek
6e6cc1a230
Reject offer for expired request
2022-03-15 10:01:12 +01:00
Mark Spanbroek
85b212c703
Select a storage offer
2022-03-15 10:01:12 +01:00
Mark Spanbroek
cc57155792
Lock collateral of host that offers storage
2022-03-15 10:01:12 +01:00
Mark Spanbroek
980e2343ed
Add expiry to storage requests
2022-03-15 10:01:12 +01:00
Mark Spanbroek
18e667bf19
Use client/host address to check for duplicates
...
Removes the need for the extra correctness checks
on request size and offer expiry, since these are
no longer used to check for duplicates.
2022-03-15 10:01:12 +01:00
Mark Spanbroek
ae92f63987
Add host address to offers
2022-03-15 10:01:12 +01:00
Mark Spanbroek
51e2d65596
Add client address to requests
2022-03-15 10:01:12 +01:00
Mark Spanbroek
b349b76ab7
Offer storage using Marketplace contract
2022-03-15 10:01:12 +01:00
Mark Spanbroek
f9cc73d62f
Rename invariants to avoid name clashes
2022-03-15 10:01:12 +01:00
Mark Spanbroek
e1ef2a2216
Request storage using Marketplace contract
2022-03-15 10:01:12 +01:00