Skip to main content

Β· 5 min read

We have updated our translation and functional specification of Revm, a Rust implementation of the Ethereum Virtual Machine (EVM), to Revm v102. We use our tool rocq-of-rust to translate the Rust code to the Rocq theorem prover, where we write purely functional specifications and prove them equivalent to the translated code.

This upgrade introduced a large change in the generated Rocq code and in the interfaces used by the EVM instructions. The first translation did not compile in Rocq. We repaired the link and simulation layers one instruction family at a time and updated the tests and continuous integration pipeline to the new Revm architecture.

Β· 7 min read

For the Revm revision in our February report, we completed equivalence proofs for 94% of the EVM instruction functions in scope. We used rocq-of-rust to translate the Rust instruction bodies and proved that the covered translations agree with their functional specifications in Rocq. The no-panic results assume the specifications of the dependencies they call. The work produced about 50,000 lines of Rocq. Read the full report.

Β· 3 min read

In this post, we propose a general overview of what formal verification is by decomposing it into two main steps:

  • Translation of the source code to a formal language;
  • Verification of the formal specification in the formal language.

We will cover the main techniques used at each step, knowing that in most cases it is possible to combine the approaches.

Β· 9 min read

In this blog post, we show how we state the functional correctness of the implementation of the STATICCALL instruction in Revm, an implementation of the Ethereum's virtual machine EVM in Rust. This involves running rocq-of-rust to translate the Rust code to the theorem prover Rocq, and then making a proof by refinements until obtaining a specification of the code written in purely functional style, optimized for formal verification. Under the hypotheses of the equivalence lemma, including its assumptions about called operations, the translated instruction body cannot panic.

Β· 9 min read

In this blog post, we present our work to formally verify the determinism of the Keccak precompile ZK circuits in Plonky3 using our πŸ€Β Garden framework.

For the Plonky3 constraints we modeled, the output lanes are determined by the input and agree with a boolean specification of Keccak. The report gives the assumptions about the rows and round transitions. Completeness and the Rust witness generator are outside this result.

Β· 6 min read

Many zkVMs are implemented in Rust, using the Plonky3 library to describe their circuits. While Rust is efficient and expressive for describing complex circuits, it is a complex language when it comes to formal verification. We present here a way to pretty-print the list of constraints generated by a Plonky3 program. That way, we will be able to import the constraints in a formal verification system like Rocq to make sure they are safe and correct.

Β· 9 min read

In this blog post, we present the formal verification of the determinism of the BranchEq circuit of the OpenVM zkVM. This zkVM provides an implementation of RISC-V with Plonky3, and appears to be very fast even on a CPU.

We do our verification work using the formal verification system Rocq, showing the determinism on a model of the code. To see the other properties that can be verified, you can refer to our previous blog post πŸ“š What to verify in a zkVM. We will see later how to make sure that the Rocq model corresponds to the actual Rust implementation of the circuit.

Β· 6 min read

We describe three properties of the constraints of a zkVM circuit: determinism, functional correctness, and completeness.

The formal verification of zero-knowledge applications is considered a priority by Vitalik Buterin, the founder of Ethereum, among others. The website ethproofs.org lists zkVMs ready to run Ethereum, with formal verification of the code being one of the criteria to appear as 🟩 green.