Skip to content

How is precompile logic disputed in Cannon? #211

Answered by clabby
PaulRBerg asked this question in Q&A
Discussion options

You must be logged in to vote

There are two different methods of executing precompiles in the fault proof program:

  1. Within the program itself, which is compiled to MIPS and runs on top of the MIPS thread context (MIPS.sol / cannon)
  2. Within the host, which is then sent back to the program through the PreimageOracle ABI.

Most precompiles (apart from the accelerated ones [ecrecover, bn256Pairing, KZG Point Evaluation]) run in an EVM within the fault proof program (method # 1 above). If any portion of EVM execution (or any fault proof program execution, for that matter) is spoofed, it is disputed as normal by bisecting to the first agreed-upon prestate and performing an instruction step on-chain within the dispute game.

T…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@tynes
Comment options

@PaulRBerg
Comment options

@clabby
Comment options

@PaulRBerg
Comment options

Answer selected by PaulRBerg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants