specs icon indicating copy to clipboard operation
specs copied to clipboard

feat: Easy Game Rotation

Open clabby opened this issue 5 months ago • 2 comments

Overview

Currently, the OptimismPortal2 contract respects a single dispute game type at a time, as outlined in the specification for the OptimismPortal modifications made as a part of the Stage 1 fault proofs release.

The issue with this is that changing the respected game type issues a large user experience burden to the users of the chain by delaying their withdrawals for a week. This process happens in this codepath, where during withdrawal finalization, the dispute game that the withdrawal was proven against is checked to both be of the current respected game type and created after the most recent time the respected game type was updated.

// The game type of the dispute game must be the respected game type. This was also checked in
// `proveWithdrawalTransaction`, but we check it again in case the respected game type has changed since
// the withdrawal was proven.
if (disputeGameProxy.gameType().raw() != respectedGameType.raw()) revert InvalidGameType();

// The game must have been created after `respectedGameTypeUpdatedAt`. This is to prevent users from creating
// invalid disputes against a deployed game type while the off-chain challenge agents are not watching.
require(
    createdAt >= respectedGameTypeUpdatedAt,
    "OptimismPortal: dispute game created before respected game type was updated"
);

Desired Change

The new behavior here should be such that the Guardian can optionally invalidate, rather than always having to invalidate, the proofs of ongoing user withdrawals.

The behavior should enable a "rollover period," where withdrawals proven against dispute games of the previous game type are allowed, if the Guardian did not specify that old games were to be invalidated. No functionality around the rest of the withdrawal path should change.

clabby avatar Sep 03 '24 19:09 clabby