Skip to content

Commit

Permalink
sharp-p2p -> zetina
Browse files Browse the repository at this point in the history
  • Loading branch information
Okm165 committed Jun 3, 2024
1 parent 1fadf4f commit e319d3a
Show file tree
Hide file tree
Showing 48 changed files with 122 additions and 122 deletions.
4 changes: 2 additions & 2 deletions .devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Binary file removed .github/sharp-p2p-logo.png
Binary file not shown.
Binary file added .github/zetina-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 10 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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" }
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# SHARP-P2P
# Zetina

<div align="center">
<span style="pointer-events: none;">
<img src=".github/sharp-p2p-logo.png" alt="SHARP-P2P Logo" width="200">
<img src=".github/zetina-logo.png" alt="Zetina Logo" width="200">
<br><br>
<img src="https://img.shields.io/badge/v0.1.3-green?style=flat-square&logo=git&logoColor=white&label=version" alt="Version">
</span>
<a href="https://docs.sharp-p2p.iosis.tech/introduction.html" target="_blank">
<a href="https://docs.zetina.iosis.tech/introduction.html" target="_blank">
<img src="https://img.shields.io/badge/v0.1.3-blue?style=flat-square&logo=mdbook&logoColor=white&label=docs" alt="Docs">
</a>
<span style="pointer-events: none;">
<img src="https://img.shields.io/github/actions/workflow/status/iosis-tech/sharp-p2p/test.yaml?style=flat-square&logo=githubactions&logoColor=white&label=Continuous%20Integration" alt="Continuous Integration">
<img src="https://img.shields.io/github/actions/workflow/status/iosis-tech/zetina/test.yaml?style=flat-square&logo=githubactions&logoColor=white&label=Continuous%20Integration" alt="Continuous Integration">
</span>
</div>

## 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.
Expand Down
4 changes: 2 additions & 2 deletions cairo/setup.py
Original file line number Diff line number Diff line change
@@ -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(),
Expand Down
2 changes: 1 addition & 1 deletion crates/common/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "sharp-p2p-common"
name = "zetina-common"
description.workspace = true
edition.workspace = true
homepage.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion crates/common/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
## sharp-p2p-common
## zetina-common
4 changes: 2 additions & 2 deletions crates/compiler/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "sharp-p2p-compiler"
name = "zetina-compiler"
description.workspace = true
edition.workspace = true
homepage.workspace = true
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion crates/compiler/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
## sharp-p2p-compiler
## zetina-compiler
6 changes: 3 additions & 3 deletions crates/compiler/src/cairo_compiler/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion crates/compiler/src/traits.rs
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
8 changes: 4 additions & 4 deletions crates/delegator/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "sharp-p2p-delegator"
name = "zetina-delegator"
description.workspace = true
edition.workspace = true
homepage.workspace = true
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion crates/delegator/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
## sharp-p2p-delegator
## zetina-delegator
22 changes: 11 additions & 11 deletions crates/delegator/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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<dyn std::error::Error>> {
Expand Down
10 changes: 5 additions & 5 deletions crates/executor/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "sharp-p2p-executor"
name = "zetina-executor"
description.workspace = true
edition.workspace = true
homepage.workspace = true
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion crates/executor/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
## sharp-p2p-executor
## zetina-executor
24 changes: 12 additions & 12 deletions crates/executor/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions crates/peer/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "sharp-p2p-peer"
name = "zetina-peer"
description.workspace = true
edition.workspace = true
homepage.workspace = true
Expand All @@ -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
2 changes: 1 addition & 1 deletion crates/peer/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
## sharp-p2p-peer
## zetina-peer
4 changes: 2 additions & 2 deletions crates/prover/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "sharp-p2p-prover"
name = "zetina-prover"
description.workspace = true
edition.workspace = true
homepage.workspace = true
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion crates/prover/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
## sharp-p2p-prover
## zetina-prover
6 changes: 3 additions & 3 deletions crates/prover/src/stone_prover/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion crates/prover/src/stone_prover/tests/models.rs
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
2 changes: 1 addition & 1 deletion crates/prover/src/traits.rs
Original file line number Diff line number Diff line change
@@ -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`.
Expand Down
4 changes: 2 additions & 2 deletions crates/runner/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "sharp-p2p-runner"
name = "zetina-runner"
description.workspace = true
edition.workspace = true
homepage.workspace = true
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion crates/runner/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
## sharp-p2p-runner
## zetina-runner
2 changes: 1 addition & 1 deletion crates/runner/src/cairo_runner/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion crates/runner/src/cairo_runner/tests/models.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Loading

0 comments on commit e319d3a

Please sign in to comment.