Skip to content

Commit 29e4c58

Browse files
committed
allow offchain collection of partial evals
1 parent 2d10095 commit 29e4c58

File tree

2 files changed

+0
-5
lines changed

2 files changed

+0
-5
lines changed

contracts/zkdvrf.sol

-1
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,6 @@ contract zkdvrf is Ownable {
208208
// submit the final pseudorandom value which is computed by combining t partial evaluations offchain
209209
function submitRandom(IPseudoRand.PseudoRandom memory pseudo) public onlyOwner {
210210
require(roundToRandom[currentRoundNum].value == bytes32(0), "Answer for round already exists");
211-
require(roundSubmissionCount[currentRoundNum] >= threshold, "Partial evaluation threshold not reached");
212211
require(IPseudoRand(pseudoRand).verifyPseudoRand(bytes(roundInput[currentRoundNum]), pseudo.proof, gpkVal), "Incorrect random submitted");
213212
bytes32 value = keccak256(abi.encodePacked(pseudo.proof.x, pseudo.proof.y));
214213
require(pseudo.value == value, "Incorrect pseudorandom value");

test/zkdvrf.spec.ts

-4
Original file line numberDiff line numberDiff line change
@@ -338,10 +338,6 @@ describe('ZKDVRF on-chain tests', async () => {
338338
await expect(Zkdvrf.submitPartialEval(pEvals[0])).to.be.revertedWith('Already submitted for round')
339339
})
340340

341-
it('should not be able to generate random below threshold', async () => {
342-
await expect(Zkdvrf.submitRandom(pseudoRandom)).to.be.revertedWith('Partial evaluation threshold not reached')
343-
})
344-
345341
it('all nodes should be able to submit partial eval', async () => {
346342
await Zkdvrf.connect(account2).submitPartialEval(pEvals[1])
347343
await Zkdvrf.connect(account3).submitPartialEval(pEvals[2])

0 commit comments

Comments
 (0)