Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

A collection of all the tests of the EVM official test suite, with Shanghai version, in serialized inputs to be fed to the plonky2 zkEVM.

License

Notifications You must be signed in to change notification settings

topos-protocol/evm-tests-suite-parsed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 

Repository files navigation

evm-tests-suite-parsed

A collection of all the tests of the Ethereum official test suite, with Shanghai Hard Fork consensus rules, in serialized form to be fed to the plonky2 zkEVM.

The JSON files consist in the GenerationInputs objets that are passed to the plonky2 zkEVM prover to generate proofs of Ethereum state transition.

It is currently supporting plonky2 commit revision bfcfcdb498d253ff33121dba03a130be89fcc96c and onwards.

Usage

These serialized test files can be read as such:

    let bytes = std::fs::read("serialized_test_file.json").unwrap();
    let inputs: GenerationInputs = serde_json::from_slice(&bytes).unwrap();

The deserialized GenerationInputs can be fed to the prover to test its correctness, as follows:

type F = plonky2::field::goldilocks_field::GoldilocksField;
const D: usize = 2;
type C = plonky2::plonk::config::KeccakGoldilocksConfig;

fn main() -> anyhow::Result<()> {
    // Set the proving configuration.
    let all_stark = AllStark::<F, D>::default();
    let config = StarkConfig::standard_fast_config();

    // Deserialize the test file.
    let bytes = std::fs::read("serialized_test_file.json").unwrap();
    let inputs: GenerationInputs = serde_json::from_slice(&bytes).unwrap();

    // Generate the proof for the deserialized inputs and verify it.
    let mut timing = TimingTree::new("prove", log::Level::Debug);
    let proof = prove::<F, C, D>(&all_stark, &config, inputs, &mut timing)?;
    verify_proof(&all_stark, proof, &config)
}

License

This repository is licensed under the terms of the MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT).

About

A collection of all the tests of the EVM official test suite, with Shanghai version, in serialized inputs to be fed to the plonky2 zkEVM.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published