Skip to content

Fix: Update OPFaultGameFinder to support Base Azul (game type 621) - #52

Draft
adraffy wants to merge 3 commits into
mainfrom
fix/op-fault-game-finder-base
Draft

Fix: Update OPFaultGameFinder to support Base Azul (game type 621)#52
adraffy wants to merge 3 commits into
mainfrom
fix/op-fault-game-finder-base

Conversation

@adraffy

@adraffy adraffy commented May 29, 2026

Copy link
Copy Markdown
Collaborator
  • updated OPFaultGameFinder
    • try IDisputeGame.l2SequenceNumber() before l2BlockNumber()
    • changed _isUnchallenged() to react to gameType
    • added IAggregateVerifier interface
    • added OPFaultParamTuple type
  • changed default RPCs to dRPC instead of Ankr

Unfortunately, this parent game check is O(n^2) if any parent was successfully challenged:

function _isUnchallenged(...) {
    if (gameType == GAME_TYPE_AGGREGATE_VERIFIER) {
        for (;;) {
            uint256 status = gameProxy.status();
            if (status == GAME_STATUS_DEFENDER_WINS) {
                return true;
            } else if (status == GAME_STATUS_CHALLENGER_WINS) {
                return false;
            }
            address parent = IAggregateVerifier(address(gameProxy)).parentAddress();
            if (parent == address(0)) {
                return false;
            } else if (parent == address(params.asr)) {
                return true;
            }
            gameProxy = IDisputeGame(parent);
        }

@adraffy adraffy changed the title Fix: Update OPFaultGameFinder to support game type 621 Fix: Update OPFaultGameFinder to support Base Azul (game type 621) May 30, 2026
}
gameProxy = IDisputeGame(parent);
}
} else if (gameType == GAME_TYPE_SUCCINCT) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For GAME_TYPE_SUCCINCT, if claimData() reverts or the return data cannot be decoded (undisclosed code change in update for example), this silently falls through to the generic fault-game checks, which would still likely fall through to the false return at the end of the block, BUT out of an abundance of caution/for clarity i think it'd be worth explicitly returning false within the catch block OR better explicitly having and else block for the default and then having the default return outside of the condition gate.

@clowestab

Copy link
Copy Markdown
Collaborator

This keeps this generic with the game type check but I suspect that over time OP and Base will diverge further with their codebases so semantically clearer file names and separations might be necessary.|

Full support for 621 i think is implicit, as ultimately the challenge state check is what is required regardless of the proving mechanism through which it is set.

Added one actionable comment, but otherwise looks good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants