You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A [Python script](./scripts/play-op-challenger.py) is provided to facilitate listing games in progress and simulating a dishonest actor attacking the game up to maxGameDepth.
3
+
To see all available commands and options, run: `python3 ./scripts/play-op-challenger.py -h`
4
+
5
+
## Environment setup
6
+
- Install `cast` and `make op-challenger`
7
+
- Replace `OP_CHALLENGER`, `L1_RPC`, and `DISPUTE_GAME_FACTORY_PROXY` in `play-op-challenger.py` with your configurations or provide these options as command-line arguments (see help for details).
8
+
9
+
> In the following tutorials, `--l1-rpc`, `--fdg-addr`, and `--binpath` are optional if `OP_CHALLENGER`, `L1_RPC`, and `DISPUTE_GAME_FACTORY_PROXY` have been provided in the code.
This command differs from `op-challenger`'s default `list-games` command in that you can filter games by `--status` (see help for its meaning) and the absolute prestate is queried, allowing you to check if the game's absolute prestate matches the current implementation.
18
+
19
+
## 1v1 actor to attack a game to maxGameDepth
20
+
21
+
### Attacking a game with an honest root Claim
22
+
The following script simulates a dishonest actor attacking an existing game with random claims against every honest claim, itll wait any honest actor to respond to every attack using `op-challenger` after each attack, and repeat attacking until the specified maxGameDepth.
If the game reaches `maxGameDepth` (default is 73), a dishonest actor attempting to win would need to call the game contract's `step` function themselves. However, this call will always revert, assuming the game contract is functioning correctly and enforces the rules properly.
- Warning: Dishonest actors are attacking the game
54
+
- disagree_challenger_ahead (danger): The root claim of a game is dishonest, but the honest `op-challenger` hasn't responded to the dishonest claims for a while. This might cause an incorrect output root to be updated in the `AnchorStateRegistry`.
55
+
- agree_challenger_ahead: The root claim of a game is honest, but dishonest actors are challenging the game and the honest `op-challenger` hasn't responded to the dishonest actors for a while.
56
+
57
+
- Fatal: Dishonest actors have won the game
58
+
- disagree_defender_wins: The dishonest actors have won the game and the honest actors have forfeited their bonds. Besides, the dishonest root claims have been updated in the `AnchorStateRegistry`!
59
+
- agree_challenger_wins: The dishonest actors have won the game, and the honest actors have lost the game and forfeited their bonds.
0 commit comments