Eric Mastro
321132b6fa
clean up tests
...
1. Replace all instances of `now()` with `await currentTime()` to get a more accurate representation of time from the block timestamp. Update examples.js to be async.
2. Move `RequestState` to `marketplace.js`
3. Delete `TestStorage` as `slashAmount` function no longer needed.
2022-10-25 12:38:19 +11:00
Eric Mastro
980647876f
[marketplace] update contract state to failed
...
Update contract state to failed when too many slots have been freed.
2022-09-21 20:52:44 +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
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
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
b8ce6c3682
[marketplace] Add erasure coding and PoR attributes to request
2022-04-11 12:10:57 +02:00
Mark Spanbroek
476956c4d5
Replace pointer duos with pointer downtime design
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
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
85b212c703
Select a storage offer
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
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
e1ef2a2216
Request storage using Marketplace contract
2022-03-15 10:01:12 +01:00
Mark Spanbroek
c5fab40535
Account locking
2022-03-01 09:38:53 +01:00
Mark Spanbroek
78755ecaa2
Format using prettier
2022-02-10 07:46:03 +01:00
Mark Spanbroek
aa673ff71c
Unlock host stake at end of contract
2021-11-04 10:19:23 +01:00
Mark Spanbroek
e7f3dc3dae
Define contract duration in number of blocks
...
This makes calculation with duration in Solidity simpler
and less prone to errors.
2021-11-03 11:10:42 +01:00
Mark Spanbroek
5eb571fe1c
Use 'request' and 'bid' objects in tests
2021-11-02 09:45:49 +01:00
Mark Spanbroek
a5e05018ad
Move example values for tests into separate file
2021-11-02 09:04:51 +01:00