From f983c65266767a5935c238d5fa98fc7c67092a43 Mon Sep 17 00:00:00 2001 From: Louis de Wardt Date: Fri, 4 Feb 2022 19:57:13 +0000 Subject: [PATCH] changed competition limits and bump cli --- Cargo.lock | 2 +- competitions/climatehack/src/game_client.rs | 4 ++-- crates/doxa_cli/Cargo.toml | 2 +- crates/doxa_storage/src/route.rs | 2 +- crates/doxa_vm/src/executor.rs | 3 ++- crates/doxa_vm/src/manager.rs | 2 +- 6 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3fd8a4e..3628f85 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1040,7 +1040,7 @@ dependencies = [ [[package]] name = "doxa_cli" -version = "0.1.1" +version = "0.1.2" dependencies = [ "async-stream", "base64 0.13.0", diff --git a/competitions/climatehack/src/game_client.rs b/competitions/climatehack/src/game_client.rs index 5224295..73abcd3 100644 --- a/competitions/climatehack/src/game_client.rs +++ b/competitions/climatehack/src/game_client.rs @@ -165,8 +165,8 @@ impl GameClient for ClimateHackGameClient { type GameEvent = ClimateHackGameEvent; - const AGENT_RAM_MB: u64 = 4 * 1024; - const AGENT_SCRATCH_MB: u64 = 6 * 1024; + const AGENT_RAM_MB: u64 = 6 * 1024; + const AGENT_SCRATCH_MB: u64 = 8 * 1024; async fn run<'a>( &self, diff --git a/crates/doxa_cli/Cargo.toml b/crates/doxa_cli/Cargo.toml index 96cf527..5a86cad 100644 --- a/crates/doxa_cli/Cargo.toml +++ b/crates/doxa_cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "doxa_cli" -version = "0.1.1" +version = "0.1.2" edition = "2018" [dependencies] diff --git a/crates/doxa_storage/src/route.rs b/crates/doxa_storage/src/route.rs index c3f92e6..fa094a1 100644 --- a/crates/doxa_storage/src/route.rs +++ b/crates/doxa_storage/src/route.rs @@ -187,7 +187,7 @@ pub async fn upload( .await??; // TODO: get max size from competition - let max_size = 2_000_000_000; + let max_size = 4_000_000_000; match process_field_upload(&mut f, field, max_size).await { Ok(()) => {} diff --git a/crates/doxa_vm/src/executor.rs b/crates/doxa_vm/src/executor.rs index c843779..deebd2d 100644 --- a/crates/doxa_vm/src/executor.rs +++ b/crates/doxa_vm/src/executor.rs @@ -43,6 +43,7 @@ pub const MAX_AGENT_SIZE: usize = 3_000_000_000; /// Maximum length for messages other than the agent file in bytes pub const MAX_MSG_LEN: usize = 50_000_000; pub const MAX_FILE_NAME_LEN: usize = 300; +pub const STDERR_LEN: usize = 100_000; /// This is the server that runs inside of the VM. pub struct VMExecutor { @@ -121,7 +122,7 @@ impl VMExecutor { .stderr .take() .unwrap() - .take(MAX_MSG_LEN as u64) + .take(STDERR_LEN as u64) .read_to_string(&mut err_output) .await?; } diff --git a/crates/doxa_vm/src/manager.rs b/crates/doxa_vm/src/manager.rs index 87caf45..25d49f9 100644 --- a/crates/doxa_vm/src/manager.rs +++ b/crates/doxa_vm/src/manager.rs @@ -127,7 +127,7 @@ impl Manager { }, drives: drive_sources, machine_config: MachineConfig { - vcpu_count: 2, + vcpu_count: 4, mem_size_mib: memory_size_mib, }, vsock: doxa_firecracker_sdk::spawn::Vsock {