GithubHelp home page GithubHelp logo

axiom-eth's Introduction

Axiom ZK Circuits

This repository builds on halo2-lib and snark-verifier to create a library of zero-knowledge proof circuits that Axiom uses to read data from the Ethereum virtual machine (EVM).

This monorepo consists of multiple crates:

axiom-eth

This is the main library of chips and frameworks for building ZK circuits that prove data from the Ethereum virtual machine (EVM). For more details, see the README.

axiom-core

This contains the ZK circuits that generate proofs for the AxiomV2Core smart contract. These circuits read the RLP encoded block headers for a chain of blocks and verify that the block headers form a chain. They output a Merkle Mountain Range of the block hashes of the chain. This crate also contains aggregation circuits to aggregate multiple circuits for the purpose of proving longer chains. For more details, see the README.

axiom-query

This contains the ZK circuits that generate proofs for the AxiomV2Query smart contract. For more details, see the README.

axiom-codec

This crate does not contain any ZK circuits, but it contains Rust types for Axiom queries and specifies how to encode/decode them to field elements for in-circuit use.

axiom-eth's People

Contributors

adventureseeker987 avatar jonathanpwang avatar miles-six avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

axiom-eth's Issues

rlc_test failed when using the rlcCircuitBuilder

When I tried to run the following command in axiom-eth: community version I got an error, does anybody know why?

Here is the command line for reproduction: (in community-edition branch)

cargo test --package axiom-eth --lib -- rlp::tests::rlc::test_rlc --exact --nocapture

The error is following:

telegram-cloud-photo-size-5-6122711958076636998-y

Build errors

To build this repo it uses an old rust-toolchain https://github.com/axiom-crypto/axiom-eth/blob/main/rust-toolchain#L1 'nightly-2022-10-28', so when you run cargo build it gives errors for some dependencies since it's using rustc 1.66 but the dependencies require 1.70.

so the following worked for me (instead of running cargo update). just choosing dependencies like an older version of clap that didn't require 1.70 shown here https://crates.io/crates/clap/versions

cargo update -p [email protected] --precise 1.0.2
cargo update -p [email protected] --precise 4.3.24
cargo update -p [email protected] --precise 0.5.0
cargo build --verbose
cargo run --bin header_chain --release -- --help

StorageCircuit - Error when key doesn't exist

While generating storage proof for a non-existent account at a particular block height or on a non-existent/null storage slot on an account, the verification fails:

End:     Create proof ..............................................................69.599s
thread '<unnamed>' panicked at 'assertion failed: {\n
    let mut transcript_read =\n
        PoseidonTranscript::<NativeLoader,\n
                &[u8]>::from_spec(&proof[..], POSEIDON_SPEC.clone());\n
    VerificationStrategy::<_,\n
            V>::finalize(verify_proof::<_, V, _, _,\n
                    _>(params.verifier_params(), pk.get_vk(),\n
                AccumulatorStrategy::new(params.verifier_params()),\n
                &[instances.as_slice()], &mut transcript_read).unwrap())\n
}', /Users/sohamzemse/Workspace/cloned-repos/axiom-snark-verifier/snark-verifier-sdk/src/halo2.rs:125:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Expected behavior: it should still generate proof for the non-existent slots since they would have an implied value of 0.

During the header_chain test, generate a yul file and prompt No such file or directory.

After I clone the latest axiom-eth, I will test the header_chain circuit according to the file guidelines in./axiom-eth/axiom-eth/bin.
I executed the following command
cargo run --bin header_chain --release -- --start 0 --end 1023 --max-depth 10 --initial-depth 7 --final evm --extra-rounds 1 --calldata --create-contract
2023-06-25 16 37 16
During the test, everything was normal at first, but I encountered an error in the middle, indicating that the file does not exist. (My understanding is that what is passed in here is the path where yul needs to be created, so whether the yul file exists does not affect)
2023-06-25 16 44 53

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.