diff --git a/Cargo.lock b/Cargo.lock index b289181..d589631 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -167,7 +167,7 @@ dependencies = [ "alloy-sol-types", "serde", "serde_json", - "thiserror 2.0.11", + "thiserror", "tracing", ] @@ -193,7 +193,7 @@ dependencies = [ "futures-utils-wasm", "serde", "serde_json", - "thiserror 2.0.11", + "thiserror", ] [[package]] @@ -266,7 +266,7 @@ dependencies = [ "schnellru", "serde", "serde_json", - "thiserror 2.0.11", + "thiserror", "tokio", "tracing", "url", @@ -353,7 +353,7 @@ dependencies = [ "alloy-rpc-types-engine", "serde", "serde_with", - "thiserror 2.0.11", + "thiserror", ] [[package]] @@ -399,7 +399,7 @@ dependencies = [ "itertools 0.13.0", "serde", "serde_json", - "thiserror 2.0.11", + "thiserror", ] [[package]] @@ -424,7 +424,7 @@ dependencies = [ "auto_impl", "elliptic-curve", "k256", - "thiserror 2.0.11", + "thiserror", ] [[package]] @@ -497,7 +497,7 @@ dependencies = [ "futures-utils-wasm", "serde", "serde_json", - "thiserror 2.0.11", + "thiserror", "tokio", "tower", "tracing", @@ -943,7 +943,7 @@ dependencies = [ "miniz_oxide", "object", "rustc-demangle", - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -1258,15 +1258,6 @@ dependencies = [ "libc", ] -[[package]] -name = "crc32fast" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" -dependencies = [ - "cfg-if", -] - [[package]] name = "crossbeam-channel" version = "0.5.14" @@ -1450,27 +1441,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "directories" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a49173b84e034382284f27f1af4dcbbd231ffa358c0fe316541a7337f376a35" -dependencies = [ - "dirs-sys", -] - -[[package]] -name = "dirs-sys" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" -dependencies = [ - "libc", - "option-ext", - "redox_users", - "windows-sys 0.48.0", -] - [[package]] name = "displaydoc" version = "0.2.5" @@ -1671,16 +1641,6 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "flate2" -version = "1.0.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" -dependencies = [ - "crc32fast", - "miniz_oxide", -] - [[package]] name = "fnv" version = "1.0.7" @@ -1927,12 +1887,6 @@ dependencies = [ "serde", ] -[[package]] -name = "hex-literal" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" - [[package]] name = "hmac" version = "0.12.1" @@ -1949,8 +1903,6 @@ dependencies = [ "alloy-consensus", "alloy-primitives", "alloy-rlp", - "ark-bn254", - "ark-ff 0.5.0", "async-trait", "hokulea-cryptography", "hokulea-eigenda", @@ -1960,8 +1912,6 @@ dependencies = [ "kona-executor", "kona-preimage", "kona-proof", - "num", - "rust-kzg-bn254", "tracing", ] @@ -1973,8 +1923,10 @@ dependencies = [ "ark-bn254", "ark-ff 0.5.0", "num", - "rust-kzg-bn254", - "thiserror 2.0.11", + "rust-kzg-bn254-primitives", + "rust-kzg-bn254-prover", + "rust-kzg-bn254-verifier", + "thiserror", "tracing", ] @@ -1988,7 +1940,7 @@ dependencies = [ "bytes", "kona-derive", "maili-protocol", - "rust-kzg-bn254", + "rust-kzg-bn254-primitives", "tracing", ] @@ -2444,7 +2396,7 @@ dependencies = [ "serde", "serde_json", "spin", - "thiserror 2.0.11", + "thiserror", "tracing", ] @@ -2463,7 +2415,7 @@ dependencies = [ "op-alloy-consensus", "op-alloy-genesis", "op-alloy-rpc-types-engine", - "thiserror 2.0.11", + "thiserror", "tracing", ] @@ -2481,7 +2433,7 @@ dependencies = [ "op-alloy-consensus", "op-alloy-genesis", "op-alloy-rpc-types-engine", - "thiserror 2.0.11", + "thiserror", "tracing", ] @@ -2499,7 +2451,7 @@ dependencies = [ "op-alloy-genesis", "op-alloy-rpc-types-engine", "revm", - "thiserror 2.0.11", + "thiserror", "tracing", ] @@ -2548,7 +2500,7 @@ dependencies = [ "alloy-primitives", "alloy-rlp", "alloy-trie", - "thiserror 2.0.11", + "thiserror", ] [[package]] @@ -2559,7 +2511,7 @@ dependencies = [ "alloy-primitives", "async-channel", "async-trait", - "thiserror 2.0.11", + "thiserror", "tracing", ] @@ -2587,7 +2539,7 @@ dependencies = [ "serde", "serde_json", "spin", - "thiserror 2.0.11", + "thiserror", "tokio", "tracing", ] @@ -2601,7 +2553,7 @@ dependencies = [ "cfg-if", "kona-preimage", "linked_list_allocator", - "thiserror 2.0.11", + "thiserror", ] [[package]] @@ -2645,17 +2597,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" dependencies = [ "cfg-if", - "windows-targets 0.52.6", -] - -[[package]] -name = "libredox" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" -dependencies = [ - "bitflags", - "libc", + "windows-targets", ] [[package]] @@ -2753,7 +2695,7 @@ dependencies = [ "op-alloy-genesis", "rand", "serde", - "thiserror 2.0.11", + "thiserror", "tracing", "unsigned-varint", ] @@ -2994,7 +2936,7 @@ dependencies = [ "alloy-serde", "derive_more", "serde", - "thiserror 2.0.11", + "thiserror", ] [[package]] @@ -3009,7 +2951,7 @@ dependencies = [ "alloy-sol-types", "serde", "serde_repr", - "thiserror 2.0.11", + "thiserror", ] [[package]] @@ -3035,7 +2977,7 @@ dependencies = [ "op-alloy-consensus", "op-alloy-protocol", "serde", - "thiserror 2.0.11", + "thiserror", ] [[package]] @@ -3082,12 +3024,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "option-ext" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" - [[package]] name = "overload" version = "0.1.1" @@ -3158,7 +3094,7 @@ dependencies = [ "libc", "redox_syscall", "smallvec", - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -3180,7 +3116,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b7cafe60d6cf8e62e1b9b2ea516a089c008945bb5a275416789e7db0bc199dc" dependencies = [ "memchr", - "thiserror 2.0.11", + "thiserror", "ucd-trie", ] @@ -3417,17 +3353,6 @@ dependencies = [ "bitflags", ] -[[package]] -name = "redox_users" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" -dependencies = [ - "getrandom", - "libredox", - "thiserror 1.0.69", -] - [[package]] name = "regex" version = "1.11.1" @@ -3651,9 +3576,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48fd7bd8a6377e15ad9d42a8ec25371b94ddc67abe7c8b9127bec79bebaaae18" [[package]] -name = "rust-kzg-bn254" -version = "0.2.1" -source = "git+https://github.com/Layr-Labs/rust-kzg-bn254?rev=01b3f0bbcea4ef247e71131977bd5d1299b59004#01b3f0bbcea4ef247e71131977bd5d1299b59004" +name = "rust-kzg-bn254-primitives" +version = "0.1.0" +source = "git+https://github.com/Layr-Labs/rust-kzg-bn254?rev=b3e532e9aad533009849755d5ad7b9578a16bfb2#b3e532e9aad533009849755d5ad7b9578a16bfb2" dependencies = [ "ark-bn254", "ark-ec", @@ -3661,20 +3586,38 @@ dependencies = [ "ark-poly", "ark-serialize 0.5.0", "ark-std 0.5.0", - "byteorder", + "num-traits", + "sha2", + "thiserror", +] + +[[package]] +name = "rust-kzg-bn254-prover" +version = "0.1.0" +source = "git+https://github.com/Layr-Labs/rust-kzg-bn254?rev=b3e532e9aad533009849755d5ad7b9578a16bfb2#b3e532e9aad533009849755d5ad7b9578a16bfb2" +dependencies = [ + "ark-bn254", + "ark-ec", + "ark-ff 0.5.0", + "ark-poly", + "ark-std 0.5.0", "crossbeam-channel", - "directories", - "hex-literal", - "itertools 0.13.0", - "num-bigint", "num-traits", "num_cpus", - "rand", "rayon", - "sha2", - "sys-info", - "thiserror 2.0.11", - "ureq", + "rust-kzg-bn254-primitives", +] + +[[package]] +name = "rust-kzg-bn254-verifier" +version = "0.1.0" +source = "git+https://github.com/Layr-Labs/rust-kzg-bn254?rev=b3e532e9aad533009849755d5ad7b9578a16bfb2#b3e532e9aad533009849755d5ad7b9578a16bfb2" +dependencies = [ + "ark-bn254", + "ark-ec", + "ark-ff 0.5.0", + "ark-serialize 0.5.0", + "rust-kzg-bn254-primitives", ] [[package]] @@ -3738,9 +3681,7 @@ version = "0.23.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f287924602bf649d949c63dc8ac8b235fa5387d394020705b80c4eb597ce5b8" dependencies = [ - "log", "once_cell", - "ring", "rustls-pki-types", "rustls-webpki", "subtle", @@ -4308,16 +4249,6 @@ dependencies = [ "syn 2.0.96", ] -[[package]] -name = "sys-info" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b3a0d0aba8bf96a0e1ddfdc352fc53b3df7f39318c71854910c3c4b024ae52c" -dependencies = [ - "cc", - "libc", -] - [[package]] name = "system-configuration" version = "0.6.1" @@ -4359,33 +4290,13 @@ dependencies = [ "windows-sys 0.59.0", ] -[[package]] -name = "thiserror" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" -dependencies = [ - "thiserror-impl 1.0.69", -] - [[package]] name = "thiserror" version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d452f284b73e6d76dd36758a0c8684b1d5be31f92b89d07fd5822175732206fc" dependencies = [ - "thiserror-impl 2.0.11", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.96", + "thiserror-impl", ] [[package]] @@ -4697,22 +4608,6 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" -[[package]] -name = "ureq" -version = "2.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02d1a66277ed75f640d608235660df48c8e3c19f3b4edb6a263315626cc3c01d" -dependencies = [ - "base64", - "flate2", - "log", - "once_cell", - "rustls", - "rustls-pki-types", - "url", - "webpki-roots", -] - [[package]] name = "url" version = "2.5.4" @@ -4911,15 +4806,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "webpki-roots" -version = "0.26.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d642ff16b7e79272ae451b7322067cdc17cadf68c23264be9d94a32319efe7e" -dependencies = [ - "rustls-pki-types", -] - [[package]] name = "winapi" version = "0.3.9" @@ -4950,7 +4836,7 @@ checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" dependencies = [ "windows-result", "windows-strings", - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -4959,7 +4845,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" dependencies = [ - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -4969,16 +4855,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" dependencies = [ "windows-result", - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", + "windows-targets", ] [[package]] @@ -4987,7 +4864,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -4996,22 +4873,7 @@ version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", + "windows-targets", ] [[package]] @@ -5020,46 +4882,28 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.6", - "windows_x86_64_gnu 0.52.6", - "windows_x86_64_gnullvm 0.52.6", - "windows_x86_64_msvc 0.52.6", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - [[package]] name = "windows_i686_gnu" version = "0.52.6" @@ -5072,48 +4916,24 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - [[package]] name = "windows_x86_64_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - [[package]] name = "windows_x86_64_msvc" version = "0.52.6" diff --git a/Cargo.toml b/Cargo.toml index c7f4ddc..e2329cd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -71,7 +71,9 @@ sha2 = { version = "0.10.8", default-features = false } c-kzg = { version = "2.0.0", default-features = false } anyhow = { version = "1.0.95", default-features = false } thiserror = { version = "2.0.9", default-features = false } -rust-kzg-bn254 = { git = "https://github.com/Layr-Labs/rust-kzg-bn254", rev = "01b3f0bbcea4ef247e71131977bd5d1299b59004", default-features = false } +rust-kzg-bn254-primitives = { git = "https://github.com/Layr-Labs/rust-kzg-bn254", rev = "b3e532e9aad533009849755d5ad7b9578a16bfb2", default-features = false } +rust-kzg-bn254-prover = { git = "https://github.com/Layr-Labs/rust-kzg-bn254", rev = "b3e532e9aad533009849755d5ad7b9578a16bfb2", default-features = false } +rust-kzg-bn254-verifier = { git = "https://github.com/Layr-Labs/rust-kzg-bn254", rev = "b3e532e9aad533009849755d5ad7b9578a16bfb2", default-features = false } ark-bn254 = "0.5.0" ark-ff = { version = "0.5.0", features = ["parallel"] } diff --git a/bin/client/Cargo.toml b/bin/client/Cargo.toml index b9bff1f..65f13a6 100644 --- a/bin/client/Cargo.toml +++ b/bin/client/Cargo.toml @@ -19,10 +19,4 @@ hokulea-eigenda.workspace = true hokulea-cryptography.workspace = true tracing.workspace = true -async-trait.workspace = true -rust-kzg-bn254.workspace = true -num.workspace = true - -ark-bn254.workspace = true - -ark-ff.workspace = true +async-trait.workspace = true \ No newline at end of file diff --git a/crates/cryptography/Cargo.toml b/crates/cryptography/Cargo.toml index fdd9581..7428f67 100644 --- a/crates/cryptography/Cargo.toml +++ b/crates/cryptography/Cargo.toml @@ -5,7 +5,9 @@ edition = "2021" [dependencies] -rust-kzg-bn254.workspace = true +rust-kzg-bn254-verifier.workspace = true +rust-kzg-bn254-prover.workspace = true +rust-kzg-bn254-primitives.workspace = true num.workspace = true ark-bn254.workspace = true ark-ff.workspace = true diff --git a/crates/cryptography/src/witness.rs b/crates/cryptography/src/witness.rs index e0a6af7..22419be 100644 --- a/crates/cryptography/src/witness.rs +++ b/crates/cryptography/src/witness.rs @@ -3,13 +3,13 @@ use alloc::vec::Vec; use alloy_primitives::Bytes; use ark_bn254::{Fq, G1Affine}; use ark_ff::PrimeField; -use rust_kzg_bn254::blob::Blob; -use rust_kzg_bn254::kzg::KZG; -use rust_kzg_bn254::srs::SRS; -use rust_kzg_bn254::batch; +use rust_kzg_bn254_primitives::blob::Blob; +use rust_kzg_bn254_prover::kzg::KZG; +use rust_kzg_bn254_prover::srs::SRS; +use rust_kzg_bn254_verifier::batch; use tracing::info; use num::BigUint; -use rust_kzg_bn254::errors::KzgError; +use rust_kzg_bn254_primitives::errors::KzgError; /// stores #[derive(Debug, Clone, Default)] @@ -38,7 +38,7 @@ impl EigenDABlobWitness { // In the future, it might make sense to let the proxy to return such // value, instead of local computation let srs = SRS::new("resources/g1.32mb.point", 268435456, 1024).unwrap(); - let mut kzg = KZG::new(srs); + let mut kzg = KZG::new(); let input = Blob::new(blob); let input_poly = input.to_polynomial_eval_form(); @@ -47,7 +47,7 @@ impl EigenDABlobWitness { let mut commitment_bytes = vec![0u8; 0]; - let commitment = kzg.commit_eval_form(&input_poly)?; + let commitment = kzg.commit_eval_form(&input_poly, &srs)?; // TODO the library should have returned the bytes, or provide a helper // for conversion. For both proof and commitment @@ -59,7 +59,7 @@ impl EigenDABlobWitness { let mut proof_bytes = vec![0u8; 0]; - let proof = kzg.compute_blob_proof(&input, &commitment)?; + let proof = kzg.compute_blob_proof(&input, &commitment, &srs)?; let proof_x_bigint: BigUint = proof.x.into(); let proof_y_bigint: BigUint = proof.y.into(); @@ -104,7 +104,7 @@ impl EigenDABlobWitness { G1Affine::new(x, y) }) .collect(); - let pairing_result = batch::verify_blob_kzg_proof(&lib_blobs, &lib_commitments, &lib_proofs).unwrap(); + let pairing_result = batch::verify_blob_kzg_proof_batch(&lib_blobs, &lib_commitments, &lib_proofs).unwrap(); pairing_result } diff --git a/crates/eigenda/Cargo.toml b/crates/eigenda/Cargo.toml index e40058c..54f2e13 100644 --- a/crates/eigenda/Cargo.toml +++ b/crates/eigenda/Cargo.toml @@ -12,7 +12,7 @@ alloy-rlp.workspace = true tracing.workspace = true async-trait.workspace = true bytes.workspace = true -rust-kzg-bn254.workspace = true +rust-kzg-bn254-primitives.workspace = true maili-protocol.workspace = true [features] diff --git a/crates/eigenda/src/eigenda_data.rs b/crates/eigenda/src/eigenda_data.rs index d77a88b..1686963 100644 --- a/crates/eigenda/src/eigenda_data.rs +++ b/crates/eigenda/src/eigenda_data.rs @@ -3,7 +3,7 @@ use alloc::vec; use alloy_primitives::Bytes; use bytes::buf::Buf; use kona_derive::errors::BlobDecodingError; -use rust_kzg_bn254::helpers; +use rust_kzg_bn254_primitives::helpers; #[derive(Default, Clone, Debug)] /// Represents the data structure for EigenDA Blob.