@@ -134,6 +134,10 @@ pub struct Batcher {
134134
135135 disabled_verifiers : Mutex < U256 > ,
136136
137+ // The list of disabled verifiers from the config file. Note that this is separate from the
138+ // contract's disabled verifiers, and is updated only when the batcher is restarted.
139+ config_disabled_verifiers : Vec < ProvingSystemId > ,
140+
137141 // Observability and monitoring
138142 pub metrics : metrics:: BatcherMetrics ,
139143 pub telemetry : TelemetrySender ,
@@ -298,12 +302,18 @@ impl Batcher {
298302 None
299303 } ;
300304
301- let disabled_verifiers = match service_manager. disabled_verifiers ( ) . call ( ) . await {
302- Ok ( disabled_verifiers ) => Ok ( disabled_verifiers ) ,
305+ let contract_disabled_verifiers = match service_manager. disabled_verifiers ( ) . call ( ) . await {
306+ Ok ( contract_disabled_verifiers ) => Ok ( contract_disabled_verifiers ) ,
303307 Err ( _) => service_manager_fallback. disabled_verifiers ( ) . call ( ) . await ,
304308 }
305309 . expect ( "Failed to get disabled verifiers" ) ;
306310
311+ let config_disabled_verifiers = config. batcher . disabled_verifiers . clone ( ) ;
312+ info ! (
313+ "Disabled verifiers from config: {:?}" ,
314+ config_disabled_verifiers
315+ ) ;
316+
307317 let telemetry = TelemetrySender :: new ( format ! (
308318 "http://{}" ,
309319 config. batcher. telemetry_ip_port_address
@@ -347,7 +357,8 @@ impl Batcher {
347357 posting_batch : Mutex :: new ( false ) ,
348358 batch_state : Mutex :: new ( batch_state) ,
349359 user_states,
350- disabled_verifiers : Mutex :: new ( disabled_verifiers) ,
360+ disabled_verifiers : Mutex :: new ( contract_disabled_verifiers) ,
361+ config_disabled_verifiers,
351362 current_min_max_fee : RwLock :: new ( U256 :: zero ( ) ) ,
352363 metrics,
353364 telemetry,
@@ -1484,6 +1495,10 @@ impl Batcher {
14841495 }
14851496
14861497 async fn is_verifier_disabled ( & self , verifier : ProvingSystemId ) -> bool {
1498+ // Check if the verifier is disabled in the configuration first
1499+ if self . config_disabled_verifiers . contains ( & verifier) {
1500+ return true ;
1501+ }
14871502 let disabled_verifiers = self . disabled_verifiers . lock ( ) . await ;
14881503 zk_utils:: is_verifier_disabled ( * disabled_verifiers, verifier)
14891504 }
0 commit comments