/cannon

On chain interactive fault prover for Ethereum

Primary LanguageSolidityMIT LicenseMIT

cannon


Cannon (cannon cannon cannon) is an onchain MIPS instruction emulator. Cannon supports EVM-equivalent fault proofs by enabling Geth to run onchain, one instruction at a time, as part of an interactive dispute game.

  • It's Go code
  • ...that runs an EVM
  • ...emulating a MIPS machine
  • ...running compiled Go code
  • ...that runs an EVM

For more information, see Docs.

Directory Layout

contracts -- A MIPS emulator implementation, using merkleized state and a pre-image oracle.
example   -- Example programs that can be run and proven with Cannon.
extra     -- Extra scripts and legacy contracts, deprecated.
mipsevm   -- Go tooling to test the onchain MIPS implementation, and generate proof data.
diffmips  -- MIPS diff testing, to ensure correctness of the main Cannon implementation, with isolated dependencies. 

Building

contracts

The contracts are compiled with forge.

make contracts

License

MIT, see LICENSE file.

Note: This code is unaudited. In NO WAY should it be used to secure any monetary value before testing and auditing. This is experimental software, and should be treated as such. The authors of this project make no guarantees of security of ANY KIND.