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

Commit

Permalink
fix: increase channel sizes and interval speed further
Browse files Browse the repository at this point in the history
  • Loading branch information
gruberb committed Apr 18, 2024
1 parent 35f85f0 commit b98bf85
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion crates/topos-config/src/tce/synchronization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ impl Default for SynchronizationConfig {
}

impl SynchronizationConfig {
pub const INTERVAL_SECONDS: u64 = 30;
pub const INTERVAL_SECONDS: u64 = 60;
pub const LIMIT_PER_SUBNET: usize = 100;

const fn default_interval_seconds() -> u64 {
Expand Down
4 changes: 2 additions & 2 deletions crates/topos-p2p/src/behaviour/gossip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use crate::{constants, event::ComposedEvent, TOPOS_ECHO, TOPOS_GOSSIP, TOPOS_REA

use super::HealthStatus;

const MAX_BATCH_SIZE: usize = 1024;
const MAX_BATCH_SIZE: usize = 2048;

pub struct Behaviour {
batch_size: usize,
Expand Down Expand Up @@ -76,7 +76,7 @@ impl Behaviour {
.unwrap_or(Ok(MAX_BATCH_SIZE))
.unwrap();
let gossipsub = gossipsub::ConfigBuilder::default()
.max_transmit_size(2 * 2048 * 2048)
.max_transmit_size(5 * 2048 * 2048)
.validation_mode(gossipsub::ValidationMode::Strict)
.message_id_fn(|msg_id| {
// Content based id
Expand Down
2 changes: 1 addition & 1 deletion crates/topos-sequencer-subnet-runtime/src/proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ impl SubnetRuntimeProxy {
address: {}, ",
&config.http_endpoint, &config.ws_endpoint, &config.subnet_contract_address
);
let (command_sender, mut command_rcv) = mpsc::channel::<SubnetRuntimeProxyCommand>(1024);
let (command_sender, mut command_rcv) = mpsc::channel::<SubnetRuntimeProxyCommand>(5120);
let ws_runtime_endpoint = config.ws_endpoint.clone();
let http_runtime_endpoint = config.http_endpoint.clone();
let subnet_contract_address = Arc::new(config.subnet_contract_address.clone());
Expand Down
2 changes: 1 addition & 1 deletion crates/topos-tce-api/src/grpc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub(crate) mod console;
#[cfg(test)]
mod tests;

const DEFAULT_CHANNEL_STREAM_CAPACITY: usize = 1024;
const DEFAULT_CHANNEL_STREAM_CAPACITY: usize = 5120;

pub(crate) mod builder;
pub(crate) mod messaging;
Expand Down
2 changes: 1 addition & 1 deletion crates/topos-tce-broadcast/src/task_manager/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ impl TaskManager {
}

pub async fn run(mut self, shutdown_receiver: CancellationToken) {
let mut interval = tokio::time::interval(Duration::from_millis(15));
let mut interval = tokio::time::interval(Duration::from_millis(5));

loop {
tokio::select! {
Expand Down
6 changes: 3 additions & 3 deletions crates/topos-tce-proxy/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ use topos_core::{
use tracing::{debug, error, info, info_span, warn, Instrument, Span};
use tracing_opentelemetry::OpenTelemetrySpanExt;

const CERTIFICATE_OUTBOUND_CHANNEL_SIZE: usize = 2048;
const CERTIFICATE_INBOUND_CHANNEL_SIZE: usize = 2048;
const TCE_PROXY_COMMAND_CHANNEL_SIZE: usize = 2048;
const CERTIFICATE_OUTBOUND_CHANNEL_SIZE: usize = 5120;
const CERTIFICATE_INBOUND_CHANNEL_SIZE: usize = 5120;
const TCE_PROXY_COMMAND_CHANNEL_SIZE: usize = 5120;

// Maximum backoff retry timeout in seconds (1 hour)
const TCE_SUBMIT_CERTIFICATE_BACKOFF_TIMEOUT: Duration = Duration::from_secs(3600);
Expand Down
2 changes: 1 addition & 1 deletion crates/topos-tce/src/app_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ impl AppContext {
validator_store: Arc<ValidatorStore>,
api_context: RuntimeContext,
) -> (Self, mpsc::Receiver<Events>) {
let (events, receiver) = mpsc::channel(2048);
let (events, receiver) = mpsc::channel(5120);
(
Self {
is_validator,
Expand Down

0 comments on commit b98bf85

Please sign in to comment.