Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

Commit

Permalink
chore: adding dummy proof size for spammer
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Paitrault <[email protected]>
  • Loading branch information
Freyskeyd committed Jul 28, 2023
1 parent 2963509 commit afce88a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/topos-certificate-spammer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ tracing-opentelemetry.workspace = true
opentelemetry.workspace = true
tiny-keccak.workspace = true
uuid.workspace = true
lazy_static.workspace = true

toml = "0.5.9"

Expand Down
6 changes: 5 additions & 1 deletion crates/topos-certificate-spammer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ use topos_tce_proxy::client::{TceClient, TceClientBuilder};
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::<usize>().unwrap_or(0)).unwrap_or(0) * 1024;
}

#[derive(Debug, thiserror::Error)]
pub enum Error {
#[error("target nodes are not specified")]
Expand Down Expand Up @@ -98,7 +102,7 @@ pub fn generate_test_certificate(
generate_random_32b_array(),
target_subnet_ids,
0,
Vec::new(),
vec![254u8; *PROOF_SIZE],
)?;
new_cert
.update_signature(&source_subnet.signing_key)
Expand Down

0 comments on commit afce88a

Please sign in to comment.