From 706a4bbf68ab455b4c64991426e7d8b46d917713 Mon Sep 17 00:00:00 2001 From: Preston Evans Date: Fri, 27 Oct 2023 14:36:46 -0500 Subject: [PATCH] Fix test compilation --- .../provers/risc0/guest-celestia/src/bin/rollup.rs | 5 +++-- .../demo-rollup/provers/risc0/guest-mock/src/bin/mock_da.rs | 5 +++-- examples/demo-rollup/src/celestia_rollup.rs | 4 ++++ examples/demo-rollup/src/mock_rollup.rs | 4 ++++ 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/examples/demo-rollup/provers/risc0/guest-celestia/src/bin/rollup.rs b/examples/demo-rollup/provers/risc0/guest-celestia/src/bin/rollup.rs index 4beef33b2..ce7ae08a3 100644 --- a/examples/demo-rollup/provers/risc0/guest-celestia/src/bin/rollup.rs +++ b/examples/demo-rollup/provers/risc0/guest-celestia/src/bin/rollup.rs @@ -8,7 +8,7 @@ use demo_stf::AppVerifier; use sov_celestia_adapter::types::Namespace; use sov_celestia_adapter::verifier::CelestiaVerifier; use sov_modules_api::default_context::ZkDefaultContext; -use sov_modules_stf_template::AppTemplate; +use sov_modules_stf_template::{kernels::basic::BasicKernel, AppTemplate}; use sov_risc0_adapter::guest::Risc0Guest; use sov_state::ZkStorage; @@ -20,7 +20,8 @@ risc0_zkvm::guest::entry!(main); pub fn main() { let guest = Risc0Guest::new(); let storage = ZkStorage::new(); - let app: AppTemplate> = AppTemplate::new(); + let app: AppTemplate, BasicKernel<_>> = + AppTemplate::new(); let mut stf_verifier = AppVerifier::new( app, diff --git a/examples/demo-rollup/provers/risc0/guest-mock/src/bin/mock_da.rs b/examples/demo-rollup/provers/risc0/guest-mock/src/bin/mock_da.rs index b28887edc..63fcb5e78 100644 --- a/examples/demo-rollup/provers/risc0/guest-mock/src/bin/mock_da.rs +++ b/examples/demo-rollup/provers/risc0/guest-mock/src/bin/mock_da.rs @@ -2,7 +2,7 @@ use demo_stf::runtime::Runtime; use demo_stf::AppVerifier; use sov_modules_api::default_context::ZkDefaultContext; -use sov_modules_stf_template::AppTemplate; +use sov_modules_stf_template::{kernels::basic::BasicKernel, AppTemplate}; use sov_risc0_adapter::guest::Risc0Guest; use sov_rollup_interface::mocks::MockDaVerifier; use sov_state::ZkStorage; @@ -12,7 +12,8 @@ risc0_zkvm::guest::entry!(main); pub fn main() { let guest = Risc0Guest::new(); let storage = ZkStorage::new(); - let app: AppTemplate> = AppTemplate::new(); + let app: AppTemplate, BasicKernel<_>> = + AppTemplate::new(); let mut stf_verifier = AppVerifier::new(app, MockDaVerifier {}); diff --git a/examples/demo-rollup/src/celestia_rollup.rs b/examples/demo-rollup/src/celestia_rollup.rs index d3c8c1e12..c7e859a8f 100644 --- a/examples/demo-rollup/src/celestia_rollup.rs +++ b/examples/demo-rollup/src/celestia_rollup.rs @@ -6,6 +6,7 @@ use sov_celestia_adapter::{CelestiaConfig, CelestiaService}; use sov_modules_api::default_context::{DefaultContext, ZkDefaultContext}; use sov_modules_api::Spec; use sov_modules_rollup_template::{RollupTemplate, WalletTemplate}; +use sov_modules_stf_template::kernels::basic::BasicKernel; use sov_risc0_adapter::host::Risc0Host; use sov_rollup_interface::services::da::DaService; use sov_state::storage_manager::ProverStorageManager; @@ -32,6 +33,9 @@ impl RollupTemplate for CelestiaDemoRollup { type NativeRuntime = Runtime; + type NativeKernel = BasicKernel; + type ZkKernel = BasicKernel; + fn create_rpc_methods( &self, storage: &::Storage, diff --git a/examples/demo-rollup/src/mock_rollup.rs b/examples/demo-rollup/src/mock_rollup.rs index 84e2fce19..85eb38bc2 100644 --- a/examples/demo-rollup/src/mock_rollup.rs +++ b/examples/demo-rollup/src/mock_rollup.rs @@ -5,6 +5,7 @@ use sov_db::ledger_db::LedgerDB; use sov_modules_api::default_context::{DefaultContext, ZkDefaultContext}; use sov_modules_api::Spec; use sov_modules_rollup_template::RollupTemplate; +use sov_modules_stf_template::kernels::basic::BasicKernel; use sov_risc0_adapter::host::Risc0Host; use sov_rollup_interface::mocks::{MockDaConfig, MockDaService, MockDaSpec}; use sov_rollup_interface::services::da::DaService; @@ -30,6 +31,9 @@ impl RollupTemplate for MockDemoRollup { type ZkRuntime = Runtime; type NativeRuntime = Runtime; + type NativeKernel = BasicKernel; + type ZkKernel = BasicKernel; + fn create_rpc_methods( &self, storage: &::Storage,