Skip to content

Conversation

@ZakAyesh
Copy link
Contributor

This PR adds the task to add the game type 0 (Permissionless) to Soneium Mainnet

@ZakAyesh ZakAyesh requested a review from Wazabie October 30, 2025 00:36
@ZakAyesh ZakAyesh requested review from a team as code owners October 30, 2025 00:36
@ZakAyesh ZakAyesh requested a review from mslipper October 30, 2025 00:36
Comment on lines +32 to +37
## Task Calldata

Calldata:
```
0x82ad56cb0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000003bb6437aba031afbf9cb3538fa064161e2bf2d780000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000002441661a2e900000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001a00000000000000000000000004ca9608fef202216bc21d543798ec854539baad3000000000000000000000000ff9d236641962cebf9dbfb54e7b8e91f99f10db0000000000000000000000000b39c1730dff54f25f9e45667c119e0a8fee7315600000000000000000000000000000000000000000000000000000000000000000339db503776757491b9f3038bf6f1d37b7988a2f75e823fe2656c1352ef2f910000000000000000000000000000000000000000000000000000000000000049000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000002a300000000000000000000000000000000000000000000000000000000000049d40000000000000000000000000000000000000000000000000011c37937e08000000000000000000000000000007babe08ee4d07dba236530183b24055535a7011000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000147468697320697320612073616c74206d6978657200000000000000000000000000000000000000000000000000000000000000000000000000000000
```
Copy link
Contributor

Choose a reason for hiding this comment

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

The validation documentation is incomplete and lacks sufficient verification steps to make the task safer. The document only provides raw calldata without explaining how to decode and verify the specific parameters being set (like dispute game type, prestate, game depth, etc.). For a safer task, the validation should include: 1) Step-by-step instructions on how to decode the calldata, 2) Expected values for each parameter being configured, 3) Instructions on how to verify the dispute game configuration matches the intended values, and 4) Post-execution verification steps to confirm the game type was added correctly. This would help signers properly validate what they are signing.

Suggested change
## Task Calldata
Calldata:
```
0x82ad56cb0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000003bb6437aba031afbf9cb3538fa064161e2bf2d780000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000002441661a2e900000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001a00000000000000000000000004ca9608fef202216bc21d543798ec854539baad3000000000000000000000000ff9d236641962cebf9dbfb54e7b8e91f99f10db0000000000000000000000000b39c1730dff54f25f9e45667c119e0a8fee7315600000000000000000000000000000000000000000000000000000000000000000339db503776757491b9f3038bf6f1d37b7988a2f75e823fe2656c1352ef2f910000000000000000000000000000000000000000000000000000000000000049000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000002a300000000000000000000000000000000000000000000000000000000000049d40000000000000000000000000000000000000000000000000011c37937e08000000000000000000000000000007babe08ee4d07dba236530183b24055535a7011000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000147468697320697320612073616c74206d6978657200000000000000000000000000000000000000000000000000000000000000000000000000000000
```
## Task Calldata
Calldata:

0x82ad56cb0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000003bb6437aba031afbf9cb3538fa064161e2bf2d780000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000002441661a2e900000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001a00000000000000000000000004ca9608fef202216bc21d543798ec854539baad3000000000000000000000000ff9d236641962cebf9dbfb54e7b8e91f99f10db0000000000000000000000000b39c1730dff54f25f9e45667c119e0a8fee7315600000000000000000000000000000000000000000000000000000000000000000339db503776757491b9f3038bf6f1d37b7988a2f75e823fe2656c1352ef2f910000000000000000000000000000000000000000000000000000000000000049000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000002a300000000000000000000000000000000000000000000000000000000000049d40000000000000000000000000000000000000000000000000011c37937e08000000000000000000000000000007babe08ee4d07dba236530183b24055535a7011000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000147468697320697320612073616c74206d6978657200000000000000000000000000000000000000000000000000000000000000000000000000000000


## Calldata Decoding and Validation

The calldata above is for the `setGameImplementation` function on the DisputeGameFactory contract. Here's how to decode and validate it:

### Function Signature
- First 4 bytes (`0x82ad56cb`) correspond to the function signature of `setGameImplementation(GameType,address,bool,bytes)`

### Parameters Breakdown
1. **Game Type**: `0x01` (corresponds to the Soneium game type)
2. **Implementation Address**: `0x3bb6437aba031afbf9cb3538fa064161e2bf2d78` (the address of the Soneium game implementation)
3. **Enabled**: `false` (the game type will be registered but not enabled initially)
4. **Initialization Data**: The remaining bytes contain the initialization parameters for the game type

### Initialization Data Decoding
The initialization data contains parameters for the Soneium game configuration:
- Game Proxy Address: `0x4ca9608fef202216bc21d543798ec854539baad3`
- VM Address: `0xff9d236641962cebf9dbfb54e7b8e91f99f10db0`
- Fault Detector Address: `0x0b39c1730dff54f25f9e45667c119e0a8fee7315`
- Prestate Hash: `0x39db503776757491b9f3038bf6f1d37b7988a2f75e823fe2656c1352ef2f910`
- Game Depth: `73` (0x49)
- L2 Block Number: `675` (0x2a3)
- L1 Block Number: `18900` (0x49d4)
- Bond Amount: `1.25 ETH` (0x11c37937e08000)
- VM Config Address: `0x07babe08ee4d07dba236530183b24055535a7011`
- Salt: "this is a salt mixer"

## Verification Steps

1. **Pre-execution Verification**:
   - Verify the implementation address (`0x3bb6437aba031afbf9cb3538fa064161e2bf2d78`) is the correct Soneium game implementation
   - Confirm the game type (`0x01`) is not already registered by calling `gameImpls(0x01)` on the DisputeGameFactory
   - Verify all addresses in the initialization data are valid and match expected contracts

2. **Post-execution Verification**:
   - Call `gameImpls(0x01)` on the DisputeGameFactory to confirm:
     - The implementation address is set correctly
     - The game type is registered but not enabled (as specified)
   - Create a test game instance and verify the initialization parameters are correctly applied

3. **Security Considerations**:
   - The game implementation should have been audited
   - The initialization parameters should match the expected configuration for Soneium games
   - The bond amount (1.25 ETH) is appropriate for this game type

Spotted by Graphite Agent (based on custom rule: Superchain Ops task/template review)

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

This is the OPCM address for Jovian

## Objective

This task adds the dispute game type 0 (Permissionless) to the Dispute Game Factory on Soneium Mainnet.
Copy link
Contributor

Choose a reason for hiding this comment

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

There appears to be a network inconsistency in the documentation. The PR title mentions "Soneium Testnet" while this line specifies "Soneium Mainnet" as the target network. This discrepancy should be resolved to ensure deployment occurs on the intended network. Please clarify whether this task is meant for Testnet or Mainnet and update both the PR title and documentation to match.

Suggested change
This task adds the dispute game type 0 (Permissionless) to the Dispute Game Factory on Soneium Mainnet.
This task adds the dispute game type 0 (Permissionless) to the Dispute Game Factory on Soneium Testnet.

Spotted by Graphite Agent

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

Comment on lines 14 to 22
disputeGameType = 0
disputeAbsolutePrestate = "0x0339db503776757491b9f3038bf6f1d37b7988a2f75e823fe2656c1352ef2f91" # Absolute Prestate 1.7.0-rc.3 https://github.com/ethereum-optimism/superchain-registry/blob/851f7bb60edc53373fc961d237c7175aa130fba3/validation/standard/standard-prestates.toml#L6
disputeMaxGameDepth = 73
disputeSplitDepth = 30
disputeClockExtension = 10800
disputeMaxClockDuration = 302400
initialBond = 80000000000000000
vm = "0x07babe08ee4d07dba236530183b24055535a7011"
permissioned = false
Copy link
Contributor

Choose a reason for hiding this comment

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

The dispute game configuration parameters lack validation comments or checks to ensure they are appropriate for the network. Critical parameters like disputeMaxGameDepth (73), disputeSplitDepth (30), disputeClockExtension (10800), disputeMaxClockDuration (302400), and initialBond (80000000000000000) are specified without any documentation of their rationale or validation that they match expected values for Soneium. To make this task more robust and safer, add comments explaining the source and rationale for these values, and include validation steps in the VALIDATION.md to verify these parameters are correct.

Spotted by Graphite Agent (based on custom rule: Superchain Ops task/template review)

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

@ZakAyesh ZakAyesh changed the title Soneium Testnet addGameType Permissionless Soneium Mainnet addGameType Permissionless Oct 30, 2025
@@ -0,0 +1,21 @@
# 032-soneium-add-game-type
Copy link
Contributor

Choose a reason for hiding this comment

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

The README title 032-soneium-add-game-type does not match the actual directory name 037-soneium-add-game-type. This inconsistency could cause confusion and errors when referencing or executing the task. Update the README title to match the correct task directory number.

Suggested change
# 032-soneium-add-game-type
# 037-soneium-add-game-type

Spotted by Graphite Agent (based on custom rule: Superchain Ops task/template review)

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

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