Commit Graph

314 Commits

Author SHA1 Message Date
Mark Spanbroek b625f0d519 Merkle root is 32 bytes 2023-11-22 14:43:11 +01:00
Mark Spanbroek efafa43910 Remove PoR parameters, add merkle root for storage proofs 2023-11-22 14:43:11 +01:00
Adam Uhlíř 14e453ac31
feat: partial payouts for cancelled requests (#69) 2023-10-16 11:14:02 +02:00
Mark Spanbroek 1854dfba99 Redeployed on taiko test net after rebase 2023-09-13 15:05:08 +02:00
Mark Spanbroek ed4717e5ea Fix hardhat error "invalid account" 2023-09-13 15:05:08 +02:00
Mark Spanbroek ffcc0e5ee6 Deployed on taiko test net 2023-09-13 15:05:08 +02:00
Mark Spanbroek 0e89d293e4 [taiko] Add RPC endpoint for Taiko test net 2023-09-13 15:05:08 +02:00
Slava 12b595b8d9
Add reusable workflow for Docker (codex-storage/cs-codex-dist-tests/issues/42) (#67) 2023-08-17 06:05:52 +03:00
Slava 49da1f9b30
chore: Bump Node version (#66) 2023-08-16 11:31:41 +02:00
Ben Bierens ac38d7f837
chore: update dependencies (#64)
Co-authored-by: Veaceslav Doina <20563034+veaceslavdoina@users.noreply.github.com>
2023-08-10 13:20:29 +02:00
Slava b4e4897a37
Add Docker builds for Dist-Tests (#63)
https://github.com/codex-storage/cs-codex-dist-tests/issues/34
2023-07-21 11:08:29 +03:00
Slava d082dc71be
Update Docker workflow (#62) 2023-07-11 19:36:21 +03:00
Eric Mastro 230e7276e2
Support slot queue (#61)
* feat: add request expiry to StorageRequested event

* add slot index to SlotFreed event

* copy slotIndex before delete for emit

* Update tests
2023-06-22 06:18:33 +10:00
Mark Spanbroek 6801f2c009 [fuzzing] document `npm run fuzz` in readme 2023-06-19 14:58:47 +02:00
markspanbroek 96aa98c734 [fuzzing] Use correct hashbang
Co-authored-by: Adam Uhlíř <adam@uhlir.dev>
2023-06-19 14:58:47 +02:00
Mark Spanbroek f530bc5081 [fuzzing] Only use docker image on x86_64 machines
The echidna docker image does not support ARM
Macs, for example.
2023-06-19 14:58:47 +02:00
Mark Spanbroek b396f13359 [fuzzing] Fix CI 2023-06-19 14:58:47 +02:00
Mark Spanbroek 05ef48bf7f [fuzzing] Add suggestions for a long test run 2023-06-19 14:58:47 +02:00
Mark Spanbroek d4fc6bbf7c [fuzzing] update to Echidna 2.2.0 2023-06-19 14:58:47 +02:00
Mark Spanbroek a7dd840eaa [fuzzing] transfers out of the contract should always pass
When a transfer of tokens from the contract fails, then the
fuzzer has found a bug. Changing `require` to `assert`
ensures that the fuzzer considers this a test failure.
2023-06-19 14:58:47 +02:00
Mark Spanbroek 03e5546121 [marketplace] formatting 2023-06-19 14:58:47 +02:00
Mark Spanbroek 42d4778dcc [fuzzing] compile contracts before invoking docker
Ensures that `npm run fuzz` will succeed whether or
not the contracts were compiled beforehand.
2023-06-19 14:58:47 +02:00
Mark Spanbroek c1b412c589 [fuzzing] allow fuzz.sh to be called from any directory 2023-06-19 14:58:47 +02:00
Mark Spanbroek 25f52c72b1 [ci] Run fuzzing in CI 2023-06-19 14:58:47 +02:00
Mark Spanbroek 3390e21071 [fuzzing] Enable fuzzing for Marketplace
Replaces runtime invariant checks with fuzzing tests,
simplifying the contract code and lowering gas costs.
2023-06-19 14:58:47 +02:00
benbierens d57cfc69cd Fix "invalid value undefined" in hardhat configuration 2023-06-19 10:49:40 +02:00
Eric Mastro c7b69893a1 only mint tokens when on local hardhat network 2023-06-19 10:49:40 +02:00
benbierens 312a3eee55 Sets workdir, adds readme 2023-06-19 10:49:40 +02:00
benbierens ff6eb147c6 Waits for token mint transaction. 2023-06-19 10:49:40 +02:00
benbierens f69f9cf7fe debugging deployment of contract to geth node 2023-06-19 10:49:40 +02:00
benbierens a9a1882ed3 Setting up start script. 2023-06-19 10:49:40 +02:00
Slava ee70b64b15
Add Docker builds (#56) 2023-05-25 22:00:56 +03:00
Slava 7b7773c436
Update links to codex-storage organization (#55) 2023-05-25 12:56:04 +03:00
Adam Uhlíř 30affa0da8
build: make sure marketplace is on predefined address (#54) 2023-04-26 09:44:55 +02:00
Eric Mastro 6e66abbfcd
retreive active slot for sales state restoration (#51)
Store slotIndex in slot struct and expose the slot via getActiveSlot. This is to be used when restoring state in the sales module after a node restart.
2023-04-14 09:28:39 +10:00
Adam Uhlíř 63d8ec786a
build: funds localhost env. accounts (#52) 2023-04-03 10:39:48 +02:00
Adam Uhlíř 2b5d079882
feat: collateral fractions (#47)
Co-authored-by: Eric Mastro <github@egonat.me>
2023-03-30 11:11:21 +02:00
Adam Uhlíř 8b39ef8f4a
fix: reset missed counter when slot is freed (#48) 2023-03-08 17:19:49 +01:00
Adam Uhlíř dfdbd16d5b
feat: collateral per slot (#44) 2023-03-08 12:02:34 +01:00
Mark Spanbroek fcc28b3931 [readme] update readme with slots, add references 2023-02-01 11:20:27 +01:00
Mark Spanbroek 7c9ebb3c31 [test] tweak test settings
- stop on first failure (quick feedback)
- do not warn about slow test before 100 ms
  (solidity tests are inherently slow)
- set test timeout to 30 seconds
2023-01-30 14:48:03 +01:00
Mark Spanbroek 24ef30bd2a [proofs] improve test to check proof probability
- avoid bias due to pointer downtime
- use statistical binomial test
2023-01-30 14:47:37 +01:00
Mark Spanbroek e89bfcbaae [build] add library for statistical binomial tests 2023-01-30 14:47:37 +01:00
Mark Spanbroek c9b51695aa [proofs] support probability 1 (proofs always required) 2023-01-30 14:47:37 +01:00
Eric Mastro cde5436262
get request from slot id (#34)
* get request from slot id

- Add public function to get request from slot id.
- Add chai test assertion that compares requests. Usage: `expect(await marketplace.getRequestFromSlotId(slotId(slot))).to.be.request(request)`

This is used when restoring active sales, and a node calls `mySlots`, then iterates the slots and needs originating request details.

* merge upstream changes
2023-01-24 15:59:56 +11:00
Mark Spanbroek be38c54622 [style] enforce `_` prefix for private names
Co-authored-by: Eric Mastro <eric.mastro@gmail.com>
2023-01-23 15:10:23 +01:00
Mark Spanbroek b81e6e6532 [marketplace] better wording
Avoids the word 'expired' which is associated
with cancelling a request

Co-authored-by: Eric Mastro <eric.mastro@gmail.com>
2023-01-23 15:10:23 +01:00
Mark Spanbroek b3855c4ba3 [style] Use _ for private and internal functions
Co-authored-by: Eric Mastro <eric.mastro@gmail.com>
2023-01-23 15:10:23 +01:00
Mark Spanbroek 3bb077db7a [marketplace] reordering
Co-authored-by: Eric Mastro <eric.mastro@gmail.com>
2023-01-23 15:10:23 +01:00
Mark Spanbroek 019c1c34c0 [marketplace] rewrite slot freeing test
To make it independent of values chosen in exampleRequest().
Uses the recently introduced slotState().
2023-01-23 15:10:23 +01:00