diff --git a/crates/topos-certificate-spammer/src/lib.rs b/crates/topos-certificate-spammer/src/lib.rs index 91aa0e51b..36a9a1c8b 100644 --- a/crates/topos-certificate-spammer/src/lib.rs +++ b/crates/topos-certificate-spammer/src/lib.rs @@ -14,7 +14,18 @@ use tracing::{debug, error, info, info_span, Instrument, Span}; use tracing_opentelemetry::OpenTelemetrySpanExt; lazy_static::lazy_static! { - static ref PROOF_SIZE: usize = std::env::var("PROOF_SIZE_KB").map(|v| v.parse::().unwrap_or(0)).unwrap_or(0) * 1024; + /// Size of the proof + static ref PROOF_SIZE_BYTES: usize = + std::env::var("TOPOS_PROOF_SIZE_BYTES") + .ok() + .and_then(|s| s.parse().ok()) + .unwrap_or(1000); + + /// Dummy proof with specified size + static ref STARK_BLOB: Vec = + (0..*PROOF_SIZE_BYTES) + .map(|_| rand::random::()) + .collect::>(); } #[derive(Debug, thiserror::Error)] @@ -102,7 +113,7 @@ pub fn generate_test_certificate( generate_random_32b_array(), target_subnet_ids, 0, - vec![254u8; *PROOF_SIZE], + STARK_BLOB.clone(), )?; new_cert .update_signature(&source_subnet.signing_key)