diff --git a/.dockerignore b/.dockerignore index 438e4ad7a..7a46c3faf 100644 --- a/.dockerignore +++ b/.dockerignore @@ -19,4 +19,4 @@ !/provers/sgx/setup !/kzg_settings_raw.bin !/core -!/task_manager +!/tasks diff --git a/Cargo.lock b/Cargo.lock index acf5d397e..62433c5fb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5757,7 +5757,7 @@ dependencies = [ "proptest", "raiko-core", "raiko-lib", - "raiko-task-manager", + "raiko-tasks", "reqwest 0.11.27", "reqwest 0.12.5", "reth-evm", @@ -5894,7 +5894,7 @@ dependencies = [ ] [[package]] -name = "raiko-task-manager" +name = "raiko-tasks" version = "0.1.0" dependencies = [ "alloy-primitives", diff --git a/Cargo.toml b/Cargo.toml index 0531c25c5..e9279b135 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ members = [ "provers/sgx/setup", "pipeline", "core", - "task_manager", + "tasks", ] # Always optimize; building and running the guest takes much longer without optimization. @@ -36,7 +36,7 @@ opt-level = 3 # raiko raiko-lib = { path = "./lib", features = ["std"] } raiko-core = { path = "./core" } -raiko-task-manager = { path = "./task_manager" } +raiko-tasks = { path = "./tasks" } # reth reth-primitives = { git = "https://github.com/taikoxyz/taiko-reth.git", branch = "v1.0.0-rc.2-taiko", default-features = false, features = ["alloy-compat", "taiko"] } diff --git a/host/Cargo.toml b/host/Cargo.toml index f41b538cf..32eb09207 100644 --- a/host/Cargo.toml +++ b/host/Cargo.toml @@ -14,7 +14,7 @@ sgx-prover = { path = "../provers/sgx/prover", optional = true } # raiko raiko-lib = { workspace = true } raiko-core = { workspace = true } -raiko-task-manager = { workspace = true } +raiko-tasks = { workspace = true } # alloy alloy-rlp = { workspace = true } diff --git a/host/src/interfaces.rs b/host/src/interfaces.rs index 69d42cfa6..0d78cec10 100644 --- a/host/src/interfaces.rs +++ b/host/src/interfaces.rs @@ -1,7 +1,7 @@ use axum::response::IntoResponse; use raiko_core::interfaces::ProofType; use raiko_lib::prover::ProverError; -use raiko_task_manager::{TaskManagerError, TaskStatus}; +use raiko_tasks::{TaskManagerError, TaskStatus}; use tokio::sync::mpsc::error::TrySendError; use utoipa::ToSchema; diff --git a/host/src/lib.rs b/host/src/lib.rs index c962a25ba..a4efb905e 100644 --- a/host/src/lib.rs +++ b/host/src/lib.rs @@ -8,7 +8,7 @@ use raiko_core::{ merge, }; use raiko_lib::consts::SupportedChainSpecs; -use raiko_task_manager::TaskManagerOpts; +use raiko_tasks::TaskManagerOpts; use serde::{Deserialize, Serialize}; use serde_json::Value; use tokio::sync::mpsc; diff --git a/host/src/proof.rs b/host/src/proof.rs index 41a6df550..f49fcbc89 100644 --- a/host/src/proof.rs +++ b/host/src/proof.rs @@ -6,7 +6,7 @@ use raiko_core::{ Raiko, }; use raiko_lib::{consts::SupportedChainSpecs, Measurement}; -use raiko_task_manager::{get_task_manager, TaskManager, TaskStatus}; +use raiko_tasks::{get_task_manager, TaskManager, TaskStatus}; use tokio::sync::{mpsc::Receiver, Semaphore}; use tracing::{error, info}; diff --git a/host/src/server/api/v2/mod.rs b/host/src/server/api/v2/mod.rs index 22aaa36c6..29091dbea 100644 --- a/host/src/server/api/v2/mod.rs +++ b/host/src/server/api/v2/mod.rs @@ -1,5 +1,5 @@ use axum::{response::IntoResponse, Json, Router}; -use raiko_task_manager::TaskStatus; +use raiko_tasks::TaskStatus; use serde::{Serialize, Serializer}; use utoipa::{OpenApi, ToSchema}; use utoipa_scalar::{Scalar, Servable}; diff --git a/host/src/server/api/v2/proof/cancel.rs b/host/src/server/api/v2/proof/cancel.rs index 209fdb60b..62c892ac9 100644 --- a/host/src/server/api/v2/proof/cancel.rs +++ b/host/src/server/api/v2/proof/cancel.rs @@ -1,6 +1,6 @@ use axum::{debug_handler, extract::State, routing::post, Json, Router}; use raiko_core::{interfaces::ProofRequest, provider::get_task_data}; -use raiko_task_manager::{get_task_manager, TaskManager, TaskStatus}; +use raiko_tasks::{get_task_manager, TaskManager, TaskStatus}; use serde_json::Value; use utoipa::OpenApi; diff --git a/host/src/server/api/v2/proof/mod.rs b/host/src/server/api/v2/proof/mod.rs index b2f787fa0..6e66e5506 100644 --- a/host/src/server/api/v2/proof/mod.rs +++ b/host/src/server/api/v2/proof/mod.rs @@ -1,6 +1,6 @@ use axum::{debug_handler, extract::State, routing::post, Json, Router}; use raiko_core::{interfaces::ProofRequest, provider::get_task_data}; -use raiko_task_manager::{ +use raiko_tasks::{ get_task_manager, EnqueueTaskParams, TaskManager, TaskProvingStatus, TaskStatus, }; use serde_json::Value; diff --git a/host/src/server/api/v2/proof/prune.rs b/host/src/server/api/v2/proof/prune.rs index c58482808..9e14b3f1a 100644 --- a/host/src/server/api/v2/proof/prune.rs +++ b/host/src/server/api/v2/proof/prune.rs @@ -1,5 +1,5 @@ use axum::{debug_handler, extract::State, routing::post, Router}; -use raiko_task_manager::{get_task_manager, TaskManager}; +use raiko_tasks::{get_task_manager, TaskManager}; use utoipa::OpenApi; use crate::{interfaces::HostResult, server::api::v2::PruneStatus, ProverState}; diff --git a/host/src/server/api/v2/proof/report.rs b/host/src/server/api/v2/proof/report.rs index 2f84afae8..c5a3cb095 100644 --- a/host/src/server/api/v2/proof/report.rs +++ b/host/src/server/api/v2/proof/report.rs @@ -1,5 +1,5 @@ use axum::{debug_handler, extract::State, routing::post, Json, Router}; -use raiko_task_manager::{get_task_manager, TaskManager}; +use raiko_tasks::{get_task_manager, TaskManager}; use serde_json::Value; use utoipa::OpenApi; diff --git a/task_manager/Cargo.toml b/tasks/Cargo.toml similarity index 90% rename from task_manager/Cargo.toml rename to tasks/Cargo.toml index 8fe4187f3..f7d001eb5 100644 --- a/task_manager/Cargo.toml +++ b/tasks/Cargo.toml @@ -1,7 +1,7 @@ [package] -name = "raiko-task-manager" +name = "raiko-tasks" version = "0.1.0" -authors = ["Mamy Ratsimbazafy "] +authors = ["Taiko Labs"] edition = "2021" # { workspace = true } [dependencies] @@ -33,5 +33,5 @@ sqlite = [] in-memory = [] [[test]] -name = "task_manager_tests" +name = "tasks_tests" path = "tests/main.rs" diff --git a/task_manager/src/adv_sqlite.rs b/tasks/src/adv_sqlite.rs similarity index 100% rename from task_manager/src/adv_sqlite.rs rename to tasks/src/adv_sqlite.rs diff --git a/task_manager/src/lib.rs b/tasks/src/lib.rs similarity index 100% rename from task_manager/src/lib.rs rename to tasks/src/lib.rs diff --git a/task_manager/src/mem_db.rs b/tasks/src/mem_db.rs similarity index 100% rename from task_manager/src/mem_db.rs rename to tasks/src/mem_db.rs diff --git a/task_manager/tests/main.rs b/tasks/tests/main.rs similarity index 99% rename from task_manager/tests/main.rs rename to tasks/tests/main.rs index e5b85addd..3b0099181 100644 --- a/task_manager/tests/main.rs +++ b/tasks/tests/main.rs @@ -15,7 +15,7 @@ mod tests { use rand_chacha::ChaCha8Rng; use raiko_lib::{input::BlobProofType, primitives::B256}; - use raiko_task_manager::{ + use raiko_tasks::{ get_task_manager, EnqueueTaskParams, TaskManager, TaskManagerOpts, TaskStatus, };