From dd9b4239795ad7904b1faf0a552ff3cc4d9a87f3 Mon Sep 17 00:00:00 2001 From: James Date: Wed, 31 Dec 2025 12:33:29 -0500 Subject: [PATCH] fix: preload kzg settings to prevent it from happening during block submission --- .gitattributes | 2 ++ bin/builder.rs | 8 ++++++++ 2 files changed, 10 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..e64f28d --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# exclude changes from `git diff` +Cargo.lock binary diff --git a/bin/builder.rs b/bin/builder.rs index 88a9e39..adf2699 100644 --- a/bin/builder.rs +++ b/bin/builder.rs @@ -17,6 +17,14 @@ async fn main() -> eyre::Result<()> { builder::config_from_env(); + // Pre-load the KZG settings in a separate thread. + // + // This takes ~3 seconds, and we want to do it in parallel with the rest of + // the initialization. + std::thread::spawn(|| { + let _settings = alloy::eips::eip4844::env_settings::EnvKzgSettings::default().get(); + }); + // Set up env and metrics tasks let (env_task, metrics_task) = tokio::try_join!(EnvTask::new(), MetricsTask::new())?;