Skip to content

Commit 571a1eb

Browse files
authored
Merge pull request #432 from kleros/fix/outbox-resolution
Fix/outbox resolution
2 parents ffb594f + 8d2cab0 commit 571a1eb

File tree

3 files changed

+23
-6
lines changed

3 files changed

+23
-6
lines changed

contracts/src/arbitrumToEth/VeaOutboxArbToEth.sol

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 {
8585
/// @param _epoch The epoch that was verified.
8686
event Verified(uint256 _epoch);
8787

88+
/// @dev This event indicates that a resolution has failed.
89+
/// @param _epoch The epoch for which resolution failed.
90+
event FailedResolution(uint256 _epoch);
91+
8892
/// @dev This event indicates the sequencer limit updated.
8993
/// @param _newSequencerDelayLimit The new sequencer delay limit.
9094
event SequencerDelayLimitUpdated(uint256 _newSequencerDelayLimit);
@@ -274,6 +278,7 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 {
274278
/// @param _claim The claim associated with the epoch.
275279
function startVerification(uint256 _epoch, Claim memory _claim) external virtual {
276280
require(claimHashes[_epoch] == hashClaim(_claim), "Invalid claim.");
281+
require(_claim.challenger == address(0), "Claim is challenged.");
277282

278283
// sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.
279284
// using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value
@@ -347,9 +352,10 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 {
347352
_claim.honest = Party.Challenger;
348353
}
349354
claimHashes[_epoch] = hashClaim(_claim);
355+
emit Verified(_epoch);
356+
} else {
357+
emit FailedResolution(_epoch);
350358
}
351-
352-
emit Verified(_epoch);
353359
}
354360

355361
/// @dev Verifies and relays the message. UNTRUSTED.

contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable {
8181
/// @param _epoch The epoch that was verified.
8282
event Verified(uint256 _epoch);
8383

84+
/// @dev This event indicates that a resolution has failed.
85+
/// @param _epoch The epoch for which resolution failed.
86+
event FailedResolution(uint256 _epoch);
87+
8488
/// @dev This event indicates the sequencer limit updated.
8589
/// @param _newSequencerDelayLimit The new sequencer delay limit.
8690
event SequencerDelayLimitUpdateReceived(uint256 _newSequencerDelayLimit);
@@ -220,6 +224,7 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable {
220224
/// @param _claim The claim associated with the epoch.
221225
function startVerification(uint256 _epoch, Claim memory _claim) external virtual {
222226
require(claimHashes[_epoch] == hashClaim(_claim), "Invalid claim.");
227+
require(_claim.challenger == address(0), "Claim is challenged.");
223228

224229
// sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.
225230
// using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value
@@ -291,9 +296,10 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable {
291296
_claim.honest = Party.Challenger;
292297
}
293298
claimHashes[_epoch] = hashClaim(_claim);
299+
emit Verified(_epoch);
300+
} else {
301+
emit FailedResolution(_epoch);
294302
}
295-
296-
emit Verified(_epoch);
297303
}
298304

299305
/// @dev Verifies and relays the message. UNTRUSTED.

contracts/src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ contract VeaOutboxGnosisToArb is IVeaOutboxOnL2 {
7979
/// @param _epoch The epoch that was verified.
8080
event Verified(uint256 indexed _epoch);
8181

82+
/// @dev This event indicates that a resolution has failed.
83+
/// @param _epoch The epoch for which resolution failed.
84+
event FailedResolution(uint256 _epoch);
85+
8286
/// @dev This event indicates the sequencer delay limit updated.
8387
/// @param _newSequencerDelayLimit The new max sequencer past timestamping power.
8488
event SequencerDelayLimitUpdateReceived(uint256 _newSequencerDelayLimit);
@@ -277,9 +281,10 @@ contract VeaOutboxGnosisToArb is IVeaOutboxOnL2 {
277281
} else if (challengers[_epoch] != address(0)) {
278282
claims[_epoch].honest = Party.Challenger;
279283
}
284+
emit Verified(_epoch);
285+
} else {
286+
emit FailedResolution(_epoch);
280287
}
281-
282-
emit Verified(_epoch);
283288
}
284289

285290
/// @dev Verifies and relays the message. UNTRUSTED.

0 commit comments

Comments
 (0)