Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion crates/broker/src/aggregator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,13 @@ impl AggregatorService {
.with_context(|| format!("Failed to get journal for {proof_id}"))?
.with_context(|| format!("Journal for {proof_id} missing"))?;

journal_size += journal.len();
// For claim digest match predicate orders, the journal is not included in the calldata.
if !matches!(
order.request.requirements.predicate.predicateType,
PredicateType::ClaimDigestMatch
) {
journal_size += journal.len();
}
}

Ok(journal_size)
Expand Down
8 changes: 6 additions & 2 deletions crates/broker/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ use crate::{errors::CodedError, impl_coded_debug};
mod defaults {
use super::PriorityMode;

const ESTIMATED_GROTH16_TIME: u64 = 15;

pub const fn max_journal_bytes() -> usize {
10_000
}
Expand Down Expand Up @@ -112,7 +114,8 @@ mod defaults {
}

pub const fn min_deadline() -> u64 {
300
// Currently 150 seconds
block_deadline_buffer_secs() + 30
}

pub const fn lookback_blocks() -> u64 {
Expand Down Expand Up @@ -168,7 +171,8 @@ mod defaults {
}

pub const fn block_deadline_buffer_secs() -> u64 {
180
// Currently 120 seconds
txn_timeout() * max_submission_attempts() as u64 + ESTIMATED_GROTH16_TIME * 2
}

pub const fn txn_timeout() -> u64 {
Expand Down
Loading