diff --git a/.devcontainer.json b/.devcontainer.json index 925b92b..e0bebc5 100644 --- a/.devcontainer.json +++ b/.devcontainer.json @@ -5,6 +5,6 @@ "mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" ], - "workspaceMount": "type=bind,source=${localWorkspaceFolder},destination=/workshop/sharp-p2p", - "workspaceFolder": "/workshop/sharp-p2p" + "workspaceMount": "type=bind,source=${localWorkspaceFolder},destination=/workshop/zetina", + "workspaceFolder": "/workshop/zetina" } \ No newline at end of file diff --git a/.github/sharp-p2p-logo.png b/.github/sharp-p2p-logo.png deleted file mode 100644 index 5001c21..0000000 Binary files a/.github/sharp-p2p-logo.png and /dev/null differ diff --git a/.github/zetina-logo.png b/.github/zetina-logo.png new file mode 100644 index 0000000..0b42eac Binary files /dev/null and b/.github/zetina-logo.png differ diff --git a/Cargo.toml b/Cargo.toml index ac30b89..1a92d22 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,10 +19,10 @@ exclude = [] [workspace.package] description = "A shared peer-to-peer network of Zero-Knowledge Provers" edition = "2021" -homepage = "https://docs.sharp-p2p.iosis.tech/" +homepage = "https://docs.zetina.iosis.tech/" license-file = "LICENSE" readme = "README.md" -repository = "https://github.com/iosis-tech/sharp-p2p" +repository = "https://github.com/iosis-tech/zetina" version = "0.1.3" [workspace.dependencies] @@ -65,11 +65,11 @@ tokio-util = "0.7.10" tracing = "0.1.37" tracing-subscriber = { version = "0.3", features = ["env-filter"] } -sharp-p2p-common = { path = "crates/common" } -sharp-p2p-compiler = { path = "crates/compiler" } -sharp-p2p-delegator = { path = "crates/delegator" } -sharp-p2p-executor = { path = "crates/executor" } -sharp-p2p-peer = { path = "crates/peer" } -sharp-p2p-prover = { path = "crates/prover" } -sharp-p2p-runner = { path = "crates/runner" } -sharp-p2p-tests = { path = "crates/tests" } +zetina-common = { path = "crates/common" } +zetina-compiler = { path = "crates/compiler" } +zetina-delegator = { path = "crates/delegator" } +zetina-executor = { path = "crates/executor" } +zetina-peer = { path = "crates/peer" } +zetina-prover = { path = "crates/prover" } +zetina-runner = { path = "crates/runner" } +zetina-tests = { path = "crates/tests" } diff --git a/README.md b/README.md index 264d670..e9633f7 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,22 @@ -# SHARP-P2P +# Zetina
- SHARP-P2P Logo + Zetina Logo

Version
- + Docs - Continuous Integration + Continuous Integration
## Overview -The Sharp p2p is a shared peer-to-peer network of Zero-Knowledge Provers. This network allows any party to join and utilize its services, operating with two main user roles: +The Zetina is a shared peer-to-peer network of Zero-Knowledge Provers. This network allows any party to join and utilize its services, operating with two main user roles: 1. **Delegators**: Users who present jobs to be executed on the network. 2. **Executors**: Users who execute the jobs submitted by Delegators. diff --git a/cairo/setup.py b/cairo/setup.py index 376a1e6..d63d941 100644 --- a/cairo/setup.py +++ b/cairo/setup.py @@ -1,9 +1,9 @@ import setuptools setuptools.setup( - name="sharp_p2p_bootloader", + name="zetina_bootloader", version="0.3", - description="sharp_p2p bootloader", + description="zetina bootloader", url="#", author="Okm165", packages=setuptools.find_packages(), diff --git a/crates/common/Cargo.toml b/crates/common/Cargo.toml index 1793306..9fb3ff1 100644 --- a/crates/common/Cargo.toml +++ b/crates/common/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "sharp-p2p-common" +name = "zetina-common" description.workspace = true edition.workspace = true homepage.workspace = true diff --git a/crates/common/README.md b/crates/common/README.md index 8baa72e..1fcb1df 100644 --- a/crates/common/README.md +++ b/crates/common/README.md @@ -1 +1 @@ -## sharp-p2p-common \ No newline at end of file +## zetina-common \ No newline at end of file diff --git a/crates/compiler/Cargo.toml b/crates/compiler/Cargo.toml index d430c79..8afea67 100644 --- a/crates/compiler/Cargo.toml +++ b/crates/compiler/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "sharp-p2p-compiler" +name = "zetina-compiler" description.workspace = true edition.workspace = true homepage.workspace = true @@ -17,7 +17,7 @@ futures.workspace = true libp2p.workspace = true rand.workspace = true serde_json.workspace = true -sharp-p2p-common.workspace = true +zetina-common.workspace = true starknet.workspace = true starknet-crypto.workspace = true tempfile.workspace = true diff --git a/crates/compiler/README.md b/crates/compiler/README.md index 9e7913f..e89a456 100644 --- a/crates/compiler/README.md +++ b/crates/compiler/README.md @@ -1 +1 @@ -## sharp-p2p-compiler \ No newline at end of file +## zetina-compiler \ No newline at end of file diff --git a/crates/compiler/src/cairo_compiler/mod.rs b/crates/compiler/src/cairo_compiler/mod.rs index db67146..0a5845b 100644 --- a/crates/compiler/src/cairo_compiler/mod.rs +++ b/crates/compiler/src/cairo_compiler/mod.rs @@ -3,9 +3,6 @@ use async_process::Stdio; use futures::Future; use rand::{thread_rng, Rng}; use serde_json::json; -use sharp_p2p_common::job::JobData; -use sharp_p2p_common::layout::Layout; -use sharp_p2p_common::{job::Job, process::Process}; use starknet::signers::SigningKey; use starknet_crypto::FieldElement; use std::io::Write; @@ -14,6 +11,9 @@ use std::{io::Read, pin::Pin}; use tempfile::NamedTempFile; use tokio::{process::Command, select, sync::mpsc}; use tracing::debug; +use zetina_common::job::JobData; +use zetina_common::layout::Layout; +use zetina_common::{job::Job, process::Process}; pub mod tests; diff --git a/crates/compiler/src/traits.rs b/crates/compiler/src/traits.rs index 30aeb81..abebd1d 100644 --- a/crates/compiler/src/traits.rs +++ b/crates/compiler/src/traits.rs @@ -1,6 +1,6 @@ use crate::errors::CompilerControllerError; -use sharp_p2p_common::{job::Job, process::Process}; use std::path::PathBuf; +use zetina_common::{job::Job, process::Process}; /* The `CompilerController` trait is responsible for taking a user's program and preparing a `Job` object. diff --git a/crates/delegator/Cargo.toml b/crates/delegator/Cargo.toml index 0164a9b..c2d93c3 100644 --- a/crates/delegator/Cargo.toml +++ b/crates/delegator/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "sharp-p2p-delegator" +name = "zetina-delegator" description.workspace = true edition.workspace = true homepage.workspace = true @@ -15,9 +15,9 @@ futures.workspace = true hex.workspace = true libp2p.workspace = true serde_json.workspace = true -sharp-p2p-common.workspace = true -sharp-p2p-compiler.workspace = true -sharp-p2p-peer.workspace = true +zetina-common.workspace = true +zetina-compiler.workspace = true +zetina-peer.workspace = true tokio.workspace = true tracing-subscriber.workspace = true tracing.workspace = true diff --git a/crates/delegator/README.md b/crates/delegator/README.md index 8dc4dec..4e34844 100644 --- a/crates/delegator/README.md +++ b/crates/delegator/README.md @@ -1 +1 @@ -## sharp-p2p-delegator \ No newline at end of file +## zetina-delegator \ No newline at end of file diff --git a/crates/delegator/src/main.rs b/crates/delegator/src/main.rs index d2a1797..cbe2dc5 100644 --- a/crates/delegator/src/main.rs +++ b/crates/delegator/src/main.rs @@ -2,7 +2,15 @@ use futures::{stream::FuturesUnordered, StreamExt}; use libp2p::gossipsub::Event; -use sharp_p2p_common::{ +use starknet::providers::{jsonrpc::HttpTransport, JsonRpcClient, Url}; +use std::hash::{DefaultHasher, Hash, Hasher}; +use tokio::{ + io::{stdin, AsyncBufReadExt, BufReader}, + sync::mpsc, +}; +use tracing::{debug, info}; +use tracing_subscriber::EnvFilter; +use zetina_common::{ graceful_shutdown::shutdown_signal, hash, job::Job, @@ -11,20 +19,12 @@ use sharp_p2p_common::{ process::Process, topic::{gossipsub_ident_topic, Topic}, }; -use sharp_p2p_compiler::{ +use zetina_compiler::{ cairo_compiler::{tests::models::fixture, CairoCompiler}, errors::CompilerControllerError, traits::CompilerController, }; -use sharp_p2p_peer::{registry::RegistryHandler, swarm::SwarmRunner}; -use starknet::providers::{jsonrpc::HttpTransport, JsonRpcClient, Url}; -use std::hash::{DefaultHasher, Hash, Hasher}; -use tokio::{ - io::{stdin, AsyncBufReadExt, BufReader}, - sync::mpsc, -}; -use tracing::{debug, info}; -use tracing_subscriber::EnvFilter; +use zetina_peer::{registry::RegistryHandler, swarm::SwarmRunner}; #[tokio::main] async fn main() -> Result<(), Box> { diff --git a/crates/executor/Cargo.toml b/crates/executor/Cargo.toml index 028bfdc..8a756b4 100644 --- a/crates/executor/Cargo.toml +++ b/crates/executor/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "sharp-p2p-executor" +name = "zetina-executor" description.workspace = true edition.workspace = true homepage.workspace = true @@ -15,10 +15,10 @@ futures.workspace = true hex.workspace = true libp2p.workspace = true serde_json.workspace = true -sharp-p2p-common.workspace = true -sharp-p2p-peer.workspace = true -sharp-p2p-prover.workspace = true -sharp-p2p-runner.workspace = true +zetina-common.workspace = true +zetina-peer.workspace = true +zetina-prover.workspace = true +zetina-runner.workspace = true tokio.workspace = true tracing-subscriber.workspace = true tracing.workspace = true diff --git a/crates/executor/README.md b/crates/executor/README.md index eacc156..a9c8392 100644 --- a/crates/executor/README.md +++ b/crates/executor/README.md @@ -1 +1 @@ -## sharp-p2p-executor \ No newline at end of file +## zetina-executor \ No newline at end of file diff --git a/crates/executor/src/main.rs b/crates/executor/src/main.rs index 60287ad..8742cd7 100644 --- a/crates/executor/src/main.rs +++ b/crates/executor/src/main.rs @@ -2,7 +2,15 @@ use futures::{stream::FuturesUnordered, StreamExt}; use libp2p::gossipsub::Event; -use sharp_p2p_common::{ +use starknet::providers::{jsonrpc::HttpTransport, JsonRpcClient, Url}; +use std::hash::{DefaultHasher, Hash, Hasher}; +use tokio::{ + io::{stdin, AsyncBufReadExt, BufReader}, + sync::mpsc, +}; +use tracing::{debug, info}; +use tracing_subscriber::EnvFilter; +use zetina_common::{ graceful_shutdown::shutdown_signal, hash, job::Job, @@ -14,21 +22,13 @@ use sharp_p2p_common::{ process::Process, topic::{gossipsub_ident_topic, Topic}, }; -use sharp_p2p_peer::{registry::RegistryHandler, swarm::SwarmRunner}; -use sharp_p2p_prover::{ +use zetina_peer::{registry::RegistryHandler, swarm::SwarmRunner}; +use zetina_prover::{ errors::ProverControllerError, stone_prover::StoneProver, traits::ProverController, }; -use sharp_p2p_runner::{ +use zetina_runner::{ cairo_runner::CairoRunner, errors::RunnerControllerError, traits::RunnerController, }; -use starknet::providers::{jsonrpc::HttpTransport, JsonRpcClient, Url}; -use std::hash::{DefaultHasher, Hash, Hasher}; -use tokio::{ - io::{stdin, AsyncBufReadExt, BufReader}, - sync::mpsc, -}; -use tracing::{debug, info}; -use tracing_subscriber::EnvFilter; const MAX_PARALLEL_JOBS: usize = 1; diff --git a/crates/peer/Cargo.toml b/crates/peer/Cargo.toml index acc5205..0f7c61e 100644 --- a/crates/peer/Cargo.toml +++ b/crates/peer/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "sharp-p2p-peer" +name = "zetina-peer" description.workspace = true edition.workspace = true homepage.workspace = true @@ -18,4 +18,4 @@ starknet.workspace = true tokio-util.workspace = true tokio.workspace = true tracing.workspace = true -sharp-p2p-common.workspace = true +zetina-common.workspace = true diff --git a/crates/peer/README.md b/crates/peer/README.md index 43a40a1..fdec067 100644 --- a/crates/peer/README.md +++ b/crates/peer/README.md @@ -1 +1 @@ -## sharp-p2p-peer \ No newline at end of file +## zetina-peer \ No newline at end of file diff --git a/crates/prover/Cargo.toml b/crates/prover/Cargo.toml index 8102456..e9cf6dc 100644 --- a/crates/prover/Cargo.toml +++ b/crates/prover/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "sharp-p2p-prover" +name = "zetina-prover" description.workspace = true edition.workspace = true homepage.workspace = true @@ -17,7 +17,7 @@ futures.workspace= true itertools.workspace = true serde_json.workspace = true serde.workspace = true -sharp-p2p-common.workspace = true +zetina-common.workspace = true tempfile.workspace = true thiserror.workspace = true tokio.workspace = true diff --git a/crates/prover/README.md b/crates/prover/README.md index b9e21ab..b6e8ee1 100644 --- a/crates/prover/README.md +++ b/crates/prover/README.md @@ -1 +1 @@ -## sharp-p2p-prover \ No newline at end of file +## zetina-prover \ No newline at end of file diff --git a/crates/prover/src/stone_prover/mod.rs b/crates/prover/src/stone_prover/mod.rs index c4595ec..8a0cfd7 100644 --- a/crates/prover/src/stone_prover/mod.rs +++ b/crates/prover/src/stone_prover/mod.rs @@ -7,9 +7,6 @@ use async_process::Stdio; use futures::Future; use itertools::{chain, Itertools}; use serde_json::Value; -use sharp_p2p_common::{ - argvec::ArgVec, hash, job_trace::JobTrace, job_witness::JobWitness, process::Process, -}; use std::{ fs, hash::{DefaultHasher, Hash, Hasher}, @@ -19,6 +16,9 @@ use std::{ use tempfile::NamedTempFile; use tokio::{process::Command, select, sync::mpsc}; use tracing::debug; +use zetina_common::{ + argvec::ArgVec, hash, job_trace::JobTrace, job_witness::JobWitness, process::Process, +}; pub mod tests; pub mod types; diff --git a/crates/prover/src/stone_prover/tests/models.rs b/crates/prover/src/stone_prover/tests/models.rs index 7ca7908..d58629a 100644 --- a/crates/prover/src/stone_prover/tests/models.rs +++ b/crates/prover/src/stone_prover/tests/models.rs @@ -1,6 +1,6 @@ -use sharp_p2p_common::job_trace::JobTrace; use std::{env, fs, io::Write, path::PathBuf}; use tempfile::NamedTempFile; +use zetina_common::job_trace::JobTrace; pub struct TestFixture { pub job_trace: JobTrace, diff --git a/crates/prover/src/traits.rs b/crates/prover/src/traits.rs index 6aa5b54..ee3a0a5 100644 --- a/crates/prover/src/traits.rs +++ b/crates/prover/src/traits.rs @@ -1,5 +1,5 @@ use crate::errors::ProverControllerError; -use sharp_p2p_common::{job_trace::JobTrace, job_witness::JobWitness, process::Process}; +use zetina_common::{job_trace::JobTrace, job_witness::JobWitness, process::Process}; /* The `ProverController` trait defines the behavior for creating zkSTARK proofs from a `JobTrace` obtained from a `RunnerController`. diff --git a/crates/runner/Cargo.toml b/crates/runner/Cargo.toml index 88f8652..a3c0234 100644 --- a/crates/runner/Cargo.toml +++ b/crates/runner/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "sharp-p2p-runner" +name = "zetina-runner" description.workspace = true edition.workspace = true homepage.workspace = true @@ -17,7 +17,7 @@ libp2p.workspace = true rand.workspace = true serde_json.workspace = true serde.workspace = true -sharp-p2p-common.workspace = true +zetina-common.workspace = true starknet.workspace = true starknet-crypto.workspace = true tempfile.workspace = true diff --git a/crates/runner/README.md b/crates/runner/README.md index 4799fda..b8a1f1a 100644 --- a/crates/runner/README.md +++ b/crates/runner/README.md @@ -1 +1 @@ -## sharp-p2p-runner \ No newline at end of file +## zetina-runner \ No newline at end of file diff --git a/crates/runner/src/cairo_runner/mod.rs b/crates/runner/src/cairo_runner/mod.rs index 86f8cbd..0668ce5 100644 --- a/crates/runner/src/cairo_runner/mod.rs +++ b/crates/runner/src/cairo_runner/mod.rs @@ -2,7 +2,6 @@ use self::types::input::SimpleBootloaderInput; use crate::{errors::RunnerControllerError, traits::RunnerController}; use async_process::Stdio; use futures::Future; -use sharp_p2p_common::{hash, job::Job, job_trace::JobTrace, layout::Layout, process::Process}; use starknet::signers::VerifyingKey; use std::{ hash::{DefaultHasher, Hash, Hasher}, @@ -12,6 +11,7 @@ use std::{io::Write, path::PathBuf}; use tempfile::NamedTempFile; use tokio::{process::Command, select, sync::mpsc}; use tracing::debug; +use zetina_common::{hash, job::Job, job_trace::JobTrace, layout::Layout, process::Process}; pub mod tests; pub mod types; diff --git a/crates/runner/src/cairo_runner/tests/models.rs b/crates/runner/src/cairo_runner/tests/models.rs index 57ec523..2125751 100644 --- a/crates/runner/src/cairo_runner/tests/models.rs +++ b/crates/runner/src/cairo_runner/tests/models.rs @@ -1,5 +1,5 @@ use rand::{thread_rng, Rng}; -use sharp_p2p_common::job::{Job, JobData}; +use zetina_common::job::{Job, JobData}; use starknet::signers::SigningKey; use starknet_crypto::FieldElement; diff --git a/crates/runner/src/cairo_runner/types/input.rs b/crates/runner/src/cairo_runner/types/input.rs index 8d8af3c..87b03d2 100644 --- a/crates/runner/src/cairo_runner/types/input.rs +++ b/crates/runner/src/cairo_runner/types/input.rs @@ -1,6 +1,6 @@ use serde::{Deserialize, Serialize}; -use sharp_p2p_common::job::Job; use starknet_crypto::FieldElement; +use zetina_common::job::Job; #[derive(Serialize, Deserialize)] pub struct SimpleBootloaderInput { diff --git a/crates/runner/src/traits.rs b/crates/runner/src/traits.rs index 0b93cf0..f32b852 100644 --- a/crates/runner/src/traits.rs +++ b/crates/runner/src/traits.rs @@ -1,5 +1,5 @@ use crate::errors::RunnerControllerError; -use sharp_p2p_common::{job::Job, job_trace::JobTrace, process::Process}; +use zetina_common::{job::Job, job_trace::JobTrace, process::Process}; /* The `RunnerController` trait defines the responsibility for executing a `Job` within a Cairo bootloader environment. diff --git a/crates/tests/Cargo.toml b/crates/tests/Cargo.toml index c77fc3f..42bca61 100644 --- a/crates/tests/Cargo.toml +++ b/crates/tests/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "sharp-p2p-tests" +name = "zetina-tests" description.workspace = true edition.workspace = true homepage.workspace = true @@ -16,9 +16,9 @@ version.workspace = true futures.workspace = true libp2p.workspace = true rand.workspace = true -sharp-p2p-compiler.workspace = true -sharp-p2p-prover.workspace = true -sharp-p2p-runner.workspace = true +zetina-compiler.workspace = true +zetina-prover.workspace = true +zetina-runner.workspace = true starknet-crypto.workspace = true starknet.workspace = true tokio.workspace = true diff --git a/crates/tests/README.md b/crates/tests/README.md index 6870eeb..4e6ee8f 100644 --- a/crates/tests/README.md +++ b/crates/tests/README.md @@ -1 +1 @@ -## sharp-p2p-tests \ No newline at end of file +## zetina-tests \ No newline at end of file diff --git a/crates/tests/src/tests/compiler_runner_flow.rs b/crates/tests/src/tests/compiler_runner_flow.rs index 3ee60b0..8b22652 100644 --- a/crates/tests/src/tests/compiler_runner_flow.rs +++ b/crates/tests/src/tests/compiler_runner_flow.rs @@ -1,13 +1,13 @@ use futures::stream::FuturesUnordered; use futures::{FutureExt, StreamExt}; -use sharp_p2p_compiler::cairo_compiler::tests::models::fixture as compiler_fixture; -use sharp_p2p_compiler::cairo_compiler::CairoCompiler; -use sharp_p2p_compiler::traits::CompilerController; -use sharp_p2p_runner::cairo_runner::tests::models::fixture as runner_fixture; -use sharp_p2p_runner::cairo_runner::CairoRunner; -use sharp_p2p_runner::traits::RunnerController; use starknet::signers::SigningKey; use starknet_crypto::FieldElement; +use zetina_compiler::cairo_compiler::tests::models::fixture as compiler_fixture; +use zetina_compiler::cairo_compiler::CairoCompiler; +use zetina_compiler::traits::CompilerController; +use zetina_runner::cairo_runner::tests::models::fixture as runner_fixture; +use zetina_runner::cairo_runner::CairoRunner; +use zetina_runner::traits::RunnerController; #[tokio::test] async fn run_single_job() { diff --git a/crates/tests/src/tests/runner_prover_flow.rs b/crates/tests/src/tests/runner_prover_flow.rs index a127490..f91a4c6 100644 --- a/crates/tests/src/tests/runner_prover_flow.rs +++ b/crates/tests/src/tests/runner_prover_flow.rs @@ -1,10 +1,10 @@ use futures::{stream::FuturesUnordered, FutureExt, StreamExt}; -use sharp_p2p_prover::{stone_prover::StoneProver, traits::ProverController}; -use sharp_p2p_runner::{ +use starknet::signers::SigningKey; +use zetina_prover::{stone_prover::StoneProver, traits::ProverController}; +use zetina_runner::{ cairo_runner::{tests::models::fixture as runner_fixture, CairoRunner}, traits::RunnerController, }; -use starknet::signers::SigningKey; #[tokio::test] async fn run_single_job() { diff --git a/delegator.dockerfile b/delegator.dockerfile index 0292653..eed7fa0 100644 --- a/delegator.dockerfile +++ b/delegator.dockerfile @@ -2,10 +2,10 @@ FROM runtime # Build -RUN cargo build --release --bin sharp-p2p-delegator +RUN cargo build --release --bin zetina-delegator # Expose necessary ports EXPOSE 5678/udp 5679/tcp # Set the default command to run when the container starts -CMD ["bash", "-ci", "cargo run --release --bin sharp-p2p-delegator"] +CMD ["bash", "-ci", "cargo run --release --bin zetina-delegator"] diff --git a/docs/book.toml b/docs/book.toml index 90288f7..29465aa 100644 --- a/docs/book.toml +++ b/docs/book.toml @@ -1,10 +1,10 @@ [book] -title = "SHARP-P2P documentation" -description = "Documentation for SHARP-P2P, a shared peer-to-peer network of Zero-Knowledge Provers." +title = "ZETINA documentation" +description = "Documentation for ZETINA, a shared peer-to-peer network of Zero-Knowledge Provers." authors = ["Okm165 - Bartosz Nowak"] language = "en" [output.html] smart-punctuation = true mathjax-support = true -git-repository-url = "https://github.com/iosis-tech/sharp-p2p" \ No newline at end of file +git-repository-url = "https://github.com/iosis-tech/zetina" \ No newline at end of file diff --git a/docs/k8s/certificates.yaml b/docs/k8s/certificates.yaml index 9a5171b..3890644 100644 --- a/docs/k8s/certificates.yaml +++ b/docs/k8s/certificates.yaml @@ -2,12 +2,12 @@ apiVersion: cert-manager.io/v1 kind: Certificate metadata: - name: docs-sharp-p2p-cert + name: docs-zetina-cert spec: - secretName: docs-sharp-p2p-tls + secretName: docs-zetina-tls dnsNames: - - docs.sharp-p2p.iosis.tech + - docs.zetina.iosis.tech issuerRef: name: letsencrypt-http01 kind: Issuer \ No newline at end of file diff --git a/docs/k8s/deployment.yaml b/docs/k8s/deployment.yaml index f5d0679..ed7b150 100644 --- a/docs/k8s/deployment.yaml +++ b/docs/k8s/deployment.yaml @@ -14,7 +14,7 @@ spec: spec: containers: - name: nginx-container - image: registry.internal.iosis.tech/sharp-p2p-docs:latest + image: registry.internal.iosis.tech/zetina-docs:latest ports: - containerPort: 80 @@ -40,10 +40,10 @@ spec: ingressClassName: nginx-ingress-prod tls: - hosts: - - docs.sharp-p2p.iosis.tech - secretName: docs-sharp-p2p-tls + - docs.zetina.iosis.tech + secretName: docs-zetina-tls rules: - - host: docs.sharp-p2p.iosis.tech + - host: docs.zetina.iosis.tech http: paths: - path: / diff --git a/docs/k8s/kustomization.yaml b/docs/k8s/kustomization.yaml index 6268152..1439647 100644 --- a/docs/k8s/kustomization.yaml +++ b/docs/k8s/kustomization.yaml @@ -1,7 +1,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization -namespace: iosis-tech-sharp-p2p-docs +namespace: iosis-tech-zetina-docs resources: - deployment.yaml diff --git a/docs/skaffold.yaml b/docs/skaffold.yaml index 26830f1..031b4a8 100644 --- a/docs/skaffold.yaml +++ b/docs/skaffold.yaml @@ -2,7 +2,7 @@ apiVersion: skaffold/v4beta3 kind: Config build: artifacts: - - image: registry.internal.iosis.tech/sharp-p2p-docs + - image: registry.internal.iosis.tech/zetina-docs docker: dockerfile: Dockerfile manifests: diff --git a/docs/src/architecture/architecture.md b/docs/src/architecture/architecture.md index 9cd7620..dd32ae1 100644 --- a/docs/src/architecture/architecture.md +++ b/docs/src/architecture/architecture.md @@ -2,7 +2,7 @@ We will explore the job pathway as it goes from Delegator to Executor via the peer-to-peer network to better understand the workings of this service: -1. **Delegator Initiates Job**: The Delegator, who has funds deposited into the Registry and is part of the SHARP-P2P network, initiates a job. They define the job, which consists of a Job Header and a Job Body. The Job Header contains basic information about the task, such as its reward and its hash, while the Job Body contains the Cairo program to be executed. +1. **Delegator Initiates Job**: The Delegator, who has funds deposited into the Registry and is part of the Zetina network, initiates a job. They define the job, which consists of a Job Header and a Job Body. The Job Header contains basic information about the task, such as its reward and its hash, while the Job Body contains the Cairo program to be executed. 2. **Storage in Peer-to-Peer Network**: The Delegator signs and stores the Job Body in a Distributed Hash Table (DHT) within the peer-to-peer network. Simultaneously, they sign the Job Header and send it to the peer-to-peer network using a gossip-sub message. @@ -14,6 +14,6 @@ We will explore the job pathway as it goes from Delegator to Executor via the pe 6. **Submission to Registry and Receiving Reward**: The Executor promptly submits the job to the Registry. The Registry verifies the signature of the Delegator, the hash of the job, and the job proof of correctness. If all criteria are met, the Registry sends the funds as a reward. The Delegator subscribes to the Registry contract events and, when a job is successfully registered, the output of the job is emitted. -To sum up, the Delegator pays the Executor for doing their job in a way that is safe and sound for both parties of the SHARP-P2P network. +To sum up, the Delegator pays the Executor for doing their job in a way that is safe and sound for both parties of the Zetina network. ![Architecture](architecture.svg) \ No newline at end of file diff --git a/docs/src/architecture/registry.md b/docs/src/architecture/registry.md index be06f07..361809c 100644 --- a/docs/src/architecture/registry.md +++ b/docs/src/architecture/registry.md @@ -1,6 +1,6 @@ ## Registry Contract -The Registry contract is a critical component of the SHARP-P2P network, responsible for the following tasks: +The Registry contract is a critical component of the Zetina network, responsible for the following tasks: 1. **Fund Management**: Delegators deposit funds into the Registry to offer rewards for job execution. The Registry securely holds these funds until they are distributed to Executors. @@ -10,4 +10,4 @@ The Registry contract is a critical component of the SHARP-P2P network, responsi 4. **Security**: The Registry ensures that only valid and correctly executed jobs are rewarded. This provides a layer of trust and security for both Delegators and Executors in the network. -By managing the financial and verification aspects, the Registry contract plays a pivotal role in maintaining the integrity and efficiency of the Sharp p2p network. \ No newline at end of file +By managing the financial and verification aspects, the Registry contract plays a pivotal role in maintaining the integrity and efficiency of the Zetina network. \ No newline at end of file diff --git a/docs/src/introduction.md b/docs/src/introduction.md index a3df278..9f83a87 100644 --- a/docs/src/introduction.md +++ b/docs/src/introduction.md @@ -1,6 +1,6 @@ -# SHARP-P2P +# ZETINA -The Sharp p2p is a shared peer-to-peer network of Zero-Knowledge Provers. This network allows any party to join and utilize its services, operating with two main user roles: +The Zetina is a shared peer-to-peer network of Zero-Knowledge Provers. This network allows any party to join and utilize its services, operating with two main user roles: 1. **Delegators**: Users who present jobs to be executed on the network. 2. **Executors**: Users who execute the jobs submitted by Delegators. diff --git a/executor.dockerfile b/executor.dockerfile index acb98da..982acc7 100644 --- a/executor.dockerfile +++ b/executor.dockerfile @@ -2,10 +2,10 @@ FROM runtime # Build -RUN cargo build --release --bin sharp-p2p-executor +RUN cargo build --release --bin zetina-executor # Expose necessary ports EXPOSE 5678/udp 5679/tcp # Set the default command to run when the container starts -CMD ["bash", "-ci", "cargo run --release --bin sharp-p2p-executor"] +CMD ["bash", "-ci", "cargo run --release --bin zetina-executor"] diff --git a/registry/src/lib.cairo b/registry/src/lib.cairo index 817a6ac..43a5bba 100644 --- a/registry/src/lib.cairo +++ b/registry/src/lib.cairo @@ -2,7 +2,7 @@ use cairo_verifier::StarkProofWithSerde; use starknet::ContractAddress; #[starknet::interface] -pub trait ISharpP2PRegistry { +pub trait IZetinaRegistry { fn deposit(ref self: TContractState, amount: u256); fn withdraw(ref self: TContractState, amount: u256); fn balance(self: @TContractState, account: ContractAddress) -> u256; @@ -19,8 +19,8 @@ pub trait IFactRegistry { } #[starknet::contract] -pub mod SharpP2PRegistry { - use registry::ISharpP2PRegistry; +pub mod ZetinaRegistry { + use registry::IZetinaRegistry; use openzeppelin::token::erc20::interface::IERC20DispatcherTrait; use cairo_verifier::{ StarkProofWithSerde, air::public_input::PublicInput, @@ -93,7 +93,7 @@ pub mod SharpP2PRegistry { } #[abi(embed_v0)] - impl SharpP2PRegistryImpl of super::ISharpP2PRegistry { + impl ZetinaRegistryImpl of super::IZetinaRegistry { fn deposit(ref self: ContractState, amount: u256) { let caller = get_caller_address(); let this_contract = get_contract_address(); diff --git a/registry/tests/test_contract.cairo b/registry/tests/test_contract.cairo index 68ba274..5bb37a6 100644 --- a/registry/tests/test_contract.cairo +++ b/registry/tests/test_contract.cairo @@ -3,7 +3,7 @@ pub mod proofs; use starknet::ContractAddress; use snforge_std::{declare, ContractClassTrait}; use registry::{ - ISharpP2PRegistryDispatcher, ISharpP2PRegistryDispatcherTrait, SharpP2PRegistry::get_metadata + IZetinaRegistryDispatcher, IZetinaRegistryDispatcherTrait, ZetinaRegistry::get_metadata }; use cairo_verifier::StarkProofWithSerde; diff --git a/runtime.dockerfile b/runtime.dockerfile index 83f3cf8..ababeef 100644 --- a/runtime.dockerfile +++ b/runtime.dockerfile @@ -63,7 +63,7 @@ COPY --from=stone-prover /bin/cpu_air_prover /root/.local/bin/ COPY --from=stone-prover /bin/cpu_air_verifier /root/.local/bin/ # Set the working directory -WORKDIR /sharp-p2p +WORKDIR /zetina # Copy the current directory content into the container COPY cairo/ cairo/