Skip to content

Commit

Permalink
Integrate sov-mock-da (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
citizen-stig authored Nov 3, 2023
1 parent 4193350 commit 4887f2b
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 29 deletions.
31 changes: 16 additions & 15 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,22 @@ publish = false
rust-version = "1.73"

[workspace.dependencies]
sov-modules-api = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "dc3d236c499598b15fbf64c8e78b7f6018b5f13d" }
sov-state = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "dc3d236c499598b15fbf64c8e78b7f6018b5f13d" }
sov-accounts = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "dc3d236c499598b15fbf64c8e78b7f6018b5f13d" }
sov-bank = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "dc3d236c499598b15fbf64c8e78b7f6018b5f13d" }
sov-ledger-rpc = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "dc3d236c499598b15fbf64c8e78b7f6018b5f13d" }
sov-sequencer-registry = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "dc3d236c499598b15fbf64c8e78b7f6018b5f13d" }
sov-modules-stf-template = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "dc3d236c499598b15fbf64c8e78b7f6018b5f13d" }
sov-modules-rollup-template = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "dc3d236c499598b15fbf64c8e78b7f6018b5f13d" }
sov-stf-runner = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "dc3d236c499598b15fbf64c8e78b7f6018b5f13d" }
sov-db = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "dc3d236c499598b15fbf64c8e78b7f6018b5f13d" }
sov-sequencer = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "dc3d236c499598b15fbf64c8e78b7f6018b5f13d" }
sov-rollup-interface = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "dc3d236c499598b15fbf64c8e78b7f6018b5f13d" }
sov-risc0-adapter = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "dc3d236c499598b15fbf64c8e78b7f6018b5f13d" }
sov-first-read-last-write-cache = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "dc3d236c499598b15fbf64c8e78b7f6018b5f13d" }
sov-cli = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "dc3d236c499598b15fbf64c8e78b7f6018b5f13d" }
sov-modules-api = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "b8a0642f909bdda06ebe0e0211e851d3003dec2a" }
sov-state = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "b8a0642f909bdda06ebe0e0211e851d3003dec2a" }
sov-accounts = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "b8a0642f909bdda06ebe0e0211e851d3003dec2a" }
sov-bank = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "b8a0642f909bdda06ebe0e0211e851d3003dec2a" }
sov-ledger-rpc = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "b8a0642f909bdda06ebe0e0211e851d3003dec2a" }
sov-sequencer-registry = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "b8a0642f909bdda06ebe0e0211e851d3003dec2a" }
sov-modules-stf-template = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "b8a0642f909bdda06ebe0e0211e851d3003dec2a" }
sov-modules-rollup-template = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "b8a0642f909bdda06ebe0e0211e851d3003dec2a" }
sov-stf-runner = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "b8a0642f909bdda06ebe0e0211e851d3003dec2a" }
sov-db = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "b8a0642f909bdda06ebe0e0211e851d3003dec2a" }
sov-sequencer = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "b8a0642f909bdda06ebe0e0211e851d3003dec2a" }
sov-rollup-interface = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "b8a0642f909bdda06ebe0e0211e851d3003dec2a" }
sov-risc0-adapter = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "b8a0642f909bdda06ebe0e0211e851d3003dec2a" }
sov-first-read-last-write-cache = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "b8a0642f909bdda06ebe0e0211e851d3003dec2a" }
sov-cli = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "b8a0642f909bdda06ebe0e0211e851d3003dec2a" }
sov-mock-da = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "b8a0642f909bdda06ebe0e0211e851d3003dec2a" }
stf-starter = { path = "./crates/stf" }

serde = { version = "1.0.188", features = ["derive", "rc"] }
Expand Down
11 changes: 6 additions & 5 deletions crates/provers/risc0/guest-mock/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ risc0-zkvm-platform = "0.18"
serde = { version = "1.0.188", features = ["derive", "rc"] }


sov-rollup-interface = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "dc3d236c499598b15fbf64c8e78b7f6018b5f13d", features = ["mocks"] }
sov-modules-stf-template = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "dc3d236c499598b15fbf64c8e78b7f6018b5f13d" }
sov-modules-api = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "dc3d236c499598b15fbf64c8e78b7f6018b5f13d" }
sov-risc0-adapter = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "dc3d236c499598b15fbf64c8e78b7f6018b5f13d" }
sov-state = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "dc3d236c499598b15fbf64c8e78b7f6018b5f13d" }
sov-rollup-interface = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "b8a0642f909bdda06ebe0e0211e851d3003dec2a" }
sov-mock-da = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "b8a0642f909bdda06ebe0e0211e851d3003dec2a" }
sov-modules-stf-template = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "b8a0642f909bdda06ebe0e0211e851d3003dec2a" }
sov-modules-api = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "b8a0642f909bdda06ebe0e0211e851d3003dec2a" }
sov-risc0-adapter = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "b8a0642f909bdda06ebe0e0211e851d3003dec2a" }
sov-state = { git = "https://github.com/Sovereign-Labs/sovereign-sdk.git", rev = "b8a0642f909bdda06ebe0e0211e851d3003dec2a" }

stf-starter = { path = "../../../stf" }

Expand Down
2 changes: 1 addition & 1 deletion crates/provers/risc0/guest-mock/src/bin/mock_da.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use sov_modules_api::default_context::ZkDefaultContext;
use sov_modules_stf_template::kernels::basic::BasicKernel;
use sov_modules_stf_template::AppTemplate;
use sov_risc0_adapter::guest::Risc0Guest;
use sov_rollup_interface::mocks::MockDaVerifier;
use sov_mock_da::MockDaVerifier;
use sov_state::ZkStorage;
use stf_starter::runtime::Runtime;
use stf_starter::AppVerifier;
Expand Down
4 changes: 2 additions & 2 deletions crates/rollup/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ sov-cli = { workspace = true, optional = true }

sov-db = { workspace = true }
sov-sequencer = { workspace = true }
sov-rollup-interface = { workspace = true, features = ["mocks"] }

sov-rollup-interface = { workspace = true }
sov-mock-da = { workspace = true, features = ["native"] }

anyhow = { workspace = true }
async-trait = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/rollup/src/bin/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use anyhow::Context;
use clap::Parser;
use sov_modules_rollup_template::{Rollup, RollupProverConfig, RollupTemplate};
use sov_rollup_interface::mocks::MockDaConfig;
use sov_mock_da::MockDaConfig;
use sov_rollup_starter::StarterRollup;
use sov_stf_runner::{from_toml_path, RollupConfig};
use stf_starter::genesis_config::GenesisPaths;
Expand Down
2 changes: 1 addition & 1 deletion crates/rollup/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use sov_modules_api::default_context::{DefaultContext, ZkDefaultContext};
use sov_modules_api::Spec;
use sov_modules_stf_template::kernels::basic::BasicKernel;
use sov_risc0_adapter::host::Risc0Host;
use sov_rollup_interface::mocks::{MockDaConfig, MockDaService, MockDaSpec};
use sov_mock_da::{MockDaConfig, MockDaService, MockDaSpec};
use sov_rollup_interface::services::da::DaService;
use sov_state::config::Config as StorageConfig;
use sov_state::{DefaultStorageSpec, ZkStorage};
Expand Down
4 changes: 2 additions & 2 deletions crates/rollup/tests/bank/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use sov_modules_api::default_signature::private_key::DefaultPrivateKey;
use sov_modules_api::transaction::Transaction;
use sov_modules_api::{PrivateKey, Spec};
use sov_modules_rollup_template::RollupProverConfig;
use sov_rollup_interface::mocks::MockDaSpec;
use sov_mock_da::MockDaSpec;
use sov_sequencer::utils::SimpleClient;
use stf_starter::genesis_config::GenesisPaths;
use stf_starter::RuntimeCall;
Expand Down Expand Up @@ -37,7 +37,7 @@ async fn bank_tx_tests() -> Result<(), anyhow::Error> {
tokio::select! {
err = rollup_task => err?,
res = send_test_create_token_tx(port) => res?,
};
}
Ok(())
}

Expand Down
4 changes: 2 additions & 2 deletions crates/rollup/tests/test_helpers.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::net::SocketAddr;

use sov_modules_rollup_template::{RollupProverConfig, RollupTemplate};
use sov_rollup_interface::mocks::{MockAddress, MockDaConfig};
use sov_mock_da::{MockAddress, MockDaConfig};
use sov_rollup_starter::StarterRollup;
use sov_stf_runner::{RollupConfig, RpcConfig, RunnerConfig, StorageConfig};
use stf_starter::genesis_config::GenesisPaths;
Expand All @@ -27,7 +27,7 @@ pub async fn start_rollup(
},
},
da: MockDaConfig {
sender_address: MockAddress { addr: [0; 32] },
sender_address: MockAddress::from([0; 32]),
},
};

Expand Down

0 comments on commit 4887f2b

Please sign in to comment.