From 37bd43f411d6d952e09c78a8c6821c18b38df2e5 Mon Sep 17 00:00:00 2001 From: jaybuidl Date: Wed, 13 Aug 2025 23:31:28 +0100 Subject: [PATCH 1/3] fix: no passing to voting period if commits are all cast --- contracts/src/arbitration/KlerosCoreBase.sol | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/contracts/src/arbitration/KlerosCoreBase.sol b/contracts/src/arbitration/KlerosCoreBase.sol index 2b9998bda..22d1d996a 100644 --- a/contracts/src/arbitration/KlerosCoreBase.sol +++ b/contracts/src/arbitration/KlerosCoreBase.sol @@ -566,10 +566,8 @@ abstract contract KlerosCoreBase is IArbitratorV2, Initializable, UUPSProxiable if (round.drawnJurors.length != round.nbVotes) revert DisputeStillDrawing(); dispute.period = court.hiddenVotes ? Period.commit : Period.vote; } else if (dispute.period == Period.commit) { - if ( - block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)] && - !disputeKits[round.disputeKitID].areCommitsAllCast(_disputeID) - ) { + // Note that we do not want to pass to Voting period if all the commits are cast because it breaks the Shutter auto-reveal currently. + if (block.timestamp - dispute.lastPeriodChange < court.timesPerPeriod[uint256(dispute.period)]) { revert CommitPeriodNotPassed(); } dispute.period = Period.vote; From 0a10ad22eabfdadaa518cdf3e3b4294be6c96d39 Mon Sep 17 00:00:00 2001 From: jaybuidl Date: Wed, 13 Aug 2025 23:36:46 +0100 Subject: [PATCH 2/3] chore: changelog --- contracts/CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contracts/CHANGELOG.md b/contracts/CHANGELOG.md index 0a0250ade..9d4abf080 100644 --- a/contracts/CHANGELOG.md +++ b/contracts/CHANGELOG.md @@ -15,6 +15,10 @@ The format is based on [Common Changelog](https://common-changelog.org/). - Bump `hardhat` to v2.26.2 ([#2069](https://github.com/kleros/kleros-v2/issues/2069)) - Bump `@kleros/vea-contracts` to v0.7.0 ([#2073](https://github.com/kleros/kleros-v2/issues/2073)) +### Fixed + +- Do not pass to Voting period if all the commits are cast because it breaks the current Shutter auto-reveal process. ([#2085](https://github.com/kleros/kleros-v2/issues/2085)) + ## [0.12.0] - 2025-08-05 ### Changed From 257870c1fad6f234315da1c2bab5d763a427deeb Mon Sep 17 00:00:00 2001 From: jaybuidl Date: Fri, 15 Aug 2025 01:58:52 +0100 Subject: [PATCH 3/3] test: fix by warping to pass the period --- contracts/test/foundry/KlerosCore.t.sol | 1 + 1 file changed, 1 insertion(+) diff --git a/contracts/test/foundry/KlerosCore.t.sol b/contracts/test/foundry/KlerosCore.t.sol index 72a6a565c..3387ca187 100644 --- a/contracts/test/foundry/KlerosCore.t.sol +++ b/contracts/test/foundry/KlerosCore.t.sol @@ -1622,6 +1622,7 @@ contract KlerosCoreTest is Test { } // Check reveal in the next period + vm.warp(block.timestamp + timesPerPeriod[1]); core.passPeriod(disputeID); // Check the require with the wrong choice and then with the wrong salt