While the game is in progress: Designing a modular controversial game for OP Stack's fault proof system

Advanced12/17/2023, 6:15:24 PM
This paper analyzes the role of dispute games in decentralized fault detection in the superchain ecosystem, and discusses the construction and potential of error-proof dispute games. This article also examines the importance of these games in error detection in OP Stack's first error-proofing system.

An in-depth look at the controversial game and its role in fault detection in the OP Stack's first error-proofing system.

It's no coincidence that one of the most interesting components of OP Stack's Fault Proof System (FPS) is its controversial game. The previous article on FPS outlined how the modularity of the OP stack decouples the fault proof program (FPP) from the proof of fault virtual machine (FPVM), enabling the next level of composability and efficient parallel upgrades of the two components. It is no exaggeration to say that this is also the case with controversial games.

This article explores the role of dispute games in decentralized fault detection in the superchain ecosystem, how to build error-proof dispute games on top of dispute agreements, and the possibility of such games emerging due to the scalability of dispute agreements.

If you want more details about the controversial game, read this more detailed post I shared on my personal blog a few weeks ago.

What is a dispute game?

Dispute games are the core fundamentals of dispute agreements. It simulates a simple state machine, and for any piece of information whose validity is disputed, it is initialized with a 32 byte promise. This information contains a function to resolve the truth or falsehood of this promise, which is left to the implementation of the primitive to define. OP Stack's first controversial game implementation, FaultDefenteGame, was not licensed because its resolution function was determined by the results of an error-proof program executed on top of a simulated virtual machine.

Searches Games Curious on Two Strings Properties:

The game of controversy itself relies on two basic attributes:

  1. Incentivize compatibility: The system punishes false claims and rewards true claims to ensure fair participation.
  2. Solution: Every game has a mechanism to explicitly validate or invalidate root claims.

In dispute agreements, different types of dispute games can be created, managed, and upgraded through DisputeGameFactory. This opens the door to innovative features such as aggregated proof systems and extended protocols to accommodate contentious matters outside of layer 2 protocol status, such as FaultDefenteGame, which targets on-chain binary verification.

Two point game

It's a genre-specific dispute game, and the first to be built on the OP Stack dispute agreement. In this game, the player divides the execution trajectory back and forth until each step is reached. After the dichotomy achieved a promise of state on each tracking instruction, FaultDefenteGame uses a generic virtual machine to execute a single instruction step on the chain. The VM's state transition function (let's call it T ) can be any function, as long as it follows the form T (s, i) - > s', where s = the agreed pre-state, i = state transition input, s = post-state .

For our first full implementation of a generic VM in a game of two, we implemented a single MIPS thread context on top of EVM to execute a single instruction in the execution trace generated by Cannon and op-program.

statements

A statement indicates a commitment to the state of the backend virtual machine under a given instruction. These may be real or fake, and the authenticity is determined after the resolution phase. If there is no counterattack, the statement is considered correct. ,

Location

Declares the position that exists in the binary tree. This position indicates which instruction the statement relates to. Position is a generalized index, which can be defined as 2^ {depth} + index_at_depth.

chess clock

The player's actions are limited in time. This game requires no license and anyone can join. Each side starts with 3.5 days of play, for a total of 7 days of play time. If you create a new path or make a statement where you've already received a statement, it's a step-grandfather-level chess clock.

action

Players are split in two until the state of the statement is for only one VM instruction. They then execute that instruction on-chain to verify or falsify the statement. Actions can be attack (challenge the parent statement) or defense (agree with the parent statement). Whenever players agree with the hash of statements they have observed (meaning that both parties are in the same state under a given command) but disagree with the final outcome they are trying to drive based on the relative agreement of the observed statement, the underlying statement is used to defend.

Command steps

At the leaf node of the location tree, each statement submits the status at only one VM instruction. The only step left is to execute VM instructions to prove or counter the parent claim.

If the command step confirms the expected post-state, then the statement does not hold. If there is an unexpected release status or exit code, the parent claim will be countered.

solutions

This kind of game is likely to be solved after all the stated chess clocks have been exhausted, with a minimum period of 3.5 days. Every statement in the game is the root of its own sub-game (Sub Game). The subgame is a DAG with a depth of 1. All subgames pointing to the root (which themselves are subgame roots) are its counters, and the subgame can only be solved if all of its child subgames have also been resolved. The subgame root can only be considered counterattacked if one or more of the subgame root's subgames are resolved and not countered, and this attribute continues to permeate the game's root statement.

The presence of honest players (as soon as all of their actions have been exhausted) also always causes the game to resolve smoothly in its trajectory view, regardless of whether the underlying statement is honest or dishonest. A dishonest statement can always be countered by any party, although there is always only one correct statement that can be made, since repeated declaration hashes in the same place in the same subgame are not allowed.

0:00

Play the two-point alphabet game

For anyone interested, there's also a visualization tool for FaultDefenteGame, which targets simulated execution tracking with only 16 instructions in length. This simulation uses a separate VM with a different context from the MIPS thread, called AlphabetVM, which only returns the next letter in the alphabet when a given letter is given as input.

If you're interested in exploring the rules of the game with a more lightweight backend, here's how to play:

Clone the Optimism monorepo, install dependencies, and create the devnet distribution /cannon/op-program binaries.

Required dependencies:

  1. Foundry
  2. Golang toolchain
  3. Docker
git clone git@github.com: ethereum-optimism/optimism.git & &\\
 cd optimism & &\\
 pnpm i & &\\
 (cd packages/contracts-bedrock & & forge install) & &\\
 Make up cannon-prestate & &\\
 Make up devnet-allocs

Run the alphabet game:

CD OP-CHALLENCHER & & MAKE ALPHABET
  1. Navigate to https://disputify.optimism.io/ or via clone https://github.com/clabby/dispute-viz Run the visual front-end locally and enter the address of the FaultDefenteGame agent deployed to the local development network above.

Disputed agreements to help protect OP Stack

In a game of two, all of the above mechanisms work together to create a system that rewards honest behavior and effectively counteracts dishonest claims.

There are so many ways to build contentious games that achieve the same goals. We hope that when OP Stack's FPS is deployed on OP Goerli, builders in our ecosystem will have fun and be creative in building their own controversial games. Every controversy game created can play a role in the social decentralization of OP Stack and provide ecosystem participants with options on how to resolve disputes over any given statement about a certain piece of information.

Statement:

  1. This article has been reprinted from [ oplabs ], and the copyright belongs to the original author [ clabby ]. If you have any objections to the reprint, please contact the Gate Learn team (gatelearn@gate.io), and the team will deal with it as soon as possible according to the relevant procedures.
  2. Disclaimer: The views and opinions expressed in this article only represent the author's personal opinions and do not constitute any investment advice.
  3. Articles in other languages are translated by the Gate Learn team, and translated articles may not be copied, distributed, or copied without mentioning Gate.io.

While the game is in progress: Designing a modular controversial game for OP Stack's fault proof system

Advanced12/17/2023, 6:15:24 PM
This paper analyzes the role of dispute games in decentralized fault detection in the superchain ecosystem, and discusses the construction and potential of error-proof dispute games. This article also examines the importance of these games in error detection in OP Stack's first error-proofing system.

An in-depth look at the controversial game and its role in fault detection in the OP Stack's first error-proofing system.

It's no coincidence that one of the most interesting components of OP Stack's Fault Proof System (FPS) is its controversial game. The previous article on FPS outlined how the modularity of the OP stack decouples the fault proof program (FPP) from the proof of fault virtual machine (FPVM), enabling the next level of composability and efficient parallel upgrades of the two components. It is no exaggeration to say that this is also the case with controversial games.

This article explores the role of dispute games in decentralized fault detection in the superchain ecosystem, how to build error-proof dispute games on top of dispute agreements, and the possibility of such games emerging due to the scalability of dispute agreements.

If you want more details about the controversial game, read this more detailed post I shared on my personal blog a few weeks ago.

What is a dispute game?

Dispute games are the core fundamentals of dispute agreements. It simulates a simple state machine, and for any piece of information whose validity is disputed, it is initialized with a 32 byte promise. This information contains a function to resolve the truth or falsehood of this promise, which is left to the implementation of the primitive to define. OP Stack's first controversial game implementation, FaultDefenteGame, was not licensed because its resolution function was determined by the results of an error-proof program executed on top of a simulated virtual machine.

Searches Games Curious on Two Strings Properties:

The game of controversy itself relies on two basic attributes:

  1. Incentivize compatibility: The system punishes false claims and rewards true claims to ensure fair participation.
  2. Solution: Every game has a mechanism to explicitly validate or invalidate root claims.

In dispute agreements, different types of dispute games can be created, managed, and upgraded through DisputeGameFactory. This opens the door to innovative features such as aggregated proof systems and extended protocols to accommodate contentious matters outside of layer 2 protocol status, such as FaultDefenteGame, which targets on-chain binary verification.

Two point game

It's a genre-specific dispute game, and the first to be built on the OP Stack dispute agreement. In this game, the player divides the execution trajectory back and forth until each step is reached. After the dichotomy achieved a promise of state on each tracking instruction, FaultDefenteGame uses a generic virtual machine to execute a single instruction step on the chain. The VM's state transition function (let's call it T ) can be any function, as long as it follows the form T (s, i) - > s', where s = the agreed pre-state, i = state transition input, s = post-state .

For our first full implementation of a generic VM in a game of two, we implemented a single MIPS thread context on top of EVM to execute a single instruction in the execution trace generated by Cannon and op-program.

statements

A statement indicates a commitment to the state of the backend virtual machine under a given instruction. These may be real or fake, and the authenticity is determined after the resolution phase. If there is no counterattack, the statement is considered correct. ,

Location

Declares the position that exists in the binary tree. This position indicates which instruction the statement relates to. Position is a generalized index, which can be defined as 2^ {depth} + index_at_depth.

chess clock

The player's actions are limited in time. This game requires no license and anyone can join. Each side starts with 3.5 days of play, for a total of 7 days of play time. If you create a new path or make a statement where you've already received a statement, it's a step-grandfather-level chess clock.

action

Players are split in two until the state of the statement is for only one VM instruction. They then execute that instruction on-chain to verify or falsify the statement. Actions can be attack (challenge the parent statement) or defense (agree with the parent statement). Whenever players agree with the hash of statements they have observed (meaning that both parties are in the same state under a given command) but disagree with the final outcome they are trying to drive based on the relative agreement of the observed statement, the underlying statement is used to defend.

Command steps

At the leaf node of the location tree, each statement submits the status at only one VM instruction. The only step left is to execute VM instructions to prove or counter the parent claim.

If the command step confirms the expected post-state, then the statement does not hold. If there is an unexpected release status or exit code, the parent claim will be countered.

solutions

This kind of game is likely to be solved after all the stated chess clocks have been exhausted, with a minimum period of 3.5 days. Every statement in the game is the root of its own sub-game (Sub Game). The subgame is a DAG with a depth of 1. All subgames pointing to the root (which themselves are subgame roots) are its counters, and the subgame can only be solved if all of its child subgames have also been resolved. The subgame root can only be considered counterattacked if one or more of the subgame root's subgames are resolved and not countered, and this attribute continues to permeate the game's root statement.

The presence of honest players (as soon as all of their actions have been exhausted) also always causes the game to resolve smoothly in its trajectory view, regardless of whether the underlying statement is honest or dishonest. A dishonest statement can always be countered by any party, although there is always only one correct statement that can be made, since repeated declaration hashes in the same place in the same subgame are not allowed.

0:00

Play the two-point alphabet game

For anyone interested, there's also a visualization tool for FaultDefenteGame, which targets simulated execution tracking with only 16 instructions in length. This simulation uses a separate VM with a different context from the MIPS thread, called AlphabetVM, which only returns the next letter in the alphabet when a given letter is given as input.

If you're interested in exploring the rules of the game with a more lightweight backend, here's how to play:

Clone the Optimism monorepo, install dependencies, and create the devnet distribution /cannon/op-program binaries.

Required dependencies:

  1. Foundry
  2. Golang toolchain
  3. Docker
git clone git@github.com: ethereum-optimism/optimism.git & &\\
 cd optimism & &\\
 pnpm i & &\\
 (cd packages/contracts-bedrock & & forge install) & &\\
 Make up cannon-prestate & &\\
 Make up devnet-allocs

Run the alphabet game:

CD OP-CHALLENCHER & & MAKE ALPHABET
  1. Navigate to https://disputify.optimism.io/ or via clone https://github.com/clabby/dispute-viz Run the visual front-end locally and enter the address of the FaultDefenteGame agent deployed to the local development network above.

Disputed agreements to help protect OP Stack

In a game of two, all of the above mechanisms work together to create a system that rewards honest behavior and effectively counteracts dishonest claims.

There are so many ways to build contentious games that achieve the same goals. We hope that when OP Stack's FPS is deployed on OP Goerli, builders in our ecosystem will have fun and be creative in building their own controversial games. Every controversy game created can play a role in the social decentralization of OP Stack and provide ecosystem participants with options on how to resolve disputes over any given statement about a certain piece of information.

Statement:

  1. This article has been reprinted from [ oplabs ], and the copyright belongs to the original author [ clabby ]. If you have any objections to the reprint, please contact the Gate Learn team (gatelearn@gate.io), and the team will deal with it as soon as possible according to the relevant procedures.
  2. Disclaimer: The views and opinions expressed in this article only represent the author's personal opinions and do not constitute any investment advice.
  3. Articles in other languages are translated by the Gate Learn team, and translated articles may not be copied, distributed, or copied without mentioning Gate.io.
Start Now
Sign up and get a
$100
Voucher!