Skip to content

Commit dd9b423

Browse files
committed
fix: preload kzg settings to prevent it from happening during block submission
1 parent feae877 commit dd9b423

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# exclude changes from `git diff`
2+
Cargo.lock binary

bin/builder.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ async fn main() -> eyre::Result<()> {
1717

1818
builder::config_from_env();
1919

20+
// Pre-load the KZG settings in a separate thread.
21+
//
22+
// This takes ~3 seconds, and we want to do it in parallel with the rest of
23+
// the initialization.
24+
std::thread::spawn(|| {
25+
let _settings = alloy::eips::eip4844::env_settings::EnvKzgSettings::default().get();
26+
});
27+
2028
// Set up env and metrics tasks
2129
let (env_task, metrics_task) = tokio::try_join!(EnvTask::new(), MetricsTask::new())?;
2230

0 commit comments

Comments
 (0)