Skip to content

Commit fb3d442

Browse files
committed
Separate batch and light client prover configs
1 parent f8b4918 commit fb3d442

File tree

3 files changed

+16
-10
lines changed

3 files changed

+16
-10
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ bitcoin-da = { git = "https://github.com/chainwayxyz/citrea", rev = "82bf52d", f
2626
citrea-sequencer = { git = "https://github.com/chainwayxyz/citrea", rev = "82bf52d" }
2727
sov-ledger-rpc = { git = "https://github.com/chainwayxyz/citrea", rev = "82bf52d", features = ["client"] }
2828
sov-rollup-interface = { git = "https://github.com/chainwayxyz/citrea", rev = "82bf52d" }
29-
sov-stf-runner = { git = "https://github.com/chainwayxyz/citrea", rev = "82bf52d", features = ["native"] }
29+
sov-stf-runner = { git = "https://github.com/chainwayxyz/citrea", branch = "esad/light-client-starter", features = ["native"] }
3030

3131
[patch.crates-io]
3232
bitcoincore-rpc = { version = "0.18.0", git = "https://github.com/chainwayxyz/rust-bitcoincore-rpc.git", rev = "0ae498d" }

src/config/mod.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ pub use docker::DockerConfig;
1414
pub use rollup::{default_rollup_config, RollupConfig};
1515
use serde::Serialize;
1616
pub use sov_stf_runner::{
17-
FullNodeConfig, ProverConfig, RollupPublicKeys, RpcConfig, RunnerConfig, StorageConfig,
17+
BatchProverConfig, FullNodeConfig, LightClientProverConfig, RollupPublicKeys, RpcConfig,
18+
RunnerConfig, StorageConfig,
1819
};
1920
pub use test::TestConfig;
2021
pub use test_case::{TestCaseConfig, TestCaseEnv};
@@ -32,9 +33,9 @@ pub struct FullL2NodeConfig<T> {
3233
}
3334

3435
pub type FullSequencerConfig = FullL2NodeConfig<SequencerConfig>;
35-
pub type FullBatchProverConfig = FullL2NodeConfig<ProverConfig>;
36+
pub type FullBatchProverConfig = FullL2NodeConfig<BatchProverConfig>;
3637
// TODO: use LightClientProverConfig
37-
pub type FullLightClientProverConfig = FullL2NodeConfig<ProverConfig>;
38+
pub type FullLightClientProverConfig = FullL2NodeConfig<LightClientProverConfig>;
3839
pub type FullFullNodeConfig = FullL2NodeConfig<()>;
3940

4041
pub trait NodeKindMarker {
@@ -49,6 +50,10 @@ impl NodeKindMarker for FullBatchProverConfig {
4950
const KIND: NodeKind = NodeKind::BatchProver;
5051
}
5152

53+
impl NodeKindMarker for FullLightClientProverConfig {
54+
const KIND: NodeKind = NodeKind::LightClientProver;
55+
}
56+
5257
impl NodeKindMarker for FullFullNodeConfig {
5358
const KIND: NodeKind = NodeKind::FullNode;
5459
}

src/test_case.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ use super::{
2323
};
2424
use crate::{
2525
config::{
26-
BitcoinServiceConfig, FullLightClientProverConfig, ProverConfig, RpcConfig, RunnerConfig,
27-
SequencerConfig, StorageConfig,
26+
BatchProverConfig, BitcoinServiceConfig, FullLightClientProverConfig,
27+
LightClientProverConfig, RpcConfig, RunnerConfig, SequencerConfig, StorageConfig,
2828
},
2929
traits::NodeT,
3030
utils::{get_default_genesis_path, get_workspace_root},
@@ -191,6 +191,7 @@ impl<T: TestCase> TestCaseRunner<T> {
191191
include_tx_body: true,
192192
accept_public_input_as_proven: Some(true),
193193
sync_blocks_count: 10,
194+
pruning_config: None,
194195
});
195196

196197
let batch_prover_rollup = {
@@ -336,14 +337,14 @@ pub trait TestCase: Send + Sync + 'static {
336337

337338
/// Returns the batch prover configuration for the test.
338339
/// Override this method to provide a custom batch prover configuration.
339-
fn batch_prover_config() -> ProverConfig {
340-
ProverConfig::default()
340+
fn batch_prover_config() -> BatchProverConfig {
341+
BatchProverConfig::default()
341342
}
342343

343344
/// Returns the light client prover configuration for the test.
344345
/// Override this method to provide a custom light client prover configuration.
345-
fn light_client_prover_config() -> ProverConfig {
346-
ProverConfig::default()
346+
fn light_client_prover_config() -> LightClientProverConfig {
347+
LightClientProverConfig::default()
347348
}
348349

349350
/// Returns the test setup

0 commit comments

Comments
 (0)