Fault Proof Framework

May 17, 2023
Open
Open
Draft Project
  • Links

What is a Draft Project Idea?

A Draft Project Idea is a concept for a project within the Optimism ecosystem that is generally considered valuable but has not yet been fleshed out into a clearly defined product. Draft Project Ideas may be converted into Ecosystem Project Ideas as they are explored further and more thoroughly specified.

Summary

A fault proof is a mechanism that proves that a given program with some agreed-upon starting state and agreed-upon inputs did not generate some proposed output. Combined with an optimistic output proposal mechanism, fault proofs are an effective way of scaling the computational abilities of a smart contract by limiting onchain interactions to only the case where a proposed output is invalid.

Several different fault proof systems exist already and more will be developed as time goes on. In general, the overall structure of a fault proving system tends to be identical except for specific areas. We believe that these key areas can be abstracted away into modules in a larger fault proving framework that would make it possible to reuse code from across the ecosystem and reduce the amount of duplicated work.

A basic model for a framework like this would contain the following components:

  • A "program" that consists of compiled bytecode for some machine architecture
  • A "program executor" that executes a program bytecode for a given machine architecture with some given state and generates an execution trace in some standardized format (follows a standard interface)
  • A "dispute game" that resolves disputes over any arbitrary array (OP Labs is already working on this)
  • A "smart contract opcode executor" that can execute any single opcode within the specified machine architecture onchain (follows a standard interface)

Fault proof developers then only need to implement the "program executor" and the "smart contract opcode executor" for any given machine architecture while the rest of the logic is handled by the framework. For example, it should be easy to slot in a MIPS fault proof or a RISC-V fault proof within this system without having to re-implement everything.

Impact

A fault proof framework would have a significant impact because:

  • It would allow developers to more easily build proofs for new machine architectures
  • It would allow projects to take advantage of client diversity by targeting different architectures
  • More Information
  • Tag 1
    Chain Infra
  • Tag2
  • Tag3