Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename jupiter to celestia #670

Merged
merged 4 commits into from
Aug 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 36 additions & 36 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion adapters/celestia/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "jupiter"
name = "celestia"
version = { workspace = true }
edition = { workspace = true }
license = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion adapters/celestia/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pub mod celestia;
pub mod shares;
pub use celestia::*;
pub use crate::celestia::*;

#[cfg(feature = "native")]
pub mod da_service;
Expand Down
71 changes: 38 additions & 33 deletions examples/demo-prover/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/demo-prover/host/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ tokio = { workspace = true }
tracing = "0.1.37"
tracing-subscriber = "0.3.16"

jupiter = { path = "../../../adapters/celestia", features = ["native","bench"] }
celestia = { path = "../../../adapters/celestia", features = ["native","bench"] }
demo-stf = { path = "../../demo-stf" }
sov-rollup-interface = { path = "../../../rollup-interface" }
risc0-adapter = { path = "../../../adapters/risc0" }
Expand Down
10 changes: 5 additions & 5 deletions examples/demo-prover/host/benches/prover_bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ use std::str::FromStr;
use std::sync::{Arc, Mutex};

use anyhow::Context;
use celestia::da_service::CelestiaService;
use celestia::types::{FilteredCelestiaBlock, NamespaceId};
use celestia::verifier::address::CelestiaAddress;
use celestia::verifier::{ChainValidityCondition, RollupParams};
use celestia::BlobWithSender;
use const_rollup_config::{ROLLUP_NAMESPACE_RAW, SEQUENCER_DA_ADDRESS};
use demo_stf::app::{App, DefaultPrivateKey};
use demo_stf::genesis_config::create_demo_genesis_config;
use jupiter::da_service::CelestiaService;
use jupiter::types::{FilteredCelestiaBlock, NamespaceId};
use jupiter::verifier::address::CelestiaAddress;
use jupiter::verifier::{ChainValidityCondition, RollupParams};
use jupiter::BlobWithSender;
use log4rs::config::{Appender, Config, Root};
use methods::ROLLUP_ELF;
use regex::Regex;
Expand Down
8 changes: 4 additions & 4 deletions examples/demo-prover/host/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ use std::env;
use std::str::FromStr;

use anyhow::Context;
use celestia::da_service::{CelestiaService, DaServiceConfig};
use celestia::types::NamespaceId;
use celestia::verifier::address::CelestiaAddress;
use celestia::verifier::{CelestiaSpec, RollupParams};
use const_rollup_config::{ROLLUP_NAMESPACE_RAW, SEQUENCER_DA_ADDRESS};
use demo_stf::app::{App, DefaultPrivateKey};
use demo_stf::genesis_config::create_demo_genesis_config;
use jupiter::da_service::{CelestiaService, DaServiceConfig};
use jupiter::types::NamespaceId;
use jupiter::verifier::address::CelestiaAddress;
use jupiter::verifier::{CelestiaSpec, RollupParams};
use methods::{ROLLUP_ELF, ROLLUP_ID};
use risc0_adapter::host::{Risc0Host, Risc0Verifier};
use serde::Deserialize;
Expand Down
4 changes: 2 additions & 2 deletions examples/demo-prover/methods/guest/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ anyhow = "1.0.68"
risc0-zkvm = { version = "0.16", default-features = false, features = ["std"] }
risc0-zkvm-platform = "0.16"
borsh = { version = "0.10.3", features = ["bytes"] }
jupiter = { path = "../../../../adapters/celestia", default-features = false }
celestia = { path = "../../../../adapters/celestia", default-features = false }
demo-stf = { path = "../../../demo-stf", default-features = false }
sov-rollup-interface = { path = "../../../../rollup-interface", default-features = false}
risc0-adapter = { path = "../../../../adapters/risc0", default-features = false }
Expand Down Expand Up @@ -52,4 +52,4 @@ lto = true
opt-level = 3

[features]
bench=["jupiter/bench", "sov-modules-stf-template/bench", "sov-state/bench", "sov-modules-api/bench", "sov-sequencer-registry/bench"]
bench=["celestia/bench", "sov-modules-stf-template/bench", "sov-state/bench", "sov-modules-api/bench", "sov-sequencer-registry/bench"]
19 changes: 9 additions & 10 deletions examples/demo-prover/methods/guest/src/bin/rollup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

use std::str::FromStr;

use celestia::types::NamespaceId;
use celestia::verifier::address::CelestiaAddress;
use celestia::verifier::{CelestiaSpec, CelestiaVerifier, ChainValidityCondition};
use celestia::{BlobWithSender, CelestiaHeader};
use const_rollup_config::{ROLLUP_NAMESPACE_RAW, SEQUENCER_DA_ADDRESS};
use demo_stf::app::create_zk_app_template;
use demo_stf::ArrayWitness;
use jupiter::types::NamespaceId;
use jupiter::verifier::address::CelestiaAddress;
use jupiter::verifier::{CelestiaSpec, CelestiaVerifier, ChainValidityCondition};
use jupiter::{BlobWithSender, CelestiaHeader};
use risc0_adapter::guest::Risc0Guest;
use risc0_zkvm::guest::env;
use sov_rollup_interface::crypto::NoOpHasher;
Expand All @@ -19,7 +19,6 @@ use sov_rollup_interface::services::da::SlotData;
use sov_rollup_interface::stf::StateTransitionFunction;
use sov_rollup_interface::zk::{StateTransition, ZkvmGuest};


// The rollup stores its data in the namespace b"sov-test" on Celestia
const ROLLUP_NAMESPACE: NamespaceId = NamespaceId(ROLLUP_NAMESPACE_RAW);

Expand All @@ -33,7 +32,6 @@ risc0_zkvm::guest::entry!(main);
// 5. Call end_slot
// 6. Output (Da hash, start_root, end_root, event_root)
pub fn main() {

env::write(&"Start guest\n");
let guest = Risc0Guest;

Expand All @@ -57,15 +55,13 @@ pub fn main() {
let witness: ArrayWitness = guest.read_from_host();
env::write(&"Witness have been read\n");


env::write(&"Applying slot...\n");
let result = app.apply_slot(witness, &header, &mut blobs);

env::write(&"Slot has been applied\n");


// Step 3: Verify tx list
let verifier = CelestiaVerifier::new(jupiter::verifier::RollupParams {
let verifier = CelestiaVerifier::new(celestia::verifier::RollupParams {
namespace: ROLLUP_NAMESPACE,
});

Expand All @@ -92,7 +88,10 @@ pub fn main() {

#[cfg(feature = "bench")]
{
let tuple = ("Cycles per block".to_string(), (end_cycles - start_cycles) as u64);
let tuple = (
"Cycles per block".to_string(),
(end_cycles - start_cycles) as u64,
);
let mut serialized = Vec::new();
serialized.extend(tuple.0.as_bytes());
serialized.push(0);
Expand Down
2 changes: 1 addition & 1 deletion examples/demo-rollup/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ futures = "0.3"
tokio = { workspace = true }
tracing-subscriber = "0.3.17"

jupiter = { path = "../../adapters/celestia" }
celestia = { path = "../../adapters/celestia" }
demo-stf = { path = "../demo-stf", features = ["native"] }
sov-rollup-interface = { path = "../../rollup-interface" }
sov-db = { path = "../../full-node/db/sov-db" }
Expand Down
Loading