Skip to content

Commit

Permalink
chore: add downtimeProduct config parameter (#867)
Browse files Browse the repository at this point in the history
* chore: add `downtimeProduct` config parameter

* bump codex-contracts-eth to master
  • Loading branch information
emizzle authored Aug 15, 2024
1 parent bb9a5fb commit eeb048e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
7 changes: 6 additions & 1 deletion codex/contracts/config.nim
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,19 @@ type
timeout*: UInt256 # mark proofs as missing before the timeout (in seconds)
downtime*: uint8 # ignore this much recent blocks for proof requirements
zkeyHash*: string # hash of the zkey file which is linked to the verifier
# Ensures the pointer does not remain in downtime for many consecutive
# periods. For each period increase, move the pointer `pointerProduct`
# blocks. Should be a prime number to ensure there are no cycles.
downtimeProduct*: uint8


func fromTuple(_: type ProofConfig, tupl: tuple): ProofConfig =
ProofConfig(
period: tupl[0],
timeout: tupl[1],
downtime: tupl[2],
zkeyHash: tupl[3]
zkeyHash: tupl[3],
downtimeProduct: tupl[4]
)

func fromTuple(_: type CollateralConfig, tupl: tuple): CollateralConfig =
Expand Down
3 changes: 2 additions & 1 deletion tests/codex/helpers/mockmarket.nim
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ proc new*(_: type MockMarket): MockMarket =
proofs: ProofConfig(
period: 10.u256,
timeout: 5.u256,
downtime: 64.uint8
downtime: 64.uint8,
downtimeProduct: 67.uint8
)
)
MockMarket(signer: Address.example, config: config)
Expand Down
2 changes: 1 addition & 1 deletion vendor/codex-contracts-eth

0 comments on commit eeb048e

Please sign in to comment.