Skip to content

Commit

Permalink
Rename rollup-template to sov-rollup-starter (#1035)
Browse files Browse the repository at this point in the history
* renaming

* fix tests

* update prover

* Update stf

* cleanup

* fix ci
  • Loading branch information
bkolad authored Oct 16, 2023
1 parent ff21c4a commit a0cfbca
Show file tree
Hide file tree
Showing 31 changed files with 177 additions and 175 deletions.
116 changes: 58 additions & 58 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 Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ members = [
"full-node/sov-ethereum",
"full-node/sov-stf-runner",

"templates/rollup-template",
"sov-rollup-starter",

"utils/zk-cycle-macros",
"utils/zk-cycle-utils",
Expand Down
58 changes: 58 additions & 0 deletions sov-rollup-starter/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
[package]
name = "sov-rollup-starter"
version.workspace = true
edition.workspace = true
license.workspace = true
authors.workspace = true
homepage.workspace = true
publish.workspace = true
repository.workspace = true
rust-version.workspace = true

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
#stf dependencies
sov-modules-api = { path = "../module-system/sov-modules-api", features = ["native"] }
sov-state = { path = "../module-system/sov-state" }
sov-accounts = { path = "../module-system/module-implementations/sov-accounts", features = ["native"]}
sov-bank = { path = "../module-system/module-implementations/sov-bank", features = ["native"] }
sov-sequencer-registry = { path = "../module-system/module-implementations/sov-sequencer-registry", features = ["native"] }
sov-modules-stf-template = { path = "../module-system/sov-modules-stf-template/", features = ["native"] }
sov-stf-runner = { path = "../full-node/sov-stf-runner", features = ["native"] }
borsh = { workspace = true }
clap = { workspace = true }
serde = { workspace = true }
tracing = { workspace = true }
serde_json = { workspace = true }
jsonrpsee = { workspace = true }
anyhow = { workspace = true }

risc0-starter = { path = "./provers/risc0" }
stf-starter = { path = "./stf", features = ["native"] }

sov-db = { path = "../full-node/db/sov-db" }
sov-sequencer = { path = "../full-node/sov-sequencer" }
sov-rollup-interface = { path = "../rollup-interface", features = ["mocks"] }
tokio = { workspace = true}

# Change dependencies here to use a different DA layer or ZKVM
sov-risc0-adapter = { path = "../adapters/risc0", features = ["native"] }

# binary dependencies
tracing-subscriber = { version = "0.3.17", features = ["env-filter"] }

[dev-dependencies]
tempfile = { workspace = true }

[features]
default = []

[[bin]]
name = "node"
path = "src/bin/node.rs"

[[bin]]
name = "cli_wallet"
path = "src/bin/cli_wallet.rs"

Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Rollup Template

This is still work in progress, please don't use it.

This package is a convenient starting point for building a rollup using the Sovereign SDK
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "template-risc0"
name = "risc0-starter"
version = "0.2.0"
edition = "2021"
resolver = "2"
Expand Down
File renamed without changes.

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

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "template-prover-guest-mock"
name = "guest-mock-starter"
version = "0.2.0"
edition = "2021"
resolver = "2"
Expand All @@ -10,9 +10,9 @@ resolver = "2"
anyhow = "1.0.68"
risc0-zkvm = { version = "0.18", default-features = false, features = ["std"] }
risc0-zkvm-platform = "0.18"
template-stf = { path = "../../../stf" }
sov-risc0-adapter = { path = "../../../../../adapters/risc0" }
sov-rollup-interface = { path = "../../../../../rollup-interface", features = ["mocks"] }
stf-starter = { path = "../../../stf" }
sov-risc0-adapter = { path = "../../../../adapters/risc0" }
sov-rollup-interface = { path = "../../../../rollup-interface", features = ["mocks"] }

[patch.crates-io]
sha2 = { git = "https://github.com/risc0/RustCrypto-hashes", tag = "sha2/v0.10.6-risc0" }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
#![no_main]
//! This binary implements the verification logic for the rollup. This is the code that runs inside
//! of the zkvm in order to generate proofs for the rollup.
use template_stf::{zk_stf, RollupVerifier};
use stf_starter::{zk_stf, RollupVerifier};

use sov_rollup_interface::mocks::MockDaVerifier;
use sov_risc0_adapter::guest::Risc0Guest;
use sov_rollup_interface::mocks::MockDaVerifier;

risc0_zkvm::guest::entry!(main);

pub fn main() {
let guest = Risc0Guest::new();

let mut stf_verifier =
RollupVerifier::new(zk_stf(), MockDaVerifier {});

let mut stf_verifier = RollupVerifier::new(zk_stf(), MockDaVerifier {});

stf_verifier
.run_block(guest)
.expect("Prover must be honest");
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ use std::env;
use std::path::PathBuf;

use anyhow::Context;
use rollup_template::da::{start_da_service, DaConfig};
use rollup_template::rollup::Rollup;
use sov_risc0_adapter::host::Risc0Host;
use sov_rollup_interface::mocks::{MockAddress, MOCK_SEQUENCER_DA_ADDRESS};
use sov_rollup_starter::da::{start_da_service, DaConfig};
use sov_rollup_starter::rollup::Rollup;
use sov_stf_runner::{from_toml_path, RollupConfig};
use template_stf::{get_genesis_config, GenesisPaths};
use stf_starter::{get_genesis_config, GenesisPaths};
use tracing::info;
use tracing_subscriber::filter::LevelFilter;
use tracing_subscriber::EnvFilter;
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use sov_modules_stf_template::AppTemplate;
use sov_rollup_interface::services::da::DaService;
use sov_rollup_interface::zk::ZkvmHost;
use sov_stf_runner::{Prover, RollupConfig, RunnerConfig, StateTransitionRunner};
use template_stf::{get_rpc_methods, GenesisConfig, Runtime, StfWithBuilder};
use stf_starter::{get_rpc_methods, GenesisConfig, Runtime, StfWithBuilder};
use tokio::sync::oneshot;

use crate::rpc::{register_ledger, register_sequencer};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use sov_modules_stf_template::{SequencerOutcome, TxEffect};
use sov_rollup_interface::services::da::DaService;
use sov_sequencer::get_sequencer_rpc;
use sov_stf_runner::get_ledger_rpc;
use template_stf::StfWithBuilder;
use stf_starter::StfWithBuilder;

/// register sequencer rpc methods.
pub(crate) fn register_sequencer<Vm, Da>(
Expand Down
Loading

0 comments on commit a0cfbca

Please sign in to comment.