Commit Graph

16 Commits

Author SHA1 Message Date
Mark Spanbroek 11ccefd720 Different configurations for different networks
By default we have a proof period of 2 minutes,
but on hardhat it's 1 minute.
2024-11-08 06:36:31 +01:00
Eric 33010bd20c
feat(slot-reservations): Allow slots to be reserved (#177)
* feat(slot-reservations): Allow slots to be reserved

Closes #175.

Allows reservation of slots, without an implementation of the expanding window.

- Add a function called `reserveSlot(address, SlotId)`, that allows three unique addresses per slot to be reserved, that returns bool if successful.
       - Use `mapping(SlotId => EnumerableSet.AddressSet)`
       - Return false if the address could not be added to the set (if `EnumerableSet.add` returns false)
- Add `canReserveSlot(address, SlotId)`
        - Return `true` if set of reservations is less than 3 and the set doesn't already contain the address
        - Return `true` otherwise (for now, later add in logic for checking the address is inside the expanding window)
        - Call `canReserveSlot` from `reserveSlot` as a `require` or invariant
- Add `SlotReservations` configuration struct to the network-level config, with `maxReservations`
2024-10-03 11:01:21 +10:00
Eric ed428767b3
chore: add `downtimeProduct` configuration parameter (#138)
* add `downtimeProduct` configuration parameter

* formatting
2024-08-14 15:50:32 +10:00
Mark Spanbroek 118ee0b22b Slash and free slot sooner when proofs are missed
This makes it faster to test these scenarios in the
codex integration tests.
2024-03-03 06:54:22 +01:00
Mark Spanbroek ed54b80fc9 Increase proof period
In Codex's integration tests we now create real ZK proofs,
which take a bit longer to generate. We therefore need a
period that remains the same while the proof is generated.
2024-02-21 10:34:32 +01:00
Mark Spanbroek fb17fb5843 Fix deployment bug in loading zkey hash 2024-01-31 16:52:43 +01:00
Mark Spanbroek 31bbd702c2 Remove contract aliasing; doesn't work
Contract aliasing (specifying a fixed address for a
contract) doesn't work. We're now echoing the
addresses of the deployed contracts instead.
2024-01-31 15:45:01 +01:00
Mark Spanbroek c7b18af7cd Deploy 2 versions of the marketplace on local network
One with the real Groth16 verifier,
and one with a dummy verifier used for testing.
2024-01-31 15:45:01 +01:00
Adam Uhlíř 331bc56e8f
feat: zkey hash in marketplace config (#81) 2024-01-30 06:36:27 +01:00
Mark Spanbroek 79d9c43beb Fix marketplace deployment script 2024-01-25 13:08:10 +01:00
Adam Uhlíř 0d9b67bb31 feat: verifier integration 2024-01-25 13:08:10 +01:00
Adam Uhlíř 30affa0da8
build: make sure marketplace is on predefined address (#54) 2023-04-26 09:44:55 +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íř dfdbd16d5b
feat: collateral per slot (#44) 2023-03-08 12:02:34 +01:00
Mark Spanbroek 70d8967f26 [deployment] use new configuration struct 2023-01-23 15:10:23 +01:00
Mark Spanbroek afb89c9233 [Storage] Remove Storage
Rationale: it was already a very thin wrapper
around Marketplace, and now that its remaining
functionality has been moved to Proofs and
Marketplace, we no longer need it.
2023-01-10 12:15:22 +01:00