From f9c569f22e8ea7f19d9457fa54cf5a7761b176db Mon Sep 17 00:00:00 2001 From: andrussal Date: Sun, 7 Dec 2025 05:16:52 +0100 Subject: [PATCH] Compose: fail early if KZG bundle is missing/empty --- .../runners/compose/src/workspace.rs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/testing-framework/runners/compose/src/workspace.rs b/testing-framework/runners/compose/src/workspace.rs index bd7a3e0..4e35264 100644 --- a/testing-framework/runners/compose/src/workspace.rs +++ b/testing-framework/runners/compose/src/workspace.rs @@ -62,8 +62,8 @@ impl ComposeWorkspace { } let kzg_source = repo_root.join("testing-framework/assets/stack/kzgrs_test_params"); + let target = temp.path().join("kzgrs_test_params"); if kzg_source.exists() { - let target = temp.path().join("kzgrs_test_params"); if kzg_source.is_dir() { copy_dir_recursive(&kzg_source, &target)?; } else { @@ -72,6 +72,19 @@ impl ComposeWorkspace { })?; } } + // Fail fast if the KZG bundle is missing or empty; DA verifier will panic + // otherwise. + if !target.exists() + || fs::read_dir(&target) + .ok() + .map(|mut it| it.next().is_none()) + .unwrap_or(true) + { + anyhow::bail!( + "KZG params missing in stack assets (expected files in {})", + kzg_source.display() + ); + } Ok(Self { root: temp }) }