Eric Mastro
b580ffd8a3
[refactor] do not expose cancelled logic externally
2022-09-20 15:59:03 +10:00
Eric Mastro
34553ad7d9
[marketplace] add slot/request mapping, cancelled check
...
Add a requestId mapping to the Slot type. This allows the requestId to be obtained for a slot and the StorageRequest can be looked up from the id.
Add `isSlotCancelled` to check if the request that a slot belongs to has been cancelled (not enough slots filled before expiry).
2022-09-20 15:59:03 +10:00
Eric Mastro
20938ab448
[marketplace] Add cancelled check for marking missing proofs
...
Add check for cancelled requests when marking proofs as missing.
Add NatSpec documentation for `withdrawFunds` and `isCancelled`.
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
e5ed3bd59d
[storage] Remove finishContract()
...
Is superceded by Marketplace.payoutSlot().
2022-08-08 11:51:14 +02:00
Mark Spanbroek
97ef1bcd9f
Add getHost() to retrieve host that fulfills request
2022-07-20 11:12:00 +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
2bf01da728
[proofs] Submitting proof emits event containing proof
2022-04-12 09:04:29 +02:00
Mark Spanbroek
b145e66a68
[storage] add getRequest() and getOffer()
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
29b5775951
[proofs] willProofBeRequired() predicts proof requirement
2022-04-05 11:36:31 +02:00
Mark Spanbroek
81c7dcd25a
Disallow finishing of contract that wasn't started
2022-03-22 12:41:13 +01:00
Mark Spanbroek
c606b455d6
Disallow starting an offer that was not selected
2022-03-22 12:41:13 +01:00
Mark Spanbroek
3fd7c756d9
Fix flaky tests
...
By ensuring that there's enough blocks left
for submitting a proof.
2022-03-15 10:01:12 +01:00
Mark Spanbroek
f8ddc4a2f6
Add getChallenge() to Storage contract
2022-03-15 10:01:12 +01:00
Mark Spanbroek
fd55afcc5a
Make pointer downtime configurable
2022-03-15 10:01:12 +01:00
Mark Spanbroek
78eaaa7812
Replace Proof implementation with new design
...
More info: https://github.com/status-im/dagger-research/pull/66
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
e963a25c94
Replace Stakes with Collateral
...
Removes the old Stakes implementation in favor of the
new Collateral implementation.
2022-03-01 09:38:53 +01:00
Mark Spanbroek
f7af18eb2d
Lint with solhint
2022-02-10 07:46:03 +01:00
Mark Spanbroek
78755ecaa2
Format using prettier
2022-02-10 07:46:03 +01:00
Mark Spanbroek
a69a6d6975
Use deployment fixture for Storage contract tests
2021-11-18 13:56:12 +01:00
Mark Spanbroek
8bb8441bce
Slash host stake when too many proofs are missing
2021-11-04 14:19:58 +01:00
Mark Spanbroek
38fee6d83a
Pay host when contract is finished
2021-11-04 11:55:47 +01:00
Mark Spanbroek
d2a3cc4a89
Client pays price when creating contract
2021-11-04 11:40:03 +01:00
Mark Spanbroek
54cc2987df
Ensure that finishing a contract can only be done once
2021-11-04 11:18:05 +01:00
Mark Spanbroek
aa673ff71c
Unlock host stake at end of contract
2021-11-04 10:19:23 +01:00
Mark Spanbroek
6de82709ca
Only host can call start on a contract
2021-11-04 10:00:41 +01:00
Mark Spanbroek
376962322d
Only expect proofs when the contract is started
2021-11-04 10:00:41 +01:00
Mark Spanbroek
2784800c3e
Add end time to proofs based on contract duration
2021-11-03 17:01:11 +01:00
Mark Spanbroek
65c3cacb66
Host stake is locked up when contract is created
2021-11-02 12:50:20 +01:00
Mark Spanbroek
d49c75a74b
Make amount of stake configurable
2021-11-02 12:45:53 +01:00
Mark Spanbroek
8736e5a1aa
Host has to put up stake before entering into a contract
2021-11-02 11:25:01 +01:00
Mark Spanbroek
3b6ec4126d
Fix comments
2021-11-02 11:22:34 +01:00
Mark Spanbroek
7b6c6c2fc5
Rename: StorageContracts -> Storage
2021-11-01 16:34:01 +01:00