From 685148117aab83d4b38f2e05adb8c6c96943f7db Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Thu, 7 Sep 2023 00:15:16 +0200 Subject: [PATCH] chore: bump c-kzg and add serde feature (#4499) --- Cargo.lock | 50 +++++++++++----------- bin/reth/src/node/mod.rs | 2 +- crates/primitives/Cargo.toml | 2 +- crates/primitives/src/constants/eip4844.rs | 2 +- 4 files changed, 29 insertions(+), 27 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index db688335d5..0a5efd77de 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -600,27 +600,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "bindgen" -version = "0.64.0" -source = "git+https://github.com/rust-lang/rust-bindgen?rev=0de11f0a521611ac8738b7b01d19dddaf3899e66#0de11f0a521611ac8738b7b01d19dddaf3899e66" -dependencies = [ - "bitflags 1.3.2", - "cexpr", - "clang-sys", - "lazy_static", - "lazycell", - "log", - "peeking_take_while", - "proc-macro2 1.0.66", - "quote 1.0.33", - "regex", - "rustc-hash", - "shlex", - "syn 2.0.29", - "which", -] - [[package]] name = "bindgen" version = "0.65.1" @@ -642,6 +621,29 @@ dependencies = [ "syn 2.0.29", ] +[[package]] +name = "bindgen" +version = "0.66.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2b84e06fc203107bfbad243f4aba2af864eb7db3b1cf46ea0a023b0b433d2a7" +dependencies = [ + "bitflags 2.4.0", + "cexpr", + "clang-sys", + "lazy_static", + "lazycell", + "log", + "peeking_take_while", + "prettyplease", + "proc-macro2 1.0.66", + "quote 1.0.33", + "regex", + "rustc-hash", + "shlex", + "syn 2.0.29", + "which", +] + [[package]] name = "bit-set" version = "0.5.3" @@ -934,9 +936,9 @@ dependencies = [ [[package]] name = "c-kzg" version = "0.1.0" -source = "git+https://github.com/ethereum/c-kzg-4844#d35b0f3854ab114b48daa9b504f6ee085c61508a" +source = "git+https://github.com/ethereum/c-kzg-4844#f5f6f863d475847876a2bd5ee252058d37c3a15d" dependencies = [ - "bindgen 0.64.0 (git+https://github.com/rust-lang/rust-bindgen?rev=0de11f0a521611ac8738b7b01d19dddaf3899e66)", + "bindgen 0.66.1", "blst", "cc", "glob", @@ -3737,7 +3739,7 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b18cbf29f8ff3542ba22bdce9ac610fcb75d74bb4e2b306b2a2762242025b4f" dependencies = [ - "bindgen 0.64.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bindgen 0.64.0", "errno 0.2.8", "libc", ] diff --git a/bin/reth/src/node/mod.rs b/bin/reth/src/node/mod.rs index cd42ee81fb..6f66d56772 100644 --- a/bin/reth/src/node/mod.rs +++ b/bin/reth/src/node/mod.rs @@ -598,7 +598,7 @@ impl NodeCommand { /// `MAINNET_KZG_TRUSTED_SETUP`. fn kzg_settings(&self) -> eyre::Result> { if let Some(ref trusted_setup_file) = self.trusted_setup_file { - let trusted_setup = KzgSettings::load_trusted_setup_file(trusted_setup_file.into()) + let trusted_setup = KzgSettings::load_trusted_setup_file(trusted_setup_file) .map_err(LoadKzgSettingsError::KzgError)?; Ok(Arc::new(trusted_setup)) } else { diff --git a/crates/primitives/Cargo.toml b/crates/primitives/Cargo.toml index d450c419d3..c0601bd3dd 100644 --- a/crates/primitives/Cargo.toml +++ b/crates/primitives/Cargo.toml @@ -32,7 +32,7 @@ secp256k1 = { workspace = true, default-features = false, features = [ ] } # for eip-4844 -c-kzg = { workspace = true } +c-kzg = { workspace = true, features = ["serde"] } # used for forkid crc = "3" diff --git a/crates/primitives/src/constants/eip4844.rs b/crates/primitives/src/constants/eip4844.rs index 751ddb7390..a484fd49d4 100644 --- a/crates/primitives/src/constants/eip4844.rs +++ b/crates/primitives/src/constants/eip4844.rs @@ -51,7 +51,7 @@ pub static MAINNET_KZG_TRUSTED_SETUP: Lazy> = Lazy::new(|| { pub fn load_trusted_setup_from_bytes(bytes: &[u8]) -> Result { let mut file = tempfile::NamedTempFile::new().map_err(LoadKzgSettingsError::TempFileErr)?; file.write_all(bytes).map_err(LoadKzgSettingsError::TempFileErr)?; - KzgSettings::load_trusted_setup_file(file.path().into()).map_err(LoadKzgSettingsError::KzgError) + KzgSettings::load_trusted_setup_file(file.path()).map_err(LoadKzgSettingsError::KzgError) } /// Error type for loading the trusted setup.