chore: bump c-kzg and add serde feature (#4499)

This commit is contained in:
Matthias Seitz
2023-09-07 00:15:16 +02:00
committed by GitHub
parent e6f933d53c
commit 685148117a
4 changed files with 29 additions and 27 deletions

View File

@ -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"

View File

@ -51,7 +51,7 @@ pub static MAINNET_KZG_TRUSTED_SETUP: Lazy<Arc<KzgSettings>> = Lazy::new(|| {
pub fn load_trusted_setup_from_bytes(bytes: &[u8]) -> Result<KzgSettings, LoadKzgSettingsError> {
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.