Skip to content

Commit 9fa898a

Browse files
committed
remove redundant elasticity multiplier
1 parent b8847d6 commit 9fa898a

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
prover_server_endpoint = "localhost:3900"
22
proving_time_ms = 5000
3-
elasticity_multiplier = 2

crates/l2/prover/src/prover.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,13 @@ struct ProverData {
2525
struct Prover {
2626
prover_server_endpoint: String,
2727
proving_time_ms: u64,
28-
elasticity_multiplier: u64,
2928
}
3029

3130
impl Prover {
3231
pub fn new(config: ProverConfig) -> Self {
3332
Self {
3433
prover_server_endpoint: config.prover_server_endpoint,
3534
proving_time_ms: config.proving_time_ms,
36-
elasticity_multiplier: config.elasticity_multiplier,
3735
}
3836
}
3937

@@ -86,7 +84,7 @@ impl Prover {
8684
block: input.block,
8785
parent_block_header: input.parent_block_header,
8886
db: input.db,
89-
elasticity_multiplier: self.elasticity_multiplier,
87+
elasticity_multiplier: input.elasticity_multiplier,
9088
}
9189
};
9290
Ok(prover_data)

crates/l2/sequencer/proof_coordinator.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use crate::sequencer::errors::ProverServerError;
2+
use crate::utils::config::block_producer::BlockProducerConfig;
23
use crate::utils::prover::save_state::{
34
block_number_has_state_file, write_state, StateFileType, StateType,
45
};
@@ -32,6 +33,7 @@ pub struct ProverInputData {
3233
pub block: Block,
3334
pub parent_block_header: BlockHeader,
3435
pub db: ExecutionDB,
36+
pub elasticity_multiplier: u64,
3537
}
3638

3739
#[derive(Clone)]
@@ -41,6 +43,7 @@ struct ProofCoordinator {
4143
store: Store,
4244
eth_client: EthClient,
4345
on_chain_proposer_address: Address,
46+
elasticity_multiplier: u64,
4447
}
4548

4649
/// Enum for the ProverServer <--> ProverClient Communication Protocol.
@@ -112,10 +115,12 @@ pub async fn start_proof_coordinator(store: Store) -> Result<(), ConfigError> {
112115
let server_config = ProofCoordinatorConfig::from_env()?;
113116
let eth_config = EthConfig::from_env()?;
114117
let committer_config = CommitterConfig::from_env()?;
118+
let proposer_config = BlockProducerConfig::from_env()?;
115119
let prover_server = ProofCoordinator::new_from_config(
116120
server_config.clone(),
117121
&committer_config,
118122
eth_config.clone(),
123+
&proposer_config,
119124
store,
120125
)
121126
.await?;
@@ -129,6 +134,7 @@ impl ProofCoordinator {
129134
config: ProofCoordinatorConfig,
130135
committer_config: &CommitterConfig,
131136
eth_config: EthConfig,
137+
proposer_config: &BlockProducerConfig,
132138
store: Store,
133139
) -> Result<Self, ConfigError> {
134140
let eth_client = EthClient::new_with_config(
@@ -146,6 +152,7 @@ impl ProofCoordinator {
146152
store,
147153
eth_client,
148154
on_chain_proposer_address,
155+
elasticity_multiplier: proposer_config.elasticity_multiplier,
149156
})
150157
}
151158

@@ -327,6 +334,7 @@ impl ProofCoordinator {
327334
db,
328335
block,
329336
parent_block_header,
337+
elasticity_multiplier: self.elasticity_multiplier,
330338
})
331339
}
332340
}

crates/l2/utils/config/prover.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ use super::errors::ConfigError;
66
pub struct ProverConfig {
77
pub prover_server_endpoint: String,
88
pub proving_time_ms: u64,
9-
pub elasticity_multiplier: u64,
109
}
1110

1211
impl ProverConfig {

0 commit comments

Comments
 (0)