Skip to content

Commit

Permalink
fix(protocol): fix cooldown/proof window caused by pausing proving (a…
Browse files Browse the repository at this point in the history
…gain) (#15616)
  • Loading branch information
Brechtpd authored Jan 31, 2024
1 parent ccee985 commit e43b512
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions packages/protocol/contracts/L1/libs/LibProvingAlt.sol
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,15 @@ library LibProvingAlt {
error L1_NOT_ASSIGNED_PROVER();
error L1_UNEXPECTED_TRANSITION_TIER();

function pauseProving(TaikoData.State storage state, bool pause) external {
if (state.slotB.provingPaused == pause) revert L1_INVALID_PAUSE_STATUS();
function pauseProving(TaikoData.State storage state, bool toPause) external {
if (state.slotB.provingPaused == toPause) revert L1_INVALID_PAUSE_STATUS();

state.slotB.provingPaused = pause;
emit ProvingPaused(pause);
state.slotB.provingPaused = toPause;

if (!toPause) {
state.slotB.lastUnpausedAt = uint64(block.timestamp);
}
emit ProvingPaused(toPause);
}

/// @dev Proves or contests a block transition.
Expand Down

0 comments on commit e43b512

Please sign in to comment.