diff --git a/contracts/zkdvrf.sol b/contracts/zkdvrf.sol index 5e7541b..dafc1b7 100644 --- a/contracts/zkdvrf.sol +++ b/contracts/zkdvrf.sol @@ -208,7 +208,6 @@ contract zkdvrf is Ownable { // submit the final pseudorandom value which is computed by combining t partial evaluations offchain function submitRandom(IPseudoRand.PseudoRandom memory pseudo) public onlyOwner { require(roundToRandom[currentRoundNum].value == bytes32(0), "Answer for round already exists"); - require(roundSubmissionCount[currentRoundNum] >= threshold, "Partial evaluation threshold not reached"); require(IPseudoRand(pseudoRand).verifyPseudoRand(bytes(roundInput[currentRoundNum]), pseudo.proof, gpkVal), "Incorrect random submitted"); bytes32 value = keccak256(abi.encodePacked(pseudo.proof.x, pseudo.proof.y)); require(pseudo.value == value, "Incorrect pseudorandom value"); diff --git a/test/zkdvrf.spec.ts b/test/zkdvrf.spec.ts index 8142b6b..21e5c6e 100644 --- a/test/zkdvrf.spec.ts +++ b/test/zkdvrf.spec.ts @@ -338,10 +338,6 @@ describe('ZKDVRF on-chain tests', async () => { await expect(Zkdvrf.submitPartialEval(pEvals[0])).to.be.revertedWith('Already submitted for round') }) - it('should not be able to generate random below threshold', async () => { - await expect(Zkdvrf.submitRandom(pseudoRandom)).to.be.revertedWith('Partial evaluation threshold not reached') - }) - it('all nodes should be able to submit partial eval', async () => { await Zkdvrf.connect(account2).submitPartialEval(pEvals[1]) await Zkdvrf.connect(account3).submitPartialEval(pEvals[2])