From ce47fae4fd4e2e756358ff59f845589fc5950808 Mon Sep 17 00:00:00 2001 From: CeciliaZ030 Date: Sat, 13 Jul 2024 03:39:39 +0000 Subject: [PATCH 1/3] rename --- .dockerignore | 2 +- Cargo.lock | 4 ++-- Cargo.toml | 4 ++-- host/Cargo.toml | 2 +- host/src/interfaces.rs | 2 +- host/src/lib.rs | 2 +- host/src/proof.rs | 2 +- host/src/server/api/v2/mod.rs | 2 +- host/src/server/api/v2/proof/cancel.rs | 2 +- host/src/server/api/v2/proof/mod.rs | 2 +- host/src/server/api/v2/proof/prune.rs | 2 +- host/src/server/api/v2/proof/report.rs | 2 +- {task_manager => tasks}/Cargo.toml | 6 +++--- {task_manager => tasks}/src/adv_sqlite.rs | 0 {task_manager => tasks}/src/lib.rs | 0 {task_manager => tasks}/src/mem_db.rs | 0 {task_manager => tasks}/tests/main.rs | 2 +- 17 files changed, 18 insertions(+), 18 deletions(-) rename {task_manager => tasks}/Cargo.toml (90%) rename {task_manager => tasks}/src/adv_sqlite.rs (100%) rename {task_manager => tasks}/src/lib.rs (100%) rename {task_manager => tasks}/src/mem_db.rs (100%) rename {task_manager => tasks}/tests/main.rs (99%) diff --git a/.dockerignore b/.dockerignore index 438e4ad7a..9e898c07c 100644 --- a/.dockerignore +++ b/.dockerignore @@ -19,4 +19,4 @@ !/provers/sgx/setup !/kzg_settings_raw.bin !/core -!/task_manager +!/task 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..7583eaa8a 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, }; From b25711a7d1ce73878199a530ce5b9ce0ced336e1 Mon Sep 17 00:00:00 2001 From: CeciliaZ030 <45245961+CeciliaZ030@users.noreply.github.com> Date: Mon, 15 Jul 2024 02:15:44 -0400 Subject: [PATCH 2/3] Update Cargo.toml --- tasks/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/Cargo.toml b/tasks/Cargo.toml index 7583eaa8a..f7d001eb5 100644 --- a/tasks/Cargo.toml +++ b/tasks/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "raiko-tasks" version = "0.1.0" -authors = "Taiko Labs" +authors = ["Taiko Labs"] edition = "2021" # { workspace = true } [dependencies] From d008974a8616127266707892cc4d2cd2ae0e583f Mon Sep 17 00:00:00 2001 From: CeciliaZ030 <45245961+CeciliaZ030@users.noreply.github.com> Date: Mon, 15 Jul 2024 02:27:46 -0400 Subject: [PATCH 3/3] Update .dockerignore --- .dockerignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.dockerignore b/.dockerignore index 9e898c07c..7a46c3faf 100644 --- a/.dockerignore +++ b/.dockerignore @@ -19,4 +19,4 @@ !/provers/sgx/setup !/kzg_settings_raw.bin !/core -!/task +!/tasks