Skip to content

Commit

Permalink
Make app a private module
Browse files Browse the repository at this point in the history
  • Loading branch information
bkolad committed Oct 8, 2023
1 parent 20c001a commit b1ffb33
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 11 deletions.
4 changes: 2 additions & 2 deletions examples/demo-prover/methods/guest-celestia/src/bin/rollup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
#![no_main]

use const_rollup_config::ROLLUP_NAMESPACE_RAW;
use demo_stf::app::create_zk_app_template;
use demo_stf::create_zk_app_template;
use demo_stf::AppVerifier;
use sov_celestia_adapter::types::NamespaceId;
use sov_celestia_adapter::verifier::CelestiaVerifier;
use demo_stf::AppVerifier;
use sov_risc0_adapter::guest::Risc0Guest;

// The rollup stores its data in the namespace b"sov-test" on Celestia
Expand Down
4 changes: 2 additions & 2 deletions examples/demo-prover/methods/guest-mock/src/bin/mock_da.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![no_main]

use demo_stf::app::create_zk_app_template;
use demo_stf::create_zk_app_template;
use demo_stf::AppVerifier;
use sov_risc0_adapter::guest::Risc0Guest;

Expand All @@ -13,7 +13,7 @@ pub fn main() {

let mut stf_verifier =
AppVerifier::new(create_zk_app_template::<Risc0Guest, _>(), MockDaVerifier {});

stf_verifier
.run_block(guest)
.expect("Prover must be honest");
Expand Down
2 changes: 1 addition & 1 deletion examples/demo-rollup/src/register_rpc.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Full-Node specific RPC methods.
use anyhow::Context;
use demo_stf::app::App;
use demo_stf::App;
use sov_celestia_adapter::verifier::address::CelestiaAddress;
use sov_db::ledger_db::LedgerDB;
#[cfg(feature = "experimental")]
Expand Down
8 changes: 4 additions & 4 deletions examples/demo-rollup/src/rollup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@ use std::str::FromStr;

use anyhow::Context;
use const_rollup_config::SEQUENCER_DA_ADDRESS;
#[cfg(feature = "experimental")]
use demo_stf::app::DefaultPrivateKey;
use demo_stf::app::{create_zk_app_template, App, DefaultContext};
use demo_stf::genesis_config::{get_genesis_config, GenesisPaths, StorageConfig};
use demo_stf::runtime::{get_rpc_methods, GenesisConfig, Runtime};
use demo_stf::AppVerifier;
use demo_stf::{create_zk_app_template, App, AppVerifier, DefaultContext};

#[cfg(feature = "experimental")]
use secp256k1::SecretKey;
use sov_celestia_adapter::verifier::address::CelestiaAddress;
Expand All @@ -21,6 +19,8 @@ use sov_db::ledger_db::LedgerDB;
#[cfg(feature = "experimental")]
use sov_ethereum::experimental::EthRpcConfig;
use sov_modules_api::default_context::ZkDefaultContext;
#[cfg(feature = "experimental")]
use sov_modules_api::default_signature::private_key::DefaultPrivateKey;
use sov_modules_stf_template::AppTemplate;
use sov_rollup_interface::mocks::{
MockAddress, MockDaConfig, MockDaService, MOCK_SEQUENCER_DA_ADDRESS,
Expand Down
7 changes: 5 additions & 2 deletions examples/demo-stf/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
pub mod app;
//#![deny(missing_docs)]
//#![doc = include_str!("../README.md")]

mod app;
pub use app::*;

#[cfg(feature = "native")]
pub mod genesis_config;
Expand All @@ -11,7 +15,6 @@ pub mod tests;
pub mod cli;

use runtime::Runtime;
use sov_modules_api::default_context::ZkDefaultContext;
use sov_modules_stf_template::AppTemplate;
use sov_rollup_interface::da::DaVerifier;
pub use sov_state::ArrayWitness;
Expand Down

0 comments on commit b1ffb33

Please sign in to comment.