diff --git a/casper-finality-proofs/Cargo.lock b/casper-finality-proofs/Cargo.lock index a25b3fb75..3165c440a 100644 --- a/casper-finality-proofs/Cargo.lock +++ b/casper-finality-proofs/Cargo.lock @@ -887,7 +887,7 @@ dependencies = [ "clap 4.4.7", "colored", "crossbeam", - "curta 0.1.0 (git+https://github.com/succinctlabs/curta.git?rev=8f6026a115eeec5e148ccdf2e2b2c724c41629fd)", + "curta 0.1.0 (git+https://github.com/succinctlabs/curta.git?branch=main)", "ef_tests", "ethers", "hex", @@ -1175,9 +1175,9 @@ checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" [[package]] name = "const-random" -version = "0.1.16" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11df32a13d7892ec42d51d3d175faba5211ffe13ed25d4fb348ac9e9ce835593" +checksum = "5aaf16c9c2c612020bcfd042e170f6e32de9b9d75adb5277cdbbd2e2c8c8299a" dependencies = [ "const-random-macro", ] @@ -1400,7 +1400,7 @@ dependencies = [ [[package]] name = "curta" version = "0.1.0" -source = "git+https://github.com/succinctlabs/curta.git?rev=8f6026a115eeec5e148ccdf2e2b2c724c41629fd#8f6026a115eeec5e148ccdf2e2b2c724c41629fd" +source = "git+https://github.com/succinctlabs/curta.git?branch=main#7b10c6d041bb33ec1a3f7a85fc6f74e27cf655d4" dependencies = [ "anyhow", "bincode", @@ -1420,10 +1420,12 @@ dependencies = [ [[package]] name = "curta" version = "0.1.0" -source = "git+https://github.com/succinctlabs/curta.git#b397226c359a372726316e99397db68272f20b04" +source = "git+https://github.com/succinctlabs/curta.git#7b10c6d041bb33ec1a3f7a85fc6f74e27cf655d4" dependencies = [ "anyhow", "bincode", + "curve25519-dalek 4.1.1", + "env_logger 0.9.3", "hex", "itertools 0.10.5", "log", @@ -1442,9 +1444,9 @@ source = "git+https://github.com/succinctlabs/curve25519-dalek.git?branch=featur dependencies = [ "cfg-if", "cpufeatures", - "curve25519-dalek-derive 0.1.0 (git+https://github.com/succinctlabs/curve25519-dalek.git?branch=feature/edwards-point-getters)", + "curve25519-dalek-derive 0.1.0", "fiat-crypto 0.1.20", - "platforms 3.1.2", + "platforms 3.2.0", "rustc_version", "subtle", "zeroize", @@ -1458,10 +1460,10 @@ checksum = "e89b8c6a2e4b1f45971ad09761aafb85514a84744b67a95e32c3cc1352d1f65c" dependencies = [ "cfg-if", "cpufeatures", - "curve25519-dalek-derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "curve25519-dalek-derive 0.1.1", "digest 0.10.7", "fiat-crypto 0.2.2", - "platforms 3.1.2", + "platforms 3.2.0", "rustc_version", "subtle", "zeroize", @@ -1470,8 +1472,7 @@ dependencies = [ [[package]] name = "curve25519-dalek-derive" version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83fdaf97f4804dcebfa5862639bc9ce4121e82140bec2a987ac5140294865b5b" +source = "git+https://github.com/succinctlabs/curve25519-dalek.git?branch=feature/edwards-point-getters#e2d1bd10d6d772af07cac5c8161cd7655016af6d" dependencies = [ "proc-macro2", "quote", @@ -1480,8 +1481,9 @@ dependencies = [ [[package]] name = "curve25519-dalek-derive" -version = "0.1.0" -source = "git+https://github.com/succinctlabs/curve25519-dalek.git?branch=feature/edwards-point-getters#e2d1bd10d6d772af07cac5c8161cd7655016af6d" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", @@ -3853,9 +3855,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.0.2" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8adf3ddd720272c6ea8bf59463c04e0f93d0bbf7c5439b691bca2987e0270897" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" dependencies = [ "equivalent", "hashbrown 0.14.2", @@ -3972,9 +3974,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.64" +version = "0.3.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +checksum = "54c0c35952f67de54bb584e9fd912b3023117cbafc0a77d8f3dee1fb5f572fe8" dependencies = [ "wasm-bindgen", ] @@ -5451,9 +5453,9 @@ dependencies = [ [[package]] name = "openssl" -version = "0.10.57" +version = "0.10.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bac25ee399abb46215765b1cb35bc0212377e58a061560d8b29b024fd0430e7c" +checksum = "a9dfc0783362704e97ef3bd24261995a699468440099ef95d869b4d9732f829a" dependencies = [ "bitflags 2.4.1", "cfg-if", @@ -5492,9 +5494,9 @@ dependencies = [ [[package]] name = "openssl-sys" -version = "0.9.93" +version = "0.9.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db4d56a4c0478783083cfafcc42493dd4a981d41669da64b4572a2a089b51b1d" +checksum = "2f55da20b29f956fb01f0add8683eb26ee13ebe3ebd935e49898717c6b4b2830" dependencies = [ "cc", "libc", @@ -5740,7 +5742,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap 2.0.2", + "indexmap 2.1.0", ] [[package]] @@ -5870,14 +5872,14 @@ checksum = "e8d0eef3571242013a0d5dc84861c3ae4a652e56e12adf8bdc26ff5f8cb34c94" [[package]] name = "platforms" -version = "3.1.2" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4503fa043bf02cee09a9582e9554b4c6403b2ef55e4612e96561d294419429f8" +checksum = "14e6ab3f592e6fb464fc9712d8d6e6912de6473954635fd76a589d832cffcbb0" [[package]] name = "plonky2" version = "0.1.4" -source = "git+https://github.com/mir-protocol/plonky2.git#0258ad4a3dfeeb92bc59e0b1be6be06731032bfe" +source = "git+https://github.com/mir-protocol/plonky2.git#f71f227d3ca8ac6da62ff3748a2279dc4fd23c77" dependencies = [ "ahash 0.8.6", "anyhow", @@ -5900,7 +5902,7 @@ dependencies = [ [[package]] name = "plonky2_field" version = "0.1.1" -source = "git+https://github.com/mir-protocol/plonky2.git#0258ad4a3dfeeb92bc59e0b1be6be06731032bfe" +source = "git+https://github.com/mir-protocol/plonky2.git#f71f227d3ca8ac6da62ff3748a2279dc4fd23c77" dependencies = [ "anyhow", "itertools 0.11.0", @@ -5924,7 +5926,7 @@ dependencies = [ [[package]] name = "plonky2_maybe_rayon" version = "0.1.1" -source = "git+https://github.com/mir-protocol/plonky2.git#0258ad4a3dfeeb92bc59e0b1be6be06731032bfe" +source = "git+https://github.com/mir-protocol/plonky2.git#f71f227d3ca8ac6da62ff3748a2279dc4fd23c77" dependencies = [ "rayon", ] @@ -5932,12 +5934,12 @@ dependencies = [ [[package]] name = "plonky2_util" version = "0.1.1" -source = "git+https://github.com/mir-protocol/plonky2.git#0258ad4a3dfeeb92bc59e0b1be6be06731032bfe" +source = "git+https://github.com/mir-protocol/plonky2.git#f71f227d3ca8ac6da62ff3748a2279dc4fd23c77" [[package]] name = "plonky2x" version = "0.1.0" -source = "git+https://github.com/succinctlabs/succinctx.git?rev=fa77412f0716468b30050b8b12835b15305b0007#fa77412f0716468b30050b8b12835b15305b0007" +source = "git+https://github.com/succinctlabs/succinctx.git?branch=main#598e609dcfc7985afcb706c8775346ec9de081cb" dependencies = [ "anyhow", "array-macro", @@ -5979,7 +5981,7 @@ dependencies = [ [[package]] name = "plonky2x-derive" version = "0.1.0" -source = "git+https://github.com/succinctlabs/succinctx.git?rev=fa77412f0716468b30050b8b12835b15305b0007#fa77412f0716468b30050b8b12835b15305b0007" +source = "git+https://github.com/succinctlabs/succinctx.git?branch=main#598e609dcfc7985afcb706c8775346ec9de081cb" dependencies = [ "proc-macro2", "quote", @@ -6064,9 +6066,9 @@ dependencies = [ [[package]] name = "primeorder" -version = "0.13.2" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c2fcef82c0ec6eefcc179b978446c399b3cdf73c392c35604e399eee6df1ee3" +checksum = "c7dbe9ed3b56368bd99483eb32fe9c17fdd3730aebadc906918ce78d54c7eeb4" dependencies = [ "elliptic-curve 0.13.6", ] @@ -7159,7 +7161,7 @@ dependencies = [ "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.0.2", + "indexmap 2.1.0", "serde", "serde_json", "serde_with_macros 3.4.0", @@ -7208,7 +7210,7 @@ version = "0.9.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3cc7a1570e38322cfe4154732e5110f887ea57e22b76f4bfd32b5bdd3368666c" dependencies = [ - "indexmap 2.0.2", + "indexmap 2.1.0", "itoa", "ryu", "serde", @@ -8244,7 +8246,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.0.2", + "indexmap 2.1.0", "serde", "serde_spanned", "toml_datetime", @@ -8257,7 +8259,7 @@ version = "0.20.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" dependencies = [ - "indexmap 2.0.2", + "indexmap 2.1.0", "toml_datetime", "winnow", ] @@ -8853,9 +8855,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.87" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +checksum = "7daec296f25a1bae309c0cd5c29c4b260e510e6d813c286b19eaadf409d40fce" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -8863,9 +8865,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.87" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +checksum = "e397f4664c0e4e428e8313a469aaa58310d302159845980fd23b0f22a847f217" dependencies = [ "bumpalo", "log", @@ -8878,9 +8880,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.37" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" +checksum = "9afec9963e3d0994cac82455b2b3502b81a7f40f9a0d32181f7528d9f4b43e02" dependencies = [ "cfg-if", "js-sys", @@ -8890,9 +8892,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.87" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +checksum = "5961017b3b08ad5f3fe39f1e79877f8ee7c23c5e5fd5eb80de95abc41f1f16b2" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -8900,9 +8902,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.87" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +checksum = "c5353b8dab669f5e10f5bd76df26a9360c748f054f862ff5f3f8aae0c7fb3907" dependencies = [ "proc-macro2", "quote", @@ -8913,9 +8915,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.87" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" +checksum = "0d046c5d029ba91a1ed14da14dca44b68bf2f124cfbaf741c54151fdb3e0750b" [[package]] name = "wasm-streams" @@ -8932,9 +8934,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.64" +version = "0.3.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" +checksum = "5db499c5f66323272151db0e666cd34f78617522fb0c1604d31a27c50c206a85" dependencies = [ "js-sys", "wasm-bindgen", @@ -9154,9 +9156,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "winnow" -version = "0.5.17" +version = "0.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3b801d0e0a6726477cc207f60162da452f3a95adb368399bef20a946e06f65c" +checksum = "176b6138793677221d420fd2f0aeeced263f197688b36484660da767bca2fa32" dependencies = [ "memchr", ] @@ -9290,18 +9292,18 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.7.20" +version = "0.7.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd66a62464e3ffd4e37bd09950c2b9dd6c4f8767380fabba0d523f9a775bc85a" +checksum = "092cd76b01a033a9965b9097da258689d9e17c69ded5dcf41bca001dd20ebc6d" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.20" +version = "0.7.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "255c4596d41e6916ced49cfafea18727b24d67878fa180ddfd69b9df34fd1726" +checksum = "a13a20a7c6a90e2034bcc65495799da92efcec6a8dd4f3fcb6f7a48988637ead" dependencies = [ "proc-macro2", "quote", diff --git a/casper-finality-proofs/Cargo.toml b/casper-finality-proofs/Cargo.toml index 5e0f87a04..7d0b29ab6 100644 --- a/casper-finality-proofs/Cargo.toml +++ b/casper-finality-proofs/Cargo.toml @@ -15,8 +15,8 @@ path = "src/test_engine/bin/main.rs" [dependencies] plonky2 = { git = "https://github.com/mir-protocol/plonky2.git", default-features = false } -plonky2x = { git = "https://github.com/succinctlabs/succinctx.git", rev = "fa77412f0716468b30050b8b12835b15305b0007" } -curta = { git = "https://github.com/succinctlabs/curta.git", rev = "8f6026a115eeec5e148ccdf2e2b2c724c41629fd" } +plonky2x = { git = "https://github.com/succinctlabs/succinctx.git", branch = "main" } +curta = { git = "https://github.com/succinctlabs/curta.git", branch = "main" } serde = { version = "1.0.187", features = ["derive"] } serde_json = "1.0.103" serde_derive = "1.0.188" diff --git a/casper-finality-proofs/src/test_engine/types/mod.rs b/casper-finality-proofs/src/test_engine/types/mod.rs index 7f0aafecb..e69de29bb 100644 --- a/casper-finality-proofs/src/test_engine/types/mod.rs +++ b/casper-finality-proofs/src/test_engine/types/mod.rs @@ -1,3 +0,0 @@ -pub mod test_data; -pub mod test_hash_data; -pub mod test_lte_data; diff --git a/casper-finality-proofs/src/test_engine/types/test_data.rs b/casper-finality-proofs/src/test_engine/types/test_data.rs deleted file mode 100644 index 466137fda..000000000 --- a/casper-finality-proofs/src/test_engine/types/test_data.rs +++ /dev/null @@ -1,9 +0,0 @@ -use core::fmt::Debug; -use serde_derive::{Deserialize, Serialize}; - -#[derive(Debug, Default, Clone, PartialEq, Eq, Deserialize, Serialize)] -pub struct TestInput { - pub a: u64, - pub b: u64, - pub outputs: Vec, -} diff --git a/casper-finality-proofs/src/test_engine/types/test_hash_data.rs b/casper-finality-proofs/src/test_engine/types/test_hash_data.rs deleted file mode 100644 index cc1bcdf34..000000000 --- a/casper-finality-proofs/src/test_engine/types/test_hash_data.rs +++ /dev/null @@ -1,25 +0,0 @@ -use core::fmt::Debug; -use ethers::types::{H256, U256}; -use primitive_types::H384; -use serde_derive::{Deserialize, Serialize}; - -#[derive(Debug, Default, Clone, PartialEq, Eq, Deserialize, Serialize)] -pub struct Inputs { - pub pubkey: H384, - pub slashed: bool, - pub a: H256, - pub b: H256, - pub slot: U256, -} - -#[derive(Debug, Default, Clone, PartialEq, Eq, Deserialize, Serialize)] -pub struct Outputs { - pub hash: H256, - pub epoch: U256, -} - -#[derive(Debug, Default, Clone, PartialEq, Eq, Deserialize, Serialize)] -pub struct TestInput { - pub inputs: Inputs, - pub outputs: Outputs, -} diff --git a/casper-finality-proofs/src/test_engine/types/test_lte_data.rs b/casper-finality-proofs/src/test_engine/types/test_lte_data.rs deleted file mode 100644 index 5379931cc..000000000 --- a/casper-finality-proofs/src/test_engine/types/test_lte_data.rs +++ /dev/null @@ -1,8 +0,0 @@ -use core::fmt::Debug; -use serde_derive::{Deserialize, Serialize}; - -#[derive(Debug, Default, Clone, PartialEq, Eq, Deserialize, Serialize)] -pub struct TestInput { - pub a: u64, - pub b: u64, -} diff --git a/casper-finality-proofs/src/utils/bits.rs b/casper-finality-proofs/src/utils/bits.rs index f4c34d73d..16c3d658f 100644 --- a/casper-finality-proofs/src/utils/bits.rs +++ b/casper-finality-proofs/src/utils/bits.rs @@ -1,4 +1,5 @@ use plonky2x::prelude::{BoolVariable, CircuitBuilder, PlonkParameters}; +use std::cmp::min; pub fn shift_right, const D: usize>( builder: &mut CircuitBuilder, @@ -10,7 +11,7 @@ pub fn shift_right, const D: usize>( new_bits[i] = bits[i - shift_count]; } - for i in 0..shift_count { + for i in 0..min(shift_count, bits.len()) { new_bits[i] = builder._false(); }