diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 0000000..dae20d2 --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,75 @@ +name: PR + +on: + push: + branches: [main] + pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + example: + name: Uniswap example + runs-on: + [ + runs-on, + cpu=64, + ram=256, + family=m7i+m7a, + hdd=80, + image=ubuntu22-full-x64, + spot=false, + "run-id=${{ github.run_id }}", + ] + env: + CARGO_NET_GIT_FETCH_WITH_CLI: "true" + steps: + - name: Checkout sources + uses: actions/checkout@v4 + + - name: "Install sp1up" + run: | + curl -L https://sp1.succinct.xyz | bash + echo "$HOME/.sp1/bin" >> $GITHUB_PATH + + - name: "Install SP1 toolchain" + run: | + sp1up + + - name: "Set up RPC env" + run: | + echo "ETH_RPC_URL=${{secrets.ETH_RPC_URL}}" >> $GITHUB_ENV + + - name: Run uniswap script + uses: actions-rs/cargo@v1 + with: + command: run + args: + --release --bin uniswap --ignore-rust-version + env: + RUSTFLAGS: -Copt-level=3 -Coverflow-checks=y -Cdebuginfo=0 -C target-cpu=native + RUST_BACKTRACE: full + RUST_LOG: info + + + test-e2e: + name: Test + runs-on: ["runs-on", "runner=32cpu-linux-x64", "run-id=${{ github.run_id }}"] + env: + CARGO_NET_GIT_FETCH_WITH_CLI: "true" + steps: + - name: "Checkout sources" + uses: actions/checkout@v4 + + - name: "Set up RPC env" + run: | + echo "ETH_RPC_URL=${{secrets.ETH_RPC_URL}}" >> $GITHUB_ENV + + - name: "Run integration test" + run: | + SP1_DEV=1 RUST_LOG=info cargo test -p sp1-cc-host-executor --release -- --nocapture + + + + diff --git a/Cargo.lock b/Cargo.lock index 5a9f55c..c00bd88 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -602,9 +602,9 @@ dependencies = [ [[package]] name = "alloy-trie" -version = "0.5.1" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "398a977d774db13446b8cead8cfa9517aebf9e03fc8a1512892dc1e03e70bb04" +checksum = "0a46c9c4fdccda7982e7928904bd85fe235a0404ee3d7e197fff13d61eac8b4f" dependencies = [ "alloy-primitives 0.8.3", "alloy-rlp", @@ -691,9 +691,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.88" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e1496f8fb1fbf272686b8d37f523dab3e4a7443300055e74cdaa449f3114356" +checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" [[package]] name = "ark-ff" @@ -821,9 +821,9 @@ dependencies = [ [[package]] name = "arrayref" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d151e35f61089500b617991b791fc8bfd237ae50cd5950803758a179b41e67a" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" [[package]] name = "arrayvec" @@ -1250,9 +1250,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.18" +version = "1.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62ac837cdb5cb22e10a256099b4fc502b1dfe560cb282963a974d7abd80e476" +checksum = "45bcde016d64c21da4be18b655631e5ab6d3107607e71a73a9f53eb48aae23fb" dependencies = [ "jobserver", "libc", @@ -2932,9 +2932,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.60" +version = "0.1.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -3402,8 +3402,8 @@ dependencies = [ "rsp-rpc-db", "sp1-cc-client-executor", "sp1-cc-host-executor", - "sp1-helper", - "sp1-sdk", + "sp1-helper 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp1-sdk 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio", "url", ] @@ -3681,9 +3681,9 @@ checksum = "e296cf87e61c9cfc1a61c3c63a0f7f286ed4554e0e22be84e8a38e1d264a2a29" [[package]] name = "op-alloy-consensus" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a0004dfb630414d0dbed58b61a943740ae829def89f261cbd0d91d920c21bba" +checksum = "3ef361231f72bea90365e441bd97d9c8fd3875603f18bbcad0e04874c6158e53" dependencies = [ "alloy-consensus", "alloy-eips", @@ -3697,9 +3697,9 @@ dependencies = [ [[package]] name = "op-alloy-rpc-types" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "219dfbe7a20588f172ae9cfe2ec7e2804f71816f24355dc07fd9a1453c62f07f" +checksum = "e5a65da5f7591acba3d2304b25145ca9942ea90481213269aed9cb28add8e3ff" dependencies = [ "alloy-eips", "alloy-network", @@ -4363,7 +4363,7 @@ version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" dependencies = [ - "toml_edit 0.22.20", + "toml_edit 0.22.21", ] [[package]] @@ -6070,6 +6070,18 @@ dependencies = [ "dirs", ] +[[package]] +name = "sp1-build" +version = "2.0.0" +source = "git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test#826e67993294266f3c88f360a0aee52f3856326f" +dependencies = [ + "anyhow", + "cargo_metadata", + "chrono", + "clap", + "dirs", +] + [[package]] name = "sp1-cc-client-executor" version = "0.1.0" @@ -6160,10 +6172,47 @@ dependencies = [ "rrs-succinct", "serde", "serde_with", - "sp1-curves", - "sp1-derive", - "sp1-primitives", - "sp1-stark", + "sp1-curves 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp1-derive 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp1-primitives 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp1-stark 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "strum", + "strum_macros", + "thiserror", + "tiny-keccak", + "tracing", + "typenum", + "vec_map", +] + +[[package]] +name = "sp1-core-executor" +version = "2.0.0" +source = "git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test#826e67993294266f3c88f360a0aee52f3856326f" +dependencies = [ + "bincode", + "bytemuck", + "elf", + "enum-map", + "eyre", + "generic-array 1.1.0", + "hashbrown 0.14.5", + "hex", + "itertools 0.13.0", + "log", + "nohash-hasher", + "num", + "p3-field", + "p3-keccak-air", + "p3-maybe-rayon", + "rand", + "rrs-succinct", + "serde", + "serde_with", + "sp1-curves 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", + "sp1-derive 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", + "sp1-primitives 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", + "sp1-stark 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", "strum", "strum_macros", "thiserror", @@ -6222,11 +6271,76 @@ dependencies = [ "serde_with", "size", "snowbridge-amcl", - "sp1-core-executor", - "sp1-curves", - "sp1-derive", - "sp1-primitives", - "sp1-stark", + "sp1-core-executor 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp1-curves 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp1-derive 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp1-primitives 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp1-stark 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "static_assertions", + "strum", + "strum_macros", + "tempfile", + "thiserror", + "tracing", + "tracing-forest", + "tracing-subscriber", + "typenum", + "web-time", +] + +[[package]] +name = "sp1-core-machine" +version = "2.0.0" +source = "git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test#826e67993294266f3c88f360a0aee52f3856326f" +dependencies = [ + "anyhow", + "arrayref", + "bincode", + "blake3", + "bytemuck", + "cfg-if", + "curve25519-dalek", + "elf", + "elliptic-curve", + "generic-array 1.1.0", + "hashbrown 0.14.5", + "hex", + "itertools 0.13.0", + "k256", + "log", + "nohash-hasher", + "num", + "num-bigint 0.4.6", + "num_cpus", + "p3-air", + "p3-baby-bear", + "p3-blake3", + "p3-challenger", + "p3-commit", + "p3-dft", + "p3-field", + "p3-fri", + "p3-keccak", + "p3-keccak-air", + "p3-matrix", + "p3-maybe-rayon", + "p3-merkle-tree", + "p3-poseidon2", + "p3-symmetric", + "p3-uni-stark", + "p3-util", + "rand", + "rayon-scan", + "rrs-succinct", + "serde", + "serde_with", + "size", + "snowbridge-amcl", + "sp1-core-executor 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", + "sp1-curves 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", + "sp1-derive 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", + "sp1-primitives 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", + "sp1-stark 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", "static_assertions", "strum", "strum_macros", @@ -6251,9 +6365,29 @@ dependencies = [ "prost-types", "serde", "serde_json", - "sp1-core-machine", - "sp1-prover", - "sp1-stark", + "sp1-core-machine 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp1-prover 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp1-stark 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio", + "tracing", + "tracing-subscriber", + "twirp-rs", +] + +[[package]] +name = "sp1-cuda" +version = "2.0.0" +source = "git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test#826e67993294266f3c88f360a0aee52f3856326f" +dependencies = [ + "bincode", + "ctrlc", + "prost", + "prost-types", + "serde", + "serde_json", + "sp1-core-machine 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", + "sp1-prover 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", + "sp1-stark 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", "tokio", "tracing", "tracing-subscriber", @@ -6276,8 +6410,28 @@ dependencies = [ "p3-field", "serde", "snowbridge-amcl", - "sp1-primitives", - "sp1-stark", + "sp1-primitives 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp1-stark 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "typenum", +] + +[[package]] +name = "sp1-curves" +version = "2.0.0" +source = "git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test#826e67993294266f3c88f360a0aee52f3856326f" +dependencies = [ + "curve25519-dalek", + "dashu", + "elliptic-curve", + "generic-array 1.1.0", + "itertools 0.13.0", + "k256", + "num", + "p3-field", + "serde", + "snowbridge-amcl", + "sp1-primitives 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", + "sp1-stark 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", "typenum", ] @@ -6292,13 +6446,31 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "sp1-derive" +version = "2.0.0" +source = "git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test#826e67993294266f3c88f360a0aee52f3856326f" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "sp1-helper" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f08124c62d09764810783355cff518477e3f36c8e83343623859afeca6f3eeb" dependencies = [ - "sp1-build", + "sp1-build 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "sp1-helper" +version = "2.0.0" +source = "git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test#826e67993294266f3c88f360a0aee52f3856326f" +dependencies = [ + "sp1-build 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", ] [[package]] @@ -6329,6 +6501,19 @@ dependencies = [ "p3-symmetric", ] +[[package]] +name = "sp1-primitives" +version = "2.0.0" +source = "git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test#826e67993294266f3c88f360a0aee52f3856326f" +dependencies = [ + "itertools 0.13.0", + "lazy_static", + "p3-baby-bear", + "p3-field", + "p3-poseidon2", + "p3-symmetric", +] + [[package]] name = "sp1-prover" version = "2.0.0" @@ -6353,15 +6538,54 @@ dependencies = [ "serde", "serde_json", "serial_test", - "sp1-core-executor", - "sp1-core-machine", - "sp1-primitives", - "sp1-recursion-circuit", - "sp1-recursion-compiler", - "sp1-recursion-core", - "sp1-recursion-gnark-ffi", - "sp1-recursion-program", - "sp1-stark", + "sp1-core-executor 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp1-core-machine 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp1-primitives 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp1-recursion-circuit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp1-recursion-compiler 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp1-recursion-core 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp1-recursion-gnark-ffi 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp1-recursion-program 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp1-stark 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "subtle-encoding", + "tempfile", + "thiserror", + "tracing", + "tracing-subscriber", +] + +[[package]] +name = "sp1-prover" +version = "2.0.0" +source = "git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test#826e67993294266f3c88f360a0aee52f3856326f" +dependencies = [ + "anyhow", + "bincode", + "clap", + "dirs", + "hex", + "itertools 0.13.0", + "num-bigint 0.4.6", + "oneshot", + "p3-baby-bear", + "p3-bn254-fr", + "p3-challenger", + "p3-commit", + "p3-field", + "p3-matrix", + "rayon", + "serde", + "serde_json", + "serial_test", + "sp1-core-executor 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", + "sp1-core-machine 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", + "sp1-primitives 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", + "sp1-recursion-circuit 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", + "sp1-recursion-compiler 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", + "sp1-recursion-core 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", + "sp1-recursion-gnark-ffi 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", + "sp1-recursion-program 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", + "sp1-stark 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", "subtle-encoding", "tempfile", "thiserror", @@ -6386,12 +6610,36 @@ dependencies = [ "p3-matrix", "p3-util", "serde", - "sp1-core-machine", - "sp1-recursion-compiler", - "sp1-recursion-core", - "sp1-recursion-derive", - "sp1-recursion-program", - "sp1-stark", + "sp1-core-machine 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp1-recursion-compiler 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp1-recursion-core 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp1-recursion-derive 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp1-recursion-program 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp1-stark 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "sp1-recursion-circuit" +version = "2.0.0" +source = "git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test#826e67993294266f3c88f360a0aee52f3856326f" +dependencies = [ + "bincode", + "itertools 0.13.0", + "p3-air", + "p3-baby-bear", + "p3-bn254-fr", + "p3-commit", + "p3-field", + "p3-fri", + "p3-matrix", + "p3-util", + "serde", + "sp1-core-machine 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", + "sp1-recursion-compiler 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", + "sp1-recursion-core 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", + "sp1-recursion-derive 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", + "sp1-recursion-program 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", + "sp1-stark 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", ] [[package]] @@ -6414,12 +6662,41 @@ dependencies = [ "p3-util", "rayon", "serde", - "sp1-core-machine", - "sp1-primitives", - "sp1-recursion-core", - "sp1-recursion-core-v2", - "sp1-recursion-derive", - "sp1-stark", + "sp1-core-machine 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp1-primitives 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp1-recursion-core 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp1-recursion-core-v2 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp1-recursion-derive 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp1-stark 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tracing", + "vec_map", +] + +[[package]] +name = "sp1-recursion-compiler" +version = "2.0.0" +source = "git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test#826e67993294266f3c88f360a0aee52f3856326f" +dependencies = [ + "backtrace", + "itertools 0.13.0", + "p3-air", + "p3-baby-bear", + "p3-bn254-fr", + "p3-commit", + "p3-field", + "p3-fri", + "p3-matrix", + "p3-poseidon2", + "p3-symmetric", + "p3-util", + "rayon", + "serde", + "sp1-core-machine 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", + "sp1-primitives 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", + "sp1-recursion-core 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", + "sp1-recursion-core-v2 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", + "sp1-recursion-derive 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", + "sp1-stark 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", "tracing", "vec_map", ] @@ -6452,11 +6729,48 @@ dependencies = [ "p3-util", "serde", "serde_with", - "sp1-core-executor", - "sp1-core-machine", - "sp1-derive", - "sp1-primitives", - "sp1-stark", + "sp1-core-executor 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp1-core-machine 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp1-derive 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp1-primitives 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp1-stark 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "static_assertions", + "tracing", + "zkhash", +] + +[[package]] +name = "sp1-recursion-core" +version = "2.0.0" +source = "git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test#826e67993294266f3c88f360a0aee52f3856326f" +dependencies = [ + "arrayref", + "backtrace", + "ff 0.13.0", + "hashbrown 0.14.5", + "itertools 0.13.0", + "num_cpus", + "p3-air", + "p3-baby-bear", + "p3-bn254-fr", + "p3-challenger", + "p3-commit", + "p3-dft", + "p3-field", + "p3-fri", + "p3-matrix", + "p3-maybe-rayon", + "p3-merkle-tree", + "p3-poseidon2", + "p3-symmetric", + "p3-util", + "serde", + "serde_with", + "sp1-core-executor 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", + "sp1-core-machine 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", + "sp1-derive 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", + "sp1-primitives 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", + "sp1-stark 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", "static_assertions", "tracing", "zkhash", @@ -6490,12 +6804,52 @@ dependencies = [ "p3-util", "serde", "serde_with", - "sp1-core-executor", - "sp1-core-machine", - "sp1-derive", - "sp1-primitives", - "sp1-recursion-core", - "sp1-stark", + "sp1-core-executor 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp1-core-machine 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp1-derive 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp1-primitives 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp1-recursion-core 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp1-stark 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "static_assertions", + "thiserror", + "tracing", + "vec_map", + "zkhash", +] + +[[package]] +name = "sp1-recursion-core-v2" +version = "2.0.0" +source = "git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test#826e67993294266f3c88f360a0aee52f3856326f" +dependencies = [ + "arrayref", + "backtrace", + "ff 0.13.0", + "hashbrown 0.14.5", + "itertools 0.13.0", + "num_cpus", + "p3-air", + "p3-baby-bear", + "p3-bn254-fr", + "p3-challenger", + "p3-commit", + "p3-dft", + "p3-field", + "p3-fri", + "p3-matrix", + "p3-maybe-rayon", + "p3-merkle-tree", + "p3-poseidon2", + "p3-symmetric", + "p3-util", + "serde", + "serde_with", + "sp1-core-executor 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", + "sp1-core-machine 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", + "sp1-derive 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", + "sp1-primitives 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", + "sp1-recursion-core 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", + "sp1-stark 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", "static_assertions", "thiserror", "tracing", @@ -6514,6 +6868,16 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "sp1-recursion-derive" +version = "2.0.0" +source = "git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test#826e67993294266f3c88f360a0aee52f3856326f" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "sp1-recursion-gnark-ffi" version = "2.0.0" @@ -6535,9 +6899,35 @@ dependencies = [ "serde", "serde_json", "sha2", - "sp1-core-machine", - "sp1-recursion-compiler", - "sp1-stark", + "sp1-core-machine 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp1-recursion-compiler 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp1-stark 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tempfile", +] + +[[package]] +name = "sp1-recursion-gnark-ffi" +version = "2.0.0" +source = "git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test#826e67993294266f3c88f360a0aee52f3856326f" +dependencies = [ + "anyhow", + "bincode", + "bindgen", + "cc", + "cfg-if", + "hex", + "log", + "num-bigint 0.4.6", + "p3-baby-bear", + "p3-field", + "p3-symmetric", + "rand", + "serde", + "serde_json", + "sha2", + "sp1-core-machine 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", + "sp1-recursion-compiler 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", + "sp1-stark 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", "tempfile", ] @@ -6563,12 +6953,43 @@ dependencies = [ "p3-util", "rand", "serde", - "sp1-core-executor", - "sp1-core-machine", - "sp1-primitives", - "sp1-recursion-compiler", - "sp1-recursion-core", - "sp1-stark", + "sp1-core-executor 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp1-core-machine 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp1-primitives 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp1-recursion-compiler 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp1-recursion-core 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp1-stark 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "stacker", + "tracing", +] + +[[package]] +name = "sp1-recursion-program" +version = "2.0.0" +source = "git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test#826e67993294266f3c88f360a0aee52f3856326f" +dependencies = [ + "itertools 0.13.0", + "p3-air", + "p3-baby-bear", + "p3-challenger", + "p3-commit", + "p3-dft", + "p3-field", + "p3-fri", + "p3-matrix", + "p3-maybe-rayon", + "p3-merkle-tree", + "p3-poseidon2", + "p3-symmetric", + "p3-util", + "rand", + "serde", + "sp1-core-executor 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", + "sp1-core-machine 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", + "sp1-primitives 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", + "sp1-recursion-compiler 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", + "sp1-recursion-core 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", + "sp1-stark 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", "stacker", "tracing", ] @@ -6605,11 +7026,58 @@ dependencies = [ "serde", "serde_json", "sha2", - "sp1-core-executor", - "sp1-core-machine", - "sp1-cuda", - "sp1-prover", - "sp1-stark", + "sp1-core-executor 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp1-core-machine 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp1-cuda 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp1-prover 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp1-stark 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "strum", + "strum_macros", + "sysinfo", + "tempfile", + "thiserror", + "tokio", + "tracing", + "twirp-rs", + "vergen", +] + +[[package]] +name = "sp1-sdk" +version = "2.0.0" +source = "git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test#826e67993294266f3c88f360a0aee52f3856326f" +dependencies = [ + "alloy-sol-types 0.7.7", + "anyhow", + "async-trait", + "bincode", + "cfg-if", + "dirs", + "ethers", + "futures", + "getrandom", + "hashbrown 0.14.5", + "hex", + "indicatif", + "itertools 0.13.0", + "log", + "num-bigint 0.4.6", + "p3-baby-bear", + "p3-commit", + "p3-field", + "p3-fri", + "p3-matrix", + "prost", + "reqwest 0.12.7", + "reqwest-middleware", + "serde", + "serde_json", + "sha2", + "sp1-core-executor 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", + "sp1-core-machine 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", + "sp1-cuda 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", + "sp1-prover 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", + "sp1-stark 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", "strum", "strum_macros", "sysinfo", @@ -6647,8 +7115,39 @@ dependencies = [ "p3-util", "rayon-scan", "serde", - "sp1-derive", - "sp1-primitives", + "sp1-derive 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp1-primitives 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sysinfo", + "tracing", +] + +[[package]] +name = "sp1-stark" +version = "2.0.0" +source = "git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test#826e67993294266f3c88f360a0aee52f3856326f" +dependencies = [ + "arrayref", + "getrandom", + "hashbrown 0.14.5", + "itertools 0.13.0", + "p3-air", + "p3-baby-bear", + "p3-challenger", + "p3-commit", + "p3-dft", + "p3-field", + "p3-fri", + "p3-matrix", + "p3-maybe-rayon", + "p3-merkle-tree", + "p3-poseidon2", + "p3-symmetric", + "p3-uni-stark", + "p3-util", + "rayon-scan", + "serde", + "sp1-derive 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", + "sp1-primitives 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", "sysinfo", "tracing", ] @@ -7105,7 +7604,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.20", + "toml_edit 0.22.21", ] [[package]] @@ -7130,9 +7629,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.20" +version = "0.22.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" +checksum = "3b072cee73c449a636ffd6f32bd8de3a9f7119139aff882f44943ce2986dc5cf" dependencies = [ "indexmap 2.5.0", "serde", @@ -7341,9 +7840,9 @@ checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-normalization" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" dependencies = [ "tinyvec", ] @@ -7384,8 +7883,8 @@ dependencies = [ "serde_json", "sp1-cc-client-executor", "sp1-cc-host-executor", - "sp1-helper", - "sp1-sdk", + "sp1-helper 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", + "sp1-sdk 2.0.0 (git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test)", "tokio", "url", ] diff --git a/crates/host-executor/src/lib.rs b/crates/host-executor/src/lib.rs index 23b94f7..9d1607a 100644 --- a/crates/host-executor/src/lib.rs +++ b/crates/host-executor/src/lib.rs @@ -1,3 +1,6 @@ +#[cfg(test)] +mod test; + use std::collections::BTreeSet; use alloy_provider::{network::AnyNetwork, Provider}; diff --git a/crates/host-executor/src/test.rs b/crates/host-executor/src/test.rs new file mode 100644 index 0000000..9c678f9 --- /dev/null +++ b/crates/host-executor/src/test.rs @@ -0,0 +1,112 @@ +use alloy_primitives::{address, Address}; +use alloy_provider::ReqwestProvider; +use alloy_rpc_types::BlockNumberOrTag; +use alloy_sol_macro::sol; +use alloy_sol_types::SolCall; +use sp1_cc_client_executor::{ClientExecutor, ContractInput, ContractPublicValues}; +use url::Url; +use ERC20Basic::nameCall; +use IOracleHelper::getRatesCall; + +use crate::HostExecutor; + +sol! { + /// Simplified interface of the ERC20Basic interface. + interface ERC20Basic { + function name() public constant returns (string memory); + } +} + +sol! { + /// Interface to the multiplexer contract. It gets the exchange rates of many tokens, including + /// apxEth, ankrEth, and pufEth. + interface IOracleHelper { + function getRates(address[] memory collaterals) external view returns (uint256[] memory); + } +} + +/// Multiplexer collateral addresses +const COLLATERALS: [Address; 12] = [ + address!("E95A203B1a91a908F9B9CE46459d101078c2c3cb"), + address!("9Ba021B0a9b958B5E75cE9f6dff97C7eE52cb3E6"), + address!("Be9895146f7AF43049ca1c1AE358B0541Ea49704"), + address!("7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0"), + address!("A35b1B31Ce002FBF2058D22F30f95D405200A15b"), + address!("D9A442856C234a39a81a089C06451EBAa4306a72"), + address!("ae78736Cd615f374D3085123A210448E74Fc6393"), + address!("A1290d69c65A6Fe4DF752f95823fae25cB99e5A7"), + address!("ac3E018457B222d93114458476f3E3416Abbe38F"), + address!("9D39A5DE30e57443BfF2A8307A4256c8797A3497"), + address!("f951E335afb289353dc249e82926178EaC7DEd78"), + address!("Cd5fE23C85820F7B72D0926FC9b05b43E359b7ee"), +]; + +#[tokio::test(flavor = "multi_thread")] +async fn test_multiplexer() -> eyre::Result<()> { + let get_rates_call = getRatesCall { collaterals: COLLATERALS.to_vec() }; + + let contract_input = ContractInput { + contract_address: address!("0A8c00EcFA0816F4f09289ac52Fcb88eA5337526"), + caller_address: Address::default(), + calldata: get_rates_call, + }; + + let public_values = test_e2e(contract_input).await?; + + let rates = getRatesCall::abi_decode_returns(&public_values.contractOutput, true)?._0; + + println!("rates: {:?}", rates); + + Ok(()) +} + +/// This test goes to the Wrapped Ether contract, and gets the name of the token. +/// This should always be "Wrapped Ether". +#[tokio::test(flavor = "multi_thread")] +async fn test_wrapped_eth() -> eyre::Result<()> { + let name_call = nameCall {}; + let contract_input = ContractInput { + contract_address: address!("C02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"), + caller_address: Address::default(), + calldata: name_call, + }; + let public_values = test_e2e(contract_input).await?; + + let name = nameCall::abi_decode_returns(&public_values.contractOutput, true)?._0; + assert_eq!(name, String::from("Wrapped Ether")); + + Ok(()) +} + +/// Emulates the entire workflow of executing a smart contract call, without using SP1. +/// +/// First, executes the smart contract call with the given [`ContractInput`] in the host executor. +/// After getting the [`EVMStateSketch`] from the host executor, executes the same smart contract +/// call in the client executor. +async fn test_e2e( + contract_input: ContractInput, +) -> eyre::Result { + // Load environment variables. + dotenv::dotenv().ok(); + + // Which block transactions are executed on. + let block_number = BlockNumberOrTag::Latest; + + // Prepare the host executor. + // + // Use `RPC_URL` to get all of the necessary state for the smart contract call. + let rpc_url = std::env::var("ETH_RPC_URL").unwrap_or_else(|_| panic!("Missing RPC_URL")); + let provider = ReqwestProvider::new_http(Url::parse(&rpc_url)?); + let mut host_executor = HostExecutor::new(provider.clone(), block_number).await?; + + let _contract_output = host_executor.execute(contract_input.clone()).await?; + + // Now that we've executed all of the calls, get the `EVMStateSketch` from the host executor. + let state_sketch = host_executor.finalize().await?; + + let client_executor = ClientExecutor::new(state_sketch)?; + + let public_values = client_executor.execute(contract_input)?; + + Ok(public_values) +} diff --git a/examples/multiplexer/client/Cargo.lock b/examples/multiplexer/client/Cargo.lock index e909e4f..c2d22e0 100644 --- a/examples/multiplexer/client/Cargo.lock +++ b/examples/multiplexer/client/Cargo.lock @@ -357,9 +357,9 @@ dependencies = [ [[package]] name = "alloy-trie" -version = "0.5.1" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "398a977d774db13446b8cead8cfa9517aebf9e03fc8a1512892dc1e03e70bb04" +checksum = "0a46c9c4fdccda7982e7928904bd85fe235a0404ee3d7e197fff13d61eac8b4f" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -388,9 +388,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.88" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e1496f8fb1fbf272686b8d37f523dab3e4a7443300055e74cdaa449f3114356" +checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" [[package]] name = "ark-ff" @@ -716,9 +716,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.18" +version = "1.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62ac837cdb5cb22e10a256099b4fc502b1dfe560cb282963a974d7abd80e476" +checksum = "45bcde016d64c21da4be18b655631e5ab6d3107607e71a73a9f53eb48aae23fb" dependencies = [ "shlex", ] @@ -1350,9 +1350,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.60" +version = "0.1.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -1756,9 +1756,9 @@ checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "op-alloy-consensus" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a0004dfb630414d0dbed58b61a943740ae829def89f261cbd0d91d920c21bba" +checksum = "3ef361231f72bea90365e441bd97d9c8fd3875603f18bbcad0e04874c6158e53" dependencies = [ "alloy-consensus", "alloy-eips", @@ -1772,9 +1772,9 @@ dependencies = [ [[package]] name = "op-alloy-rpc-types" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "219dfbe7a20588f172ae9cfe2ec7e2804f71816f24355dc07fd9a1453c62f07f" +checksum = "e5a65da5f7591acba3d2304b25145ca9942ea90481213269aed9cb28add8e3ff" dependencies = [ "alloy-eips", "alloy-network", @@ -3351,9 +3351,9 @@ checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" [[package]] name = "toml_edit" -version = "0.22.20" +version = "0.22.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" +checksum = "3b072cee73c449a636ffd6f32bd8de3a9f7119139aff882f44943ce2986dc5cf" dependencies = [ "indexmap 2.5.0", "toml_datetime", @@ -3435,9 +3435,9 @@ checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-normalization" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" dependencies = [ "tinyvec", ] diff --git a/examples/multiplexer/client/src/main.rs b/examples/multiplexer/client/src/main.rs index 616ba9e..c47ea15 100644 --- a/examples/multiplexer/client/src/main.rs +++ b/examples/multiplexer/client/src/main.rs @@ -56,8 +56,8 @@ pub fn main() { caller_address: CALLER, calldata: calldata.clone(), }; - let contract_public_values = executor.execute(call).unwrap(); + let public_vals = executor.execute(call).unwrap(); // Commit the abi-encoded output. - sp1_zkvm::io::commit_slice(&contract_public_values.abi_encode()); + sp1_zkvm::io::commit_slice(&public_vals.abi_encode()); } diff --git a/examples/multiplexer/host/src/main.rs b/examples/multiplexer/host/src/main.rs index f6582b5..1290c4f 100644 --- a/examples/multiplexer/host/src/main.rs +++ b/examples/multiplexer/host/src/main.rs @@ -48,7 +48,7 @@ async fn main() -> eyre::Result<()> { utils::setup_logger(); // Which block transactions are executed on. - let block_number = BlockNumberOrTag::Number(20767554); + let block_number = BlockNumberOrTag::Number(18884864); // Prepare the host executor. // diff --git a/examples/uniswap/client/Cargo.lock b/examples/uniswap/client/Cargo.lock index ed46ff8..3f4016d 100644 --- a/examples/uniswap/client/Cargo.lock +++ b/examples/uniswap/client/Cargo.lock @@ -3047,8 +3047,7 @@ dependencies = [ [[package]] name = "sp1-lib" version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413956de14568d7fb462213b9505ad4607d75c875301b9eca567cfb2e58eaac1" +source = "git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test#826e67993294266f3c88f360a0aee52f3856326f" dependencies = [ "anyhow", "bincode", @@ -3061,8 +3060,7 @@ dependencies = [ [[package]] name = "sp1-zkvm" version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66c525f67cfd3f65950f01c713a72c41a5d44d289155644c8ace4ec264098039" +source = "git+https://github.com/succinctlabs/sp1?branch=yuwen/fs-test#826e67993294266f3c88f360a0aee52f3856326f" dependencies = [ "bincode", "cfg-if", diff --git a/examples/uniswap/client/Cargo.toml b/examples/uniswap/client/Cargo.toml index 36661c5..d9f916d 100644 --- a/examples/uniswap/client/Cargo.toml +++ b/examples/uniswap/client/Cargo.toml @@ -17,7 +17,7 @@ alloy-sol-macro = { version = "0.8" } revm = { version = "14.0.0", features = ["serde"], default-features = false } # sp1 -sp1-zkvm = "2.0.0" +sp1-zkvm = { git = "https://github.com/succinctlabs/sp1", branch = "yuwen/fs-test"} # misc bincode = "1.3.3" diff --git a/examples/uniswap/contracts/src/fixtures/plonk-fixture.json b/examples/uniswap/contracts/src/fixtures/plonk-fixture.json index 2670b5f..7bb24b7 100644 --- a/examples/uniswap/contracts/src/fixtures/plonk-fixture.json +++ b/examples/uniswap/contracts/src/fixtures/plonk-fixture.json @@ -1,5 +1,5 @@ { - "vkey": "0x00900215985edc5c5e16f2a870e9c285fdf88b57fcb24170d164fe4536a8bc5e", - "publicValues": "0x000000000000000000000000000000000000000000000000000000000000002018b0ffc8fcbb0ea47f5b025926cc2597e8f536eda63fd351019bb4519f613c9600000000000000000000000000000000000000000000000000000000000000000000000000000000000000001d42064fc4beb5f8aaf85f4617ae8b3b5b8bd80100000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000043850c7bd0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000dca3dcf71e1630c91606011ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1bc400000000000000000000000000000000000000000000000000000000000000fe000000000000000000000000000000000000000000000000000000000000012c000000000000000000000000000000000000000000000000000000000000012c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001", - "proof": "0x4aca240a2d20dc543a6e77bb6e38ac766ea21e46974b1a81e445d43408d5929bc450df6a29fa2da1f3e04210309b2f9c3f2756a682531ff418a22d1962337ed691fbdd99213967406034274d8f21287b16e698e1db6f4dddf63835f66d50a574d282da852cb9380d676dd215579bc1f242d2a30894ffd754d1e4a143932601f0acb9a235076d10174c24b2fa5ce9dab32e4bd533bc6d796f8f724820a391d2b23cd1e5ab178cea6e15cf252efd136efbc0c2cacc1e6ac297c8f8876df033693884cf83d41491da045e44a53c8ebab0161c97b6a3833ea969ac0384dbe3cf36a2a240b3e7291b3beb4417b66533ab9388faf72d5444fbe279fbad2b72e203ebbdafdbc09917d19f702dd30225f0f6442bae7311383e39456f59b3f1f5eb03311d2c965c35078a4b96afe8a9bf04b435d40548b5bf1953fcde5d150c17cfb3991bea776e5502a48330ccadc25f5cf4643b0f3bfc9152eaf9e9f4f13183a8d9858f79ea677b2e2896b9c37105fcff339d1c3866090b4ac2767b217943f4f76a1adb12aef040058059595d2d21c4e7c643dae550648f81fd2a4488c0e212a990b7ad8e33b0c02db5c05f7e6b58cf7dbac34e0dbfdd87ca7ba6770929e0a3973ad2a687d3c48f29d62a72c5a35f9e42dd164388ade6af434d3f2c721117957d37e9a6a15824120ee863641dc2c2f208f18df419cfadeef213213e6dc9771590551aa57a7ecc1f0e69a6d796ee8f2a71cd45c05a38680009a2b75905c41eba3ab5d87f6f8a1b9c0c4518428e3c0e78c8d4bb6ca2c9882305d79b65c31d306889158b39b8fa36531c68b45c6ee9767ad2866baddc5f10864b2afb0f1e231e35d3a068dafd81232c1a1c0c58b3a1d9414bcc681a9378d0a36b0a98badd2d53945918fdbdb0a35ea7282623c4d4a8b36c57bcbbb401b8880934b250b9c7a0ac42583c8bdb0c879b3a2133d0ef84051b2d5ac5f33cff6989e00680f9931d1cc55391a2509bd011989a122eed226825aee9f667c0bd036e9bbac55e1d54ddce02372f7c27e65c8165c926e699302516712671389ec9cf1c91998b9426da330eeb26ccbd535fa005a7cc26f4a9828eb3223e4482c28b888b72b0c5ea8919fb4e8fba9010b6a0774483ec14bd304780da3a4b859c0170367ce7b9732ba9592bac0b93f4c7af6d8e4f49802af5ff81531e669efa38f2a3d1e5c03189a47f670d9684258b0cb7cd4a362930" + "vkey": "0x004bed8f00af5c281ca1c3b8ec794ced9b46487d645223da06c99c3004ba869a", + "publicValues": "0x00000000000000000000000000000000000000000000000000000000000000204804cee837fd95195099e56fc5ed546c5982c751d137c4ec3dfed763c9bb491e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000001d42064fc4beb5f8aaf85f4617ae8b3b5b8bd80100000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000043850c7bd0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000cdebb6337bcb5fd82c7f27affffffffffffffffffffffffffffffffffffffffffffffffffffffffffff165f0000000000000000000000000000000000000000000000000000000000000071000000000000000000000000000000000000000000000000000000000000012c000000000000000000000000000000000000000000000000000000000000012c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001", + "proof": "0x4aca240a109e87d10128bfcc7b87b07fd16deb97d0346fd1105a95c271226ce1f0931b2d1585c9021f2151a79ed32dcd6d05f82be34befbbcff198b339ba2e0c664a742d16b33c6408bc805c4f084aa71d0868d1404aa87c00071125f50157d6fba60f9c0053f8178b006e579b3afd39c4ffd150d840cba61f2b1da9cd6c464a1a7c035d08feb30c522ed46734f108066b52dbcd7ba60de36b3c2fbeceb4304fa9ded6ab1bd0cee9f2809d43a48d4d276edeb10cc55246231736aa2bbe1705ec85addabe0ac1c3a3bcd0ebfcbb5b1d592f05540ae9f28fa82480d8d054aaded7c3f349a22dfb8fa8263f04279d7fef320c8d3533d846bf598d5f52b44127ee0887aad224205c4ad0bcea41a8f3dded9e95cd93aa0c5786a46579ddd974cd86fecf0c797c08f883bdf0f35591c0b97fb46985f03f0e4ecf2a8cb1b8d70d1a8060dab5fcb40689f0588168a9d5493127f62646cc4da19fa07b256f5a7fae31a8a16371ba502faaa89e24e118b608af706074e5b32d7b42d0a41e0adce7bdc8816a2c55d8e62874a2e140e85cfe5d5ab12e60e86e11108ae3ac52e50fe262243f66f37c2e080f4b352bf4731a70ccb30520db7c5434860b717999f431ec1706792708137a6d177e88cd4849472a57ebac9e8afb9d7cc4d2724d1fb9f4812841698a2aaf2b700aa1cbfa3a74896b125a67b295512a2459bc3088ce0a837279605e9fce184bf10a270e48ad5a6d203891b87f417ffe82e255fc5fc83285d1de54047d9f9cbff62f33893e9197a1637fce282b548117c014b2a00faa04a9cb9f9a20e0a25efb22217feac6e19d92902582e339acd7fff70141e1d465a52997d9d97ecc20d085682c8f73d9e796f414683fc79bbf5a805919ed41878ad2bea592e4abab7cd808a1017494b594a34436c5896461e3a8c91eafe9bca72e4537b8637b6bfbc06e25ba02d7e5eace52d50e0c2e67ca1d87838899391efbe9215baf45f87a983614b16815c63c3dbca01a43d2ab36f2792224c517951512fa063b73fdb058866bb61a1f15cec4c1ceb6279123a1ceb0be13c78de7f6913e2161ec4cc229a05eb18b20191c42bdc2dd32959c6a8d1dbf8f2cedc56334e4e88201d95b49d09dba02acc0ad06fcb3ec345c3fa943fe5cd5dc7d3638e088298e984f1dbe033c289b14b6b1862f83d4bee0f14f1dd3314f9daaf7f83810283952db8ee58b93a924698f5c91d8" } \ No newline at end of file diff --git a/examples/uniswap/host/Cargo.toml b/examples/uniswap/host/Cargo.toml index 3744b3a..e2d2cb8 100644 --- a/examples/uniswap/host/Cargo.toml +++ b/examples/uniswap/host/Cargo.toml @@ -31,10 +31,12 @@ serde.workspace = true serde_json.workspace = true # sp1 -sp1-sdk = "2.0.0" +sp1-sdk = { git = "https://github.com/succinctlabs/sp1", branch = "yuwen/fs-test"} + [build-dependencies] -sp1-helper = "2.0.0" +sp1-helper = { git = "https://github.com/succinctlabs/sp1", branch = "yuwen/fs-test"} + [features] default = [] diff --git a/examples/uniswap/host/src/main.rs b/examples/uniswap/host/src/main.rs index c977e77..a75dedc 100644 --- a/examples/uniswap/host/src/main.rs +++ b/examples/uniswap/host/src/main.rs @@ -63,7 +63,7 @@ async fn main() -> eyre::Result<()> { utils::setup_logger(); // Which block transactions are executed on. - let block_number = BlockNumberOrTag::Latest; + let block_number = BlockNumberOrTag::Number(20600000); // Prepare the host executor. // diff --git a/rust-toolchain b/rust-toolchain index 39c9c4b..6f113e3 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1,3 +1,3 @@ [toolchain] -channel = "nightly-2024-08-06" +channel = "1.81" components = ["llvm-tools", "rustc-dev"]