diff --git a/.github/workflows/cI.yml b/.github/workflows/cI.yml index 000d91f..14524b7 100644 --- a/.github/workflows/cI.yml +++ b/.github/workflows/cI.yml @@ -19,9 +19,7 @@ jobs: timeout-minutes: 10 steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@master - with: - toolchain: nightly-2024-02-01 + - uses: dtolnay/rust-toolchain@nightly components: clippy - uses: Swatinem/rust-cache@v2 with: @@ -35,9 +33,7 @@ jobs: timeout-minutes: 10 steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@master - with: - toolchain: nightly-2024-02-01 + - uses: dtolnay/rust-toolchain@nightly components: rustfmt - run: cargo fmt --all --check @@ -46,9 +42,7 @@ jobs: timeout-minutes: 20 steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@master - with: - toolchain: nightly-2024-02-01 + - uses: dtolnay/rust-toolchain@nightly - uses: Swatinem/rust-cache@v2 with: cache-on-failure: true diff --git a/Cargo.lock b/Cargo.lock index 779e80d..80e922c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -40,9 +40,9 @@ dependencies = [ [[package]] name = "ahash" -version = "0.8.6" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", "const-random", @@ -792,9 +792,9 @@ name = "common" version = "0.1.0" dependencies = [ "clap", + "evm_arithmetization", "plonky2", - "plonky2_evm", - "plonky_block_proof_gen", + "proof_gen", "thiserror", "tracing", ] @@ -1696,6 +1696,42 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "evm_arithmetization" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef2af65f5b147f04c94df5df5e21ff9d1632fd357511e183d5e04de059d6fa93" +dependencies = [ + "anyhow", + "bytes", + "env_logger", + "ethereum-types", + "hashbrown 0.14.3", + "hex-literal", + "itertools 0.11.0", + "jemallocator", + "keccak-hash 0.10.0", + "log", + "mpt_trie", + "num", + "num-bigint", + "once_cell", + "pest", + "pest_derive", + "plonky2", + "plonky2_maybe_rayon", + "plonky2_util", + "rand", + "rand_chacha", + "rlp", + "rlp-derive", + "serde", + "serde_json", + "starky", + "static_assertions", + "tiny-keccak", +] + [[package]] name = "executor-trait" version = "2.1.0" @@ -2566,17 +2602,17 @@ dependencies = [ "dotenvy", "eth_trie_utils", "ethers", + "evm_arithmetization", "hex", "itertools 0.11.0", "ops", "paladin-core", "plonky2", - "plonky2_evm", - "plonky_block_proof_gen", - "protocol_decoder", + "proof_gen", "serde", "serde_json", "tokio", + "trace_decoder", "tracing", "tracing-subscriber", ] @@ -2719,6 +2755,27 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "mpt_trie" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbf6d77f630021e46e127abfa047aebfba78bf207ed3dfd1c4f9e2370f9b60cd" +dependencies = [ + "bytes", + "enum-as-inner 0.6.0", + "ethereum-types", + "hex", + "keccak-hash 0.10.0", + "log", + "num", + "num-traits", + "parking_lot", + "rlp", + "serde", + "thiserror", + "uint", +] + [[package]] name = "new_debug_unreachable" version = "1.0.4" @@ -2908,10 +2965,10 @@ dependencies = [ "common", "ethers", "paladin-core", - "plonky_block_proof_gen", - "protocol_decoder", + "proof_gen", "rlp", "serde", + "trace_decoder", "tracing", ] @@ -2946,9 +3003,9 @@ dependencies = [ [[package]] name = "paladin-core" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c10eebceee2898070e490a57ada2bd3810c236a6d80aadccab4d70ef27c7aa34" +checksum = "5af1955eaab1506a43d046628c218b7b3915539554838feb85ed31f54aace2f2" dependencies = [ "anyhow", "async-trait", @@ -3291,8 +3348,9 @@ checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" [[package]] name = "plonky2" -version = "0.1.4" -source = "git+https://github.com/0xPolygonZero/plonky2?rev=39a2d62d6d025631380da88aa78c2f8b929852a2#39a2d62d6d025631380da88aa78c2f8b929852a2" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b25deb9a4b9c2014c2f99cd36078f30e453d188d0ca8dd4c5ffd1d494b661ac1" dependencies = [ "ahash", "anyhow", @@ -3308,49 +3366,16 @@ dependencies = [ "rand", "rand_chacha", "serde", - "serde_json", "static_assertions", "unroll", -] - -[[package]] -name = "plonky2_evm" -version = "0.1.1" -source = "git+https://github.com/0xPolygonZero/plonky2?rev=39a2d62d6d025631380da88aa78c2f8b929852a2#39a2d62d6d025631380da88aa78c2f8b929852a2" -dependencies = [ - "anyhow", - "bytes", - "env_logger", - "eth_trie_utils", - "ethereum-types", - "hashbrown 0.14.3", - "hex-literal", - "itertools 0.11.0", - "jemallocator", - "keccak-hash 0.10.0", - "log", - "num", - "num-bigint", - "once_cell", - "pest", - "pest_derive", - "plonky2", - "plonky2_maybe_rayon", - "plonky2_util", - "rand", - "rand_chacha", - "rlp", - "rlp-derive", - "serde", - "serde_json", - "static_assertions", - "tiny-keccak", + "web-time", ] [[package]] name = "plonky2_field" -version = "0.1.1" -source = "git+https://github.com/0xPolygonZero/plonky2?rev=39a2d62d6d025631380da88aa78c2f8b929852a2#39a2d62d6d025631380da88aa78c2f8b929852a2" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "465a741ba134485af571152aab5086457a470aa8893391186cf78dd389694440" dependencies = [ "anyhow", "itertools 0.11.0", @@ -3364,30 +3389,18 @@ dependencies = [ [[package]] name = "plonky2_maybe_rayon" -version = "0.1.1" -source = "git+https://github.com/0xPolygonZero/plonky2?rev=39a2d62d6d025631380da88aa78c2f8b929852a2#39a2d62d6d025631380da88aa78c2f8b929852a2" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92ff44a90aaca13e10e7ddf8fab815ba1b404c3f7c3ca82aaf11c46beabaa923" dependencies = [ "rayon", ] [[package]] name = "plonky2_util" -version = "0.1.1" -source = "git+https://github.com/0xPolygonZero/plonky2?rev=39a2d62d6d025631380da88aa78c2f8b929852a2#39a2d62d6d025631380da88aa78c2f8b929852a2" - -[[package]] -name = "plonky_block_proof_gen" -version = "0.1.0" -source = "git+https://github.com/0xPolygonZero/proof-protocol-decoder.git?rev=6f97b3cd837d385c3501107bfdfbb3761e392b73#6f97b3cd837d385c3501107bfdfbb3761e392b73" -dependencies = [ - "ethereum-types", - "log", - "paste", - "plonky2", - "plonky2_evm", - "protocol_decoder", - "serde", -] +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b16136f5f3019c1e83035af76cccddd56d789a5e2933306270185c3f99f12259" [[package]] name = "polling" @@ -3535,6 +3548,21 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "proof_gen" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "657003bc7dcee8b7c487807b8c9e6bf8aef8413f80501948a948b40c885ab7e7" +dependencies = [ + "ethereum-types", + "evm_arithmetization", + "log", + "paste", + "plonky2", + "serde", + "trace_decoder", +] + [[package]] name = "proptest" version = "1.4.0" @@ -3551,30 +3579,6 @@ dependencies = [ "unarray", ] -[[package]] -name = "protocol_decoder" -version = "0.1.0" -source = "git+https://github.com/0xPolygonZero/proof-protocol-decoder.git?rev=6f97b3cd837d385c3501107bfdfbb3761e392b73#6f97b3cd837d385c3501107bfdfbb3761e392b73" -dependencies = [ - "bytes", - "ciborium", - "ciborium-io", - "enum-as-inner 0.6.0", - "enumn", - "eth_trie_utils", - "ethereum-types", - "hex", - "hex-literal", - "keccak-hash 0.10.0", - "log", - "plonky2_evm", - "rlp", - "rlp-derive", - "serde", - "serde_with", - "thiserror", -] - [[package]] name = "quote" version = "1.0.33" @@ -4340,6 +4344,23 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" +[[package]] +name = "starky" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24e0a1eec739c7a67cb1c6f916c0b7bf2d281cf2edb35d3db5caa6989090133e" +dependencies = [ + "ahash", + "anyhow", + "hashbrown 0.14.3", + "itertools 0.11.0", + "log", + "num-bigint", + "plonky2", + "plonky2_maybe_rayon", + "plonky2_util", +] + [[package]] name = "static_assertions" version = "1.1.0" @@ -4757,6 +4778,31 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +[[package]] +name = "trace_decoder" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f08487265f29176ad03c894b1c1cf8da5adf9d82fc151b3191eb7f55350b5c58" +dependencies = [ + "bytes", + "ciborium", + "ciborium-io", + "enum-as-inner 0.6.0", + "enumn", + "ethereum-types", + "evm_arithmetization", + "hex", + "hex-literal", + "keccak-hash 0.10.0", + "log", + "mpt_trie", + "rlp", + "rlp-derive", + "serde", + "serde_with", + "thiserror", +] + [[package]] name = "tracing" version = "0.1.40" @@ -5096,6 +5142,16 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + [[package]] name = "webpki-roots" version = "0.25.3" @@ -5350,18 +5406,18 @@ checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" [[package]] name = "zerocopy" -version = "0.7.26" +version = "0.7.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e97e415490559a91254a2979b4829267a57d2fcd741a98eee8b722fb57289aa0" +checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.26" +version = "0.7.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd7e48ccf166952882ca8bd778a43502c64f33bf94c12ebe2a7f08e5a0f6689f" +checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 1b4b0b3..e82b6ae 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,13 +8,13 @@ resolver = "2" ethers = "2.0.7" tokio = { version = "1", features = ["full"] } anyhow = "1.0.71" -plonky2 = { git = "https://github.com/0xPolygonZero/plonky2", rev = "39a2d62d6d025631380da88aa78c2f8b929852a2" } -plonky2_evm = { git = "https://github.com/0xPolygonZero/plonky2", rev = "39a2d62d6d025631380da88aa78c2f8b929852a2" } +plonky2 = { version = "0.2.0" } +plonky2_evm = { package = "evm_arithmetization", version = "0.1.1" } clap = { version = "4.4.11", features = ["derive", "env"] } -protocol_decoder = { git = "https://github.com/0xPolygonZero/proof-protocol-decoder.git", rev = "6f97b3cd837d385c3501107bfdfbb3761e392b73" } -plonky_block_proof_gen = { git = "https://github.com/0xPolygonZero/proof-protocol-decoder.git", rev = "6f97b3cd837d385c3501107bfdfbb3761e392b73" } +protocol_decoder = { package = "trace_decoder", version = "0.1.1" } +plonky_block_proof_gen = { package = "proof_gen", version = "0.1.0" } dotenvy = "0.15.7" -paladin-core = "0.4.1" +paladin-core = "0.4.2" serde = { version = "1.0.193", features = ["derive"] } tracing = "0.1" tracing-subscriber = { version = "0.3", features = ["env-filter"] } diff --git a/common/src/prover_state/circuit.rs b/common/src/prover_state/circuit.rs index 623846f..c90b9ef 100644 --- a/common/src/prover_state/circuit.rs +++ b/common/src/prover_state/circuit.rs @@ -5,7 +5,7 @@ use std::{ str::FromStr, }; -use plonky2_evm::{all_stark::AllStark, config::StarkConfig}; +use plonky2_evm::{AllStark, StarkConfig}; use plonky_block_proof_gen::types::AllRecursiveCircuits; use crate::parsing::{parse_range, RangeParseError}; diff --git a/leader/src/lib.rs b/leader/src/lib.rs index 4d8a87d..fa42b42 100644 --- a/leader/src/lib.rs +++ b/leader/src/lib.rs @@ -433,10 +433,7 @@ pub async fn gather_witness(tx: TxHash, provider: &Provider) -> Result